@taiga-ui/kit 2.13.0 → 2.16.0-fixed

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 (434) hide show
  1. package/abstract/input-slider.d.ts +4 -3
  2. package/abstract/slider/slider.d.ts +2 -2
  3. package/abstract/taiga-ui-kit-abstract.metadata.json +1 -1
  4. package/bundles/taiga-ui-kit-abstract.umd.js +28 -12
  5. package/bundles/taiga-ui-kit-abstract.umd.js.map +1 -1
  6. package/bundles/taiga-ui-kit-abstract.umd.min.js +2 -2
  7. package/bundles/taiga-ui-kit-abstract.umd.min.js.map +1 -1
  8. package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js +1 -1
  9. package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js.map +1 -1
  10. package/bundles/taiga-ui-kit-components-breadcrumbs.umd.min.js +1 -1
  11. package/bundles/taiga-ui-kit-components-breadcrumbs.umd.min.js.map +1 -1
  12. package/bundles/taiga-ui-kit-components-checkbox.umd.js +1 -1
  13. package/bundles/taiga-ui-kit-components-checkbox.umd.min.js +1 -1
  14. package/bundles/taiga-ui-kit-components-checkbox.umd.min.js.map +1 -1
  15. package/bundles/taiga-ui-kit-components-field-error.umd.js +17 -6
  16. package/bundles/taiga-ui-kit-components-field-error.umd.js.map +1 -1
  17. package/bundles/taiga-ui-kit-components-field-error.umd.min.js +2 -2
  18. package/bundles/taiga-ui-kit-components-field-error.umd.min.js.map +1 -1
  19. package/bundles/taiga-ui-kit-components-input-count.umd.js +86 -30
  20. package/bundles/taiga-ui-kit-components-input-count.umd.js.map +1 -1
  21. package/bundles/taiga-ui-kit-components-input-count.umd.min.js +2 -2
  22. package/bundles/taiga-ui-kit-components-input-count.umd.min.js.map +1 -1
  23. package/bundles/taiga-ui-kit-components-input-date-range.umd.js +24 -24
  24. package/bundles/taiga-ui-kit-components-input-date-range.umd.js.map +1 -1
  25. package/bundles/taiga-ui-kit-components-input-date-range.umd.min.js +2 -2
  26. package/bundles/taiga-ui-kit-components-input-date-range.umd.min.js.map +1 -1
  27. package/bundles/taiga-ui-kit-components-input-date-time.umd.js +61 -32
  28. package/bundles/taiga-ui-kit-components-input-date-time.umd.js.map +1 -1
  29. package/bundles/taiga-ui-kit-components-input-date-time.umd.min.js +2 -2
  30. package/bundles/taiga-ui-kit-components-input-date-time.umd.min.js.map +1 -1
  31. package/bundles/taiga-ui-kit-components-input-date.umd.js +18 -17
  32. package/bundles/taiga-ui-kit-components-input-date.umd.js.map +1 -1
  33. package/bundles/taiga-ui-kit-components-input-date.umd.min.js +2 -2
  34. package/bundles/taiga-ui-kit-components-input-date.umd.min.js.map +1 -1
  35. package/bundles/taiga-ui-kit-components-input-file.umd.js +1 -0
  36. package/bundles/taiga-ui-kit-components-input-file.umd.js.map +1 -1
  37. package/bundles/taiga-ui-kit-components-input-file.umd.min.js.map +1 -1
  38. package/bundles/taiga-ui-kit-components-input-number.umd.js +28 -14
  39. package/bundles/taiga-ui-kit-components-input-number.umd.js.map +1 -1
  40. package/bundles/taiga-ui-kit-components-input-number.umd.min.js +2 -2
  41. package/bundles/taiga-ui-kit-components-input-number.umd.min.js.map +1 -1
  42. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js +23 -7
  43. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js.map +1 -1
  44. package/bundles/taiga-ui-kit-components-input-phone-international.umd.min.js +2 -2
  45. package/bundles/taiga-ui-kit-components-input-phone-international.umd.min.js.map +1 -1
  46. package/bundles/taiga-ui-kit-components-input-phone.umd.js +15 -4
  47. package/bundles/taiga-ui-kit-components-input-phone.umd.js.map +1 -1
  48. package/bundles/taiga-ui-kit-components-input-phone.umd.min.js +1 -1
  49. package/bundles/taiga-ui-kit-components-input-phone.umd.min.js.map +1 -1
  50. package/bundles/taiga-ui-kit-components-input-range.umd.js +20 -15
  51. package/bundles/taiga-ui-kit-components-input-range.umd.js.map +1 -1
  52. package/bundles/taiga-ui-kit-components-input-range.umd.min.js +2 -2
  53. package/bundles/taiga-ui-kit-components-input-range.umd.min.js.map +1 -1
  54. package/bundles/taiga-ui-kit-components-input-slider.umd.js +15 -10
  55. package/bundles/taiga-ui-kit-components-input-slider.umd.js.map +1 -1
  56. package/bundles/taiga-ui-kit-components-input-slider.umd.min.js +1 -1
  57. package/bundles/taiga-ui-kit-components-input-slider.umd.min.js.map +1 -1
  58. package/bundles/taiga-ui-kit-components-input-tag.umd.js +5 -3
  59. package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
  60. package/bundles/taiga-ui-kit-components-input-tag.umd.min.js +2 -2
  61. package/bundles/taiga-ui-kit-components-input-tag.umd.min.js.map +1 -1
  62. package/bundles/taiga-ui-kit-components-input-time.umd.js +1 -0
  63. package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
  64. package/bundles/taiga-ui-kit-components-input-time.umd.min.js.map +1 -1
  65. package/bundles/taiga-ui-kit-components-multi-select.umd.js +20 -6
  66. package/bundles/taiga-ui-kit-components-multi-select.umd.js.map +1 -1
  67. package/bundles/taiga-ui-kit-components-multi-select.umd.min.js +1 -1
  68. package/bundles/taiga-ui-kit-components-multi-select.umd.min.js.map +1 -1
  69. package/bundles/taiga-ui-kit-components-progress.umd.js +325 -0
  70. package/bundles/taiga-ui-kit-components-progress.umd.js.map +1 -0
  71. package/bundles/taiga-ui-kit-components-progress.umd.min.js +16 -0
  72. package/bundles/taiga-ui-kit-components-progress.umd.min.js.map +1 -0
  73. package/bundles/taiga-ui-kit-components-radio.umd.js +1 -1
  74. package/bundles/taiga-ui-kit-components-radio.umd.min.js +1 -1
  75. package/bundles/taiga-ui-kit-components-radio.umd.min.js.map +1 -1
  76. package/bundles/taiga-ui-kit-components-range.umd.js +1 -2
  77. package/bundles/taiga-ui-kit-components-range.umd.js.map +1 -1
  78. package/bundles/taiga-ui-kit-components-range.umd.min.js +1 -1
  79. package/bundles/taiga-ui-kit-components-range.umd.min.js.map +1 -1
  80. package/bundles/taiga-ui-kit-components-select-option.umd.js +1 -1
  81. package/bundles/taiga-ui-kit-components-select-option.umd.min.js +1 -1
  82. package/bundles/taiga-ui-kit-components-select-option.umd.min.js.map +1 -1
  83. package/bundles/taiga-ui-kit-components-slider.umd.js +1 -2
  84. package/bundles/taiga-ui-kit-components-slider.umd.js.map +1 -1
  85. package/bundles/taiga-ui-kit-components-slider.umd.min.js +1 -1
  86. package/bundles/taiga-ui-kit-components-slider.umd.min.js.map +1 -1
  87. package/bundles/taiga-ui-kit-components-tabs.umd.js +17 -9
  88. package/bundles/taiga-ui-kit-components-tabs.umd.js.map +1 -1
  89. package/bundles/taiga-ui-kit-components-tabs.umd.min.js +1 -1
  90. package/bundles/taiga-ui-kit-components-tabs.umd.min.js.map +1 -1
  91. package/bundles/taiga-ui-kit-components-tag.umd.js +1 -1
  92. package/bundles/taiga-ui-kit-components-tag.umd.min.js +1 -1
  93. package/bundles/taiga-ui-kit-components-tag.umd.min.js.map +1 -1
  94. package/bundles/taiga-ui-kit-components-text-area.umd.js +16 -2
  95. package/bundles/taiga-ui-kit-components-text-area.umd.js.map +1 -1
  96. package/bundles/taiga-ui-kit-components-text-area.umd.min.js +2 -2
  97. package/bundles/taiga-ui-kit-components-text-area.umd.min.js.map +1 -1
  98. package/bundles/taiga-ui-kit-components-toggle.umd.js +52 -26
  99. package/bundles/taiga-ui-kit-components-toggle.umd.js.map +1 -1
  100. package/bundles/taiga-ui-kit-components-toggle.umd.min.js +2 -2
  101. package/bundles/taiga-ui-kit-components-toggle.umd.min.js.map +1 -1
  102. package/bundles/taiga-ui-kit-components.umd.js +12 -4
  103. package/bundles/taiga-ui-kit-components.umd.js.map +1 -1
  104. package/bundles/taiga-ui-kit-components.umd.min.js +1 -1
  105. package/bundles/taiga-ui-kit-directives-dropdown-context.umd.js +390 -0
  106. package/bundles/taiga-ui-kit-directives-dropdown-context.umd.js.map +1 -0
  107. package/bundles/taiga-ui-kit-directives-dropdown-context.umd.min.js +16 -0
  108. package/bundles/taiga-ui-kit-directives-dropdown-context.umd.min.js.map +1 -0
  109. package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js +1 -0
  110. package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js.map +1 -1
  111. package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.min.js.map +1 -1
  112. package/bundles/taiga-ui-kit-directives.umd.js +12 -4
  113. package/bundles/taiga-ui-kit-directives.umd.js.map +1 -1
  114. package/bundles/taiga-ui-kit-directives.umd.min.js +1 -1
  115. package/bundles/taiga-ui-kit-tokens.umd.js +4 -0
  116. package/bundles/taiga-ui-kit-tokens.umd.js.map +1 -1
  117. package/bundles/taiga-ui-kit-tokens.umd.min.js +1 -1
  118. package/bundles/taiga-ui-kit-tokens.umd.min.js.map +1 -1
  119. package/bundles/taiga-ui-kit-utils-mask.umd.js +7 -7
  120. package/bundles/taiga-ui-kit-utils-mask.umd.js.map +1 -1
  121. package/bundles/taiga-ui-kit-utils-mask.umd.min.js +2 -2
  122. package/bundles/taiga-ui-kit-utils-mask.umd.min.js.map +1 -1
  123. package/bundles/taiga-ui-kit-validators.umd.js +1 -0
  124. package/bundles/taiga-ui-kit-validators.umd.js.map +1 -1
  125. package/bundles/taiga-ui-kit-validators.umd.min.js.map +1 -1
  126. package/components/breadcrumbs/taiga-ui-kit-components-breadcrumbs.metadata.json +1 -1
  127. package/components/checkbox/taiga-ui-kit-components-checkbox.metadata.json +1 -1
  128. package/components/field-error/field-error.component.d.ts +2 -0
  129. package/components/field-error/taiga-ui-kit-components-field-error.metadata.json +1 -1
  130. package/components/index.d.ts +1 -0
  131. package/components/input-count/index.d.ts +1 -0
  132. package/components/input-count/input-count-options.d.ts +19 -0
  133. package/components/input-count/input-count.component.d.ts +10 -3
  134. package/components/input-count/taiga-ui-kit-components-input-count.metadata.json +1 -1
  135. package/components/input-date/input-date.component.d.ts +7 -4
  136. package/components/input-date/taiga-ui-kit-components-input-date.metadata.json +1 -1
  137. package/components/input-date-range/input-date-range.component.d.ts +8 -5
  138. package/components/input-date-range/taiga-ui-kit-components-input-date-range.metadata.json +1 -1
  139. package/components/input-date-time/input-date-time.component.d.ts +10 -5
  140. package/components/input-date-time/taiga-ui-kit-components-input-date-time.metadata.json +1 -1
  141. package/components/input-number/input-number.component.d.ts +4 -2
  142. package/components/input-number/taiga-ui-kit-components-input-number.metadata.json +1 -1
  143. package/components/input-phone/input-phone.component.d.ts +4 -2
  144. package/components/input-phone/taiga-ui-kit-components-input-phone.metadata.json +1 -1
  145. package/components/input-phone-international/input-phone-international.component.d.ts +5 -1
  146. package/components/input-phone-international/taiga-ui-kit-components-input-phone-international.metadata.json +1 -1
  147. package/components/input-range/input-range.component.d.ts +4 -2
  148. package/components/input-range/taiga-ui-kit-components-input-range.metadata.json +1 -1
  149. package/components/input-slider/input-slider.component.d.ts +4 -2
  150. package/components/input-slider/taiga-ui-kit-components-input-slider.metadata.json +1 -1
  151. package/components/input-tag/taiga-ui-kit-components-input-tag.metadata.json +1 -1
  152. package/components/input-time/taiga-ui-kit-components-input-time.metadata.json +1 -1
  153. package/components/multi-select/multi-select.component.d.ts +4 -2
  154. package/components/multi-select/taiga-ui-kit-components-multi-select.metadata.json +1 -1
  155. package/components/progress/index.d.ts +4 -0
  156. package/components/progress/package.json +13 -0
  157. package/components/progress/pipes/progress-color-segments.pipe.d.ts +8 -0
  158. package/components/progress/progress-bar/progress-bar.component.d.ts +5 -0
  159. package/components/progress/progress-label/progress-label.component.d.ts +2 -0
  160. package/components/progress/progress.module.d.ts +2 -0
  161. package/components/progress/taiga-ui-kit-components-progress.d.ts +4 -0
  162. package/components/progress/taiga-ui-kit-components-progress.metadata.json +1 -0
  163. package/components/radio/taiga-ui-kit-components-radio.metadata.json +1 -1
  164. package/components/range/taiga-ui-kit-components-range.metadata.json +1 -1
  165. package/components/select-option/taiga-ui-kit-components-select-option.metadata.json +1 -1
  166. package/components/slider/taiga-ui-kit-components-slider.metadata.json +1 -1
  167. package/components/tabs/tab/tab.component.d.ts +5 -2
  168. package/components/tabs/taiga-ui-kit-components-tabs.metadata.json +1 -1
  169. package/components/tag/taiga-ui-kit-components-tag.metadata.json +1 -1
  170. package/components/taiga-ui-kit-components.metadata.json +1 -1
  171. package/components/text-area/taiga-ui-kit-components-text-area.metadata.json +1 -1
  172. package/components/text-area/text-area.component.d.ts +2 -0
  173. package/components/toggle/index.d.ts +1 -0
  174. package/components/toggle/taiga-ui-kit-components-toggle.metadata.json +1 -1
  175. package/components/toggle/toggle-options.d.ts +16 -0
  176. package/components/toggle/toggle.component.d.ts +7 -4
  177. package/directives/dropdown-context/dropdown-context.directive.d.ts +28 -0
  178. package/directives/dropdown-context/dropdown-context.module.d.ts +2 -0
  179. package/directives/dropdown-context/index.d.ts +2 -0
  180. package/directives/dropdown-context/package.json +13 -0
  181. package/directives/dropdown-context/taiga-ui-kit-directives-dropdown-context.d.ts +4 -0
  182. package/directives/dropdown-context/taiga-ui-kit-directives-dropdown-context.metadata.json +1 -0
  183. package/directives/index.d.ts +1 -0
  184. package/directives/taiga-ui-kit-directives.metadata.json +1 -1
  185. package/esm2015/abstract/input-slider.js +14 -9
  186. package/esm2015/abstract/slider/slider.js +10 -6
  187. package/esm2015/components/breadcrumbs/breadcrumbs-wrapper.component.js +2 -2
  188. package/esm2015/components/checkbox/checkbox.component.js +1 -1
  189. package/esm2015/components/field-error/field-error.component.js +10 -2
  190. package/esm2015/components/field-error/field-error.module.js +2 -3
  191. package/esm2015/components/index.js +2 -1
  192. package/esm2015/components/input-count/index.js +2 -1
  193. package/esm2015/components/input-count/input-count-options.js +21 -0
  194. package/esm2015/components/input-count/input-count.component.js +49 -25
  195. package/esm2015/components/input-count/input-count.module.js +3 -1
  196. package/esm2015/components/input-date/input-date.component.js +18 -13
  197. package/esm2015/components/input-date/input-date.module.js +3 -2
  198. package/esm2015/components/input-date-range/input-date-range.component.js +25 -20
  199. package/esm2015/components/input-date-time/input-date-time.component.js +58 -38
  200. package/esm2015/components/input-file/file/file.component.js +2 -1
  201. package/esm2015/components/input-number/input-number.component.js +26 -16
  202. package/esm2015/components/input-phone/input-phone.component.js +13 -6
  203. package/esm2015/components/input-phone-international/input-phone-international.component.js +23 -8
  204. package/esm2015/components/input-phone-international/input-phone-international.module.js +5 -4
  205. package/esm2015/components/input-range/input-range.component.js +22 -16
  206. package/esm2015/components/input-range/input-range.module.js +2 -3
  207. package/esm2015/components/input-slider/input-slider.component.js +17 -11
  208. package/esm2015/components/input-slider/input-slider.module.js +2 -3
  209. package/esm2015/components/input-tag/input-tag.component.js +6 -4
  210. package/esm2015/components/input-time/input-time.component.js +2 -1
  211. package/esm2015/components/multi-select/multi-select.component.js +18 -8
  212. package/esm2015/components/progress/index.js +5 -0
  213. package/esm2015/components/progress/pipes/progress-color-segments.pipe.js +34 -0
  214. package/esm2015/components/progress/progress-bar/progress-bar.component.js +27 -0
  215. package/esm2015/components/progress/progress-label/progress-label.component.js +14 -0
  216. package/esm2015/components/progress/progress.module.js +25 -0
  217. package/esm2015/components/progress/taiga-ui-kit-components-progress.js +5 -0
  218. package/esm2015/components/radio/radio.component.js +1 -1
  219. package/esm2015/components/range/range.component.js +2 -2
  220. package/esm2015/components/range/range.module.js +2 -3
  221. package/esm2015/components/select-option/select-option.component.js +1 -1
  222. package/esm2015/components/slider/slider.component.js +2 -2
  223. package/esm2015/components/slider/slider.module.js +2 -3
  224. package/esm2015/components/tabs/tab/tab.component.js +19 -11
  225. package/esm2015/components/tabs/underline/underline.component.js +1 -1
  226. package/esm2015/components/tag/tag.component.js +1 -1
  227. package/esm2015/components/text-area/text-area.component.js +9 -3
  228. package/esm2015/components/toggle/index.js +2 -1
  229. package/esm2015/components/toggle/toggle-options.js +19 -0
  230. package/esm2015/components/toggle/toggle.component.js +19 -15
  231. package/esm2015/components/toggle/toggle.module.js +3 -1
  232. package/esm2015/directives/dropdown-context/dropdown-context.directive.js +137 -0
  233. package/esm2015/directives/dropdown-context/dropdown-context.module.js +15 -0
  234. package/esm2015/directives/dropdown-context/index.js +3 -0
  235. package/esm2015/directives/dropdown-context/taiga-ui-kit-directives-dropdown-context.js +5 -0
  236. package/esm2015/directives/dropdown-selection/dropdown-selection.directive.js +2 -1
  237. package/esm2015/directives/index.js +2 -1
  238. package/esm2015/interfaces/with-date-mask-pipe-config.js +1 -1
  239. package/esm2015/tokens/i18n.js +4 -1
  240. package/esm2015/utils/mask/create-auto-corrected-date-pipe.js +3 -3
  241. package/esm2015/utils/mask/create-auto-corrected-date-range-pipe.js +7 -7
  242. package/esm2015/utils/mask/create-auto-corrected-date-time-pipe.js +3 -2
  243. package/esm2015/validators/unfinished.validator.js +2 -1
  244. package/esm5/abstract/input-slider.js +18 -9
  245. package/esm5/abstract/slider/slider.js +14 -6
  246. package/esm5/components/breadcrumbs/breadcrumbs-wrapper.component.js +2 -2
  247. package/esm5/components/checkbox/checkbox.component.js +1 -1
  248. package/esm5/components/field-error/field-error.component.js +14 -2
  249. package/esm5/components/field-error/field-error.module.js +2 -3
  250. package/esm5/components/index.js +2 -1
  251. package/esm5/components/input-count/index.js +2 -1
  252. package/esm5/components/input-count/input-count-options.js +21 -0
  253. package/esm5/components/input-count/input-count.component.js +61 -29
  254. package/esm5/components/input-count/input-count.module.js +3 -1
  255. package/esm5/components/input-date/input-date.component.js +18 -17
  256. package/esm5/components/input-date/input-date.module.js +3 -2
  257. package/esm5/components/input-date-range/input-date-range.component.js +25 -24
  258. package/esm5/components/input-date-time/input-date-time.component.js +66 -37
  259. package/esm5/components/input-file/file/file.component.js +2 -1
  260. package/esm5/components/input-number/input-number.component.js +30 -16
  261. package/esm5/components/input-phone/input-phone.component.js +17 -6
  262. package/esm5/components/input-phone-international/input-phone-international.component.js +23 -8
  263. package/esm5/components/input-phone-international/input-phone-international.module.js +5 -4
  264. package/esm5/components/input-range/input-range.component.js +22 -16
  265. package/esm5/components/input-range/input-range.module.js +2 -3
  266. package/esm5/components/input-slider/input-slider.component.js +17 -11
  267. package/esm5/components/input-slider/input-slider.module.js +2 -3
  268. package/esm5/components/input-tag/input-tag.component.js +6 -4
  269. package/esm5/components/input-time/input-time.component.js +2 -1
  270. package/esm5/components/multi-select/multi-select.component.js +22 -8
  271. package/esm5/components/progress/index.js +5 -0
  272. package/esm5/components/progress/pipes/progress-color-segments.pipe.js +37 -0
  273. package/esm5/components/progress/progress-bar/progress-bar.component.js +28 -0
  274. package/esm5/components/progress/progress-label/progress-label.component.js +17 -0
  275. package/esm5/components/progress/progress.module.js +28 -0
  276. package/esm5/components/progress/taiga-ui-kit-components-progress.js +5 -0
  277. package/esm5/components/radio/radio.component.js +1 -1
  278. package/esm5/components/range/range.component.js +2 -2
  279. package/esm5/components/range/range.module.js +2 -3
  280. package/esm5/components/select-option/select-option.component.js +1 -1
  281. package/esm5/components/slider/slider.component.js +2 -2
  282. package/esm5/components/slider/slider.module.js +2 -3
  283. package/esm5/components/tabs/tab/tab.component.js +19 -11
  284. package/esm5/components/tabs/underline/underline.component.js +1 -1
  285. package/esm5/components/tag/tag.component.js +1 -1
  286. package/esm5/components/text-area/text-area.component.js +17 -3
  287. package/esm5/components/toggle/index.js +2 -1
  288. package/esm5/components/toggle/toggle-options.js +21 -0
  289. package/esm5/components/toggle/toggle.component.js +27 -23
  290. package/esm5/components/toggle/toggle.module.js +3 -1
  291. package/esm5/directives/dropdown-context/dropdown-context.directive.js +153 -0
  292. package/esm5/directives/dropdown-context/dropdown-context.module.js +18 -0
  293. package/esm5/directives/dropdown-context/index.js +3 -0
  294. package/esm5/directives/dropdown-context/taiga-ui-kit-directives-dropdown-context.js +5 -0
  295. package/esm5/directives/dropdown-selection/dropdown-selection.directive.js +2 -1
  296. package/esm5/directives/index.js +2 -1
  297. package/esm5/interfaces/with-date-mask-pipe-config.js +1 -1
  298. package/esm5/tokens/i18n.js +4 -1
  299. package/esm5/utils/mask/create-auto-corrected-date-pipe.js +3 -3
  300. package/esm5/utils/mask/create-auto-corrected-date-range-pipe.js +7 -7
  301. package/esm5/utils/mask/create-auto-corrected-date-time-pipe.js +3 -2
  302. package/esm5/validators/unfinished.validator.js +2 -1
  303. package/fesm2015/taiga-ui-kit-abstract.js +21 -13
  304. package/fesm2015/taiga-ui-kit-abstract.js.map +1 -1
  305. package/fesm2015/taiga-ui-kit-components-breadcrumbs.js +1 -1
  306. package/fesm2015/taiga-ui-kit-components-breadcrumbs.js.map +1 -1
  307. package/fesm2015/taiga-ui-kit-components-checkbox.js +1 -1
  308. package/fesm2015/taiga-ui-kit-components-field-error.js +11 -3
  309. package/fesm2015/taiga-ui-kit-components-field-error.js.map +1 -1
  310. package/fesm2015/taiga-ui-kit-components-input-count.js +71 -26
  311. package/fesm2015/taiga-ui-kit-components-input-count.js.map +1 -1
  312. package/fesm2015/taiga-ui-kit-components-input-date-range.js +24 -19
  313. package/fesm2015/taiga-ui-kit-components-input-date-range.js.map +1 -1
  314. package/fesm2015/taiga-ui-kit-components-input-date-time.js +56 -36
  315. package/fesm2015/taiga-ui-kit-components-input-date-time.js.map +1 -1
  316. package/fesm2015/taiga-ui-kit-components-input-date.js +18 -12
  317. package/fesm2015/taiga-ui-kit-components-input-date.js.map +1 -1
  318. package/fesm2015/taiga-ui-kit-components-input-file.js +1 -0
  319. package/fesm2015/taiga-ui-kit-components-input-file.js.map +1 -1
  320. package/fesm2015/taiga-ui-kit-components-input-number.js +25 -15
  321. package/fesm2015/taiga-ui-kit-components-input-number.js.map +1 -1
  322. package/fesm2015/taiga-ui-kit-components-input-phone-international.js +26 -10
  323. package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
  324. package/fesm2015/taiga-ui-kit-components-input-phone.js +12 -5
  325. package/fesm2015/taiga-ui-kit-components-input-phone.js.map +1 -1
  326. package/fesm2015/taiga-ui-kit-components-input-range.js +21 -16
  327. package/fesm2015/taiga-ui-kit-components-input-range.js.map +1 -1
  328. package/fesm2015/taiga-ui-kit-components-input-slider.js +16 -11
  329. package/fesm2015/taiga-ui-kit-components-input-slider.js.map +1 -1
  330. package/fesm2015/taiga-ui-kit-components-input-tag.js +5 -3
  331. package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
  332. package/fesm2015/taiga-ui-kit-components-input-time.js +1 -0
  333. package/fesm2015/taiga-ui-kit-components-input-time.js.map +1 -1
  334. package/fesm2015/taiga-ui-kit-components-multi-select.js +17 -7
  335. package/fesm2015/taiga-ui-kit-components-multi-select.js.map +1 -1
  336. package/fesm2015/taiga-ui-kit-components-progress.js +93 -0
  337. package/fesm2015/taiga-ui-kit-components-progress.js.map +1 -0
  338. package/fesm2015/taiga-ui-kit-components-radio.js +1 -1
  339. package/fesm2015/taiga-ui-kit-components-range.js +2 -3
  340. package/fesm2015/taiga-ui-kit-components-range.js.map +1 -1
  341. package/fesm2015/taiga-ui-kit-components-select-option.js +1 -1
  342. package/fesm2015/taiga-ui-kit-components-slider.js +2 -3
  343. package/fesm2015/taiga-ui-kit-components-slider.js.map +1 -1
  344. package/fesm2015/taiga-ui-kit-components-tabs.js +18 -10
  345. package/fesm2015/taiga-ui-kit-components-tabs.js.map +1 -1
  346. package/fesm2015/taiga-ui-kit-components-tag.js +1 -1
  347. package/fesm2015/taiga-ui-kit-components-text-area.js +8 -2
  348. package/fesm2015/taiga-ui-kit-components-text-area.js.map +1 -1
  349. package/fesm2015/taiga-ui-kit-components-toggle.js +39 -16
  350. package/fesm2015/taiga-ui-kit-components-toggle.js.map +1 -1
  351. package/fesm2015/taiga-ui-kit-components.js +1 -0
  352. package/fesm2015/taiga-ui-kit-components.js.map +1 -1
  353. package/fesm2015/taiga-ui-kit-directives-dropdown-context.js +153 -0
  354. package/fesm2015/taiga-ui-kit-directives-dropdown-context.js.map +1 -0
  355. package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js +1 -0
  356. package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js.map +1 -1
  357. package/fesm2015/taiga-ui-kit-directives.js +1 -0
  358. package/fesm2015/taiga-ui-kit-directives.js.map +1 -1
  359. package/fesm2015/taiga-ui-kit-tokens.js +4 -1
  360. package/fesm2015/taiga-ui-kit-tokens.js.map +1 -1
  361. package/fesm2015/taiga-ui-kit-utils-mask.js +8 -8
  362. package/fesm2015/taiga-ui-kit-utils-mask.js.map +1 -1
  363. package/fesm2015/taiga-ui-kit-validators.js +1 -0
  364. package/fesm2015/taiga-ui-kit-validators.js.map +1 -1
  365. package/fesm5/taiga-ui-kit-abstract.js +29 -13
  366. package/fesm5/taiga-ui-kit-abstract.js.map +1 -1
  367. package/fesm5/taiga-ui-kit-components-breadcrumbs.js +1 -1
  368. package/fesm5/taiga-ui-kit-components-breadcrumbs.js.map +1 -1
  369. package/fesm5/taiga-ui-kit-components-checkbox.js +1 -1
  370. package/fesm5/taiga-ui-kit-components-field-error.js +15 -3
  371. package/fesm5/taiga-ui-kit-components-field-error.js.map +1 -1
  372. package/fesm5/taiga-ui-kit-components-input-count.js +83 -30
  373. package/fesm5/taiga-ui-kit-components-input-count.js.map +1 -1
  374. package/fesm5/taiga-ui-kit-components-input-date-range.js +24 -23
  375. package/fesm5/taiga-ui-kit-components-input-date-range.js.map +1 -1
  376. package/fesm5/taiga-ui-kit-components-input-date-time.js +66 -37
  377. package/fesm5/taiga-ui-kit-components-input-date-time.js.map +1 -1
  378. package/fesm5/taiga-ui-kit-components-input-date.js +18 -16
  379. package/fesm5/taiga-ui-kit-components-input-date.js.map +1 -1
  380. package/fesm5/taiga-ui-kit-components-input-file.js +1 -0
  381. package/fesm5/taiga-ui-kit-components-input-file.js.map +1 -1
  382. package/fesm5/taiga-ui-kit-components-input-number.js +29 -15
  383. package/fesm5/taiga-ui-kit-components-input-number.js.map +1 -1
  384. package/fesm5/taiga-ui-kit-components-input-phone-international.js +26 -10
  385. package/fesm5/taiga-ui-kit-components-input-phone-international.js.map +1 -1
  386. package/fesm5/taiga-ui-kit-components-input-phone.js +16 -5
  387. package/fesm5/taiga-ui-kit-components-input-phone.js.map +1 -1
  388. package/fesm5/taiga-ui-kit-components-input-range.js +21 -16
  389. package/fesm5/taiga-ui-kit-components-input-range.js.map +1 -1
  390. package/fesm5/taiga-ui-kit-components-input-slider.js +16 -11
  391. package/fesm5/taiga-ui-kit-components-input-slider.js.map +1 -1
  392. package/fesm5/taiga-ui-kit-components-input-tag.js +5 -3
  393. package/fesm5/taiga-ui-kit-components-input-tag.js.map +1 -1
  394. package/fesm5/taiga-ui-kit-components-input-time.js +1 -0
  395. package/fesm5/taiga-ui-kit-components-input-time.js.map +1 -1
  396. package/fesm5/taiga-ui-kit-components-multi-select.js +21 -7
  397. package/fesm5/taiga-ui-kit-components-multi-select.js.map +1 -1
  398. package/fesm5/taiga-ui-kit-components-progress.js +103 -0
  399. package/fesm5/taiga-ui-kit-components-progress.js.map +1 -0
  400. package/fesm5/taiga-ui-kit-components-radio.js +1 -1
  401. package/fesm5/taiga-ui-kit-components-range.js +2 -3
  402. package/fesm5/taiga-ui-kit-components-range.js.map +1 -1
  403. package/fesm5/taiga-ui-kit-components-select-option.js +1 -1
  404. package/fesm5/taiga-ui-kit-components-slider.js +2 -3
  405. package/fesm5/taiga-ui-kit-components-slider.js.map +1 -1
  406. package/fesm5/taiga-ui-kit-components-tabs.js +18 -10
  407. package/fesm5/taiga-ui-kit-components-tabs.js.map +1 -1
  408. package/fesm5/taiga-ui-kit-components-tag.js +1 -1
  409. package/fesm5/taiga-ui-kit-components-text-area.js +16 -2
  410. package/fesm5/taiga-ui-kit-components-text-area.js.map +1 -1
  411. package/fesm5/taiga-ui-kit-components-toggle.js +49 -24
  412. package/fesm5/taiga-ui-kit-components-toggle.js.map +1 -1
  413. package/fesm5/taiga-ui-kit-components.js +1 -0
  414. package/fesm5/taiga-ui-kit-components.js.map +1 -1
  415. package/fesm5/taiga-ui-kit-directives-dropdown-context.js +172 -0
  416. package/fesm5/taiga-ui-kit-directives-dropdown-context.js.map +1 -0
  417. package/fesm5/taiga-ui-kit-directives-dropdown-selection.js +1 -0
  418. package/fesm5/taiga-ui-kit-directives-dropdown-selection.js.map +1 -1
  419. package/fesm5/taiga-ui-kit-directives.js +1 -0
  420. package/fesm5/taiga-ui-kit-directives.js.map +1 -1
  421. package/fesm5/taiga-ui-kit-tokens.js +4 -1
  422. package/fesm5/taiga-ui-kit-tokens.js.map +1 -1
  423. package/fesm5/taiga-ui-kit-utils-mask.js +8 -8
  424. package/fesm5/taiga-ui-kit-utils-mask.js.map +1 -1
  425. package/fesm5/taiga-ui-kit-validators.js +1 -0
  426. package/fesm5/taiga-ui-kit-validators.js.map +1 -1
  427. package/interfaces/with-date-mask-pipe-config.d.ts +4 -1
  428. package/package.json +4 -4
  429. package/tokens/i18n.d.ts +2 -0
  430. package/tokens/taiga-ui-kit-tokens.metadata.json +1 -1
  431. package/utils/mask/create-auto-corrected-date-pipe.d.ts +3 -4
  432. package/utils/mask/create-auto-corrected-date-range-pipe.d.ts +2 -3
  433. package/utils/mask/create-auto-corrected-date-time-pipe.d.ts +2 -3
  434. package/utils/mask/taiga-ui-kit-utils-mask.metadata.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-text-area.js","sources":["ng://@taiga-ui/kit/components/text-area/text-area.providers.ts","ng://@taiga-ui/kit/components/text-area/text-area.component.ts","ng://@taiga-ui/kit/components/text-area/text-area.module.ts","ng://@taiga-ui/kit/components/text-area/taiga-ui-kit-components-text-area.ts"],"sourcesContent":["import {forwardRef, Provider} from '@angular/core';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk';\nimport {\n HINT_CONTROLLER_PROVIDER,\n MODE_PROVIDER,\n TEXTFIELD_CONTROLLER_PROVIDER,\n} from '@taiga-ui/core';\nimport {TuiTextAreaComponent} from './text-area.component';\n\nexport const TUI_TEXT_AREA_PROVIDERS: Provider[] = [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiTextAreaComponent),\n },\n TEXTFIELD_CONTROLLER_PROVIDER,\n HINT_CONTROLLER_PROVIDER,\n MODE_PROVIDER,\n];\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n isNativeFocused,\n setNativeFocused,\n TUI_IS_IOS,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n} from '@taiga-ui/cdk';\nimport {\n TUI_HINT_WATCHED_CONTROLLER,\n TUI_MODE,\n TUI_TEXTFIELD_APPEARANCE,\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiBrightness,\n TuiHintControllerDirective,\n TuiSizeL,\n TuiSizeS,\n TuiTextfieldController,\n} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\nimport {TUI_TEXT_AREA_PROVIDERS} from './text-area.providers';\n\nexport const DEFAULT_ROWS = 20;\nexport const LINE_HEIGHT_M = 20;\nexport const LINE_HEIGHT_L = 24;\n\n@Component({\n selector: 'tui-text-area',\n templateUrl: './text-area.template.html',\n styleUrls: ['./text-area.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: TUI_TEXT_AREA_PROVIDERS,\n host: {\n '($.data-mode.attr)': 'mode$',\n '[class._ios]': 'isIOS',\n },\n})\nexport class TuiTextAreaComponent\n extends AbstractTuiControl<string>\n implements TuiFocusableElementAccessor {\n @Input()\n @tuiDefaultProp()\n rows = DEFAULT_ROWS;\n\n @Input()\n @HostBinding('class._expandable')\n @tuiDefaultProp()\n expandable = false;\n\n @ViewChild('focusableElement')\n private readonly focusableElement?: ElementRef<HTMLTextAreaElement>;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_TEXTFIELD_APPEARANCE) readonly appearance: string,\n @Inject(TUI_IS_IOS) readonly isIOS: boolean,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n readonly controller: TuiTextfieldController,\n @Inject(TUI_HINT_WATCHED_CONTROLLER)\n readonly hintController: TuiHintControllerDirective,\n ) {\n super(control, changeDetectorRef);\n }\n\n @HostBinding('class._label-outside')\n get labelOutside(): boolean {\n return this.controller.labelOutside;\n }\n\n get nativeFocusableElement(): HTMLTextAreaElement | null {\n return this.computedDisabled || !this.focusableElement\n ? null\n : this.focusableElement.nativeElement;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n @HostBinding('attr.data-tui-host-size')\n get size(): TuiSizeL | TuiSizeS {\n return this.controller.size;\n }\n\n @HostBinding('class._has-tooltip')\n get hasTooltip(): boolean {\n return !!this.hintController.content && !this.disabled;\n }\n\n @HostBinding('class._has-value')\n get hasValue(): boolean {\n return this.value !== '';\n }\n\n @HostBinding('class._has-counter')\n get hasCounter(): boolean {\n return !!this.controller.maxLength && !this.disabled && !this.readOnly;\n }\n\n get hasPlaceholder(): boolean {\n return !this.controller.labelOutside || (!this.hasValue && !this.hasExampleText);\n }\n\n get hasExampleText(): boolean {\n return (\n !!this.controller.exampleText &&\n this.focused &&\n !this.hasValue &&\n !this.readOnly\n );\n }\n\n get computeMaxHeight(): number | null {\n return this.expandable ? this.rows * this.lineHeight : null;\n }\n\n get placeholderRaised(): boolean {\n return (\n !this.controller.labelOutside &&\n ((this.computedFocused && !this.readOnly) || this.hasValue)\n );\n }\n\n onFocused(focused: boolean) {\n this.updateFocused(focused);\n }\n\n onHovered(hovered: boolean) {\n this.updateHovered(hovered);\n }\n\n onPressed(pressed: boolean) {\n this.updatePressed(pressed);\n }\n\n onValue(value: string) {\n this.updateValue(value);\n }\n\n onMouseDown(event: MouseEvent) {\n if (event.target === this.nativeFocusableElement) {\n return;\n }\n\n event.preventDefault();\n\n if (this.nativeFocusableElement) {\n setNativeFocused(this.nativeFocusableElement);\n }\n }\n\n protected getFallbackValue(): string {\n return '';\n }\n\n private get lineHeight(): number {\n return this.controller.size === 'm' ? LINE_HEIGHT_M : LINE_HEIGHT_L;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TuiFocusableModule, TuiFocusedModule, TuiHoveredModule} from '@taiga-ui/cdk';\nimport {TuiScrollbarModule, TuiTooltipModule, TuiWrapperModule} from '@taiga-ui/core';\nimport {TuiTextAreaComponent} from './text-area.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiHoveredModule,\n TuiScrollbarModule,\n TuiTooltipModule,\n TuiWrapperModule,\n ],\n declarations: [TuiTextAreaComponent],\n exports: [TuiTextAreaComponent],\n})\nexport class TuiTextAreaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;IASa,uBAAuB,GAAe;IAC/C;QACI,OAAO,EAAE,2BAA2B;QACpC,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,oBAAoB,GAAA,CAAC;KACtD;IACD,6BAA6B;IAC7B,wBAAwB;IACxB,aAAa;;;ICmBJ,YAAY,GAAG,GAAG;IAClB,aAAa,GAAG,GAAG;IACnB,aAAa,GAAG,GAAG;;IAcpB,wCAA0B;IAclC,8BAII,OAAyB,EACE,iBAAoC,EACpB,UAAkB,EAChC,KAAc,EAChB,KAAuC,EAEzD,UAAkC,EAElC,cAA0C;QAZvD,YAcI,kBAAM,OAAO,EAAE,iBAAiB,CAAC,SACpC;QAT8C,gBAAU,GAAV,UAAU,CAAQ;QAChC,WAAK,GAAL,KAAK,CAAS;QAChB,WAAK,GAAL,KAAK,CAAkC;QAEzD,gBAAU,GAAV,UAAU,CAAwB;QAElC,oBAAc,GAAd,cAAc,CAA4B;QAtBvD,UAAI,GAAG,YAAY,CAAC;QAKpB,gBAAU,GAAG,KAAK,CAAC;;KAoBlB;IAGD,sBAAI,8CAAY;aAAhB;YACI,OAAO,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC;SACvC;;;OAAA;IAED,sBAAI,wDAAsB;aAA1B;Y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AAgB;aACnB;YACD,YAAY,EAAE,CAAC,oBAAoB,CAAC;YACpC,OAAO,EAAE,CAAC,oBAAoB,CAAC;SAClC,CAAC;OACW,iBAAiB,CAAG;IAAD,wBAAC;CAAjC;;ACrBA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-text-area.js","sources":["ng://@taiga-ui/kit/components/text-area/text-area.providers.ts","ng://@taiga-ui/kit/components/text-area/text-area.component.ts","ng://@taiga-ui/kit/components/text-area/text-area.module.ts","ng://@taiga-ui/kit/components/text-area/taiga-ui-kit-components-text-area.ts"],"sourcesContent":["import {forwardRef, Provider} from '@angular/core';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk';\nimport {\n HINT_CONTROLLER_PROVIDER,\n MODE_PROVIDER,\n TEXTFIELD_CONTROLLER_PROVIDER,\n} from '@taiga-ui/core';\nimport {TuiTextAreaComponent} from './text-area.component';\n\nexport const TUI_TEXT_AREA_PROVIDERS: Provider[] = [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiTextAreaComponent),\n },\n TEXTFIELD_CONTROLLER_PROVIDER,\n HINT_CONTROLLER_PROVIDER,\n MODE_PROVIDER,\n];\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n isNativeFocused,\n setNativeFocused,\n TUI_IS_IOS,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n} from '@taiga-ui/cdk';\nimport {\n TUI_HINT_WATCHED_CONTROLLER,\n TUI_MODE,\n TUI_TEXTFIELD_APPEARANCE,\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiBrightness,\n TuiHintControllerDirective,\n TuiSizeL,\n TuiSizeS,\n TuiTextfieldController,\n} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\nimport {TUI_TEXT_AREA_PROVIDERS} from './text-area.providers';\n\nexport const DEFAULT_ROWS = 20;\nexport const LINE_HEIGHT_M = 20;\nexport const LINE_HEIGHT_L = 24;\n\n@Component({\n selector: 'tui-text-area',\n templateUrl: './text-area.template.html',\n styleUrls: ['./text-area.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: TUI_TEXT_AREA_PROVIDERS,\n host: {\n '($.data-mode.attr)': 'mode$',\n '[class._ios]': 'isIOS',\n },\n})\nexport class TuiTextAreaComponent\n extends AbstractTuiControl<string>\n implements TuiFocusableElementAccessor\n{\n @Input()\n @tuiDefaultProp()\n rows = DEFAULT_ROWS;\n\n @Input()\n @HostBinding('class._expandable')\n @tuiDefaultProp()\n expandable = false;\n\n @ViewChild('focusableElement')\n private readonly focusableElement?: ElementRef<HTMLTextAreaElement>;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_TEXTFIELD_APPEARANCE) readonly appearance: string,\n @Inject(TUI_IS_IOS) readonly isIOS: boolean,\n @Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n readonly controller: TuiTextfieldController,\n @Inject(TUI_HINT_WATCHED_CONTROLLER)\n readonly hintController: TuiHintControllerDirective,\n ) {\n super(control, changeDetectorRef);\n }\n\n @HostBinding('class._label-outside')\n get labelOutside(): boolean {\n return this.controller.labelOutside;\n }\n\n get nativeFocusableElement(): HTMLTextAreaElement | null {\n return this.computedDisabled || !this.focusableElement\n ? null\n : this.focusableElement.nativeElement;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n @HostBinding('attr.data-tui-host-size')\n get size(): TuiSizeL | TuiSizeS {\n return this.controller.size;\n }\n\n @HostBinding('class._has-tooltip')\n get hasTooltip(): boolean {\n return !!this.hintController.content && !this.disabled;\n }\n\n @HostBinding('class._has-value')\n get hasValue(): boolean {\n return this.value !== '';\n }\n\n @HostBinding('class._has-counter')\n get hasCounter(): boolean {\n return !!this.controller.maxLength && !this.disabled && !this.readOnly;\n }\n\n get hasPlaceholder(): boolean {\n return !this.controller.labelOutside || (!this.hasValue && !this.hasExampleText);\n }\n\n get hasExampleText(): boolean {\n return (\n !!this.controller.exampleText &&\n this.focused &&\n !this.hasValue &&\n !this.readOnly\n );\n }\n\n get computeMaxHeight(): number | null {\n return this.expandable ? this.rows * this.lineHeight : null;\n }\n\n get placeholderRaised(): boolean {\n return (\n !this.controller.labelOutside &&\n ((this.computedFocused && !this.readOnly) || this.hasValue)\n );\n }\n\n get fittedContent(): string {\n return this.value.slice(0, this.controller.maxLength || Infinity);\n }\n\n get extraContent(): string {\n return this.value.slice(this.controller.maxLength || Infinity);\n }\n\n onFocused(focused: boolean) {\n this.updateFocused(focused);\n }\n\n onHovered(hovered: boolean) {\n this.updateHovered(hovered);\n }\n\n onPressed(pressed: boolean) {\n this.updatePressed(pressed);\n }\n\n onValue(value: string) {\n this.updateValue(value);\n }\n\n onMouseDown(event: MouseEvent) {\n if (event.target === this.nativeFocusableElement) {\n return;\n }\n\n event.preventDefault();\n\n if (this.nativeFocusableElement) {\n setNativeFocused(this.nativeFocusableElement);\n }\n }\n\n protected getFallbackValue(): string {\n return '';\n }\n\n private get lineHeight(): number {\n return this.controller.size === 'm' ? LINE_HEIGHT_M : LINE_HEIGHT_L;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TuiFocusableModule, TuiFocusedModule, TuiHoveredModule} from '@taiga-ui/cdk';\nimport {TuiScrollbarModule, TuiTooltipModule, TuiWrapperModule} from '@taiga-ui/core';\nimport {TuiTextAreaComponent} from './text-area.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiHoveredModule,\n TuiScrollbarModule,\n TuiTooltipModule,\n TuiWrapperModule,\n ],\n declarations: [TuiTextAreaComponent],\n exports: [TuiTextAreaComponent],\n})\nexport class TuiTextAreaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;IASa,uBAAuB,GAAe;IAC/C;QACI,OAAO,EAAE,2BAA2B;QACpC,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,oBAAoB,GAAA,CAAC;KACtD;IACD,6BAA6B;IAC7B,wBAAwB;IACxB,aAAa;;;ICmBJ,YAAY,GAAG,GAAG;IAClB,aAAa,GAAG,GAAG;IACnB,aAAa,GAAG,GAAG;;IAcpB,wCAA0B;IAelC,8BAII,OAAyB,EACE,iBAAoC,EACpB,UAAkB,EAChC,KAAc,EAChB,KAAuC,EAEzD,UAAkC,EAElC,cAA0C;QAZvD,YAcI,kBAAM,OAAO,EAAE,iBAAiB,CAAC,SACpC;QAT8C,gBAAU,GAAV,UAAU,CAAQ;QAChC,WAAK,GAAL,KAAK,CAAS;QAChB,WAAK,GAAL,KAAK,CAAkC;QAEzD,gBAAU,GAAV,UAAU,CAAwB;QAElC,oBAAc,GAAd,cAAc,CAA4B;QAtBvD,UAAI,GAAG,YAAY,CAAC;QAKpB,gBAAU,GAAG,KAAK,CAAC;;KAoBlB;IAGD,sBAAI,8CAAY;aAAhB;YACI,OAAO,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC;SACvC;;;OAAA;IAED,sBAAI,wDAAsB;aAA1B;YACI,OAAO,IAAI,CAAC,gBAAgB,IAAI,CAAC,IAAI,CAAC,gBAAgB;kBAChD,IAAI;kBACJ,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC;SAC7C;;;OAAA;IAED,sBAAI,yCAAO;aAAX;YACI,OAAO,eAAe,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;SACvD;;;OAAA;IAGD,sBAAI,sCAAI;aAAR;YACI,OAAO,IAAI,CAAC,UAAU,CAAC,I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B,gBAAgB;aACnB;YACD,YAAY,EAAE,CAAC,oBAAoB,CAAC;YACpC,OAAO,EAAE,CAAC,oBAAoB,CAAC;SAClC,CAAC;OACW,iBAAiB,CAAG;IAAD,wBAAC;CAAjC;;ACrBA;;;;;;"}
