@ptsecurity/mosaic 15.6.0 → 16.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 (750) hide show
  1. package/_theming.scss +19 -0
  2. package/_visual.scss +2 -0
  3. package/autocomplete/autocomplete-trigger.directive.d.ts +6 -16
  4. package/autocomplete/autocomplete.component.d.ts +1 -1
  5. package/button/button.component.d.ts +1 -1
  6. package/button-toggle/button-toggle.component.d.ts +3 -3
  7. package/card/card.component.d.ts +1 -1
  8. package/checkbox/_checkbox-theme.scss +4 -0
  9. package/checkbox/checkbox-config.d.ts +1 -1
  10. package/checkbox/checkbox.d.ts +1 -1
  11. package/code-block/actionbar.component.d.ts +1 -1
  12. package/code-block/code-block.component.d.ts +1 -1
  13. package/core/common-behaviors/color.d.ts +1 -1
  14. package/core/common-behaviors/constructor.d.ts +2 -2
  15. package/core/common-behaviors/disabled.d.ts +1 -1
  16. package/core/common-behaviors/error-state.d.ts +1 -1
  17. package/core/common-behaviors/tabindex.d.ts +1 -1
  18. package/core/datetime/date-formats.d.ts +1 -1
  19. package/core/formatters/index.d.ts +1 -1
  20. package/core/formatters/number/formatter.d.ts +55 -0
  21. package/core/label/label-options.d.ts +1 -1
  22. package/core/locales/en-US.d.ts +13 -2
  23. package/core/locales/es-LA.d.ts +21 -0
  24. package/core/locales/fa-IR.d.ts +22 -0
  25. package/core/locales/locale-service.d.ts +111 -5
  26. package/core/locales/pt-BR.d.ts +21 -0
  27. package/core/locales/ru-RU.d.ts +13 -2
  28. package/core/locales/zh-CN.d.ts +20 -0
  29. package/core/option/action.d.ts +1 -1
  30. package/core/option/optgroup.d.ts +1 -1
  31. package/core/option/option.d.ts +37 -8
  32. package/core/overlay/overlay-position-map.d.ts +7 -1
  33. package/core/selection/pseudo-checkbox/pseudo-checkbox.d.ts +2 -2
  34. package/core/styles/_variables.scss +1 -0
  35. package/core/styles/theming/_theming.scss +1 -0
  36. package/datepicker/calendar-body.component.d.ts +2 -2
  37. package/datepicker/calendar-header.component.d.ts +9 -3
  38. package/datepicker/calendar.component.d.ts +4 -5
  39. package/datepicker/datepicker-input.directive.d.ts +1 -1
  40. package/datepicker/datepicker-toggle.component.d.ts +1 -1
  41. package/datepicker/datepicker.component.d.ts +1 -1
  42. package/datepicker/month-view.component.d.ts +4 -5
  43. package/divider/divider.component.d.ts +1 -1
  44. package/dl/dl.component.d.ts +1 -1
  45. package/dropdown/dropdown-item.component.d.ts +1 -1
  46. package/dropdown/dropdown-trigger.directive.d.ts +1 -1
  47. package/dropdown/dropdown.component.d.ts +1 -1
  48. package/dropdown/dropdown.types.d.ts +3 -3
  49. package/ellipsis-center/ellipsis-center.directive.d.ts +1 -1
  50. package/{esm2020 → esm2022}/autocomplete/autocomplete-origin.directive.mjs +4 -4
  51. package/esm2022/autocomplete/autocomplete-trigger.directive.mjs +555 -0
  52. package/{esm2020 → esm2022}/autocomplete/autocomplete.component.mjs +26 -26
  53. package/{esm2020 → esm2022}/autocomplete/autocomplete.module.mjs +10 -10
  54. package/esm2022/button/button.component.mjs +148 -0
  55. package/{esm2020 → esm2022}/button/button.module.mjs +13 -13
  56. package/esm2022/button-toggle/button-toggle.component.mjs +381 -0
  57. package/{esm2020 → esm2022}/button-toggle/button-toggle.module.mjs +5 -5
  58. package/esm2022/card/card.component.mjs +80 -0
  59. package/{esm2020 → esm2022}/card/card.module.mjs +9 -9
  60. package/{esm2020 → esm2022}/checkbox/checkbox-module.mjs +5 -5
  61. package/{esm2020 → esm2022}/checkbox/checkbox-required-validator.mjs +4 -4
  62. package/esm2022/checkbox/checkbox.mjs +300 -0
  63. package/{esm2020 → esm2022}/code-block/actionbar.component.mjs +4 -4
  64. package/esm2022/code-block/code-block.component.mjs +157 -0
  65. package/esm2022/code-block/code-block.module.mjs +60 -0
  66. package/esm2022/core/common-behaviors/color.mjs +33 -0
  67. package/{esm2020 → esm2022}/core/common-behaviors/common-module.mjs +5 -5
  68. package/{esm2020 → esm2022}/core/common-behaviors/disabled.mjs +6 -6
  69. package/{esm2020 → esm2022}/core/common-behaviors/tabindex.mjs +6 -6
  70. package/{esm2020 → esm2022}/core/error/error-options.mjs +7 -7
  71. package/{esm2020 → esm2022}/core/formatters/date/formatter.mjs +4 -4
  72. package/{esm2020 → esm2022}/core/formatters/date/formatter.pipe.mjs +40 -40
  73. package/esm2022/core/formatters/index.mjs +86 -0
  74. package/esm2022/core/formatters/number/formatter.mjs +350 -0
  75. package/{esm2020 → esm2022}/core/forms/forms-module.mjs +7 -7
  76. package/{esm2020 → esm2022}/core/forms/forms.directive.mjs +7 -7
  77. package/{esm2020 → esm2022}/core/highlight/highlight.pipe.mjs +4 -4
  78. package/{esm2020 → esm2022}/core/highlight/index.mjs +5 -5
  79. package/{esm2020 → esm2022}/core/line/line.mjs +8 -8
  80. package/esm2022/core/locales/en-US.mjs +21 -0
  81. package/esm2022/core/locales/es-LA.mjs +27 -0
  82. package/esm2022/core/locales/fa-IR.mjs +28 -0
  83. package/{esm2020 → esm2022}/core/locales/locale-service.mjs +7 -7
  84. package/{esm2020 → esm2022}/core/locales/locale-service.module.mjs +7 -7
  85. package/esm2022/core/locales/pt-BR.mjs +27 -0
  86. package/esm2022/core/locales/ru-RU.mjs +21 -0
  87. package/esm2022/core/locales/zh-CN.mjs +26 -0
  88. package/{esm2020 → esm2022}/core/option/action.mjs +9 -9
  89. package/{esm2020 → esm2022}/core/option/optgroup.mjs +4 -4
  90. package/{esm2020 → esm2022}/core/option/option-module.mjs +5 -5
  91. package/esm2022/core/option/option.mjs +298 -0
  92. package/esm2022/core/overlay/overlay-position-map.mjs +251 -0
  93. package/{esm2020 → esm2022}/core/pop-up/pop-up-trigger.mjs +4 -4
  94. package/{esm2020 → esm2022}/core/pop-up/pop-up.mjs +4 -4
  95. package/{esm2020 → esm2022}/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +4 -4
  96. package/{esm2020 → esm2022}/core/selection/pseudo-checkbox/pseudo-checkbox.module.mjs +5 -5
  97. package/esm2022/core/services/measure-scrollbar.service.mjs +48 -0
  98. package/{esm2020 → esm2022}/core/utils/data-size/data-size.pipe.mjs +8 -8
  99. package/{esm2020 → esm2022}/core/version.mjs +2 -2
  100. package/{esm2020 → esm2022}/datepicker/calendar-body.component.mjs +4 -4
  101. package/esm2022/datepicker/calendar-header.component.mjs +135 -0
  102. package/esm2022/datepicker/calendar.component.mjs +166 -0
  103. package/esm2022/datepicker/datepicker-input.directive.mjs +955 -0
  104. package/{esm2020 → esm2022}/datepicker/datepicker-intl.mjs +4 -4
  105. package/{esm2020 → esm2022}/datepicker/datepicker-module.mjs +38 -38
  106. package/esm2022/datepicker/datepicker-toggle.component.mjs +86 -0
  107. package/esm2022/datepicker/datepicker.component.mjs +393 -0
  108. package/esm2022/datepicker/month-view.component.mjs +149 -0
  109. package/{esm2020 → esm2022}/divider/divider.component.mjs +4 -4
  110. package/{esm2020 → esm2022}/divider/divider.module.mjs +5 -5
  111. package/{esm2020 → esm2022}/dl/dl.component.mjs +10 -10
  112. package/{esm2020 → esm2022}/dl/dl.module.mjs +13 -13
  113. package/{esm2020 → esm2022}/dropdown/dropdown-content.directive.mjs +4 -4
  114. package/{esm2020 → esm2022}/dropdown/dropdown-item.component.mjs +6 -6
  115. package/esm2022/dropdown/dropdown-trigger.directive.mjs +489 -0
  116. package/esm2022/dropdown/dropdown.component.mjs +292 -0
  117. package/{esm2020 → esm2022}/dropdown/dropdown.module.mjs +15 -15
  118. package/esm2022/ellipsis-center/ellipsis-center.directive.mjs +106 -0
  119. package/{esm2020 → esm2022}/file-upload/file-drop.mjs +4 -4
  120. package/{esm2020 → esm2022}/file-upload/file-upload.module.mjs +25 -25
  121. package/esm2022/file-upload/multiple-file-upload.component.mjs +165 -0
  122. package/esm2022/file-upload/single-file-upload.component.mjs +134 -0
  123. package/{esm2020 → esm2022}/form-field/cleaner.mjs +4 -4
  124. package/esm2022/form-field/form-field.mjs +267 -0
  125. package/{esm2020 → esm2022}/form-field/form-field.module.mjs +23 -23
  126. package/{esm2020 → esm2022}/form-field/hint.mjs +4 -4
  127. package/{esm2020 → esm2022}/form-field/password-hint.mjs +9 -9
  128. package/{esm2020 → esm2022}/form-field/prefix.mjs +4 -4
  129. package/{esm2020 → esm2022}/form-field/stepper.mjs +6 -6
  130. package/{esm2020 → esm2022}/form-field/suffix.mjs +4 -4
  131. package/esm2022/form-field/validate.directive.mjs +158 -0
  132. package/{esm2020 → esm2022}/icon/icon.component.mjs +7 -7
  133. package/{esm2020 → esm2022}/icon/icon.module.mjs +11 -11
  134. package/{esm2020 → esm2022}/input/input-number-validators.mjs +7 -7
  135. package/esm2022/input/input-number.mjs +168 -0
  136. package/esm2022/input/input-password.mjs +343 -0
  137. package/esm2022/input/input.mjs +297 -0
  138. package/{esm2020 → esm2022}/input/input.module.mjs +23 -23
  139. package/esm2022/link/link.component.mjs +122 -0
  140. package/{esm2020 → esm2022}/link/link.module.mjs +7 -7
  141. package/esm2022/list/list-selection.component.mjs +705 -0
  142. package/{esm2020 → esm2022}/list/list.component.mjs +7 -7
  143. package/{esm2020 → esm2022}/list/list.module.mjs +20 -20
  144. package/esm2022/loader-overlay/loader-overlay.component.mjs +103 -0
  145. package/{esm2020 → esm2022}/loader-overlay/loader-overlay.module.mjs +17 -17
  146. package/{esm2020 → esm2022}/markdown/markdown.component.mjs +13 -13
  147. package/{esm2020 → esm2022}/markdown/markdown.module.mjs +5 -5
  148. package/{esm2020 → esm2022}/markdown/markdown.service.mjs +4 -4
  149. package/{esm2020 → esm2022}/modal/css-unit.pipe.mjs +4 -4
  150. package/esm2022/modal/modal-control.service.mjs +85 -0
  151. package/esm2022/modal/modal.component.mjs +520 -0
  152. package/{esm2020 → esm2022}/modal/modal.directive.mjs +13 -13
  153. package/esm2022/modal/modal.module.mjs +75 -0
  154. package/{esm2020 → esm2022}/modal/modal.service.mjs +8 -8
  155. package/esm2022/navbar/navbar-item.component.mjs +606 -0
  156. package/esm2022/navbar/navbar.component.mjs +248 -0
  157. package/{esm2020 → esm2022}/navbar/navbar.module.mjs +37 -37
  158. package/{esm2020 → esm2022}/navbar/vertical-navbar.component.mjs +20 -17
  159. package/esm2022/popover/popover-confirm.component.mjs +108 -0
  160. package/esm2022/popover/popover.component.mjs +266 -0
  161. package/{esm2020 → esm2022}/popover/popover.module.mjs +8 -8
  162. package/{esm2020 → esm2022}/progress-bar/progress-bar.component.mjs +4 -4
  163. package/{esm2020 → esm2022}/progress-bar/progress-bar.module.mjs +7 -7
  164. package/{esm2020 → esm2022}/progress-spinner/progress-spinner.component.mjs +12 -12
  165. package/{esm2020 → esm2022}/progress-spinner/progress-spinner.module.mjs +7 -7
  166. package/esm2022/radio/radio.component.mjs +457 -0
  167. package/{esm2020 → esm2022}/radio/radio.module.mjs +5 -5
  168. package/esm2022/select/select-option.directive.mjs +65 -0
  169. package/esm2022/select/select.component.mjs +1160 -0
  170. package/{esm2020 → esm2022}/select/select.module.mjs +32 -32
  171. package/esm2022/sidebar/sidebar.component.mjs +146 -0
  172. package/{esm2020 → esm2022}/sidebar/sidebar.module.mjs +9 -9
  173. package/esm2022/sidepanel/sidepanel-container.component.mjs +110 -0
  174. package/{esm2020 → esm2022}/sidepanel/sidepanel-directives.mjs +18 -18
  175. package/{esm2020 → esm2022}/sidepanel/sidepanel.module.mjs +32 -32
  176. package/{esm2020 → esm2022}/sidepanel/sidepanel.service.mjs +10 -10
  177. package/esm2022/splitter/splitter.component.mjs +482 -0
  178. package/{esm2020 → esm2022}/splitter/splitter.module.mjs +12 -12
  179. package/{esm2020 → esm2022}/table/table.component.mjs +4 -4
  180. package/{esm2020 → esm2022}/table/table.module.mjs +9 -9
  181. package/esm2022/tabs/paginated-tab-header.mjs +488 -0
  182. package/esm2022/tabs/tab-body.component.mjs +179 -0
  183. package/{esm2020 → esm2022}/tabs/tab-content.directive.mjs +4 -4
  184. package/esm2022/tabs/tab-group.component.mjs +349 -0
  185. package/{esm2020 → esm2022}/tabs/tab-header.component.mjs +4 -4
  186. package/{esm2020 → esm2022}/tabs/tab-label-wrapper.directive.mjs +4 -4
  187. package/{esm2020 → esm2022}/tabs/tab-label.directive.mjs +4 -4
  188. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +111 -0
  189. package/{esm2020 → esm2022}/tabs/tab.component.mjs +43 -34
  190. package/{esm2020 → esm2022}/tabs/tabs.module.mjs +42 -42
  191. package/esm2022/tags/tag-input.mjs +250 -0
  192. package/esm2022/tags/tag-list.component.mjs +718 -0
  193. package/esm2022/tags/tag.component.mjs +381 -0
  194. package/esm2022/tags/tag.module.mjs +56 -0
  195. package/esm2022/textarea/textarea.component.mjs +254 -0
  196. package/{esm2020 → esm2022}/textarea/textarea.module.mjs +5 -5
  197. package/esm2022/timepicker/timepicker.directive.mjs +647 -0
  198. package/{esm2020 → esm2022}/timepicker/timepicker.module.mjs +11 -11
  199. package/{esm2020 → esm2022}/timezone/cities-by-filter.pipe.mjs +4 -4
  200. package/esm2022/timezone/timezone-option.component.mjs +48 -0
  201. package/{esm2020 → esm2022}/timezone/timezone-option.directive.mjs +4 -4
  202. package/{esm2020 → esm2022}/timezone/timezone-select.component.mjs +11 -11
  203. package/{esm2020 → esm2022}/timezone/timezone.module.mjs +29 -29
  204. package/{esm2020 → esm2022}/timezone/utc-offset.pipe.mjs +4 -4
  205. package/esm2022/title/title.directive.mjs +107 -0
  206. package/{esm2020 → esm2022}/title/title.module.mjs +5 -5
  207. package/{esm2020 → esm2022}/toast/toast-container.component.mjs +4 -4
  208. package/esm2022/toast/toast.component.mjs +92 -0
  209. package/esm2022/toast/toast.module.mjs +48 -0
  210. package/esm2022/toast/toast.service.mjs +188 -0
  211. package/esm2022/toggle/toggle.component.mjs +156 -0
  212. package/{esm2020 → esm2022}/toggle/toggle.module.mjs +5 -5
  213. package/esm2022/tooltip/tooltip.component.mjs +299 -0
  214. package/{esm2020 → esm2022}/tooltip/tooltip.module.mjs +14 -14
  215. package/esm2022/tree/data-source/flat-data-source.mjs +162 -0
  216. package/{esm2020 → esm2022}/tree/node.mjs +4 -4
  217. package/{esm2020 → esm2022}/tree/outlet.mjs +4 -4
  218. package/esm2022/tree/padding.directive.mjs +113 -0
  219. package/esm2022/tree/toggle.mjs +81 -0
  220. package/esm2022/tree/tree-base.mjs +243 -0
  221. package/esm2022/tree/tree-option.component.mjs +303 -0
  222. package/esm2022/tree/tree-selection.component.mjs +558 -0
  223. package/{esm2020 → esm2022}/tree/tree.mjs +4 -4
  224. package/{esm2020 → esm2022}/tree/tree.module.mjs +21 -21
  225. package/esm2022/tree-select/tree-select.component.mjs +936 -0
  226. package/{esm2020 → esm2022}/tree-select/tree-select.module.mjs +17 -17
  227. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-autocomplete.mjs +80 -77
  228. package/fesm2022/ptsecurity-mosaic-autocomplete.mjs.map +1 -0
  229. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-button-toggle.mjs +47 -47
  230. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-button-toggle.mjs.map +1 -1
  231. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-button.mjs +25 -25
  232. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-button.mjs.map +1 -1
  233. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-card.mjs +17 -17
  234. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-card.mjs.map +1 -1
  235. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-checkbox.mjs +39 -39
  236. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-checkbox.mjs.map +1 -1
  237. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-code-block.mjs +34 -34
  238. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-code-block.mjs.map +1 -1
  239. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-core.mjs +598 -222
  240. package/fesm2022/ptsecurity-mosaic-core.mjs.map +1 -0
  241. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-datepicker.mjs +335 -351
  242. package/fesm2022/ptsecurity-mosaic-datepicker.mjs.map +1 -0
  243. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-divider.mjs +7 -7
  244. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-divider.mjs.map +1 -1
  245. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-dl.mjs +21 -21
  246. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-dl.mjs.map +1 -1
  247. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-dropdown.mjs +89 -89
  248. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-dropdown.mjs.map +1 -1
  249. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-ellipsis-center.mjs +11 -11
  250. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-ellipsis-center.mjs.map +1 -1
  251. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-file-upload.mjs +55 -47
  252. package/fesm2022/ptsecurity-mosaic-file-upload.mjs.map +1 -0
  253. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-form-field.mjs +80 -80
  254. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-form-field.mjs.map +1 -1
  255. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-icon.mjs +16 -16
  256. package/fesm2022/ptsecurity-mosaic-icon.mjs.map +1 -0
  257. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-input.mjs +128 -128
  258. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-input.mjs.map +1 -1
  259. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-link.mjs +22 -22
  260. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-link.mjs.map +1 -1
  261. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-list.mjs +86 -86
  262. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-list.mjs.map +1 -1
  263. package/fesm2022/ptsecurity-mosaic-loader-overlay.mjs +155 -0
  264. package/{fesm2015 → fesm2022}/ptsecurity-mosaic-loader-overlay.mjs.map +1 -1
  265. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-markdown.mjs +19 -19
  266. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-markdown.mjs.map +1 -1
  267. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-modal.mjs +157 -144
  268. package/fesm2022/ptsecurity-mosaic-modal.mjs.map +1 -0
  269. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-navbar.mjs +184 -176
  270. package/fesm2022/ptsecurity-mosaic-navbar.mjs.map +1 -0
  271. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-popover.mjs +37 -37
  272. package/{fesm2015 → fesm2022}/ptsecurity-mosaic-popover.mjs.map +1 -1
  273. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-progress-bar.mjs +9 -9
  274. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-progress-bar.mjs.map +1 -1
  275. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-progress-spinner.mjs +18 -18
  276. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-progress-spinner.mjs.map +1 -1
  277. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-radio.mjs +78 -78
  278. package/{fesm2015 → fesm2022}/ptsecurity-mosaic-radio.mjs.map +1 -1
  279. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-select.mjs +188 -174
  280. package/fesm2022/ptsecurity-mosaic-select.mjs.map +1 -0
  281. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-sidebar.mjs +29 -29
  282. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-sidebar.mjs.map +1 -1
  283. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-sidepanel.mjs +63 -63
  284. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-sidepanel.mjs.map +1 -1
  285. package/{fesm2015 → fesm2022}/ptsecurity-mosaic-splitter.mjs +55 -55
  286. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-splitter.mjs.map +1 -1
  287. package/fesm2022/ptsecurity-mosaic-table.mjs +45 -0
  288. package/fesm2022/ptsecurity-mosaic-table.mjs.map +1 -0
  289. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-tabs.mjs +188 -179
  290. package/fesm2022/ptsecurity-mosaic-tabs.mjs.map +1 -0
  291. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-tags.mjs +131 -131
  292. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-tags.mjs.map +1 -1
  293. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-textarea.mjs +41 -41
  294. package/{fesm2015 → fesm2022}/ptsecurity-mosaic-textarea.mjs.map +1 -1
  295. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-timepicker.mjs +95 -95
  296. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-timepicker.mjs.map +1 -1
  297. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-timezone.mjs +53 -53
  298. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-timezone.mjs.map +1 -1
  299. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-title.mjs +18 -18
  300. package/fesm2022/ptsecurity-mosaic-title.mjs.map +1 -0
  301. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-toast.mjs +47 -41
  302. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-toast.mjs.map +1 -1
  303. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-toggle.mjs +35 -35
  304. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-toggle.mjs.map +1 -1
  305. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-tooltip.mjs +47 -47
  306. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-tooltip.mjs.map +1 -1
  307. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-tree-select.mjs +122 -122
  308. package/fesm2022/ptsecurity-mosaic-tree-select.mjs.map +1 -0
  309. package/{fesm2020 → fesm2022}/ptsecurity-mosaic-tree.mjs +202 -198
  310. package/fesm2022/ptsecurity-mosaic-tree.mjs.map +1 -0
  311. package/file-upload/file-upload.d.ts +1 -1
  312. package/file-upload/multiple-file-upload.component.d.ts +5 -4
  313. package/file-upload/single-file-upload.component.d.ts +5 -4
  314. package/form-field/_form-field-theme.scss +4 -0
  315. package/form-field/form-field.d.ts +1 -1
  316. package/form-field/hint.d.ts +1 -1
  317. package/form-field/password-hint.d.ts +1 -1
  318. package/icon/icon.component.d.ts +1 -1
  319. package/input/input-number-validators.d.ts +2 -2
  320. package/input/input-number.d.ts +1 -1
  321. package/input/input-password.d.ts +2 -2
  322. package/input/input.d.ts +1 -1
  323. package/link/link.component.d.ts +1 -1
  324. package/list/list-selection.component.d.ts +2 -2
  325. package/loader-overlay/loader-overlay.component.d.ts +1 -1
  326. package/loader-overlay/loader-overlay.scss +3 -0
  327. package/markdown/markdown.component.d.ts +1 -1
  328. package/modal/modal.component.d.ts +5 -2
  329. package/modal/modal.module.d.ts +2 -1
  330. package/modal/modal.scss +14 -2
  331. package/modal/modal.type.d.ts +3 -3
  332. package/navbar/navbar-item.component.d.ts +3 -3
  333. package/navbar/navbar.component.d.ts +7 -4
  334. package/navbar/vertical-navbar.component.d.ts +5 -3
  335. package/package.json +149 -239
  336. package/popover/popover-confirm.component.d.ts +1 -1
  337. package/popover/popover.component.d.ts +1 -1
  338. package/prebuilt-themes/dark-theme.css +1 -1
  339. package/prebuilt-themes/default-theme.css +1 -1
  340. package/prebuilt-visual/default-visual.css +1 -1
  341. package/progress-bar/progress-bar.component.d.ts +2 -2
  342. package/progress-spinner/progress-spinner.component.d.ts +3 -3
  343. package/radio/_radio-theme.scss +4 -0
  344. package/radio/radio.component.d.ts +2 -2
  345. package/select/select.component.d.ts +12 -9
  346. package/select/select.scss +1 -1
  347. package/sidebar/sidebar.component.d.ts +3 -3
  348. package/sidepanel/sidepanel-directives.d.ts +2 -2
  349. package/splitter/splitter.component.d.ts +3 -3
  350. package/tabs/paginated-tab-header.d.ts +3 -3
  351. package/tabs/tab-body.component.d.ts +3 -3
  352. package/tabs/tab-group.component.d.ts +2 -2
  353. package/tabs/tab-header.component.d.ts +2 -2
  354. package/tabs/tab-label-wrapper.directive.d.ts +1 -1
  355. package/tabs/tab-nav-bar/tab-nav-bar.d.ts +1 -1
  356. package/tabs/tab.component.d.ts +1 -1
  357. package/tags/tag-input.d.ts +1 -1
  358. package/tags/tag-list.component.d.ts +1 -1
  359. package/tags/tag.component.d.ts +1 -1
  360. package/textarea/textarea.component.d.ts +1 -1
  361. package/timepicker/timepicker.directive.d.ts +1 -1
  362. package/timezone/timezone-option.component.d.ts +1 -1
  363. package/toast/toast.type.d.ts +1 -1
  364. package/toggle/toggle.component.d.ts +2 -2
  365. package/tooltip/tooltip.component.d.ts +3 -3
  366. package/tree/node.d.ts +1 -1
  367. package/tree/padding.directive.d.ts +1 -1
  368. package/tree/toggle.d.ts +2 -2
  369. package/tree/tree-base.d.ts +1 -1
  370. package/tree/tree-option.component.d.ts +1 -1
  371. package/tree/tree-option.scss +4 -2
  372. package/tree/tree-selection.component.d.ts +1 -1
  373. package/tree-select/tree-select.component.d.ts +1 -1
  374. package/esm2020/autocomplete/autocomplete-trigger.directive.mjs +0 -552
  375. package/esm2020/button/button.component.mjs +0 -148
  376. package/esm2020/button-toggle/button-toggle.component.mjs +0 -381
  377. package/esm2020/card/card.component.mjs +0 -80
  378. package/esm2020/checkbox/checkbox.mjs +0 -300
  379. package/esm2020/code-block/code-block.component.mjs +0 -157
  380. package/esm2020/code-block/code-block.module.mjs +0 -60
  381. package/esm2020/core/common-behaviors/color.mjs +0 -33
  382. package/esm2020/core/formatters/index.mjs +0 -78
  383. package/esm2020/core/formatters/number/formatter.mjs +0 -129
  384. package/esm2020/core/locales/en-US.mjs +0 -10
  385. package/esm2020/core/locales/es-LA.mjs +0 -6
  386. package/esm2020/core/locales/fa-IR.mjs +0 -6
  387. package/esm2020/core/locales/pt-BR.mjs +0 -6
  388. package/esm2020/core/locales/ru-RU.mjs +0 -10
  389. package/esm2020/core/locales/zh-CN.mjs +0 -6
  390. package/esm2020/core/option/option.mjs +0 -262
  391. package/esm2020/core/overlay/overlay-position-map.mjs +0 -245
  392. package/esm2020/core/services/measure-scrollbar.service.mjs +0 -48
  393. package/esm2020/datepicker/calendar-header.component.mjs +0 -134
  394. package/esm2020/datepicker/calendar.component.mjs +0 -175
  395. package/esm2020/datepicker/datepicker-input.directive.mjs +0 -954
  396. package/esm2020/datepicker/datepicker-toggle.component.mjs +0 -86
  397. package/esm2020/datepicker/datepicker.component.mjs +0 -393
  398. package/esm2020/datepicker/month-view.component.mjs +0 -158
  399. package/esm2020/dropdown/dropdown-trigger.directive.mjs +0 -489
  400. package/esm2020/dropdown/dropdown.component.mjs +0 -292
  401. package/esm2020/ellipsis-center/ellipsis-center.directive.mjs +0 -106
  402. package/esm2020/file-upload/multiple-file-upload.component.mjs +0 -161
  403. package/esm2020/file-upload/single-file-upload.component.mjs +0 -130
  404. package/esm2020/form-field/form-field.mjs +0 -267
  405. package/esm2020/form-field/validate.directive.mjs +0 -158
  406. package/esm2020/input/input-number.mjs +0 -168
  407. package/esm2020/input/input-password.mjs +0 -343
  408. package/esm2020/input/input.mjs +0 -297
  409. package/esm2020/link/link.component.mjs +0 -122
  410. package/esm2020/list/list-selection.component.mjs +0 -705
  411. package/esm2020/loader-overlay/loader-overlay.component.mjs +0 -103
  412. package/esm2020/modal/modal-control.service.mjs +0 -85
  413. package/esm2020/modal/modal.component.mjs +0 -510
  414. package/esm2020/modal/modal.module.mjs +0 -71
  415. package/esm2020/navbar/navbar-item.component.mjs +0 -606
  416. package/esm2020/navbar/navbar.component.mjs +0 -239
  417. package/esm2020/popover/popover-confirm.component.mjs +0 -108
  418. package/esm2020/popover/popover.component.mjs +0 -266
  419. package/esm2020/radio/radio.component.mjs +0 -457
  420. package/esm2020/select/select-option.directive.mjs +0 -65
  421. package/esm2020/select/select.component.mjs +0 -1146
  422. package/esm2020/sidebar/sidebar.component.mjs +0 -146
  423. package/esm2020/sidepanel/sidepanel-container.component.mjs +0 -110
  424. package/esm2020/splitter/splitter.component.mjs +0 -482
  425. package/esm2020/tabs/paginated-tab-header.mjs +0 -488
  426. package/esm2020/tabs/tab-body.component.mjs +0 -179
  427. package/esm2020/tabs/tab-group.component.mjs +0 -349
  428. package/esm2020/tabs/tab-nav-bar/tab-nav-bar.mjs +0 -111
  429. package/esm2020/tags/tag-input.mjs +0 -250
  430. package/esm2020/tags/tag-list.component.mjs +0 -718
  431. package/esm2020/tags/tag.component.mjs +0 -381
  432. package/esm2020/tags/tag.module.mjs +0 -56
  433. package/esm2020/textarea/textarea.component.mjs +0 -254
  434. package/esm2020/timepicker/timepicker.directive.mjs +0 -647
  435. package/esm2020/timezone/timezone-option.component.mjs +0 -48
  436. package/esm2020/title/title.directive.mjs +0 -107
  437. package/esm2020/toast/toast.component.mjs +0 -92
  438. package/esm2020/toast/toast.module.mjs +0 -42
  439. package/esm2020/toast/toast.service.mjs +0 -188
  440. package/esm2020/toggle/toggle.component.mjs +0 -156
  441. package/esm2020/tooltip/tooltip.component.mjs +0 -299
  442. package/esm2020/tree/data-source/flat-data-source.mjs +0 -162
  443. package/esm2020/tree/padding.directive.mjs +0 -113
  444. package/esm2020/tree/toggle.mjs +0 -81
  445. package/esm2020/tree/tree-base.mjs +0 -243
  446. package/esm2020/tree/tree-option.component.mjs +0 -300
  447. package/esm2020/tree/tree-selection.component.mjs +0 -557
  448. package/esm2020/tree-select/tree-select.component.mjs +0 -936
  449. package/fesm2015/ptsecurity-mosaic-autocomplete.mjs +0 -753
  450. package/fesm2015/ptsecurity-mosaic-autocomplete.mjs.map +0 -1
  451. package/fesm2015/ptsecurity-mosaic-button-toggle.mjs +0 -405
  452. package/fesm2015/ptsecurity-mosaic-button-toggle.mjs.map +0 -1
  453. package/fesm2015/ptsecurity-mosaic-button.mjs +0 -193
  454. package/fesm2015/ptsecurity-mosaic-button.mjs.map +0 -1
  455. package/fesm2015/ptsecurity-mosaic-card.mjs +0 -111
  456. package/fesm2015/ptsecurity-mosaic-card.mjs.map +0 -1
  457. package/fesm2015/ptsecurity-mosaic-checkbox.mjs +0 -351
  458. package/fesm2015/ptsecurity-mosaic-checkbox.mjs.map +0 -1
  459. package/fesm2015/ptsecurity-mosaic-code-block.mjs +0 -280
  460. package/fesm2015/ptsecurity-mosaic-code-block.mjs.map +0 -1
  461. package/fesm2015/ptsecurity-mosaic-core.mjs +0 -2314
  462. package/fesm2015/ptsecurity-mosaic-core.mjs.map +0 -1
  463. package/fesm2015/ptsecurity-mosaic-datepicker.mjs +0 -2112
  464. package/fesm2015/ptsecurity-mosaic-datepicker.mjs.map +0 -1
  465. package/fesm2015/ptsecurity-mosaic-divider.mjs +0 -61
  466. package/fesm2015/ptsecurity-mosaic-divider.mjs.map +0 -1
  467. package/fesm2015/ptsecurity-mosaic-dl.mjs +0 -126
  468. package/fesm2015/ptsecurity-mosaic-dl.mjs.map +0 -1
  469. package/fesm2015/ptsecurity-mosaic-dropdown.mjs +0 -1115
  470. package/fesm2015/ptsecurity-mosaic-dropdown.mjs.map +0 -1
  471. package/fesm2015/ptsecurity-mosaic-ellipsis-center.mjs +0 -113
  472. package/fesm2015/ptsecurity-mosaic-ellipsis-center.mjs.map +0 -1
  473. package/fesm2015/ptsecurity-mosaic-file-upload.mjs +0 -392
  474. package/fesm2015/ptsecurity-mosaic-file-upload.mjs.map +0 -1
  475. package/fesm2015/ptsecurity-mosaic-form-field.mjs +0 -772
  476. package/fesm2015/ptsecurity-mosaic-form-field.mjs.map +0 -1
  477. package/fesm2015/ptsecurity-mosaic-icon.mjs +0 -86
  478. package/fesm2015/ptsecurity-mosaic-icon.mjs.map +0 -1
  479. package/fesm2015/ptsecurity-mosaic-input.mjs +0 -951
  480. package/fesm2015/ptsecurity-mosaic-input.mjs.map +0 -1
  481. package/fesm2015/ptsecurity-mosaic-link.mjs +0 -150
  482. package/fesm2015/ptsecurity-mosaic-link.mjs.map +0 -1
  483. package/fesm2015/ptsecurity-mosaic-list.mjs +0 -807
  484. package/fesm2015/ptsecurity-mosaic-list.mjs.map +0 -1
  485. package/fesm2015/ptsecurity-mosaic-loader-overlay.mjs +0 -157
  486. package/fesm2015/ptsecurity-mosaic-markdown.mjs +0 -128
  487. package/fesm2015/ptsecurity-mosaic-markdown.mjs.map +0 -1
  488. package/fesm2015/ptsecurity-mosaic-modal.mjs +0 -875
  489. package/fesm2015/ptsecurity-mosaic-modal.mjs.map +0 -1
  490. package/fesm2015/ptsecurity-mosaic-navbar.mjs +0 -1055
  491. package/fesm2015/ptsecurity-mosaic-navbar.mjs.map +0 -1
  492. package/fesm2015/ptsecurity-mosaic-popover.mjs +0 -411
  493. package/fesm2015/ptsecurity-mosaic-progress-bar.mjs +0 -74
  494. package/fesm2015/ptsecurity-mosaic-progress-bar.mjs.map +0 -1
  495. package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs +0 -93
  496. package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs.map +0 -1
  497. package/fesm2015/ptsecurity-mosaic-radio.mjs +0 -481
  498. package/fesm2015/ptsecurity-mosaic-select.mjs +0 -1286
  499. package/fesm2015/ptsecurity-mosaic-select.mjs.map +0 -1
  500. package/fesm2015/ptsecurity-mosaic-sidebar.mjs +0 -202
  501. package/fesm2015/ptsecurity-mosaic-sidebar.mjs.map +0 -1
  502. package/fesm2015/ptsecurity-mosaic-sidepanel.mjs +0 -622
  503. package/fesm2015/ptsecurity-mosaic-sidepanel.mjs.map +0 -1
  504. package/fesm2015/ptsecurity-mosaic-splitter.mjs.map +0 -1
  505. package/fesm2015/ptsecurity-mosaic-table.mjs +0 -45
  506. package/fesm2015/ptsecurity-mosaic-table.mjs.map +0 -1
  507. package/fesm2015/ptsecurity-mosaic-tabs.mjs +0 -1523
  508. package/fesm2015/ptsecurity-mosaic-tabs.mjs.map +0 -1
  509. package/fesm2015/ptsecurity-mosaic-tags.mjs +0 -1397
  510. package/fesm2015/ptsecurity-mosaic-tags.mjs.map +0 -1
  511. package/fesm2015/ptsecurity-mosaic-textarea.mjs +0 -280
  512. package/fesm2015/ptsecurity-mosaic-timepicker.mjs +0 -708
  513. package/fesm2015/ptsecurity-mosaic-timepicker.mjs.map +0 -1
  514. package/fesm2015/ptsecurity-mosaic-timezone.mjs +0 -316
  515. package/fesm2015/ptsecurity-mosaic-timezone.mjs.map +0 -1
  516. package/fesm2015/ptsecurity-mosaic-title.mjs +0 -128
  517. package/fesm2015/ptsecurity-mosaic-title.mjs.map +0 -1
  518. package/fesm2015/ptsecurity-mosaic-toast.mjs +0 -379
  519. package/fesm2015/ptsecurity-mosaic-toast.mjs.map +0 -1
  520. package/fesm2015/ptsecurity-mosaic-toggle.mjs +0 -178
  521. package/fesm2015/ptsecurity-mosaic-toggle.mjs.map +0 -1
  522. package/fesm2015/ptsecurity-mosaic-tooltip.mjs +0 -369
  523. package/fesm2015/ptsecurity-mosaic-tooltip.mjs.map +0 -1
  524. package/fesm2015/ptsecurity-mosaic-tree-select.mjs +0 -983
  525. package/fesm2015/ptsecurity-mosaic-tree-select.mjs.map +0 -1
  526. package/fesm2015/ptsecurity-mosaic-tree.mjs +0 -1816
  527. package/fesm2015/ptsecurity-mosaic-tree.mjs.map +0 -1
  528. package/fesm2020/ptsecurity-mosaic-autocomplete.mjs.map +0 -1
  529. package/fesm2020/ptsecurity-mosaic-core.mjs.map +0 -1
  530. package/fesm2020/ptsecurity-mosaic-datepicker.mjs.map +0 -1
  531. package/fesm2020/ptsecurity-mosaic-file-upload.mjs.map +0 -1
  532. package/fesm2020/ptsecurity-mosaic-icon.mjs.map +0 -1
  533. package/fesm2020/ptsecurity-mosaic-loader-overlay.mjs +0 -155
  534. package/fesm2020/ptsecurity-mosaic-loader-overlay.mjs.map +0 -1
  535. package/fesm2020/ptsecurity-mosaic-modal.mjs.map +0 -1
  536. package/fesm2020/ptsecurity-mosaic-navbar.mjs.map +0 -1
  537. package/fesm2020/ptsecurity-mosaic-popover.mjs.map +0 -1
  538. package/fesm2020/ptsecurity-mosaic-radio.mjs.map +0 -1
  539. package/fesm2020/ptsecurity-mosaic-select.mjs.map +0 -1
  540. package/fesm2020/ptsecurity-mosaic-splitter.mjs +0 -524
  541. package/fesm2020/ptsecurity-mosaic-table.mjs +0 -45
  542. package/fesm2020/ptsecurity-mosaic-table.mjs.map +0 -1
  543. package/fesm2020/ptsecurity-mosaic-tabs.mjs.map +0 -1
  544. package/fesm2020/ptsecurity-mosaic-textarea.mjs.map +0 -1
  545. package/fesm2020/ptsecurity-mosaic-title.mjs.map +0 -1
  546. package/fesm2020/ptsecurity-mosaic-tree-select.mjs.map +0 -1
  547. package/fesm2020/ptsecurity-mosaic-tree.mjs.map +0 -1
  548. package/fesm2020/ptsecurity-mosaic.mjs +0 -4
  549. package/fesm2020/ptsecurity-mosaic.mjs.map +0 -1
  550. /package/{esm2020 → esm2022}/autocomplete/index.mjs +0 -0
  551. /package/{esm2020 → esm2022}/autocomplete/ptsecurity-mosaic-autocomplete.mjs +0 -0
  552. /package/{esm2020 → esm2022}/autocomplete/public-api.mjs +0 -0
  553. /package/{esm2020 → esm2022}/button/index.mjs +0 -0
  554. /package/{esm2020 → esm2022}/button/ptsecurity-mosaic-button.mjs +0 -0
  555. /package/{esm2020 → esm2022}/button/public-api.mjs +0 -0
  556. /package/{esm2020 → esm2022}/button-toggle/index.mjs +0 -0
  557. /package/{esm2020 → esm2022}/button-toggle/ptsecurity-mosaic-button-toggle.mjs +0 -0
  558. /package/{esm2020 → esm2022}/button-toggle/public-api.mjs +0 -0
  559. /package/{esm2020 → esm2022}/card/index.mjs +0 -0
  560. /package/{esm2020 → esm2022}/card/ptsecurity-mosaic-card.mjs +0 -0
  561. /package/{esm2020 → esm2022}/card/public-api.mjs +0 -0
  562. /package/{esm2020 → esm2022}/checkbox/checkbox-config.mjs +0 -0
  563. /package/{esm2020 → esm2022}/checkbox/index.mjs +0 -0
  564. /package/{esm2020 → esm2022}/checkbox/ptsecurity-mosaic-checkbox.mjs +0 -0
  565. /package/{esm2020 → esm2022}/checkbox/public-api.mjs +0 -0
  566. /package/{esm2020 → esm2022}/code-block/code-block.types.mjs +0 -0
  567. /package/{esm2020 → esm2022}/code-block/index.mjs +0 -0
  568. /package/{esm2020 → esm2022}/code-block/ptsecurity-mosaic-code-block.mjs +0 -0
  569. /package/{esm2020 → esm2022}/code-block/public-api.mjs +0 -0
  570. /package/{esm2020 → esm2022}/core/animation/animation.mjs +0 -0
  571. /package/{esm2020 → esm2022}/core/animation/fade-animations.mjs +0 -0
  572. /package/{esm2020 → esm2022}/core/animation/index.mjs +0 -0
  573. /package/{esm2020 → esm2022}/core/animation/select-animations.mjs +0 -0
  574. /package/{esm2020 → esm2022}/core/common-behaviors/constructor.mjs +0 -0
  575. /package/{esm2020 → esm2022}/core/common-behaviors/error-state.mjs +0 -0
  576. /package/{esm2020 → esm2022}/core/common-behaviors/index.mjs +0 -0
  577. /package/{esm2020 → esm2022}/core/datetime/date-adapter.mjs +0 -0
  578. /package/{esm2020 → esm2022}/core/datetime/date-formats.mjs +0 -0
  579. /package/{esm2020 → esm2022}/core/datetime/index.mjs +0 -0
  580. /package/{esm2020 → esm2022}/core/forms/index.mjs +0 -0
  581. /package/{esm2020 → esm2022}/core/index.mjs +0 -0
  582. /package/{esm2020 → esm2022}/core/label/label-options.mjs +0 -0
  583. /package/{esm2020 → esm2022}/core/locales/index.mjs +0 -0
  584. /package/{esm2020 → esm2022}/core/option/index.mjs +0 -0
  585. /package/{esm2020 → esm2022}/core/pop-up/constants.mjs +0 -0
  586. /package/{esm2020 → esm2022}/core/pop-up/index.mjs +0 -0
  587. /package/{esm2020 → esm2022}/core/ptsecurity-mosaic-core.mjs +0 -0
  588. /package/{esm2020 → esm2022}/core/public-api.mjs +0 -0
  589. /package/{esm2020 → esm2022}/core/select/constants.mjs +0 -0
  590. /package/{esm2020 → esm2022}/core/select/errors.mjs +0 -0
  591. /package/{esm2020 → esm2022}/core/select/events.mjs +0 -0
  592. /package/{esm2020 → esm2022}/core/select/index.mjs +0 -0
  593. /package/{esm2020 → esm2022}/core/selection/constants.mjs +0 -0
  594. /package/{esm2020 → esm2022}/core/selection/index.mjs +0 -0
  595. /package/{esm2020 → esm2022}/core/title/index.mjs +0 -0
  596. /package/{esm2020 → esm2022}/core/title/title-text-ref.mjs +0 -0
  597. /package/{esm2020 → esm2022}/core/utils/data-size/config.mjs +0 -0
  598. /package/{esm2020 → esm2022}/core/utils/data-size/index.mjs +0 -0
  599. /package/{esm2020 → esm2022}/core/utils/data-size/size.mjs +0 -0
  600. /package/{esm2020 → esm2022}/core/utils/index.mjs +0 -0
  601. /package/{esm2020 → esm2022}/core/utils/public-api.mjs +0 -0
  602. /package/{esm2020 → esm2022}/core/utils/utils.mjs +0 -0
  603. /package/{esm2020 → esm2022}/core/validation/index.mjs +0 -0
  604. /package/{esm2020 → esm2022}/core/validation/validation.mjs +0 -0
  605. /package/{esm2020 → esm2022}/datepicker/datepicker-animations.mjs +0 -0
  606. /package/{esm2020 → esm2022}/datepicker/datepicker-errors.mjs +0 -0
  607. /package/{esm2020 → esm2022}/datepicker/index.mjs +0 -0
  608. /package/{esm2020 → esm2022}/datepicker/ptsecurity-mosaic-datepicker.mjs +0 -0
  609. /package/{esm2020 → esm2022}/datepicker/public-api.mjs +0 -0
  610. /package/{esm2020 → esm2022}/divider/index.mjs +0 -0
  611. /package/{esm2020 → esm2022}/divider/ptsecurity-mosaic-divider.mjs +0 -0
  612. /package/{esm2020 → esm2022}/divider/public-api.mjs +0 -0
  613. /package/{esm2020 → esm2022}/dl/index.mjs +0 -0
  614. /package/{esm2020 → esm2022}/dl/ptsecurity-mosaic-dl.mjs +0 -0
  615. /package/{esm2020 → esm2022}/dl/public-api.mjs +0 -0
  616. /package/{esm2020 → esm2022}/dropdown/dropdown-animations.mjs +0 -0
  617. /package/{esm2020 → esm2022}/dropdown/dropdown-errors.mjs +0 -0
  618. /package/{esm2020 → esm2022}/dropdown/dropdown.types.mjs +0 -0
  619. /package/{esm2020 → esm2022}/dropdown/index.mjs +0 -0
  620. /package/{esm2020 → esm2022}/dropdown/ptsecurity-mosaic-dropdown.mjs +0 -0
  621. /package/{esm2020 → esm2022}/dropdown/public-api.mjs +0 -0
  622. /package/{esm2020 → esm2022}/ellipsis-center/index.mjs +0 -0
  623. /package/{esm2020 → esm2022}/ellipsis-center/ptsecurity-mosaic-ellipsis-center.mjs +0 -0
  624. /package/{esm2020 → esm2022}/ellipsis-center/public-api.mjs +0 -0
  625. /package/{esm2020 → esm2022}/file-upload/file-upload.mjs +0 -0
  626. /package/{esm2020 → esm2022}/file-upload/index.mjs +0 -0
  627. /package/{esm2020 → esm2022}/file-upload/ptsecurity-mosaic-file-upload.mjs +0 -0
  628. /package/{esm2020 → esm2022}/file-upload/public-api.mjs +0 -0
  629. /package/{esm2020 → esm2022}/form-field/form-field-control.mjs +0 -0
  630. /package/{esm2020 → esm2022}/form-field/form-field-errors.mjs +0 -0
  631. /package/{esm2020 → esm2022}/form-field/index.mjs +0 -0
  632. /package/{esm2020 → esm2022}/form-field/ptsecurity-mosaic-form-field.mjs +0 -0
  633. /package/{esm2020 → esm2022}/form-field/public-api.mjs +0 -0
  634. /package/{esm2020 → esm2022}/icon/index.mjs +0 -0
  635. /package/{esm2020 → esm2022}/icon/ptsecurity-mosaic-icon.mjs +0 -0
  636. /package/{esm2020 → esm2022}/icon/public-api.mjs +0 -0
  637. /package/{esm2020 → esm2022}/index.mjs +0 -0
  638. /package/{esm2020 → esm2022}/input/index.mjs +0 -0
  639. /package/{esm2020 → esm2022}/input/input-errors.mjs +0 -0
  640. /package/{esm2020 → esm2022}/input/input-value-accessor.mjs +0 -0
  641. /package/{esm2020 → esm2022}/input/ptsecurity-mosaic-input.mjs +0 -0
  642. /package/{esm2020 → esm2022}/input/public-api.mjs +0 -0
  643. /package/{esm2020 → esm2022}/link/index.mjs +0 -0
  644. /package/{esm2020 → esm2022}/link/ptsecurity-mosaic-link.mjs +0 -0
  645. /package/{esm2020 → esm2022}/link/public-api.mjs +0 -0
  646. /package/{esm2020 → esm2022}/list/index.mjs +0 -0
  647. /package/{esm2020 → esm2022}/list/ptsecurity-mosaic-list.mjs +0 -0
  648. /package/{esm2020 → esm2022}/list/public-api.mjs +0 -0
  649. /package/{esm2020 → esm2022}/loader-overlay/index.mjs +0 -0
  650. /package/{esm2020 → esm2022}/loader-overlay/ptsecurity-mosaic-loader-overlay.mjs +0 -0
  651. /package/{esm2020 → esm2022}/loader-overlay/public-api.mjs +0 -0
  652. /package/{esm2020 → esm2022}/markdown/index.mjs +0 -0
  653. /package/{esm2020 → esm2022}/markdown/markdown.values.mjs +0 -0
  654. /package/{esm2020 → esm2022}/markdown/ptsecurity-mosaic-markdown.mjs +0 -0
  655. /package/{esm2020 → esm2022}/markdown/public-api.mjs +0 -0
  656. /package/{esm2020 → esm2022}/modal/index.mjs +0 -0
  657. /package/{esm2020 → esm2022}/modal/modal-ref.class.mjs +0 -0
  658. /package/{esm2020 → esm2022}/modal/modal-util.mjs +0 -0
  659. /package/{esm2020 → esm2022}/modal/modal.type.mjs +0 -0
  660. /package/{esm2020 → esm2022}/modal/ptsecurity-mosaic-modal.mjs +0 -0
  661. /package/{esm2020 → esm2022}/modal/public-api.mjs +0 -0
  662. /package/{esm2020 → esm2022}/navbar/index.mjs +0 -0
  663. /package/{esm2020 → esm2022}/navbar/ptsecurity-mosaic-navbar.mjs +0 -0
  664. /package/{esm2020 → esm2022}/navbar/public-api.mjs +0 -0
  665. /package/{esm2020 → esm2022}/navbar/vertical-navbar.animation.mjs +0 -0
  666. /package/{esm2020 → esm2022}/popover/index.mjs +0 -0
  667. /package/{esm2020 → esm2022}/popover/popover-animations.mjs +0 -0
  668. /package/{esm2020 → esm2022}/popover/ptsecurity-mosaic-popover.mjs +0 -0
  669. /package/{esm2020 → esm2022}/popover/public-api.mjs +0 -0
  670. /package/{esm2020 → esm2022}/progress-bar/index.mjs +0 -0
  671. /package/{esm2020 → esm2022}/progress-bar/ptsecurity-mosaic-progress-bar.mjs +0 -0
  672. /package/{esm2020 → esm2022}/progress-bar/public-api.mjs +0 -0
  673. /package/{esm2020 → esm2022}/progress-spinner/index.mjs +0 -0
  674. /package/{esm2020 → esm2022}/progress-spinner/ptsecurity-mosaic-progress-spinner.mjs +0 -0
  675. /package/{esm2020 → esm2022}/progress-spinner/public-api.mjs +0 -0
  676. /package/{esm2020 → esm2022}/ptsecurity-mosaic.mjs +0 -0
  677. /package/{esm2020 → esm2022}/public-api.mjs +0 -0
  678. /package/{esm2020 → esm2022}/radio/index.mjs +0 -0
  679. /package/{esm2020 → esm2022}/radio/ptsecurity-mosaic-radio.mjs +0 -0
  680. /package/{esm2020 → esm2022}/radio/public-api.mjs +0 -0
  681. /package/{esm2020 → esm2022}/select/index.mjs +0 -0
  682. /package/{esm2020 → esm2022}/select/ptsecurity-mosaic-select.mjs +0 -0
  683. /package/{esm2020 → esm2022}/select/public-api.mjs +0 -0
  684. /package/{esm2020 → esm2022}/sidebar/index.mjs +0 -0
  685. /package/{esm2020 → esm2022}/sidebar/ptsecurity-mosaic-sidebar.mjs +0 -0
  686. /package/{esm2020 → esm2022}/sidebar/public-api.mjs +0 -0
  687. /package/{esm2020 → esm2022}/sidebar/sidebar-animations.mjs +0 -0
  688. /package/{esm2020 → esm2022}/sidepanel/index.mjs +0 -0
  689. /package/{esm2020 → esm2022}/sidepanel/ptsecurity-mosaic-sidepanel.mjs +0 -0
  690. /package/{esm2020 → esm2022}/sidepanel/public-api.mjs +0 -0
  691. /package/{esm2020 → esm2022}/sidepanel/sidepanel-animations.mjs +0 -0
  692. /package/{esm2020 → esm2022}/sidepanel/sidepanel-config.mjs +0 -0
  693. /package/{esm2020 → esm2022}/sidepanel/sidepanel-ref.mjs +0 -0
  694. /package/{esm2020 → esm2022}/splitter/index.mjs +0 -0
  695. /package/{esm2020 → esm2022}/splitter/ptsecurity-mosaic-splitter.mjs +0 -0
  696. /package/{esm2020 → esm2022}/splitter/public-api.mjs +0 -0
  697. /package/{esm2020 → esm2022}/table/index.mjs +0 -0
  698. /package/{esm2020 → esm2022}/table/ptsecurity-mosaic-table.mjs +0 -0
  699. /package/{esm2020 → esm2022}/table/public-api.mjs +0 -0
  700. /package/{esm2020 → esm2022}/tabs/index.mjs +0 -0
  701. /package/{esm2020 → esm2022}/tabs/ptsecurity-mosaic-tabs.mjs +0 -0
  702. /package/{esm2020 → esm2022}/tabs/public-api.mjs +0 -0
  703. /package/{esm2020 → esm2022}/tabs/tab-nav-bar/index.mjs +0 -0
  704. /package/{esm2020 → esm2022}/tabs/tabs-animations.mjs +0 -0
  705. /package/{esm2020 → esm2022}/tags/index.mjs +0 -0
  706. /package/{esm2020 → esm2022}/tags/ptsecurity-mosaic-tags.mjs +0 -0
  707. /package/{esm2020 → esm2022}/tags/public-api.mjs +0 -0
  708. /package/{esm2020 → esm2022}/tags/tag-default-options.mjs +0 -0
  709. /package/{esm2020 → esm2022}/tags/tag-text-control.mjs +0 -0
  710. /package/{esm2020 → esm2022}/textarea/index.mjs +0 -0
  711. /package/{esm2020 → esm2022}/textarea/ptsecurity-mosaic-textarea.mjs +0 -0
  712. /package/{esm2020 → esm2022}/textarea/public-api.mjs +0 -0
  713. /package/{esm2020 → esm2022}/timepicker/index.mjs +0 -0
  714. /package/{esm2020 → esm2022}/timepicker/ptsecurity-mosaic-timepicker.mjs +0 -0
  715. /package/{esm2020 → esm2022}/timepicker/public-api.mjs +0 -0
  716. /package/{esm2020 → esm2022}/timepicker/timepicker.constants.mjs +0 -0
  717. /package/{esm2020 → esm2022}/timezone/index.mjs +0 -0
  718. /package/{esm2020 → esm2022}/timezone/ptsecurity-mosaic-timezone.mjs +0 -0
  719. /package/{esm2020 → esm2022}/timezone/public-api.mjs +0 -0
  720. /package/{esm2020 → esm2022}/timezone/timezone.models.mjs +0 -0
  721. /package/{esm2020 → esm2022}/timezone/timezone.utils.mjs +0 -0
  722. /package/{esm2020 → esm2022}/title/index.mjs +0 -0
  723. /package/{esm2020 → esm2022}/title/ptsecurity-mosaic-title.mjs +0 -0
  724. /package/{esm2020 → esm2022}/title/public-api.mjs +0 -0
  725. /package/{esm2020 → esm2022}/toast/index.mjs +0 -0
  726. /package/{esm2020 → esm2022}/toast/ptsecurity-mosaic-toast.mjs +0 -0
  727. /package/{esm2020 → esm2022}/toast/public-api.mjs +0 -0
  728. /package/{esm2020 → esm2022}/toast/toast-animations.mjs +0 -0
  729. /package/{esm2020 → esm2022}/toast/toast.type.mjs +0 -0
  730. /package/{esm2020 → esm2022}/toggle/index.mjs +0 -0
  731. /package/{esm2020 → esm2022}/toggle/ptsecurity-mosaic-toggle.mjs +0 -0
  732. /package/{esm2020 → esm2022}/toggle/public-api.mjs +0 -0
  733. /package/{esm2020 → esm2022}/tooltip/index.mjs +0 -0
  734. /package/{esm2020 → esm2022}/tooltip/ptsecurity-mosaic-tooltip.mjs +0 -0
  735. /package/{esm2020 → esm2022}/tooltip/public-api.mjs +0 -0
  736. /package/{esm2020 → esm2022}/tooltip/tooltip.animations.mjs +0 -0
  737. /package/{esm2020 → esm2022}/tree/control/base-tree-control.mjs +0 -0
  738. /package/{esm2020 → esm2022}/tree/control/flat-tree-control.mjs +0 -0
  739. /package/{esm2020 → esm2022}/tree/control/nested-tree-control.mjs +0 -0
  740. /package/{esm2020 → esm2022}/tree/control/tree-control.mjs +0 -0
  741. /package/{esm2020 → esm2022}/tree/data-source/nested-data-source.mjs +0 -0
  742. /package/{esm2020 → esm2022}/tree/index.mjs +0 -0
  743. /package/{esm2020 → esm2022}/tree/ptsecurity-mosaic-tree.mjs +0 -0
  744. /package/{esm2020 → esm2022}/tree/public-api.mjs +0 -0
  745. /package/{esm2020 → esm2022}/tree/tree-errors.mjs +0 -0
  746. /package/{esm2020 → esm2022}/tree-select/index.mjs +0 -0
  747. /package/{esm2020 → esm2022}/tree-select/ptsecurity-mosaic-tree-select.mjs +0 -0
  748. /package/{esm2020 → esm2022}/tree-select/public-api.mjs +0 -0
  749. /package/{fesm2015 → fesm2022}/ptsecurity-mosaic.mjs +0 -0
  750. /package/{fesm2015 → fesm2022}/ptsecurity-mosaic.mjs.map +0 -0
