@taiga-ui/core 2.75.0 → 2.76.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 (584) hide show
  1. package/abstract/abstract-dropdown.d.ts +2 -2
  2. package/abstract/taiga-ui-core-abstract.metadata.json +1 -1
  3. package/bundles/taiga-ui-core-abstract.umd.js +49 -2
  4. package/bundles/taiga-ui-core-abstract.umd.js.map +1 -1
  5. package/bundles/taiga-ui-core-abstract.umd.min.js.map +1 -1
  6. package/bundles/taiga-ui-core-components-alert.umd.js +55 -10
  7. package/bundles/taiga-ui-core-components-alert.umd.js.map +1 -1
  8. package/bundles/taiga-ui-core-components-alert.umd.min.js.map +1 -1
  9. package/bundles/taiga-ui-core-components-button.umd.js +60 -15
  10. package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
  11. package/bundles/taiga-ui-core-components-button.umd.min.js.map +1 -1
  12. package/bundles/taiga-ui-core-components-calendar.umd.js +47 -2
  13. package/bundles/taiga-ui-core-components-calendar.umd.js.map +1 -1
  14. package/bundles/taiga-ui-core-components-calendar.umd.min.js.map +1 -1
  15. package/bundles/taiga-ui-core-components-data-list.umd.js +83 -39
  16. package/bundles/taiga-ui-core-components-data-list.umd.js.map +1 -1
  17. package/bundles/taiga-ui-core-components-data-list.umd.min.js +1 -1
  18. package/bundles/taiga-ui-core-components-data-list.umd.min.js.map +1 -1
  19. package/bundles/taiga-ui-core-components-dialog.umd.js +60 -15
  20. package/bundles/taiga-ui-core-components-dialog.umd.js.map +1 -1
  21. package/bundles/taiga-ui-core-components-dialog.umd.min.js.map +1 -1
  22. package/bundles/taiga-ui-core-components-dropdown-box.umd.js +84 -39
  23. package/bundles/taiga-ui-core-components-dropdown-box.umd.js.map +1 -1
  24. package/bundles/taiga-ui-core-components-dropdown-box.umd.min.js.map +1 -1
  25. package/bundles/taiga-ui-core-components-error.umd.js +50 -5
  26. package/bundles/taiga-ui-core-components-error.umd.js.map +1 -1
  27. package/bundles/taiga-ui-core-components-error.umd.min.js.map +1 -1
  28. package/bundles/taiga-ui-core-components-expand.umd.js +58 -13
  29. package/bundles/taiga-ui-core-components-expand.umd.js.map +1 -1
  30. package/bundles/taiga-ui-core-components-expand.umd.min.js.map +1 -1
  31. package/bundles/taiga-ui-core-components-group.umd.js +64 -19
  32. package/bundles/taiga-ui-core-components-group.umd.js.map +1 -1
  33. package/bundles/taiga-ui-core-components-group.umd.min.js.map +1 -1
  34. package/bundles/taiga-ui-core-components-hints-host.umd.js +93 -48
  35. package/bundles/taiga-ui-core-components-hints-host.umd.js.map +1 -1
  36. package/bundles/taiga-ui-core-components-hints-host.umd.min.js.map +1 -1
  37. package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js +56 -11
  38. package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js.map +1 -1
  39. package/bundles/taiga-ui-core-components-hosted-dropdown.umd.min.js.map +1 -1
  40. package/bundles/taiga-ui-core-components-label.umd.js +51 -6
  41. package/bundles/taiga-ui-core-components-label.umd.js.map +1 -1
  42. package/bundles/taiga-ui-core-components-label.umd.min.js +1 -1
  43. package/bundles/taiga-ui-core-components-label.umd.min.js.map +1 -1
  44. package/bundles/taiga-ui-core-components-link.umd.js +57 -12
  45. package/bundles/taiga-ui-core-components-link.umd.js.map +1 -1
  46. package/bundles/taiga-ui-core-components-link.umd.min.js.map +1 -1
  47. package/bundles/taiga-ui-core-components-loader.umd.js +48 -3
  48. package/bundles/taiga-ui-core-components-loader.umd.js.map +1 -1
  49. package/bundles/taiga-ui-core-components-loader.umd.min.js.map +1 -1
  50. package/bundles/taiga-ui-core-components-notification.umd.js +54 -9
  51. package/bundles/taiga-ui-core-components-notification.umd.js.map +1 -1
  52. package/bundles/taiga-ui-core-components-notification.umd.min.js.map +1 -1
  53. package/bundles/taiga-ui-core-components-primitive-calendar.umd.js +48 -3
  54. package/bundles/taiga-ui-core-components-primitive-calendar.umd.js.map +1 -1
  55. package/bundles/taiga-ui-core-components-primitive-calendar.umd.min.js.map +1 -1
  56. package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js +49 -4
  57. package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js.map +1 -1
  58. package/bundles/taiga-ui-core-components-primitive-checkbox.umd.min.js.map +1 -1
  59. package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js +48 -3
  60. package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js.map +1 -1
  61. package/bundles/taiga-ui-core-components-primitive-spin-button.umd.min.js.map +1 -1
  62. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +97 -52
  63. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
  64. package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js.map +1 -1
  65. package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js +48 -3
  66. package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js.map +1 -1
  67. package/bundles/taiga-ui-core-components-primitive-year-picker.umd.min.js.map +1 -1
  68. package/bundles/taiga-ui-core-components-root.umd.js +50 -5
  69. package/bundles/taiga-ui-core-components-root.umd.js.map +1 -1
  70. package/bundles/taiga-ui-core-components-root.umd.min.js.map +1 -1
  71. package/bundles/taiga-ui-core-components-scroll-controls.umd.js +72 -27
  72. package/bundles/taiga-ui-core-components-scroll-controls.umd.js.map +1 -1
  73. package/bundles/taiga-ui-core-components-scroll-controls.umd.min.js.map +1 -1
  74. package/bundles/taiga-ui-core-components-scrollbar.umd.js +54 -9
  75. package/bundles/taiga-ui-core-components-scrollbar.umd.js.map +1 -1
  76. package/bundles/taiga-ui-core-components-scrollbar.umd.min.js.map +1 -1
  77. package/bundles/taiga-ui-core-components-svg.umd.js +61 -16
  78. package/bundles/taiga-ui-core-components-svg.umd.js.map +1 -1
  79. package/bundles/taiga-ui-core-components-svg.umd.min.js.map +1 -1
  80. package/bundles/taiga-ui-core-components-theme-night.umd.js +48 -3
  81. package/bundles/taiga-ui-core-components-theme-night.umd.js.map +1 -1
  82. package/bundles/taiga-ui-core-components-theme-night.umd.min.js.map +1 -1
  83. package/bundles/taiga-ui-core-components-tooltip.umd.js +53 -8
  84. package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
  85. package/bundles/taiga-ui-core-components-tooltip.umd.min.js.map +1 -1
  86. package/bundles/taiga-ui-core-directives-color.umd.js +52 -7
  87. package/bundles/taiga-ui-core-directives-color.umd.js.map +1 -1
  88. package/bundles/taiga-ui-core-directives-color.umd.min.js.map +1 -1
  89. package/bundles/taiga-ui-core-directives-described-by.umd.js +50 -5
  90. package/bundles/taiga-ui-core-directives-described-by.umd.js.map +1 -1
  91. package/bundles/taiga-ui-core-directives-described-by.umd.min.js.map +1 -1
  92. package/bundles/taiga-ui-core-directives-dropdown-controller.umd.js +55 -10
  93. package/bundles/taiga-ui-core-directives-dropdown-controller.umd.js.map +1 -1
  94. package/bundles/taiga-ui-core-directives-dropdown-controller.umd.min.js.map +1 -1
  95. package/bundles/taiga-ui-core-directives-dropdown.umd.js +48 -3
  96. package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
  97. package/bundles/taiga-ui-core-directives-dropdown.umd.min.js.map +1 -1
  98. package/bundles/taiga-ui-core-directives-hint-controller.umd.js +52 -7
  99. package/bundles/taiga-ui-core-directives-hint-controller.umd.js.map +1 -1
  100. package/bundles/taiga-ui-core-directives-hint-controller.umd.min.js.map +1 -1
  101. package/bundles/taiga-ui-core-directives-hint.umd.js +51 -6
  102. package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
  103. package/bundles/taiga-ui-core-directives-hint.umd.min.js.map +1 -1
  104. package/bundles/taiga-ui-core-directives-manual-hint.umd.js +49 -4
  105. package/bundles/taiga-ui-core-directives-manual-hint.umd.js.map +1 -1
  106. package/bundles/taiga-ui-core-directives-manual-hint.umd.min.js.map +1 -1
  107. package/bundles/taiga-ui-core-directives-mask-accessor.umd.js +47 -2
  108. package/bundles/taiga-ui-core-directives-mask-accessor.umd.js.map +1 -1
  109. package/bundles/taiga-ui-core-directives-mask-accessor.umd.min.js.map +1 -1
  110. package/bundles/taiga-ui-core-directives-mode.umd.js +48 -3
  111. package/bundles/taiga-ui-core-directives-mode.umd.js.map +1 -1
  112. package/bundles/taiga-ui-core-directives-mode.umd.min.js.map +1 -1
  113. package/bundles/taiga-ui-core-directives-pointer-hint.umd.js +50 -5
  114. package/bundles/taiga-ui-core-directives-pointer-hint.umd.js.map +1 -1
  115. package/bundles/taiga-ui-core-directives-pointer-hint.umd.min.js.map +1 -1
  116. package/bundles/taiga-ui-core-directives-scroll-into-view.umd.js +47 -2
  117. package/bundles/taiga-ui-core-directives-scroll-into-view.umd.js.map +1 -1
  118. package/bundles/taiga-ui-core-directives-scroll-into-view.umd.min.js.map +1 -1
  119. package/bundles/taiga-ui-core-directives-table-mode.umd.js +48 -3
  120. package/bundles/taiga-ui-core-directives-table-mode.umd.js.map +1 -1
  121. package/bundles/taiga-ui-core-directives-table-mode.umd.min.js.map +1 -1
  122. package/bundles/taiga-ui-core-directives-textfield-controller.umd.js +79 -34
  123. package/bundles/taiga-ui-core-directives-textfield-controller.umd.js.map +1 -1
  124. package/bundles/taiga-ui-core-directives-textfield-controller.umd.min.js.map +1 -1
  125. package/bundles/taiga-ui-core-directives-wrapper.umd.js +55 -10
  126. package/bundles/taiga-ui-core-directives-wrapper.umd.js.map +1 -1
  127. package/bundles/taiga-ui-core-directives-wrapper.umd.min.js.map +1 -1
  128. package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js +47 -2
  129. package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js.map +1 -1
  130. package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.min.js.map +1 -1
  131. package/bundles/taiga-ui-core-internal-svg-defs-host.umd.js +47 -2
  132. package/bundles/taiga-ui-core-internal-svg-defs-host.umd.js.map +1 -1
  133. package/bundles/taiga-ui-core-internal-svg-defs-host.umd.min.js.map +1 -1
  134. package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.js +47 -2
  135. package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.js.map +1 -1
  136. package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.min.js.map +1 -1
  137. package/bundles/taiga-ui-core-pipes-format-date.umd.js +46 -1
  138. package/bundles/taiga-ui-core-pipes-format-date.umd.js.map +1 -1
  139. package/bundles/taiga-ui-core-pipes-format-date.umd.min.js.map +1 -1
  140. package/bundles/taiga-ui-core-pipes-format-number.umd.js +46 -1
  141. package/bundles/taiga-ui-core-pipes-format-number.umd.js.map +1 -1
  142. package/bundles/taiga-ui-core-pipes-format-number.umd.min.js.map +1 -1
  143. package/bundles/taiga-ui-core-pipes-format-phone.umd.js +46 -1
  144. package/bundles/taiga-ui-core-pipes-format-phone.umd.js.map +1 -1
  145. package/bundles/taiga-ui-core-pipes-format-phone.umd.min.js.map +1 -1
  146. package/bundles/taiga-ui-core-pipes-month.umd.js +46 -1
  147. package/bundles/taiga-ui-core-pipes-month.umd.js.map +1 -1
  148. package/bundles/taiga-ui-core-pipes-month.umd.min.js.map +1 -1
  149. package/bundles/taiga-ui-core-pipes-pluralize.umd.js +46 -1
  150. package/bundles/taiga-ui-core-pipes-pluralize.umd.js.map +1 -1
  151. package/bundles/taiga-ui-core-pipes-pluralize.umd.min.js.map +1 -1
  152. package/bundles/taiga-ui-core-services.umd.js +46 -1
  153. package/bundles/taiga-ui-core-services.umd.js.map +1 -1
  154. package/bundles/taiga-ui-core-services.umd.min.js.map +1 -1
  155. package/bundles/taiga-ui-core-tokens.umd.js +46 -1
  156. package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
  157. package/bundles/taiga-ui-core-tokens.umd.min.js.map +1 -1
  158. package/bundles/taiga-ui-core-utils-dom.umd.js +1 -3
  159. package/bundles/taiga-ui-core-utils-dom.umd.js.map +1 -1
  160. package/bundles/taiga-ui-core-utils-dom.umd.min.js +1 -1
  161. package/bundles/taiga-ui-core-utils-dom.umd.min.js.map +1 -1
  162. package/bundles/taiga-ui-core-utils-format.umd.js +46 -1
  163. package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
  164. package/bundles/taiga-ui-core-utils-format.umd.min.js.map +1 -1
  165. package/bundles/taiga-ui-core-utils-mask.umd.js +47 -2
  166. package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
  167. package/bundles/taiga-ui-core-utils-mask.umd.min.js.map +1 -1
  168. package/bundles/taiga-ui-core-utils-polyfills.umd.js.map +1 -1
  169. package/bundles/taiga-ui-core-utils-polyfills.umd.min.js.map +1 -1
  170. package/components/button/button-options.d.ts +3 -3
  171. package/components/button/button.component.d.ts +2 -2
  172. package/components/calendar/calendar.component.d.ts +1 -1
  173. package/components/data-list/option/option.component.d.ts +1 -1
  174. package/components/dropdown-box/dropdown-box.component.d.ts +3 -3
  175. package/components/label/taiga-ui-core-components-label.metadata.json +1 -1
  176. package/components/link/link.component.d.ts +1 -1
  177. package/components/loader/loader.component.d.ts +1 -1
  178. package/components/notification/notification.component.d.ts +1 -1
  179. package/components/primitive-calendar/primitive-calendar.component.d.ts +2 -2
  180. package/components/primitive-textfield/primitive-textfield.component.d.ts +2 -2
  181. package/components/primitive-year-picker/primitive-year-picker.component.d.ts +1 -1
  182. package/components/svg/svg.component.d.ts +1 -1
  183. package/components/svg/taiga-ui-core-components-svg.metadata.json +1 -1
  184. package/constants/version.d.ts +1 -1
  185. package/directives/dropdown-controller/taiga-ui-core-directives-dropdown-controller.metadata.json +1 -1
  186. package/directives/textfield-controller/textfield-size.directive.d.ts +1 -1
  187. package/directives/textfield-controller/textfield.controller.d.ts +1 -1
  188. package/esm2015/abstract/abstract-dropdown.js +1 -1
  189. package/esm2015/abstract/abstract-textfield-host.js +7 -3
  190. package/esm2015/components/alert/alert.component.js +10 -10
  191. package/esm2015/components/button/button-options.js +1 -1
  192. package/esm2015/components/button/button.component.js +15 -15
  193. package/esm2015/components/calendar/calendar.component.js +2 -2
  194. package/esm2015/components/data-list/data-list-dropdown-manager.directive.js +9 -10
  195. package/esm2015/components/data-list/data-list.component.js +12 -12
  196. package/esm2015/components/data-list/data-list.directive.js +2 -2
  197. package/esm2015/components/data-list/opt-group.directive.js +5 -5
  198. package/esm2015/components/data-list/option/option.component.js +13 -13
  199. package/esm2015/components/dialog/dialog.component.js +12 -12
  200. package/esm2015/components/dialog/dialog.directive.js +4 -4
  201. package/esm2015/components/dropdown-box/dropdown-box.component.js +39 -39
  202. package/esm2015/components/error/error.component.js +5 -5
  203. package/esm2015/components/expand/expand-content.directive.js +2 -2
  204. package/esm2015/components/expand/expand.component.js +12 -12
  205. package/esm2015/components/group/group-styles.component.js +2 -2
  206. package/esm2015/components/group/group.component.js +4 -4
  207. package/esm2015/components/group/group.directive.js +15 -15
  208. package/esm2015/components/hints-host/hint-box/hint-box.component.js +46 -46
  209. package/esm2015/components/hints-host/hints-host.component.js +3 -3
  210. package/esm2015/components/hosted-dropdown/hosted-dropdown-connector.directive.js +2 -2
  211. package/esm2015/components/hosted-dropdown/hosted-dropdown.component.js +10 -10
  212. package/esm2015/components/label/label.component.js +6 -6
  213. package/esm2015/components/link/link.component.js +12 -12
  214. package/esm2015/components/loader/loader.component.js +3 -3
  215. package/esm2015/components/notification/notification.component.js +9 -9
  216. package/esm2015/components/primitive-calendar/primitive-calendar.component.js +3 -3
  217. package/esm2015/components/primitive-checkbox/primitive-checkbox.component.js +4 -4
  218. package/esm2015/components/primitive-spin-button/primitive-spin-button.component.js +3 -3
  219. package/esm2015/components/primitive-textfield/primitive-textfield.component.js +28 -28
  220. package/esm2015/components/primitive-textfield/primitive-textfield.directive.js +2 -2
  221. package/esm2015/components/primitive-textfield/textfield/textfield.component.js +13 -13
  222. package/esm2015/components/primitive-textfield/value-decoration/value-decoration.component.js +12 -12
  223. package/esm2015/components/primitive-year-picker/primitive-year-picker.component.js +3 -3
  224. package/esm2015/components/root/root.component.js +5 -5
  225. package/esm2015/components/scroll-controls/scroll-controls.component.js +4 -4
  226. package/esm2015/components/scroll-controls/scrollbar-wrapper.directive.js +2 -2
  227. package/esm2015/components/scroll-controls/scrollbar.directive.js +23 -23
  228. package/esm2015/components/scrollbar/scroll-ref.directive.js +2 -2
  229. package/esm2015/components/scrollbar/scrollable.directive.js +2 -2
  230. package/esm2015/components/scrollbar/scrollbar.component.js +7 -7
  231. package/esm2015/components/svg/svg.component.js +16 -16
  232. package/esm2015/components/theme-night/theme-night.component.js +3 -3
  233. package/esm2015/components/tooltip/tooltip.component.js +8 -8
  234. package/esm2015/directives/color/color.directive.js +7 -7
  235. package/esm2015/directives/described-by/described-by.directive.js +5 -5
  236. package/esm2015/directives/dropdown/dropdown.directive.js +3 -3
  237. package/esm2015/directives/dropdown-controller/dropdown-controller.directive.js +10 -10
  238. package/esm2015/directives/hint/hint.directive.js +6 -6
  239. package/esm2015/directives/hint-controller/hint-controller.directive.js +7 -7
  240. package/esm2015/directives/manual-hint/manual-hint.directive.js +4 -4
  241. package/esm2015/directives/mask-accessor/mask-accessor.directive.js +2 -2
  242. package/esm2015/directives/mode/mode.directive.js +3 -3
  243. package/esm2015/directives/pointer-hint/pointer-hint.directive.js +5 -5
  244. package/esm2015/directives/scroll-into-view/scroll-into-view.directive.js +2 -2
  245. package/esm2015/directives/table-mode/table-mode.directive.js +3 -3
  246. package/esm2015/directives/textfield-controller/textfield-autocomplete.directive.js +5 -5
  247. package/esm2015/directives/textfield-controller/textfield-cleaner.directive.js +4 -4
  248. package/esm2015/directives/textfield-controller/textfield-custom-content.directive.js +5 -5
  249. package/esm2015/directives/textfield-controller/textfield-example-text.directive.js +5 -5
  250. package/esm2015/directives/textfield-controller/textfield-input-mode.directive.js +5 -5
  251. package/esm2015/directives/textfield-controller/textfield-label-outside.directive.js +4 -4
  252. package/esm2015/directives/textfield-controller/textfield-max-length.directive.js +4 -4
  253. package/esm2015/directives/textfield-controller/textfield-size.directive.js +5 -5
  254. package/esm2015/directives/textfield-controller/textfield-type.directive.js +5 -5
  255. package/esm2015/directives/textfield-controller/textfield.controller.js +1 -1
  256. package/esm2015/directives/wrapper/wrapper.directive.js +10 -10
  257. package/esm2015/interfaces/alert-options.js +1 -1
  258. package/esm2015/interfaces/dropdown-directive.js +1 -1
  259. package/esm2015/interfaces/hint.js +1 -1
  260. package/esm2015/interfaces/notification-options.js +1 -1
  261. package/esm2015/interfaces/number-format-settings.js +1 -1
  262. package/esm2015/internal/primitive-year-month-pagination/primitive-year-month-pagination.component.js +2 -2
  263. package/esm2015/internal/svg-defs-host/svg-defs-host.component.js +2 -2
  264. package/esm2015/mask/text-mask-list.js +1 -1
  265. package/esm2015/mask/text-mask-pipe-handler.js +1 -1
  266. package/esm2015/pipes/calendar-sheet/utils.js +2 -2
  267. package/esm2015/pipes/format-date/format-date.pipe.js +1 -1
  268. package/esm2015/types/brightness.js +1 -1
  269. package/esm2015/types/decimal-symbol.js +1 -1
  270. package/esm2015/types/decimal.js +1 -1
  271. package/esm2015/types/dialog-size.js +1 -1
  272. package/esm2015/types/direction.js +1 -1
  273. package/esm2015/types/dropdown-width.js +1 -1
  274. package/esm2015/types/marker-handler.js +1 -1
  275. package/esm2015/types/option-role.js +1 -1
  276. package/esm2015/types/orientation.js +1 -1
  277. package/esm2015/types/size.js +1 -1
  278. package/esm2015/utils/dom/get-safe-area-size.js +1 -1
  279. package/esm2015/utils/dom/process-icon.js +2 -4
  280. package/esm2015/utils/mask/create-number-mask.js +2 -2
  281. package/esm2015/utils/polyfills/inner-html.js +3 -3
  282. package/esm5/abstract/abstract-dropdown.js +1 -1
  283. package/esm5/abstract/abstract-textfield-host.js +4 -2
  284. package/esm5/components/alert/alert.component.js +10 -10
  285. package/esm5/components/button/button-options.js +1 -1
  286. package/esm5/components/button/button.component.js +15 -15
  287. package/esm5/components/calendar/calendar.component.js +2 -2
  288. package/esm5/components/data-list/data-list-dropdown-manager.directive.js +10 -11
  289. package/esm5/components/data-list/data-list.component.js +12 -12
  290. package/esm5/components/data-list/data-list.directive.js +2 -2
  291. package/esm5/components/data-list/opt-group.directive.js +5 -5
  292. package/esm5/components/data-list/option/option.component.js +13 -13
  293. package/esm5/components/dialog/dialog.component.js +12 -12
  294. package/esm5/components/dialog/dialog.directive.js +4 -4
  295. package/esm5/components/dropdown-box/dropdown-box.component.js +39 -39
  296. package/esm5/components/error/error.component.js +5 -5
  297. package/esm5/components/expand/expand-content.directive.js +2 -2
  298. package/esm5/components/expand/expand.component.js +12 -12
  299. package/esm5/components/group/group-styles.component.js +2 -2
  300. package/esm5/components/group/group.component.js +4 -4
  301. package/esm5/components/group/group.directive.js +15 -15
  302. package/esm5/components/hints-host/hint-box/hint-box.component.js +46 -46
  303. package/esm5/components/hints-host/hints-host.component.js +3 -3
  304. package/esm5/components/hosted-dropdown/hosted-dropdown-connector.directive.js +2 -2
  305. package/esm5/components/hosted-dropdown/hosted-dropdown.component.js +10 -10
  306. package/esm5/components/label/label.component.js +6 -6
  307. package/esm5/components/link/link.component.js +12 -12
  308. package/esm5/components/loader/loader.component.js +3 -3
  309. package/esm5/components/notification/notification.component.js +9 -9
  310. package/esm5/components/primitive-calendar/primitive-calendar.component.js +3 -3
  311. package/esm5/components/primitive-checkbox/primitive-checkbox.component.js +4 -4
  312. package/esm5/components/primitive-spin-button/primitive-spin-button.component.js +3 -3
  313. package/esm5/components/primitive-textfield/primitive-textfield.component.js +28 -28
  314. package/esm5/components/primitive-textfield/primitive-textfield.directive.js +2 -2
  315. package/esm5/components/primitive-textfield/textfield/textfield.component.js +13 -13
  316. package/esm5/components/primitive-textfield/value-decoration/value-decoration.component.js +12 -12
  317. package/esm5/components/primitive-year-picker/primitive-year-picker.component.js +3 -3
  318. package/esm5/components/root/root.component.js +5 -5
  319. package/esm5/components/scroll-controls/scroll-controls.component.js +4 -4
  320. package/esm5/components/scroll-controls/scrollbar-wrapper.directive.js +2 -2
  321. package/esm5/components/scroll-controls/scrollbar.directive.js +23 -23
  322. package/esm5/components/scrollbar/scroll-ref.directive.js +2 -2
  323. package/esm5/components/scrollbar/scrollable.directive.js +2 -2
  324. package/esm5/components/scrollbar/scrollbar.component.js +7 -7
  325. package/esm5/components/svg/svg.component.js +16 -16
  326. package/esm5/components/theme-night/theme-night.component.js +3 -3
  327. package/esm5/components/tooltip/tooltip.component.js +8 -8
  328. package/esm5/directives/color/color.directive.js +7 -7
  329. package/esm5/directives/described-by/described-by.directive.js +5 -5
  330. package/esm5/directives/dropdown/dropdown.directive.js +3 -3
  331. package/esm5/directives/dropdown-controller/dropdown-controller.directive.js +10 -10
  332. package/esm5/directives/hint/hint.directive.js +6 -6
  333. package/esm5/directives/hint-controller/hint-controller.directive.js +7 -7
  334. package/esm5/directives/manual-hint/manual-hint.directive.js +4 -4
  335. package/esm5/directives/mask-accessor/mask-accessor.directive.js +2 -2
  336. package/esm5/directives/mode/mode.directive.js +3 -3
  337. package/esm5/directives/pointer-hint/pointer-hint.directive.js +5 -5
  338. package/esm5/directives/scroll-into-view/scroll-into-view.directive.js +2 -2
  339. package/esm5/directives/table-mode/table-mode.directive.js +3 -3
  340. package/esm5/directives/textfield-controller/textfield-autocomplete.directive.js +5 -5
  341. package/esm5/directives/textfield-controller/textfield-cleaner.directive.js +4 -4
  342. package/esm5/directives/textfield-controller/textfield-custom-content.directive.js +5 -5
  343. package/esm5/directives/textfield-controller/textfield-example-text.directive.js +5 -5
  344. package/esm5/directives/textfield-controller/textfield-input-mode.directive.js +5 -5
  345. package/esm5/directives/textfield-controller/textfield-label-outside.directive.js +4 -4
  346. package/esm5/directives/textfield-controller/textfield-max-length.directive.js +4 -4
  347. package/esm5/directives/textfield-controller/textfield-size.directive.js +5 -5
  348. package/esm5/directives/textfield-controller/textfield-type.directive.js +5 -5
  349. package/esm5/directives/textfield-controller/textfield.controller.js +1 -1
  350. package/esm5/directives/wrapper/wrapper.directive.js +10 -10
  351. package/esm5/interfaces/alert-options.js +1 -1
  352. package/esm5/interfaces/dropdown-directive.js +1 -1
  353. package/esm5/interfaces/hint.js +1 -1
  354. package/esm5/interfaces/notification-options.js +1 -1
  355. package/esm5/interfaces/number-format-settings.js +1 -1
  356. package/esm5/internal/primitive-year-month-pagination/primitive-year-month-pagination.component.js +2 -2
  357. package/esm5/internal/svg-defs-host/svg-defs-host.component.js +2 -2
  358. package/esm5/mask/text-mask-list.js +1 -1
  359. package/esm5/mask/text-mask-pipe-handler.js +1 -1
  360. package/esm5/pipes/calendar-sheet/utils.js +2 -2
  361. package/esm5/pipes/format-date/format-date.pipe.js +1 -1
  362. package/esm5/types/brightness.js +1 -1
  363. package/esm5/types/decimal-symbol.js +1 -1
  364. package/esm5/types/decimal.js +1 -1
  365. package/esm5/types/dialog-size.js +1 -1
  366. package/esm5/types/direction.js +1 -1
  367. package/esm5/types/dropdown-width.js +1 -1
  368. package/esm5/types/marker-handler.js +1 -1
  369. package/esm5/types/option-role.js +1 -1
  370. package/esm5/types/orientation.js +1 -1
  371. package/esm5/types/size.js +1 -1
  372. package/esm5/utils/dom/get-safe-area-size.js +1 -1
  373. package/esm5/utils/dom/process-icon.js +2 -4
  374. package/esm5/utils/mask/create-number-mask.js +2 -2
  375. package/esm5/utils/polyfills/inner-html.js +1 -1
  376. package/fesm2015/taiga-ui-core-abstract.js +6 -2
  377. package/fesm2015/taiga-ui-core-abstract.js.map +1 -1
  378. package/fesm2015/taiga-ui-core-components-alert.js +9 -9
  379. package/fesm2015/taiga-ui-core-components-alert.js.map +1 -1
  380. package/fesm2015/taiga-ui-core-components-button.js +14 -14
  381. package/fesm2015/taiga-ui-core-components-button.js.map +1 -1
  382. package/fesm2015/taiga-ui-core-components-calendar.js +1 -1
  383. package/fesm2015/taiga-ui-core-components-calendar.js.map +1 -1
  384. package/fesm2015/taiga-ui-core-components-data-list.js +36 -37
  385. package/fesm2015/taiga-ui-core-components-data-list.js.map +1 -1
  386. package/fesm2015/taiga-ui-core-components-dialog.js +14 -14
  387. package/fesm2015/taiga-ui-core-components-dialog.js.map +1 -1
  388. package/fesm2015/taiga-ui-core-components-dropdown-box.js +38 -38
  389. package/fesm2015/taiga-ui-core-components-dropdown-box.js.map +1 -1
  390. package/fesm2015/taiga-ui-core-components-error.js +4 -4
  391. package/fesm2015/taiga-ui-core-components-error.js.map +1 -1
  392. package/fesm2015/taiga-ui-core-components-expand.js +12 -12
  393. package/fesm2015/taiga-ui-core-components-expand.js.map +1 -1
  394. package/fesm2015/taiga-ui-core-components-group.js +18 -18
  395. package/fesm2015/taiga-ui-core-components-group.js.map +1 -1
  396. package/fesm2015/taiga-ui-core-components-hints-host.js +47 -47
  397. package/fesm2015/taiga-ui-core-components-hints-host.js.map +1 -1
  398. package/fesm2015/taiga-ui-core-components-hosted-dropdown.js +10 -10
  399. package/fesm2015/taiga-ui-core-components-hosted-dropdown.js.map +1 -1
  400. package/fesm2015/taiga-ui-core-components-label.js +5 -5
  401. package/fesm2015/taiga-ui-core-components-label.js.map +1 -1
  402. package/fesm2015/taiga-ui-core-components-link.js +11 -11
  403. package/fesm2015/taiga-ui-core-components-link.js.map +1 -1
  404. package/fesm2015/taiga-ui-core-components-loader.js +2 -2
  405. package/fesm2015/taiga-ui-core-components-loader.js.map +1 -1
  406. package/fesm2015/taiga-ui-core-components-notification.js +8 -8
  407. package/fesm2015/taiga-ui-core-components-notification.js.map +1 -1
  408. package/fesm2015/taiga-ui-core-components-primitive-calendar.js +2 -2
  409. package/fesm2015/taiga-ui-core-components-primitive-calendar.js.map +1 -1
  410. package/fesm2015/taiga-ui-core-components-primitive-checkbox.js +3 -3
  411. package/fesm2015/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
  412. package/fesm2015/taiga-ui-core-components-primitive-spin-button.js +2 -2
  413. package/fesm2015/taiga-ui-core-components-primitive-spin-button.js.map +1 -1
  414. package/fesm2015/taiga-ui-core-components-primitive-textfield.js +51 -51
  415. package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
  416. package/fesm2015/taiga-ui-core-components-primitive-year-picker.js +2 -2
  417. package/fesm2015/taiga-ui-core-components-primitive-year-picker.js.map +1 -1
  418. package/fesm2015/taiga-ui-core-components-root.js +4 -4
  419. package/fesm2015/taiga-ui-core-components-root.js.map +1 -1
  420. package/fesm2015/taiga-ui-core-components-scroll-controls.js +26 -26
  421. package/fesm2015/taiga-ui-core-components-scroll-controls.js.map +1 -1
  422. package/fesm2015/taiga-ui-core-components-scrollbar.js +8 -8
  423. package/fesm2015/taiga-ui-core-components-scrollbar.js.map +1 -1
  424. package/fesm2015/taiga-ui-core-components-svg.js +15 -15
  425. package/fesm2015/taiga-ui-core-components-svg.js.map +1 -1
  426. package/fesm2015/taiga-ui-core-components-theme-night.js +2 -2
  427. package/fesm2015/taiga-ui-core-components-theme-night.js.map +1 -1
  428. package/fesm2015/taiga-ui-core-components-tooltip.js +7 -7
  429. package/fesm2015/taiga-ui-core-components-tooltip.js.map +1 -1
  430. package/fesm2015/taiga-ui-core-directives-color.js +6 -6
  431. package/fesm2015/taiga-ui-core-directives-color.js.map +1 -1
  432. package/fesm2015/taiga-ui-core-directives-described-by.js +4 -4
  433. package/fesm2015/taiga-ui-core-directives-described-by.js.map +1 -1
  434. package/fesm2015/taiga-ui-core-directives-dropdown-controller.js +9 -9
  435. package/fesm2015/taiga-ui-core-directives-dropdown-controller.js.map +1 -1
  436. package/fesm2015/taiga-ui-core-directives-dropdown.js +2 -2
  437. package/fesm2015/taiga-ui-core-directives-dropdown.js.map +1 -1
  438. package/fesm2015/taiga-ui-core-directives-hint-controller.js +6 -6
  439. package/fesm2015/taiga-ui-core-directives-hint-controller.js.map +1 -1
  440. package/fesm2015/taiga-ui-core-directives-hint.js +5 -5
  441. package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
  442. package/fesm2015/taiga-ui-core-directives-manual-hint.js +3 -3
  443. package/fesm2015/taiga-ui-core-directives-manual-hint.js.map +1 -1
  444. package/fesm2015/taiga-ui-core-directives-mask-accessor.js +1 -1
  445. package/fesm2015/taiga-ui-core-directives-mask-accessor.js.map +1 -1
  446. package/fesm2015/taiga-ui-core-directives-mode.js +2 -2
  447. package/fesm2015/taiga-ui-core-directives-mode.js.map +1 -1
  448. package/fesm2015/taiga-ui-core-directives-pointer-hint.js +4 -4
  449. package/fesm2015/taiga-ui-core-directives-pointer-hint.js.map +1 -1
  450. package/fesm2015/taiga-ui-core-directives-scroll-into-view.js +1 -1
  451. package/fesm2015/taiga-ui-core-directives-scroll-into-view.js.map +1 -1
  452. package/fesm2015/taiga-ui-core-directives-table-mode.js +2 -2
  453. package/fesm2015/taiga-ui-core-directives-table-mode.js.map +1 -1
  454. package/fesm2015/taiga-ui-core-directives-textfield-controller.js +33 -33
  455. package/fesm2015/taiga-ui-core-directives-textfield-controller.js.map +1 -1
  456. package/fesm2015/taiga-ui-core-directives-wrapper.js +9 -9
  457. package/fesm2015/taiga-ui-core-directives-wrapper.js.map +1 -1
  458. package/fesm2015/taiga-ui-core-internal-primitive-year-month-pagination.js +1 -1
  459. package/fesm2015/taiga-ui-core-internal-primitive-year-month-pagination.js.map +1 -1
  460. package/fesm2015/taiga-ui-core-internal-svg-defs-host.js +1 -1
  461. package/fesm2015/taiga-ui-core-internal-svg-defs-host.js.map +1 -1
  462. package/fesm2015/taiga-ui-core-pipes-calendar-sheet.js +1 -1
  463. package/fesm2015/taiga-ui-core-pipes-calendar-sheet.js.map +1 -1
  464. package/fesm2015/taiga-ui-core-pipes-format-date.js.map +1 -1
  465. package/fesm2015/taiga-ui-core-utils-dom.js +1 -3
  466. package/fesm2015/taiga-ui-core-utils-dom.js.map +1 -1
  467. package/fesm2015/taiga-ui-core-utils-mask.js +1 -1
  468. package/fesm2015/taiga-ui-core-utils-mask.js.map +1 -1
  469. package/fesm2015/taiga-ui-core-utils-polyfills.js +2 -2
  470. package/fesm2015/taiga-ui-core-utils-polyfills.js.map +1 -1
  471. package/fesm5/taiga-ui-core-abstract.js +3 -1
  472. package/fesm5/taiga-ui-core-abstract.js.map +1 -1
  473. package/fesm5/taiga-ui-core-components-alert.js +9 -9
  474. package/fesm5/taiga-ui-core-components-alert.js.map +1 -1
  475. package/fesm5/taiga-ui-core-components-button.js +14 -14
  476. package/fesm5/taiga-ui-core-components-button.js.map +1 -1
  477. package/fesm5/taiga-ui-core-components-calendar.js +1 -1
  478. package/fesm5/taiga-ui-core-components-calendar.js.map +1 -1
  479. package/fesm5/taiga-ui-core-components-data-list.js +37 -38
  480. package/fesm5/taiga-ui-core-components-data-list.js.map +1 -1
  481. package/fesm5/taiga-ui-core-components-dialog.js +14 -14
  482. package/fesm5/taiga-ui-core-components-dialog.js.map +1 -1
  483. package/fesm5/taiga-ui-core-components-dropdown-box.js +38 -38
  484. package/fesm5/taiga-ui-core-components-dropdown-box.js.map +1 -1
  485. package/fesm5/taiga-ui-core-components-error.js +4 -4
  486. package/fesm5/taiga-ui-core-components-error.js.map +1 -1
  487. package/fesm5/taiga-ui-core-components-expand.js +12 -12
  488. package/fesm5/taiga-ui-core-components-expand.js.map +1 -1
  489. package/fesm5/taiga-ui-core-components-group.js +18 -18
  490. package/fesm5/taiga-ui-core-components-group.js.map +1 -1
  491. package/fesm5/taiga-ui-core-components-hints-host.js +47 -47
  492. package/fesm5/taiga-ui-core-components-hints-host.js.map +1 -1
  493. package/fesm5/taiga-ui-core-components-hosted-dropdown.js +10 -10
  494. package/fesm5/taiga-ui-core-components-hosted-dropdown.js.map +1 -1
  495. package/fesm5/taiga-ui-core-components-label.js +5 -5
  496. package/fesm5/taiga-ui-core-components-label.js.map +1 -1
  497. package/fesm5/taiga-ui-core-components-link.js +11 -11
  498. package/fesm5/taiga-ui-core-components-link.js.map +1 -1
  499. package/fesm5/taiga-ui-core-components-loader.js +2 -2
  500. package/fesm5/taiga-ui-core-components-loader.js.map +1 -1
  501. package/fesm5/taiga-ui-core-components-notification.js +8 -8
  502. package/fesm5/taiga-ui-core-components-notification.js.map +1 -1
  503. package/fesm5/taiga-ui-core-components-primitive-calendar.js +2 -2
  504. package/fesm5/taiga-ui-core-components-primitive-calendar.js.map +1 -1
  505. package/fesm5/taiga-ui-core-components-primitive-checkbox.js +3 -3
  506. package/fesm5/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
  507. package/fesm5/taiga-ui-core-components-primitive-spin-button.js +2 -2
  508. package/fesm5/taiga-ui-core-components-primitive-spin-button.js.map +1 -1
  509. package/fesm5/taiga-ui-core-components-primitive-textfield.js +51 -51
  510. package/fesm5/taiga-ui-core-components-primitive-textfield.js.map +1 -1
  511. package/fesm5/taiga-ui-core-components-primitive-year-picker.js +2 -2
  512. package/fesm5/taiga-ui-core-components-primitive-year-picker.js.map +1 -1
  513. package/fesm5/taiga-ui-core-components-root.js +4 -4
  514. package/fesm5/taiga-ui-core-components-root.js.map +1 -1
  515. package/fesm5/taiga-ui-core-components-scroll-controls.js +26 -26
  516. package/fesm5/taiga-ui-core-components-scroll-controls.js.map +1 -1
  517. package/fesm5/taiga-ui-core-components-scrollbar.js +8 -8
  518. package/fesm5/taiga-ui-core-components-scrollbar.js.map +1 -1
  519. package/fesm5/taiga-ui-core-components-svg.js +15 -15
  520. package/fesm5/taiga-ui-core-components-svg.js.map +1 -1
  521. package/fesm5/taiga-ui-core-components-theme-night.js +2 -2
  522. package/fesm5/taiga-ui-core-components-theme-night.js.map +1 -1
  523. package/fesm5/taiga-ui-core-components-tooltip.js +7 -7
  524. package/fesm5/taiga-ui-core-components-tooltip.js.map +1 -1
  525. package/fesm5/taiga-ui-core-directives-color.js +6 -6
  526. package/fesm5/taiga-ui-core-directives-color.js.map +1 -1
  527. package/fesm5/taiga-ui-core-directives-described-by.js +4 -4
  528. package/fesm5/taiga-ui-core-directives-described-by.js.map +1 -1
  529. package/fesm5/taiga-ui-core-directives-dropdown-controller.js +9 -9
  530. package/fesm5/taiga-ui-core-directives-dropdown-controller.js.map +1 -1
  531. package/fesm5/taiga-ui-core-directives-dropdown.js +2 -2
  532. package/fesm5/taiga-ui-core-directives-dropdown.js.map +1 -1
  533. package/fesm5/taiga-ui-core-directives-hint-controller.js +6 -6
  534. package/fesm5/taiga-ui-core-directives-hint-controller.js.map +1 -1
  535. package/fesm5/taiga-ui-core-directives-hint.js +5 -5
  536. package/fesm5/taiga-ui-core-directives-hint.js.map +1 -1
  537. package/fesm5/taiga-ui-core-directives-manual-hint.js +3 -3
  538. package/fesm5/taiga-ui-core-directives-manual-hint.js.map +1 -1
  539. package/fesm5/taiga-ui-core-directives-mask-accessor.js +1 -1
  540. package/fesm5/taiga-ui-core-directives-mask-accessor.js.map +1 -1
  541. package/fesm5/taiga-ui-core-directives-mode.js +2 -2
  542. package/fesm5/taiga-ui-core-directives-mode.js.map +1 -1
  543. package/fesm5/taiga-ui-core-directives-pointer-hint.js +4 -4
  544. package/fesm5/taiga-ui-core-directives-pointer-hint.js.map +1 -1
  545. package/fesm5/taiga-ui-core-directives-scroll-into-view.js +1 -1
  546. package/fesm5/taiga-ui-core-directives-scroll-into-view.js.map +1 -1
  547. package/fesm5/taiga-ui-core-directives-table-mode.js +2 -2
  548. package/fesm5/taiga-ui-core-directives-table-mode.js.map +1 -1
  549. package/fesm5/taiga-ui-core-directives-textfield-controller.js +33 -33
  550. package/fesm5/taiga-ui-core-directives-textfield-controller.js.map +1 -1
  551. package/fesm5/taiga-ui-core-directives-wrapper.js +9 -9
  552. package/fesm5/taiga-ui-core-directives-wrapper.js.map +1 -1
  553. package/fesm5/taiga-ui-core-internal-primitive-year-month-pagination.js +1 -1
  554. package/fesm5/taiga-ui-core-internal-primitive-year-month-pagination.js.map +1 -1
  555. package/fesm5/taiga-ui-core-internal-svg-defs-host.js +1 -1
  556. package/fesm5/taiga-ui-core-internal-svg-defs-host.js.map +1 -1
  557. package/fesm5/taiga-ui-core-pipes-calendar-sheet.js +1 -1
  558. package/fesm5/taiga-ui-core-pipes-calendar-sheet.js.map +1 -1
  559. package/fesm5/taiga-ui-core-pipes-format-date.js.map +1 -1
  560. package/fesm5/taiga-ui-core-utils-dom.js +1 -3
  561. package/fesm5/taiga-ui-core-utils-dom.js.map +1 -1
  562. package/fesm5/taiga-ui-core-utils-mask.js +1 -1
  563. package/fesm5/taiga-ui-core-utils-mask.js.map +1 -1
  564. package/fesm5/taiga-ui-core-utils-polyfills.js.map +1 -1
  565. package/interfaces/alert-options.d.ts +1 -1
  566. package/interfaces/dropdown-directive.d.ts +2 -2
  567. package/interfaces/hint.d.ts +1 -1
  568. package/interfaces/notification-options.d.ts +1 -1
  569. package/interfaces/number-format-settings.d.ts +1 -2
  570. package/mask/text-mask-list.d.ts +1 -1
  571. package/mask/text-mask-pipe-handler.d.ts +1 -1
  572. package/package.json +4 -4
  573. package/pipes/format-date/format-date.pipe.d.ts +1 -1
  574. package/tokens/dropdown-directive.d.ts +1 -1
  575. package/types/brightness.d.ts +1 -1
  576. package/types/decimal-symbol.d.ts +1 -1
  577. package/types/decimal.d.ts +1 -1
  578. package/types/dialog-size.d.ts +1 -1
  579. package/types/direction.d.ts +2 -2
  580. package/types/dropdown-width.d.ts +1 -1
  581. package/types/marker-handler.d.ts +1 -1
  582. package/types/option-role.d.ts +1 -1
  583. package/types/orientation.d.ts +1 -1
  584. package/types/size.d.ts +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-data-list.js","sources":["ng://@taiga-ui/core/components/data-list/option/option.component.ts","ng://@taiga-ui/core/components/data-list/data-list.component.ts","ng://@taiga-ui/core/components/data-list/data-list.directive.ts","ng://@taiga-ui/core/components/data-list/data-list-dropdown-manager.directive.ts","ng://@taiga-ui/core/components/data-list/opt-group.directive.ts","ng://@taiga-ui/core/components/data-list/data-list.module.ts","ng://@taiga-ui/core/components/data-list/taiga-ui-core-components-data-list.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n OnDestroy,\n Optional,\n Self,\n TemplateRef,\n} from '@angular/core';\nimport {\n isNativeFocused,\n setNativeFocused,\n TuiContextWithImplicit,\n tuiDefaultProp,\n TuiEventWith,\n} from '@taiga-ui/cdk';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {TuiDataListHost} from '@taiga-ui/core/interfaces';\nimport {TUI_DATA_LIST_HOST, TUI_OPTION_CONTENT} from '@taiga-ui/core/tokens';\nimport {TuiOptionRole, TuiSizeL, TuiSizeXS} from '@taiga-ui/core/types';\nimport {shouldCall} from '@tinkoff/ng-event-plugins';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDataListComponent} from '../data-list.component';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function shouldFocus({\n currentTarget,\n}: TuiEventWith<MouseEvent, HTMLElement>): boolean {\n return !isNativeFocused(currentTarget);\n}\n\n// TODO: Consider all use cases for aria roles\n@Component({\n selector: `button[tuiOption], a[tuiOption]`,\n templateUrl: `./option.template.html`,\n styleUrls: [`./option.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n tabIndex: `-1`,\n type: `button`,\n '[attr.disabled]': `disabled || null`,\n },\n})\nexport class TuiOptionComponent<T = unknown> implements OnDestroy {\n @Input()\n @HostBinding(`attr.data-size`)\n @tuiDefaultProp()\n size: TuiSizeXS | TuiSizeL = `m`;\n\n @Input()\n @HostBinding(`attr.role`)\n @tuiDefaultProp()\n role: TuiOptionRole = `option`;\n\n @Input()\n @tuiDefaultProp()\n disabled = false;\n\n @Input()\n value?: T;\n\n // TODO: 3.0 Fix dataList type when updated to Ivy and compilation drops metadata\n constructor(\n @Optional()\n @Inject(TUI_OPTION_CONTENT)\n readonly content: PolymorpheusContent<\n TuiContextWithImplicit<TemplateRef<Record<string, unknown>>>\n > | null,\n @Inject(forwardRef(() => TuiDataListComponent))\n private readonly dataList: TuiDataListComponent<T>,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Optional()\n @Inject(TUI_DATA_LIST_HOST)\n private readonly host: TuiDataListHost<T> | null,\n @Optional()\n @Self()\n @Inject(TuiDropdownDirective)\n readonly dropdown: TuiDropdownDirective | null,\n ) {}\n\n @HostBinding(`class._with-dropdown`)\n get active(): boolean {\n return !!this.dropdown && !!this.dropdown.dropdownBoxRef;\n }\n\n @HostListener(`click`)\n onClick(): void {\n if (this.host && this.value !== undefined) {\n this.host.handleOption(this.value);\n }\n }\n\n // @bad TODO: Consider aria-activedescendant for proper accessibility implementation\n @shouldCall(shouldFocus)\n @HostListener(`mousemove.init`, [`$event`])\n @HostListener(`mousemove.silent`, [`$event`])\n onMouseMove({currentTarget}: TuiEventWith<MouseEvent, HTMLElement>): void {\n setNativeFocused(currentTarget, true, true);\n }\n\n // Preventing focus loss upon focused option removal\n ngOnDestroy(): void {\n this.dataList.handleFocusLossIfNecessary(this.elementRef.nativeElement);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n forwardRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n QueryList,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n EMPTY_QUERY,\n isNativeFocusedIn,\n isPresent,\n itemsQueryListObservable,\n moveFocus,\n setNativeMouseFocused,\n tuiAssertIsHTMLElement,\n tuiDefaultProp,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {TuiDataListAccessor} from '@taiga-ui/core/interfaces';\nimport {TUI_DATA_LIST_ACCESSOR, TUI_NOTHING_FOUND_MESSAGE} from '@taiga-ui/core/tokens';\nimport {TuiDataListRole} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {TuiOptionComponent} from './option/option.component';\n\n// TODO: Consider aria-activedescendant for proper accessibility implementation\n// @dynamic\n@Component({\n selector: `tui-data-list`,\n templateUrl: `./data-list.template.html`,\n styleUrls: [`./data-list.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: TUI_DATA_LIST_ACCESSOR,\n useExisting: forwardRef(() => TuiDataListComponent),\n },\n ],\n})\nexport class TuiDataListComponent<T> implements TuiDataListAccessor<T> {\n @ContentChildren(forwardRef(() => TuiOptionComponent), {descendants: true})\n private readonly options: QueryList<TuiOptionComponent<T>> = EMPTY_QUERY;\n\n private origin?: HTMLElement;\n\n @Input()\n @HostBinding(`attr.role`)\n @tuiDefaultProp()\n role: TuiDataListRole = `listbox`;\n\n @Input()\n @tuiDefaultProp()\n emptyContent: PolymorpheusContent = ``;\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TUI_NOTHING_FOUND_MESSAGE)\n readonly defaultEmptyContent$: Observable<string>,\n ) {}\n\n @tuiPure\n get empty$(): Observable<boolean> {\n return itemsQueryListObservable(this.options).pipe(map(({length}) => !length));\n }\n\n @HostListener(`focusin`, [`$event.relatedTarget`, `$event.currentTarget`])\n onFocusIn(relatedTarget: HTMLElement, currentTarget: HTMLElement): void {\n if (!currentTarget.contains(relatedTarget) && !this.origin) {\n this.origin = relatedTarget;\n }\n }\n\n @HostListener(`mousedown.prevent`)\n noop(): void {}\n\n @HostListener(`keydown.arrowDown.prevent`, [`$event.target`, `1`])\n @HostListener(`keydown.arrowUp.prevent`, [`$event.target`, `-1`])\n onKeyDownArrow(current: HTMLElement, step: number): void {\n const {elements} = this;\n\n moveFocus(elements.indexOf(current), elements, step);\n }\n\n // TODO: Consider aria-activedescendant for proper accessibility implementation\n @HostListener(`wheel.silent.passive`)\n @HostListener(`mouseleave`, [`$event.target`])\n handleFocusLossIfNecessary(\n element: HTMLElement = this.elementRef.nativeElement,\n ): void {\n if (this.origin && isNativeFocusedIn(element)) {\n setNativeMouseFocused(this.origin, true, true);\n }\n }\n\n getOptions(includeDisabled: boolean = false): readonly T[] {\n return this.options\n .toArray()\n .filter(({disabled}) => includeDisabled || !disabled)\n .map(({value}) => value)\n .filter(isPresent);\n }\n\n onFocus({target}: Event, top: boolean): void {\n tuiAssertIsHTMLElement(target);\n\n const {elements} = this;\n\n moveFocus(top ? -1 : elements.length, elements, top ? 1 : -1);\n this.handleFocusLossIfNecessary(target);\n }\n\n private get elements(): readonly HTMLElement[] {\n return Array.from(this.elementRef.nativeElement.querySelectorAll(`[tuiOption]`));\n }\n}\n","import {Directive} from '@angular/core';\n\n@Directive({\n selector: `ng-template[tuiDataList]`,\n})\nexport class TuiDataListDirective {}\n","import {\n AfterViewInit,\n ContentChildren,\n Directive,\n ElementRef,\n QueryList,\n} from '@angular/core';\nimport {\n EMPTY_QUERY,\n getClosestKeyboardFocusable,\n itemsQueryListObservable,\n preventDefault,\n setNativeFocused,\n tuiPure,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {EMPTY, merge, Observable} from 'rxjs';\nimport {\n debounceTime,\n filter,\n map,\n mapTo,\n shareReplay,\n switchMap,\n take,\n tap,\n} from 'rxjs/operators';\n\n// TODO: 3.0 Move into separate module\n@Directive({\n selector: `tui-data-list[tuiDataListDropdownManager]`,\n})\nexport class TuiDataListDropdownManagerDirective implements AfterViewInit {\n @ContentChildren(TuiDropdownDirective, {descendants: true})\n private readonly dropdowns: QueryList<TuiDropdownDirective> = EMPTY_QUERY;\n\n @ContentChildren(TuiDropdownDirective, {read: ElementRef, descendants: true})\n private readonly elements: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n ngAfterViewInit(): void {\n this.right$.subscribe(index => {\n this.tryToFocus(index);\n });\n\n merge(this.immediate$, this.debounce$)\n .pipe(\n switchMap(active => {\n this.dropdowns.forEach((dropdown, index) => {\n dropdown.open = index === active;\n });\n\n const element = this.elements.toArray()[active];\n const dropdown = this.dropdowns.toArray()[active];\n\n if (!element || !dropdown || !dropdown.dropdownBoxRef) {\n return EMPTY;\n }\n\n const {nativeElement} = dropdown.dropdownBoxRef.location;\n const mouseEnter$ = typedFromEvent(nativeElement, `mouseenter`).pipe(\n take(1),\n );\n const esc$ = merge(\n typedFromEvent(element.nativeElement, `keydown`),\n typedFromEvent(nativeElement, `keydown`),\n ).pipe(filter(({keyCode}) => keyCode === 27));\n\n return merge(mouseEnter$, esc$).pipe(\n tap(event => {\n if (dropdown.dropdownBoxRef) {\n event.stopPropagation();\n }\n\n setNativeFocused(element.nativeElement);\n // TODO: iframe warning\n dropdown.open = event instanceof MouseEvent;\n }),\n );\n }),\n )\n .subscribe();\n }\n\n @tuiPure\n private get elements$(): Observable<readonly HTMLElement[]> {\n return itemsQueryListObservable(this.elements).pipe(\n map(array => array.map(({nativeElement}) => nativeElement)),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n }\n\n @tuiPure\n private get right$(): Observable<number> {\n return this.elements$.pipe(\n switchMap(elements =>\n merge(\n ...elements.map((element, index) =>\n typedFromEvent(element, `keydown`).pipe(\n filter(({keyCode}) => keyCode === 39),\n preventDefault(),\n mapTo(index),\n ),\n ),\n ),\n ),\n );\n }\n\n @tuiPure\n private get immediate$(): Observable<number> {\n return this.elements$.pipe(\n switchMap(elements =>\n merge(\n ...elements.map((element, index) =>\n typedFromEvent(element, `click`).pipe(mapTo(index)),\n ),\n ),\n ),\n );\n }\n\n @tuiPure\n private get debounce$(): Observable<number> {\n return this.elements$.pipe(\n switchMap(elements =>\n merge(\n ...elements.map((element, index) =>\n merge(\n typedFromEvent(element, `focus`),\n typedFromEvent(element, `blur`),\n ).pipe(\n filter(({relatedTarget}) =>\n this.notInDropdown(relatedTarget, index),\n ),\n map(({type}) => (type === `focus` ? index : NaN)),\n ),\n ),\n ),\n ),\n debounceTime(300),\n );\n }\n\n private notInDropdown(element: EventTarget | null, index: number): boolean {\n const dropdown = this.dropdowns.toArray()[index];\n\n return (\n !dropdown ||\n !dropdown.dropdownBoxRef ||\n !dropdown.dropdownBoxRef.location.nativeElement.contains(element)\n );\n }\n\n private tryToFocus(index: number): void {\n const dropdown = this.dropdowns.toArray()[index];\n const content = dropdown?.dropdownBoxRef?.instance.contentElementRef;\n\n if (!content) {\n return;\n }\n\n const item = getClosestKeyboardFocusable(\n content.nativeElement,\n false,\n content.nativeElement,\n );\n\n if (item) {\n setNativeFocused(item);\n }\n }\n}\n","import {Directive, HostBinding, Input} from '@angular/core';\nimport {tuiDefaultProp} from '@taiga-ui/cdk';\n\n@Directive({\n selector: `tui-opt-group`,\n host: {\n role: `group`,\n },\n})\nexport class TuiOptGroupDirective {\n @Input()\n @HostBinding(`attr.data-label`)\n @tuiDefaultProp()\n label = ``;\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDataListComponent} from './data-list.component';\nimport {TuiDataListDirective} from './data-list.directive';\nimport {TuiDataListDropdownManagerDirective} from './data-list-dropdown-manager.directive';\nimport {TuiOptGroupDirective} from './opt-group.directive';\nimport {TuiOptionComponent} from './option/option.component';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule, PolymorpheusModule],\n declarations: [\n TuiDataListComponent,\n TuiOptionComponent,\n TuiOptGroupDirective,\n TuiDataListDirective,\n TuiDataListDropdownManagerDirective,\n ],\n exports: [\n TuiDataListComponent,\n TuiOptionComponent,\n TuiOptGroupDirective,\n TuiDataListDirective,\n TuiDataListDropdownManagerDirective,\n ],\n})\nexport class TuiDataListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AA8BA;SACgB,WAAW,CAAC,EACxB,aAAa,GACuB;IACpC,OAAO,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;AAC3C,CAAC;AAED;IAYa,kBAAkB,GAA/B,MAAa,kBAAkB;;IAmB3B,YAGa,OAED,EAES,QAAiC,EACb,UAAmC,EAGvD,IAA+B,EAIvC,QAAqC;QAZrC,YAAO,GAAP,OAAO,CAER;QAES,aAAQ,GAAR,QAAQ,CAAyB;QACb,eAAU,GAAV,UAAU,CAAyB;QAGvD,SAAI,GAAJ,IAAI,CAA2B;QAIvC,aAAQ,GAAR,QAAQ,CAA6B;QA9BlD,SAAI,GAAyB,GAAG,CAAC;QAKjC,SAAI,GAAkB,QAAQ,CAAC;QAI/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EAAE;YACN,gBAAgB,CAAC,IAAI,CAAC,CAAC;SAC1B;KACJ;EACJ;AAzIG;IADC,eAAe,CAAC,oBAAoB,EAAE,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC;sEACe;AAG1E;IADC,eAAe,CAAC,oBAAoB,EAAE,EAAC,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,EAAC,CAAC;qEACD;AA+C5E;IADC,OAAO;oEAMP;AAGD;IADC,OAAO;iEAeP;AAGD;IADC,OAAO;qEAWP;AAGD;IADC,OAAO;oEAoBP;AA7GQ,mCAAmC;IAH/C,SAAS,CAAC;QACP,QAAQ,EAAE,2CAA2C;KACxD,CAAC;GACW,mCAAmC,CA2I/C;;ICnKY,oBAAoB,GAAjC,MAAa,oBAAoB;IAAjC;QAII,UAAK,GAAG,EAAE,CAAC;KACd;EAAA;AADG;IAHC,KAAK,EAAE;IACP,WAAW,CAAC,iBAAiB,CAAC;IAC9B,cAAc,EAAE;mDACN;AAJF,oBAAoB;IANhC,SAAS,CAAC;QACP,QAAQ,EAAE,eAAe;QACzB,IAAI,EAAE;YACF,IAAI,EAAE,OAAO;SAChB;KACJ,CAAC;GACW,oBAAoB,CAKhC;;ICcY,iBAAiB,GAA9B,MAAa,iBAAiB;EAAG;AAApB,iBAAiB;IAjB7B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,kBAAkB,CAAC;QACzD,YAAY,EAAE;YACV,oBAAoB;YACpB,kBAAkB;YAClB,oBAAoB;YACpB,oBAAoB;YACpB,mCAAmC;SACtC;QACD,OAAO,EAAE;YACL,oBAAoB;YACpB,kBAAkB;YAClB,oBAAoB;YACpB,oBAAoB;YACpB,mCAAmC;SACtC;KACJ,CAAC;GACW,iBAAiB,CAAG;;AC5BjC;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-components-data-list.js","sources":["ng://@taiga-ui/core/components/data-list/option/option.component.ts","ng://@taiga-ui/core/components/data-list/data-list.component.ts","ng://@taiga-ui/core/components/data-list/data-list.directive.ts","ng://@taiga-ui/core/components/data-list/data-list-dropdown-manager.directive.ts","ng://@taiga-ui/core/components/data-list/opt-group.directive.ts","ng://@taiga-ui/core/components/data-list/data-list.module.ts","ng://@taiga-ui/core/components/data-list/taiga-ui-core-components-data-list.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n OnDestroy,\n Optional,\n Self,\n TemplateRef,\n} from '@angular/core';\nimport {\n isNativeFocused,\n setNativeFocused,\n TuiContextWithImplicit,\n tuiDefaultProp,\n TuiEventWith,\n} from '@taiga-ui/cdk';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {TuiDataListHost} from '@taiga-ui/core/interfaces';\nimport {TUI_DATA_LIST_HOST, TUI_OPTION_CONTENT} from '@taiga-ui/core/tokens';\nimport {TuiOptionRole, TuiSizeL, TuiSizeXS} from '@taiga-ui/core/types';\nimport {shouldCall} from '@tinkoff/ng-event-plugins';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDataListComponent} from '../data-list.component';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function shouldFocus({\n currentTarget,\n}: TuiEventWith<MouseEvent, HTMLElement>): boolean {\n return !isNativeFocused(currentTarget);\n}\n\n// TODO: Consider all use cases for aria roles\n@Component({\n selector: 'button[tuiOption], a[tuiOption]',\n templateUrl: './option.template.html',\n styleUrls: ['./option.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n tabIndex: '-1',\n type: 'button',\n '[attr.disabled]': 'disabled || null',\n },\n})\nexport class TuiOptionComponent<T = unknown> implements OnDestroy {\n @Input()\n @HostBinding('attr.data-size')\n @tuiDefaultProp()\n size: TuiSizeL | TuiSizeXS = 'm';\n\n @Input()\n @HostBinding('attr.role')\n @tuiDefaultProp()\n role: TuiOptionRole = 'option';\n\n @Input()\n @tuiDefaultProp()\n disabled = false;\n\n @Input()\n value?: T;\n\n // TODO: 3.0 Fix dataList type when updated to Ivy and compilation drops metadata\n constructor(\n @Optional()\n @Inject(TUI_OPTION_CONTENT)\n readonly content: PolymorpheusContent<\n TuiContextWithImplicit<TemplateRef<Record<string, unknown>>>\n > | null,\n @Inject(forwardRef(() => TuiDataListComponent))\n private readonly dataList: TuiDataListComponent<T>,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Optional()\n @Inject(TUI_DATA_LIST_HOST)\n private readonly host: TuiDataListHost<T> | null,\n @Optional()\n @Self()\n @Inject(TuiDropdownDirective)\n readonly dropdown: TuiDropdownDirective | null,\n ) {}\n\n @HostBinding('class._with-dropdown')\n get active(): boolean {\n return !!this.dropdown && !!this.dropdown.dropdownBoxRef;\n }\n\n @HostListener('click')\n onClick(): void {\n if (this.host && this.value !== undefined) {\n this.host.handleOption(this.value);\n }\n }\n\n // @bad TODO: Consider aria-activedescendant for proper accessibility implementation\n @shouldCall(shouldFocus)\n @HostListener('mousemove.init', ['$event'])\n @HostListener('mousemove.silent', ['$event'])\n onMouseMove({currentTarget}: TuiEventWith<MouseEvent, HTMLElement>): void {\n setNativeFocused(currentTarget, true, true);\n }\n\n // Preventing focus loss upon focused option removal\n ngOnDestroy(): void {\n this.dataList.handleFocusLossIfNecessary(this.elementRef.nativeElement);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n forwardRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n QueryList,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n EMPTY_QUERY,\n isNativeFocusedIn,\n isPresent,\n itemsQueryListObservable,\n moveFocus,\n setNativeMouseFocused,\n tuiAssertIsHTMLElement,\n tuiDefaultProp,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {TuiDataListAccessor} from '@taiga-ui/core/interfaces';\nimport {TUI_DATA_LIST_ACCESSOR, TUI_NOTHING_FOUND_MESSAGE} from '@taiga-ui/core/tokens';\nimport {TuiDataListRole} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {TuiOptionComponent} from './option/option.component';\n\n// TODO: Consider aria-activedescendant for proper accessibility implementation\n// @dynamic\n@Component({\n selector: 'tui-data-list',\n templateUrl: './data-list.template.html',\n styleUrls: ['./data-list.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: TUI_DATA_LIST_ACCESSOR,\n useExisting: forwardRef(() => TuiDataListComponent),\n },\n ],\n})\nexport class TuiDataListComponent<T> implements TuiDataListAccessor<T> {\n @ContentChildren(forwardRef(() => TuiOptionComponent), {descendants: true})\n private readonly options: QueryList<TuiOptionComponent<T>> = EMPTY_QUERY;\n\n private origin?: HTMLElement;\n\n @Input()\n @HostBinding('attr.role')\n @tuiDefaultProp()\n role: TuiDataListRole = 'listbox';\n\n @Input()\n @tuiDefaultProp()\n emptyContent: PolymorpheusContent = '';\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TUI_NOTHING_FOUND_MESSAGE)\n readonly defaultEmptyContent$: Observable<string>,\n ) {}\n\n @tuiPure\n get empty$(): Observable<boolean> {\n return itemsQueryListObservable(this.options).pipe(map(({length}) => !length));\n }\n\n @HostListener('focusin', ['$event.relatedTarget', '$event.currentTarget'])\n onFocusIn(relatedTarget: HTMLElement, currentTarget: HTMLElement): void {\n if (!currentTarget.contains(relatedTarget) && !this.origin) {\n this.origin = relatedTarget;\n }\n }\n\n @HostListener('mousedown.prevent')\n noop(): void {}\n\n @HostListener('keydown.arrowDown.prevent', ['$event.target', '1'])\n @HostListener('keydown.arrowUp.prevent', ['$event.target', '-1'])\n onKeyDownArrow(current: HTMLElement, step: number): void {\n const {elements} = this;\n\n moveFocus(elements.indexOf(current), elements, step);\n }\n\n // TODO: Consider aria-activedescendant for proper accessibility implementation\n @HostListener('wheel.silent.passive')\n @HostListener('mouseleave', ['$event.target'])\n handleFocusLossIfNecessary(\n element: HTMLElement = this.elementRef.nativeElement,\n ): void {\n if (this.origin && isNativeFocusedIn(element)) {\n setNativeMouseFocused(this.origin, true, true);\n }\n }\n\n getOptions(includeDisabled: boolean = false): readonly T[] {\n return this.options\n .toArray()\n .filter(({disabled}) => includeDisabled || !disabled)\n .map(({value}) => value)\n .filter(isPresent);\n }\n\n onFocus({target}: Event, top: boolean): void {\n tuiAssertIsHTMLElement(target);\n\n const {elements} = this;\n\n moveFocus(top ? -1 : elements.length, elements, top ? 1 : -1);\n this.handleFocusLossIfNecessary(target);\n }\n\n private get elements(): readonly HTMLElement[] {\n return Array.from(this.elementRef.nativeElement.querySelectorAll('[tuiOption]'));\n }\n}\n","import {Directive} from '@angular/core';\n\n@Directive({\n selector: 'ng-template[tuiDataList]',\n})\nexport class TuiDataListDirective {}\n","import {\n AfterViewInit,\n ContentChildren,\n Directive,\n ElementRef,\n QueryList,\n} from '@angular/core';\nimport {\n EMPTY_QUERY,\n getClosestKeyboardFocusable,\n itemsQueryListObservable,\n preventDefault,\n setNativeFocused,\n tuiPure,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {EMPTY, merge, Observable} from 'rxjs';\nimport {\n debounceTime,\n filter,\n map,\n mapTo,\n shareReplay,\n switchMap,\n take,\n tap,\n} from 'rxjs/operators';\n\n// TODO: 3.0 Move into separate module\n@Directive({\n selector: 'tui-data-list[tuiDataListDropdownManager]',\n})\nexport class TuiDataListDropdownManagerDirective implements AfterViewInit {\n @ContentChildren(TuiDropdownDirective, {descendants: true})\n private readonly dropdowns: QueryList<TuiDropdownDirective> = EMPTY_QUERY;\n\n @ContentChildren(TuiDropdownDirective, {read: ElementRef, descendants: true})\n private readonly elements: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n ngAfterViewInit(): void {\n this.right$.subscribe(index => {\n this.tryToFocus(index);\n });\n\n merge(this.immediate$, this.debounce$)\n .pipe(\n switchMap(active => {\n this.dropdowns.forEach((dropdown, index) => {\n dropdown.open = index === active;\n });\n\n const element = this.elements.toArray()[active];\n const dropdown = this.dropdowns.toArray()[active];\n\n if (!element || !dropdown || !dropdown.dropdownBoxRef) {\n return EMPTY;\n }\n\n const {nativeElement} = dropdown.dropdownBoxRef.location;\n const mouseEnter$ = typedFromEvent(nativeElement, 'mouseenter').pipe(\n take(1),\n );\n const esc$ = merge(\n typedFromEvent(element.nativeElement, 'keydown'),\n typedFromEvent(nativeElement, 'keydown'),\n ).pipe(filter(({keyCode}) => keyCode === 27));\n\n return merge(mouseEnter$, esc$).pipe(\n tap(event => {\n if (dropdown.dropdownBoxRef) {\n event.stopPropagation();\n }\n\n setNativeFocused(element.nativeElement);\n // TODO: iframe warning\n dropdown.open = event instanceof MouseEvent;\n }),\n );\n }),\n )\n .subscribe();\n }\n\n @tuiPure\n private get elements$(): Observable<readonly HTMLElement[]> {\n return itemsQueryListObservable(this.elements).pipe(\n map(array => array.map(({nativeElement}) => nativeElement)),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n }\n\n @tuiPure\n private get right$(): Observable<number> {\n return this.elements$.pipe(\n switchMap(elements =>\n merge(\n ...elements.map((element, index) =>\n typedFromEvent(element, 'keydown').pipe(\n filter(({keyCode}) => keyCode === 39),\n preventDefault(),\n mapTo(index),\n ),\n ),\n ),\n ),\n );\n }\n\n @tuiPure\n private get immediate$(): Observable<number> {\n return this.elements$.pipe(\n switchMap(elements =>\n merge(\n ...elements.map((element, index) =>\n typedFromEvent(element, 'click').pipe(mapTo(index)),\n ),\n ),\n ),\n );\n }\n\n @tuiPure\n private get debounce$(): Observable<number> {\n return this.elements$.pipe(\n switchMap(elements =>\n merge(\n ...elements.map((element, index) =>\n merge(\n typedFromEvent(element, 'focus'),\n typedFromEvent(element, 'blur'),\n ).pipe(\n filter(({relatedTarget}) =>\n this.notInDropdown(relatedTarget, index),\n ),\n map(({type}) => (type === 'focus' ? index : NaN)),\n ),\n ),\n ),\n ),\n debounceTime(300),\n );\n }\n\n private notInDropdown(element: EventTarget | null, index: number): boolean {\n const dropdown = this.dropdowns.toArray()[index];\n\n return !dropdown?.dropdownBoxRef?.location.nativeElement.contains(element);\n }\n\n private tryToFocus(index: number): void {\n const dropdown = this.dropdowns.toArray()[index];\n const content = dropdown?.dropdownBoxRef?.instance.contentElementRef;\n\n if (!content) {\n return;\n }\n\n const item = getClosestKeyboardFocusable(\n content.nativeElement,\n false,\n content.nativeElement,\n );\n\n if (item) {\n setNativeFocused(item);\n }\n }\n}\n","import {Directive, HostBinding, Input} from '@angular/core';\nimport {tuiDefaultProp} from '@taiga-ui/cdk';\n\n@Directive({\n selector: 'tui-opt-group',\n host: {\n role: 'group',\n },\n})\nexport class TuiOptGroupDirective {\n @Input()\n @HostBinding('attr.data-label')\n @tuiDefaultProp()\n label = '';\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDataListComponent} from './data-list.component';\nimport {TuiDataListDirective} from './data-list.directive';\nimport {TuiDataListDropdownManagerDirective} from './data-list-dropdown-manager.directive';\nimport {TuiOptGroupDirective} from './opt-group.directive';\nimport {TuiOptionComponent} from './option/option.component';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule, PolymorpheusModule],\n declarations: [\n TuiDataListComponent,\n TuiOptionComponent,\n TuiOptGroupDirective,\n TuiDataListDirective,\n TuiDataListDropdownManagerDirective,\n ],\n exports: [\n TuiDataListComponent,\n TuiOptionComponent,\n TuiOptGroupDirective,\n TuiDataListDirective,\n TuiDataListDropdownManagerDirective,\n ],\n})\nexport class TuiDataListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;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iBAAiB;IAjB7B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,kBAAkB,CAAC;QACzD,YAAY,EAAE;YACV,oBAAoB;YACpB,kBAAkB;YAClB,oBAAoB;YACpB,oBAAoB;YACpB,mCAAmC;SACtC;QACD,OAAO,EAAE;YACL,oBAAoB;YACpB,kBAAkB;YAClB,oBAAoB;YACpB,oBAAoB;YACpB,mCAAmC;SACtC;KACJ,CAAC;GACW,iBAAiB,CAAG;;AC5BjC;;;;;;"}
