@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,4 +1,4 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("@taiga-ui/cdk"),require("@taiga-ui/core"),require("@taiga-ui/kit/components/tag"),require("@taiga-ui/kit/providers"),require("@taiga-ui/kit/tokens"),require("rxjs"),require("rxjs/operators"),require("@angular/common"),require("@tinkoff/ng-polymorpheus")):"function"==typeof define&&define.amd?define("@taiga-ui/kit/components/input-tag",["exports","@angular/core","@angular/forms","@taiga-ui/cdk","@taiga-ui/core","@taiga-ui/kit/components/tag","@taiga-ui/kit/providers","@taiga-ui/kit/tokens","rxjs","rxjs/operators","@angular/common","@tinkoff/ng-polymorpheus"],t):t(((e=e||self)["taiga-ui"]=e["taiga-ui"]||{},e["taiga-ui"].kit=e["taiga-ui"].kit||{},e["taiga-ui"].kit.components=e["taiga-ui"].kit.components||{},e["taiga-ui"].kit.components["input-tag"]={}),e.ng.core,e.ng.forms,e.cdk,e.core$1,e["taiga-ui"].kit.components.tag,e["taiga-ui"].kit.providers,e["taiga-ui"].kit.tokens,e.rxjs,e.rxjs.operators,e.ng.common,e.ngPolymorpheus)}(this,(function(e,t,o,i,n,r,a,l,s,u,d,c){"use strict";
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/forms"),require("@taiga-ui/cdk"),require("@taiga-ui/core"),require("@taiga-ui/kit/components/tag"),require("@taiga-ui/kit/providers"),require("@taiga-ui/kit/tokens"),require("rxjs"),require("rxjs/operators"),require("@angular/common"),require("@tinkoff/ng-polymorpheus")):"function"==typeof define&&define.amd?define("@taiga-ui/kit/components/input-tag",["exports","@angular/core","@angular/forms","@taiga-ui/cdk","@taiga-ui/core","@taiga-ui/kit/components/tag","@taiga-ui/kit/providers","@taiga-ui/kit/tokens","rxjs","rxjs/operators","@angular/common","@tinkoff/ng-polymorpheus"],e):e(((t=t||self)["taiga-ui"]=t["taiga-ui"]||{},t["taiga-ui"].kit=t["taiga-ui"].kit||{},t["taiga-ui"].kit.components=t["taiga-ui"].kit.components||{},t["taiga-ui"].kit.components["input-tag"]={}),t.ng.core,t.ng.forms,t.cdk,t.core$1,t["taiga-ui"].kit.components.tag,t["taiga-ui"].kit.providers,t["taiga-ui"].kit.tokens,t.rxjs,t.rxjs.operators,t.ng.common,t.ngPolymorpheus)}(this,(function(t,e,o,i,n,r,a,l,s,u,d,c){"use strict";
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -12,5 +12,5 @@
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var p=function(e,t){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)};function h(e,t,o,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,o,a):n(t,o))||a);return r>3&&a&&Object.defineProperty(t,o,a),a}function g(e,t){return function(o,i){t(o,i,e)}}function f(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var i,n,r=o.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){n={error:e}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}return a}function m(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(f(arguments[t]));return e}var v=function(e){function d(o,n,r,a,l,u,d,c,p){var h=e.call(this,o,n)||this;return h.tuiScrollService=r,h.elementRef=a,h.appearance=l,h.modeDirective=u,h.tagStatus=d,h.hintController=c,h.controller=p,h.allowSpaces=!0,h.icon="",h.iconAlign="right",h.search="",h.editable=!0,h.tagValidator=i.ALWAYS_TRUE_HANDLER,h.expandable=!0,h.inputHidden=!1,h.disabledItemHandler=i.ALWAYS_FALSE_HANDLER,h.searchChange=new t.EventEmitter,h.open=!1,h.tags=i.EMPTY_QUERY,h.scrollToStart$=new s.Subject,h.scrollToEnd$=new s.Subject,h}var c;return function(e,t){function o(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}(d,e),c=d,Object.defineProperty(d.prototype,"pseudoFocusedSetter",{set:function(e){e||this.focused||this.scrollToStart$.next(),this.pseudoFocused=e},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"scrollerSetter",{set:function(e){this.initScrollerSubscrition(e)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"nativeFocusableElement",{get:function(){return!this.focusableElement||this.computedDisabled?null:this.focusableElement.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"focused",{get:function(){return i.isNativeFocusedIn(this.elementRef.nativeElement)||!!this.dropdown&&this.dropdown.focused},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"size",{get:function(){return this.controller.size},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"labelOutside",{get:function(){return this.controller.labelOutside},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"hasCleaner",{get:function(){return this.controller.cleaner&&this.hasValue&&!this.disabled&&!this.readOnly},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"hasNativeValue",{get:function(){return!!this.search},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"hasValue",{get:function(){return!!this.value.length||this.hasNativeValue},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"hasPlaceholder",{get:function(){return!this.labelOutside||!this.hasValue&&!this.hasExampleText},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"placeholderRaised",{get:function(){return!this.labelOutside&&(this.computedFocused&&!this.readOnly||this.hasValue)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"hasExampleText",{get:function(){return!!this.controller.exampleText&&this.computedFocused&&!this.hasValue&&!this.readOnly},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"hasTooltip",{get:function(){return!!this.hintController.content&&!this.disabled},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"iconAlignLeft",{get:function(){return!!this.icon&&"left"===this.iconAlign},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"iconAlignRight",{get:function(){return!!this.icon&&"right"===this.iconAlign},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"hasRightIcons",{get:function(){return this.hasCleaner||this.hasTooltip||this.iconAlignRight},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"status",{get:function(){return this.modeDirective&&this.modeDirective.mode?"default":this.tagStatus},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"canOpen",{get:function(){return!this.computedDisabled&&!this.readOnly&&!!this.datalist},enumerable:!0,configurable:!0}),d.prototype.getLeftContent=function(e){return!this.tagValidator(e)&&this.errorIconTemplate?this.errorIconTemplate:""},d.prototype.onCleanerClick=function(){this.updateSearch(""),this.clear(),this.focusInput()},d.prototype.onActiveZone=function(e){this.open=!1,this.addTag(),this.updateFocused(e),this.computedFocused||this.scrollToStart$.next()},d.prototype.onMouseDown=function(e){var t=i.getActualTarget(e);!this.focusableElement||t===this.focusableElement.nativeElement||!(e.target instanceof Element)||this.cleanerSvg&&this.cleanerSvg.nativeElement.contains(e.target)||this.tagsContainer&&t!==this.tagsContainer.nativeElement&&this.tagsContainer.nativeElement.contains(t)||(e.preventDefault(),this.focusInput())},d.prototype.onFieldKeyDownBackspace=function(e){this.labelOutside||this.hasNativeValue||!this.value.length?this.onFieldKeyDownArrowLeft(e):this.deleteLastEnabledItem()},d.prototype.onFieldKeyDownArrowLeft=function(e){this.labelOutside&&!this.hasNativeValue&&this.value.length&&(e.preventDefault(),i.setNativeFocused(this.tags.last.nativeElement))},d.prototype.onFieldKeyDownEnter=function(){this.addTag(),this.scrollToEnd$.next()},d.prototype.onTagKeyDownArrowLeft=function(e){e<=0||this.onScrollKeyDown(e,-1)},d.prototype.onTagKeyDownArrowRight=function(e){e!==this.value.length-1?this.onScrollKeyDown(e,1):this.focusInput()},d.prototype.onTagEdited=function(e,t){this.focusInput(),this.updateValue(this.value.map((function(o){return o!==t?o:e.split(",").map((function(e){return e.trim()})).filter(Boolean)})).reduce((function(e,t){return e.concat(t)}),[]))},d.prototype.handleOption=function(e){this.focusInput(),this.updateSearch(""),this.updateValue(this.value.concat(e)),this.open=!1,this.scrollToEnd$.next()},d.prototype.onInput=function(e){var t=this,o=this.allowSpaces?e.split(","):e.split(r.ALLOWED_SPACE_REGEXP),i=o.map((function(e){return e.trim()})).filter((function(e,t,o){var i=o.length;return e.length>0&&t!==i-1})).filter((function(e){return!t.disabledItemHandler(e)}));o.length>1?(this.updateSearch(o[o.length-1].trim()),this.updateValue(m(this.value,i))):this.updateSearch(e),this.open=this.hasNativeValue},d.prototype.onHoveredChange=function(e){this.updateHovered(e)},d.prototype.setDisabledState=function(){e.prototype.setDisabledState.call(this),this.open=!1},d.prototype.onScrollKeyDown=function(e,t){var o=this.tags.find((function(o,i){return i===e+t}));o&&this.scrollBar&&(i.setNativeFocused(o.nativeElement),t*this.scrollBar.nativeElement.clientWidth-t*o.nativeElement.offsetLeft-o.nativeElement.clientWidth<0&&(this.scrollBar.nativeElement.scrollLeft+=t*o.nativeElement.clientWidth))},d.prototype.initScrollerSubscrition=function(e){var t=this;if(e&&e.browserScrollRef){var o=e.browserScrollRef.nativeElement,n=i.typedFromEvent(o,"wheel",{passive:!1}).pipe(u.filter((function(e){return 0===e.deltaX&&t.shouldScroll(o)})),i.preventDefault(),u.map((function(e){var t=e.deltaY;return Math.max(o.scrollLeft+3*t,0)}))),r=this.scrollToStart$.pipe(u.mapTo(0)),a=this.scrollToEnd$.pipe(u.map((function(){return o.scrollWidth})));s.merge(n,r,a).pipe(u.switchMap((function(e){return t.tuiScrollService.scroll$(o,0,e)})),u.takeUntil(this.destroy$)).subscribe()}},d.prototype.updateValue=function(t){var o=new Set;e.prototype.updateValue.call(this,t.reverse().filter((function(e){return!!e&&!o.has(e)&&o.add(e)})).reverse())},d.prototype.updateSearch=function(e){this.focusableElement&&(this.focusableElement.nativeElement.value=e),this.search=e,this.searchChange.emit(e)},d.prototype.shouldScroll=function(e){return e.scrollWidth>e.offsetWidth},d.prototype.addTag=function(){var e=this.search.trim();e&&!this.disabledItemHandler(e)&&(this.updateSearch(""),this.updateValue(this.value.concat(e)))},d.prototype.deleteLastEnabledItem=function(){for(var e=this.value.length-1;e>=0;e--)if(!this.disabledItemHandler(this.value[e])){this.updateValue(m(this.value.slice(0,e),this.value.slice(e+1,this.value.length)));break}},d.prototype.focusInput=function(e){void 0===e&&(e=!1),this.nativeFocusableElement&&i.setNativeFocused(this.nativeFocusableElement,!0,e)},d.ctorParameters=function(){return[{type:o.NgControl,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[o.NgControl]}]},{type:t.ChangeDetectorRef,decorators:[{type:t.Inject,args:[t.ChangeDetectorRef]}]},{type:i.TuiScrollService,decorators:[{type:t.Inject,args:[i.TuiScrollService]}]},{type:t.ElementRef,decorators:[{type:t.Inject,args:[t.ElementRef]}]},{type:String,decorators:[{type:t.Inject,args:[n.TUI_TEXTFIELD_APPEARANCE]}]},{type:n.TuiModeDirective,decorators:[{type:t.Optional},{type:t.Inject,args:[n.TuiModeDirective]}]},{type:void 0,decorators:[{type:t.Inject,args:[l.TUI_TAG_STATUS]}]},{type:n.TuiHintControllerDirective,decorators:[{type:t.Inject,args:[n.TUI_HINT_WATCHED_CONTROLLER]}]},{type:n.TuiTextfieldController,decorators:[{type:t.Inject,args:[n.TUI_TEXTFIELD_WATCHED_CONTROLLER]}]}]},h([t.Input(),i.tuiDefaultProp()],d.prototype,"allowSpaces",void 0),h([t.Input(),i.tuiDefaultProp()],d.prototype,"icon",void 0),h([t.Input(),i.tuiDefaultProp()],d.prototype,"iconAlign",void 0),h([t.Input(),i.tuiDefaultProp()],d.prototype,"search",void 0),h([t.Input(),i.tuiDefaultProp()],d.prototype,"editable",void 0),h([t.Input(),i.tuiDefaultProp()],d.prototype,"tagValidator",void 0),h([t.Input(),t.HostBinding("class._expandable"),i.tuiDefaultProp()],d.prototype,"expandable",void 0),h([t.Input(),i.tuiDefaultProp()],d.prototype,"inputHidden",void 0),h([t.Input(),i.tuiDefaultProp()],d.prototype,"disabledItemHandler",void 0),h([t.Input("pseudoFocused")],d.prototype,"pseudoFocusedSetter",null),h([t.Output()],d.prototype,"searchChange",void 0),h([t.ViewChild(n.TuiScrollbarComponent)],d.prototype,"scrollerSetter",null),h([t.ContentChild(n.TuiDataListDirective,{read:t.TemplateRef})],d.prototype,"datalist",void 0),h([t.ViewChild("errorIcon")],d.prototype,"errorIconTemplate",void 0),h([t.ViewChild(n.TuiHostedDropdownComponent)],d.prototype,"dropdown",void 0),h([t.ViewChild("focusableElement")],d.prototype,"focusableElement",void 0),h([t.ViewChild("tagsContainer")],d.prototype,"tagsContainer",void 0),h([t.ViewChildren("tag",{read:t.ElementRef})],d.prototype,"tags",void 0),h([t.ViewChild("cleaner",{read:t.ElementRef})],d.prototype,"cleanerSvg",void 0),h([t.ViewChild(n.TuiScrollbarComponent,{read:t.ElementRef})],d.prototype,"scrollBar",void 0),h([t.HostBinding("attr.data-tui-host-size")],d.prototype,"size",null),h([t.HostBinding("class._label-outside")],d.prototype,"labelOutside",null),d=c=h([t.Component({selector:"tui-input-tag",changeDetection:t.ChangeDetectionStrategy.OnPush,template:'<tui-hosted-dropdown\n class="hosted"\n [canOpen]="canOpen"\n [content]="datalist || \'\'"\n [(open)]="open"\n (tuiActiveZoneChange)="onActiveZone($event)"\n>\n <tui-wrapper\n [appearance]="appearance"\n [readOnly]="readOnly"\n [focused]="computedFocused"\n [hovered]="computedHovered"\n [disabled]="computedDisabled"\n [invalid]="computedInvalid"\n (tuiHoveredChange)="onHoveredChange($event)"\n (mousedown)="onMouseDown($event)"\n >\n <div class="content">\n <div *ngIf="iconAlignLeft" class="icons icons_left">\n <tui-svg class="icon" [src]="icon"></tui-svg>\n </div>\n <div class="wrapper">\n <div class="absolute-wrapper">\n <div\n *ngIf="hasPlaceholder"\n automation-id="tui-input-tag__placeholder"\n class="placeholder"\n [class.placeholder_raised]="placeholderRaised"\n >\n <ng-content></ng-content>\n </div>\n <div\n *ngIf="hasExampleText"\n automation-id="tui-input-tag__example-text"\n class="value-decoration"\n >\n <span class="example-text-inner">\n {{controller.exampleText}}\n </span>\n </div>\n </div>\n <tui-scrollbar\n *ngIf="!expandable; else items"\n class="scrollbar"\n [hidden]="true"\n >\n <ng-container *ngTemplateOutlet="items"></ng-container>\n </tui-scrollbar>\n <ng-template #items>\n <div #tagsContainer class="tags">\n <ng-container\n *ngIf="controller.labelOutside; else text"\n >\n <tui-tag\n *ngFor="let item of value; index as index"\n #tag\n class="tag"\n automation-id="tui-input-tag__tag"\n [status]="status"\n [leftContent]="getLeftContent(item)"\n [allowSpaces]="allowSpaces"\n [tuiFocusable]="false"\n [disabled]="computedDisabled || disabledItemHandler(item)"\n [editable]="editable && !readOnly"\n [hoverable]="!readOnly"\n [removable]="!readOnly"\n [maxLength]="controller.maxLength"\n [size]="controller.size"\n [value]="item.toString()"\n (edited)="onTagEdited($event, item)"\n (keydown.arrowLeft.prevent)="onTagKeyDownArrowLeft(index)"\n (keydown.arrowRight.prevent)="onTagKeyDownArrowRight(index)"\n ></tui-tag>\n </ng-container>\n <ng-template #text>\n <span\n *ngFor="let item of value"\n class="text"\n [class.text_disabled]="disabledItemHandler(item)"\n [class.text_error]="!tagValidator(item)"\n >{{item}}</span\n >\n </ng-template>\n <div\n class="input-wrapper"\n [class.input-wrapper_collapsed]="computedDisabled || readOnly || inputHidden"\n >\n <div class="ghost">{{search}}</div>\n <input\n #focusableElement\n type="text"\n automation-id="tui-input-tag__native"\n class="native"\n [class.native_hidden]="inputHidden"\n [attr.maxLength]="controller.maxLength"\n [id]="id"\n [disabled]="computedDisabled"\n [readOnly]="readOnly || inputHidden"\n [tuiFocusable]="computedFocusable"\n [ngModel]="search"\n (ngModelChange)="onInput($event)"\n (keydown.arrowLeft)="onFieldKeyDownArrowLeft($event)"\n (keydown.backspace)="onFieldKeyDownBackspace($event)"\n (keydown.enter.prevent)="onFieldKeyDownEnter()"\n />\n </div>\n </div>\n </ng-template>\n </div>\n <div *ngIf="hasRightIcons" class="icons icons_right">\n <tui-svg\n *ngIf="hasCleaner"\n #cleaner\n class="cleaner"\n automation-id="tui-input-tag__cleaner"\n src="tuiIconCloseLarge"\n (click.stop)="onCleanerClick()"\n ></tui-svg>\n <tui-tooltip\n *ngIf="hasTooltip"\n automation-id="tui-input-tag__tooltip"\n class="tooltip"\n describeId="placeholer_until_accesibility_is_added"\n [direction]="hintController.direction"\n [mode]="hintController.mode"\n [content]="hintController.content"\n [showDelay]="hintController.showDelay"\n [hideDelay]="hintController.hideDelay"\n ></tui-tooltip>\n <tui-svg\n *ngIf="iconAlignRight"\n class="icon"\n [src]="icon"\n ></tui-svg>\n </div>\n </div>\n <ng-template #errorIcon>\n <tui-svg class="error-icon" src="tuiIconAttention"></tui-svg>\n </ng-template>\n </tui-wrapper>\n</tui-hosted-dropdown>\n',providers:[{provide:i.TUI_FOCUSABLE_ITEM_ACCESSOR,useExisting:t.forwardRef((function(){return c}))},{provide:n.TUI_DATA_LIST_HOST,useExisting:t.forwardRef((function(){return c}))},a.FIXED_DROPDOWN_CONTROLLER_PROVIDER,n.TEXTFIELD_CONTROLLER_PROVIDER,n.HINT_CONTROLLER_PROVIDER],styles:[":host{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;border-radius:var(--tui-radius-m)}:host[data-tui-host-size='s']{height:var(--tui-height-s);min-height:var(--tui-height-s);max-height:var(--tui-height-s)}:host[data-tui-host-size='m']{height:var(--tui-height-m);min-height:var(--tui-height-m);max-height:var(--tui-height-m)}:host[data-tui-host-size='l']{height:var(--tui-height-l);min-height:var(--tui-height-l);max-height:var(--tui-height-l);font-size:.9375rem}.input{font:var(--tui-font-text-s);color:var(--tui-text-01);padding:0 .75rem;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;width:100%;height:100%;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit}.input:-webkit-autofill,.input:-webkit-autofill:focus,.input:-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[data-tui-host-size='s'] .input{padding:0 .5rem 0 .75rem}:host[data-tui-host-size='l'] .input{padding:0 1rem}:host._disabled .input{pointer-events:none}:host._right-aligned .input{text-align:right}:host[data-tui-host-size='l']:not(._label-outside) .input{padding-top:1.25rem}:host[data-tui-host-size='l']:not(._label-outside) .input:-webkit-autofill+.content .placeholder{width:114%;transform:translateY(-.625rem) scale(.87)}:host[data-tui-host-size='m']:not(._label-outside) .input{padding-top:1.125rem}:host[data-tui-host-size='m']:not(._label-outside) .input:-webkit-autofill+.content .placeholder{width:118%;transform:translateY(-.5rem) scale(.85)}.ghost{visibility:hidden;white-space:pre;text-overflow:clip}.filler{vertical-align:middle}.content{display:flex;height:100%;width:100%;box-sizing:border-box;align-items:center;overflow:hidden}:host[data-tui-host-size='s'] .content{padding-right:.5rem}:host[data-tui-host-size='l'] .content{padding-left:1rem}.wrapper{flex:1;min-width:0}.value-decoration{display:flex;align-items:center;height:1.25rem;margin:-1.25rem 0;padding:.625rem 0;box-sizing:content-box;color:var(--tui-text-03);letter-spacing:normal;text-transform:none}:host._right-aligned .value-decoration{flex-direction:row-reverse;margin-right:-.25rem}:host[data-tui-host-size='m']._label-outside .value-decoration{margin-top:-1.1875rem}:host[data-mode=onDark] .value-decoration{color:var(--tui-text-03-night)}.value-decoration-inner{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.postfix{transition-property:color;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;color:var(--tui-text-01)}.postfix_shifted{margin-left:.5ch}:host[data-mode=onDark] .postfix{color:var(--tui-text-01-night)}.placeholder{transition-property:transform,min-width,color,letter-spacing;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;font:var(--tui-font-text-s);color:var(--tui-text-01);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;height:1.25rem;font-size:.8125rem;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;color:var(--tui-text-02);transform-origin:left;letter-spacing:normal;text-transform:none}.placeholder_raised{width:114%;transform:translateY(-.625rem) scale(.87)}:host[data-tui-host-size='m'] .placeholder_raised{width:118%;transform:translateY(-.5rem) scale(.85);letter-spacing:.025rem}:host._invalid:not(._focused) .placeholder_raised,:host._invalid:not(._focused)._hovered .placeholder_raised{color:var(--tui-error-fill)}:host[data-mode=onDark]._invalid:not(._focused) .placeholder_raised,:host[data-mode=onDark]._invalid:not(._focused)._hovered .placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .placeholder,:host[data-tui-host-size='l']._focused._label-outside .placeholder,:host[data-tui-host-size='m']._focused._label-outside .placeholder{color:var(--tui-text-03)}:host[data-tui-host-size='l'] .placeholder{font-size:.9375rem}:host[data-tui-host-size='l']._focused:not(._label-outside) .placeholder,:host[data-tui-host-size='m']._focused:not(._label-outside) .placeholder{color:var(--tui-text-01)}:host[data-mode=onDark] .placeholder{color:var(--tui-text-02-night)}:host[data-tui-host-size='l'][data-mode=onDark]._focused:not(._label-outside) .placeholder,:host[data-tui-host-size='m'][data-mode=onDark]._focused:not(._label-outside) .placeholder{color:var(--tui-text-01-night)}:host[data-mode=onDark]._focused .placeholder,:host[data-tui-host-size='l'][data-mode=onDark]._focused._label-outside .placeholder,:host[data-tui-host-size='m'][data-mode=onDark]._focused._label-outside .placeholder{color:var(--tui-text-02-night)}.cleaner{transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);position:relative;box-sizing:border-box;cursor:pointer;transition-property:color,transform}.cleaner:hover{color:var(--tui-text-02)}:host._disabled .cleaner,:host._readonly .cleaner{pointer-events:none}:host[data-mode=onDark] .cleaner{color:var(--tui-text-03-night)}:host[data-mode=onDark] .cleaner:hover{color:var(--tui-text-01-night)}.icon{display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03)}:host[data-mode=onDark] .icon{color:var(--tui-text-03-night)}.icon_left{margin:0 .5rem 0 -.25rem}:host[data-tui-host-size='s'] .icon_left{margin-right:.25rem}:host{cursor:text}:host._expandable{height:auto;max-height:none}:host._disabled{pointer-events:none}:host._readonly{cursor:default}.hosted{display:block;border-radius:inherit}.scrollbar{margin:0 -.25rem;padding:0 .25rem}.tags{display:flex;align-items:center;box-sizing:border-box}:host._expandable .tags{flex-wrap:wrap;white-space:normal}:host._readonly .tags{pointer-events:none}:host[data-tui-host-size='m'] .tags{min-height:var(--tui-height-m);padding:.5rem .25rem .5rem 0}:host[data-tui-host-size='l'] .tags{min-height:var(--tui-height-l);padding:.625rem .25rem .625rem 0}:host[data-tui-host-size='m']:not(._label-outside) .tags{padding:1.1875rem 1rem 0 0}:host[data-tui-host-size='l']:not(._label-outside) .tags{padding:1.6875rem 1rem .5625rem 0}.content{padding:0;align-items:flex-start}:host[data-tui-host-size='m'] .content{padding-left:.75rem}.icons{display:flex;align-items:center;padding:0 .75rem}.icons_left{padding:0;margin-right:.5rem;margin-left:-.25rem}:host._expandable .icons_right{margin-left:-.625rem}:host[data-tui-host-size='m'] .icons{height:var(--tui-height-m)}:host[data-tui-host-size='l'] .icons{height:var(--tui-height-l)}.absolute-wrapper{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;justify-content:center}:host[data-tui-host-size='m'] .absolute-wrapper{height:var(--tui-height-m)}:host[data-tui-host-size='l'] .absolute-wrapper{height:var(--tui-height-l)}.wrapper{position:relative;padding:0}.tag{margin:.125rem .5rem .125rem -.25rem;max-width:100%;flex-shrink:0}.text:after{content:',\\00a0'}.text_disabled{color:var(--tui-text-03)}.text_error{color:var(--tui-negative)}:host:not(._expandable) .text{white-space:nowrap}:host:not(:focus-within) .text:last-of-type:after{content:''}.input-wrapper{position:relative;flex:1;max-width:100%;min-height:1.75rem}.input-wrapper_collapsed{flex:0;margin-left:-.5rem}:host[data-tui-host-size='l'] .input-wrapper{min-height:2.25rem}:host:not(._label-outside) .input-wrapper{min-height:1.25rem}.ghost{min-width:.125rem}:host:not(._expandable) .ghost{min-width:2rem}.native{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;width:100%;height:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;padding:0;cursor:inherit}.native:-webkit-autofill,.native:-webkit-autofill:focus,.native:-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}.native_hidden{opacity:0;text-indent:-10em}.error-icon{display:block;color:var(--tui-error-fill);width:1rem;height:1rem}"]}),g(0,t.Optional()),g(0,t.Self()),g(0,t.Inject(o.NgControl)),g(1,t.Inject(t.ChangeDetectorRef)),g(2,t.Inject(i.TuiScrollService)),g(3,t.Inject(t.ElementRef)),g(4,t.Inject(n.TUI_TEXTFIELD_APPEARANCE)),g(5,t.Optional()),g(5,t.Inject(n.TuiModeDirective)),g(6,t.Inject(l.TUI_TAG_STATUS)),g(7,t.Inject(n.TUI_HINT_WATCHED_CONTROLLER)),g(8,t.Inject(n.TUI_TEXTFIELD_WATCHED_CONTROLLER))],d)}(i.AbstractTuiMultipleControl),b=function(){function e(){}return e=h([t.NgModule({imports:[d.CommonModule,o.FormsModule,c.PolymorpheusModule,i.TuiFocusableModule,i.TuiHoveredModule,i.TuiActiveZoneModule,n.TuiSvgModule,n.TuiScrollbarModule,n.TuiTooltipModule,n.TuiHostedDropdownModule,r.TuiTagModule,n.TuiWrapperModule],providers:[i.TuiScrollService],declarations:[v],exports:[v]})],e)}();e.TuiInputTagComponent=v,e.TuiInputTagModule=b,Object.defineProperty(e,"__esModule",{value:!0})}));
15
+ ***************************************************************************** */var p=function(t,e){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)};function h(t,e,o,i){var n,r=arguments.length,a=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,i);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(a=(r<3?n(a):r>3?n(e,o,a):n(e,o))||a);return r>3&&a&&Object.defineProperty(e,o,a),a}function g(t,e){return function(o,i){e(o,i,t)}}function f(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var i,n,r=o.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(t){n={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}return a}function m(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(f(arguments[e]));return t}var v=function(t){function d(o,n,r,a,l,u,d,c,p){var h=t.call(this,o,n)||this;return h.tuiScrollService=r,h.elementRef=a,h.appearance=l,h.modeDirective=u,h.tagStatus=d,h.hintController=c,h.controller=p,h.allowSpaces=!0,h.icon="",h.iconAlign="right",h.search="",h.editable=!0,h.tagValidator=i.ALWAYS_TRUE_HANDLER,h.expandable=!0,h.inputHidden=!1,h.disabledItemHandler=i.ALWAYS_FALSE_HANDLER,h.searchChange=new e.EventEmitter,h.open=!1,h.tags=i.EMPTY_QUERY,h.scrollToStart$=new s.Subject,h.scrollToEnd$=new s.Subject,h}var c;return function(t,e){function o(){this.constructor=t}p(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}(d,t),c=d,Object.defineProperty(d.prototype,"pseudoFocusedSetter",{set:function(t){t||this.focused||this.scrollToStart$.next(),this.pseudoFocused=t},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"scrollerSetter",{set:function(t){this.initScrollerSubscrition(t)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"nativeFocusableElement",{get:function(){return!this.focusableElement||this.computedDisabled?null:this.focusableElement.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"focused",{get:function(){return i.isNativeFocusedIn(this.elementRef.nativeElement)||!!this.dropdown&&this.dropdown.focused},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"size",{get:function(){return this.controller.size},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"labelOutside",{get:function(){var t=this.controller,e=t.size,o=t.labelOutside;return"s"===e||o},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"hasCleaner",{get:function(){return this.controller.cleaner&&this.hasValue&&!this.disabled&&!this.readOnly},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"hasNativeValue",{get:function(){return!!this.search},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"hasValue",{get:function(){return!!this.value.length||this.hasNativeValue},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"hasPlaceholder",{get:function(){return!this.labelOutside||!this.hasValue&&!this.hasExampleText},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"placeholderRaised",{get:function(){return!this.labelOutside&&(this.computedFocused&&!this.readOnly||this.hasValue)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"hasExampleText",{get:function(){return!!this.controller.exampleText&&this.computedFocused&&!this.hasValue&&!this.readOnly},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"hasTooltip",{get:function(){return!!this.hintController.content&&!this.disabled},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"iconAlignLeft",{get:function(){return!!this.icon&&"left"===this.iconAlign},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"iconAlignRight",{get:function(){return!!this.icon&&"right"===this.iconAlign},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"hasRightIcons",{get:function(){return this.hasCleaner||this.hasTooltip||this.iconAlignRight},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"status",{get:function(){return this.modeDirective&&this.modeDirective.mode?"default":this.tagStatus},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"canOpen",{get:function(){return!this.computedDisabled&&!this.readOnly&&!!this.datalist},enumerable:!0,configurable:!0}),d.prototype.getLeftContent=function(t){return!this.tagValidator(t)&&this.errorIconTemplate?this.errorIconTemplate:""},d.prototype.onCleanerClick=function(){this.updateSearch(""),this.clear(),this.focusInput()},d.prototype.onActiveZone=function(t){this.open=!1,this.addTag(),this.updateFocused(t),this.computedFocused||this.scrollToStart$.next()},d.prototype.onMouseDown=function(t){var e=i.getActualTarget(t);!this.focusableElement||e===this.focusableElement.nativeElement||!(t.target instanceof Element)||this.cleanerSvg&&this.cleanerSvg.nativeElement.contains(t.target)||this.tagsContainer&&e!==this.tagsContainer.nativeElement&&this.tagsContainer.nativeElement.contains(e)||(t.preventDefault(),this.focusInput())},d.prototype.onFieldKeyDownBackspace=function(t){this.labelOutside||this.hasNativeValue||!this.value.length?this.onFieldKeyDownArrowLeft(t):this.deleteLastEnabledItem()},d.prototype.onFieldKeyDownArrowLeft=function(t){this.labelOutside&&!this.hasNativeValue&&this.value.length&&(t.preventDefault(),i.setNativeFocused(this.tags.last.nativeElement))},d.prototype.onFieldKeyDownEnter=function(){this.addTag(),this.scrollToEnd$.next()},d.prototype.onTagKeyDownArrowLeft=function(t){t<=0||this.onScrollKeyDown(t,-1)},d.prototype.onTagKeyDownArrowRight=function(t){t!==this.value.length-1?this.onScrollKeyDown(t,1):this.focusInput()},d.prototype.onTagEdited=function(t,e){this.focusInput(),this.updateValue(this.value.map((function(o){return o!==e?o:t.split(",").map((function(t){return t.trim()})).filter(Boolean)})).reduce((function(t,e){return t.concat(e)}),[]))},d.prototype.handleOption=function(t){this.focusInput(),this.updateSearch(""),this.updateValue(this.value.concat(t)),this.open=!1,this.scrollToEnd$.next()},d.prototype.onInput=function(t){var e=this,o=this.allowSpaces?t.split(","):t.split(r.ALLOWED_SPACE_REGEXP),i=o.map((function(t){return t.trim()})).filter((function(t,e,o){var i=o.length;return t.length>0&&e!==i-1})).filter((function(t){return!e.disabledItemHandler(t)}));o.length>1?(this.updateSearch(o[o.length-1].trim()),this.updateValue(m(this.value,i))):this.updateSearch(t),this.open=this.hasNativeValue},d.prototype.onHoveredChange=function(t){this.updateHovered(t)},d.prototype.setDisabledState=function(){t.prototype.setDisabledState.call(this),this.open=!1},d.prototype.onScrollKeyDown=function(t,e){var o=this.tags.find((function(o,i){return i===t+e}));o&&this.scrollBar&&(i.setNativeFocused(o.nativeElement),e*this.scrollBar.nativeElement.clientWidth-e*o.nativeElement.offsetLeft-o.nativeElement.clientWidth<0&&(this.scrollBar.nativeElement.scrollLeft+=e*o.nativeElement.clientWidth))},d.prototype.initScrollerSubscrition=function(t){var e=this;if(t&&t.browserScrollRef){var o=t.browserScrollRef.nativeElement,n=i.typedFromEvent(o,"wheel",{passive:!1}).pipe(u.filter((function(t){return 0===t.deltaX&&e.shouldScroll(o)})),i.preventDefault(),u.map((function(t){var e=t.deltaY;return Math.max(o.scrollLeft+3*e,0)}))),r=this.scrollToStart$.pipe(u.mapTo(0)),a=this.scrollToEnd$.pipe(u.map((function(){return o.scrollWidth})));s.merge(n,r,a).pipe(u.switchMap((function(t){return e.tuiScrollService.scroll$(o,0,t)})),u.takeUntil(this.destroy$)).subscribe()}},d.prototype.updateValue=function(e){var o=new Set;t.prototype.updateValue.call(this,e.reverse().filter((function(t){return!!t&&!o.has(t)&&o.add(t)})).reverse())},d.prototype.updateSearch=function(t){this.focusableElement&&(this.focusableElement.nativeElement.value=t),this.search=t,this.searchChange.emit(t)},d.prototype.shouldScroll=function(t){return t.scrollWidth>t.offsetWidth},d.prototype.addTag=function(){var t=this.search.trim();t&&!this.disabledItemHandler(t)&&(this.updateSearch(""),this.updateValue(this.value.concat(t)))},d.prototype.deleteLastEnabledItem=function(){for(var t=this.value.length-1;t>=0;t--)if(!this.disabledItemHandler(this.value[t])){this.updateValue(m(this.value.slice(0,t),this.value.slice(t+1,this.value.length)));break}},d.prototype.focusInput=function(t){void 0===t&&(t=!1),this.nativeFocusableElement&&i.setNativeFocused(this.nativeFocusableElement,!0,t)},d.ctorParameters=function(){return[{type:o.NgControl,decorators:[{type:e.Optional},{type:e.Self},{type:e.Inject,args:[o.NgControl]}]},{type:e.ChangeDetectorRef,decorators:[{type:e.Inject,args:[e.ChangeDetectorRef]}]},{type:i.TuiScrollService,decorators:[{type:e.Inject,args:[i.TuiScrollService]}]},{type:e.ElementRef,decorators:[{type:e.Inject,args:[e.ElementRef]}]},{type:String,decorators:[{type:e.Inject,args:[n.TUI_TEXTFIELD_APPEARANCE]}]},{type:n.TuiModeDirective,decorators:[{type:e.Optional},{type:e.Inject,args:[n.TuiModeDirective]}]},{type:void 0,decorators:[{type:e.Inject,args:[l.TUI_TAG_STATUS]}]},{type:n.TuiHintControllerDirective,decorators:[{type:e.Inject,args:[n.TUI_HINT_WATCHED_CONTROLLER]}]},{type:n.TuiTextfieldController,decorators:[{type:e.Inject,args:[n.TUI_TEXTFIELD_WATCHED_CONTROLLER]}]}]},h([e.Input(),i.tuiDefaultProp()],d.prototype,"allowSpaces",void 0),h([e.Input(),i.tuiDefaultProp()],d.prototype,"icon",void 0),h([e.Input(),i.tuiDefaultProp()],d.prototype,"iconAlign",void 0),h([e.Input(),i.tuiDefaultProp()],d.prototype,"search",void 0),h([e.Input(),i.tuiDefaultProp()],d.prototype,"editable",void 0),h([e.Input(),i.tuiDefaultProp()],d.prototype,"tagValidator",void 0),h([e.Input(),e.HostBinding("class._expandable"),i.tuiDefaultProp()],d.prototype,"expandable",void 0),h([e.Input(),i.tuiDefaultProp()],d.prototype,"inputHidden",void 0),h([e.Input(),i.tuiDefaultProp()],d.prototype,"disabledItemHandler",void 0),h([e.Input("pseudoFocused")],d.prototype,"pseudoFocusedSetter",null),h([e.Output()],d.prototype,"searchChange",void 0),h([e.ViewChild(n.TuiScrollbarComponent)],d.prototype,"scrollerSetter",null),h([e.ContentChild(n.TuiDataListDirective,{read:e.TemplateRef})],d.prototype,"datalist",void 0),h([e.ViewChild("errorIcon")],d.prototype,"errorIconTemplate",void 0),h([e.ViewChild(n.TuiHostedDropdownComponent)],d.prototype,"dropdown",void 0),h([e.ViewChild("focusableElement")],d.prototype,"focusableElement",void 0),h([e.ViewChild("tagsContainer")],d.prototype,"tagsContainer",void 0),h([e.ViewChildren("tag",{read:e.ElementRef})],d.prototype,"tags",void 0),h([e.ViewChild("cleaner",{read:e.ElementRef})],d.prototype,"cleanerSvg",void 0),h([e.ViewChild(n.TuiScrollbarComponent,{read:e.ElementRef})],d.prototype,"scrollBar",void 0),h([e.HostBinding("attr.data-tui-host-size")],d.prototype,"size",null),h([e.HostBinding("class._label-outside")],d.prototype,"labelOutside",null),d=c=h([e.Component({selector:"tui-input-tag",changeDetection:e.ChangeDetectionStrategy.OnPush,template:'<tui-hosted-dropdown\n class="hosted"\n [canOpen]="canOpen"\n [content]="datalist || \'\'"\n [(open)]="open"\n (tuiActiveZoneChange)="onActiveZone($event)"\n>\n <tui-wrapper\n [appearance]="appearance"\n [readOnly]="readOnly"\n [focused]="computedFocused"\n [hovered]="computedHovered"\n [disabled]="computedDisabled"\n [invalid]="computedInvalid"\n (tuiHoveredChange)="onHoveredChange($event)"\n (mousedown)="onMouseDown($event)"\n >\n <div class="content">\n <div *ngIf="iconAlignLeft" class="icons icons_left">\n <tui-svg class="icon" [src]="icon"></tui-svg>\n </div>\n <div class="wrapper">\n <div class="absolute-wrapper">\n <div\n *ngIf="hasPlaceholder"\n automation-id="tui-input-tag__placeholder"\n class="placeholder"\n [class.placeholder_raised]="placeholderRaised"\n >\n <ng-content></ng-content>\n </div>\n <div\n *ngIf="hasExampleText"\n automation-id="tui-input-tag__example-text"\n class="value-decoration"\n >\n <span class="example-text-inner">\n {{controller.exampleText}}\n </span>\n </div>\n </div>\n <tui-scrollbar\n *ngIf="!expandable; else items"\n class="scrollbar"\n [hidden]="true"\n >\n <ng-container *ngTemplateOutlet="items"></ng-container>\n </tui-scrollbar>\n <ng-template #items>\n <div #tagsContainer class="tags">\n <ng-container *ngIf="labelOutside; else text">\n <tui-tag\n *ngFor="let item of value; index as index"\n #tag\n class="tag"\n automation-id="tui-input-tag__tag"\n [status]="status"\n [leftContent]="getLeftContent(item)"\n [allowSpaces]="allowSpaces"\n [tuiFocusable]="false"\n [disabled]="computedDisabled || disabledItemHandler(item)"\n [editable]="editable && !readOnly"\n [hoverable]="!readOnly"\n [removable]="!readOnly"\n [maxLength]="controller.maxLength"\n [size]="controller.size"\n [value]="item.toString()"\n (edited)="onTagEdited($event, item)"\n (keydown.arrowLeft.prevent)="onTagKeyDownArrowLeft(index)"\n (keydown.arrowRight.prevent)="onTagKeyDownArrowRight(index)"\n ></tui-tag>\n </ng-container>\n <ng-template #text>\n <span\n *ngFor="let item of value"\n class="text"\n [class.text_disabled]="disabledItemHandler(item)"\n [class.text_error]="!tagValidator(item)"\n >{{item}}</span\n >\n </ng-template>\n <div\n class="input-wrapper"\n [class.input-wrapper_collapsed]="computedDisabled || readOnly || inputHidden"\n >\n <div class="ghost">{{search}}</div>\n <input\n #focusableElement\n type="text"\n automation-id="tui-input-tag__native"\n class="native"\n [class.native_hidden]="inputHidden"\n [attr.maxLength]="controller.maxLength"\n [id]="id"\n [disabled]="computedDisabled"\n [readOnly]="readOnly || inputHidden"\n [tuiFocusable]="computedFocusable"\n [ngModel]="search"\n (ngModelChange)="onInput($event)"\n (keydown.arrowLeft)="onFieldKeyDownArrowLeft($event)"\n (keydown.backspace)="onFieldKeyDownBackspace($event)"\n (keydown.enter.prevent)="onFieldKeyDownEnter()"\n />\n </div>\n </div>\n </ng-template>\n </div>\n <div *ngIf="hasRightIcons" class="icons icons_right">\n <tui-svg\n *ngIf="hasCleaner"\n #cleaner\n class="cleaner"\n automation-id="tui-input-tag__cleaner"\n src="tuiIconCloseLarge"\n (click.stop)="onCleanerClick()"\n ></tui-svg>\n <tui-tooltip\n *ngIf="hasTooltip"\n automation-id="tui-input-tag__tooltip"\n class="tooltip"\n describeId="placeholer_until_accesibility_is_added"\n [direction]="hintController.direction"\n [mode]="hintController.mode"\n [content]="hintController.content"\n [showDelay]="hintController.showDelay"\n [hideDelay]="hintController.hideDelay"\n ></tui-tooltip>\n <tui-svg\n *ngIf="iconAlignRight"\n class="icon"\n [src]="icon"\n ></tui-svg>\n </div>\n </div>\n <ng-template #errorIcon>\n <tui-svg class="error-icon" src="tuiIconAttention"></tui-svg>\n </ng-template>\n </tui-wrapper>\n</tui-hosted-dropdown>\n',providers:[{provide:i.TUI_FOCUSABLE_ITEM_ACCESSOR,useExisting:e.forwardRef((function(){return c}))},{provide:n.TUI_DATA_LIST_HOST,useExisting:e.forwardRef((function(){return c}))},a.FIXED_DROPDOWN_CONTROLLER_PROVIDER,n.TEXTFIELD_CONTROLLER_PROVIDER,n.HINT_CONTROLLER_PROVIDER],styles:[":host{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:block;border-radius:var(--tui-radius-m)}:host[data-tui-host-size='s']{height:var(--tui-height-s);min-height:var(--tui-height-s);max-height:var(--tui-height-s)}:host[data-tui-host-size='m']{height:var(--tui-height-m);min-height:var(--tui-height-m);max-height:var(--tui-height-m)}:host[data-tui-host-size='l']{height:var(--tui-height-l);min-height:var(--tui-height-l);max-height:var(--tui-height-l);font-size:.9375rem}.input{font:var(--tui-font-text-s);color:var(--tui-text-01);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;width:100%;height:100%;padding:0;border:solid transparent;border-width:0 .75rem;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-transform:inherit}.input:-webkit-autofill,.input:-webkit-autofill:focus,.input:-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[data-mode=onDark] .input:-webkit-autofill,:host[data-mode=onDark] .input:-webkit-autofill:focus,:host[data-mode=onDark] .input:-webkit-autofill:hover{border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01-night)!important;border-color:var(--tui-autofill-night);-webkit-box-shadow:0 0 0 1000px var(--tui-autofill-night) inset!important}:host[data-tui-host-size='s'] .input{border-width:0 5rem 0 .75rem}:host[data-tui-host-size='l'] .input{border-width:0 1rem}:host._disabled .input{pointer-events:none}:host._right-aligned .input{text-align:right}:host[data-tui-host-size='l']:not(._label-outside) .input{padding-top:1.25rem}:host[data-tui-host-size='l']:not(._label-outside) .input:-webkit-autofill+.content .placeholder{width:114%;transform:translateY(-.625rem) scale(.87)}:host[data-tui-host-size='m']:not(._label-outside) .input{padding-top:1.125rem}:host[data-tui-host-size='m']:not(._label-outside) .input:-webkit-autofill+.content .placeholder{width:118%;transform:translateY(-.5rem) scale(.85)}.ghost{visibility:hidden;white-space:pre;text-overflow:clip}.filler{vertical-align:middle}.content{display:flex;height:100%;width:100%;box-sizing:border-box;align-items:center;overflow:hidden}:host[data-tui-host-size='l'] .content{padding-left:1rem}.wrapper{flex:1;min-width:0}.value-decoration{display:flex;align-items:center;height:1.25rem;margin:-1.25rem 0;padding:.625rem 0;box-sizing:content-box;color:var(--tui-text-03);letter-spacing:normal;text-transform:none}:host._right-aligned .value-decoration{flex-direction:row-reverse;margin-right:-.25rem}:host[data-tui-host-size='m']._label-outside .value-decoration{margin-top:-1.1875rem}:host[data-mode=onDark] .value-decoration{color:var(--tui-text-03-night)}.value-decoration-inner{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.postfix{transition-property:color;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;color:var(--tui-text-01)}.postfix_shifted{margin-left:.5ch}:host[data-mode=onDark] .postfix{color:var(--tui-text-01-night)}.placeholder{transition-property:transform,min-width,color,letter-spacing;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;font:var(--tui-font-text-s);color:var(--tui-text-01);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;height:1.25rem;font-size:.8125rem;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;color:var(--tui-text-02);transform-origin:left;letter-spacing:normal;text-transform:none}.placeholder_raised{width:114%;transform:translateY(-.625rem) scale(.87)}:host[data-tui-host-size='m'] .placeholder_raised{width:118%;transform:translateY(-.5rem) scale(.85);letter-spacing:.025rem}:host._invalid:not(._focused) .placeholder_raised,:host._invalid:not(._focused)._hovered .placeholder_raised{color:var(--tui-error-fill)}:host[data-mode=onDark]._invalid:not(._focused) .placeholder_raised,:host[data-mode=onDark]._invalid:not(._focused)._hovered .placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .placeholder,:host[data-tui-host-size='l']._focused._label-outside .placeholder,:host[data-tui-host-size='m']._focused._label-outside .placeholder{color:var(--tui-text-03)}:host[data-tui-host-size='l'] .placeholder{font-size:.9375rem}:host[data-tui-host-size='l']._focused:not(._label-outside) .placeholder,:host[data-tui-host-size='m']._focused:not(._label-outside) .placeholder{color:var(--tui-text-01)}:host[data-mode=onDark] .placeholder{color:var(--tui-text-02-night)}:host[data-tui-host-size='l'][data-mode=onDark]._focused:not(._label-outside) .placeholder,:host[data-tui-host-size='m'][data-mode=onDark]._focused:not(._label-outside) .placeholder{color:var(--tui-text-01-night)}:host[data-mode=onDark]._focused .placeholder,:host[data-tui-host-size='l'][data-mode=onDark]._focused._label-outside .placeholder,:host[data-tui-host-size='m'][data-mode=onDark]._focused._label-outside .placeholder{color:var(--tui-text-02-night)}.cleaner{transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);position:relative;box-sizing:border-box;cursor:pointer;transition-property:color,transform}.cleaner:hover{color:var(--tui-text-02)}:host._disabled .cleaner,:host._readonly .cleaner{pointer-events:none}:host[data-mode=onDark] .cleaner{color:var(--tui-text-03-night)}:host[data-mode=onDark] .cleaner:hover{color:var(--tui-text-01-night)}.icon{display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03)}:host[data-mode=onDark] .icon{color:var(--tui-text-03-night)}.icon_left{margin:0 .5rem 0 -.25rem}:host[data-tui-host-size='s'] .icon_left{margin-right:.25rem}:host{cursor:text}:host._expandable{height:auto;max-height:none}:host._disabled{pointer-events:none}:host._readonly{cursor:default}.hosted{display:block;border-radius:inherit}.scrollbar{margin:0 -.25rem;padding:0 .25rem}.tags{display:flex;align-items:center;box-sizing:border-box}:host._expandable .tags{flex-wrap:wrap;white-space:normal}:host._readonly .tags{pointer-events:none}:host[data-tui-host-size='s'] .tags{min-height:var(--tui-height-s);padding:.25rem .25rem .25rem 0}:host[data-tui-host-size='m'] .tags{min-height:var(--tui-height-m);padding:.5rem .25rem .5rem 0}:host[data-tui-host-size='l'] .tags{min-height:var(--tui-height-l);padding:.625rem .25rem .625rem 0}:host[data-tui-host-size='m']:not(._label-outside) .tags{padding:1.1875rem 1rem 0 0}:host[data-tui-host-size='l']:not(._label-outside) .tags{padding:1.6875rem 1rem .5625rem 0}.content{padding:0;align-items:flex-start}:host[data-tui-host-size='m'] .content,:host[data-tui-host-size='s'] .content{padding-left:.75rem}:host[data-tui-host-size='s'] .content{padding-right:0}.icons{display:flex;align-items:center;padding:0 .75rem}.icons_left{padding:0;margin-right:.5rem;margin-left:-.25rem}:host._expandable .icons_right{margin-left:-.625rem}:host[data-tui-host-size='s'] .icons{height:var(--tui-height-s)}:host[data-tui-host-size='m'] .icons{height:var(--tui-height-m)}:host[data-tui-host-size='l'] .icons{height:var(--tui-height-l)}.absolute-wrapper{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;justify-content:center}:host[data-tui-host-size='m'] .absolute-wrapper{height:var(--tui-height-m)}:host[data-tui-host-size='l'] .absolute-wrapper{height:var(--tui-height-l)}.wrapper{position:relative;padding:0}.tag{margin:.125rem .5rem .125rem -.25rem;max-width:100%;flex-shrink:0}.text:after{content:',\\00a0'}.text_disabled{color:var(--tui-text-03)}.text_error{color:var(--tui-negative)}:host:not(._expandable) .text{white-space:nowrap}:host:not(:focus-within) .text:last-of-type:after{content:''}.input-wrapper{position:relative;flex:1;max-width:100%}.input-wrapper_collapsed{flex:0;margin-left:-.5rem}:host[data-tui-host-size='s'] .input-wrapper{min-height:1.5rem}:host[data-tui-host-size='m'] .input-wrapper{min-height:calc(var(--tui-height-xs) + 2 * .125rem)}:host[data-tui-host-size='l'] .input-wrapper{min-height:calc(var(--tui-height-s) + 2 * .125rem)}:host:not(._label-outside) .input-wrapper{min-height:1.25rem}.ghost{min-width:.125rem}:host:not(._expandable) .ghost{min-width:2rem}.native{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;width:100%;height:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;padding:0;cursor:inherit}.native:-webkit-autofill,.native:-webkit-autofill:focus,.native:-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}.native_hidden{opacity:0;text-indent:-10em}.error-icon{display:block;color:var(--tui-error-fill);width:1rem;height:1rem}"]}),g(0,e.Optional()),g(0,e.Self()),g(0,e.Inject(o.NgControl)),g(1,e.Inject(e.ChangeDetectorRef)),g(2,e.Inject(i.TuiScrollService)),g(3,e.Inject(e.ElementRef)),g(4,e.Inject(n.TUI_TEXTFIELD_APPEARANCE)),g(5,e.Optional()),g(5,e.Inject(n.TuiModeDirective)),g(6,e.Inject(l.TUI_TAG_STATUS)),g(7,e.Inject(n.TUI_HINT_WATCHED_CONTROLLER)),g(8,e.Inject(n.TUI_TEXTFIELD_WATCHED_CONTROLLER))],d)}(i.AbstractTuiMultipleControl),b=function(){function t(){}return t=h([e.NgModule({imports:[d.CommonModule,o.FormsModule,c.PolymorpheusModule,i.TuiFocusableModule,i.TuiHoveredModule,i.TuiActiveZoneModule,n.TuiSvgModule,n.TuiScrollbarModule,n.TuiTooltipModule,n.TuiHostedDropdownModule,r.TuiTagModule,n.TuiWrapperModule],providers:[i.TuiScrollService],declarations:[v],exports:[v]})],t)}();t.TuiInputTagComponent=v,t.TuiInputTagModule=b,Object.defineProperty(t,"__esModule",{value:!0})}));
16
16
  //# sourceMappingURL=taiga-ui-kit-components-input-tag.umd.min.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../node_modules/tslib/tslib.es6.js","ng://@taiga-ui/kit/components/input-tag/input-tag.component.ts","ng://@taiga-ui/kit/components/input-tag/input-tag.module.ts"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__decorate","decorators","target","key","desc","c","arguments","length","r","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","__param","paramIndex","decorator","__read","o","n","m","Symbol","iterator","e","call","ar","next","done","push","value","error","__spread","concat","TuiInputTagComponent","control","changeDetectorRef","tuiScrollService","elementRef","appearance","modeDirective","tagStatus","hintController","controller","_this","_super","this","allowSpaces","icon","iconAlign","search","editable","tagValidator","ALWAYS_TRUE_HANDLER","expandable","inputHidden","disabledItemHandler","ALWAYS_FALSE_HANDLER","searchChange","EventEmitter","open","tags","EMPTY_QUERY","scrollToStart$","Subject","scrollToEnd$","__","constructor","prototype","create","__extends","focused","pseudoFocused","scroller","initScrollerSubscrition","focusableElement","computedDisabled","nativeElement","isNativeFocusedIn","dropdown","size","labelOutside","cleaner","hasValue","disabled","readOnly","hasNativeValue","hasExampleText","computedFocused","exampleText","content","hasCleaner","hasTooltip","iconAlignRight","mode","datalist","getLeftContent","tag","errorIconTemplate","onCleanerClick","updateSearch","clear","focusInput","onActiveZone","active","addTag","updateFocused","onMouseDown","event","actualTarget","getActualTarget","Element","cleanerSvg","contains","tagsContainer","preventDefault","onFieldKeyDownBackspace","onFieldKeyDownArrowLeft","deleteLastEnabledItem","setNativeFocused","last","onFieldKeyDownEnter","onTagKeyDownArrowLeft","currentIndex","onScrollKeyDown","onTagKeyDownArrowRight","onTagEdited","editedTag","updateValue","map","split","trim","filter","Boolean","reduce","result","item","handleOption","onInput","array","ALLOWED_SPACE_REGEXP","validated","index","_a","onHoveredChange","hovered","updateHovered","setDisabledState","flag","find","_item","scrollBar","clientWidth","offsetLeft","scrollLeft","browserScrollRef","wheel$","typedFromEvent","passive","pipe","deltaX","shouldScroll","deltaY","Math","max","start$","mapTo","end$","scrollWidth","merge","switchMap","left","scroll$","takeUntil","destroy$","subscribe","seen","Set","reverse","has","add","emit","offsetWidth","inputValue","slice","preventScroll","nativeFocusableElement","NgControl","type","Optional","Self","Inject","args","ChangeDetectorRef","TuiScrollService","ElementRef","TUI_TEXTFIELD_APPEARANCE","TuiModeDirective","TUI_TAG_STATUS","TuiHintControllerDirective","TUI_HINT_WATCHED_CONTROLLER","TuiTextfieldController","TUI_TEXTFIELD_WATCHED_CONTROLLER","Input","tuiDefaultProp","HostBinding","Output","ViewChild","TuiScrollbarComponent","ContentChild","TuiDataListDirective","read","TemplateRef","TuiHostedDropdownComponent","ViewChildren","TuiInputTagComponent_1","Component","selector","changeDetection","ChangeDetectionStrategy","OnPush","template","providers","provide","TUI_FOCUSABLE_ITEM_ACCESSOR","useExisting","forwardRef","TUI_DATA_LIST_HOST","FIXED_DROPDOWN_CONTROLLER_PROVIDER","TEXTFIELD_CONTROLLER_PROVIDER","HINT_CONTROLLER_PROVIDER","AbstractTuiMultipleControl","TuiInputTagModule","NgModule","imports","CommonModule","FormsModule","PolymorpheusModule","TuiFocusableModule","TuiHoveredModule","TuiActiveZoneModule","TuiSvgModule","TuiScrollbarModule","TuiTooltipModule","TuiHostedDropdownModule","TuiTagModule","TuiWrapperModule","declarations","exports"],"mappings":";;;;;;;;;;;;;;oFAgBA,IAAIA,EAAgB,SAASC,EAAGC,GAI5B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW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,EAAAA,YAEP5K,EAAA,EAAAgL,EAAAA,OAAOE,EAAAA,oBACPlL,EAAA,EAAAgL,EAAAA,OAAOG,EAAAA,mBACPnL,EAAA,EAAAgL,EAAAA,OAAOI,EAAAA,aACPpL,EAAA,EAAAgL,EAAAA,OAAOK,EAAAA,2BACPrL,EAAA,EAAA8K,EAAAA,YACA9K,EAAA,EAAAgL,EAAAA,OAAOM,EAAAA,mBAEPtL,EAAA,EAAAgL,EAAAA,OAAOO,EAAAA,iBACPvL,EAAA,EAAAgL,EAAAA,OAAOS,EAAAA,8BAEPzL,EAAA,EAAAgL,EAAAA,OAAOW,EAAAA,oCArGHxK,IACDqM,EAAAA,yCC/CZ,SAAAC,KAAgC,OAAnBA,EAAiBvO,EAAA,CAnB7BwO,EAAAA,SAAS,CACNC,QAAS,CACLC,EAAAA,aACAC,EAAAA,YACAC,EAAAA,mBACAC,EAAAA,mBACAC,EAAAA,iBACAC,EAAAA,oBACAC,EAAAA,aACAC,EAAAA,mBACAC,EAAAA,iBACAC,EAAAA,wBACAC,EAAAA,aACAC,EAAAA,kBAEJxB,UAAW,CAAC5B,EAAAA,kBACZqD,aAAc,CAACrN,GACfsN,QAAS,CAACtN,MAEDsM","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n forwardRef,\n HostBinding,\n Inject,\n Input,\n Optional,\n Output,\n QueryList,\n Self,\n TemplateRef,\n ViewChild,\n ViewChildren,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiMultipleControl,\n ALWAYS_FALSE_HANDLER,\n ALWAYS_TRUE_HANDLER,\n EMPTY_QUERY,\n getActualTarget,\n isNativeFocusedIn,\n preventDefault,\n setNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TuiActiveZoneDirective,\n TuiBooleanHandler,\n TuiContextWithImplicit,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiScrollService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {\n HINT_CONTROLLER_PROVIDER,\n TEXTFIELD_CONTROLLER_PROVIDER,\n TUI_DATA_LIST_HOST,\n TUI_HINT_WATCHED_CONTROLLER,\n TUI_TEXTFIELD_APPEARANCE,\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiDataListDirective,\n TuiDataListHost,\n TuiHintControllerDirective,\n TuiHorizontalDirection,\n TuiHostedDropdownComponent,\n TuiModeDirective,\n TuiScrollbarComponent,\n TuiSizeL,\n TuiSizeS,\n TuiTextfieldController,\n} from '@taiga-ui/core';\nimport {ALLOWED_SPACE_REGEXP} from '@taiga-ui/kit/components/tag';\nimport {FIXED_DROPDOWN_CONTROLLER_PROVIDER} from '@taiga-ui/kit/providers';\nimport {TUI_TAG_STATUS} from '@taiga-ui/kit/tokens';\nimport {TuiStatusT} from '@taiga-ui/kit/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {merge, Subject} from 'rxjs';\nimport {filter, map, mapTo, switchMap, takeUntil} from 'rxjs/operators';\n\nconst EVENT_Y_TO_X_COEFFICENT = 3;\n\n@Component({\n selector: 'tui-input-tag',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './input-tag.template.html',\n styleUrls: ['./input-tag.style.less'],\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiInputTagComponent),\n },\n {\n provide: TUI_DATA_LIST_HOST,\n useExisting: forwardRef(() => TuiInputTagComponent),\n },\n FIXED_DROPDOWN_CONTROLLER_PROVIDER,\n TEXTFIELD_CONTROLLER_PROVIDER,\n HINT_CONTROLLER_PROVIDER,\n ],\n})\nexport class TuiInputTagComponent\n extends AbstractTuiMultipleControl<string>\n implements TuiFocusableElementAccessor, TuiDataListHost<string> {\n @Input()\n @tuiDefaultProp()\n allowSpaces = true;\n\n @Input()\n @tuiDefaultProp()\n icon = '';\n\n @Input()\n @tuiDefaultProp()\n iconAlign: TuiHorizontalDirection = 'right';\n\n @Input()\n @tuiDefaultProp()\n search = '';\n\n @Input()\n @tuiDefaultProp()\n editable = true;\n\n @Input()\n @tuiDefaultProp()\n tagValidator: TuiBooleanHandler<string> = ALWAYS_TRUE_HANDLER;\n\n @Input()\n @HostBinding('class._expandable')\n @tuiDefaultProp()\n expandable = true;\n\n @Input()\n @tuiDefaultProp()\n inputHidden = false;\n\n @Input()\n @tuiDefaultProp()\n disabledItemHandler: TuiBooleanHandler<string> = ALWAYS_FALSE_HANDLER;\n\n @Input('pseudoFocused')\n set pseudoFocusedSetter(value: boolean | null) {\n if (!value && !this.focused) {\n this.scrollToStart$.next();\n }\n\n this.pseudoFocused = value;\n }\n\n @Output()\n readonly searchChange = new EventEmitter<string>();\n\n open = false;\n\n @ViewChild(TuiScrollbarComponent)\n set scrollerSetter(scroller: TuiScrollbarComponent | null) {\n this.initScrollerSubscrition(scroller);\n }\n\n @ContentChild(TuiDataListDirective, {read: TemplateRef})\n readonly datalist?: TemplateRef<TuiContextWithImplicit<TuiActiveZoneDirective>>;\n\n @ViewChild('errorIcon')\n readonly errorIconTemplate?: TemplateRef<{}>;\n\n @ViewChild(TuiHostedDropdownComponent)\n private readonly dropdown?: TuiHostedDropdownComponent;\n\n @ViewChild('focusableElement')\n private readonly focusableElement?: ElementRef<HTMLInputElement>;\n\n @ViewChild('tagsContainer')\n private readonly tagsContainer?: ElementRef<HTMLElement>;\n\n @ViewChildren('tag', {read: ElementRef})\n private readonly tags: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n private readonly scrollToStart$ = new Subject<void>();\n private readonly scrollToEnd$ = new Subject<void>();\n\n @ViewChild('cleaner', {read: ElementRef})\n private readonly cleanerSvg?: ElementRef<HTMLElement>;\n\n @ViewChild(TuiScrollbarComponent, {read: ElementRef})\n private readonly scrollBar?: ElementRef<HTMLElement>;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TuiScrollService) private tuiScrollService: TuiScrollService,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TUI_TEXTFIELD_APPEARANCE) readonly appearance: string,\n @Optional()\n @Inject(TuiModeDirective)\n private readonly modeDirective: TuiModeDirective | null,\n @Inject(TUI_TAG_STATUS) private readonly tagStatus: TuiStatusT,\n @Inject(TUI_HINT_WATCHED_CONTROLLER)\n readonly hintController: TuiHintControllerDirective,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n readonly controller: TuiTextfieldController,\n ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): HTMLInputElement | null {\n return !this.focusableElement || this.computedDisabled\n ? null\n : this.focusableElement.nativeElement;\n }\n\n get focused(): boolean {\n return (\n isNativeFocusedIn(this.elementRef.nativeElement) ||\n (!!this.dropdown && this.dropdown.focused)\n );\n }\n\n @HostBinding('attr.data-tui-host-size')\n get size(): TuiSizeL | TuiSizeS {\n return this.controller.size;\n }\n\n @HostBinding('class._label-outside')\n get labelOutside(): boolean {\n return this.controller.labelOutside;\n }\n\n get hasCleaner(): boolean {\n return (\n this.controller.cleaner && this.hasValue && !this.disabled && !this.readOnly\n );\n }\n\n get hasNativeValue(): boolean {\n return !!this.search;\n }\n\n get hasValue(): boolean {\n return !!this.value.length || this.hasNativeValue;\n }\n\n get hasPlaceholder(): boolean {\n return !this.labelOutside || (!this.hasValue && !this.hasExampleText);\n }\n\n get placeholderRaised(): boolean {\n return (\n !this.labelOutside &&\n ((this.computedFocused && !this.readOnly) || this.hasValue)\n );\n }\n\n get hasExampleText(): boolean {\n return (\n !!this.controller.exampleText &&\n this.computedFocused &&\n !this.hasValue &&\n !this.readOnly\n );\n }\n\n get hasTooltip(): boolean {\n return !!this.hintController.content && !this.disabled;\n }\n\n get iconAlignLeft(): boolean {\n return !!this.icon && this.iconAlign === 'left';\n }\n\n get iconAlignRight(): boolean {\n return !!this.icon && this.iconAlign === 'right';\n }\n\n get hasRightIcons(): boolean {\n return this.hasCleaner || this.hasTooltip || this.iconAlignRight;\n }\n\n get status(): TuiStatusT {\n return this.modeDirective && this.modeDirective.mode ? 'default' : this.tagStatus;\n }\n\n get canOpen(): boolean {\n return !this.computedDisabled && !this.readOnly && !!this.datalist;\n }\n\n getLeftContent(tag: string): PolymorpheusContent {\n return !this.tagValidator(tag) && this.errorIconTemplate\n ? this.errorIconTemplate\n : '';\n }\n\n onCleanerClick() {\n this.updateSearch('');\n this.clear();\n this.focusInput();\n }\n\n onActiveZone(active: boolean) {\n this.open = false;\n this.addTag();\n this.updateFocused(active);\n\n if (!this.computedFocused) {\n this.scrollToStart$.next();\n }\n }\n\n onMouseDown(event: MouseEvent) {\n const actualTarget = getActualTarget(event);\n\n if (\n !this.focusableElement ||\n actualTarget === this.focusableElement.nativeElement ||\n !(event.target instanceof Element) ||\n (this.cleanerSvg && this.cleanerSvg.nativeElement.contains(event.target)) ||\n (this.tagsContainer &&\n actualTarget !== this.tagsContainer.nativeElement &&\n this.tagsContainer.nativeElement.contains(actualTarget))\n ) {\n return;\n }\n\n event.preventDefault();\n this.focusInput();\n }\n\n onFieldKeyDownBackspace(event: KeyboardEvent) {\n if (!this.labelOutside && !this.hasNativeValue && this.value.length) {\n this.deleteLastEnabledItem();\n } else {\n this.onFieldKeyDownArrowLeft(event);\n }\n }\n\n onFieldKeyDownArrowLeft(event: KeyboardEvent) {\n if (!this.labelOutside || this.hasNativeValue || !this.value.length) {\n return;\n }\n\n event.preventDefault();\n setNativeFocused(this.tags.last.nativeElement);\n }\n\n onFieldKeyDownEnter() {\n this.addTag();\n this.scrollToEnd$.next();\n }\n\n onTagKeyDownArrowLeft(currentIndex: number) {\n if (currentIndex <= 0) {\n return;\n }\n\n this.onScrollKeyDown(currentIndex, -1);\n }\n\n onTagKeyDownArrowRight(currentIndex: number) {\n if (currentIndex === this.value.length - 1) {\n this.focusInput();\n\n return;\n }\n\n this.onScrollKeyDown(currentIndex, 1);\n }\n\n onTagEdited(value: string, editedTag: string) {\n this.focusInput();\n this.updateValue(\n this.value\n .map(tag =>\n tag !== editedTag\n ? tag\n : value\n .split(',')\n .map(tag => tag.trim())\n .filter(Boolean),\n )\n .reduce<string[]>(\n (result, item: string | string[]) => result.concat(item),\n [],\n ),\n );\n }\n\n handleOption(item: string) {\n this.focusInput();\n this.updateSearch('');\n this.updateValue(this.value.concat(item));\n this.open = false;\n this.scrollToEnd$.next();\n }\n\n onInput(value: string) {\n const array = this.allowSpaces\n ? value.split(',')\n : value.split(ALLOWED_SPACE_REGEXP);\n const tags = array\n .map(item => item.trim())\n .filter((item, index, {length}) => item.length > 0 && index !== length - 1);\n const validated = tags.filter(tag => !this.disabledItemHandler(tag));\n\n if (array.length > 1) {\n this.updateSearch(array[array.length - 1].trim());\n this.updateValue([...this.value, ...validated]);\n } else {\n this.updateSearch(value);\n }\n\n this.open = this.hasNativeValue;\n }\n\n onHoveredChange(hovered: boolean) {\n this.updateHovered(hovered);\n }\n\n setDisabledState() {\n super.setDisabledState();\n this.open = false;\n }\n\n private onScrollKeyDown(currentIndex: number, flag: number) {\n const tag = this.tags.find((_item, index) => index === currentIndex + flag);\n\n if (!tag || !this.scrollBar) {\n return;\n }\n\n setNativeFocused(tag.nativeElement);\n\n if (\n flag * this.scrollBar.nativeElement.clientWidth -\n flag * tag.nativeElement.offsetLeft -\n tag.nativeElement.clientWidth <\n 0\n ) {\n this.scrollBar.nativeElement.scrollLeft +=\n flag * tag.nativeElement.clientWidth;\n }\n }\n\n private initScrollerSubscrition(scroller: TuiScrollbarComponent | null) {\n if (!scroller || !scroller.browserScrollRef) {\n return;\n }\n\n const {nativeElement} = scroller.browserScrollRef;\n\n const wheel$ = typedFromEvent(nativeElement, 'wheel', {passive: false}).pipe(\n filter(event => event.deltaX === 0 && this.shouldScroll(nativeElement)),\n preventDefault(),\n map(({deltaY}) =>\n Math.max(nativeElement.scrollLeft + deltaY * EVENT_Y_TO_X_COEFFICENT, 0),\n ),\n );\n const start$ = this.scrollToStart$.pipe(mapTo(0));\n const end$ = this.scrollToEnd$.pipe(map(() => nativeElement.scrollWidth));\n\n merge(wheel$, start$, end$)\n .pipe(\n switchMap(left => this.tuiScrollService.scroll$(nativeElement, 0, left)),\n takeUntil(this.destroy$),\n )\n .subscribe();\n }\n\n protected updateValue(value: Array<string>) {\n const seen = new Set();\n\n super.updateValue(\n value\n .reverse()\n .filter(item => !!item && !seen.has(item) && seen.add(item))\n .reverse(),\n );\n }\n\n private updateSearch(value: string) {\n if (this.focusableElement) {\n this.focusableElement.nativeElement.value = value;\n }\n\n this.search = value;\n this.searchChange.emit(value);\n }\n\n private shouldScroll({scrollWidth, offsetWidth}: HTMLElement): boolean {\n return scrollWidth > offsetWidth;\n }\n\n private addTag() {\n const inputValue = this.search.trim();\n\n if (!inputValue || this.disabledItemHandler(inputValue)) {\n return;\n }\n\n this.updateSearch('');\n this.updateValue(this.value.concat(inputValue));\n }\n\n private deleteLastEnabledItem() {\n for (let index = this.value.length - 1; index >= 0; index--) {\n if (!this.disabledItemHandler(this.value[index])) {\n this.updateValue([\n ...this.value.slice(0, index),\n ...this.value.slice(index + 1, this.value.length),\n ]);\n\n break;\n }\n }\n }\n\n private focusInput(preventScroll: boolean = false) {\n if (this.nativeFocusableElement) {\n setNativeFocused(this.nativeFocusableElement, true, preventScroll);\n }\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {\n TuiActiveZoneModule,\n TuiFocusableModule,\n TuiHoveredModule,\n TuiScrollService,\n} from '@taiga-ui/cdk';\nimport {\n TuiHostedDropdownModule,\n TuiScrollbarModule,\n TuiSvgModule,\n TuiTooltipModule,\n TuiWrapperModule,\n} from '@taiga-ui/core';\nimport {TuiTagModule} from '@taiga-ui/kit/components/tag';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\nimport {TuiInputTagComponent} from './input-tag.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n PolymorpheusModule,\n TuiFocusableModule,\n TuiHoveredModule,\n TuiActiveZoneModule,\n TuiSvgModule,\n TuiScrollbarModule,\n TuiTooltipModule,\n TuiHostedDropdownModule,\n TuiTagModule,\n TuiWrapperModule,\n ],\n providers: [TuiScrollService],\n declarations: [TuiInputTagComponent],\n exports: [TuiInputTagComponent],\n})\nexport class TuiInputTagModule {}\n"]}
1
+ {"version":3,"sources":["../../../node_modules/tslib/tslib.es6.js","ng://@taiga-ui/kit/components/input-tag/input-tag.component.ts","ng://@taiga-ui/kit/components/input-tag/input-tag.module.ts"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__decorate","decorators","target","key","desc","c","arguments","length","r","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","__param","paramIndex","decorator","__read","o","n","m","Symbol","iterator","e","call","ar","next","done","push","value","error","__spread","concat","TuiInputTagComponent","control","changeDetectorRef","tuiScrollService","elementRef","appearance","modeDirective","tagStatus","hintController","controller","_this","_super","this","allowSpaces","icon","iconAlign","search","editable","tagValidator","ALWAYS_TRUE_HANDLER","expandable","inputHidden","disabledItemHandler","ALWAYS_FALSE_HANDLER","searchChange","EventEmitter","open","tags","EMPTY_QUERY","scrollToStart$","Subject","scrollToEnd$","__","constructor","prototype","create","__extends","focused","pseudoFocused","scroller","initScrollerSubscrition","focusableElement","computedDisabled","nativeElement","isNativeFocusedIn","dropdown","size","_a","labelOutside","cleaner","hasValue","disabled","readOnly","hasNativeValue","hasExampleText","computedFocused","exampleText","content","hasCleaner","hasTooltip","iconAlignRight","mode","datalist","getLeftContent","tag","errorIconTemplate","onCleanerClick","updateSearch","clear","focusInput","onActiveZone","active","addTag","updateFocused","onMouseDown","event","actualTarget","getActualTarget","Element","cleanerSvg","contains","tagsContainer","preventDefault","onFieldKeyDownBackspace","onFieldKeyDownArrowLeft","deleteLastEnabledItem","setNativeFocused","last","onFieldKeyDownEnter","onTagKeyDownArrowLeft","currentIndex","onScrollKeyDown","onTagKeyDownArrowRight","onTagEdited","editedTag","updateValue","map","split","trim","filter","Boolean","reduce","result","item","handleOption","onInput","array","ALLOWED_SPACE_REGEXP","validated","index","onHoveredChange","hovered","updateHovered","setDisabledState","flag","find","_item","scrollBar","clientWidth","offsetLeft","scrollLeft","browserScrollRef","wheel$","typedFromEvent","passive","pipe","deltaX","shouldScroll","deltaY","Math","max","start$","mapTo","end$","scrollWidth","merge","switchMap","left","scroll$","takeUntil","destroy$","subscribe","seen","Set","reverse","has","add","emit","offsetWidth","inputValue","slice","preventScroll","nativeFocusableElement","NgControl","type","Optional","Self","Inject","args","ChangeDetectorRef","TuiScrollService","ElementRef","TUI_TEXTFIELD_APPEARANCE","TuiModeDirective","TUI_TAG_STATUS","TuiHintControllerDirective","TUI_HINT_WATCHED_CONTROLLER","TuiTextfieldController","TUI_TEXTFIELD_WATCHED_CONTROLLER","Input","tuiDefaultProp","HostBinding","Output","ViewChild","TuiScrollbarComponent","ContentChild","TuiDataListDirective","read","TemplateRef","TuiHostedDropdownComponent","ViewChildren","TuiInputTagComponent_1","Component","selector","changeDetection","ChangeDetectionStrategy","OnPush","template","providers","provide","TUI_FOCUSABLE_ITEM_ACCESSOR","useExisting","forwardRef","TUI_DATA_LIST_HOST","FIXED_DROPDOWN_CONTROLLER_PROVIDER","TEXTFIELD_CONTROLLER_PROVIDER","HINT_CONTROLLER_PROVIDER","AbstractTuiMultipleControl","TuiInputTagModule","NgModule","imports","CommonModule","FormsModule","PolymorpheusModule","TuiFocusableModule","TuiHoveredModule","TuiActiveZoneModule","TuiSvgModule","TuiScrollbarModule","TuiTooltipModule","TuiHostedDropdownModule","TuiTagModule","TuiWrapperModule","declarations","exports"],"mappings":";;;;;;;;;;;;;;oFAgBA,IAAIA,EAAgB,SAASC,EAAGC,GAI5B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOA,EAAEM,eAAeD,KAAIN,EAAEM,GAAKL,EAAEK,MACpDN,EAAGC,IAgCrB,SAASO,EAAWC,EAAYC,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OAAOI,EAAAA,aACPpL,EAAA,EAAAgL,EAAAA,OAAOK,EAAAA,2BACPrL,EAAA,EAAA8K,EAAAA,YACA9K,EAAA,EAAAgL,EAAAA,OAAOM,EAAAA,mBAEPtL,EAAA,EAAAgL,EAAAA,OAAOO,EAAAA,iBACPvL,EAAA,EAAAgL,EAAAA,OAAOS,EAAAA,8BAEPzL,EAAA,EAAAgL,EAAAA,OAAOW,EAAAA,oCArGHxK,IACDqM,EAAAA,yCC/CZ,SAAAC,KAAgC,OAAnBA,EAAiBvO,EAAA,CAnB7BwO,EAAAA,SAAS,CACNC,QAAS,CACLC,EAAAA,aACAC,EAAAA,YACAC,EAAAA,mBACAC,EAAAA,mBACAC,EAAAA,iBACAC,EAAAA,oBACAC,EAAAA,aACAC,EAAAA,mBACAC,EAAAA,iBACAC,EAAAA,wBACAC,EAAAA,aACAC,EAAAA,kBAEJxB,UAAW,CAAC5B,EAAAA,kBACZqD,aAAc,CAACrN,GACfsN,QAAS,CAACtN,MAEDsM","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n forwardRef,\n HostBinding,\n Inject,\n Input,\n Optional,\n Output,\n QueryList,\n Self,\n TemplateRef,\n ViewChild,\n ViewChildren,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiMultipleControl,\n ALWAYS_FALSE_HANDLER,\n ALWAYS_TRUE_HANDLER,\n EMPTY_QUERY,\n getActualTarget,\n isNativeFocusedIn,\n preventDefault,\n setNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TuiActiveZoneDirective,\n TuiBooleanHandler,\n TuiContextWithImplicit,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiScrollService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {\n HINT_CONTROLLER_PROVIDER,\n TEXTFIELD_CONTROLLER_PROVIDER,\n TUI_DATA_LIST_HOST,\n TUI_HINT_WATCHED_CONTROLLER,\n TUI_TEXTFIELD_APPEARANCE,\n TUI_TEXTFIELD_WATCHED_CONTROLLER,\n TuiDataListDirective,\n TuiDataListHost,\n TuiHintControllerDirective,\n TuiHorizontalDirection,\n TuiHostedDropdownComponent,\n TuiModeDirective,\n TuiScrollbarComponent,\n TuiSizeL,\n TuiSizeS,\n TuiTextfieldController,\n} from '@taiga-ui/core';\nimport {ALLOWED_SPACE_REGEXP} from '@taiga-ui/kit/components/tag';\nimport {FIXED_DROPDOWN_CONTROLLER_PROVIDER} from '@taiga-ui/kit/providers';\nimport {TUI_TAG_STATUS} from '@taiga-ui/kit/tokens';\nimport {TuiStatusT} from '@taiga-ui/kit/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {merge, Subject} from 'rxjs';\nimport {filter, map, mapTo, switchMap, takeUntil} from 'rxjs/operators';\n\nconst EVENT_Y_TO_X_COEFFICENT = 3;\n\n@Component({\n selector: 'tui-input-tag',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './input-tag.template.html',\n styleUrls: ['./input-tag.style.less'],\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiInputTagComponent),\n },\n {\n provide: TUI_DATA_LIST_HOST,\n useExisting: forwardRef(() => TuiInputTagComponent),\n },\n FIXED_DROPDOWN_CONTROLLER_PROVIDER,\n TEXTFIELD_CONTROLLER_PROVIDER,\n HINT_CONTROLLER_PROVIDER,\n ],\n})\nexport class TuiInputTagComponent\n extends AbstractTuiMultipleControl<string>\n implements TuiFocusableElementAccessor, TuiDataListHost<string> {\n @Input()\n @tuiDefaultProp()\n allowSpaces = true;\n\n @Input()\n @tuiDefaultProp()\n icon = '';\n\n @Input()\n @tuiDefaultProp()\n iconAlign: TuiHorizontalDirection = 'right';\n\n @Input()\n @tuiDefaultProp()\n search = '';\n\n @Input()\n @tuiDefaultProp()\n editable = true;\n\n @Input()\n @tuiDefaultProp()\n tagValidator: TuiBooleanHandler<string> = ALWAYS_TRUE_HANDLER;\n\n @Input()\n @HostBinding('class._expandable')\n @tuiDefaultProp()\n expandable = true;\n\n @Input()\n @tuiDefaultProp()\n inputHidden = false;\n\n @Input()\n @tuiDefaultProp()\n disabledItemHandler: TuiBooleanHandler<string> = ALWAYS_FALSE_HANDLER;\n\n @Input('pseudoFocused')\n set pseudoFocusedSetter(value: boolean | null) {\n if (!value && !this.focused) {\n this.scrollToStart$.next();\n }\n\n this.pseudoFocused = value;\n }\n\n @Output()\n readonly searchChange = new EventEmitter<string>();\n\n open = false;\n\n @ViewChild(TuiScrollbarComponent)\n set scrollerSetter(scroller: TuiScrollbarComponent | null) {\n this.initScrollerSubscrition(scroller);\n }\n\n @ContentChild(TuiDataListDirective, {read: TemplateRef})\n readonly datalist?: TemplateRef<TuiContextWithImplicit<TuiActiveZoneDirective>>;\n\n @ViewChild('errorIcon')\n readonly errorIconTemplate?: TemplateRef<{}>;\n\n @ViewChild(TuiHostedDropdownComponent)\n private readonly dropdown?: TuiHostedDropdownComponent;\n\n @ViewChild('focusableElement')\n private readonly focusableElement?: ElementRef<HTMLInputElement>;\n\n @ViewChild('tagsContainer')\n private readonly tagsContainer?: ElementRef<HTMLElement>;\n\n @ViewChildren('tag', {read: ElementRef})\n private readonly tags: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n private readonly scrollToStart$ = new Subject<void>();\n private readonly scrollToEnd$ = new Subject<void>();\n\n @ViewChild('cleaner', {read: ElementRef})\n private readonly cleanerSvg?: ElementRef<HTMLElement>;\n\n @ViewChild(TuiScrollbarComponent, {read: ElementRef})\n private readonly scrollBar?: ElementRef<HTMLElement>;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TuiScrollService) private tuiScrollService: TuiScrollService,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TUI_TEXTFIELD_APPEARANCE) readonly appearance: string,\n @Optional()\n @Inject(TuiModeDirective)\n private readonly modeDirective: TuiModeDirective | null,\n @Inject(TUI_TAG_STATUS) private readonly tagStatus: TuiStatusT,\n @Inject(TUI_HINT_WATCHED_CONTROLLER)\n readonly hintController: TuiHintControllerDirective,\n @Inject(TUI_TEXTFIELD_WATCHED_CONTROLLER)\n readonly controller: TuiTextfieldController,\n ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): HTMLInputElement | null {\n return !this.focusableElement || this.computedDisabled\n ? null\n : this.focusableElement.nativeElement;\n }\n\n get focused(): boolean {\n return (\n isNativeFocusedIn(this.elementRef.nativeElement) ||\n (!!this.dropdown && this.dropdown.focused)\n );\n }\n\n @HostBinding('attr.data-tui-host-size')\n get size(): TuiSizeL | TuiSizeS {\n return this.controller.size;\n }\n\n @HostBinding('class._label-outside')\n get labelOutside(): boolean {\n const {size, labelOutside} = this.controller;\n\n return size === 's' || labelOutside;\n }\n\n get hasCleaner(): boolean {\n return (\n this.controller.cleaner && this.hasValue && !this.disabled && !this.readOnly\n );\n }\n\n get hasNativeValue(): boolean {\n return !!this.search;\n }\n\n get hasValue(): boolean {\n return !!this.value.length || this.hasNativeValue;\n }\n\n get hasPlaceholder(): boolean {\n return !this.labelOutside || (!this.hasValue && !this.hasExampleText);\n }\n\n get placeholderRaised(): boolean {\n return (\n !this.labelOutside &&\n ((this.computedFocused && !this.readOnly) || this.hasValue)\n );\n }\n\n get hasExampleText(): boolean {\n return (\n !!this.controller.exampleText &&\n this.computedFocused &&\n !this.hasValue &&\n !this.readOnly\n );\n }\n\n get hasTooltip(): boolean {\n return !!this.hintController.content && !this.disabled;\n }\n\n get iconAlignLeft(): boolean {\n return !!this.icon && this.iconAlign === 'left';\n }\n\n get iconAlignRight(): boolean {\n return !!this.icon && this.iconAlign === 'right';\n }\n\n get hasRightIcons(): boolean {\n return this.hasCleaner || this.hasTooltip || this.iconAlignRight;\n }\n\n get status(): TuiStatusT {\n return this.modeDirective && this.modeDirective.mode ? 'default' : this.tagStatus;\n }\n\n get canOpen(): boolean {\n return !this.computedDisabled && !this.readOnly && !!this.datalist;\n }\n\n getLeftContent(tag: string): PolymorpheusContent {\n return !this.tagValidator(tag) && this.errorIconTemplate\n ? this.errorIconTemplate\n : '';\n }\n\n onCleanerClick() {\n this.updateSearch('');\n this.clear();\n this.focusInput();\n }\n\n onActiveZone(active: boolean) {\n this.open = false;\n this.addTag();\n this.updateFocused(active);\n\n if (!this.computedFocused) {\n this.scrollToStart$.next();\n }\n }\n\n onMouseDown(event: MouseEvent) {\n const actualTarget = getActualTarget(event);\n\n if (\n !this.focusableElement ||\n actualTarget === this.focusableElement.nativeElement ||\n // TODO: iframe warning\n !(event.target instanceof Element) ||\n (this.cleanerSvg && this.cleanerSvg.nativeElement.contains(event.target)) ||\n (this.tagsContainer &&\n actualTarget !== this.tagsContainer.nativeElement &&\n this.tagsContainer.nativeElement.contains(actualTarget))\n ) {\n return;\n }\n\n event.preventDefault();\n this.focusInput();\n }\n\n onFieldKeyDownBackspace(event: KeyboardEvent) {\n if (!this.labelOutside && !this.hasNativeValue && this.value.length) {\n this.deleteLastEnabledItem();\n } else {\n this.onFieldKeyDownArrowLeft(event);\n }\n }\n\n onFieldKeyDownArrowLeft(event: KeyboardEvent) {\n if (!this.labelOutside || this.hasNativeValue || !this.value.length) {\n return;\n }\n\n event.preventDefault();\n setNativeFocused(this.tags.last.nativeElement);\n }\n\n onFieldKeyDownEnter() {\n this.addTag();\n this.scrollToEnd$.next();\n }\n\n onTagKeyDownArrowLeft(currentIndex: number) {\n if (currentIndex <= 0) {\n return;\n }\n\n this.onScrollKeyDown(currentIndex, -1);\n }\n\n onTagKeyDownArrowRight(currentIndex: number) {\n if (currentIndex === this.value.length - 1) {\n this.focusInput();\n\n return;\n }\n\n this.onScrollKeyDown(currentIndex, 1);\n }\n\n onTagEdited(value: string, editedTag: string) {\n this.focusInput();\n this.updateValue(\n this.value\n .map(tag =>\n tag !== editedTag\n ? tag\n : value\n .split(',')\n .map(tag => tag.trim())\n .filter(Boolean),\n )\n .reduce<string[]>(\n (result, item: string | string[]) => result.concat(item),\n [],\n ),\n );\n }\n\n handleOption(item: string) {\n this.focusInput();\n this.updateSearch('');\n this.updateValue(this.value.concat(item));\n this.open = false;\n this.scrollToEnd$.next();\n }\n\n onInput(value: string) {\n const array = this.allowSpaces\n ? value.split(',')\n : value.split(ALLOWED_SPACE_REGEXP);\n const tags = array\n .map(item => item.trim())\n .filter((item, index, {length}) => item.length > 0 && index !== length - 1);\n const validated = tags.filter(tag => !this.disabledItemHandler(tag));\n\n if (array.length > 1) {\n this.updateSearch(array[array.length - 1].trim());\n this.updateValue([...this.value, ...validated]);\n } else {\n this.updateSearch(value);\n }\n\n this.open = this.hasNativeValue;\n }\n\n onHoveredChange(hovered: boolean) {\n this.updateHovered(hovered);\n }\n\n setDisabledState() {\n super.setDisabledState();\n this.open = false;\n }\n\n private onScrollKeyDown(currentIndex: number, flag: number) {\n const tag = this.tags.find((_item, index) => index === currentIndex + flag);\n\n if (!tag || !this.scrollBar) {\n return;\n }\n\n setNativeFocused(tag.nativeElement);\n\n if (\n flag * this.scrollBar.nativeElement.clientWidth -\n flag * tag.nativeElement.offsetLeft -\n tag.nativeElement.clientWidth <\n 0\n ) {\n this.scrollBar.nativeElement.scrollLeft +=\n flag * tag.nativeElement.clientWidth;\n }\n }\n\n private initScrollerSubscrition(scroller: TuiScrollbarComponent | null) {\n if (!scroller || !scroller.browserScrollRef) {\n return;\n }\n\n const {nativeElement} = scroller.browserScrollRef;\n\n const wheel$ = typedFromEvent(nativeElement, 'wheel', {passive: false}).pipe(\n filter(event => event.deltaX === 0 && this.shouldScroll(nativeElement)),\n preventDefault(),\n map(({deltaY}) =>\n Math.max(nativeElement.scrollLeft + deltaY * EVENT_Y_TO_X_COEFFICENT, 0),\n ),\n );\n const start$ = this.scrollToStart$.pipe(mapTo(0));\n const end$ = this.scrollToEnd$.pipe(map(() => nativeElement.scrollWidth));\n\n merge(wheel$, start$, end$)\n .pipe(\n switchMap(left => this.tuiScrollService.scroll$(nativeElement, 0, left)),\n takeUntil(this.destroy$),\n )\n .subscribe();\n }\n\n protected updateValue(value: Array<string>) {\n const seen = new Set();\n\n super.updateValue(\n value\n .reverse()\n .filter(item => !!item && !seen.has(item) && seen.add(item))\n .reverse(),\n );\n }\n\n private updateSearch(value: string) {\n if (this.focusableElement) {\n this.focusableElement.nativeElement.value = value;\n }\n\n this.search = value;\n this.searchChange.emit(value);\n }\n\n private shouldScroll({scrollWidth, offsetWidth}: HTMLElement): boolean {\n return scrollWidth > offsetWidth;\n }\n\n private addTag() {\n const inputValue = this.search.trim();\n\n if (!inputValue || this.disabledItemHandler(inputValue)) {\n return;\n }\n\n this.updateSearch('');\n this.updateValue(this.value.concat(inputValue));\n }\n\n private deleteLastEnabledItem() {\n for (let index = this.value.length - 1; index >= 0; index--) {\n if (!this.disabledItemHandler(this.value[index])) {\n this.updateValue([\n ...this.value.slice(0, index),\n ...this.value.slice(index + 1, this.value.length),\n ]);\n\n break;\n }\n }\n }\n\n private focusInput(preventScroll: boolean = false) {\n if (this.nativeFocusableElement) {\n setNativeFocused(this.nativeFocusableElement, true, preventScroll);\n }\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {\n TuiActiveZoneModule,\n TuiFocusableModule,\n TuiHoveredModule,\n TuiScrollService,\n} from '@taiga-ui/cdk';\nimport {\n TuiHostedDropdownModule,\n TuiScrollbarModule,\n TuiSvgModule,\n TuiTooltipModule,\n TuiWrapperModule,\n} from '@taiga-ui/core';\nimport {TuiTagModule} from '@taiga-ui/kit/components/tag';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\nimport {TuiInputTagComponent} from './input-tag.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n PolymorpheusModule,\n TuiFocusableModule,\n TuiHoveredModule,\n TuiActiveZoneModule,\n TuiSvgModule,\n TuiScrollbarModule,\n TuiTooltipModule,\n TuiHostedDropdownModule,\n TuiTagModule,\n TuiWrapperModule,\n ],\n providers: [TuiScrollService],\n declarations: [TuiInputTagComponent],\n exports: [TuiInputTagComponent],\n})\nexport class TuiInputTagModule {}\n"]}
@@ -417,6 +417,7 @@
417
417
  };
418
418
  TuiInputTimeComponent.prototype.processArrow = function (event, shift) {
419
419
  var target = event.target;
420
+ // TODO: iframe warning
420
421
  if (this.readOnly || !(target instanceof HTMLInputElement)) {
421
422
  return;
422
423
  }