@@ -1,1115 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, Directive, Inject, Component, ChangeDetectionStrategy, ViewEncapsulation, Optional, ViewChild, ContentChild, HostListener, EventEmitter, QueryList, TemplateRef, Input, ContentChildren, Output, Self, NgModule } from '@angular/core';
3
- import * as i1$1 from '@angular/cdk/overlay';
4
- import { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
5
- import * as i2 from '@angular/common';
6
- import { DOCUMENT, CommonModule } from '@angular/common';
7
- import * as i3 from '@ptsecurity/mosaic/icon';
8
- import { McIcon, McIconModule } from '@ptsecurity/mosaic/icon';
9
- import { TemplatePortal, DomPortalOutlet } from '@angular/cdk/portal';
10
- import { Subject, Subscription, merge, of, asapScheduler } from 'rxjs';
11
- import { mixinDisabled, MC_TITLE_TEXT_REF } from '@ptsecurity/mosaic/core';
12
- import * as i1 from '@angular/cdk/a11y';
13
- import { normalizePassiveListenerOptions } from '@angular/cdk/platform';
14
- import { RIGHT_ARROW, LEFT_ARROW, ESCAPE, ENTER, SPACE, DOWN_ARROW as DOWN_ARROW$1 } from '@ptsecurity/cdk/keycodes';
15
- import { startWith, switchMap, take, filter, takeUntil, delay } from 'rxjs/operators';
16
- import { coerceBooleanProperty } from '@angular/cdk/coercion';
17
- import { UP_ARROW, DOWN_ARROW } from '@angular/cdk/keycodes';
18
- import { FocusKeyManager } from '@ptsecurity/cdk/a11y';
19
- import { trigger, state, style, transition, group, query, animate } from '@angular/animations';
20
- import * as i4 from '@angular/cdk/bidi';
21
-
22
- /**
23
- * Injection token used to provide the parent dropdown to dropdown-specific components.
24
- * @docs-private
25
- */
26
- const MC_DROPDOWN_PANEL = new InjectionToken('MC_DROPDOWN_PANEL');
27
- /** Injection token to be used to override the default options for `mc-dropdown`. */
28
- const MC_DROPDOWN_DEFAULT_OPTIONS = new InjectionToken('mc-dropdown-default-options', {
29
- providedIn: 'root',
30
- factory: MC_DROPDOWN_DEFAULT_OPTIONS_FACTORY
31
- });
32
- /** @docs-private */
33
- // tslint:disable-next-line:naming-convention
34
- function MC_DROPDOWN_DEFAULT_OPTIONS_FACTORY() {
35
- return {
36
- overlapTriggerX: true,
37
- overlapTriggerY: false,
38
- xPosition: 'after',
39
- yPosition: 'below',
40
- backdropClass: 'cdk-overlay-transparent-backdrop',
41
- hasBackdrop: false
42
- };
43
- }
44
-
45
- /**
46
- * Dropdown content that will be rendered lazily once the dropdown is opened.
47
- */
48
- class McDropdownContent {
49
- constructor(template, componentFactoryResolver, appRef, injector, viewContainerRef, document) {
50
- this.template = template;
51
- this.componentFactoryResolver = componentFactoryResolver;
52
- this.appRef = appRef;
53
- this.injector = injector;
54
- this.viewContainerRef = viewContainerRef;
55
- this.document = document;
56
- /** Emits when the dropdown content has been attached. */
57
- this.attached = new Subject();
58
- }
59
- /**
60
- * Attaches the content with a particular context.
61
- * @docs-private
62
- */
63
- attach(context = {}) {
64
- if (!this.portal) {
65
- this.portal = new TemplatePortal(this.template, this.viewContainerRef);
66
- }
67
- this.detach();
68
- if (!this.outlet) {
69
- this.outlet = new DomPortalOutlet(this.document.createElement('div'), this.componentFactoryResolver, this.appRef, this.injector);
70
- }
71
- const element = this.template.elementRef.nativeElement;
72
- // Because we support opening the same dropdown from different triggers (which in turn have their
73
- // own `OverlayRef` panel), we have to re-insert the host element every time, otherwise we
74
- // risk it staying attached to a pane that's no longer in the DOM.
75
- element.parentNode.insertBefore(this.outlet.outletElement, element);
76
- this.portal.attach(this.outlet, context);
77
- this.attached.next();
78
- }
79
- /**
80
- * Detaches the content.
81
- * @docs-private
82
- */
83
- detach() {
84
- var _a;
85
- if ((_a = this.portal) === null || _a === void 0 ? void 0 : _a.isAttached) {
86
- this.portal.detach();
87
- }
88
- }
89
- ngOnDestroy() {
90
- var _a;
91
- (_a = this.outlet) === null || _a === void 0 ? void 0 : _a.dispose();
92
- }
93
- }
94
- /** @nocollapse */ McDropdownContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McDropdownContent, deps: [{ token: i0.TemplateRef }, { token: i0.ComponentFactoryResolver }, { token: i0.ApplicationRef }, { token: i0.Injector }, { token: i0.ViewContainerRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
95
- /** @nocollapse */ McDropdownContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: McDropdownContent, selector: "ng-template[mcDropdownContent]", ngImport: i0 });
96
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McDropdownContent, decorators: [{
97
- type: Directive,
98
- args: [{
99
- selector: 'ng-template[mcDropdownContent]'
100
- }]
101
- }], ctorParameters: function () {
102
- return [{ type: i0.TemplateRef }, { type: i0.ComponentFactoryResolver }, { type: i0.ApplicationRef }, { type: i0.Injector }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{
103
- type: Inject,
104
- args: [DOCUMENT]
105
- }] }];
106
- } });
107
-
108
- // Boilerplate for applying mixins to McDropdownItem.
109
- /** @docs-private */
110
- class McDropdownItemBase {
111
- }
112
- /** @docs-private */
113
- const McDropdownItemMixinBase = mixinDisabled(McDropdownItemBase);
114
- /**
115
- * This directive is intended to be used inside an mc-dropdown tag.
116
- * It exists mostly to set the role attribute.
117
- */
118
- class McDropdownItem extends McDropdownItemMixinBase {
119
- constructor(elementRef, focusMonitor, parentDropdownPanel) {
120
- super();
121
- this.elementRef = elementRef;
122
- this.focusMonitor = focusMonitor;
123
- this.parentDropdownPanel = parentDropdownPanel;
124
- /** Stream that emits when the dropdown item is hovered. */
125
- this.hovered = new Subject();
126
- /** Stream that emits when the menu item is focused. */
127
- this.focused = new Subject();
128
- /** Whether the dropdown item is highlighted. */
129
- this.highlighted = false;
130
- /** Whether the dropdown item acts as a trigger for a nested dropdown. */
131
- this.isNested = false;
132
- }
133
- ngAfterViewInit() {
134
- if (this.focusMonitor) {
135
- // Start monitoring the element so it gets the appropriate focused classes. We want
136
- // to show the focus style for menu items only when the focus was not caused by a
137
- // mouse or touch interaction.
138
- this.focusMonitor.monitor(this.elementRef, false);
139
- }
140
- }
141
- ngOnDestroy() {
142
- if (this.focusMonitor) {
143
- this.focusMonitor.stopMonitoring(this.elementRef);
144
- }
145
- this.hovered.complete();
146
- this.focused.complete();
147
- }
148
- resetStyles() {
149
- this.getHostElement().classList.remove('cdk-keyboard-focused');
150
- }
151
- /** Focuses the dropdown item. */
152
- focus(origin, options) {
153
- if (this.focusMonitor && origin) {
154
- this.focusMonitor.focusVia(this.getHostElement(), origin, options);
155
- }
156
- else {
157
- this.getHostElement().focus(options);
158
- }
159
- this.focused.next(this);
160
- }
161
- /** Returns the host DOM element. */
162
- getHostElement() {
163
- return this.elementRef.nativeElement;
164
- }
165
- /** Used to set the `tabindex`. */
166
- getTabIndex() {
167
- return this.disabled ? '-1' : '0';
168
- }
169
- /** Prevents the default element actions if it is disabled. */
170
- // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
171
- // In Ivy the `host` bindings will be merged when this class is extended, whereas in
172
- // ViewEngine they're overwritten.
173
- // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
174
- // tslint:disable-next-line:no-host-decorator-in-concrete
175
- checkDisabled(event) {
176
- if (this.disabled) {
177
- event.preventDefault();
178
- event.stopPropagation();
179
- }
180
- }
181
- /** Emits to the hover stream. */
182
- // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
183
- // In Ivy the `host` bindings will be merged when this class is extended, whereas in
184
- // ViewEngine they're overwritten.
185
- // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
186
- // tslint:disable-next-line:no-host-decorator-in-concrete
187
- handleMouseEnter() {
188
- this.hovered.next(this);
189
- }
190
- /** Gets the label to be used when determining whether the option should be focused. */
191
- getLabel() {
192
- var _a, _b;
193
- const clone = this.getHostElement().cloneNode(true);
194
- const icons = clone.querySelectorAll('[mc-icon], .mc-icon');
195
- // Strip away icons so they don't show up in the text.
196
- // tslint:disable-next-line:prefer-for-of
197
- for (let i = 0; i < icons.length; i++) {
198
- const icon = icons[i];
199
- (_a = icon.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(icon);
200
- }
201
- return ((_b = clone.textContent) === null || _b === void 0 ? void 0 : _b.trim()) || '';
202
- }
203
- haltDisabledEvents(event) {
204
- if (this.disabled) {
205
- event.preventDefault();
206
- event.stopImmediatePropagation();
207
- event.stopPropagation();
208
- }
209
- }
210
- }
211
- /** @nocollapse */ McDropdownItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McDropdownItem, deps: [{ token: i0.ElementRef }, { token: i1.FocusMonitor }, { token: MC_DROPDOWN_PANEL, optional: true }], target: i0.ɵɵFactoryTarget.Component });
212
- /** @nocollapse */ McDropdownItem.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: McDropdownItem, selector: "mc-dropdown-item, [mc-dropdown-item]", inputs: { disabled: "disabled" }, host: { listeners: { "click": "checkDisabled($event)", "mouseenter": "handleMouseEnter()" }, properties: { "class.mc-dropdown-item_with-icon": "icon", "class.mc-dropdown-item_highlighted": "highlighted", "attr.disabled": "disabled || null", "attr.tabindex": "getTabIndex()" }, classAttribute: "mc-dropdown-item" }, providers: [
213
- { provide: MC_TITLE_TEXT_REF, useExisting: McDropdownItem }
214
- ], queries: [{ propertyName: "icon", first: true, predicate: McIcon, descendants: true }], viewQueries: [{ propertyName: "textElement", first: true, predicate: ["mcTitleText"], descendants: true, static: true }], exportAs: ["mcDropdownItem"], usesInheritance: true, ngImport: i0, template: "<div class=\"mc-dropdown-item-wrapper\" #mcTitleText>\n <ng-content></ng-content>\n</div>\n<i *ngIf=\"isNested\" mc-icon=\"mc-angle-right-S_16\" class=\"mc-dropdown-trigger__icon\"></i>\n<div class=\"mc-dropdown-item-overlay\" (click)=\"haltDisabledEvents($event)\"></div>\n", styles: ["@keyframes mc-progress{0%{background-position:0 0}to{background-position:29px 0}}.mc-progress{position:relative}.mc-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,rgba(0,0,0,.05) 10px,transparent 10px,transparent 20px,rgba(0,0,0,.05) 20px,rgba(0,0,0,.05) 30px,transparent 30px) repeat;background-size:29px 29px;animation:mc-progress 1s linear infinite}.mc-group{display:flex;flex-direction:row}.mc-group .mc-group_justified>.mc-group-item{width:100%}.mc-group .mc-group-item+.mc-group-item{margin-left:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group{display:flex;flex-direction:column}.mc-vertical-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.mc-vertical-group>.mc-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group .mc-group-item+.mc-group-item{margin-top:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.mc-dropdown-item{-webkit-user-select:none;user-select:none;display:flex;align-items:center;position:relative;box-sizing:border-box;width:100%;border:1px solid transparent;outline:none;padding:0;text-align:left;white-space:nowrap}.mc-dropdown-item:not([disabled]){cursor:pointer}.mc-dropdown-item .mc-dropdown-item__caption{margin-top:4px}.mc-dropdown-item.mc-dropdown-item_with-icon .mc-dropdown-item__caption{margin-left:24px}.mc-dropdown-item-wrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;padding:var(--mc-dropdown-item-size-padding, 5px 15px)}.mc-dropdown-item-wrapper [mc-icon]{padding:var(--mc-dropdown-item-size-icon-padding, 0 8px 2px 0)}.mc-dropdown-item-overlay{position:absolute;inset:-1px;border-radius:inherit}.mc-dropdown__group-header{-webkit-user-select:none;user-select:none;padding:var(--mc-dropdown-item-size-padding, 6px 15px)}.mc-dropdown__group-header.mc-dropdown__group-header_small{padding:var(--mc-dropdown-item-size-padding, 8px 15px)}.mc-dropdown__divider{height:var(--mc-dropdown-divider-size-height, 1px);margin:var(--mc-dropdown-divider-size-margin, 4px 0)}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.McIcon, selector: "[mc-icon]", inputs: ["color"] }, { kind: "directive", type: i3.McIconCSSStyler, selector: "[mc-icon]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
215
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McDropdownItem, decorators: [{
216
- type: Component,
217
- args: [{ selector: 'mc-dropdown-item, [mc-dropdown-item]', exportAs: 'mcDropdownItem', inputs: ['disabled'], host: {
218
- class: 'mc-dropdown-item',
219
- '[class.mc-dropdown-item_with-icon]': 'icon',
220
- '[class.mc-dropdown-item_highlighted]': 'highlighted',
221
- '[attr.disabled]': 'disabled || null',
222
- '[attr.tabindex]': 'getTabIndex()'
223
- }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
224
- { provide: MC_TITLE_TEXT_REF, useExisting: McDropdownItem }
225
- ], template: "<div class=\"mc-dropdown-item-wrapper\" #mcTitleText>\n <ng-content></ng-content>\n</div>\n<i *ngIf=\"isNested\" mc-icon=\"mc-angle-right-S_16\" class=\"mc-dropdown-trigger__icon\"></i>\n<div class=\"mc-dropdown-item-overlay\" (click)=\"haltDisabledEvents($event)\"></div>\n", styles: ["@keyframes mc-progress{0%{background-position:0 0}to{background-position:29px 0}}.mc-progress{position:relative}.mc-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,rgba(0,0,0,.05) 10px,transparent 10px,transparent 20px,rgba(0,0,0,.05) 20px,rgba(0,0,0,.05) 30px,transparent 30px) repeat;background-size:29px 29px;animation:mc-progress 1s linear infinite}.mc-group{display:flex;flex-direction:row}.mc-group .mc-group_justified>.mc-group-item{width:100%}.mc-group .mc-group-item+.mc-group-item{margin-left:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group{display:flex;flex-direction:column}.mc-vertical-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.mc-vertical-group>.mc-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group .mc-group-item+.mc-group-item{margin-top:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.mc-dropdown-item{-webkit-user-select:none;user-select:none;display:flex;align-items:center;position:relative;box-sizing:border-box;width:100%;border:1px solid transparent;outline:none;padding:0;text-align:left;white-space:nowrap}.mc-dropdown-item:not([disabled]){cursor:pointer}.mc-dropdown-item .mc-dropdown-item__caption{margin-top:4px}.mc-dropdown-item.mc-dropdown-item_with-icon .mc-dropdown-item__caption{margin-left:24px}.mc-dropdown-item-wrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;padding:var(--mc-dropdown-item-size-padding, 5px 15px)}.mc-dropdown-item-wrapper [mc-icon]{padding:var(--mc-dropdown-item-size-icon-padding, 0 8px 2px 0)}.mc-dropdown-item-overlay{position:absolute;inset:-1px;border-radius:inherit}.mc-dropdown__group-header{-webkit-user-select:none;user-select:none;padding:var(--mc-dropdown-item-size-padding, 6px 15px)}.mc-dropdown__group-header.mc-dropdown__group-header_small{padding:var(--mc-dropdown-item-size-padding, 8px 15px)}.mc-dropdown__divider{height:var(--mc-dropdown-divider-size-height, 1px);margin:var(--mc-dropdown-divider-size-margin, 4px 0)}\n"] }]
226
- }], ctorParameters: function () {
227
- return [{ type: i0.ElementRef }, { type: i1.FocusMonitor }, { type: undefined, decorators: [{
228
- type: Inject,
229
- args: [MC_DROPDOWN_PANEL]
230
- }, {
231
- type: Optional
232
- }] }];
233
- }, propDecorators: { textElement: [{
234
- type: ViewChild,
235
- args: ['mcTitleText', { static: true }]
236
- }], icon: [{
237
- type: ContentChild,
238
- args: [McIcon]
239
- }], checkDisabled: [{
240
- type: HostListener,
241
- args: ['click', ['$event']]
242
- }], handleMouseEnter: [{
243
- type: HostListener,
244
- args: ['mouseenter']
245
- }] } });
246
-
247
- /**
248
- * Throws an exception for the case when dropdown trigger doesn't have a valid mc-dropdown instance
249
- * @docs-private
250
- */
251
- function throwMcDropdownMissingError() {
252
- throw Error(`mcDropdownTriggerFor: must pass in an mc-dropdown instance.
253
- Example:
254
- <mc-dropdown #dropdown="mcDropdown"></mc-dropdown>
255
- <button [mcDropdownTriggerFor]="dropdown"></button>`);
256
- }
257
- /**
258
- * Throws an exception for the case when dropdown's x-position value isn't valid.
259
- * In other words, it doesn't match 'before' or 'after'.
260
- * @docs-private
261
- */
262
- function throwMcDropdownInvalidPositionX() {
263
- throw Error(`xPosition value must be either 'before' or after'.
264
- Example: <mc-dropdown [xPosition]="'before'" #dropdown="mcDropdown"></mc-dropdown>`);
265
- }
266
- /**
267
- * Throws an exception for the case when dropdown's y-position value isn't valid.
268
- * In other words, it doesn't match 'above' or 'below'.
269
- * @docs-private
270
- */
271
- function throwMcDropdownInvalidPositionY() {
272
- throw Error(`yPosition value must be either 'above' or below'.
273
- Example: <mc-dropdown [yPosition]="'above'" #dropdown="mcDropdown"></mc-dropdown>`);
274
- }
275
-
276
- /**
277
- * Animations used by the mc-dropdown component.
278
- * @docs-private
279
- */
280
- const mcDropdownAnimations = {
281
- /**
282
- * This animation controls the dropdown panel's entry and exit from the page.
283
- *
284
- * When the dropdown panel is added to the DOM, it scales in and fades in its border.
285
- *
286
- * When the dropdown panel is removed from the DOM, it simply fades out after a brief
287
- * delay to display the ripple.
288
- */
289
- transformDropdown: trigger('transformDropdown', [
290
- state('void', style({
291
- opacity: 0,
292
- transform: 'scale(0.8)'
293
- })),
294
- transition('void => enter', group([
295
- query('.mc-dropdown__content', animate('50ms linear', style({ opacity: 1 }))),
296
- animate('50ms cubic-bezier(0, 0, 0.2, 1)', style({ transform: 'scale(1)' }))
297
- ])),
298
- transition('* => void', animate('50ms 25ms linear', style({ opacity: 0 })))
299
- ]),
300
- /**
301
- * This animation fades in the background color and content of the dropdown panel
302
- * after its containing element is scaled in.
303
- */
304
- fadeInItems: trigger('fadeInItems', [
305
- // now. Remove next time we do breaking changes.
306
- state('showing', style({ opacity: 1 })),
307
- transition('void => *', [
308
- style({ opacity: 0 }),
309
- animate('200ms 60ms cubic-bezier(0.55, 0, 0.55, 0.2)')
310
- ])
311
- ])
312
- };
313
- const fadeInItems = mcDropdownAnimations.fadeInItems;
314
- const transformDropdown = mcDropdownAnimations.transformDropdown;
315
-
316
- class McDropdown {
317
- constructor(elementRef, ngZone, defaultOptions) {
318
- this.elementRef = elementRef;
319
- this.ngZone = ngZone;
320
- this.defaultOptions = defaultOptions;
321
- this.navigationWithWrap = false;
322
- this._xPosition = this.defaultOptions.xPosition;
323
- this._yPosition = this.defaultOptions.yPosition;
324
- this._overlapTriggerX = this.defaultOptions.overlapTriggerX;
325
- this._overlapTriggerY = this.defaultOptions.overlapTriggerY;
326
- this._hasBackdrop = this.defaultOptions.hasBackdrop;
327
- this.triggerWidth = '';
328
- /** Config object to be passed into the dropdown's ngClass */
329
- this.classList = {};
330
- /** Current state of the panel animation. */
331
- this.panelAnimationState = 'void';
332
- /** Emits whenever an animation on the dropdown completes. */
333
- this.animationDone = new Subject();
334
- /** Class to be added to the backdrop element. */
335
- this.backdropClass = this.defaultOptions.backdropClass;
336
- /** Event emitted when the dropdown is closed. */
337
- this.closed = new EventEmitter();
338
- /** Only the direct descendant menu items. */
339
- this.directDescendantItems = new QueryList();
340
- /** Subscription to tab events on the dropdown panel */
341
- this.tabSubscription = Subscription.EMPTY;
342
- }
343
- /** Position of the dropdown in the X axis. */
344
- get xPosition() {
345
- return this._xPosition;
346
- }
347
- set xPosition(value) {
348
- if (value !== 'before' && value !== 'after') {
349
- throwMcDropdownInvalidPositionX();
350
- }
351
- this._xPosition = value;
352
- this.setPositionClasses();
353
- }
354
- /** Position of the dropdown in the Y axis. */
355
- get yPosition() {
356
- return this._yPosition;
357
- }
358
- set yPosition(value) {
359
- if (value !== 'above' && value !== 'below') {
360
- throwMcDropdownInvalidPositionY();
361
- }
362
- this._yPosition = value;
363
- this.setPositionClasses();
364
- }
365
- /** Whether the dropdown should overlap its trigger vertically. */
366
- get overlapTriggerY() {
367
- return this._overlapTriggerY;
368
- }
369
- set overlapTriggerY(value) {
370
- this._overlapTriggerY = coerceBooleanProperty(value);
371
- }
372
- /** Whether the dropdown should overlap its trigger horizontally. */
373
- get overlapTriggerX() {
374
- return this._overlapTriggerX;
375
- }
376
- set overlapTriggerX(value) {
377
- this._overlapTriggerX = coerceBooleanProperty(value);
378
- }
379
- /** Whether the dropdown has a backdrop. */
380
- get hasBackdrop() {
381
- return this._hasBackdrop;
382
- }
383
- set hasBackdrop(value) {
384
- this._hasBackdrop = coerceBooleanProperty(value);
385
- }
386
- /**
387
- * This method takes classes set on the host mc-dropdown element and applies them on the
388
- * dropdown template that displays in the overlay container. Otherwise, it's difficult
389
- * to style the containing dropdown from outside the component.
390
- * @param classes list of class names
391
- */
392
- set panelClass(classes) {
393
- const previousPanelClass = this.previousPanelClass;
394
- if (previousPanelClass && previousPanelClass.length) {
395
- previousPanelClass
396
- .split(' ')
397
- .forEach((className) => this.classList[className] = false);
398
- }
399
- this.previousPanelClass = classes;
400
- if (classes === null || classes === void 0 ? void 0 : classes.length) {
401
- classes
402
- .split(' ')
403
- .forEach((className) => this.classList[className] = true);
404
- this.elementRef.nativeElement.className = '';
405
- }
406
- }
407
- ngOnInit() {
408
- this.setPositionClasses();
409
- }
410
- ngAfterContentInit() {
411
- this.updateDirectDescendants();
412
- this.keyManager = new FocusKeyManager(this.directDescendantItems)
413
- .withTypeAhead();
414
- if (this.navigationWithWrap) {
415
- this.keyManager.withWrap();
416
- }
417
- this.tabSubscription = this.keyManager.tabOut
418
- .subscribe(() => this.closed.emit('tab'));
419
- // If a user manually (programmatically) focuses a menu item, we need to reflect that focus
420
- // change back to the key manager. Note that we don't need to unsubscribe here because focused
421
- // is internal and we know that it gets completed on destroy.
422
- this.directDescendantItems.changes
423
- .pipe(startWith(this.directDescendantItems), switchMap((items) => merge(...items.map((item) => item.focused))))
424
- .subscribe((focusedItem) => this.keyManager.updateActiveItem(focusedItem));
425
- }
426
- ngOnDestroy() {
427
- this.directDescendantItems.destroy();
428
- this.tabSubscription.unsubscribe();
429
- this.closed.complete();
430
- }
431
- /** Stream that emits whenever the hovered dropdown item changes. */
432
- hovered() {
433
- const itemChanges = this.directDescendantItems.changes;
434
- return itemChanges.pipe(startWith(this.directDescendantItems), switchMap((items) => merge(...items.map((item) => item.hovered))));
435
- }
436
- /** Handle a keyboard event from the dropdown, delegating to the appropriate action. */
437
- handleKeydown(event) {
438
- // tslint:disable-next-line:deprecation
439
- const keyCode = event.keyCode;
440
- switch (keyCode) {
441
- case ESCAPE:
442
- this.closed.emit('keydown');
443
- break;
444
- case LEFT_ARROW:
445
- if (this.parent && this.direction === 'ltr') {
446
- this.closed.emit('keydown');
447
- }
448
- break;
449
- case RIGHT_ARROW:
450
- if (this.parent && this.direction === 'rtl') {
451
- this.closed.emit('keydown');
452
- }
453
- break;
454
- default:
455
- if (keyCode === UP_ARROW || keyCode === DOWN_ARROW) {
456
- this.keyManager.setFocusOrigin('keyboard');
457
- }
458
- this.keyManager.onKeydown(event);
459
- return;
460
- }
461
- // Don't allow the event to propagate if we've already handled it, or it may
462
- // end up reaching other overlays that were opened earlier.
463
- event.stopPropagation();
464
- }
465
- /**
466
- * Focus the first item in the dropdown.
467
- * @param origin Action from which the focus originated. Used to set the correct styling.
468
- */
469
- focusFirstItem(origin = 'program') {
470
- // When the content is rendered lazily, it takes a bit before the items are inside the DOM.
471
- if (this.lazyContent) {
472
- this.ngZone.onStable
473
- .pipe(take(1))
474
- .subscribe(() => this.keyManager.setFocusOrigin(origin).setFirstItemActive());
475
- }
476
- else {
477
- this.keyManager.setFocusOrigin(origin).setFirstItemActive();
478
- }
479
- }
480
- /**
481
- * Resets the active item in the dropdown. This is used when the dropdown is opened, allowing
482
- * the user to start from the first option when pressing the down arrow.
483
- */
484
- resetActiveItem() {
485
- var _a;
486
- (_a = this.keyManager.activeItem) === null || _a === void 0 ? void 0 : _a.resetStyles();
487
- this.keyManager.setActiveItem(-1);
488
- }
489
- /**
490
- * Adds classes to the dropdown panel based on its position. Can be used by
491
- * consumers to add specific styling based on the position.
492
- * @param posX Position of the dropdown along the x axis.
493
- * @param posY Position of the dropdown along the y axis.
494
- * @docs-private
495
- */
496
- setPositionClasses(posX = this.xPosition, posY = this.yPosition) {
497
- const classes = this.classList;
498
- classes['mc-dropdown-before'] = posX === 'before';
499
- classes['mc-dropdown-after'] = posX === 'after';
500
- classes['mc-dropdown-above'] = posY === 'above';
501
- classes['mc-dropdown-below'] = posY === 'below';
502
- }
503
- /** Starts the enter animation. */
504
- startAnimation() {
505
- this.panelAnimationState = 'enter';
506
- }
507
- /** Resets the panel animation to its initial state. */
508
- resetAnimation() {
509
- this.panelAnimationState = 'void';
510
- }
511
- /** Callback that is invoked when the panel animation completes. */
512
- onAnimationDone(event) {
513
- this.animationDone.next(event);
514
- this.isAnimating = false;
515
- }
516
- onAnimationStart(event) {
517
- this.isAnimating = true;
518
- // Scroll the content element to the top as soon as the animation starts. This is necessary,
519
- // because we move focus to the first item while it's still being animated, which can throw
520
- // the browser off when it determines the scroll position. Alternatively we can move focus
521
- // when the animation is done, however moving focus asynchronously will interrupt screen
522
- // readers which are in the process of reading out the dropdown already. We take the `element`
523
- // from the `event` since we can't use a `ViewChild` to access the pane.
524
- if (event.toState === 'enter' && this.keyManager.activeItemIndex === 0) {
525
- event.element.scrollTop = 0;
526
- }
527
- }
528
- close() {
529
- const focusOrigin = this.keyManager.getFocusOrigin() === 'keyboard' ? 'keydown' : 'click';
530
- this.closed.emit(focusOrigin);
531
- }
532
- /**
533
- * Sets up a stream that will keep track of any newly-added menu items and will update the list
534
- * of direct descendants. We collect the descendants this way, because `_allItems` can include
535
- * items that are part of child menus, and using a custom way of registering items is unreliable
536
- * when it comes to maintaining the item order.
537
- */
538
- updateDirectDescendants() {
539
- this.items.changes
540
- .pipe(startWith(this.items))
541
- .subscribe((items) => {
542
- this.directDescendantItems.reset(items.filter((item) => item.parentDropdownPanel === this));
543
- this.directDescendantItems.notifyOnChanges();
544
- });
545
- }
546
- }
547
- /** @nocollapse */ McDropdown.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McDropdown, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: MC_DROPDOWN_DEFAULT_OPTIONS }], target: i0.ɵɵFactoryTarget.Component });
548
- /** @nocollapse */ McDropdown.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: McDropdown, selector: "mc-dropdown", inputs: { navigationWithWrap: "navigationWithWrap", xPosition: "xPosition", yPosition: "yPosition", overlapTriggerY: "overlapTriggerY", overlapTriggerX: "overlapTriggerX", hasBackdrop: "hasBackdrop", panelClass: ["class", "panelClass"], backdropClass: "backdropClass" }, outputs: { closed: "closed" }, providers: [
549
- { provide: MC_DROPDOWN_PANEL, useExisting: McDropdown }
550
- ], queries: [{ propertyName: "lazyContent", first: true, predicate: McDropdownContent, descendants: true }, { propertyName: "items", predicate: McDropdownItem, descendants: true }], viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true }], exportAs: ["mcDropdown"], ngImport: i0, template: "<ng-template>\n <div class=\"mc-dropdown__panel\"\n [ngClass]=\"classList\"\n [class.mc-dropdown__panel_nested]=\"parent\"\n [style.min-width]=\"triggerWidth\"\n (keydown)=\"handleKeydown($event)\"\n (click)=\"close()\"\n [@transformDropdown]=\"panelAnimationState\"\n (@transformDropdown.start)=\"onAnimationStart($event)\"\n (@transformDropdown.done)=\"onAnimationDone($event)\"\n tabindex=\"-1\">\n\n <div class=\"mc-dropdown__content\">\n <ng-content></ng-content>\n </div>\n </div>\n</ng-template>\n", styles: [".mc-dropdown-trigger.mc-icon-button_right{padding-right:var(--mc-dropdown-trigger-size-button-right-padding, 8px)}.mc-dropdown-trigger.mc-icon-button_right.mc-icon-button_left .mc-icon_left{margin-right:0}.mc-dropdown-trigger .mc-icon_right{margin-left:var(--mc-dropdown-trigger-size-right-icon-padding, 2px)}.mc-dropdown-trigger__icon{margin-left:auto;padding-right:var(--mc-dropdown-trigger-size-right-icon-padding, 2px)}.mc-dropdown__panel{margin-top:-1px;max-width:var(--mc-dropdown-panel-size-max-width, 640px);border-width:var(--mc-dropdown-panel-size-border-width, 1px);border-style:solid;border-bottom-left-radius:var(--mc-dropdown-panel-size-border-radius, 4px);border-bottom-right-radius:var(--mc-dropdown-panel-size-border-radius, 4px);padding:var(--mc-dropdown-panel-size-padding, 4px 0)}.mc-dropdown__panel.mc-dropdown__panel_nested{border-top-left-radius:var(--mc-dropdown-panel-size-border-radius, 4px);border-top-right-radius:var(--mc-dropdown-panel-size-border-radius, 4px)}.mc-dropdown__panel.ng-animating{pointer-events:none}.mc-dropdown__content{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [
551
- mcDropdownAnimations.transformDropdown,
552
- mcDropdownAnimations.fadeInItems
553
- ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
554
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McDropdown, decorators: [{
555
- type: Component,
556
- args: [{ selector: 'mc-dropdown', exportAs: 'mcDropdown', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, animations: [
557
- mcDropdownAnimations.transformDropdown,
558
- mcDropdownAnimations.fadeInItems
559
- ], providers: [
560
- { provide: MC_DROPDOWN_PANEL, useExisting: McDropdown }
561
- ], template: "<ng-template>\n <div class=\"mc-dropdown__panel\"\n [ngClass]=\"classList\"\n [class.mc-dropdown__panel_nested]=\"parent\"\n [style.min-width]=\"triggerWidth\"\n (keydown)=\"handleKeydown($event)\"\n (click)=\"close()\"\n [@transformDropdown]=\"panelAnimationState\"\n (@transformDropdown.start)=\"onAnimationStart($event)\"\n (@transformDropdown.done)=\"onAnimationDone($event)\"\n tabindex=\"-1\">\n\n <div class=\"mc-dropdown__content\">\n <ng-content></ng-content>\n </div>\n </div>\n</ng-template>\n", styles: [".mc-dropdown-trigger.mc-icon-button_right{padding-right:var(--mc-dropdown-trigger-size-button-right-padding, 8px)}.mc-dropdown-trigger.mc-icon-button_right.mc-icon-button_left .mc-icon_left{margin-right:0}.mc-dropdown-trigger .mc-icon_right{margin-left:var(--mc-dropdown-trigger-size-right-icon-padding, 2px)}.mc-dropdown-trigger__icon{margin-left:auto;padding-right:var(--mc-dropdown-trigger-size-right-icon-padding, 2px)}.mc-dropdown__panel{margin-top:-1px;max-width:var(--mc-dropdown-panel-size-max-width, 640px);border-width:var(--mc-dropdown-panel-size-border-width, 1px);border-style:solid;border-bottom-left-radius:var(--mc-dropdown-panel-size-border-radius, 4px);border-bottom-right-radius:var(--mc-dropdown-panel-size-border-radius, 4px);padding:var(--mc-dropdown-panel-size-padding, 4px 0)}.mc-dropdown__panel.mc-dropdown__panel_nested{border-top-left-radius:var(--mc-dropdown-panel-size-border-radius, 4px);border-top-right-radius:var(--mc-dropdown-panel-size-border-radius, 4px)}.mc-dropdown__panel.ng-animating{pointer-events:none}.mc-dropdown__content{display:flex;flex-direction:column}\n"] }]
562
- }], ctorParameters: function () {
563
- return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: undefined, decorators: [{
564
- type: Inject,
565
- args: [MC_DROPDOWN_DEFAULT_OPTIONS]
566
- }] }];
567
- }, propDecorators: { navigationWithWrap: [{
568
- type: Input
569
- }], xPosition: [{
570
- type: Input
571
- }], yPosition: [{
572
- type: Input
573
- }], overlapTriggerY: [{
574
- type: Input
575
- }], overlapTriggerX: [{
576
- type: Input
577
- }], hasBackdrop: [{
578
- type: Input
579
- }], panelClass: [{
580
- type: Input,
581
- args: ['class']
582
- }], backdropClass: [{
583
- type: Input
584
- }], templateRef: [{
585
- type: ViewChild,
586
- args: [TemplateRef, { static: false }]
587
- }], items: [{
588
- type: ContentChildren,
589
- args: [McDropdownItem, { descendants: true }]
590
- }], lazyContent: [{
591
- type: ContentChild,
592
- args: [McDropdownContent, { static: false }]
593
- }], closed: [{
594
- type: Output
595
- }] } });
596
-
597
- /** Injection token that determines the scroll handling while the dropdown is open. */
598
- const MC_DROPDOWN_SCROLL_STRATEGY = new InjectionToken('mc-dropdown-scroll-strategy');
599
- /** @docs-private */
600
- // tslint:disable-next-line:naming-convention
601
- function MC_DROPDOWN_SCROLL_STRATEGY_FACTORY(overlay) {
602
- return () => overlay.scrollStrategies.reposition();
603
- }
604
- /** @docs-private */
605
- const MC_DROPDOWN_SCROLL_STRATEGY_FACTORY_PROVIDER = {
606
- provide: MC_DROPDOWN_SCROLL_STRATEGY,
607
- deps: [Overlay],
608
- useFactory: MC_DROPDOWN_SCROLL_STRATEGY_FACTORY
609
- };
610
- /** Default top padding of the nested dropdown panel. */
611
- const NESTED_PANEL_TOP_PADDING = 4;
612
- const NESTED_PANEL_LEFT_PADDING = 8;
613
- /** Options for binding a passive event listener. */
614
- const passiveEventListenerOptions = normalizePassiveListenerOptions({ passive: true });
615
- /**
616
- * This directive is intended to be used in conjunction with an mc-dropdown tag. It is
617
- * responsible for toggling the display of the provided dropdown instance.
618
- */
619
- class McDropdownTrigger {
620
- constructor(overlay, elementRef, viewContainerRef, scrollStrategy, parent, dropdownItemInstance, _dir, changeDetecotrRef, focusMonitor) {
621
- this.overlay = overlay;
622
- this.elementRef = elementRef;
623
- this.viewContainerRef = viewContainerRef;
624
- this.scrollStrategy = scrollStrategy;
625
- this.parent = parent;
626
- this.dropdownItemInstance = dropdownItemInstance;
627
- this._dir = _dir;
628
- this.changeDetecotrRef = changeDetecotrRef;
629
- this.focusMonitor = focusMonitor;
630
- this.openByArrowDown = true;
631
- /**
632
- * Whether focus should be restored when the menu is closed.
633
- * Note that disabling this option can have accessibility implications
634
- * and it's up to you to manage focus, if you decide to turn it off.
635
- */
636
- this.restoreFocus = true;
637
- /** Event emitted when the associated dropdown is opened. */
638
- this.dropdownOpened = new EventEmitter();
639
- /** Event emitted when the associated dropdown is closed. */
640
- this.dropdownClosed = new EventEmitter();
641
- this._opened = false;
642
- this.overlayRef = null;
643
- this.closeSubscription = Subscription.EMPTY;
644
- this.hoverSubscription = Subscription.EMPTY;
645
- /**
646
- * Handles touch start events on the trigger.
647
- * Needs to be an arrow function so we can easily use addEventListener and removeEventListener.
648
- */
649
- this.handleTouchStart = () => this.openedBy = 'touch';
650
- elementRef.nativeElement.addEventListener('touchstart', this.handleTouchStart, passiveEventListenerOptions);
651
- if (dropdownItemInstance) {
652
- dropdownItemInstance.isNested = this.isNested();
653
- }
654
- }
655
- /** References the dropdown instance that the trigger is associated with. */
656
- get dropdown() {
657
- return this._dropdown;
658
- }
659
- set dropdown(dropdown) {
660
- if (dropdown === this._dropdown) {
661
- return;
662
- }
663
- this._dropdown = dropdown;
664
- this.closeSubscription.unsubscribe();
665
- if (dropdown) {
666
- this.closeSubscription = dropdown.closed
667
- .asObservable()
668
- .subscribe((reason) => {
669
- this.destroy(reason);
670
- // If a click closed the dropdown, we should close the entire chain of nested dropdowns.
671
- if (['click', 'tab'].includes(reason) && this.parent) {
672
- this.parent.closed.emit(reason);
673
- }
674
- });
675
- }
676
- }
677
- /** The text direction of the containing app. */
678
- get dir() {
679
- var _a;
680
- return ((_a = this._dir) === null || _a === void 0 ? void 0 : _a.value) === 'rtl' ? 'rtl' : 'ltr';
681
- }
682
- /** Whether the dropdown is open. */
683
- get opened() {
684
- return this._opened;
685
- }
686
- ngAfterContentInit() {
687
- this.check();
688
- this.handleHover();
689
- }
690
- ngOnDestroy() {
691
- if (this.overlayRef) {
692
- this.overlayRef.dispose();
693
- this.overlayRef = null;
694
- }
695
- this.elementRef.nativeElement.removeEventListener('touchstart', this.handleTouchStart, passiveEventListenerOptions);
696
- this.cleanUpSubscriptions();
697
- }
698
- /** Whether the dropdown triggers a nested dropdown or a top-level one. */
699
- isNested() {
700
- return !!(this.dropdownItemInstance && this.parent);
701
- }
702
- /** Toggles the dropdown between the open and closed states. */
703
- toggle() {
704
- // tslint:disable-next-line:no-void-expression
705
- return this._opened ? this.close() : this.open();
706
- }
707
- /** Opens the dropdown. */
708
- open() {
709
- if (this._opened) {
710
- return;
711
- }
712
- this.check();
713
- const overlayRef = this.createOverlay();
714
- const overlayConfig = overlayRef.getConfig();
715
- this.setPosition(overlayConfig.positionStrategy);
716
- overlayConfig.hasBackdrop = this.dropdown.hasBackdrop ? !this.isNested() : this.dropdown.hasBackdrop;
717
- overlayRef.attach(this.getPortal());
718
- if (this.dropdown.lazyContent) {
719
- this.dropdown.lazyContent.detach();
720
- this.dropdown.lazyContent.attach(this.data);
721
- }
722
- this.closeSubscription = this.closingActions()
723
- .subscribe(() => this.close());
724
- this.init();
725
- if (this.dropdown instanceof McDropdown) {
726
- this.dropdown.startAnimation();
727
- }
728
- }
729
- /** Closes the dropdown. */
730
- close() {
731
- this.dropdown.closed.emit();
732
- }
733
- /**
734
- * Focuses the dropdown trigger.
735
- */
736
- focus(origin, options) {
737
- if (this.focusMonitor && origin) {
738
- this.focusMonitor.focusVia(this.elementRef.nativeElement, origin, options);
739
- }
740
- else {
741
- this.elementRef.nativeElement.focus();
742
- }
743
- }
744
- /** Handles mouse presses on the trigger. */
745
- handleMousedown(event) {
746
- // Since right or middle button clicks won't trigger the `click` event,
747
- // we shouldn't consider the dropdown as opened by mouse in those cases.
748
- this.openedBy = event.button === 0 ? 'mouse' : undefined;
749
- // Since clicking on the trigger won't close the dropdown if it opens a nested dropdown,
750
- // we should prevent focus from moving onto it via click to avoid the
751
- // highlight from lingering on the dropdown item.
752
- if (this.isNested()) {
753
- event.preventDefault();
754
- }
755
- }
756
- /** Handles key presses on the trigger. */
757
- handleKeydown(event) {
758
- // tslint:disable-next-line:deprecation
759
- const keyCode = event.keyCode;
760
- if (keyCode === ENTER || keyCode === SPACE) {
761
- this.openedBy = 'keyboard';
762
- event.preventDefault();
763
- if (this.isNested()) {
764
- // Stop event propagation to avoid closing the parent dropdown.
765
- event.stopPropagation();
766
- this.open();
767
- }
768
- else {
769
- this.toggle();
770
- }
771
- }
772
- if ((this.isNested() &&
773
- ((keyCode === RIGHT_ARROW && this.dir === 'ltr') || (keyCode === LEFT_ARROW && this.dir === 'rtl'))) ||
774
- (!this.isNested() && (keyCode === DOWN_ARROW$1 && this.openByArrowDown))) {
775
- event.preventDefault();
776
- this.openedBy = 'keyboard';
777
- this.open();
778
- }
779
- }
780
- /** Handles click events on the trigger. */
781
- handleClick(event) {
782
- if (this.isNested()) {
783
- // Stop event propagation to avoid closing the parent dropdown.
784
- event.stopPropagation();
785
- this.open();
786
- }
787
- else {
788
- this.toggle();
789
- }
790
- }
791
- /** Closes the dropdown and does the necessary cleanup. */
792
- destroy(reason) {
793
- if (!this.overlayRef || !this.opened) {
794
- return;
795
- }
796
- this.lastDestroyReason = reason;
797
- this.dropdown.resetActiveItem();
798
- this.closeSubscription.unsubscribe();
799
- this.overlayRef.detach();
800
- if (this.restoreFocus && (reason === 'keydown' || !this.openedBy || !this.isNested())) {
801
- this.focus(this.openedBy);
802
- }
803
- this.openedBy = undefined;
804
- if (this.dropdown instanceof McDropdown) {
805
- this.dropdown.resetAnimation();
806
- const animationSubscription = this.dropdown.animationDone
807
- .pipe(filter((event) => event.toState === 'void'), take(1));
808
- if (this.dropdown.lazyContent) {
809
- // Wait for the exit animation to finish before detaching the content.
810
- animationSubscription
811
- .pipe(
812
- // Interrupt if the content got re-attached.
813
- takeUntil(this.dropdown.lazyContent.attached))
814
- .subscribe({
815
- next: () => this.dropdown.lazyContent.detach(),
816
- // No matter whether the content got re-attached, reset the this.dropdown.
817
- complete: () => this.setIsOpened(false)
818
- });
819
- }
820
- else {
821
- animationSubscription
822
- .subscribe(() => this.setIsOpened(false));
823
- }
824
- }
825
- else {
826
- this.setIsOpened(false);
827
- if (this.dropdown.lazyContent) {
828
- this.dropdown.lazyContent.detach();
829
- }
830
- }
831
- }
832
- /**
833
- * This method sets the dropdown state to open and focuses the first item if
834
- * the dropdown was opened via the keyboard.
835
- */
836
- init() {
837
- this.dropdown.parent = this.isNested() ? this.parent : undefined;
838
- this.dropdown.direction = this.dir;
839
- if (!this.dropdown.parent) {
840
- this.dropdown.triggerWidth = this.getWidth();
841
- }
842
- this.dropdown.focusFirstItem(this.openedBy || 'program');
843
- this.setIsOpened(true);
844
- }
845
- // set state rather than toggle to support triggers sharing a dropdown
846
- setIsOpened(isOpen) {
847
- if (isOpen !== this._opened) {
848
- this.changeDetecotrRef.markForCheck();
849
- }
850
- this._opened = isOpen;
851
- // tslint:disable-next-line:no-void-expression
852
- this._opened ? this.dropdownOpened.emit() : this.dropdownClosed.emit();
853
- if (this.isNested()) {
854
- this.dropdownItemInstance.highlighted = isOpen;
855
- }
856
- }
857
- /**
858
- * This method checks that a valid instance of McDropdown has been passed into
859
- * mcDropdownTriggerFor. If not, an exception is thrown.
860
- */
861
- check() {
862
- if (!this.dropdown) {
863
- throwMcDropdownMissingError();
864
- }
865
- }
866
- /**
867
- * This method creates the overlay from the provided dropdown's template and saves its
868
- * OverlayRef so that it can be attached to the DOM when open is called.
869
- */
870
- createOverlay() {
871
- if (!this.overlayRef) {
872
- const config = this.getOverlayConfig();
873
- this.subscribeToPositions(config.positionStrategy);
874
- this.overlayRef = this.overlay.create(config);
875
- // Consume the `keydownEvents` in order to prevent them from going to another overlay.
876
- // Ideally we'd also have our keyboard event logic in here, however doing so will
877
- // break anybody that may have implemented the `McDropdownPanel` themselves.
878
- this.overlayRef.keydownEvents()
879
- .subscribe();
880
- }
881
- return this.overlayRef;
882
- }
883
- /**
884
- * This method builds the configuration object needed to create the overlay, the OverlayState.
885
- * @returns OverlayConfig
886
- */
887
- getOverlayConfig() {
888
- return new OverlayConfig({
889
- positionStrategy: this.overlay.position()
890
- .flexibleConnectedTo(this.elementRef)
891
- .withLockedPosition()
892
- .withTransformOriginOn('.mc-dropdown__panel'),
893
- backdropClass: this.dropdown.backdropClass || 'cdk-overlay-transparent-backdrop',
894
- scrollStrategy: this.scrollStrategy(),
895
- direction: this.dir
896
- });
897
- }
898
- /**
899
- * Listens to changes in the position of the overlay and sets the correct classes
900
- * on the dropdown based on the new position. This ensures the animation origin is always
901
- * correct, even if a fallback position is used for the overlay.
902
- */
903
- subscribeToPositions(position) {
904
- if (this.dropdown.setPositionClasses) {
905
- position.positionChanges
906
- .subscribe((change) => {
907
- const posX = change.connectionPair.overlayX === 'start' ? 'after' : 'before';
908
- const posY = change.connectionPair.overlayY === 'top' ? 'below' : 'above';
909
- this.dropdown.setPositionClasses(posX, posY);
910
- });
911
- }
912
- }
913
- /**
914
- * Sets the appropriate positions on a position strategy
915
- * so the overlay connects with the trigger correctly.
916
- * @param positionStrategy Strategy whose position to update.
917
- */
918
- setPosition(positionStrategy) {
919
- let [originX, originFallbackX, overlayX, overlayFallbackX] = this.dropdown.xPosition === 'before' ?
920
- ['end', 'start', 'end', 'start'] :
921
- ['start', 'end', 'start', 'end'];
922
- // tslint:disable-next-line:prefer-const
923
- let [overlayY, overlayFallbackY, originY, originFallbackY] = this.dropdown.yPosition === 'above' ?
924
- ['bottom', 'top', 'bottom', 'top'] :
925
- ['top', 'bottom', 'top', 'bottom'];
926
- let offsetY = 0;
927
- let offsetX = 0;
928
- if (this.isNested()) {
929
- // When the dropdown is nested, it should always align itself
930
- // to the edges of the trigger, instead of overlapping it.
931
- overlayFallbackX = originX = this.dropdown.xPosition === 'before' ? 'start' : 'end';
932
- originFallbackX = overlayX = originX === 'end' ? 'start' : 'end';
933
- offsetY = overlayY === 'bottom' ? NESTED_PANEL_TOP_PADDING : -NESTED_PANEL_TOP_PADDING;
934
- offsetX = NESTED_PANEL_LEFT_PADDING;
935
- }
936
- else {
937
- if (!this.dropdown.overlapTriggerY) {
938
- originY = overlayY === 'top' ? 'bottom' : 'top';
939
- originFallbackY = overlayFallbackY === 'top' ? 'bottom' : 'top';
940
- }
941
- if (!this.dropdown.overlapTriggerX) {
942
- overlayFallbackX = originX = this.dropdown.xPosition === 'before' ? 'start' : 'end';
943
- originFallbackX = overlayX = originX === 'end' ? 'start' : 'end';
944
- }
945
- }
946
- positionStrategy.withPositions([
947
- { originX, originY, overlayX, overlayY, offsetY, offsetX: -offsetX },
948
- { originX: originFallbackX, originY, overlayX: overlayFallbackX, overlayY, offsetY, offsetX },
949
- {
950
- originX,
951
- originY: originFallbackY,
952
- overlayX,
953
- overlayY: overlayFallbackY,
954
- offsetY: -offsetY,
955
- offsetX: -offsetX
956
- },
957
- {
958
- originX: originFallbackX,
959
- originY: originFallbackY,
960
- overlayX: overlayFallbackX,
961
- overlayY: overlayFallbackY,
962
- offsetY: -offsetY,
963
- offsetX: -offsetX
964
- }
965
- ]);
966
- }
967
- /** Cleans up the active subscriptions. */
968
- cleanUpSubscriptions() {
969
- this.closeSubscription.unsubscribe();
970
- this.hoverSubscription.unsubscribe();
971
- }
972
- /** Returns a stream that emits whenever an action that should close the dropdown occurs. */
973
- closingActions() {
974
- const backdrop = this.overlayRef.backdropClick();
975
- const outsidePointerEvents = this.overlayRef.outsidePointerEvents();
976
- const detachments = this.overlayRef.detachments();
977
- const parentClose = this.parent ? this.parent.closed : of();
978
- const hover = this.parent ? this.parent.hovered()
979
- .pipe(filter((active) => active !== this.dropdownItemInstance), filter(() => this._opened)) : of();
980
- return merge(backdrop, outsidePointerEvents, parentClose, hover, detachments);
981
- }
982
- /** Handles the cases where the user hovers over the trigger. */
983
- handleHover() {
984
- // Subscribe to changes in the hovered item in order to toggle the panel.
985
- if (!this.isNested()) {
986
- return;
987
- }
988
- this.hoverSubscription = this.parent.hovered()
989
- // Since we might have multiple competing triggers for the same dropdown (e.g. a nested dropdown
990
- // with different data and triggers), we have to delay it by a tick to ensure that
991
- // it won't be closed immediately after it is opened.
992
- .pipe(filter((active) => active === this.dropdownItemInstance && !active.disabled), delay(0, asapScheduler))
993
- .subscribe(() => {
994
- this.openedBy = 'mouse';
995
- // If the same dropdown is used between multiple triggers, it might still be animating
996
- // while the new trigger tries to re-open it. Wait for the animation to finish
997
- // before doing so. Also interrupt if the user moves to another item.
998
- if (this.dropdown instanceof McDropdown && this.dropdown.isAnimating) {
999
- // We need the `delay(0)` here in order to avoid
1000
- // 'changed after checked' errors in some cases. See #12194.
1001
- this.dropdown.animationDone
1002
- .pipe(take(1), delay(0, asapScheduler), takeUntil(this.parent.hovered()))
1003
- .subscribe(() => this.open());
1004
- }
1005
- else {
1006
- this.open();
1007
- }
1008
- });
1009
- }
1010
- /** Gets the portal that should be attached to the overlay. */
1011
- getPortal() {
1012
- // Note that we can avoid this check by keeping the portal on the dropdown panel.
1013
- // While it would be cleaner, we'd have to introduce another required method on
1014
- // `McDropdownPanel`, making it harder to consume.
1015
- if (!this.portal || this.portal.templateRef !== this.dropdown.templateRef) {
1016
- this.portal = new TemplatePortal(this.dropdown.templateRef, this.viewContainerRef);
1017
- }
1018
- return this.portal;
1019
- }
1020
- getWidth() {
1021
- const nativeElement = this.elementRef.nativeElement;
1022
- const { width, borderRightWidth, borderLeftWidth } = window.getComputedStyle(nativeElement);
1023
- return `${parseInt(width) - parseInt(borderRightWidth) - parseInt(borderLeftWidth)}px`;
1024
- }
1025
- }
1026
- /** @nocollapse */ McDropdownTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McDropdownTrigger, deps: [{ token: i1$1.Overlay }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: MC_DROPDOWN_SCROLL_STRATEGY }, { token: McDropdown, optional: true }, { token: McDropdownItem, optional: true, self: true }, { token: i4.Directionality, optional: true }, { token: i0.ChangeDetectorRef }, { token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Directive });
1027
- /** @nocollapse */ McDropdownTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: McDropdownTrigger, selector: "[mcDropdownTriggerFor]", inputs: { data: ["mcDropdownTriggerData", "data"], openByArrowDown: "openByArrowDown", restoreFocus: ["mcDropdownTriggerRestoreFocus", "restoreFocus"], dropdown: ["mcDropdownTriggerFor", "dropdown"] }, outputs: { dropdownOpened: "dropdownOpened", dropdownClosed: "dropdownClosed" }, host: { listeners: { "mousedown": "handleMousedown($event)", "keydown": "handleKeydown($event)", "click": "handleClick($event)" }, properties: { "class.mc-pressed": "opened" }, classAttribute: "mc-dropdown-trigger" }, exportAs: ["mcDropdownTrigger"], ngImport: i0 });
1028
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McDropdownTrigger, decorators: [{
1029
- type: Directive,
1030
- args: [{
1031
- selector: `[mcDropdownTriggerFor]`,
1032
- exportAs: 'mcDropdownTrigger',
1033
- host: {
1034
- class: 'mc-dropdown-trigger',
1035
- '[class.mc-pressed]': 'opened',
1036
- '(mousedown)': 'handleMousedown($event)',
1037
- '(keydown)': 'handleKeydown($event)',
1038
- '(click)': 'handleClick($event)'
1039
- }
1040
- }]
1041
- }], ctorParameters: function () {
1042
- return [{ type: i1$1.Overlay }, { type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{
1043
- type: Inject,
1044
- args: [MC_DROPDOWN_SCROLL_STRATEGY]
1045
- }] }, { type: McDropdown, decorators: [{
1046
- type: Optional
1047
- }] }, { type: McDropdownItem, decorators: [{
1048
- type: Optional
1049
- }, {
1050
- type: Self
1051
- }] }, { type: i4.Directionality, decorators: [{
1052
- type: Optional
1053
- }] }, { type: i0.ChangeDetectorRef }, { type: i1.FocusMonitor }];
1054
- }, propDecorators: { data: [{
1055
- type: Input,
1056
- args: ['mcDropdownTriggerData']
1057
- }], openByArrowDown: [{
1058
- type: Input
1059
- }], restoreFocus: [{
1060
- type: Input,
1061
- args: ['mcDropdownTriggerRestoreFocus']
1062
- }], dropdown: [{
1063
- type: Input,
1064
- args: ['mcDropdownTriggerFor']
1065
- }], dropdownOpened: [{
1066
- type: Output
1067
- }], dropdownClosed: [{
1068
- type: Output
1069
- }] } });
1070
-
1071
- class McDropdownModule {
1072
- }
1073
- /** @nocollapse */ McDropdownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McDropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1074
- /** @nocollapse */ McDropdownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: McDropdownModule, declarations: [McDropdown,
1075
- McDropdownItem,
1076
- McDropdownTrigger,
1077
- McDropdownContent], imports: [CommonModule,
1078
- OverlayModule,
1079
- McIconModule], exports: [McDropdown,
1080
- McDropdownItem,
1081
- McDropdownTrigger,
1082
- McDropdownContent] });
1083
- /** @nocollapse */ McDropdownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McDropdownModule, providers: [MC_DROPDOWN_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [CommonModule,
1084
- OverlayModule,
1085
- McIconModule] });
1086
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McDropdownModule, decorators: [{
1087
- type: NgModule,
1088
- args: [{
1089
- imports: [
1090
- CommonModule,
1091
- OverlayModule,
1092
- McIconModule
1093
- ],
1094
- exports: [
1095
- McDropdown,
1096
- McDropdownItem,
1097
- McDropdownTrigger,
1098
- McDropdownContent
1099
- ],
1100
- declarations: [
1101
- McDropdown,
1102
- McDropdownItem,
1103
- McDropdownTrigger,
1104
- McDropdownContent
1105
- ],
1106
- providers: [MC_DROPDOWN_SCROLL_STRATEGY_FACTORY_PROVIDER]
1107
- }]
1108
- }] });
1109
-
1110
- /**
1111
- * Generated bundle index. Do not edit.
1112
- */
1113
-
1114
- export { MC_DROPDOWN_DEFAULT_OPTIONS, MC_DROPDOWN_DEFAULT_OPTIONS_FACTORY, MC_DROPDOWN_PANEL, MC_DROPDOWN_SCROLL_STRATEGY, MC_DROPDOWN_SCROLL_STRATEGY_FACTORY, MC_DROPDOWN_SCROLL_STRATEGY_FACTORY_PROVIDER, McDropdown, McDropdownContent, McDropdownItem, McDropdownModule, McDropdownTrigger, NESTED_PANEL_LEFT_PADDING, NESTED_PANEL_TOP_PADDING, fadeInItems, mcDropdownAnimations, throwMcDropdownInvalidPositionX, throwMcDropdownInvalidPositionY, throwMcDropdownMissingError, transformDropdown };
1115
- //# sourceMappingURL=ptsecurity-mosaic-dropdown.mjs.map