@@ -52,7 +52,7 @@ const TUI_DIALOG_PROVIDERS = [
52
52
  },
53
53
  ];
54
54
 
55
- const REQUIRED_ERROR = new Error(`Required dialog was dismissed`);
55
+ const REQUIRED_ERROR = new Error('Required dialog was dismissed');
56
56
  // @dynamic
57
57
  let TuiDialogComponent = class TuiDialogComponent {
58
58
  constructor(duration, isMobile, context, close$, closeWord$) {
@@ -61,16 +61,16 @@ let TuiDialogComponent = class TuiDialogComponent {
61
61
  this.context = context;
62
62
  this.closeWord$ = closeWord$;
63
63
  this.animation = {
64
- value: ``,
64
+ value: '',
65
65
  params: {
66
- start: `40px`,
66
+ start: '40px',
67
67
  duration: this.duration,
68
68
  },
69
69
  };
70
70
  this.fullscreenAnimation = {
71
- value: ``,
71
+ value: '',
72
72
  params: {
73
- start: `100vh`,
73
+ start: '100vh',
74
74
  duration: this.duration,
75
75
  },
76
76
  };
@@ -85,7 +85,7 @@ let TuiDialogComponent = class TuiDialogComponent {
85
85
  return this.context.header;
86
86
  }
87
87
  get slideInTop() {
88
- return this.size === `fullscreen` || this.size === `page` || this.isMobile
88
+ return this.size === 'fullscreen' || this.size === 'page' || this.isMobile
89
89
  ? this.fullscreenAnimation
90
90
  : this.animation;
91
91
  }
@@ -106,18 +106,18 @@ TuiDialogComponent.ctorParameters = () => [
106
106
  { type: Observable, decorators: [{ type: Inject, args: [TUI_CLOSE_WORD,] }] }
107
107
  ];
108
108
  __decorate([
109
- HostBinding(`attr.data-size`)
109
+ HostBinding('attr.data-size')
110
110
  ], TuiDialogComponent.prototype, "size", null);
111
111
  __decorate([
112
- HostBinding(`class._centered`)
112
+ HostBinding('class._centered')
113
113
  ], TuiDialogComponent.prototype, "header", null);
114
114
  __decorate([
115
- HostBinding(`@tuiSlideInTop`),
116
- HostBinding(`@tuiFadeIn`)
115
+ HostBinding('@tuiSlideInTop'),
116
+ HostBinding('@tuiFadeIn')
117
117
  ], TuiDialogComponent.prototype, "slideInTop", null);
118
118
  TuiDialogComponent = __decorate([
119
119
  Component({
120
- selector: `tui-dialog`,
120
+ selector: 'tui-dialog',
121
121
  template: "<header\n *ngIf=\"header\"\n polymorpheus-outlet\n class=\"t-header\"\n [content]=\"header\"\n [context]=\"context\"\n></header>\n<div class=\"t-content\">\n <h2\n class=\"t-heading\"\n [id]=\"context.id\"\n [textContent]=\"context.label\"\n ></h2>\n <section\n polymorpheus-outlet\n [context]=\"context\"\n [content]=\"context.content\"\n >\n <ng-template let-text>\n {{ text }}\n <div class=\"t-buttons\">\n <button\n tuiButton\n size=\"m\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ $any(context.data)?.button || 'OK' }}\n </button>\n </div>\n </ng-template>\n </section>\n</div>\n<div\n *ngIf=\"context.closeable\"\n class=\"t-wrapper\"\n>\n <button\n tuiIconButton\n tuiPreventDefault=\"mousedown\"\n automation-id=\"tui-dialog__close\"\n size=\"s\"\n appearance=\"\"\n icon=\"tuiIconCloseLarge\"\n shape=\"rounded\"\n class=\"t-close\"\n [title]=\"closeWord$ | async\"\n (click)=\"close()\"\n ></button>\n</div>\n",
122
122
  changeDetection: ChangeDetectionStrategy.OnPush,
123
123
  providers: TUI_DIALOG_PROVIDERS,
@@ -158,15 +158,15 @@ let TuiDialogDirective = class TuiDialogDirective extends AbstractTuiDialogDirec
158
158
  };
159
159
  TuiDialogDirective = __decorate([
160
160
  Directive({
161
- selector: `ng-template[tuiDialog]`,
161
+ selector: 'ng-template[tuiDialog]',
162
162
  providers: [
163
163
  {
164
164
  provide: AbstractTuiDialogService,
165
165
  useExisting: TuiDialogService,
166
166
  },
167
167
  ],
168
- inputs: [`options: tuiDialogOptions`, `open: tuiDialog`],
169
- outputs: [`openChange: tuiDialogChange`],
168
+ inputs: ['options: tuiDialogOptions', 'open: tuiDialog'],
169
+ outputs: ['openChange: tuiDialogChange'],
170
170
  })
171
171
  ], TuiDialogDirective);
172
172
 
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-dialog.js","sources":["ng://@taiga-ui/core/components/dialog/dialog.providers.ts","ng://@taiga-ui/core/components/dialog/dialog.component.ts","ng://@taiga-ui/core/components/dialog/dialog.service.ts","ng://@taiga-ui/core/components/dialog/dialog.directive.ts","ng://@taiga-ui/core/components/dialog/dialog.module.ts","ng://@taiga-ui/core/components/dialog/taiga-ui-core-components-dialog.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {ElementRef, InjectionToken, Provider} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {\n containsOrAfter,\n isCurrentTarget,\n TuiDestroyService,\n TuiDialog,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {TuiDialogOptions} from '@taiga-ui/core/interfaces';\nimport {tuiGetViewportWidth} from '@taiga-ui/core/utils/dom';\nimport {POLYMORPHEUS_CONTEXT} from '@tinkoff/ng-polymorpheus';\nimport {EMPTY, merge, Observable} from 'rxjs';\nimport {filter, switchMapTo, take, takeUntil} from 'rxjs/operators';\n\nexport const TUI_DIALOGS_CLOSE = new InjectionToken<Observable<unknown>>(\n `A stream to close dialogs`,\n {\n factory: () => EMPTY,\n },\n);\n\nconst SCROLLBAR_PLACEHOLDER = 17;\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function dialogCloseStreamFactory(\n documentRef: Document,\n windowRef: Window,\n {nativeElement}: ElementRef<HTMLElement>,\n close$: Observable<void>,\n destroy$: Observable<void>,\n {dismissible}: TuiDialog<TuiDialogOptions<unknown>, unknown>,\n): Observable<unknown> {\n return dismissible\n ? merge(\n typedFromEvent(nativeElement, `click`).pipe(filter(isCurrentTarget)),\n typedFromEvent(documentRef, `keydown`).pipe(\n // TODO: iframe warning\n filter(\n ({key, target}) =>\n key === `Escape` &&\n target instanceof Element &&\n (!containsOrAfter(nativeElement, target) ||\n nativeElement.contains(target)),\n ),\n ),\n typedFromEvent(documentRef, `mousedown`).pipe(\n // TODO: iframe warning\n filter(\n ({target, clientX}) =>\n target instanceof Element &&\n tuiGetViewportWidth(windowRef) - clientX >\n SCROLLBAR_PLACEHOLDER &&\n !containsOrAfter(nativeElement, target),\n ),\n switchMapTo(\n typedFromEvent(documentRef, `mouseup`).pipe(\n take(1),\n // TODO: iframe warning\n filter(\n ({target}) =>\n target instanceof Element &&\n !containsOrAfter(nativeElement, target),\n ),\n ),\n ),\n ),\n close$,\n ).pipe(takeUntil(destroy$))\n : close$;\n}\n\nexport const TUI_DIALOG_CLOSE_STREAM = new InjectionToken<Observable<unknown>>(\n `Dialogs closing stream`,\n);\nexport const TUI_DIALOG_PROVIDERS: Provider[] = [\n TuiDestroyService,\n {\n provide: TUI_DIALOG_CLOSE_STREAM,\n deps: [\n DOCUMENT,\n WINDOW,\n ElementRef,\n TUI_DIALOGS_CLOSE,\n TuiDestroyService,\n POLYMORPHEUS_CONTEXT,\n ],\n useFactory: dialogCloseStreamFactory,\n },\n];\n","import {ChangeDetectionStrategy, Component, HostBinding, Inject} from '@angular/core';\nimport {TUI_IS_MOBILE, TuiDialog} from '@taiga-ui/cdk';\nimport {tuiFadeIn, tuiSlideInTop} from '@taiga-ui/core/animations';\nimport {TuiAnimationOptions, TuiDialogOptions} from '@taiga-ui/core/interfaces';\nimport {TUI_ANIMATIONS_DURATION, TUI_CLOSE_WORD} from '@taiga-ui/core/tokens';\nimport {TuiDialogSize} from '@taiga-ui/core/types';\nimport {POLYMORPHEUS_CONTEXT, PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\nimport {TUI_DIALOG_CLOSE_STREAM, TUI_DIALOG_PROVIDERS} from './dialog.providers';\n\nconst REQUIRED_ERROR = new Error(`Required dialog was dismissed`);\n\n// @dynamic\n@Component({\n selector: `tui-dialog`,\n templateUrl: `./dialog.template.html`,\n styleUrls: [`./dialog.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: TUI_DIALOG_PROVIDERS,\n animations: [tuiSlideInTop, tuiFadeIn],\n})\nexport class TuiDialogComponent<O, I> {\n private readonly animation = {\n value: ``,\n params: {\n start: `40px`,\n duration: this.duration,\n },\n } as const;\n\n private readonly fullscreenAnimation = {\n value: ``,\n params: {\n start: `100vh`,\n duration: this.duration,\n },\n } as const;\n\n constructor(\n @Inject(TUI_ANIMATIONS_DURATION) private readonly duration: number,\n @Inject(TUI_IS_MOBILE) private readonly isMobile: boolean,\n @Inject(POLYMORPHEUS_CONTEXT)\n readonly context: TuiDialog<TuiDialogOptions<I>, O>,\n @Inject(TUI_DIALOG_CLOSE_STREAM)\n close$: Observable<unknown>,\n @Inject(TUI_CLOSE_WORD) readonly closeWord$: Observable<string>,\n ) {\n close$.subscribe(() => {\n this.close();\n });\n }\n\n @HostBinding(`attr.data-size`)\n get size(): TuiDialogSize {\n return this.context.size;\n }\n\n @HostBinding(`class._centered`)\n get header(): PolymorpheusContent {\n return this.context.header;\n }\n\n @HostBinding(`@tuiSlideInTop`)\n @HostBinding(`@tuiFadeIn`)\n get slideInTop(): TuiAnimationOptions {\n return this.size === `fullscreen` || this.size === `page` || this.isMobile\n ? this.fullscreenAnimation\n : this.animation;\n }\n\n close(): void {\n if (this.context.required) {\n this.context.$implicit.error(REQUIRED_ERROR);\n } else {\n this.context.$implicit.complete();\n }\n }\n}\n","import {Injectable} from '@angular/core';\nimport {AbstractTuiDialogService} from '@taiga-ui/cdk';\nimport {TuiDialogOptions} from '@taiga-ui/core/interfaces';\nimport {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDialogComponent} from './dialog.component';\n\nconst DIALOG = new PolymorpheusComponent(TuiDialogComponent);\nconst DEFAULT_OPTIONS = {\n size: `m`,\n required: false,\n closeable: true,\n dismissible: true,\n label: ``,\n header: ``,\n} as const;\n\n@Injectable({\n providedIn: `root`,\n})\nexport class TuiDialogService extends AbstractTuiDialogService<TuiDialogOptions<any>> {\n protected readonly component = DIALOG;\n protected readonly defaultOptions: TuiDialogOptions<any> = DEFAULT_OPTIONS as any;\n}\n","import {Directive} from '@angular/core';\nimport {AbstractTuiDialogDirective, AbstractTuiDialogService} from '@taiga-ui/cdk';\nimport {TuiDialogOptions} from '@taiga-ui/core/interfaces';\n\nimport {TuiDialogService} from './dialog.service';\n\n@Directive({\n selector: `ng-template[tuiDialog]`,\n providers: [\n {\n provide: AbstractTuiDialogService,\n useExisting: TuiDialogService,\n },\n ],\n inputs: [`options: tuiDialogOptions`, `open: tuiDialog`],\n outputs: [`openChange: tuiDialogChange`],\n})\nexport class TuiDialogDirective<T> extends AbstractTuiDialogDirective<\n TuiDialogOptions<T>\n> {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TUI_DIALOGS, TuiPreventDefaultModule} from '@taiga-ui/cdk';\nimport {TuiButtonModule} from '@taiga-ui/core/components/button';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDialogComponent} from './dialog.component';\nimport {TuiDialogDirective} from './dialog.directive';\nimport {TuiDialogService} from './dialog.service';\n\n@NgModule({\n imports: [PolymorpheusModule, TuiButtonModule, CommonModule, TuiPreventDefaultModule],\n declarations: [TuiDialogComponent, TuiDialogDirective],\n exports: [TuiDialogComponent, TuiDialogDirective],\n entryComponents: [TuiDialogComponent],\n providers: [\n {\n provide: TUI_DIALOGS,\n useExisting: TuiDialogService,\n multi: true,\n },\n ],\n})\nexport class TuiDialogModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAgBa,iBAAiB,GAAG,I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MAAM,EAAE,EAAE;CACJ,CAAC;IAKE,gBAAgB,GAA7B,MAAa,gBAAiB,SAAQ,wBAA+C;IAArF;;QACuB,cAAS,GAAG,MAAM,CAAC;QACnB,mBAAc,GAA0B,eAAsB,CAAC;KACrF;EAAA;;AAHY,gBAAgB;IAH5B,UAAU,CAAC;QACR,UAAU,EAAE,MAAM;KACrB,CAAC;GACW,gBAAgB,CAG5B;;ICNY,kBAAkB,GAA/B,MAAa,kBAAsB,SAAQ,0BAE1C;EAAG;AAFS,kBAAkB;IAX9B,SAAS,CAAC;QACP,QAAQ,EAAE,wBAAwB;QAClC,SAAS,EAAE;YACP;gBACI,OAAO,EAAE,wBAAwB;gBACjC,WAAW,EAAE,gBAAgB;aAChC;SACJ;QACD,MAAM,EAAE,CAAC,2BAA2B,EAAE,iBAAiB,CAAC;QACxD,OAAO,EAAE,CAAC,6BAA6B,CAAC;KAC3C,CAAC;GACW,kBAAkB,CAE3B;;ICIS,eAAe,GAA5B,MAAa,eAAe;EAAG;AAAlB,eAAe;IAb3B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,kBAAkB,EAAE,eAAe,EAAE,YAAY,EAAE,uBAAuB,CAAC;QACrF,YAAY,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;QACtD,OAAO,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;QACjD,eAAe,EAAE,CAAC,kBAAkB,CAAC;QACrC,SAAS,EAAE;YACP;gBACI,OAAO,EAAE,WAAW;gBACpB,WAAW,EAAE,gBAAgB;gBAC7B,KAAK,EAAE,IAAI;aACd;SACJ;KACJ,CAAC;GACW,eAAe,CAAG;;ACvB/B;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-components-dialog.js","sources":["ng://@taiga-ui/core/components/dialog/dialog.providers.ts","ng://@taiga-ui/core/components/dialog/dialog.component.ts","ng://@taiga-ui/core/components/dialog/dialog.service.ts","ng://@taiga-ui/core/components/dialog/dialog.directive.ts","ng://@taiga-ui/core/components/dialog/dialog.module.ts","ng://@taiga-ui/core/components/dialog/taiga-ui-core-components-dialog.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {ElementRef, InjectionToken, Provider} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {\n containsOrAfter,\n isCurrentTarget,\n TuiDestroyService,\n TuiDialog,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {TuiDialogOptions} from '@taiga-ui/core/interfaces';\nimport {tuiGetViewportWidth} from '@taiga-ui/core/utils/dom';\nimport {POLYMORPHEUS_CONTEXT} from '@tinkoff/ng-polymorpheus';\nimport {EMPTY, merge, Observable} from 'rxjs';\nimport {filter, switchMapTo, take, takeUntil} from 'rxjs/operators';\n\nexport const TUI_DIALOGS_CLOSE = new InjectionToken<Observable<unknown>>(\n `A stream to close dialogs`,\n {\n factory: () => EMPTY,\n },\n);\n\nconst SCROLLBAR_PLACEHOLDER = 17;\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function dialogCloseStreamFactory(\n documentRef: Document,\n windowRef: Window,\n {nativeElement}: ElementRef<HTMLElement>,\n close$: Observable<void>,\n destroy$: Observable<void>,\n {dismissible}: TuiDialog<TuiDialogOptions<unknown>, unknown>,\n): Observable<unknown> {\n return dismissible\n ? merge(\n typedFromEvent(nativeElement, `click`).pipe(filter(isCurrentTarget)),\n typedFromEvent(documentRef, `keydown`).pipe(\n // TODO: iframe warning\n filter(\n ({key, target}) =>\n key === `Escape` &&\n target instanceof Element &&\n (!containsOrAfter(nativeElement, target) ||\n nativeElement.contains(target)),\n ),\n ),\n typedFromEvent(documentRef, `mousedown`).pipe(\n // TODO: iframe warning\n filter(\n ({target, clientX}) =>\n target instanceof Element &&\n tuiGetViewportWidth(windowRef) - clientX >\n SCROLLBAR_PLACEHOLDER &&\n !containsOrAfter(nativeElement, target),\n ),\n switchMapTo(\n typedFromEvent(documentRef, `mouseup`).pipe(\n take(1),\n // TODO: iframe warning\n filter(\n ({target}) =>\n target instanceof Element &&\n !containsOrAfter(nativeElement, target),\n ),\n ),\n ),\n ),\n close$,\n ).pipe(takeUntil(destroy$))\n : close$;\n}\n\nexport const TUI_DIALOG_CLOSE_STREAM = new InjectionToken<Observable<unknown>>(\n `Dialogs closing stream`,\n);\nexport const TUI_DIALOG_PROVIDERS: Provider[] = [\n TuiDestroyService,\n {\n provide: TUI_DIALOG_CLOSE_STREAM,\n deps: [\n DOCUMENT,\n WINDOW,\n ElementRef,\n TUI_DIALOGS_CLOSE,\n TuiDestroyService,\n POLYMORPHEUS_CONTEXT,\n ],\n useFactory: dialogCloseStreamFactory,\n },\n];\n","import {ChangeDetectionStrategy, Component, HostBinding, Inject} from '@angular/core';\nimport {TUI_IS_MOBILE, TuiDialog} from '@taiga-ui/cdk';\nimport {tuiFadeIn, tuiSlideInTop} from '@taiga-ui/core/animations';\nimport {TuiAnimationOptions, TuiDialogOptions} from '@taiga-ui/core/interfaces';\nimport {TUI_ANIMATIONS_DURATION, TUI_CLOSE_WORD} from '@taiga-ui/core/tokens';\nimport {TuiDialogSize} from '@taiga-ui/core/types';\nimport {POLYMORPHEUS_CONTEXT, PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\nimport {TUI_DIALOG_CLOSE_STREAM, TUI_DIALOG_PROVIDERS} from './dialog.providers';\n\nconst REQUIRED_ERROR = new Error('Required dialog was dismissed');\n\n// @dynamic\n@Component({\n selector: 'tui-dialog',\n templateUrl: './dialog.template.html',\n styleUrls: ['./dialog.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: TUI_DIALOG_PROVIDERS,\n animations: [tuiSlideInTop, tuiFadeIn],\n})\nexport class TuiDialogComponent<O, I> {\n private readonly animation = {\n value: '',\n params: {\n start: '40px',\n duration: this.duration,\n },\n } as const;\n\n private readonly fullscreenAnimation = {\n value: '',\n params: {\n start: '100vh',\n duration: this.duration,\n },\n } as const;\n\n constructor(\n @Inject(TUI_ANIMATIONS_DURATION) private readonly duration: number,\n @Inject(TUI_IS_MOBILE) private readonly isMobile: boolean,\n @Inject(POLYMORPHEUS_CONTEXT)\n readonly context: TuiDialog<TuiDialogOptions<I>, O>,\n @Inject(TUI_DIALOG_CLOSE_STREAM)\n close$: Observable<unknown>,\n @Inject(TUI_CLOSE_WORD) readonly closeWord$: Observable<string>,\n ) {\n close$.subscribe(() => {\n this.close();\n });\n }\n\n @HostBinding('attr.data-size')\n get size(): TuiDialogSize {\n return this.context.size;\n }\n\n @HostBinding('class._centered')\n get header(): PolymorpheusContent {\n return this.context.header;\n }\n\n @HostBinding('@tuiSlideInTop')\n @HostBinding('@tuiFadeIn')\n get slideInTop(): TuiAnimationOptions {\n return this.size === 'fullscreen' || this.size === 'page' || this.isMobile\n ? this.fullscreenAnimation\n : this.animation;\n }\n\n close(): void {\n if (this.context.required) {\n this.context.$implicit.error(REQUIRED_ERROR);\n } else {\n this.context.$implicit.complete();\n }\n }\n}\n","import {Injectable} from '@angular/core';\nimport {AbstractTuiDialogService} from '@taiga-ui/cdk';\nimport {TuiDialogOptions} from '@taiga-ui/core/interfaces';\nimport {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDialogComponent} from './dialog.component';\n\nconst DIALOG = new PolymorpheusComponent(TuiDialogComponent);\nconst DEFAULT_OPTIONS = {\n size: `m`,\n required: false,\n closeable: true,\n dismissible: true,\n label: ``,\n header: ``,\n} as const;\n\n@Injectable({\n providedIn: `root`,\n})\nexport class TuiDialogService extends AbstractTuiDialogService<TuiDialogOptions<any>> {\n protected readonly component = DIALOG;\n protected readonly defaultOptions: TuiDialogOptions<any> = DEFAULT_OPTIONS as any;\n}\n","import {Directive} from '@angular/core';\nimport {AbstractTuiDialogDirective, AbstractTuiDialogService} from '@taiga-ui/cdk';\nimport {TuiDialogOptions} from '@taiga-ui/core/interfaces';\n\nimport {TuiDialogService} from './dialog.service';\n\n@Directive({\n selector: 'ng-template[tuiDialog]',\n providers: [\n {\n provide: AbstractTuiDialogService,\n useExisting: TuiDialogService,\n },\n ],\n inputs: ['options: tuiDialogOptions', 'open: tuiDialog'],\n outputs: ['openChange: tuiDialogChange'],\n})\nexport class TuiDialogDirective<T> extends AbstractTuiDialogDirective<\n TuiDialogOptions<T>\n> {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TUI_DIALOGS, TuiPreventDefaultModule} from '@taiga-ui/cdk';\nimport {TuiButtonModule} from '@taiga-ui/core/components/button';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDialogComponent} from './dialog.component';\nimport {TuiDialogDirective} from './dialog.directive';\nimport {TuiDialogService} from './dialog.service';\n\n@NgModule({\n imports: [PolymorpheusModule, TuiButtonModule, CommonModule, TuiPreventDefaultModule],\n declarations: [TuiDialogComponent, TuiDialogDirective],\n exports: [TuiDialogComponent, TuiDialogDirective],\n entryComponents: [TuiDialogComponent],\n providers: [\n {\n provide: TUI_DIALOGS,\n useExisting: TuiDialogService,\n multi: true,\n },\n ],\n})\nexport class TuiDialogModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAgBa,iBAAiB,GAAG,IAAI,cAAc,CAC/C,2BAA2B,EAC3B;IACI,OAAO,EAAE,MAAM,KAAK;CACvB,EACH;AAEF,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAEjC;SACgB,wBAAwB,CACpC,WAAqB,EACrB,SAAiB,EACjB,EAAC,aAAa,EAA0B,EACxC,MAAwB,EACxB,QAA0B,EAC1B,EAAC,WAAW,EAAgD;IAE5D,OAAO,WAAW;UACZ,KAAK,CACD,cAAc,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,EACpE,cAAc,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,IAAI;;QAEvC,MAAM,CACF,CAAC,EAAC,GAAG,EAAE,MAAM,EAAC,KACV,G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EAAE,CAAC,2BAA2B,EAAE,iBAAiB,CAAC;QACxD,OAAO,EAAE,CAAC,6BAA6B,CAAC;KAC3C,CAAC;GACW,kBAAkB,CAE3B;;ICIS,eAAe,GAA5B,MAAa,eAAe;EAAG;AAAlB,eAAe;IAb3B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,kBAAkB,EAAE,eAAe,EAAE,YAAY,EAAE,uBAAuB,CAAC;QACrF,YAAY,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;QACtD,OAAO,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;QACjD,eAAe,EAAE,CAAC,kBAAkB,CAAC;QACrC,SAAS,EAAE;YACP;gBACI,OAAO,EAAE,WAAW;gBACpB,WAAW,EAAE,gBAAgB;gBAC7B,KAAK,EAAE,IAAI;aACd;SACJ;KACJ,CAAC;GACW,eAAe,CAAG;;ACvB/B;;;;;;"}
@@ -31,14 +31,14 @@ let TuiDropdownBoxComponent = class TuiDropdownBoxComponent {
31
31
  * Is previous position on top (to prevent jumping up and down on scroll)
32
32
  */
33
33
  this.prevDirectionIsTop = false;
34
- merge(animationFrame$.pipe(throttleTime(POLLING_TIME)), this.directive.refresh$, fromEvent(this.windowRef, `resize`))
34
+ merge(animationFrame$.pipe(throttleTime(POLLING_TIME)), this.directive.refresh$, fromEvent(this.windowRef, 'resize'))
35
35
  .pipe(tuiZonefree(ngZone), takeUntil(destroy$))
36
36
  .subscribe(() => {
37
37
  this.calculatePositionAndSize();
38
38
  });
39
39
  }
40
40
  get overscroll() {
41
- return this.inModal ? `all` : `scroll`;
41
+ return this.inModal ? 'all' : 'scroll';
42
42
  }
43
43
  getContext(context, activeZone) {
44
44
  return Object.assign(Object.assign({}, context), { activeZone });
@@ -54,11 +54,11 @@ let TuiDropdownBoxComponent = class TuiDropdownBoxComponent {
54
54
  }
55
55
  get inModal() {
56
56
  // @awful TODO: get rid of component tag name dependency
57
- return !!this.directive.host.closest(`tui-dialog-host`);
57
+ return !!this.directive.host.closest('tui-dialog-host');
58
58
  }
59
59
  get inOption() {
60
60
  // @awful TODO: get rid of component tag name dependency
61
- return !!this.directive.host.closest(`[tuiOption]`);
61
+ return !!this.directive.host.closest('[tuiOption]');
62
62
  }
63
63
  calculatePositionAndSize() {
64
64
  const { clientRect } = this.directive;
@@ -66,7 +66,7 @@ let TuiDropdownBoxComponent = class TuiDropdownBoxComponent {
66
66
  const hostRect = this.directive.fixed
67
67
  ? this.portalHost.fixedPositionOffset()
68
68
  : this.portalHost.clientRect;
69
- style.position = this.directive.fixed ? `fixed` : `absolute`;
69
+ style.position = this.directive.fixed ? 'fixed' : 'absolute';
70
70
  this.calculateVerticalPosition(style, clientRect, hostRect);
71
71
  this.calculateHorizontalPosition(style, clientRect, hostRect);
72
72
  this.calculateWidth(style, clientRect);
@@ -80,23 +80,23 @@ let TuiDropdownBoxComponent = class TuiDropdownBoxComponent {
80
80
  const isDropdownSizeActuallyFitsViewport = dropdownRect.right <= screenWidth && dropdownRect.left >= 0;
81
81
  let finalAlign = this.directive.align;
82
82
  switch (this.directive.align) {
83
- case `left`:
83
+ case 'left':
84
84
  if (isDropdownSizeHypotheticallyFitsViewport &&
85
85
  dropdownRect.right > screenWidth) {
86
- finalAlign = `right`;
86
+ finalAlign = 'right';
87
87
  }
88
88
  break;
89
- case `right`:
89
+ case 'right':
90
90
  if (isDropdownSizeHypotheticallyFitsViewport && dropdownRect.left < 0) {
91
- finalAlign = `left`;
91
+ finalAlign = 'left';
92
92
  }
93
93
  break;
94
94
  }
95
- if (style.right === `auto` && isDropdownSizeActuallyFitsViewport) {
96
- finalAlign = `left`;
95
+ if (style.right === 'auto' && isDropdownSizeActuallyFitsViewport) {
96
+ finalAlign = 'left';
97
97
  }
98
- if (style.left === `auto` && isDropdownSizeActuallyFitsViewport) {
99
- finalAlign = `right`;
98
+ if (style.left === 'auto' && isDropdownSizeActuallyFitsViewport) {
99
+ finalAlign = 'right';
100
100
  }
101
101
  return finalAlign;
102
102
  }
@@ -115,26 +115,26 @@ let TuiDropdownBoxComponent = class TuiDropdownBoxComponent {
115
115
  const right = Math.floor(hostRect.right - directiveRect.right - offset);
116
116
  const viewportWidth = tuiGetViewportWidth(this.windowRef);
117
117
  switch (this.getFinalAlign(style, directiveRect)) {
118
- case `left`:
118
+ case 'left':
119
119
  if (right + DEFAULT_MARGIN > viewportWidth ||
120
120
  inRange(left + DEFAULT_MARGIN, 0, viewportWidth)) {
121
121
  style.left = px(left);
122
- style.right = `auto`;
122
+ style.right = 'auto';
123
123
  }
124
124
  else {
125
- style.left = `auto`;
125
+ style.left = 'auto';
126
126
  style.right = px(right);
127
127
  }
128
128
  break;
129
- case `right`:
129
+ case 'right':
130
130
  if (inRange(right + DEFAULT_MARGIN, 0, viewportWidth) ||
131
131
  left + DEFAULT_MARGIN > viewportWidth) {
132
- style.left = `auto`;
132
+ style.left = 'auto';
133
133
  style.right = px(right);
134
134
  }
135
135
  else {
136
136
  style.left = px(left);
137
- style.right = `auto`;
137
+ style.right = 'auto';
138
138
  }
139
139
  break;
140
140
  }
@@ -157,11 +157,11 @@ let TuiDropdownBoxComponent = class TuiDropdownBoxComponent {
157
157
  const bottomAvailableHeight = windowHeight - directiveRect.bottom - offset;
158
158
  const finalDirection = this.getFinalDirection(directiveRect);
159
159
  const optionOffset = this.inOption ? DEFAULT_MARGIN * 2 : 0;
160
- this.prevDirectionIsTop = finalDirection === `top`;
161
- if (finalDirection === `top`) {
160
+ this.prevDirectionIsTop = finalDirection === 'top';
161
+ if (finalDirection === 'top') {
162
162
  this.dropdownAnimation = this.animationBottom;
163
163
  style.maxHeight = px(Math.min(boxHeightLimit, topAvailableHeight));
164
- style.top = `auto`;
164
+ style.top = 'auto';
165
165
  style.bottom = px(hostRect.bottom -
166
166
  directiveRect.top -
167
167
  DEFAULT_MARGIN +
@@ -176,7 +176,7 @@ let TuiDropdownBoxComponent = class TuiDropdownBoxComponent {
176
176
  DEFAULT_MARGIN +
177
177
  offset -
178
178
  optionOffset);
179
- style.bottom = `auto`;
179
+ style.bottom = 'auto';
180
180
  }
181
181
  }
182
182
  getFinalDirection(directiveRect) {
@@ -190,14 +190,14 @@ let TuiDropdownBoxComponent = class TuiDropdownBoxComponent {
190
190
  let finalDirection = null;
191
191
  // Given direction is applied if we can fit the box in the limits that way
192
192
  switch (this.directive.direction) {
193
- case `top`:
193
+ case 'top':
194
194
  if (topAvailableHeight >= this.directive.minHeight) {
195
- finalDirection = `top`;
195
+ finalDirection = 'top';
196
196
  }
197
197
  break;
198
- case `bottom`:
198
+ case 'bottom':
199
199
  if (bottomAvailableHeight >= this.directive.minHeight) {
200
- finalDirection = `bottom`;
200
+ finalDirection = 'bottom';
201
201
  }
202
202
  break;
203
203
  }
@@ -212,15 +212,15 @@ let TuiDropdownBoxComponent = class TuiDropdownBoxComponent {
212
212
  // If there is enough space to fit below without scroll,
213
213
  // choose 'bottom', unless it was previously on the top
214
214
  if (this.prevDirectionIsTop && topAvailableHeight >= visualHeight) {
215
- finalDirection = `top`;
215
+ finalDirection = 'top';
216
216
  }
217
217
  else if (bottomAvailableHeight >= visualHeight) {
218
- finalDirection = `bottom`;
218
+ finalDirection = 'bottom';
219
219
  }
220
220
  else {
221
221
  // Corner case — select direction with more space
222
222
  finalDirection =
223
- bottomAvailableHeight >= topAvailableHeight ? `bottom` : `top`;
223
+ bottomAvailableHeight >= topAvailableHeight ? 'bottom' : 'top';
224
224
  }
225
225
  }
226
226
  return finalDirection;
@@ -233,16 +233,16 @@ let TuiDropdownBoxComponent = class TuiDropdownBoxComponent {
233
233
  */
234
234
  calculateWidth(style, directiveRect) {
235
235
  style.width =
236
- this.directive.limitMinWidth === `fixed` && !this.directive.sided
236
+ this.directive.limitMinWidth === 'fixed' && !this.directive.sided
237
237
  ? px(directiveRect.width)
238
- : ``;
239
- if (this.directive.limitMinWidth === `min` && !this.directive.sided) {
238
+ : '';
239
+ if (this.directive.limitMinWidth === 'min' && !this.directive.sided) {
240
240
  style.minWidth = px(directiveRect.width);
241
241
  style.maxWidth = px(DEFAULT_MAX_WIDTH);
242
242
  return;
243
243
  }
244
- style.minWidth = ``;
245
- style.maxWidth = ``;
244
+ style.minWidth = '';
245
+ style.maxWidth = '';
246
246
  }
247
247
  moveFocusOutside(previous) {
248
248
  const { host } = this.directive;
@@ -267,10 +267,10 @@ TuiDropdownBoxComponent.ctorParameters = () => [
267
267
  { type: Observable, decorators: [{ type: Inject, args: [ANIMATION_FRAME,] }] }
268
268
  ];
269
269
  __decorate([
270
- HostBinding(`@tuiDropdownAnimation`)
270
+ HostBinding('@tuiDropdownAnimation')
271
271
  ], TuiDropdownBoxComponent.prototype, "dropdownAnimation", void 0);
272
272
  __decorate([
273
- ViewChild(`content`, { read: ElementRef })
273
+ ViewChild('content', { read: ElementRef })
274
274
  ], TuiDropdownBoxComponent.prototype, "contentElementRef", void 0);
275
275
  __decorate([
276
276
  tuiPure
@@ -283,7 +283,7 @@ __decorate([
283
283
  ], TuiDropdownBoxComponent.prototype, "inOption", null);
284
284
  TuiDropdownBoxComponent = __decorate([
285
285
  Component({
286
- selector: `tui-dropdown-box`,
286
+ selector: 'tui-dropdown-box',
287
287
  template: "<div\n #activeZone=\"tuiActiveZone\"\n class=\"t-wrapper\"\n [tuiOverscroll]=\"overscroll\"\n [tuiMode]=\"null\"\n [tuiActiveZoneParent]=\"directive.activeZone || null\"\n>\n <tui-scrollbar class=\"t-scroll\">\n <div\n tabindex=\"0\"\n (focus)=\"onTopFocus()\"\n ></div>\n <div\n #content\n polymorpheus-outlet\n class=\"t-content\"\n [content]=\"directive.content\"\n [context]=\"getContext(directive.context, activeZone)\"\n ></div>\n <div\n tabindex=\"0\"\n (focus)=\"onBottomFocus()\"\n ></div>\n </tui-scrollbar>\n</div>\n",
288
288
  changeDetection: ChangeDetectionStrategy.Default,
289
289
  providers: [TuiDestroyService],
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-dropdown-box.js","sources":["ng://@taiga-ui/core/components/dropdown-box/dropdown-box.component.ts","ng://@taiga-ui/core/components/dropdown-box/dropdown-box.module.ts","ng://@taiga-ui/core/components/dropdown-box/taiga-ui-core-components-dropdown-box.ts"],"sourcesContent":["import {AnimationOptions} from '@angular/animations';\nimport {\n AfterViewChecked,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n NgZone,\n ViewChild,\n} from '@angular/core';\nimport {ANIMATION_FRAME, WINDOW} from '@ng-web-apis/common';\nimport {\n AbstractTuiPortalHostComponent,\n getClosestFocusable,\n inRange,\n POLLING_TIME,\n px,\n TuiActiveZoneDirective,\n tuiAssertIsHTMLElement,\n TuiDestroyService,\n TuiDropdownHostComponent,\n TuiOverscrollModeT,\n tuiPure,\n tuiZonefree,\n} from '@taiga-ui/cdk';\nimport {tuiDropdownAnimation} from '@taiga-ui/core/animations';\nimport {DEFAULT_MARGIN, DEFAULT_MAX_WIDTH} from '@taiga-ui/core/constants';\nimport {TuiDropdownAnimation} from '@taiga-ui/core/enums';\nimport {TuiAnimationOptions, TuiDropdown} from '@taiga-ui/core/interfaces';\nimport {TUI_ANIMATION_OPTIONS, TUI_DROPDOWN_DIRECTIVE} from '@taiga-ui/core/tokens';\nimport {TuiHorizontalDirection, TuiVerticalDirection} from '@taiga-ui/core/types';\nimport {getScreenWidth, tuiGetViewportWidth} from '@taiga-ui/core/utils/dom';\nimport {fromEvent, merge, Observable} from 'rxjs';\nimport {takeUntil, throttleTime} from 'rxjs/operators';\n\n/**\n * This component is used to show template in a portal using default style of white rounded box with a shadow\n */\n// @bad TODO: OnPush\n// Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395\n// @dynamic\n@Component({\n selector: `tui-dropdown-box`,\n templateUrl: `./dropdown-box.template.html`,\n styleUrls: [`./dropdown-box.style.less`],\n changeDetection: ChangeDetectionStrategy.Default,\n providers: [TuiDestroyService],\n animations: [tuiDropdownAnimation],\n})\nexport class TuiDropdownBoxComponent implements AfterViewChecked {\n private readonly animationTop = {\n value: TuiDropdownAnimation.FadeInTop,\n ...this.options,\n };\n\n private readonly animationBottom = {\n value: TuiDropdownAnimation.FadeInBottom,\n ...this.options,\n };\n\n /**\n * Is previous position on top (to prevent jumping up and down on scroll)\n */\n private prevDirectionIsTop = false;\n\n @HostBinding(`@tuiDropdownAnimation`)\n dropdownAnimation!: TuiAnimationOptions;\n\n @ViewChild(`content`, {read: ElementRef})\n readonly contentElementRef?: ElementRef<HTMLElement>;\n\n constructor(\n @Inject(TuiDestroyService)\n destroy$: TuiDestroyService,\n @Inject(NgZone) ngZone: NgZone,\n @Inject(TUI_DROPDOWN_DIRECTIVE) readonly directive: TuiDropdown,\n @Inject(WINDOW) private readonly windowRef: Window,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(AbstractTuiPortalHostComponent)\n private readonly portalHost: TuiDropdownHostComponent,\n @Inject(TUI_ANIMATION_OPTIONS) private readonly options: AnimationOptions,\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n ) {\n merge(\n animationFrame$.pipe(throttleTime(POLLING_TIME)),\n this.directive.refresh$,\n fromEvent(this.windowRef, `resize`),\n )\n .pipe(tuiZonefree(ngZone), takeUntil(destroy$))\n .subscribe(() => {\n this.calculatePositionAndSize();\n });\n }\n\n get overscroll(): TuiOverscrollModeT {\n return this.inModal ? `all` : `scroll`;\n }\n\n @tuiPure\n getContext<T extends object>(\n context?: T,\n activeZone?: TuiActiveZoneDirective,\n ):\n | (T & {activeZone?: TuiActiveZoneDirective})\n | {activeZone?: TuiActiveZoneDirective} {\n return {...context, activeZone};\n }\n\n ngAfterViewChecked(): void {\n this.calculatePositionAndSize();\n }\n\n onTopFocus(): void {\n this.moveFocusOutside(true);\n }\n\n onBottomFocus(): void {\n this.moveFocusOutside(false);\n }\n\n @tuiPure\n private get inModal(): boolean {\n // @awful TODO: get rid of component tag name dependency\n return !!this.directive.host.closest(`tui-dialog-host`);\n }\n\n @tuiPure\n private get inOption(): boolean {\n // @awful TODO: get rid of component tag name dependency\n return !!this.directive.host.closest(`[tuiOption]`);\n }\n\n private calculatePositionAndSize(): void {\n const {clientRect} = this.directive;\n const {style} = this.elementRef.nativeElement;\n const hostRect = this.directive.fixed\n ? this.portalHost.fixedPositionOffset()\n : this.portalHost.clientRect;\n\n style.position = this.directive.fixed ? `fixed` : `absolute`;\n\n this.calculateVerticalPosition(style, clientRect, hostRect);\n this.calculateHorizontalPosition(style, clientRect, hostRect);\n this.calculateWidth(style, clientRect);\n }\n\n private getFinalAlign(\n style: CSSStyleDeclaration,\n directiveRect: ClientRect,\n ): TuiHorizontalDirection {\n const dropdownRect = this.elementRef.nativeElement.getBoundingClientRect();\n const dropdownWidth = this.elementRef.nativeElement.offsetWidth;\n const screenWidth = getScreenWidth(this.windowRef.document);\n const isDropdownSizeHypotheticallyFitsViewport =\n directiveRect.left + dropdownWidth < screenWidth ||\n directiveRect.right - dropdownWidth > 0;\n const isDropdownSizeActuallyFitsViewport =\n dropdownRect.right <= screenWidth && dropdownRect.left >= 0;\n let finalAlign: TuiHorizontalDirection = this.directive.align;\n\n switch (this.directive.align) {\n case `left`:\n if (\n isDropdownSizeHypotheticallyFitsViewport &&\n dropdownRect.right > screenWidth\n ) {\n finalAlign = `right`;\n }\n\n break;\n case `right`:\n if (isDropdownSizeHypotheticallyFitsViewport && dropdownRect.left < 0) {\n finalAlign = `left`;\n }\n\n break;\n }\n\n if (style.right === `auto` && isDropdownSizeActuallyFitsViewport) {\n finalAlign = `left`;\n }\n\n if (style.left === `auto` && isDropdownSizeActuallyFitsViewport) {\n finalAlign = `right`;\n }\n\n return finalAlign;\n }\n\n /**\n * Calculates horizontal position\n *\n * @param style dropdownBox elementRef styles object\n * @param directiveRect ClientRect of hosting directive\n * @param hostRect ClientRect of portal host\n */\n private calculateHorizontalPosition(\n style: CSSStyleDeclaration,\n directiveRect: ClientRect,\n hostRect: ClientRect,\n ): void {\n const offset = this.directive.sided\n ? this.elementRef.nativeElement.getBoundingClientRect().width + DEFAULT_MARGIN\n : 0;\n const left = Math.ceil(directiveRect.left - hostRect.left - offset);\n const right = Math.floor(hostRect.right - directiveRect.right - offset);\n const viewportWidth = tuiGetViewportWidth(this.windowRef);\n\n switch (this.getFinalAlign(style, directiveRect)) {\n case `left`:\n if (\n right + DEFAULT_MARGIN > viewportWidth ||\n inRange(left + DEFAULT_MARGIN, 0, viewportWidth)\n ) {\n style.left = px(left);\n style.right = `auto`;\n } else {\n style.left = `auto`;\n style.right = px(right);\n }\n\n break;\n case `right`:\n if (\n inRange(right + DEFAULT_MARGIN, 0, viewportWidth) ||\n left + DEFAULT_MARGIN > viewportWidth\n ) {\n style.left = `auto`;\n style.right = px(right);\n } else {\n style.left = px(left);\n style.right = `auto`;\n }\n\n break;\n }\n }\n\n /**\n * Calculates vertical position and height\n *\n * @param style dropdownBox elementRef styles object\n * @param directiveRect ClientRect of hosting directive\n * @param hostRect ClientRect of portal host\n */\n private calculateVerticalPosition(\n style: CSSStyleDeclaration,\n directiveRect: ClientRect,\n hostRect: ClientRect,\n ): void {\n const windowHeight = this.windowRef.innerHeight;\n // Maximum height of the box\n const boxHeightLimit = Math.min(\n this.directive.maxHeight,\n windowHeight - DEFAULT_MARGIN * 2,\n );\n const offset = this.directive.sided\n ? DEFAULT_MARGIN - directiveRect.height\n : DEFAULT_MARGIN * 2;\n const topAvailableHeight = directiveRect.top - offset;\n const bottomAvailableHeight = windowHeight - directiveRect.bottom - offset;\n const finalDirection = this.getFinalDirection(directiveRect);\n const optionOffset = this.inOption ? DEFAULT_MARGIN * 2 : 0;\n\n this.prevDirectionIsTop = finalDirection === `top`;\n\n if (finalDirection === `top`) {\n this.dropdownAnimation = this.animationBottom;\n\n style.maxHeight = px(Math.min(boxHeightLimit, topAvailableHeight));\n style.top = `auto`;\n style.bottom = px(\n hostRect.bottom -\n directiveRect.top -\n DEFAULT_MARGIN +\n offset -\n optionOffset,\n );\n } else {\n this.dropdownAnimation = this.animationTop;\n\n style.maxHeight = px(Math.min(boxHeightLimit, bottomAvailableHeight));\n style.top = px(\n directiveRect.bottom -\n hostRect.top -\n DEFAULT_MARGIN +\n offset -\n optionOffset,\n );\n style.bottom = `auto`;\n }\n }\n\n private getFinalDirection(directiveRect: ClientRect): TuiVerticalDirection | null {\n const windowHeight = this.windowRef.innerHeight;\n const offset = this.directive.sided\n ? DEFAULT_MARGIN - directiveRect.height\n : DEFAULT_MARGIN * 2;\n\n // Maximum space available on top and on the bottom in the viewport\n const topAvailableHeight = directiveRect.top - offset;\n const bottomAvailableHeight = windowHeight - directiveRect.bottom - offset;\n\n let finalDirection: TuiVerticalDirection | null = null;\n\n // Given direction is applied if we can fit the box in the limits that way\n switch (this.directive.direction) {\n case `top`:\n if (topAvailableHeight >= this.directive.minHeight) {\n finalDirection = `top`;\n }\n\n break;\n case `bottom`:\n if (bottomAvailableHeight >= this.directive.minHeight) {\n finalDirection = `bottom`;\n }\n\n break;\n }\n\n // Maximum height of the box\n const boxHeightLimit = Math.min(\n this.directive.maxHeight,\n windowHeight - DEFAULT_MARGIN * 2,\n );\n\n // Choose direction if given direction did not fit\n if (finalDirection === null && this.contentElementRef) {\n // Box height if it fits without scroll\n const visualHeight = Math.min(\n this.contentElementRef.nativeElement.getBoundingClientRect().height +\n (this.elementRef.nativeElement.offsetHeight -\n this.elementRef.nativeElement.clientHeight),\n boxHeightLimit,\n );\n\n // If there is enough space to fit below without scroll,\n // choose 'bottom', unless it was previously on the top\n if (this.prevDirectionIsTop && topAvailableHeight >= visualHeight) {\n finalDirection = `top`;\n } else if (bottomAvailableHeight >= visualHeight) {\n finalDirection = `bottom`;\n } else {\n // Corner case — select direction with more space\n finalDirection =\n bottomAvailableHeight >= topAvailableHeight ? `bottom` : `top`;\n }\n }\n\n return finalDirection;\n }\n\n /**\n * Calculates width\n *\n * @param style dropdownBox elementRef styles object\n * @param directiveRect ClientRect of hosting directive\n */\n private calculateWidth(style: CSSStyleDeclaration, directiveRect: ClientRect): void {\n style.width =\n this.directive.limitMinWidth === `fixed` && !this.directive.sided\n ? px(directiveRect.width)\n : ``;\n\n if (this.directive.limitMinWidth === `min` && !this.directive.sided) {\n style.minWidth = px(directiveRect.width);\n style.maxWidth = px(DEFAULT_MAX_WIDTH);\n\n return;\n }\n\n style.minWidth = ``;\n style.maxWidth = ``;\n }\n\n private moveFocusOutside(previous: boolean): void {\n const {host} = this.directive;\n const {ownerDocument} = host;\n const root = ownerDocument ? ownerDocument.body : host;\n\n tuiAssertIsHTMLElement(host);\n\n let focusable = getClosestFocusable(host, previous, root);\n\n while (focusable !== null && host.contains(focusable)) {\n focusable = getClosestFocusable(focusable, previous, root);\n }\n\n focusable?.focus();\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiActiveZoneModule, TuiOverscrollModule} from '@taiga-ui/cdk';\nimport {TuiScrollbarModule} from '@taiga-ui/core/components/scrollbar';\nimport {TuiModeModule} from '@taiga-ui/core/directives/mode';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDropdownBoxComponent} from './dropdown-box.component';\n\n@NgModule({\n imports: [\n TuiActiveZoneModule,\n PolymorpheusModule,\n TuiOverscrollModule,\n TuiScrollbarModule,\n TuiModeModule,\n ],\n entryComponents: [TuiDropdownBoxComponent],\n declarations: [TuiDropdownBoxComponent],\n exports: [TuiDropdownBoxComponent],\n})\nexport class TuiDropdownBoxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAoCA;;;AAGA;AACA;AACA;IASa,uBAAuB,GAApC,MAAa,uBAAuB;IAsBhC,YAEI,QAA2B,EACX,MAAc,EACW,SAAsB,EAC9B,SAAiB,EACb,UAAmC,EAEvD,UAAoC,EACL,OAAyB,EAChD,eAAmC;QANnB,cAAS,GAAT,SAAS,CAAa;QAC9B,cAAS,GAAT,SAAS,CAAQ;QACb,eAAU,GAAV,UAAU,CAAyB;QAEvD,eAAU,GAAV,UAAU,CAA0B;QACL,YAAO,GAAP,OAAO,CAAkB;QA9B5D,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IP;AAGD;IADC,OAAO;uDAIP;AAjFQ,uBAAuB;IARnC,SAAS,CAAC;QACP,QAAQ,EAAE,kBAAkB;QAC5B,6rBAA2C;QAE3C,eAAe,EAAE,uBAAuB,CAAC,OAAO;QAChD,SAAS,EAAE,CAAC,iBAAiB,CAAC;QAC9B,UAAU,EAAE,CAAC,oBAAoB,CAAC;;KACrC,CAAC;IAwBO,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;IAEzB,WAAA,MAAM,CAAC,MAAM,CAAC,CAAA;IACd,WAAA,MAAM,CAAC,sBAAsB,CAAC,CAAA;IAC9B,WAAA,MAAM,CAAC,MAAM,CAAC,CAAA;IACd,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,MAAM,CAAC,8BAA8B,CAAC,CAAA;IAEtC,WAAA,MAAM,CAAC,qBAAqB,CAAC,CAAA;IAC7B,WAAA,MAAM,CAAC,eAAe,CAAC,CAAA;GAhCnB,uBAAuB,CAsVnC;;ICpXY,oBAAoB,GAAjC,MAAa,oBAAoB;EAAG;AAAvB,oBAAoB;IAZhC,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,mBAAmB;YACnB,kBAAkB;YAClB,mBAAmB;YACnB,kBAAkB;YAClB,aAAa;SAChB;QACD,eAAe,EAAE,CAAC,uBAAuB,CAAC;QAC1C,YAAY,EAAE,CAAC,uBAAuB,CAAC;QACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;KACrC,CAAC;GACW,oBAAoB,CAAG;;ACpBpC;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-components-dropdown-box.js","sources":["ng://@taiga-ui/core/components/dropdown-box/dropdown-box.component.ts","ng://@taiga-ui/core/components/dropdown-box/dropdown-box.module.ts","ng://@taiga-ui/core/components/dropdown-box/taiga-ui-core-components-dropdown-box.ts"],"sourcesContent":["import {AnimationOptions} from '@angular/animations';\nimport {\n AfterViewChecked,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n NgZone,\n ViewChild,\n} from '@angular/core';\nimport {ANIMATION_FRAME, WINDOW} from '@ng-web-apis/common';\nimport {\n AbstractTuiPortalHostComponent,\n getClosestFocusable,\n inRange,\n POLLING_TIME,\n px,\n TuiActiveZoneDirective,\n tuiAssertIsHTMLElement,\n TuiDestroyService,\n TuiDropdownHostComponent,\n TuiOverscrollModeT,\n tuiPure,\n tuiZonefree,\n} from '@taiga-ui/cdk';\nimport {tuiDropdownAnimation} from '@taiga-ui/core/animations';\nimport {DEFAULT_MARGIN, DEFAULT_MAX_WIDTH} from '@taiga-ui/core/constants';\nimport {TuiDropdownAnimation} from '@taiga-ui/core/enums';\nimport {TuiAnimationOptions, TuiDropdown} from '@taiga-ui/core/interfaces';\nimport {TUI_ANIMATION_OPTIONS, TUI_DROPDOWN_DIRECTIVE} from '@taiga-ui/core/tokens';\nimport {TuiHorizontalDirection, TuiVerticalDirection} from '@taiga-ui/core/types';\nimport {getScreenWidth, tuiGetViewportWidth} from '@taiga-ui/core/utils/dom';\nimport {fromEvent, merge, Observable} from 'rxjs';\nimport {takeUntil, throttleTime} from 'rxjs/operators';\n\n/**\n * This component is used to show template in a portal using default style of white rounded box with a shadow\n */\n// @bad TODO: OnPush\n// Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395\n// @dynamic\n@Component({\n selector: 'tui-dropdown-box',\n templateUrl: './dropdown-box.template.html',\n styleUrls: ['./dropdown-box.style.less'],\n changeDetection: ChangeDetectionStrategy.Default,\n providers: [TuiDestroyService],\n animations: [tuiDropdownAnimation],\n})\nexport class TuiDropdownBoxComponent implements AfterViewChecked {\n private readonly animationTop = {\n value: TuiDropdownAnimation.FadeInTop,\n ...this.options,\n };\n\n private readonly animationBottom = {\n value: TuiDropdownAnimation.FadeInBottom,\n ...this.options,\n };\n\n /**\n * Is previous position on top (to prevent jumping up and down on scroll)\n */\n private prevDirectionIsTop = false;\n\n @HostBinding('@tuiDropdownAnimation')\n dropdownAnimation!: TuiAnimationOptions;\n\n @ViewChild('content', {read: ElementRef})\n readonly contentElementRef?: ElementRef<HTMLElement>;\n\n constructor(\n @Inject(TuiDestroyService)\n destroy$: TuiDestroyService,\n @Inject(NgZone) ngZone: NgZone,\n @Inject(TUI_DROPDOWN_DIRECTIVE) readonly directive: TuiDropdown,\n @Inject(WINDOW) private readonly windowRef: Window,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(AbstractTuiPortalHostComponent)\n private readonly portalHost: TuiDropdownHostComponent,\n @Inject(TUI_ANIMATION_OPTIONS) private readonly options: AnimationOptions,\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n ) {\n merge(\n animationFrame$.pipe(throttleTime(POLLING_TIME)),\n this.directive.refresh$,\n fromEvent(this.windowRef, 'resize'),\n )\n .pipe(tuiZonefree(ngZone), takeUntil(destroy$))\n .subscribe(() => {\n this.calculatePositionAndSize();\n });\n }\n\n get overscroll(): TuiOverscrollModeT {\n return this.inModal ? 'all' : 'scroll';\n }\n\n @tuiPure\n getContext<T extends Record<string, any>>(\n context?: T,\n activeZone?: TuiActiveZoneDirective,\n ):\n | {activeZone?: TuiActiveZoneDirective}\n | (T & {activeZone?: TuiActiveZoneDirective}) {\n return {...context, activeZone};\n }\n\n ngAfterViewChecked(): void {\n this.calculatePositionAndSize();\n }\n\n onTopFocus(): void {\n this.moveFocusOutside(true);\n }\n\n onBottomFocus(): void {\n this.moveFocusOutside(false);\n }\n\n @tuiPure\n private get inModal(): boolean {\n // @awful TODO: get rid of component tag name dependency\n return !!this.directive.host.closest('tui-dialog-host');\n }\n\n @tuiPure\n private get inOption(): boolean {\n // @awful TODO: get rid of component tag name dependency\n return !!this.directive.host.closest('[tuiOption]');\n }\n\n private calculatePositionAndSize(): void {\n const {clientRect} = this.directive;\n const {style} = this.elementRef.nativeElement;\n const hostRect = this.directive.fixed\n ? this.portalHost.fixedPositionOffset()\n : this.portalHost.clientRect;\n\n style.position = this.directive.fixed ? 'fixed' : 'absolute';\n\n this.calculateVerticalPosition(style, clientRect, hostRect);\n this.calculateHorizontalPosition(style, clientRect, hostRect);\n this.calculateWidth(style, clientRect);\n }\n\n private getFinalAlign(\n style: CSSStyleDeclaration,\n directiveRect: ClientRect,\n ): TuiHorizontalDirection {\n const dropdownRect = this.elementRef.nativeElement.getBoundingClientRect();\n const dropdownWidth = this.elementRef.nativeElement.offsetWidth;\n const screenWidth = getScreenWidth(this.windowRef.document);\n const isDropdownSizeHypotheticallyFitsViewport =\n directiveRect.left + dropdownWidth < screenWidth ||\n directiveRect.right - dropdownWidth > 0;\n const isDropdownSizeActuallyFitsViewport =\n dropdownRect.right <= screenWidth && dropdownRect.left >= 0;\n let finalAlign: TuiHorizontalDirection = this.directive.align;\n\n switch (this.directive.align) {\n case 'left':\n if (\n isDropdownSizeHypotheticallyFitsViewport &&\n dropdownRect.right > screenWidth\n ) {\n finalAlign = 'right';\n }\n\n break;\n case 'right':\n if (isDropdownSizeHypotheticallyFitsViewport && dropdownRect.left < 0) {\n finalAlign = 'left';\n }\n\n break;\n }\n\n if (style.right === 'auto' && isDropdownSizeActuallyFitsViewport) {\n finalAlign = 'left';\n }\n\n if (style.left === 'auto' && isDropdownSizeActuallyFitsViewport) {\n finalAlign = 'right';\n }\n\n return finalAlign;\n }\n\n /**\n * Calculates horizontal position\n *\n * @param style dropdownBox elementRef styles object\n * @param directiveRect ClientRect of hosting directive\n * @param hostRect ClientRect of portal host\n */\n private calculateHorizontalPosition(\n style: CSSStyleDeclaration,\n directiveRect: ClientRect,\n hostRect: ClientRect,\n ): void {\n const offset = this.directive.sided\n ? this.elementRef.nativeElement.getBoundingClientRect().width + DEFAULT_MARGIN\n : 0;\n const left = Math.ceil(directiveRect.left - hostRect.left - offset);\n const right = Math.floor(hostRect.right - directiveRect.right - offset);\n const viewportWidth = tuiGetViewportWidth(this.windowRef);\n\n switch (this.getFinalAlign(style, directiveRect)) {\n case 'left':\n if (\n right + DEFAULT_MARGIN > viewportWidth ||\n inRange(left + DEFAULT_MARGIN, 0, viewportWidth)\n ) {\n style.left = px(left);\n style.right = 'auto';\n } else {\n style.left = 'auto';\n style.right = px(right);\n }\n\n break;\n case 'right':\n if (\n inRange(right + DEFAULT_MARGIN, 0, viewportWidth) ||\n left + DEFAULT_MARGIN > viewportWidth\n ) {\n style.left = 'auto';\n style.right = px(right);\n } else {\n style.left = px(left);\n style.right = 'auto';\n }\n\n break;\n }\n }\n\n /**\n * Calculates vertical position and height\n *\n * @param style dropdownBox elementRef styles object\n * @param directiveRect ClientRect of hosting directive\n * @param hostRect ClientRect of portal host\n */\n private calculateVerticalPosition(\n style: CSSStyleDeclaration,\n directiveRect: ClientRect,\n hostRect: ClientRect,\n ): void {\n const windowHeight = this.windowRef.innerHeight;\n // Maximum height of the box\n const boxHeightLimit = Math.min(\n this.directive.maxHeight,\n windowHeight - DEFAULT_MARGIN * 2,\n );\n const offset = this.directive.sided\n ? DEFAULT_MARGIN - directiveRect.height\n : DEFAULT_MARGIN * 2;\n const topAvailableHeight = directiveRect.top - offset;\n const bottomAvailableHeight = windowHeight - directiveRect.bottom - offset;\n const finalDirection = this.getFinalDirection(directiveRect);\n const optionOffset = this.inOption ? DEFAULT_MARGIN * 2 : 0;\n\n this.prevDirectionIsTop = finalDirection === 'top';\n\n if (finalDirection === 'top') {\n this.dropdownAnimation = this.animationBottom;\n\n style.maxHeight = px(Math.min(boxHeightLimit, topAvailableHeight));\n style.top = 'auto';\n style.bottom = px(\n hostRect.bottom -\n directiveRect.top -\n DEFAULT_MARGIN +\n offset -\n optionOffset,\n );\n } else {\n this.dropdownAnimation = this.animationTop;\n\n style.maxHeight = px(Math.min(boxHeightLimit, bottomAvailableHeight));\n style.top = px(\n directiveRect.bottom -\n hostRect.top -\n DEFAULT_MARGIN +\n offset -\n optionOffset,\n );\n style.bottom = 'auto';\n }\n }\n\n private getFinalDirection(directiveRect: ClientRect): TuiVerticalDirection | null {\n const windowHeight = this.windowRef.innerHeight;\n const offset = this.directive.sided\n ? DEFAULT_MARGIN - directiveRect.height\n : DEFAULT_MARGIN * 2;\n\n // Maximum space available on top and on the bottom in the viewport\n const topAvailableHeight = directiveRect.top - offset;\n const bottomAvailableHeight = windowHeight - directiveRect.bottom - offset;\n\n let finalDirection: TuiVerticalDirection | null = null;\n\n // Given direction is applied if we can fit the box in the limits that way\n switch (this.directive.direction) {\n case 'top':\n if (topAvailableHeight >= this.directive.minHeight) {\n finalDirection = 'top';\n }\n\n break;\n case 'bottom':\n if (bottomAvailableHeight >= this.directive.minHeight) {\n finalDirection = 'bottom';\n }\n\n break;\n }\n\n // Maximum height of the box\n const boxHeightLimit = Math.min(\n this.directive.maxHeight,\n windowHeight - DEFAULT_MARGIN * 2,\n );\n\n // Choose direction if given direction did not fit\n if (finalDirection === null && this.contentElementRef) {\n // Box height if it fits without scroll\n const visualHeight = Math.min(\n this.contentElementRef.nativeElement.getBoundingClientRect().height +\n (this.elementRef.nativeElement.offsetHeight -\n this.elementRef.nativeElement.clientHeight),\n boxHeightLimit,\n );\n\n // If there is enough space to fit below without scroll,\n // choose 'bottom', unless it was previously on the top\n if (this.prevDirectionIsTop && topAvailableHeight >= visualHeight) {\n finalDirection = 'top';\n } else if (bottomAvailableHeight >= visualHeight) {\n finalDirection = 'bottom';\n } else {\n // Corner case — select direction with more space\n finalDirection =\n bottomAvailableHeight >= topAvailableHeight ? 'bottom' : 'top';\n }\n }\n\n return finalDirection;\n }\n\n /**\n * Calculates width\n *\n * @param style dropdownBox elementRef styles object\n * @param directiveRect ClientRect of hosting directive\n */\n private calculateWidth(style: CSSStyleDeclaration, directiveRect: ClientRect): void {\n style.width =\n this.directive.limitMinWidth === 'fixed' && !this.directive.sided\n ? px(directiveRect.width)\n : '';\n\n if (this.directive.limitMinWidth === 'min' && !this.directive.sided) {\n style.minWidth = px(directiveRect.width);\n style.maxWidth = px(DEFAULT_MAX_WIDTH);\n\n return;\n }\n\n style.minWidth = '';\n style.maxWidth = '';\n }\n\n private moveFocusOutside(previous: boolean): void {\n const {host} = this.directive;\n const {ownerDocument} = host;\n const root = ownerDocument ? ownerDocument.body : host;\n\n tuiAssertIsHTMLElement(host);\n\n let focusable = getClosestFocusable(host, previous, root);\n\n while (focusable !== null && host.contains(focusable)) {\n focusable = getClosestFocusable(focusable, previous, root);\n }\n\n focusable?.focus();\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiActiveZoneModule, TuiOverscrollModule} from '@taiga-ui/cdk';\nimport {TuiScrollbarModule} from '@taiga-ui/core/components/scrollbar';\nimport {TuiModeModule} from '@taiga-ui/core/directives/mode';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDropdownBoxComponent} from './dropdown-box.component';\n\n@NgModule({\n imports: [\n TuiActiveZoneModule,\n PolymorpheusModule,\n TuiOverscrollModule,\n TuiScrollbarModule,\n TuiModeModule,\n ],\n entryComponents: [TuiDropdownBoxComponent],\n declarations: [TuiDropdownBoxComponent],\n exports: [TuiDropdownBoxComponent],\n})\nexport class TuiDropdownBoxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAoCA;;;AAGA;AACA;AACA;IASa,uBAAuB,GAApC,MAAa,uBAAuB;IAsBhC,YAEI,QAA2B,EACX,MAAc,EACW,SAAsB,EAC9B,SAAiB,EACb,UAAmC,EAEvD,UAAoC,EACL,OAAyB,EAChD,eAAmC;QANnB,cAAS,GAAT,SAAS,CAAa;QAC9B,cAAS,GAAT,SAAS,CAAQ;QACb,eAAU,GAAV,UAAU,CAAyB;QAEvD,eAAU,GAAV,UAAU,CAA0B;QACL,YAAO,GAAP,OAAO,CAAkB;QA9B5D,iBAAY,mBACzB,KAAK,iCACF,IAAI,CAAC,OAAO,EACjB;QAEe,oBAAe,mBAC5B,KAAK,uCACF,IAAI,CAAC,OAAO,EACjB;;;;QAKM,uBAAkB,GAAG,KAAK,CAAC;QAoB/B,KAAK,CACD,eAAe,CAAC,IAAI,CAAC,YAAY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