@@ -1,22 +1,58 @@
1
+ import { InjectionToken, Optional, Self, Inject, ChangeDetectorRef, Input, HostBinding, ViewChild, Component, ChangeDetectionStrategy, forwardRef, NgModule } from '@angular/core';
1
2
  import { __extends, __decorate, __param } from 'tslib';
2
- import { Optional, Self, Inject, ChangeDetectorRef, Input, HostBinding, ViewChild, Component, ChangeDetectionStrategy, forwardRef, NgModule } from '@angular/core';
3
3
  import { NgControl } from '@angular/forms';
4
4
  import { isNativeFocused, tuiDefaultProp, TUI_FOCUSABLE_ITEM_ACCESSOR, AbstractTuiControl, TuiFocusedModule, TuiFocusableModule, TuiHoveredModule, TuiPressedModule, TuiFocusVisibleModule, TuiCheckedModule } from '@taiga-ui/cdk';
5
5
  import { TuiModeDirective, TuiWrapperModule, TuiSvgModule, TuiLoaderModule } from '@taiga-ui/core';
6
6
  import { CommonModule } from '@angular/common';
7
+ import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
8
+
9
+ /** Default values for the toggle options. */
10
+ var TUI_TOGGLE_DEFAULT_OPTIONS = {
11
+ icons: {
12
+ toggleOff: function (_a) {
13
+ var $implicit = _a.$implicit;
14
+ return $implicit === 'm' ? 'tuiIconToggleOff' : 'tuiIconToggleOffLarge';
15
+ },
16
+ toggleOn: function (_a) {
17
+ var $implicit = _a.$implicit;
18
+ return $implicit === 'm' ? 'tuiIconToggleOn' : 'tuiIconToggleOnLarge';
19
+ },
20
+ },
21
+ singleColor: false,
22
+ showIcons: false,
23
+ size: 'm',
24
+ };
25
+ var TUI_TOGGLE_OPTIONS = new InjectionToken('Default parameters for toggle component', {
26
+ factory: function () { return TUI_TOGGLE_DEFAULT_OPTIONS; },
27
+ });
7
28
 
8
29
  var TuiToggleComponent = /** @class */ (function (_super) {
9
30
  __extends(TuiToggleComponent, _super);
10
- function TuiToggleComponent(control, changeDetectorRef, modeDirective) {
31
+ function TuiToggleComponent(control, changeDetectorRef, modeDirective, options) {
11
32
  var _this = _super.call(this, control, changeDetectorRef) || this;
12
33
  _this.modeDirective = modeDirective;
13
- _this.singleColor = false;
14
- _this.showIcons = false;
34
+ _this.options = options;
35
+ _this.singleColor = _this.options.singleColor;
36
+ _this.showIcons = _this.options.showIcons;
15
37
  _this.showLoader = false;
16
- _this.size = 'm';
38
+ _this.size = _this.options.size;
17
39
  return _this;
18
40
  }
19
41
  TuiToggleComponent_1 = TuiToggleComponent;
42
+ Object.defineProperty(TuiToggleComponent.prototype, "iconOn", {
43
+ get: function () {
44
+ return this.options.icons.toggleOn;
45
+ },
46
+ enumerable: true,
47
+ configurable: true
48
+ });
49
+ Object.defineProperty(TuiToggleComponent.prototype, "iconOff", {
50
+ get: function () {
51
+ return this.options.icons.toggleOff;
52
+ },
53
+ enumerable: true,
54
+ configurable: true
55
+ });
20
56
  Object.defineProperty(TuiToggleComponent.prototype, "nativeFocusableElement", {
21
57
  get: function () {
22
58
  return this.focusableElement ? this.focusableElement.nativeElement : null;
@@ -54,20 +90,6 @@ var TuiToggleComponent = /** @class */ (function (_super) {
54
90
  enumerable: true,
55
91
  configurable: true
56
92
  });
57
- Object.defineProperty(TuiToggleComponent.prototype, "iconOn", {
58
- get: function () {
59
- return this.sizeM ? 'tuiIconToggleOn' : 'tuiIconToggleOnLarge';
60
- },
61
- enumerable: true,
62
- configurable: true
63
- });
64
- Object.defineProperty(TuiToggleComponent.prototype, "iconOff", {
65
- get: function () {
66
- return this.sizeM ? 'tuiIconToggleOff' : 'tuiIconToggleOffLarge';
67
- },
68
- enumerable: true,
69
- configurable: true
70
- });
71
93
  Object.defineProperty(TuiToggleComponent.prototype, "loaderSize", {
72
94
  get: function () {
73
95
  return this.sizeM ? 'xs' : 's';
@@ -104,7 +126,8 @@ var TuiToggleComponent = /** @class */ (function (_super) {
104
126
  TuiToggleComponent.ctorParameters = function () { return [
105
127
  { type: NgControl, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NgControl,] }] },
106
128
  { type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] },
107
- { type: TuiModeDirective, decorators: [{ type: Optional }, { type: Inject, args: [TuiModeDirective,] }] }
129
+ { type: TuiModeDirective, decorators: [{ type: Optional }, { type: Inject, args: [TuiModeDirective,] }] },
130
+ { type: undefined, decorators: [{ type: Inject, args: [TUI_TOGGLE_OPTIONS,] }] }
108
131
  ]; };
109
132
  __decorate([
110
133
  Input(),
@@ -135,7 +158,7 @@ var TuiToggleComponent = /** @class */ (function (_super) {
135
158
  TuiToggleComponent = TuiToggleComponent_1 = __decorate([
136
159
  Component({
137
160
  selector: 'tui-toggle',
138
- template: "<tui-wrapper\n [appearance]=\"appearance\"\n [disabled]=\"disabled\"\n [focused]=\"computedFocusVisible\"\n [hovered]=\"computedHovered\"\n [pressed]=\"computedPressed\"\n [invalid]=\"computedInvalid\"\n>\n <div class=\"toggle\">\n <tui-loader\n *ngIf=\"showLoader\"\n class=\"loader\"\n [size]=\"loaderSize\"\n [inheritColor]=\"true\"\n [showLoader]=\"checked\"\n ></tui-loader>\n <tui-svg\n *ngIf=\"showIcons && !showLoader\"\n class=\"icon\"\n automation-id=\"tui-toggle__check-icon\"\n [src]=\"iconOn\"\n ></tui-svg>\n <div class=\"circle\"></div>\n <tui-loader\n *ngIf=\"showLoader\"\n class=\"loader\"\n [size]=\"loaderSize\"\n [inheritColor]=\"true\"\n [showLoader]=\"!checked\"\n ></tui-loader>\n <tui-svg\n *ngIf=\"showIcons && !showLoader\"\n class=\"icon icon_off\"\n automation-id=\"tui-toggle__cancel-icon\"\n [src]=\"iconOff\"\n ></tui-svg>\n </div>\n</tui-wrapper>\n<input\n #focusableElement\n type=\"checkbox\"\n class=\"checkbox\"\n role=\"switch\"\n automation-id=\"tui-toggle__checkbox\"\n [attr.aria-checked]=\"value\"\n [id]=\"id\"\n [disabled]=\"disabled\"\n [tuiChecked]=\"checked\"\n [tuiFocusable]=\"focusable\"\n (tuiCheckedChange)=\"onChecked($event)\"\n (tuiFocusedChange)=\"onFocused($event)\"\n (tuiHoveredChange)=\"onHovered($event)\"\n (tuiPressedChange)=\"onPressed($event)\"\n (tuiFocusVisibleChange)=\"onFocusVisible($event)\"\n/>\n",
161
+ template: "<tui-wrapper\n [appearance]=\"appearance\"\n [disabled]=\"disabled\"\n [focused]=\"computedFocusVisible\"\n [hovered]=\"computedHovered\"\n [pressed]=\"computedPressed\"\n [invalid]=\"computedInvalid\"\n>\n <div class=\"toggle\">\n <tui-loader\n *ngIf=\"showLoader\"\n class=\"loader\"\n [size]=\"loaderSize\"\n [inheritColor]=\"true\"\n [showLoader]=\"checked\"\n ></tui-loader>\n <span\n polymorpheus-outlet\n class=\"icon-wrapper\"\n [content]=\"iconOn\"\n [context]=\"{ $implicit: size }\"\n >\n <ng-template let-icon>\n <tui-svg\n *ngIf=\"showIcons && !showLoader\"\n class=\"icon\"\n automation-id=\"tui-toggle__check-icon\"\n [src]=\"icon\"\n ></tui-svg>\n </ng-template>\n </span>\n <div class=\"circle\"></div>\n <tui-loader\n *ngIf=\"showLoader\"\n class=\"loader\"\n [size]=\"loaderSize\"\n [inheritColor]=\"true\"\n [showLoader]=\"!checked\"\n ></tui-loader>\n <span\n polymorpheus-outlet\n class=\"icon-wrapper\"\n [content]=\"iconOff\"\n [context]=\"{ $implicit: size }\"\n >\n <ng-template let-icon>\n <tui-svg\n *ngIf=\"showIcons && !showLoader\"\n class=\"icon icon_off\"\n automation-id=\"tui-toggle__cancel-icon\"\n [src]=\"icon\"\n ></tui-svg>\n </ng-template>\n </span>\n </div>\n</tui-wrapper>\n<input\n #focusableElement\n type=\"checkbox\"\n class=\"checkbox\"\n role=\"switch\"\n automation-id=\"tui-toggle__checkbox\"\n [attr.aria-checked]=\"value\"\n [id]=\"id\"\n [disabled]=\"disabled\"\n [tuiChecked]=\"checked\"\n [tuiFocusable]=\"focusable\"\n (tuiCheckedChange)=\"onChecked($event)\"\n (tuiFocusedChange)=\"onFocused($event)\"\n (tuiHoveredChange)=\"onHovered($event)\"\n (tuiPressedChange)=\"onPressed($event)\"\n (tuiFocusVisibleChange)=\"onFocusVisible($event)\"\n/>\n",
139
162
  changeDetection: ChangeDetectionStrategy.OnPush,
140
163
  providers: [
141
164
  {
@@ -143,14 +166,15 @@ var TuiToggleComponent = /** @class */ (function (_super) {
143
166
  useExisting: forwardRef(function () { return TuiToggleComponent_1; }),
144
167
  },
145
168
  ],
146
- styles: [":host{position:relative;display:inline-block;vertical-align:middle;overflow:hidden;border-radius:6.25rem}:host[data-tui-host-size='m']{width:2rem;height:1rem}:host[data-tui-host-size='l']{width:3rem;height:1.5rem}.checkbox{padding:0;border:0;border-radius:inherit;background:0 0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;height:100%;width:100%;opacity:0;cursor:pointer}.checkbox:-webkit-autofill,.checkbox:-webkit-autofill:focus,.checkbox:-webkit-autofill:hover{border-radius:inherit;-webkit-text-fill-color:inherit!important;color:inherit!important;background-color:transparent!important;-webkit-box-shadow:0 0 0 1000px var(--tui-autofill) inset!important}:host._disabled .checkbox{pointer-events:none;cursor:default}.toggle{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;align-items:center;justify-content:center}:host[data-tui-host-size='m'] .toggle{width:3rem;height:1rem;transform:translateX(-1rem)}:host[data-tui-host-size='l'] .toggle{width:4.5rem;height:1.5rem;transform:translateX(-1.5rem)}:host._checked .toggle{transform:translateX(0)}.circle{margin:.125rem 0;flex-shrink:0;border-radius:100%;background-color:var(--tui-base-01)}:host._disabled .circle_light{opacity:.24}:host[data-tui-host-size='m'] .circle{width:.75rem;height:.75rem}:host[data-tui-host-size='l'] .circle{width:1rem;height:1rem}:host._disabled .circle{background-color:var(--tui-base-01)}:host:not(._checked) .loader{color:var(--tui-base-06)}:host:not(._checked)._disabled .loader{color:var(--tui-base-05)}:host:not(._checked)[data-mode=onDark] .loader{color:var(--tui-text-03-night)}:host:not(._checked)[data-mode=onDark]._disabled .loader{color:var(--tui-clear-inverse-active)}:host:not(._checked)[data-mode=onLight] .loader{color:var(--tui-text-03)}:host:not(._checked)[data-mode=onLight]._disabled .loader{color:var(--tui-clear-active)}:host[data-tui-host-size='m'] .loader{width:.75rem;margin:0 -1.75rem;transform:scale(.75)}:host[data-tui-host-size='l'] .loader{width:1rem;margin:0 2.25rem}.icon{opacity:.8}.icon_off{color:var(--tui-base-06)}:host._disabled .icon_off{color:var(--tui-base-05)}:host[data-mode=onDark] .icon_off{color:var(--tui-text-03-night)}:host[data-mode=onDark]._disabled .icon_off{color:var(--tui-clear-inverse-active)}:host[data-mode=onLight] .icon_off{color:var(--tui-text-03)}:host[data-mode=onLight]._disabled .icon_off{color:var(--tui-clear-active)}:host[data-tui-host-size='m'] .icon{width:1rem;height:1rem;transform:scale(.75)}:host[data-tui-host-size='l'] .icon{margin:0 .125rem;width:1.5rem;height:1.5rem}:host._hovered .icon{opacity:1}"]
169
+ styles: [":host{position:relative;display:inline-block;vertical-align:middle;overflow:hidden;border-radius:6.25rem}:host[data-tui-host-size='m']{width:2rem;height:1rem}:host[data-tui-host-size='l']{width:3rem;height:1.5rem}.checkbox{padding:0;border:0;border-radius:inherit;background:0 0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;height:100%;width:100%;opacity:0;cursor:pointer}.checkbox:-webkit-autofill,.checkbox:-webkit-autofill:focus,.checkbox:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 1000px var(--tui-autofill) inset!important}:host._disabled .checkbox{pointer-events:none;cursor:default}.toggle{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;align-items:center;justify-content:center}:host[data-tui-host-size='m'] .toggle{width:3rem;height:1rem;transform:translateX(-1rem)}:host[data-tui-host-size='l'] .toggle{width:4.5rem;height:1.5rem;transform:translateX(-1.5rem)}:host._checked .toggle{transform:translateX(0)}.circle{margin:.125rem 0;flex-shrink:0;border-radius:100%;background-color:var(--tui-base-01)}:host._disabled .circle_light{opacity:.24}:host[data-tui-host-size='m'] .circle{width:.75rem;height:.75rem}:host[data-tui-host-size='l'] .circle{width:1rem;height:1rem}:host._disabled .circle{background-color:var(--tui-base-01)}:host:not(._checked) .loader{color:var(--tui-base-06)}:host:not(._checked)._disabled .loader{color:var(--tui-base-05)}:host:not(._checked)[data-mode=onDark] .loader{color:var(--tui-text-03-night)}:host:not(._checked)[data-mode=onDark]._disabled .loader{color:var(--tui-clear-inverse-active)}:host:not(._checked)[data-mode=onLight] .loader{color:var(--tui-text-03)}:host:not(._checked)[data-mode=onLight]._disabled .loader{color:var(--tui-clear-active)}:host[data-tui-host-size='m'] .loader{width:.75rem;margin:0 .2rem;transform:scale(.75)}:host[data-tui-host-size='l'] .loader{width:1rem;margin:0 .25rem}.icon-wrapper{display:flex}.icon{opacity:.8}.icon_off{color:var(--tui-base-06)}:host._disabled .icon_off{color:var(--tui-base-05)}:host[data-mode=onDark] .icon_off{color:var(--tui-text-03-night)}:host[data-mode=onDark]._disabled .icon_off{color:var(--tui-clear-inverse-active)}:host[data-mode=onLight] .icon_off{color:var(--tui-text-03)}:host[data-mode=onLight]._disabled .icon_off{color:var(--tui-clear-active)}:host[data-tui-host-size='m'] .icon{width:1rem;height:1rem;transform:scale(.75)}:host[data-tui-host-size='l'] .icon{margin:0 .125rem;width:1.5rem;height:1.5rem}:host._hovered .icon{opacity:1}"]
147
170
  }),
148
171
  __param(0, Optional()),
149
172
  __param(0, Self()),
150
173
  __param(0, Inject(NgControl)),
151
174
  __param(1, Inject(ChangeDetectorRef)),
152
175
  __param(2, Optional()),
153
- __param(2, Inject(TuiModeDirective))
176
+ __param(2, Inject(TuiModeDirective)),
177
+ __param(3, Inject(TUI_TOGGLE_OPTIONS))
154
178
  ], TuiToggleComponent);
155
179
  return TuiToggleComponent;
156
180
  }(AbstractTuiControl));
@@ -171,6 +195,7 @@ var TuiToggleModule = /** @class */ (function () {
171
195
  TuiWrapperModule,
172
196
  TuiSvgModule,
173
197
  TuiLoaderModule,
198
+ PolymorpheusModule,
174
199
  ],
175
200
  declarations: [TuiToggleComponent],
176
201
  exports: [TuiToggleComponent],
@@ -183,5 +208,5 @@ var TuiToggleModule = /** @class */ (function () {
183
208
  * Generated bundle index. Do not edit.
184
209
  */
185
210
 
186
- export { TuiToggleComponent, TuiToggleModule };
211
+ export { TUI_TOGGLE_DEFAULT_OPTIONS, TUI_TOGGLE_OPTIONS, TuiToggleComponent, TuiToggleModule };
187
212
  //# sourceMappingURL=taiga-ui-kit-components-toggle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-toggle.js","sources":["ng://@taiga-ui/kit/components/toggle/toggle.component.ts","ng://@taiga-ui/kit/components/toggle/toggle.module.ts","ng://@taiga-ui/kit/components/toggle/taiga-ui-kit-components-toggle.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n Inject,\n Input,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n isNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {\n TuiAppearance,\n TuiBrightness,\n TuiModeDirective,\n TuiSizeL,\n TuiSizeXS,\n} from '@taiga-ui/core';\n\n@Component({\n selector: 'tui-toggle',\n templateUrl: './toggle.template.html',\n styleUrls: ['./toggle.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiToggleComponent),\n },\n ],\n})\nexport class TuiToggleComponent\n extends AbstractTuiControl<boolean>\n implements TuiFocusableElementAccessor {\n @Input()\n @tuiDefaultProp()\n singleColor = false;\n\n @Input()\n @tuiDefaultProp()\n showIcons = false;\n\n @Input()\n @tuiDefaultProp()\n showLoader = false;\n\n @Input()\n @HostBinding('attr.data-tui-host-size')\n @tuiDefaultProp()\n size: TuiSizeL = 'm';\n\n @ViewChild('focusableElement')\n private readonly focusableElement?: ElementRef<TuiNativeFocusableElement>;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Optional()\n @Inject(TuiModeDirective)\n private readonly modeDirective: TuiModeDirective | null,\n ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.focusableElement ? this.focusableElement.nativeElement : null;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n get appearance(): TuiAppearance {\n return this.singleColor || this.checked\n ? TuiAppearance.Primary\n : TuiAppearance.Secondary;\n }\n\n get sizeM(): boolean {\n return this.size === 'm';\n }\n\n @HostBinding('class._checked')\n get checked(): boolean {\n return this.value;\n }\n\n get iconOn(): string {\n return this.sizeM ? 'tuiIconToggleOn' : 'tuiIconToggleOnLarge';\n }\n\n get iconOff(): string {\n return this.sizeM ? 'tuiIconToggleOff' : 'tuiIconToggleOffLarge';\n }\n\n get loaderSize(): TuiSizeXS {\n return this.sizeM ? 'xs' : 's';\n }\n\n @HostBinding('attr.data-mode')\n get hostMode(): TuiBrightness | null {\n return this.modeDirective ? this.modeDirective.mode : null;\n }\n\n onChecked(checked: boolean) {\n this.updateValue(checked);\n }\n\n onFocused(focused: boolean) {\n this.updateFocused(focused);\n }\n\n onHovered(hovered: boolean) {\n this.updateHovered(hovered);\n }\n\n onPressed(pressed: boolean) {\n this.updatePressed(pressed);\n }\n\n onFocusVisible(focusVisible: boolean) {\n this.updateFocusVisible(focusVisible);\n }\n\n protected getFallbackValue(): boolean {\n return false;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiCheckedModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiFocusVisibleModule,\n TuiHoveredModule,\n TuiPressedModule,\n} from '@taiga-ui/cdk';\nimport {TuiLoaderModule, TuiSvgModule, TuiWrapperModule} from '@taiga-ui/core';\nimport {TuiToggleComponent} from './toggle.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiFocusedModule,\n TuiFocusableModule,\n TuiHoveredModule,\n TuiPressedModule,\n TuiFocusVisibleModule,\n TuiCheckedModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiLoaderModule,\n ],\n declarations: [TuiToggleComponent],\n exports: [TuiToggleComponent],\n})\nexport class TuiToggleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;IA2CY,sCAA2B;IAsBnC,4BAII,OAAyB,EACE,iBAAoC,EAG9C,aAAsC;QAR3D,YAUI,kBAAM,OAAO,EAAE,iBAAiB,CAAC,SACpC;QAHoB,mBAAa,GAAb,aAAa,CAAyB;QA1B3D,iBAAW,GAAG,KAAK,CAAC;QAIpB,eAAS,GAAG,KAAK,CAAC;QAIlB,gBAAU,GAAG,KAAK,CAAC;QAKnB,UAAI,GAAa,GAAG,CAAC;;KAgBpB;2BAlCQ,kBAAkB;IAoC3B,sBAAI,sDAAsB;aAA1B;YACI,OAAO,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,aAAa,GAAG,IAAI,CAAC;SAC7E;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,kBAAkB;gBAClB,gBAAgB;gBAChB,gBAAgB;gBAChB,qBAAqB;gBACrB,gBAAgB;gBAChB,gBAAgB;gBAChB,YAAY;gBACZ,eAAe;aAClB;YACD,YAAY,EAAE,CAAC,kBAAkB,CAAC;YAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;SAChC,CAAC;OACW,eAAe,CAAG;IAAD,sBAAC;CAA/B;;AC7BA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-toggle.js","sources":["ng://@taiga-ui/kit/components/toggle/toggle-options.ts","ng://@taiga-ui/kit/components/toggle/toggle.component.ts","ng://@taiga-ui/kit/components/toggle/toggle.module.ts","ng://@taiga-ui/kit/components/toggle/taiga-ui-kit-components-toggle.ts"],"sourcesContent":["import {InjectionToken} from '@angular/core';\nimport {TuiContextWithImplicit} from '@taiga-ui/cdk';\nimport {TuiSizeL} from '@taiga-ui/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport interface ToggleOptions {\n readonly icons: Readonly<{\n toggleOff: PolymorpheusContent<TuiContextWithImplicit<TuiSizeL>>;\n toggleOn: PolymorpheusContent<TuiContextWithImplicit<TuiSizeL>>;\n }>;\n readonly singleColor: boolean;\n readonly showIcons: boolean;\n readonly size: TuiSizeL;\n}\n\n/** Default values for the toggle options. */\nexport const TUI_TOGGLE_DEFAULT_OPTIONS: ToggleOptions = {\n icons: {\n toggleOff({$implicit}: TuiContextWithImplicit<TuiSizeL>): string {\n return $implicit === 'm' ? 'tuiIconToggleOff' : 'tuiIconToggleOffLarge';\n },\n toggleOn({$implicit}: TuiContextWithImplicit<TuiSizeL>): string {\n return $implicit === 'm' ? 'tuiIconToggleOn' : 'tuiIconToggleOnLarge';\n },\n },\n singleColor: false,\n showIcons: false,\n size: 'm',\n};\n\nexport const TUI_TOGGLE_OPTIONS = new InjectionToken<ToggleOptions>(\n 'Default parameters for toggle component',\n {\n factory: () => TUI_TOGGLE_DEFAULT_OPTIONS,\n },\n);\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n Inject,\n Input,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n isNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TuiContextWithImplicit,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk';\nimport {\n TuiAppearance,\n TuiBrightness,\n TuiModeDirective,\n TuiSizeL,\n TuiSizeXS,\n} from '@taiga-ui/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {ToggleOptions, TUI_TOGGLE_OPTIONS} from './toggle-options';\n\n@Component({\n selector: 'tui-toggle',\n templateUrl: './toggle.template.html',\n styleUrls: ['./toggle.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiToggleComponent),\n },\n ],\n})\nexport class TuiToggleComponent\n extends AbstractTuiControl<boolean>\n implements TuiFocusableElementAccessor\n{\n @Input()\n @tuiDefaultProp()\n singleColor = this.options.singleColor;\n\n @Input()\n @tuiDefaultProp()\n showIcons = this.options.showIcons;\n\n @Input()\n @tuiDefaultProp()\n showLoader = false;\n\n @Input()\n @HostBinding('attr.data-tui-host-size')\n @tuiDefaultProp()\n size: TuiSizeL = this.options.size;\n\n @ViewChild('focusableElement')\n private readonly focusableElement?: ElementRef<TuiNativeFocusableElement>;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Optional()\n @Inject(TuiModeDirective)\n private readonly modeDirective: TuiModeDirective | null,\n @Inject(TUI_TOGGLE_OPTIONS)\n public readonly options: ToggleOptions,\n ) {\n super(control, changeDetectorRef);\n }\n\n get iconOn(): PolymorpheusContent<TuiContextWithImplicit<TuiSizeL>> {\n return this.options.icons.toggleOn;\n }\n\n get iconOff(): PolymorpheusContent<TuiContextWithImplicit<TuiSizeL>> {\n return this.options.icons.toggleOff;\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.focusableElement ? this.focusableElement.nativeElement : null;\n }\n\n get focused(): boolean {\n return isNativeFocused(this.nativeFocusableElement);\n }\n\n get appearance(): TuiAppearance {\n return this.singleColor || this.checked\n ? TuiAppearance.Primary\n : TuiAppearance.Secondary;\n }\n\n get sizeM(): boolean {\n return this.size === 'm';\n }\n\n @HostBinding('class._checked')\n get checked(): boolean {\n return this.value;\n }\n\n get loaderSize(): TuiSizeXS {\n return this.sizeM ? 'xs' : 's';\n }\n\n @HostBinding('attr.data-mode')\n get hostMode(): TuiBrightness | null {\n return this.modeDirective ? this.modeDirective.mode : null;\n }\n\n onChecked(checked: boolean) {\n this.updateValue(checked);\n }\n\n onFocused(focused: boolean) {\n this.updateFocused(focused);\n }\n\n onHovered(hovered: boolean) {\n this.updateHovered(hovered);\n }\n\n onPressed(pressed: boolean) {\n this.updatePressed(pressed);\n }\n\n onFocusVisible(focusVisible: boolean) {\n this.updateFocusVisible(focusVisible);\n }\n\n protected getFallbackValue(): boolean {\n return false;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n TuiCheckedModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiFocusVisibleModule,\n TuiHoveredModule,\n TuiPressedModule,\n} from '@taiga-ui/cdk';\nimport {TuiLoaderModule, TuiSvgModule, TuiWrapperModule} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\nimport {TuiToggleComponent} from './toggle.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiFocusedModule,\n TuiFocusableModule,\n TuiHoveredModule,\n TuiPressedModule,\n TuiFocusVisibleModule,\n TuiCheckedModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiLoaderModule,\n PolymorpheusModule,\n ],\n declarations: [TuiToggleComponent],\n exports: [TuiToggleComponent],\n})\nexport class TuiToggleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAeA;IACa,0BAA0B,GAAkB;IACrD,KAAK,EAAE;QACH,SAAS,EAAT,UAAU,EAA6C;gBAA5C,wBAAS;YAChB,OAAO,SAAS,KAAK,GAAG,GAAG,kBAAkB,GAAG,uBAAuB,CAAC;SAC3E;QACD,QAAQ,EAAR,UAAS,EAA6C;gBAA5C,wBAAS;YACf,OAAO,SAAS,KAAK,GAAG,GAAG,iBAAiB,GAAG,sBAAsB,CAAC;SACzE;KACJ;IACD,WAAW,EAAE,KAAK;IAClB,SAAS,EAAE,KAAK;IAChB,IAAI,EAAE,GAAG;EACX;IAEW,kBAAkB,GAAG,IAAI,cAAc,CAChD,yCAAyC,EACzC;IACI,OAAO,EAAE,cAAM,OAAA,0BAA0B,GAAA;CAC5C;;;ICYO,sCAA2B;IAuBnC,4BAII,OAAyB,EACE,iBAAoC,EAG9C,aAAsC,EAEvC,OAAsB;QAV1C,YAYI,kBAAM,OAAO,EAAE,iBAAiB,CAAC,SACpC;QALoB,mBAAa,GAAb,aAAa,CAAyB;QAEvC,aAAO,GAAP,OAAO,CAAe;QA5B1C,iBAAW,GAAG,KAAI,CAAC,OAAO,CAAC,WAAW,CAAC;QAIvC,eAAS,GAAG,KAAI,CAAC,OAAO,CAAC,SAAS,CAAC;QAInC,gBAAU,GAAG,KAAK,CAAC;QAKnB,UAAI,GAAa,KAAI,CAAC,OAAO,CAAC,IAAI,CAAC;;KAkBlC;2BArCQ,kBAAkB;IAuC3B,sBAAI,sCAAM;aAAV;YACI,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC;SACtC;;;OAAA;IAED,sBAAI,uCAAO;aAAX;YACI,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC;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BAChB,kBAAkB;gBAClB,gBAAgB;gBAChB,gBAAgB;gBAChB,qBAAqB;gBACrB,gBAAgB;gBAChB,gBAAgB;gBAChB,YAAY;gBACZ,eAAe;gBACf,kBAAkB;aACrB;YACD,YAAY,EAAE,CAAC,kBAAkB,CAAC;YAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;SAChC,CAAC;OACW,eAAe,CAAG;IAAD,sBAAC;CAA/B;;AC/BA;;;;;;"}
@@ -38,6 +38,7 @@ export * from '@taiga-ui/kit/components/marker-icon';
38
38
  export * from '@taiga-ui/kit/components/multi-select';
39
39
  export * from '@taiga-ui/kit/components/multi-select-option';
40
40
  export * from '@taiga-ui/kit/components/pagination';
41
+ export * from '@taiga-ui/kit/components/progress';
41
42
  export * from '@taiga-ui/kit/components/radio';
42
43
  export * from '@taiga-ui/kit/components/radio-block';
43
44
  export * from '@taiga-ui/kit/components/radio-group';
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components.js","sources":["ng://@taiga-ui/kit/components/taiga-ui-kit-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components.js","sources":["ng://@taiga-ui/kit/components/taiga-ui-kit-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;"}
@@ -0,0 +1,172 @@
1
+ import { __extends, __decorate, __param } from 'tslib';
2
+ import { DOCUMENT } from '@angular/common';
3
+ import { ElementRef, Inject, ComponentFactoryResolver, Injector, Input, HostListener, Directive, forwardRef, NgModule } from '@angular/core';
4
+ import { getNativeFocused, getClosestFocusable, setNativeFocused, TuiDestroyService, TuiPortalService, TuiActiveZoneDirective, tuiDefaultProp } from '@taiga-ui/cdk';
5
+ import { TUI_DROPDOWN_DIRECTIVE, AbstractTuiDropdown, TuiDropdownBoxModule } from '@taiga-ui/core';
6
+ import { EMPTY, Observable } from 'rxjs';
7
+ import { filter, takeUntil } from 'rxjs/operators';
8
+
9
+ // @dynamic
10
+ var TuiDropdownContextDirective = /** @class */ (function (_super) {
11
+ __extends(TuiDropdownContextDirective, _super);
12
+ function TuiDropdownContextDirective(elementRef, documentRef, destroy$, componentFactoryResolver, injector, portalService, activeZone) {
13
+ var _this = _super.call(this, componentFactoryResolver, injector, portalService, elementRef, activeZone) || this;
14
+ _this.elementRef = elementRef;
15
+ _this.documentRef = documentRef;
16
+ _this.activeZone = activeZone;
17
+ _this.content = '';
18
+ _this.refresh$ = EMPTY;
19
+ _this.context = {
20
+ close: function () { return _this.closeDropdownBox(); },
21
+ };
22
+ _this.lastClickedClientRect = _this.getClientRectFromDot(0, 0);
23
+ activeZone.tuiActiveZoneChange
24
+ .pipe(filter(function (isActive) { return !isActive; }), takeUntil(destroy$))
25
+ .subscribe(function () { return _this.closeDropdownBox(); });
26
+ return _this;
27
+ }
28
+ TuiDropdownContextDirective_1 = TuiDropdownContextDirective;
29
+ Object.defineProperty(TuiDropdownContextDirective.prototype, "clientRect", {
30
+ get: function () {
31
+ return this.lastClickedClientRect;
32
+ },
33
+ enumerable: true,
34
+ configurable: true
35
+ });
36
+ Object.defineProperty(TuiDropdownContextDirective.prototype, "fixed", {
37
+ get: function () {
38
+ return true;
39
+ },
40
+ enumerable: true,
41
+ configurable: true
42
+ });
43
+ Object.defineProperty(TuiDropdownContextDirective.prototype, "dropdownContent", {
44
+ get: function () {
45
+ var _a, _b;
46
+ return ((_b = (_a = this.dropdownBoxRef) === null || _a === void 0 ? void 0 : _a.instance.contentElementRef) === null || _b === void 0 ? void 0 : _b.nativeElement) || null;
47
+ },
48
+ enumerable: true,
49
+ configurable: true
50
+ });
51
+ TuiDropdownContextDirective.prototype.onHostClick = function () {
52
+ this.closeDropdownBox();
53
+ };
54
+ TuiDropdownContextDirective.prototype.onContextMenu = function (x, y) {
55
+ this.closeDropdownBox();
56
+ this.openDropdown(x, y);
57
+ };
58
+ TuiDropdownContextDirective.prototype.onAnotherContextOpen = function (target) {
59
+ var isAnotherContextOpened = !this.elementRef.nativeElement.contains(target);
60
+ if (isAnotherContextOpened) {
61
+ this.closeDropdownBox();
62
+ }
63
+ };
64
+ TuiDropdownContextDirective.prototype.onArrow = function (event, down) {
65
+ var activeElement = getNativeFocused(this.documentRef);
66
+ var focusInside = activeElement && this.activeZone.contains(activeElement);
67
+ if (!this.dropdownContent || focusInside) {
68
+ return;
69
+ }
70
+ event.preventDefault();
71
+ var nextEl = this.dropdownContent.nextElementSibling;
72
+ var initial = down || !this.checkIsFocusableElement(nextEl) ? this.dropdownContent : nextEl;
73
+ var focusable = getClosestFocusable(initial, !down, this.dropdownContent);
74
+ if (focusable === null) {
75
+ return;
76
+ }
77
+ setNativeFocused(focusable);
78
+ };
79
+ TuiDropdownContextDirective.prototype.onKeyDownEsc = function (event) {
80
+ if (!this.dropdownContent) {
81
+ return;
82
+ }
83
+ event.stopPropagation();
84
+ this.closeDropdownBox();
85
+ };
86
+ TuiDropdownContextDirective.prototype.openDropdown = function (x, y) {
87
+ this.lastClickedClientRect = this.getClientRectFromDot(x, y);
88
+ this.openDropdownBox();
89
+ };
90
+ TuiDropdownContextDirective.prototype.getClientRectFromDot = function (x, y) {
91
+ return {
92
+ top: y,
93
+ bottom: y,
94
+ left: x,
95
+ right: x,
96
+ height: 0,
97
+ width: 0,
98
+ };
99
+ };
100
+ TuiDropdownContextDirective.prototype.checkIsFocusableElement = function (element) {
101
+ return !!element && 'focus' in element && 'blur' in element;
102
+ };
103
+ var TuiDropdownContextDirective_1;
104
+ TuiDropdownContextDirective.ctorParameters = function () { return [
105
+ { type: ElementRef },
106
+ { type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
107
+ { type: Observable, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
108
+ { type: ComponentFactoryResolver, decorators: [{ type: Inject, args: [ComponentFactoryResolver,] }] },
109
+ { type: Injector, decorators: [{ type: Inject, args: [Injector,] }] },
110
+ { type: TuiPortalService, decorators: [{ type: Inject, args: [TuiPortalService,] }] },
111
+ { type: TuiActiveZoneDirective }
112
+ ]; };
113
+ __decorate([
114
+ Input('tuiDropdownContext'),
115
+ tuiDefaultProp()
116
+ ], TuiDropdownContextDirective.prototype, "content", void 0);
117
+ __decorate([
118
+ HostListener('click')
119
+ ], TuiDropdownContextDirective.prototype, "onHostClick", null);
120
+ __decorate([
121
+ HostListener('contextmenu.prevent', ['$event.clientX', '$event.clientY'])
122
+ ], TuiDropdownContextDirective.prototype, "onContextMenu", null);
123
+ __decorate([
124
+ HostListener('document:contextmenu', ['$event.target'])
125
+ ], TuiDropdownContextDirective.prototype, "onAnotherContextOpen", null);
126
+ __decorate([
127
+ HostListener('document:keydown.arrowDown', ['$event', 'true']),
128
+ HostListener('document:keydown.arrowUp', ['$event', 'false'])
129
+ ], TuiDropdownContextDirective.prototype, "onArrow", null);
130
+ __decorate([
131
+ HostListener('document:keydown.esc', ['$event'])
132
+ ], TuiDropdownContextDirective.prototype, "onKeyDownEsc", null);
133
+ TuiDropdownContextDirective = TuiDropdownContextDirective_1 = __decorate([
134
+ Directive({
135
+ selector: '[tuiDropdownContext]',
136
+ providers: [
137
+ TuiDestroyService,
138
+ TuiActiveZoneDirective,
139
+ {
140
+ provide: TUI_DROPDOWN_DIRECTIVE,
141
+ useExisting: forwardRef(function () { return TuiDropdownContextDirective_1; }),
142
+ },
143
+ ],
144
+ }),
145
+ __param(1, Inject(DOCUMENT)),
146
+ __param(2, Inject(TuiDestroyService)),
147
+ __param(3, Inject(ComponentFactoryResolver)),
148
+ __param(4, Inject(Injector)),
149
+ __param(5, Inject(TuiPortalService))
150
+ ], TuiDropdownContextDirective);
151
+ return TuiDropdownContextDirective;
152
+ }(AbstractTuiDropdown));
153
+
154
+ var TuiDropdownContextModule = /** @class */ (function () {
155
+ function TuiDropdownContextModule() {
156
+ }
157
+ TuiDropdownContextModule = __decorate([
158
+ NgModule({
159
+ imports: [TuiDropdownBoxModule],
160
+ declarations: [TuiDropdownContextDirective],
161
+ exports: [TuiDropdownContextDirective],
162
+ })
163
+ ], TuiDropdownContextModule);
164
+ return TuiDropdownContextModule;
165
+ }());
166
+
167
+ /**
168
+ * Generated bundle index. Do not edit.
169
+ */
170
+
171
+ export { TuiDropdownContextDirective, TuiDropdownContextModule };
172
+ //# sourceMappingURL=taiga-ui-kit-directives-dropdown-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taiga-ui-kit-directives-dropdown-context.js","sources":["ng://@taiga-ui/kit/directives/dropdown-context/dropdown-context.directive.ts","ng://@taiga-ui/kit/directives/dropdown-context/dropdown-context.module.ts","ng://@taiga-ui/kit/directives/dropdown-context/taiga-ui-kit-directives-dropdown-context.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ComponentFactoryResolver,\n Directive,\n ElementRef,\n forwardRef,\n HostListener,\n Inject,\n Injector,\n Input,\n} from '@angular/core';\nimport {\n getClosestFocusable,\n getNativeFocused,\n setNativeFocused,\n TuiActiveZoneDirective,\n tuiDefaultProp,\n TuiDestroyService,\n TuiPortalService,\n} from '@taiga-ui/cdk';\nimport {AbstractTuiDropdown, TUI_DROPDOWN_DIRECTIVE, TuiDropdown} from '@taiga-ui/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {EMPTY, Observable} from 'rxjs';\nimport {filter, takeUntil} from 'rxjs/operators';\n\n// @dynamic\n@Directive({\n selector: '[tuiDropdownContext]',\n providers: [\n TuiDestroyService,\n TuiActiveZoneDirective,\n {\n provide: TUI_DROPDOWN_DIRECTIVE,\n useExisting: forwardRef(() => TuiDropdownContextDirective),\n },\n ],\n})\nexport class TuiDropdownContextDirective\n extends AbstractTuiDropdown\n implements TuiDropdown\n{\n @Input('tuiDropdownContext')\n @tuiDefaultProp()\n content: PolymorpheusContent = '';\n\n readonly refresh$ = EMPTY;\n readonly context = {\n close: () => this.closeDropdownBox(),\n };\n private lastClickedClientRect: ClientRect = this.getClientRectFromDot(0, 0);\n\n constructor(\n protected readonly elementRef: ElementRef,\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Inject(TuiDestroyService) destroy$: Observable<unknown>,\n @Inject(ComponentFactoryResolver)\n componentFactoryResolver: ComponentFactoryResolver,\n @Inject(Injector) injector: Injector,\n @Inject(TuiPortalService) portalService: TuiPortalService,\n readonly activeZone: TuiActiveZoneDirective,\n ) {\n super(componentFactoryResolver, injector, portalService, elementRef, activeZone);\n\n activeZone.tuiActiveZoneChange\n .pipe(\n filter(isActive => !isActive),\n takeUntil(destroy$),\n )\n .subscribe(() => this.closeDropdownBox());\n }\n\n get clientRect(): ClientRect {\n return this.lastClickedClientRect;\n }\n\n get fixed(): boolean {\n return true;\n }\n\n private get dropdownContent(): HTMLElement | null {\n return this.dropdownBoxRef?.instance.contentElementRef?.nativeElement || null;\n }\n\n @HostListener('click')\n onHostClick() {\n this.closeDropdownBox();\n }\n\n @HostListener('contextmenu.prevent', ['$event.clientX', '$event.clientY'])\n onContextMenu(x: number, y: number) {\n this.closeDropdownBox();\n this.openDropdown(x, y);\n }\n\n @HostListener('document:contextmenu', ['$event.target'])\n onAnotherContextOpen(target: HTMLElement) {\n const isAnotherContextOpened = !this.elementRef.nativeElement.contains(target);\n\n if (isAnotherContextOpened) {\n this.closeDropdownBox();\n }\n }\n\n @HostListener('document:keydown.arrowDown', ['$event', 'true'])\n @HostListener('document:keydown.arrowUp', ['$event', 'false'])\n onArrow(event: KeyboardEvent, down: boolean) {\n const activeElement = getNativeFocused(this.documentRef);\n const focusInside = activeElement && this.activeZone.contains(activeElement);\n\n if (!this.dropdownContent || focusInside) {\n return;\n }\n\n event.preventDefault();\n\n const nextEl = this.dropdownContent.nextElementSibling;\n const initial =\n down || !this.checkIsFocusableElement(nextEl) ? this.dropdownContent : nextEl;\n const focusable = getClosestFocusable(initial, !down, this.dropdownContent);\n\n if (focusable === null) {\n return;\n }\n\n setNativeFocused(focusable);\n }\n\n @HostListener('document:keydown.esc', ['$event'])\n onKeyDownEsc(event: KeyboardEvent) {\n if (!this.dropdownContent) {\n return;\n }\n\n event.stopPropagation();\n this.closeDropdownBox();\n }\n\n private openDropdown(x: number, y: number): void {\n this.lastClickedClientRect = this.getClientRectFromDot(x, y);\n this.openDropdownBox();\n }\n\n private getClientRectFromDot(x: number, y: number): ClientRect {\n return {\n top: y,\n bottom: y,\n left: x,\n right: x,\n height: 0,\n width: 0,\n };\n }\n\n private checkIsFocusableElement(element: Element | null): element is HTMLElement {\n return !!element && 'focus' in element && 'blur' in element;\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiDropdownBoxModule} from '@taiga-ui/core';\nimport {TuiDropdownContextDirective} from './dropdown-context.directive';\n\n@NgModule({\n imports: [TuiDropdownBoxModule],\n declarations: [TuiDropdownContextDirective],\n exports: [TuiDropdownContextDirective],\n})\nexport class TuiDropdownContextModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAyBA;;IAaY,+CAAmB;IAa3B,qCACuB,UAAsB,EACN,WAAqB,EAC7B,QAA6B,EAExD,wBAAkD,EAChC,QAAkB,EACV,aAA+B,EAChD,UAAkC;QAR/C,YAUI,kBAAM,wBAAwB,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,CAAC,SAQnF;QAjBsB,gBAAU,GAAV,UAAU,CAAY;QACN,iBAAW,GAAX,WAAW,CAAU;QAM/C,gBAAU,GAAV,UAAU,CAAwB;QAhB/C,aAAO,GAAwB,EAAE,CAAC;QAEzB,cAAQ,GAAG,KAAK,CAAC;QACjB,aAAO,GAAG;YACf,KAAK,EAAE,cAAM,OAAA,KAAI,CAAC,gBAAgB,EAAE,GAAA;SACvC,CAAC;QACM,2BAAq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;QALpC,QAAQ,CAAC;YACN,OAAO,EAAE,CAAC,oBAAoB,CAAC;YAC/B,YAAY,EAAE,CAAC,2BAA2B,CAAC;YAC3C,OAAO,EAAE,CAAC,2BAA2B,CAAC;SACzC,CAAC;OACW,wBAAwB,CAAG;IAAD,+BAAC;CAAxC;;ACTA;;;;;;"}
@@ -26,6 +26,7 @@ var TuiDropdownSelectionDirective = /** @class */ (function (_super) {
26
26
  .pipe(map(function () {
27
27
  var active = getNativeFocused(_this.documentRef);
28
28
  var selection = _this.documentRef.getSelection();
29
+ // TODO: iframe warning
29
30
  if ((active instanceof HTMLInputElement ||
30
31
  active instanceof HTMLTextAreaElement) &&
31
32
  nativeElement.contains(active)) {
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-directives-dropdown-selection.js","sources":["ng://@taiga-ui/kit/directives/dropdown-selection/dropdown-selection.directive.ts","ng://@taiga-ui/kit/directives/dropdown-selection/dropdown-selection.module.ts","ng://@taiga-ui/kit/directives/dropdown-selection/taiga-ui-kit-directives-dropdown-selection.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectorRef,\n ComponentFactoryResolver,\n Directive,\n ElementRef,\n forwardRef,\n Host,\n Inject,\n Injector,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Renderer2,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n ALWAYS_TRUE_HANDLER,\n CHAR_NO_BREAK_SPACE,\n CHAR_ZERO_WIDTH_SPACE,\n getNativeFocused,\n px,\n TuiActiveZoneDirective,\n TuiBooleanHandler,\n TuiDestroyService,\n TuiParentsScrollService,\n TuiPortalService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {\n AbstractTuiDropdown,\n TUI_DOCUMENT_OR_SHADOW_ROOT,\n TUI_DROPDOWN_DIRECTIVE,\n TUI_ELEMENT_REF,\n TuiDropdown,\n} from '@taiga-ui/core';\nimport {getWordRange} from '@taiga-ui/kit/utils/dom';\nimport {merge} from 'rxjs';\nimport {map, switchMapTo, takeUntil} from 'rxjs/operators';\n\n// @dynamic\n@Directive({\n selector: '[tuiDropdownSelection]:not(ng-container)',\n providers: [\n {\n provide: TUI_DROPDOWN_DIRECTIVE,\n useExisting: forwardRef(() => TuiDropdownSelectionDirective),\n },\n TuiParentsScrollService,\n TuiDestroyService,\n ],\n})\nexport class TuiDropdownSelectionDirective\n extends AbstractTuiDropdown\n implements TuiDropdown, OnDestroy {\n @Input()\n set tuiDropdownSelection(handler: TuiBooleanHandler<Range> | undefined) {\n if (!handler) {\n return;\n }\n\n const inHostAndValid =\n this.elementRef.nativeElement.contains(this.range.commonAncestorContainer) &&\n handler(this.range);\n\n this.visibilityHandler = handler;\n this.toggleDropdownBox(inHostAndValid);\n }\n\n @Input('tuiDropdownSelectionPosition')\n position: 'selection' | 'word' | 'tag' = 'selection';\n\n private range: Range;\n\n private visibilityHandler: TuiBooleanHandler<Range> = ALWAYS_TRUE_HANDLER;\n\n private readonly documentRef: Document;\n\n private ghost?: HTMLElement;\n\n constructor(\n @Inject(DOCUMENT) documentRef: Document,\n @Inject(ComponentFactoryResolver)\n componentFactoryResolver: ComponentFactoryResolver,\n @Inject(Injector) injector: Injector,\n @Inject(TuiPortalService) portalService: TuiPortalService,\n @Host() @Inject(ElementRef) elementRef: ElementRef<HTMLElement>,\n @Inject(TuiActiveZoneDirective)\n @Optional()\n activeZone: TuiActiveZoneDirective | null,\n @Inject(TUI_DOCUMENT_OR_SHADOW_ROOT)\n @Optional()\n shadowRootRef: Document | null,\n @Inject(TUI_ELEMENT_REF)\n @Optional()\n customElementRef: ElementRef<HTMLElement> | null,\n @Inject(TuiDestroyService)\n destroy$: TuiDestroyService,\n @Inject(TuiParentsScrollService) readonly refresh$: TuiParentsScrollService,\n @Inject(ChangeDetectorRef) private readonly changeDetectorRef: ChangeDetectorRef,\n @Inject(NgZone) private readonly ngZone: NgZone,\n @Inject(Renderer2) private readonly renderer: Renderer2,\n @Inject(ViewContainerRef) private readonly viewContainerRef: ViewContainerRef,\n ) {\n super(\n componentFactoryResolver,\n injector,\n portalService,\n customElementRef || elementRef,\n activeZone,\n );\n this.documentRef = shadowRootRef || documentRef;\n this.range = this.documentRef.createRange();\n\n const {nativeElement} = this.elementRef;\n\n merge(\n typedFromEvent(this.documentRef, 'mouseup'),\n typedFromEvent(nativeElement, 'mousedown').pipe(\n switchMapTo(\n typedFromEvent(nativeElement, 'mousemove').pipe(\n takeUntil(typedFromEvent(this.documentRef, 'mouseup')),\n ),\n ),\n ),\n typedFromEvent(nativeElement, 'keyup'),\n )\n .pipe(\n map(() => {\n const active = getNativeFocused(this.documentRef);\n const selection = this.documentRef.getSelection();\n\n if (\n (active instanceof HTMLInputElement ||\n active instanceof HTMLTextAreaElement) &&\n nativeElement.contains(active)\n ) {\n return this.veryVerySadInputFix(active);\n }\n\n return selection && selection.rangeCount\n ? selection.getRangeAt(0)\n : this.range;\n }),\n takeUntil(destroy$),\n )\n .subscribe(range => {\n const contained = nativeElement.contains(range.commonAncestorContainer);\n\n this.range = contained ? range : this.range;\n\n const valid =\n contained &&\n (!this.visibilityHandler || this.visibilityHandler(this.range));\n\n this.toggleDropdownBox(valid || this.inDropdown(range));\n });\n }\n\n get clientRect(): ClientRect {\n const {defaultView} = this.documentRef;\n const {rangeRect} = this;\n const frameElement = defaultView ? defaultView.frameElement : null;\n\n if (!frameElement) {\n return rangeRect;\n }\n\n const documentRect = frameElement.getBoundingClientRect();\n\n return {\n top: rangeRect.top + documentRect.top,\n left: rangeRect.left + documentRect.left,\n right: rangeRect.left + documentRect.left + rangeRect.width,\n bottom: rangeRect.top + documentRect.top + rangeRect.height,\n width: rangeRect.width,\n height: rangeRect.height,\n };\n }\n\n ngOnDestroy() {\n this.closeDropdownBox();\n\n if (this.ghost) {\n this.renderer.removeChild(\n this.viewContainerRef.element.nativeElement,\n this.ghost,\n );\n }\n }\n\n /**\n * get ClientRect of current Range according to provided position\n */\n private get rangeRect(): ClientRect {\n switch (this.position) {\n case 'tag':\n const {commonAncestorContainer} = this.range;\n const element =\n commonAncestorContainer.nodeType === Node.ELEMENT_NODE\n ? commonAncestorContainer\n : commonAncestorContainer.parentNode;\n\n return (element as Element).getBoundingClientRect();\n case 'word':\n return getWordRange(this.range).getBoundingClientRect();\n default:\n return this.range.getBoundingClientRect();\n }\n }\n\n /**\n * Toggle dropdown visibility (has to be in ngZone.run because it could be initiated inside iframe in Editor)\n */\n private toggleDropdownBox(visible: boolean) {\n this.ngZone.run(() => {\n if (visible) {\n this.openDropdownBox();\n } else {\n this.closeDropdownBox();\n }\n\n this.changeDetectorRef.markForCheck();\n });\n }\n\n /**\n * Check if Node is inside dropdown\n */\n private boxContains(node: Node): boolean {\n return (\n !!this.dropdownBoxRef &&\n this.dropdownBoxRef.location.nativeElement.contains(node)\n );\n }\n\n /**\n * Check if given range is at leaset partially inside dropdown\n */\n private inDropdown(range: Range): boolean {\n const {startContainer, endContainer} = range;\n const inDropdown = this.boxContains(range.commonAncestorContainer);\n const hostToDropdown =\n this.boxContains(endContainer) &&\n this.elementRef.nativeElement.contains(startContainer);\n const dropdownToHost =\n this.boxContains(startContainer) &&\n this.elementRef.nativeElement.contains(endContainer);\n\n return inDropdown || hostToDropdown || dropdownToHost;\n }\n\n /**\n * Position invisible DIV and create Range similar to selected range inside input/textarea\n */\n private veryVerySadInputFix(element: HTMLInputElement | HTMLTextAreaElement): Range {\n const {ghost = this.initGhost(element)} = this;\n const {top, left, width, height} = element.getBoundingClientRect();\n const {selectionStart, selectionEnd} = element;\n const range = this.documentRef.createRange();\n const hostRect = this.elementRef.nativeElement.getBoundingClientRect();\n\n ghost.style.top = px(top - hostRect.top);\n ghost.style.left = px(left - hostRect.left);\n ghost.style.width = px(width);\n ghost.style.height = px(height);\n ghost.textContent = CHAR_ZERO_WIDTH_SPACE + element.value + CHAR_NO_BREAK_SPACE;\n\n range.setStart(ghost.firstChild!, selectionStart || 0);\n range.setEnd(ghost.firstChild!, selectionEnd || 0);\n\n return range;\n }\n\n /**\n * Create an invisible DIV styled exactly like input/textarea element inside directive\n */\n private initGhost(element: HTMLInputElement | HTMLTextAreaElement): HTMLElement {\n const ghost = this.renderer.createElement('div');\n const {nativeElement} = this.viewContainerRef.element;\n const {font, letterSpacing, textTransform, padding} = getComputedStyle(element);\n\n ghost.style.position = 'absolute';\n ghost.style.pointerEvents = 'none';\n ghost.style.opacity = '0';\n ghost.style.whiteSpace = 'pre-wrap';\n ghost.style.font = font;\n ghost.style.letterSpacing = letterSpacing;\n ghost.style.textTransform = textTransform;\n ghost.style.padding = padding;\n\n this.renderer.appendChild(nativeElement, ghost);\n this.ghost = ghost;\n\n return ghost;\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiDropdownBoxModule} from '@taiga-ui/core';\nimport {TuiDropdownSelectionDirective} from './dropdown-selection.directive';\n\n@NgModule({\n imports: [TuiDropdownBoxModule],\n declarations: [TuiDropdownSelectionDirective],\n exports: [TuiDropdownSelectionDirective],\n})\nexport class TuiDropdownSelectionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAyCA;;IAaY,iDAAmB;IA2B3B,uCACsB,WAAqB,EAEvC,wBAAkD,EAChC,QAAkB,EACV,aAA+B,EAC7B,UAAmC,EAG/D,UAAyC,EAGzC,aAA8B,EAG9B,gBAAgD,EAEhD,QAA2B,EACe,QAAiC,EAC/B,iBAAoC,EAC/C,MAAc,EACX,QAAmB,EACZ,gBAAkC;QAtBjF,YAwBI,kBACI,wBAAwB,EACxB,QAAQ,EACR,aAAa,EACb,gBAAgB,IAAI,UAAU,EAC9B,UAAU,CACb,SA+CJ;QA3D6C,cAAQ,GAAR,QAAQ,CAAyB;QAC/B,uBAAiB,GAAjB,iBAAiB,CAAmB;QAC/C,YAAM,GAAN,MAAM,CAAQ;QACX,cAAQ,GAAR,QAAQ,CAAW;QACZ,sBAAgB,GAAhB,gBAAgB,CAAkB;QAhCjF,cAAQ,GAAiC,WAAW,CAAC;Q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,MAAM,CAAC,iBAAiB,CAAC,CAAA;QAEzB,WAAA,MAAM,CAAC,uBAAuB,CAAC,CAAA;QAC/B,YAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;QACzB,YAAA,MAAM,CAAC,MAAM,CAAC,CAAA;QACd,YAAA,MAAM,CAAC,SAAS,CAAC,CAAA;QACjB,YAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;OAlDpB,6BAA6B,CAoPzC;IAAD,oCAAC;CAAA,CAnPW,mBAAmB;;;IC7C/B;KAA0C;IAA7B,0BAA0B;QALtC,QAAQ,CAAC;YACN,OAAO,EAAE,CAAC,oBAAoB,CAAC;YAC/B,YAAY,EAAE,CAAC,6BAA6B,CAAC;YAC7C,OAAO,EAAE,CAAC,6BAA6B,CAAC;SAC3C,CAAC;OACW,0BAA0B,CAAG;IAAD,iCAAC;CAA1C;;ACTA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-directives-dropdown-selection.js","sources":["ng://@taiga-ui/kit/directives/dropdown-selection/dropdown-selection.directive.ts","ng://@taiga-ui/kit/directives/dropdown-selection/dropdown-selection.module.ts","ng://@taiga-ui/kit/directives/dropdown-selection/taiga-ui-kit-directives-dropdown-selection.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectorRef,\n ComponentFactoryResolver,\n Directive,\n ElementRef,\n forwardRef,\n Host,\n Inject,\n Injector,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Renderer2,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n ALWAYS_TRUE_HANDLER,\n CHAR_NO_BREAK_SPACE,\n CHAR_ZERO_WIDTH_SPACE,\n getNativeFocused,\n px,\n TuiActiveZoneDirective,\n TuiBooleanHandler,\n TuiDestroyService,\n TuiParentsScrollService,\n TuiPortalService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {\n AbstractTuiDropdown,\n TUI_DOCUMENT_OR_SHADOW_ROOT,\n TUI_DROPDOWN_DIRECTIVE,\n TUI_ELEMENT_REF,\n TuiDropdown,\n} from '@taiga-ui/core';\nimport {getWordRange} from '@taiga-ui/kit/utils/dom';\nimport {merge} from 'rxjs';\nimport {map, switchMapTo, takeUntil} from 'rxjs/operators';\n\n// @dynamic\n@Directive({\n selector: '[tuiDropdownSelection]:not(ng-container)',\n providers: [\n {\n provide: TUI_DROPDOWN_DIRECTIVE,\n useExisting: forwardRef(() => TuiDropdownSelectionDirective),\n },\n TuiParentsScrollService,\n TuiDestroyService,\n ],\n})\nexport class TuiDropdownSelectionDirective\n extends AbstractTuiDropdown\n implements TuiDropdown, OnDestroy {\n @Input()\n set tuiDropdownSelection(handler: TuiBooleanHandler<Range> | undefined) {\n if (!handler) {\n return;\n }\n\n const inHostAndValid =\n this.elementRef.nativeElement.contains(this.range.commonAncestorContainer) &&\n handler(this.range);\n\n this.visibilityHandler = handler;\n this.toggleDropdownBox(inHostAndValid);\n }\n\n @Input('tuiDropdownSelectionPosition')\n position: 'selection' | 'word' | 'tag' = 'selection';\n\n private range: Range;\n\n private visibilityHandler: TuiBooleanHandler<Range> = ALWAYS_TRUE_HANDLER;\n\n private readonly documentRef: Document;\n\n private ghost?: HTMLElement;\n\n constructor(\n @Inject(DOCUMENT) documentRef: Document,\n @Inject(ComponentFactoryResolver)\n componentFactoryResolver: ComponentFactoryResolver,\n @Inject(Injector) injector: Injector,\n @Inject(TuiPortalService) portalService: TuiPortalService,\n @Host() @Inject(ElementRef) elementRef: ElementRef<HTMLElement>,\n @Inject(TuiActiveZoneDirective)\n @Optional()\n activeZone: TuiActiveZoneDirective | null,\n @Inject(TUI_DOCUMENT_OR_SHADOW_ROOT)\n @Optional()\n shadowRootRef: Document | null,\n @Inject(TUI_ELEMENT_REF)\n @Optional()\n customElementRef: ElementRef<HTMLElement> | null,\n @Inject(TuiDestroyService)\n destroy$: TuiDestroyService,\n @Inject(TuiParentsScrollService) readonly refresh$: TuiParentsScrollService,\n @Inject(ChangeDetectorRef) private readonly changeDetectorRef: ChangeDetectorRef,\n @Inject(NgZone) private readonly ngZone: NgZone,\n @Inject(Renderer2) private readonly renderer: Renderer2,\n @Inject(ViewContainerRef) private readonly viewContainerRef: ViewContainerRef,\n ) {\n super(\n componentFactoryResolver,\n injector,\n portalService,\n customElementRef || elementRef,\n activeZone,\n );\n this.documentRef = shadowRootRef || documentRef;\n this.range = this.documentRef.createRange();\n\n const {nativeElement} = this.elementRef;\n\n merge(\n typedFromEvent(this.documentRef, 'mouseup'),\n typedFromEvent(nativeElement, 'mousedown').pipe(\n switchMapTo(\n typedFromEvent(nativeElement, 'mousemove').pipe(\n takeUntil(typedFromEvent(this.documentRef, 'mouseup')),\n ),\n ),\n ),\n typedFromEvent(nativeElement, 'keyup'),\n )\n .pipe(\n map(() => {\n const active = getNativeFocused(this.documentRef);\n const selection = this.documentRef.getSelection();\n\n // TODO: iframe warning\n if (\n (active instanceof HTMLInputElement ||\n active instanceof HTMLTextAreaElement) &&\n nativeElement.contains(active)\n ) {\n return this.veryVerySadInputFix(active);\n }\n\n return selection && selection.rangeCount\n ? selection.getRangeAt(0)\n : this.range;\n }),\n takeUntil(destroy$),\n )\n .subscribe(range => {\n const contained = nativeElement.contains(range.commonAncestorContainer);\n\n this.range = contained ? range : this.range;\n\n const valid =\n contained &&\n (!this.visibilityHandler || this.visibilityHandler(this.range));\n\n this.toggleDropdownBox(valid || this.inDropdown(range));\n });\n }\n\n get clientRect(): ClientRect {\n const {defaultView} = this.documentRef;\n const {rangeRect} = this;\n const frameElement = defaultView ? defaultView.frameElement : null;\n\n if (!frameElement) {\n return rangeRect;\n }\n\n const documentRect = frameElement.getBoundingClientRect();\n\n return {\n top: rangeRect.top + documentRect.top,\n left: rangeRect.left + documentRect.left,\n right: rangeRect.left + documentRect.left + rangeRect.width,\n bottom: rangeRect.top + documentRect.top + rangeRect.height,\n width: rangeRect.width,\n height: rangeRect.height,\n };\n }\n\n ngOnDestroy() {\n this.closeDropdownBox();\n\n if (this.ghost) {\n this.renderer.removeChild(\n this.viewContainerRef.element.nativeElement,\n this.ghost,\n );\n }\n }\n\n /**\n * get ClientRect of current Range according to provided position\n */\n private get rangeRect(): ClientRect {\n switch (this.position) {\n case 'tag':\n const {commonAncestorContainer} = this.range;\n const element =\n commonAncestorContainer.nodeType === Node.ELEMENT_NODE\n ? commonAncestorContainer\n : commonAncestorContainer.parentNode;\n\n return (element as Element).getBoundingClientRect();\n case 'word':\n return getWordRange(this.range).getBoundingClientRect();\n default:\n return this.range.getBoundingClientRect();\n }\n }\n\n /**\n * Toggle dropdown visibility (has to be in ngZone.run because it could be initiated inside iframe in Editor)\n */\n private toggleDropdownBox(visible: boolean) {\n this.ngZone.run(() => {\n if (visible) {\n this.openDropdownBox();\n } else {\n this.closeDropdownBox();\n }\n\n this.changeDetectorRef.markForCheck();\n });\n }\n\n /**\n * Check if Node is inside dropdown\n */\n private boxContains(node: Node): boolean {\n return (\n !!this.dropdownBoxRef &&\n this.dropdownBoxRef.location.nativeElement.contains(node)\n );\n }\n\n /**\n * Check if given range is at leaset partially inside dropdown\n */\n private inDropdown(range: Range): boolean {\n const {startContainer, endContainer} = range;\n const inDropdown = this.boxContains(range.commonAncestorContainer);\n const hostToDropdown =\n this.boxContains(endContainer) &&\n this.elementRef.nativeElement.contains(startContainer);\n const dropdownToHost =\n this.boxContains(startContainer) &&\n this.elementRef.nativeElement.contains(endContainer);\n\n return inDropdown || hostToDropdown || dropdownToHost;\n }\n\n /**\n * Position invisible DIV and create Range similar to selected range inside input/textarea\n */\n private veryVerySadInputFix(element: HTMLInputElement | HTMLTextAreaElement): Range {\n const {ghost = this.initGhost(element)} = this;\n const {top, left, width, height} = element.getBoundingClientRect();\n const {selectionStart, selectionEnd} = element;\n const range = this.documentRef.createRange();\n const hostRect = this.elementRef.nativeElement.getBoundingClientRect();\n\n ghost.style.top = px(top - hostRect.top);\n ghost.style.left = px(left - hostRect.left);\n ghost.style.width = px(width);\n ghost.style.height = px(height);\n ghost.textContent = CHAR_ZERO_WIDTH_SPACE + element.value + CHAR_NO_BREAK_SPACE;\n\n range.setStart(ghost.firstChild!, selectionStart || 0);\n range.setEnd(ghost.firstChild!, selectionEnd || 0);\n\n return range;\n }\n\n /**\n * Create an invisible DIV styled exactly like input/textarea element inside directive\n */\n private initGhost(element: HTMLInputElement | HTMLTextAreaElement): HTMLElement {\n const ghost = this.renderer.createElement('div');\n const {nativeElement} = this.viewContainerRef.element;\n const {font, letterSpacing, textTransform, padding} = getComputedStyle(element);\n\n ghost.style.position = 'absolute';\n ghost.style.pointerEvents = 'none';\n ghost.style.opacity = '0';\n ghost.style.whiteSpace = 'pre-wrap';\n ghost.style.font = font;\n ghost.style.letterSpacing = letterSpacing;\n ghost.style.textTransform = textTransform;\n ghost.style.padding = padding;\n\n this.renderer.appendChild(nativeElement, ghost);\n this.ghost = ghost;\n\n return ghost;\n }\n}\n","import {NgModule} from '@angular/core';\nimport {TuiDropdownBoxModule} from '@taiga-ui/core';\nimport {TuiDropdownSelectionDirective} from './dropdown-selection.directive';\n\n@NgModule({\n imports: [TuiDropdownBoxModule],\n declarations: [TuiDropdownSelectionDirective],\n exports: [TuiDropdownSelectionDirective],\n})\nexport class TuiDropdownSelectionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAyCA;;IAaY,iDAAmB;IA2B3B,uCACsB,WAAqB,EAEvC,wBAAkD,EAChC,QAAkB,EACV,aAA+B,EAC7B,UAAmC,EAG/D,UAAyC,EAGzC,aAA8B,EAG9B,gBAAgD,EAEhD,QAA2B,EACe,QAAiC,EAC/B,iBAAoC,EAC/C,MAAc,EACX,QAAmB,EACZ,gBAAkC;QAtBjF,YAwBI,kBACI,wBAAwB,EACxB,QAAQ,EACR,aAAa,EACb,gBAAgB,IAAI,UAAU,EAC9B,UAAU,CACb,SAgDJ;QA5D6C,cAAQ,GAAR,QAAQ,CAAyB;QAC/B,uBAAiB,GAAjB,iBAAiB,CAAmB;QAC/C,YAAM,GAAN,MA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A;QACnC,WAAA,QAAQ,EAAE,CAAA;QAEV,WAAA,MAAM,CAAC,eAAe,CAAC,CAAA;QACvB,WAAA,QAAQ,EAAE,CAAA;QAEV,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;QAEzB,WAAA,MAAM,CAAC,uBAAuB,CAAC,CAAA;QAC/B,YAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;QACzB,YAAA,MAAM,CAAC,MAAM,CAAC,CAAA;QACd,YAAA,MAAM,CAAC,SAAS,CAAC,CAAA;QACjB,YAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;OAlDpB,6BAA6B,CAqPzC;IAAD,oCAAC;CAAA,CApPW,mBAAmB;;;IC7C/B;KAA0C;IAA7B,0BAA0B;QALtC,QAAQ,CAAC;YACN,OAAO,EAAE,CAAC,oBAAoB,CAAC;YAC/B,YAAY,EAAE,CAAC,6BAA6B,CAAC;YAC7C,OAAO,EAAE,CAAC,6BAA6B,CAAC;SAC3C,CAAC;OACW,0BAA0B,CAAG;IAAD,iCAAC;CAA1C;;ACTA;;;;;;"}
@@ -6,6 +6,7 @@ export * from '@taiga-ui/kit/directives/present';
6
6
  export * from '@taiga-ui/kit/directives/project-class';
7
7
  export * from '@taiga-ui/kit/directives/unfinished-validator';
8
8
  export * from '@taiga-ui/kit/directives/value-accessor';
9
+ export * from '@taiga-ui/kit/directives/dropdown-context';
9
10
 
10
11
  /**
11
12
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-directives.js","sources":["ng://@taiga-ui/kit/directives/taiga-ui-kit-directives.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;"}
1
+ {"version":3,"file":"taiga-ui-kit-directives.js","sources":["ng://@taiga-ui/kit/directives/taiga-ui-kit-directives.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAAA;;"}
@@ -41,6 +41,9 @@ var TUI_PLUS_MINUS_TEXTS = new InjectionToken("plus and minus i18n texts", {
41
41
  var TUI_TIME_TEXTS = new InjectionToken("time i18n texts", {
42
42
  factory: extractI18n('time'),
43
43
  });
44
+ var TUI_DATE_TEXTS = new InjectionToken('date format i18n texts', {
45
+ factory: extractI18n('dateTexts'),
46
+ });
44
47
  var TUI_DIGITAL_INFORMATION_UNITS = new InjectionToken("short bytes, kilobytes and megabytes i18n texts", {
45
48
  factory: extractI18n('digitalInformationUnits'),
46
49
  });
@@ -70,5 +73,5 @@ var TUI_COUNTRIES = new InjectionToken('Localized countries names', {
70
73
  * Generated bundle index. Do not edit.
71
74
  */
72
75
 
73
- export { TUI_CALENDAR_DATA_STREAM, TUI_CALENDAR_MONTHS, TUI_CANCEL_WORD, TUI_CHOOSE_DAY_OR_RANGE_TEXTS, TUI_COPY_TEXTS, TUI_COUNTRIES, TUI_DIGITAL_INFORMATION_UNITS, TUI_DONE_WORD, TUI_FILE_TEXTS, TUI_FROM_TO_TEXTS, TUI_INPUT_FILE_TEXTS, TUI_MOBILE_AWARE, TUI_MOBILE_CALENDAR, TUI_MORE_WORD, TUI_OTHER_DATE_TEXT, TUI_PAGINATION_TEXTS, TUI_PASSWORD_TEXTS, TUI_PLUS_MINUS_TEXTS, TUI_TAG_STATUS, TUI_TIME_TEXTS, TUI_VALIDATION_ERRORS };
76
+ export { TUI_CALENDAR_DATA_STREAM, TUI_CALENDAR_MONTHS, TUI_CANCEL_WORD, TUI_CHOOSE_DAY_OR_RANGE_TEXTS, TUI_COPY_TEXTS, TUI_COUNTRIES, TUI_DATE_TEXTS, TUI_DIGITAL_INFORMATION_UNITS, TUI_DONE_WORD, TUI_FILE_TEXTS, TUI_FROM_TO_TEXTS, TUI_INPUT_FILE_TEXTS, TUI_MOBILE_AWARE, TUI_MOBILE_CALENDAR, TUI_MORE_WORD, TUI_OTHER_DATE_TEXT, TUI_PAGINATION_TEXTS, TUI_PASSWORD_TEXTS, TUI_PLUS_MINUS_TEXTS, TUI_TAG_STATUS, TUI_TIME_TEXTS, TUI_VALIDATION_ERRORS };
74
77
  //# sourceMappingURL=taiga-ui-kit-tokens.js.map