@taiga-ui/kit 3.0.0-rc.0 → 3.0.0-rc.1

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 (585) hide show
  1. package/bundles/taiga-ui-kit-components-accordion.umd.js +5 -17
  2. package/bundles/taiga-ui-kit-components-accordion.umd.js.map +1 -1
  3. package/bundles/taiga-ui-kit-components-action.umd.js +3 -9
  4. package/bundles/taiga-ui-kit-components-action.umd.js.map +1 -1
  5. package/bundles/taiga-ui-kit-components-arrow.umd.js +1 -1
  6. package/bundles/taiga-ui-kit-components-arrow.umd.js.map +1 -1
  7. package/bundles/taiga-ui-kit-components-avatar.umd.js +3 -3
  8. package/bundles/taiga-ui-kit-components-avatar.umd.js.map +1 -1
  9. package/bundles/taiga-ui-kit-components-badge.umd.js +3 -3
  10. package/bundles/taiga-ui-kit-components-badge.umd.js.map +1 -1
  11. package/bundles/taiga-ui-kit-components-badged-content.umd.js +3 -6
  12. package/bundles/taiga-ui-kit-components-badged-content.umd.js.map +1 -1
  13. package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js +1 -1
  14. package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js.map +1 -1
  15. package/bundles/taiga-ui-kit-components-calendar-month.umd.js +0 -1
  16. package/bundles/taiga-ui-kit-components-calendar-month.umd.js.map +1 -1
  17. package/bundles/taiga-ui-kit-components-calendar-range.umd.js +12 -8
  18. package/bundles/taiga-ui-kit-components-calendar-range.umd.js.map +1 -1
  19. package/bundles/taiga-ui-kit-components-carousel.umd.js +4 -5
  20. package/bundles/taiga-ui-kit-components-carousel.umd.js.map +1 -1
  21. package/bundles/taiga-ui-kit-components-checkbox-block.umd.js +7 -10
  22. package/bundles/taiga-ui-kit-components-checkbox-block.umd.js.map +1 -1
  23. package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js +5 -9
  24. package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js.map +1 -1
  25. package/bundles/taiga-ui-kit-components-checkbox.umd.js +5 -9
  26. package/bundles/taiga-ui-kit-components-checkbox.umd.js.map +1 -1
  27. package/bundles/taiga-ui-kit-components-combo-box.umd.js +21 -41
  28. package/bundles/taiga-ui-kit-components-combo-box.umd.js.map +1 -1
  29. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js +5 -26
  30. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js.map +1 -1
  31. package/bundles/taiga-ui-kit-components-files.umd.js +1 -2
  32. package/bundles/taiga-ui-kit-components-files.umd.js.map +1 -1
  33. package/bundles/taiga-ui-kit-components-filter.umd.js +1 -1
  34. package/bundles/taiga-ui-kit-components-filter.umd.js.map +1 -1
  35. package/bundles/taiga-ui-kit-components-input-copy.umd.js +21 -36
  36. package/bundles/taiga-ui-kit-components-input-copy.umd.js.map +1 -1
  37. package/bundles/taiga-ui-kit-components-input-count.umd.js +12 -35
  38. package/bundles/taiga-ui-kit-components-input-count.umd.js.map +1 -1
  39. package/bundles/taiga-ui-kit-components-input-date-range.umd.js +19 -42
  40. package/bundles/taiga-ui-kit-components-input-date-range.umd.js.map +1 -1
  41. package/bundles/taiga-ui-kit-components-input-date-time.umd.js +18 -42
  42. package/bundles/taiga-ui-kit-components-input-date-time.umd.js.map +1 -1
  43. package/bundles/taiga-ui-kit-components-input-date.umd.js +17 -41
  44. package/bundles/taiga-ui-kit-components-input-date.umd.js.map +1 -1
  45. package/bundles/taiga-ui-kit-components-input-files.umd.js +4 -17
  46. package/bundles/taiga-ui-kit-components-input-files.umd.js.map +1 -1
  47. package/bundles/taiga-ui-kit-components-input-inline.umd.js +2 -8
  48. package/bundles/taiga-ui-kit-components-input-inline.umd.js.map +1 -1
  49. package/bundles/taiga-ui-kit-components-input-month-range.umd.js +19 -37
  50. package/bundles/taiga-ui-kit-components-input-month-range.umd.js.map +1 -1
  51. package/bundles/taiga-ui-kit-components-input-month.umd.js +19 -37
  52. package/bundles/taiga-ui-kit-components-input-month.umd.js.map +1 -1
  53. package/bundles/taiga-ui-kit-components-input-number.umd.js +14 -37
  54. package/bundles/taiga-ui-kit-components-input-number.umd.js.map +1 -1
  55. package/bundles/taiga-ui-kit-components-input-password.umd.js +29 -56
  56. package/bundles/taiga-ui-kit-components-input-password.umd.js.map +1 -1
  57. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js +38 -51
  58. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js.map +1 -1
  59. package/bundles/taiga-ui-kit-components-input-phone.umd.js +30 -57
  60. package/bundles/taiga-ui-kit-components-input-phone.umd.js.map +1 -1
  61. package/bundles/taiga-ui-kit-components-input-range.umd.js +17 -13
  62. package/bundles/taiga-ui-kit-components-input-range.umd.js.map +1 -1
  63. package/bundles/taiga-ui-kit-components-input-slider.umd.js +14 -12
  64. package/bundles/taiga-ui-kit-components-input-slider.umd.js.map +1 -1
  65. package/bundles/taiga-ui-kit-components-input-tag.umd.js +33 -50
  66. package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
  67. package/bundles/taiga-ui-kit-components-input-time.umd.js +8 -15
  68. package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
  69. package/bundles/taiga-ui-kit-components-input.umd.js +16 -33
  70. package/bundles/taiga-ui-kit-components-input.umd.js.map +1 -1
  71. package/bundles/taiga-ui-kit-components-line-clamp.umd.js +108 -18
  72. package/bundles/taiga-ui-kit-components-line-clamp.umd.js.map +1 -1
  73. package/bundles/taiga-ui-kit-components-marker-icon.umd.js +1 -1
  74. package/bundles/taiga-ui-kit-components-marker-icon.umd.js.map +1 -1
  75. package/bundles/taiga-ui-kit-components-multi-select-option.umd.js +3 -3
  76. package/bundles/taiga-ui-kit-components-multi-select-option.umd.js.map +1 -1
  77. package/bundles/taiga-ui-kit-components-multi-select.umd.js +34 -69
  78. package/bundles/taiga-ui-kit-components-multi-select.umd.js.map +1 -1
  79. package/bundles/taiga-ui-kit-components-pagination.umd.js +10 -23
  80. package/bundles/taiga-ui-kit-components-pagination.umd.js.map +1 -1
  81. package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js +2 -15
  82. package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js.map +1 -1
  83. package/bundles/taiga-ui-kit-components-progress.umd.js +5 -15
  84. package/bundles/taiga-ui-kit-components-progress.umd.js.map +1 -1
  85. package/bundles/taiga-ui-kit-components-radio-block.umd.js +7 -10
  86. package/bundles/taiga-ui-kit-components-radio-block.umd.js.map +1 -1
  87. package/bundles/taiga-ui-kit-components-radio-labeled.umd.js +5 -9
  88. package/bundles/taiga-ui-kit-components-radio-labeled.umd.js.map +1 -1
  89. package/bundles/taiga-ui-kit-components-radio-list.umd.js +5 -9
  90. package/bundles/taiga-ui-kit-components-radio-list.umd.js.map +1 -1
  91. package/bundles/taiga-ui-kit-components-radio.umd.js +5 -10
  92. package/bundles/taiga-ui-kit-components-radio.umd.js.map +1 -1
  93. package/bundles/taiga-ui-kit-components-range.umd.js +40 -86
  94. package/bundles/taiga-ui-kit-components-range.umd.js.map +1 -1
  95. package/bundles/taiga-ui-kit-components-rating.umd.js +4 -8
  96. package/bundles/taiga-ui-kit-components-rating.umd.js.map +1 -1
  97. package/bundles/taiga-ui-kit-components-select-option.umd.js +5 -5
  98. package/bundles/taiga-ui-kit-components-select-option.umd.js.map +1 -1
  99. package/bundles/taiga-ui-kit-components-select.umd.js +20 -40
  100. package/bundles/taiga-ui-kit-components-select.umd.js.map +1 -1
  101. package/bundles/taiga-ui-kit-components-slider.umd.js +40 -38
  102. package/bundles/taiga-ui-kit-components-slider.umd.js.map +1 -1
  103. package/bundles/taiga-ui-kit-components-stepper.umd.js +9 -7
  104. package/bundles/taiga-ui-kit-components-stepper.umd.js.map +1 -1
  105. package/bundles/taiga-ui-kit-components-tabs.umd.js +40 -40
  106. package/bundles/taiga-ui-kit-components-tabs.umd.js.map +1 -1
  107. package/bundles/taiga-ui-kit-components-tag.umd.js +6 -17
  108. package/bundles/taiga-ui-kit-components-tag.umd.js.map +1 -1
  109. package/bundles/taiga-ui-kit-components-text-area.umd.js +18 -31
  110. package/bundles/taiga-ui-kit-components-text-area.umd.js.map +1 -1
  111. package/bundles/taiga-ui-kit-components-toggle.umd.js +5 -9
  112. package/bundles/taiga-ui-kit-components-toggle.umd.js.map +1 -1
  113. package/bundles/taiga-ui-kit-components-tree.umd.js +2 -8
  114. package/bundles/taiga-ui-kit-components-tree.umd.js.map +1 -1
  115. package/bundles/taiga-ui-kit-constants.umd.js +334 -3
  116. package/bundles/taiga-ui-kit-constants.umd.js.map +1 -1
  117. package/bundles/{taiga-ui-kit-directives-dropdown-context.umd.js → taiga-ui-kit-directives-data-list-dropdown-manager.umd.js} +117 -141
  118. package/bundles/taiga-ui-kit-directives-data-list-dropdown-manager.umd.js.map +1 -0
  119. package/bundles/taiga-ui-kit-directives-highlight.umd.js +0 -1
  120. package/bundles/taiga-ui-kit-directives-highlight.umd.js.map +1 -1
  121. package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js +2 -2
  122. package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js.map +1 -1
  123. package/bundles/taiga-ui-kit-directives-present.umd.js +2 -2
  124. package/bundles/taiga-ui-kit-directives-present.umd.js.map +1 -1
  125. package/bundles/taiga-ui-kit-directives-project-class.umd.js +0 -3
  126. package/bundles/taiga-ui-kit-directives-project-class.umd.js.map +1 -1
  127. package/bundles/taiga-ui-kit-directives.umd.js +6 -18
  128. package/bundles/taiga-ui-kit-directives.umd.js.map +1 -1
  129. package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js +4 -4
  130. package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js.map +1 -1
  131. package/bundles/taiga-ui-kit-pipes-field-error.umd.js +0 -2
  132. package/bundles/taiga-ui-kit-pipes-field-error.umd.js.map +1 -1
  133. package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.js +3 -3
  134. package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.js.map +1 -1
  135. package/bundles/taiga-ui-kit-providers.umd.js +11 -42
  136. package/bundles/taiga-ui-kit-providers.umd.js.map +1 -1
  137. package/bundles/taiga-ui-kit-tokens.umd.js +17 -12
  138. package/bundles/taiga-ui-kit-tokens.umd.js.map +1 -1
  139. package/bundles/taiga-ui-kit-utils-files.umd.js +3 -15
  140. package/bundles/taiga-ui-kit-utils-files.umd.js.map +1 -1
  141. package/bundles/taiga-ui-kit-utils-format.umd.js +1 -5
  142. package/bundles/taiga-ui-kit-utils-format.umd.js.map +1 -1
  143. package/bundles/taiga-ui-kit-utils-mask.umd.js +3 -9
  144. package/bundles/taiga-ui-kit-utils-mask.umd.js.map +1 -1
  145. package/bundles/taiga-ui-kit-utils-math.umd.js +1 -1
  146. package/bundles/taiga-ui-kit-utils-math.umd.js.map +1 -1
  147. package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js +1 -5
  148. package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js.map +1 -1
  149. package/bundles/taiga-ui-kit-utils.umd.js +4 -10
  150. package/bundles/taiga-ui-kit-utils.umd.js.map +1 -1
  151. package/components/badge/badge.component.d.ts +2 -2
  152. package/components/badged-content/badged-content.component.d.ts +2 -2
  153. package/components/combo-box/index.d.ts +0 -1
  154. package/components/filter/filter.component.d.ts +1 -1
  155. package/components/input/index.d.ts +0 -1
  156. package/components/input-copy/index.d.ts +0 -1
  157. package/components/input-copy/input-copy.component.d.ts +4 -4
  158. package/components/input-date/index.d.ts +0 -1
  159. package/components/input-date-range/index.d.ts +0 -1
  160. package/components/input-date-time/index.d.ts +0 -1
  161. package/components/input-month/index.d.ts +0 -1
  162. package/components/input-month-range/index.d.ts +0 -1
  163. package/components/input-password/input-password.component.d.ts +2 -2
  164. package/components/input-password/input-password.module.d.ts +2 -3
  165. package/components/input-phone/index.d.ts +0 -1
  166. package/components/input-phone/input-phone.component.d.ts +2 -2
  167. package/components/input-phone-international/utils/extract-value-from-event.d.ts +1 -5
  168. package/components/input-range/input-range.component.d.ts +1 -0
  169. package/components/input-slider/input-slider.component.d.ts +1 -0
  170. package/components/input-tag/input-tag-options.d.ts +4 -1
  171. package/components/input-tag/input-tag.component.d.ts +3 -5
  172. package/components/line-clamp/index.d.ts +1 -0
  173. package/components/line-clamp/line-clamp-box.component.d.ts +7 -0
  174. package/components/line-clamp/line-clamp-position.directive.d.ts +9 -0
  175. package/components/line-clamp/line-clamp.module.d.ts +7 -5
  176. package/components/multi-select/multi-select-group/multi-select-group.directive.d.ts +0 -3
  177. package/components/pagination/pagination.component.d.ts +0 -1
  178. package/components/progress/progress-segmented/progress-segmented.component.d.ts +0 -2
  179. package/components/range/range.component.d.ts +7 -23
  180. package/components/select/index.d.ts +0 -1
  181. package/components/slider/helpers/slider-key-steps.directive.d.ts +1 -3
  182. package/components/slider/slider.component.d.ts +5 -3
  183. package/components/stepper/step/step.component.d.ts +2 -2
  184. package/components/tabs/tab/tab.providers.d.ts +1 -4
  185. package/components/tabs/tabs-with-more/tabs-with-more.component.d.ts +2 -1
  186. package/components/tabs/tabs-with-more/tabs-with-more.providers.d.ts +3 -4
  187. package/components/tag/tag.component.d.ts +1 -3
  188. package/components/text-area/index.d.ts +0 -1
  189. package/components/tree/components/tree-item/tree-item.providers.d.ts +0 -1
  190. package/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.d.ts +15 -0
  191. package/directives/data-list-dropdown-manager/data-list-dropdown-manager.module.d.ts +7 -0
  192. package/directives/data-list-dropdown-manager/index.d.ts +2 -0
  193. package/directives/data-list-dropdown-manager/package.json +10 -0
  194. package/directives/data-list-dropdown-manager/taiga-ui-kit-directives-data-list-dropdown-manager.d.ts +5 -0
  195. package/directives/index.d.ts +1 -3
  196. package/esm2015/components/accordion/accordion-item/accordion-item.component.js +5 -17
  197. package/esm2015/components/accordion/accordion.component.js +5 -5
  198. package/esm2015/components/action/action.component.js +6 -12
  199. package/esm2015/components/arrow/arrow.component.js +3 -3
  200. package/esm2015/components/avatar/avatar.component.js +6 -6
  201. package/esm2015/components/badge/badge.component.js +6 -6
  202. package/esm2015/components/badged-content/badged-content.component.js +4 -7
  203. package/esm2015/components/breadcrumbs/breadcrumbs.component.js +2 -2
  204. package/esm2015/components/calendar-month/calendar-month.component.js +1 -2
  205. package/esm2015/components/calendar-range/calendar-range.component.js +12 -11
  206. package/esm2015/components/carousel/carousel-scroll.directive.js +3 -3
  207. package/esm2015/components/carousel/carousel.component.js +4 -5
  208. package/esm2015/components/carousel/carousel.directive.js +3 -3
  209. package/esm2015/components/checkbox/checkbox.component.js +8 -12
  210. package/esm2015/components/checkbox-block/checkbox-block.component.js +10 -13
  211. package/esm2015/components/checkbox-labeled/checkbox-labeled.component.js +8 -12
  212. package/esm2015/components/combo-box/combo-box.component.js +20 -8
  213. package/esm2015/components/combo-box/combo-box.directive.js +5 -15
  214. package/esm2015/components/combo-box/index.js +1 -2
  215. package/esm2015/components/data-list-wrapper/data-list-group-wrapper.component.js +5 -15
  216. package/esm2015/components/data-list-wrapper/data-list-wrapper.component.js +5 -15
  217. package/esm2015/components/data-list-wrapper/data-list-wrapper.js +3 -4
  218. package/esm2015/components/files/file/file.component.js +3 -4
  219. package/esm2015/components/filter/filter.component.js +2 -2
  220. package/esm2015/components/input/index.js +1 -2
  221. package/esm2015/components/input/input.component.js +18 -7
  222. package/esm2015/components/input/input.directive.js +5 -15
  223. package/esm2015/components/input-copy/index.js +1 -2
  224. package/esm2015/components/input-copy/input-copy.component.js +18 -10
  225. package/esm2015/components/input-copy/input-copy.directive.js +5 -15
  226. package/esm2015/components/input-count/input-count.component.js +14 -27
  227. package/esm2015/components/input-count/input-count.directive.js +5 -15
  228. package/esm2015/components/input-date/index.js +1 -2
  229. package/esm2015/components/input-date/input-date.component.js +15 -9
  230. package/esm2015/components/input-date/input-date.directive.js +5 -15
  231. package/esm2015/components/input-date-range/index.js +1 -2
  232. package/esm2015/components/input-date-range/input-date-range.component.js +18 -11
  233. package/esm2015/components/input-date-range/input-date-range.directive.js +5 -15
  234. package/esm2015/components/input-date-time/index.js +1 -2
  235. package/esm2015/components/input-date-time/input-date-time.component.js +16 -10
  236. package/esm2015/components/input-date-time/input-date-time.directive.js +5 -15
  237. package/esm2015/components/input-files/input-files.component.js +8 -21
  238. package/esm2015/components/input-inline/input-inline.component.js +5 -11
  239. package/esm2015/components/input-month/index.js +1 -2
  240. package/esm2015/components/input-month/input-month.component.js +17 -8
  241. package/esm2015/components/input-month/input-month.directive.js +5 -17
  242. package/esm2015/components/input-month-range/index.js +1 -2
  243. package/esm2015/components/input-month-range/input-month-range.component.js +17 -8
  244. package/esm2015/components/input-month-range/input-month-range.directive.js +5 -17
  245. package/esm2015/components/input-number/input-number.component.js +16 -29
  246. package/esm2015/components/input-number/input-number.directive.js +5 -15
  247. package/esm2015/components/input-password/input-password.component.js +18 -32
  248. package/esm2015/components/input-password/input-password.directive.js +5 -15
  249. package/esm2015/components/input-password/input-password.module.js +1 -5
  250. package/esm2015/components/input-phone/index.js +1 -2
  251. package/esm2015/components/input-phone/input-phone.component.js +28 -14
  252. package/esm2015/components/input-phone/input-phone.directive.js +5 -15
  253. package/esm2015/components/input-phone-international/input-phone-international.component.js +16 -22
  254. package/esm2015/components/input-phone-international/utils/extract-value-from-event.js +5 -11
  255. package/esm2015/components/input-range/input-range.component.js +20 -16
  256. package/esm2015/components/input-slider/input-slider.component.js +13 -15
  257. package/esm2015/components/input-tag/input-tag-options.js +8 -1
  258. package/esm2015/components/input-tag/input-tag.component.js +24 -54
  259. package/esm2015/components/input-time/input-time.component.js +11 -18
  260. package/esm2015/components/line-clamp/index.js +2 -1
  261. package/esm2015/components/line-clamp/line-clamp-box.component.js +32 -0
  262. package/esm2015/components/line-clamp/line-clamp-position.directive.js +26 -0
  263. package/esm2015/components/line-clamp/line-clamp.component.js +22 -9
  264. package/esm2015/components/line-clamp/line-clamp.module.js +30 -6
  265. package/esm2015/components/marker-icon/marker-icon.component.js +2 -2
  266. package/esm2015/components/multi-select/multi-select-group/multi-select-group.component.js +11 -21
  267. package/esm2015/components/multi-select/multi-select-group/multi-select-group.directive.js +17 -28
  268. package/esm2015/components/multi-select/multi-select.component.js +15 -30
  269. package/esm2015/components/multi-select-option/multi-select-option.component.js +6 -6
  270. package/esm2015/components/pagination/pagination.component.js +13 -25
  271. package/esm2015/components/pdf-viewer/pdf-viewer.module.js +4 -17
  272. package/esm2015/components/progress/progress-bar/progress-color-segments.directive.js +4 -4
  273. package/esm2015/components/progress/progress-circle/progress-circle.component.js +2 -2
  274. package/esm2015/components/progress/progress-segmented/progress-segmented.component.js +3 -11
  275. package/esm2015/components/radio/radio.component.js +8 -13
  276. package/esm2015/components/radio-block/radio-block.component.js +10 -13
  277. package/esm2015/components/radio-labeled/radio-labeled.component.js +8 -12
  278. package/esm2015/components/radio-list/radio-list.component.js +8 -12
  279. package/esm2015/components/range/range-change.directive.js +10 -9
  280. package/esm2015/components/range/range.component.js +27 -79
  281. package/esm2015/components/rating/rating.component.js +7 -11
  282. package/esm2015/components/select/index.js +1 -2
  283. package/esm2015/components/select/select.component.js +19 -7
  284. package/esm2015/components/select/select.directive.js +5 -15
  285. package/esm2015/components/select-option/select-option.component.js +7 -7
  286. package/esm2015/components/slider/helpers/slider-key-steps.directive.js +14 -22
  287. package/esm2015/components/slider/helpers/slider-readonly.directive.js +5 -6
  288. package/esm2015/components/slider/slider.component.js +21 -10
  289. package/esm2015/components/stepper/step/step.component.js +5 -5
  290. package/esm2015/components/stepper/stepper.component.js +7 -5
  291. package/esm2015/components/tabs/tab/tab.providers.js +10 -10
  292. package/esm2015/components/tabs/tabs/tabs.component.js +1 -2
  293. package/esm2015/components/tabs/tabs-with-more/tabs-with-more.component.js +18 -17
  294. package/esm2015/components/tabs/tabs-with-more/tabs-with-more.providers.js +9 -11
  295. package/esm2015/components/tag/tag.component.js +10 -20
  296. package/esm2015/components/text-area/index.js +1 -2
  297. package/esm2015/components/text-area/text-area.component.js +19 -8
  298. package/esm2015/components/text-area/text-area.directive.js +5 -15
  299. package/esm2015/components/toggle/toggle.component.js +8 -12
  300. package/esm2015/components/tree/components/tree-item/tree-item.providers.js +2 -6
  301. package/esm2015/components/tree/directives/tree-controller.directive.js +3 -3
  302. package/esm2015/components/tree/misc/tree.service.js +1 -2
  303. package/esm2015/constants/max-day-range-length-mapper.js +5 -4
  304. package/esm2015/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.js +100 -0
  305. package/esm2015/directives/data-list-dropdown-manager/data-list-dropdown-manager.module.js +16 -0
  306. package/esm2015/directives/data-list-dropdown-manager/index.js +3 -0
  307. package/esm2015/directives/data-list-dropdown-manager/taiga-ui-kit-directives-data-list-dropdown-manager.js +5 -0
  308. package/esm2015/directives/highlight/highlight.directive.js +1 -2
  309. package/esm2015/directives/index.js +2 -4
  310. package/esm2015/directives/lazy-loading/lazy-loading.directive.js +2 -2
  311. package/esm2015/directives/lazy-loading/lazy-loading.service.js +3 -3
  312. package/esm2015/directives/present/present.directive.js +4 -4
  313. package/esm2015/directives/project-class/project-class.directive.js +1 -4
  314. package/esm2015/interfaces/index.js +1 -2
  315. package/esm2015/internal/primitive-calendar-range/primitive-calendar-range.component.js +7 -7
  316. package/esm2015/pipes/field-error/field-error-content-pipe.js +1 -2
  317. package/esm2015/pipes/field-error/field-error-pipe.js +1 -2
  318. package/esm2015/pipes/filter-by-input/filter-by-input.base.js +5 -5
  319. package/esm2015/providers/month-formatter.provider.js +8 -13
  320. package/esm2015/providers/specific-dropdown-controllers.js +6 -29
  321. package/esm2015/tokens/calendar-date-stream.js +15 -0
  322. package/esm2015/tokens/index.js +2 -3
  323. package/esm2015/utils/files/format-size.js +4 -9
  324. package/esm2015/utils/files/get-accept-array.js +2 -7
  325. package/esm2015/utils/format/string-hash-to-hsl.js +2 -5
  326. package/esm2015/utils/index.js +1 -2
  327. package/esm2015/utils/mask/create-auto-corrected-date-pipe.js +3 -8
  328. package/esm2015/utils/mask/create-auto-corrected-date-time-pipe.js +3 -3
  329. package/esm2015/utils/math/key-steps.js +3 -3
  330. package/esm2015/utils/miscellaneous/get-precision.js +2 -5
  331. package/fesm2015/taiga-ui-kit-components-accordion.js +7 -19
  332. package/fesm2015/taiga-ui-kit-components-accordion.js.map +1 -1
  333. package/fesm2015/taiga-ui-kit-components-action.js +5 -11
  334. package/fesm2015/taiga-ui-kit-components-action.js.map +1 -1
  335. package/fesm2015/taiga-ui-kit-components-arrow.js +2 -2
  336. package/fesm2015/taiga-ui-kit-components-arrow.js.map +1 -1
  337. package/fesm2015/taiga-ui-kit-components-avatar.js +5 -5
  338. package/fesm2015/taiga-ui-kit-components-avatar.js.map +1 -1
  339. package/fesm2015/taiga-ui-kit-components-badge.js +4 -4
  340. package/fesm2015/taiga-ui-kit-components-badge.js.map +1 -1
  341. package/fesm2015/taiga-ui-kit-components-badged-content.js +3 -6
  342. package/fesm2015/taiga-ui-kit-components-badged-content.js.map +1 -1
  343. package/fesm2015/taiga-ui-kit-components-breadcrumbs.js +1 -1
  344. package/fesm2015/taiga-ui-kit-components-breadcrumbs.js.map +1 -1
  345. package/fesm2015/taiga-ui-kit-components-calendar-month.js +0 -1
  346. package/fesm2015/taiga-ui-kit-components-calendar-month.js.map +1 -1
  347. package/fesm2015/taiga-ui-kit-components-calendar-range.js +12 -11
  348. package/fesm2015/taiga-ui-kit-components-calendar-range.js.map +1 -1
  349. package/fesm2015/taiga-ui-kit-components-carousel.js +5 -6
  350. package/fesm2015/taiga-ui-kit-components-carousel.js.map +1 -1
  351. package/fesm2015/taiga-ui-kit-components-checkbox-block.js +9 -12
  352. package/fesm2015/taiga-ui-kit-components-checkbox-block.js.map +1 -1
  353. package/fesm2015/taiga-ui-kit-components-checkbox-labeled.js +7 -11
  354. package/fesm2015/taiga-ui-kit-components-checkbox-labeled.js.map +1 -1
  355. package/fesm2015/taiga-ui-kit-components-checkbox.js +7 -11
  356. package/fesm2015/taiga-ui-kit-components-checkbox.js.map +1 -1
  357. package/fesm2015/taiga-ui-kit-components-combo-box.js +22 -41
  358. package/fesm2015/taiga-ui-kit-components-combo-box.js.map +1 -1
  359. package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js +7 -28
  360. package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
  361. package/fesm2015/taiga-ui-kit-components-files.js +2 -3
  362. package/fesm2015/taiga-ui-kit-components-files.js.map +1 -1
  363. package/fesm2015/taiga-ui-kit-components-filter.js +1 -1
  364. package/fesm2015/taiga-ui-kit-components-filter.js.map +1 -1
  365. package/fesm2015/taiga-ui-kit-components-input-copy.js +22 -36
  366. package/fesm2015/taiga-ui-kit-components-input-copy.js.map +1 -1
  367. package/fesm2015/taiga-ui-kit-components-input-count.js +15 -38
  368. package/fesm2015/taiga-ui-kit-components-input-count.js.map +1 -1
  369. package/fesm2015/taiga-ui-kit-components-input-date-range.js +20 -44
  370. package/fesm2015/taiga-ui-kit-components-input-date-range.js.map +1 -1
  371. package/fesm2015/taiga-ui-kit-components-input-date-time.js +19 -44
  372. package/fesm2015/taiga-ui-kit-components-input-date-time.js.map +1 -1
  373. package/fesm2015/taiga-ui-kit-components-input-date.js +18 -43
  374. package/fesm2015/taiga-ui-kit-components-input-date.js.map +1 -1
  375. package/fesm2015/taiga-ui-kit-components-input-files.js +7 -20
  376. package/fesm2015/taiga-ui-kit-components-input-files.js.map +1 -1
  377. package/fesm2015/taiga-ui-kit-components-input-inline.js +4 -10
  378. package/fesm2015/taiga-ui-kit-components-input-inline.js.map +1 -1
  379. package/fesm2015/taiga-ui-kit-components-input-month-range.js +20 -37
  380. package/fesm2015/taiga-ui-kit-components-input-month-range.js.map +1 -1
  381. package/fesm2015/taiga-ui-kit-components-input-month.js +20 -37
  382. package/fesm2015/taiga-ui-kit-components-input-month.js.map +1 -1
  383. package/fesm2015/taiga-ui-kit-components-input-number.js +17 -40
  384. package/fesm2015/taiga-ui-kit-components-input-number.js.map +1 -1
  385. package/fesm2015/taiga-ui-kit-components-input-password.js +20 -47
  386. package/fesm2015/taiga-ui-kit-components-input-password.js.map +1 -1
  387. package/fesm2015/taiga-ui-kit-components-input-phone-international.js +18 -30
  388. package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
  389. package/fesm2015/taiga-ui-kit-components-input-phone.js +31 -57
  390. package/fesm2015/taiga-ui-kit-components-input-phone.js.map +1 -1
  391. package/fesm2015/taiga-ui-kit-components-input-range.js +19 -15
  392. package/fesm2015/taiga-ui-kit-components-input-range.js.map +1 -1
  393. package/fesm2015/taiga-ui-kit-components-input-slider.js +12 -14
  394. package/fesm2015/taiga-ui-kit-components-input-slider.js.map +1 -1
  395. package/fesm2015/taiga-ui-kit-components-input-tag.js +33 -55
  396. package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
  397. package/fesm2015/taiga-ui-kit-components-input-time.js +10 -17
  398. package/fesm2015/taiga-ui-kit-components-input-time.js.map +1 -1
  399. package/fesm2015/taiga-ui-kit-components-input.js +20 -36
  400. package/fesm2015/taiga-ui-kit-components-input.js.map +1 -1
  401. package/fesm2015/taiga-ui-kit-components-line-clamp.js +96 -14
  402. package/fesm2015/taiga-ui-kit-components-line-clamp.js.map +1 -1
  403. package/fesm2015/taiga-ui-kit-components-marker-icon.js +1 -1
  404. package/fesm2015/taiga-ui-kit-components-marker-icon.js.map +1 -1
  405. package/fesm2015/taiga-ui-kit-components-multi-select-option.js +5 -5
  406. package/fesm2015/taiga-ui-kit-components-multi-select-option.js.map +1 -1
  407. package/fesm2015/taiga-ui-kit-components-multi-select.js +37 -73
  408. package/fesm2015/taiga-ui-kit-components-multi-select.js.map +1 -1
  409. package/fesm2015/taiga-ui-kit-components-pagination.js +13 -25
  410. package/fesm2015/taiga-ui-kit-components-pagination.js.map +1 -1
  411. package/fesm2015/taiga-ui-kit-components-pdf-viewer.js +3 -16
  412. package/fesm2015/taiga-ui-kit-components-pdf-viewer.js.map +1 -1
  413. package/fesm2015/taiga-ui-kit-components-progress.js +7 -15
  414. package/fesm2015/taiga-ui-kit-components-progress.js.map +1 -1
  415. package/fesm2015/taiga-ui-kit-components-radio-block.js +9 -12
  416. package/fesm2015/taiga-ui-kit-components-radio-block.js.map +1 -1
  417. package/fesm2015/taiga-ui-kit-components-radio-labeled.js +7 -11
  418. package/fesm2015/taiga-ui-kit-components-radio-labeled.js.map +1 -1
  419. package/fesm2015/taiga-ui-kit-components-radio-list.js +7 -11
  420. package/fesm2015/taiga-ui-kit-components-radio-list.js.map +1 -1
  421. package/fesm2015/taiga-ui-kit-components-radio.js +7 -12
  422. package/fesm2015/taiga-ui-kit-components-radio.js.map +1 -1
  423. package/fesm2015/taiga-ui-kit-components-range.js +38 -86
  424. package/fesm2015/taiga-ui-kit-components-range.js.map +1 -1
  425. package/fesm2015/taiga-ui-kit-components-rating.js +6 -10
  426. package/fesm2015/taiga-ui-kit-components-rating.js.map +1 -1
  427. package/fesm2015/taiga-ui-kit-components-select-option.js +6 -6
  428. package/fesm2015/taiga-ui-kit-components-select-option.js.map +1 -1
  429. package/fesm2015/taiga-ui-kit-components-select.js +21 -40
  430. package/fesm2015/taiga-ui-kit-components-select.js.map +1 -1
  431. package/fesm2015/taiga-ui-kit-components-slider.js +34 -32
  432. package/fesm2015/taiga-ui-kit-components-slider.js.map +1 -1
  433. package/fesm2015/taiga-ui-kit-components-stepper.js +10 -8
  434. package/fesm2015/taiga-ui-kit-components-stepper.js.map +1 -1
  435. package/fesm2015/taiga-ui-kit-components-tabs.js +33 -35
  436. package/fesm2015/taiga-ui-kit-components-tabs.js.map +1 -1
  437. package/fesm2015/taiga-ui-kit-components-tag.js +10 -20
  438. package/fesm2015/taiga-ui-kit-components-tag.js.map +1 -1
  439. package/fesm2015/taiga-ui-kit-components-text-area.js +22 -34
  440. package/fesm2015/taiga-ui-kit-components-text-area.js.map +1 -1
  441. package/fesm2015/taiga-ui-kit-components-toggle.js +7 -11
  442. package/fesm2015/taiga-ui-kit-components-toggle.js.map +1 -1
  443. package/fesm2015/taiga-ui-kit-components-tree.js +4 -9
  444. package/fesm2015/taiga-ui-kit-components-tree.js.map +1 -1
  445. package/fesm2015/taiga-ui-kit-constants.js +4 -3
  446. package/fesm2015/taiga-ui-kit-constants.js.map +1 -1
  447. package/fesm2015/taiga-ui-kit-directives-data-list-dropdown-manager.js +120 -0
  448. package/fesm2015/taiga-ui-kit-directives-data-list-dropdown-manager.js.map +1 -0
  449. package/fesm2015/taiga-ui-kit-directives-highlight.js +0 -1
  450. package/fesm2015/taiga-ui-kit-directives-highlight.js.map +1 -1
  451. package/fesm2015/taiga-ui-kit-directives-lazy-loading.js +3 -3
  452. package/fesm2015/taiga-ui-kit-directives-lazy-loading.js.map +1 -1
  453. package/fesm2015/taiga-ui-kit-directives-present.js +3 -3
  454. package/fesm2015/taiga-ui-kit-directives-present.js.map +1 -1
  455. package/fesm2015/taiga-ui-kit-directives-project-class.js +0 -3
  456. package/fesm2015/taiga-ui-kit-directives-project-class.js.map +1 -1
  457. package/fesm2015/taiga-ui-kit-directives.js +1 -3
  458. package/fesm2015/taiga-ui-kit-directives.js.map +1 -1
  459. package/fesm2015/taiga-ui-kit-internal-primitive-calendar-range.js +6 -6
  460. package/fesm2015/taiga-ui-kit-internal-primitive-calendar-range.js.map +1 -1
  461. package/fesm2015/taiga-ui-kit-pipes-field-error.js +0 -2
  462. package/fesm2015/taiga-ui-kit-pipes-field-error.js.map +1 -1
  463. package/fesm2015/taiga-ui-kit-pipes-filter-by-input.js +4 -4
  464. package/fesm2015/taiga-ui-kit-pipes-filter-by-input.js.map +1 -1
  465. package/fesm2015/taiga-ui-kit-providers.js +13 -40
  466. package/fesm2015/taiga-ui-kit-providers.js.map +1 -1
  467. package/fesm2015/taiga-ui-kit-tokens.js +15 -8
  468. package/fesm2015/taiga-ui-kit-tokens.js.map +1 -1
  469. package/fesm2015/taiga-ui-kit-utils-files.js +5 -15
  470. package/fesm2015/taiga-ui-kit-utils-files.js.map +1 -1
  471. package/fesm2015/taiga-ui-kit-utils-format.js +2 -5
  472. package/fesm2015/taiga-ui-kit-utils-format.js.map +1 -1
  473. package/fesm2015/taiga-ui-kit-utils-mask.js +4 -9
  474. package/fesm2015/taiga-ui-kit-utils-mask.js.map +1 -1
  475. package/fesm2015/taiga-ui-kit-utils-math.js +2 -2
  476. package/fesm2015/taiga-ui-kit-utils-math.js.map +1 -1
  477. package/fesm2015/taiga-ui-kit-utils-miscellaneous.js +2 -5
  478. package/fesm2015/taiga-ui-kit-utils-miscellaneous.js.map +1 -1
  479. package/fesm2015/taiga-ui-kit-utils.js +0 -1
  480. package/fesm2015/taiga-ui-kit-utils.js.map +1 -1
  481. package/interfaces/index.d.ts +0 -1
  482. package/package.json +5 -5
  483. package/providers/month-formatter.provider.d.ts +0 -7
  484. package/providers/specific-dropdown-controllers.d.ts +1 -6
  485. package/tokens/calendar-date-stream.d.ts +5 -0
  486. package/tokens/index.d.ts +1 -2
  487. package/tokens/validation-errors.d.ts +1 -1
  488. package/utils/files/format-size.d.ts +1 -5
  489. package/utils/files/get-accept-array.d.ts +1 -5
  490. package/utils/format/string-hash-to-hsl.d.ts +1 -3
  491. package/utils/index.d.ts +0 -1
  492. package/utils/mask/create-auto-corrected-date-pipe.d.ts +1 -5
  493. package/utils/miscellaneous/get-precision.d.ts +1 -3
  494. package/abstract/index.d.ts +0 -1
  495. package/abstract/package.json +0 -10
  496. package/abstract/slider/slider.d.ts +0 -69
  497. package/abstract/taiga-ui-kit-abstract.d.ts +0 -5
  498. package/bundles/taiga-ui-kit-abstract.umd.js +0 -651
  499. package/bundles/taiga-ui-kit-abstract.umd.js.map +0 -1
  500. package/bundles/taiga-ui-kit-directives-dropdown-context.umd.js.map +0 -1
  501. package/bundles/taiga-ui-kit-directives-dropdown-hover.umd.js +0 -107
  502. package/bundles/taiga-ui-kit-directives-dropdown-hover.umd.js.map +0 -1
  503. package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js +0 -643
  504. package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js.map +0 -1
  505. package/bundles/taiga-ui-kit-utils-dom.umd.js +0 -124
  506. package/bundles/taiga-ui-kit-utils-dom.umd.js.map +0 -1
  507. package/components/combo-box/combo-box.providers.d.ts +0 -1
  508. package/components/input/input.providers.d.ts +0 -1
  509. package/components/input-copy/input-copy.providers.d.ts +0 -2
  510. package/components/input-date/input-date.providers.d.ts +0 -1
  511. package/components/input-date-range/input-date-range.providers.d.ts +0 -1
  512. package/components/input-date-time/input-date-time.providers.d.ts +0 -1
  513. package/components/input-month/input-month.providers.d.ts +0 -2
  514. package/components/input-month-range/input-month-range.providers.d.ts +0 -2
  515. package/components/input-phone/input-phone.providers.d.ts +0 -5
  516. package/components/select/select.providers.d.ts +0 -1
  517. package/components/text-area/text-area.providers.d.ts +0 -2
  518. package/directives/dropdown-context/dropdown-context.directive.d.ts +0 -30
  519. package/directives/dropdown-context/dropdown-context.module.d.ts +0 -8
  520. package/directives/dropdown-context/index.d.ts +0 -2
  521. package/directives/dropdown-context/package.json +0 -10
  522. package/directives/dropdown-context/taiga-ui-kit-directives-dropdown-context.d.ts +0 -5
  523. package/directives/dropdown-hover/dropdown-hover.directive.d.ts +0 -11
  524. package/directives/dropdown-hover/dropdown-hover.module.d.ts +0 -7
  525. package/directives/dropdown-hover/index.d.ts +0 -2
  526. package/directives/dropdown-hover/package.json +0 -10
  527. package/directives/dropdown-hover/taiga-ui-kit-directives-dropdown-hover.d.ts +0 -5
  528. package/directives/dropdown-selection/dropdown-selection.directive.d.ts +0 -46
  529. package/directives/dropdown-selection/dropdown-selection.module.d.ts +0 -8
  530. package/directives/dropdown-selection/index.d.ts +0 -2
  531. package/directives/dropdown-selection/package.json +0 -10
  532. package/directives/dropdown-selection/taiga-ui-kit-directives-dropdown-selection.d.ts +0 -5
  533. package/esm2015/abstract/index.js +0 -2
  534. package/esm2015/abstract/slider/slider.js +0 -264
  535. package/esm2015/abstract/taiga-ui-kit-abstract.js +0 -5
  536. package/esm2015/components/combo-box/combo-box.providers.js +0 -26
  537. package/esm2015/components/input/input.providers.js +0 -22
  538. package/esm2015/components/input-copy/input-copy.providers.js +0 -16
  539. package/esm2015/components/input-date/input-date.providers.js +0 -27
  540. package/esm2015/components/input-date-range/input-date-range.providers.js +0 -27
  541. package/esm2015/components/input-date-time/input-date-time.providers.js +0 -27
  542. package/esm2015/components/input-month/input-month.providers.js +0 -19
  543. package/esm2015/components/input-month-range/input-month-range.providers.js +0 -19
  544. package/esm2015/components/input-phone/input-phone.providers.js +0 -35
  545. package/esm2015/components/select/select.providers.js +0 -26
  546. package/esm2015/components/text-area/text-area.providers.js +0 -18
  547. package/esm2015/directives/dropdown-context/dropdown-context.directive.js +0 -141
  548. package/esm2015/directives/dropdown-context/dropdown-context.module.js +0 -18
  549. package/esm2015/directives/dropdown-context/index.js +0 -3
  550. package/esm2015/directives/dropdown-context/taiga-ui-kit-directives-dropdown-context.js +0 -5
  551. package/esm2015/directives/dropdown-hover/dropdown-hover.directive.js +0 -56
  552. package/esm2015/directives/dropdown-hover/dropdown-hover.module.js +0 -16
  553. package/esm2015/directives/dropdown-hover/index.js +0 -3
  554. package/esm2015/directives/dropdown-hover/taiga-ui-kit-directives-dropdown-hover.js +0 -5
  555. package/esm2015/directives/dropdown-selection/dropdown-selection.directive.js +0 -252
  556. package/esm2015/directives/dropdown-selection/dropdown-selection.module.js +0 -18
  557. package/esm2015/directives/dropdown-selection/index.js +0 -3
  558. package/esm2015/directives/dropdown-selection/taiga-ui-kit-directives-dropdown-selection.js +0 -5
  559. package/esm2015/interfaces/bread-crumbs-item.js +0 -2
  560. package/esm2015/tokens/calendar-data-stream.js +0 -3
  561. package/esm2015/tokens/tag-status.js +0 -6
  562. package/esm2015/utils/dom/get-word-range.js +0 -53
  563. package/esm2015/utils/dom/index.js +0 -4
  564. package/esm2015/utils/dom/scroll-to-element.js +0 -23
  565. package/esm2015/utils/dom/set-range-offset.js +0 -29
  566. package/esm2015/utils/dom/taiga-ui-kit-utils-dom.js +0 -5
  567. package/fesm2015/taiga-ui-kit-abstract.js +0 -271
  568. package/fesm2015/taiga-ui-kit-abstract.js.map +0 -1
  569. package/fesm2015/taiga-ui-kit-directives-dropdown-context.js +0 -162
  570. package/fesm2015/taiga-ui-kit-directives-dropdown-context.js.map +0 -1
  571. package/fesm2015/taiga-ui-kit-directives-dropdown-hover.js +0 -76
  572. package/fesm2015/taiga-ui-kit-directives-dropdown-hover.js.map +0 -1
  573. package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js +0 -273
  574. package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js.map +0 -1
  575. package/fesm2015/taiga-ui-kit-utils-dom.js +0 -111
  576. package/fesm2015/taiga-ui-kit-utils-dom.js.map +0 -1
  577. package/interfaces/bread-crumbs-item.d.ts +0 -6
  578. package/tokens/calendar-data-stream.d.ts +0 -4
  579. package/tokens/tag-status.d.ts +0 -3
  580. package/utils/dom/get-word-range.d.ts +0 -9
  581. package/utils/dom/index.d.ts +0 -3
  582. package/utils/dom/package.json +0 -10
  583. package/utils/dom/scroll-to-element.d.ts +0 -5
  584. package/utils/dom/set-range-offset.d.ts +0 -6
  585. package/utils/dom/taiga-ui-kit-utils-dom.d.ts +0 -5
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-input-number.js","sources":["../../../projects/kit/components/input-number/input-number.component.ts","../../../projects/kit/components/input-number/input-number.template.html","../../../projects/kit/components/input-number/input-number.directive.ts","../../../projects/kit/components/input-number/input-number.module.ts","../../../projects/kit/components/input-number/taiga-ui-kit-components-input-number.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n forwardRef,\n HostListener,\n Inject,\n Input,\n Optional,\n QueryList,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n AbstractTuiNullableControl,\n EMPTY_QUERY,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TUI_IS_IOS,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiInputMode,\n TuiMapper,\n} from '@taiga-ui/cdk';\nimport {\n formatNumber,\n maskedMoneyValueIsEmpty,\n maskedNumberStringToNumber,\n TUI_DECIMAL_SYMBOLS,\n TUI_NUMBER_FORMAT,\n tuiCreateAutoCorrectedNumberPipe,\n tuiCreateNumberMask,\n TuiDecimal,\n tuiEnableAutoCorrectDecimalSymbol,\n tuiGetFractionPartPadded,\n TuiNumberFormatSettings,\n TuiPrimitiveTextfieldComponent,\n TuiTextMaskOptions,\n} from '@taiga-ui/core';\nimport {PolymorpheusOutletDirective} from '@tinkoff/ng-polymorpheus';\nimport {TextMaskConfig} from 'angular2-text-mask';\n\nconst DEFAULT_MAX_LENGTH = 18;\n\n// @dynamic\n@Component({\n selector: `tui-input-number`,\n templateUrl: `./input-number.template.html`,\n styleUrls: [`./input-number.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiInputNumberComponent),\n },\n {\n provide: AbstractTuiControl,\n useExisting: forwardRef(() => TuiInputNumberComponent),\n },\n ],\n})\nexport class TuiInputNumberComponent\n extends AbstractTuiNullableControl<number>\n implements TuiFocusableElementAccessor\n{\n @ViewChild(TuiPrimitiveTextfieldComponent)\n private readonly primitiveTextfield?: TuiPrimitiveTextfieldComponent;\n\n @Input()\n @tuiDefaultProp()\n min = -Infinity;\n\n @Input()\n @tuiDefaultProp()\n max = Infinity;\n\n @Input()\n @tuiDefaultProp()\n decimal: TuiDecimal = `not-zero`;\n\n @Input()\n @tuiDefaultProp()\n precision = 2;\n\n @Input()\n @tuiDefaultProp()\n prefix = ``;\n\n @Input()\n @tuiDefaultProp()\n postfix = ``;\n\n @ContentChildren(PolymorpheusOutletDirective, {descendants: true})\n readonly polymorpheusValueContent: QueryList<unknown> = EMPTY_QUERY;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef)\n changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_NUMBER_FORMAT)\n private readonly numberFormat: TuiNumberFormatSettings,\n @Inject(TUI_IS_IOS) private readonly isIOS: boolean,\n ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): HTMLInputElement | null {\n return !this.primitiveTextfield || this.computedDisabled\n ? null\n : this.primitiveTextfield.nativeFocusableElement;\n }\n\n get focused(): boolean {\n return !!this.primitiveTextfield && this.primitiveTextfield.focused;\n }\n\n get isNegativeAllowed(): boolean {\n return this.min < 0;\n }\n\n get inputMode(): TuiInputMode {\n if (this.isIOS && this.isNegativeAllowed) {\n // iphones do not have minus sign if inputMode is equal to 'numeric' / 'decimal'\n return `text`;\n }\n\n return this.decimal === `never` ? `numeric` : `decimal`;\n }\n\n get calculatedMaxLength(): number {\n const decimalPart =\n this.decimal !== `never` &&\n this.nativeValue.includes(this.numberFormat.decimalSeparator);\n const precision = decimalPart ? this.precision + 1 : 0;\n const takeThousand = this.numberFormat.thousandSeparator.repeat(5).length;\n\n return DEFAULT_MAX_LENGTH + precision + takeThousand;\n }\n\n get formattedValue(): string {\n return this.getFormattedValue(this.value || 0);\n }\n\n get computedValue(): string {\n if (this.focused) {\n return this.nativeValue;\n }\n\n return this.value === null ? `` : this.formattedValue;\n }\n\n @HostListener(`keydown.0`, [`$event`])\n onZero(event: KeyboardEvent): void {\n const decimal =\n this.nativeValue.split(this.numberFormat.decimalSeparator)[1] || ``;\n const {nativeFocusableElement} = this;\n\n if (\n decimal.length < this.precision ||\n !nativeFocusableElement ||\n !nativeFocusableElement.selectionStart ||\n this.nativeValue[nativeFocusableElement.selectionStart] !== `0`\n ) {\n return;\n }\n\n event.preventDefault();\n nativeFocusableElement.selectionStart++;\n }\n\n mask: TuiMapper<boolean, TextMaskConfig> = (\n allowNegative: boolean,\n decimal: TuiDecimal,\n decimalLimit: number,\n nativeFocusableElement: HTMLInputElement | null,\n ) =>\n ({\n mask: tuiCreateNumberMask({\n allowNegative,\n decimalLimit,\n allowDecimal: decimal !== `never`,\n requireDecimal: decimal === `always`,\n decimalSymbol: this.numberFormat.decimalSeparator,\n thousandSymbol: this.numberFormat.thousandSeparator,\n autoCorrectDecimalSymbol: tuiEnableAutoCorrectDecimalSymbol(\n this.numberFormat,\n ),\n }),\n pipe: tuiCreateAutoCorrectedNumberPipe(\n decimal === `always` ? decimalLimit : 0,\n this.numberFormat.decimalSeparator,\n this.numberFormat.thousandSeparator,\n nativeFocusableElement,\n allowNegative,\n this.isIOS,\n ),\n guide: false,\n } as TuiTextMaskOptions as unknown as TextMaskConfig);\n\n onValueChange(value: string): void {\n if (maskedMoneyValueIsEmpty(value)) {\n this.updateValue(null);\n\n return;\n }\n\n if (this.isNativeValueNotFinished) {\n return;\n }\n\n const capped = this.absoluteCapInputValue(value);\n\n if (capped === null || isNaN(capped)) {\n return;\n }\n\n this.updateValue(capped);\n\n if (\n capped !==\n maskedNumberStringToNumber(\n value,\n this.numberFormat.decimalSeparator,\n this.numberFormat.thousandSeparator,\n )\n ) {\n this.nativeValue = this.formattedValue;\n }\n }\n\n onKeyDown(event: KeyboardEvent): void {\n if (!TUI_DECIMAL_SYMBOLS.includes(event.key)) {\n return;\n }\n\n if (this.decimal === `never`) {\n event.preventDefault();\n\n return;\n }\n\n if (this.nativeValue.includes(this.numberFormat.decimalSeparator)) {\n event.preventDefault();\n this.setCaretAfterComma();\n }\n }\n\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n\n if (focused) {\n return;\n }\n\n const nativeNumberValue = this.nativeNumberValue;\n\n if (isNaN(nativeNumberValue)) {\n this.clear();\n\n return;\n }\n\n const clamped = Math.min(this.max, Math.max(this.min, nativeNumberValue));\n\n this.updateValue(clamped);\n this.nativeValue = this.formattedValue;\n }\n\n getFormattedValue(value: number): string {\n const absValue = Math.abs(value);\n const hasFraction = absValue % 1 > 0;\n let limit =\n this.decimal === `always` || (hasFraction && this.decimal !== `never`)\n ? this.precision\n : 0;\n\n const fraction = hasFraction\n ? tuiGetFractionPartPadded(value, this.precision)\n : ``;\n\n if (this.focused && this.decimal !== `always`) {\n limit = fraction.length;\n }\n\n return formatNumber(\n value,\n limit,\n this.numberFormat.decimalSeparator,\n this.numberFormat.thousandSeparator,\n this.numberFormat.zeroPadding,\n );\n }\n\n private get isNativeValueNotFinished(): boolean {\n const nativeNumberValue = this.nativeNumberValue;\n\n return nativeNumberValue < 0\n ? nativeNumberValue > this.max\n : nativeNumberValue < this.min;\n }\n\n get nativeValue(): string {\n return this.nativeFocusableElement ? this.nativeFocusableElement.value : ``;\n }\n\n set nativeValue(value: string) {\n if (!this.primitiveTextfield || !this.nativeFocusableElement) {\n return;\n }\n\n this.primitiveTextfield.value = value;\n this.nativeFocusableElement.value = value;\n }\n\n private get nativeNumberValue(): number {\n return maskedNumberStringToNumber(\n this.nativeValue,\n this.numberFormat.decimalSeparator,\n this.numberFormat.thousandSeparator,\n );\n }\n\n private clear(): void {\n this.nativeValue = ``;\n this.updateValue(null);\n }\n\n private absoluteCapInputValue(inputValue: string): number | null {\n const value = maskedNumberStringToNumber(\n inputValue,\n this.numberFormat.decimalSeparator,\n this.numberFormat.thousandSeparator,\n );\n const capped =\n value < 0\n ? Math.max(Math.max(this.min, Number.MIN_SAFE_INTEGER), value)\n : Math.min(value, Math.min(this.max, Number.MAX_SAFE_INTEGER));\n const ineligibleValue = isNaN(capped) || capped < this.min || capped > this.max;\n\n return ineligibleValue ? null : capped;\n }\n\n private setCaretAfterComma(): void {\n if (!this.nativeFocusableElement) {\n return;\n }\n\n const afterCommaPosition = this.nativeValue.length - this.precision;\n\n this.nativeFocusableElement.setSelectionRange(\n afterCommaPosition,\n afterCommaPosition,\n );\n }\n}\n","<tui-primitive-textfield\n tuiValueAccessor\n class=\"textfield\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoFocus]=\"computedFocused\"\n [pseudoActive]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n [tuiTextfieldInputMode]=\"inputMode\"\n [tuiTextfieldMaxLength]=\"calculatedMaxLength\"\n [readOnly]=\"readOnly\"\n [disabled]=\"computedDisabled\"\n [textMask]=\"isNegativeAllowed | tuiMapper: mask:decimal:precision:nativeFocusableElement\"\n [value]=\"computedValue\"\n [prefix]=\"prefix\"\n [postfix]=\"postfix\"\n [focusable]=\"focusable\"\n (valueChange)=\"onValueChange($event)\"\n (focusedChange)=\"onFocused($event)\"\n (keydown)=\"onKeyDown($event)\"\n>\n <ng-content></ng-content>\n <ng-content\n select=\"input\"\n ngProjectAs=\"input\"\n ></ng-content>\n <div\n *ngIf=\"polymorpheusValueContent.length\"\n ngProjectAs=\"tuiContent\"\n class=\"t-value-content\"\n >\n <ng-container *polymorpheusOutlet=\"valueContent as text\">\n {{ text }}\n </ng-container>\n </div>\n</tui-primitive-textfield>\n\n<ng-container *ngIf=\"polymorpheusValueContent.changes | async\"></ng-container>\n\n<ng-template #valueContent>\n <ng-content select=\"tuiContent\"></ng-content>\n</ng-template>\n","import {Directive, DoCheck, forwardRef} from '@angular/core';\nimport {TUI_TEXTFIELD_HOST, TuiAbstractTextfieldHost} from '@taiga-ui/core';\n\nimport {TuiInputNumberComponent} from './input-number.component';\n\n@Directive({\n selector: `tui-input-number`,\n providers: [\n {\n provide: TUI_TEXTFIELD_HOST,\n useExisting: forwardRef(() => TuiInputNumberDirective),\n },\n ],\n})\nexport class TuiInputNumberDirective\n extends TuiAbstractTextfieldHost<TuiInputNumberComponent>\n implements DoCheck\n{\n input?: HTMLInputElement;\n\n get value(): string {\n return this.host.computedValue;\n }\n\n onValueChange(value: string): void {\n this.host.onValueChange(value);\n }\n\n process(input: HTMLInputElement): void {\n this.input = input;\n }\n\n ngDoCheck(): void {\n if (!this.input) {\n return;\n }\n\n this.input.maxLength = this.host.calculatedMaxLength;\n this.input.inputMode = `decimal`;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiMapperPipeModule} from '@taiga-ui/cdk';\nimport {\n TuiPrimitiveTextfieldModule,\n TuiTextfieldComponent,\n TuiTextfieldControllerModule,\n} from '@taiga-ui/core';\nimport {TuiValueAccessorModule} from '@taiga-ui/kit/directives';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\nimport {TextMaskModule} from 'angular2-text-mask';\n\nimport {TuiInputNumberComponent} from './input-number.component';\nimport {TuiInputNumberDirective} from './input-number.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n TextMaskModule,\n TuiMapperPipeModule,\n TuiPrimitiveTextfieldModule,\n TuiTextfieldControllerModule,\n TuiValueAccessorModule,\n PolymorpheusModule,\n ],\n declarations: [TuiInputNumberComponent, TuiInputNumberDirective],\n exports: [TuiInputNumberComponent, TuiInputNumberDirective, TuiTextfieldComponent],\n})\nexport class TuiInputNumberModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AA4CA,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B;AAiBM,MAAO,uBACT,SAAQ,0BAAkC,CAAA;AAiC1C,IAAA,WAAA,CAII,OAAyB,EAEzB,iBAAoC,EAEnB,YAAqC,EACjB,KAAc,EAAA;AAEnD,QAAA,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QAHjB,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAyB;QACjB,IAAK,CAAA,KAAA,GAAL,KAAK,CAAS;QAlCvD,IAAG,CAAA,GAAA,GAAG,CAAC,QAAQ,CAAC;QAIhB,IAAG,CAAA,GAAA,GAAG,QAAQ,CAAC;QAIf,IAAO,CAAA,OAAA,GAAe,UAAU,CAAC;QAIjC,IAAS,CAAA,SAAA,GAAG,CAAC,CAAC;QAId,IAAM,CAAA,MAAA,GAAG,EAAE,CAAC;QAIZ,IAAO,CAAA,OAAA,GAAG,EAAE,CAAC;QAGJ,IAAwB,CAAA,wBAAA,GAAuB,WAAW,CAAC;AAgFpE,QAAA,IAAA,CAAA,IAAI,GAAuC,CACvC,aAAsB,EACtB,OAAmB,EACnB,YAAoB,EACpB,sBAA+C,MAE9C;YACG,IAAI,EAAE,mBAAmB,CAAC;gBACtB,aAAa;gBACb,YAAY;gBACZ,YAAY,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B;YACnB,2BAA2B;YAC3B,4BAA4B;YAC5B,sBAAsB;YACtB,kBAAkB;AACrB,SAAA,CAAA,EAAA,CAAA,CAAA;4FAIQ,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAbhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,cAAc;wBACd,mBAAmB;wBACnB,2BAA2B;wBAC3B,4BAA4B;wBAC5B,sBAAsB;wBACtB,kBAAkB;AACrB,qBAAA;AACD,oBAAA,YAAY,EAAE,CAAC,uBAAuB,EAAE,uBAAuB,CAAC;AAChE,oBAAA,OAAO,EAAE,CAAC,uBAAuB,EAAE,uBAAuB,EAAE,qBAAqB,CAAC;AACrF,iBAAA,CAAA;;;AC3BD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-input-number.js","sources":["../../../projects/kit/components/input-number/input-number.component.ts","../../../projects/kit/components/input-number/input-number.template.html","../../../projects/kit/components/input-number/input-number.directive.ts","../../../projects/kit/components/input-number/input-number.module.ts","../../../projects/kit/components/input-number/taiga-ui-kit-components-input-number.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n HostListener,\n Inject,\n Input,\n Optional,\n QueryList,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiNullableControl,\n EMPTY_QUERY,\n TUI_IS_IOS,\n tuiAsControl,\n tuiAsFocusableItemAccessor,\n tuiDefaultProp,\n TuiFocusableElementAccessor,\n TuiInputMode,\n TuiMapper,\n} from '@taiga-ui/cdk';\nimport {\n TUI_DECIMAL_SYMBOLS,\n TUI_NUMBER_FORMAT,\n tuiCreateAutoCorrectedNumberPipe,\n tuiCreateNumberMask,\n TuiDecimal,\n tuiEnableAutoCorrectDecimalSymbol,\n tuiFormatNumber,\n tuiGetFractionPartPadded,\n tuiMaskedMoneyValueIsEmpty,\n tuiMaskedNumberStringToNumber,\n TuiNumberFormatSettings,\n TuiPrimitiveTextfieldComponent,\n TuiTextMaskOptions,\n} from '@taiga-ui/core';\nimport {PolymorpheusOutletDirective} from '@tinkoff/ng-polymorpheus';\nimport {TextMaskConfig} from 'angular2-text-mask';\n\nconst DEFAULT_MAX_LENGTH = 18;\n\n@Component({\n selector: `tui-input-number`,\n templateUrl: `./input-number.template.html`,\n styleUrls: [`./input-number.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsFocusableItemAccessor(TuiInputNumberComponent),\n tuiAsControl(TuiInputNumberComponent),\n ],\n})\nexport class TuiInputNumberComponent\n extends AbstractTuiNullableControl<number>\n implements TuiFocusableElementAccessor\n{\n @ViewChild(TuiPrimitiveTextfieldComponent)\n private readonly primitiveTextfield?: TuiPrimitiveTextfieldComponent;\n\n @Input()\n @tuiDefaultProp()\n min = -Infinity;\n\n @Input()\n @tuiDefaultProp()\n max = Infinity;\n\n @Input()\n @tuiDefaultProp()\n decimal: TuiDecimal = `not-zero`;\n\n @Input()\n @tuiDefaultProp()\n precision = 2;\n\n @Input()\n @tuiDefaultProp()\n prefix = ``;\n\n @Input()\n @tuiDefaultProp()\n postfix = ``;\n\n @ContentChildren(PolymorpheusOutletDirective, {descendants: true})\n readonly polymorpheusValueContent: QueryList<unknown> = EMPTY_QUERY;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef)\n changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_NUMBER_FORMAT)\n private readonly numberFormat: TuiNumberFormatSettings,\n @Inject(TUI_IS_IOS) private readonly isIOS: boolean,\n ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): HTMLInputElement | null {\n return !this.primitiveTextfield || this.computedDisabled\n ? null\n : this.primitiveTextfield.nativeFocusableElement;\n }\n\n get focused(): boolean {\n return !!this.primitiveTextfield && this.primitiveTextfield.focused;\n }\n\n get isNegativeAllowed(): boolean {\n return this.min < 0;\n }\n\n get inputMode(): TuiInputMode {\n if (this.isIOS && this.isNegativeAllowed) {\n // iphones do not have minus sign if inputMode is equal to 'numeric' / 'decimal'\n return `text`;\n }\n\n return this.decimal === `never` ? `numeric` : `decimal`;\n }\n\n get calculatedMaxLength(): number {\n const decimalPart =\n this.decimal !== `never` &&\n this.nativeValue.includes(this.numberFormat.decimalSeparator);\n const precision = decimalPart ? this.precision + 1 : 0;\n const takeThousand = this.numberFormat.thousandSeparator.repeat(5).length;\n\n return DEFAULT_MAX_LENGTH + precision + takeThousand;\n }\n\n get formattedValue(): string {\n return this.getFormattedValue(this.value || 0);\n }\n\n get computedValue(): string {\n if (this.focused) {\n return this.nativeValue;\n }\n\n return this.value === null ? `` : this.formattedValue;\n }\n\n @HostListener(`keydown.0`, [`$event`])\n onZero(event: KeyboardEvent): void {\n const decimal =\n this.nativeValue.split(this.numberFormat.decimalSeparator)[1] || ``;\n const {nativeFocusableElement} = this;\n\n if (\n decimal.length < this.precision ||\n !nativeFocusableElement ||\n !nativeFocusableElement.selectionStart ||\n this.nativeValue[nativeFocusableElement.selectionStart] !== `0`\n ) {\n return;\n }\n\n event.preventDefault();\n nativeFocusableElement.selectionStart++;\n }\n\n mask: TuiMapper<boolean, TextMaskConfig> = (\n allowNegative: boolean,\n decimal: TuiDecimal,\n decimalLimit: number,\n nativeFocusableElement: HTMLInputElement | null,\n ) =>\n ({\n mask: tuiCreateNumberMask({\n allowNegative,\n decimalLimit,\n allowDecimal: decimal !== `never`,\n requireDecimal: decimal === `always`,\n decimalSymbol: this.numberFormat.decimalSeparator,\n thousandSymbol: this.numberFormat.thousandSeparator,\n autoCorrectDecimalSymbol: tuiEnableAutoCorrectDecimalSymbol(\n this.numberFormat,\n ),\n }),\n pipe: tuiCreateAutoCorrectedNumberPipe(\n decimal === `always` ? decimalLimit : 0,\n this.numberFormat.decimalSeparator,\n this.numberFormat.thousandSeparator,\n nativeFocusableElement,\n allowNegative,\n this.isIOS,\n ),\n guide: false,\n } as TuiTextMaskOptions as unknown as TextMaskConfig);\n\n onValueChange(value: string): void {\n if (tuiMaskedMoneyValueIsEmpty(value)) {\n this.updateValue(null);\n\n return;\n }\n\n if (this.isNativeValueNotFinished) {\n return;\n }\n\n const capped = this.absoluteCapInputValue(value);\n\n if (capped === null || isNaN(capped)) {\n return;\n }\n\n this.updateValue(capped);\n\n if (\n capped !==\n tuiMaskedNumberStringToNumber(\n value,\n this.numberFormat.decimalSeparator,\n this.numberFormat.thousandSeparator,\n )\n ) {\n this.nativeValue = this.formattedValue;\n }\n }\n\n onKeyDown(event: KeyboardEvent): void {\n if (!TUI_DECIMAL_SYMBOLS.includes(event.key)) {\n return;\n }\n\n if (this.decimal === `never`) {\n event.preventDefault();\n\n return;\n }\n\n if (this.nativeValue.includes(this.numberFormat.decimalSeparator)) {\n event.preventDefault();\n this.setCaretAfterComma();\n }\n }\n\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n\n if (focused) {\n return;\n }\n\n const nativeNumberValue = this.nativeNumberValue;\n\n if (isNaN(nativeNumberValue)) {\n this.clear();\n\n return;\n }\n\n const clamped = Math.min(this.max, Math.max(this.min, nativeNumberValue));\n\n this.updateValue(clamped);\n this.nativeValue = this.formattedValue;\n }\n\n getFormattedValue(value: number): string {\n const absValue = Math.abs(value);\n const hasFraction = absValue % 1 > 0;\n let decimalLimit =\n this.decimal === `always` || (hasFraction && this.decimal !== `never`)\n ? this.precision\n : 0;\n\n const fraction = hasFraction\n ? tuiGetFractionPartPadded(value, this.precision)\n : ``;\n\n if (this.focused && this.decimal !== `always`) {\n decimalLimit = fraction.length;\n }\n\n return tuiFormatNumber(value, {\n ...this.numberFormat,\n decimalLimit,\n });\n }\n\n private get isNativeValueNotFinished(): boolean {\n const nativeNumberValue = this.nativeNumberValue;\n\n return nativeNumberValue < 0\n ? nativeNumberValue > this.max\n : nativeNumberValue < this.min;\n }\n\n get nativeValue(): string {\n return this.nativeFocusableElement ? this.nativeFocusableElement.value : ``;\n }\n\n set nativeValue(value: string) {\n if (!this.primitiveTextfield || !this.nativeFocusableElement) {\n return;\n }\n\n this.primitiveTextfield.value = value;\n this.nativeFocusableElement.value = value;\n }\n\n private get nativeNumberValue(): number {\n return tuiMaskedNumberStringToNumber(\n this.nativeValue,\n this.numberFormat.decimalSeparator,\n this.numberFormat.thousandSeparator,\n );\n }\n\n private clear(): void {\n this.nativeValue = ``;\n this.updateValue(null);\n }\n\n private absoluteCapInputValue(inputValue: string): number | null {\n const value = tuiMaskedNumberStringToNumber(\n inputValue,\n this.numberFormat.decimalSeparator,\n this.numberFormat.thousandSeparator,\n );\n const capped =\n value < 0\n ? Math.max(Math.max(this.min, Number.MIN_SAFE_INTEGER), value)\n : Math.min(value, Math.min(this.max, Number.MAX_SAFE_INTEGER));\n const ineligibleValue = isNaN(capped) || capped < this.min || capped > this.max;\n\n return ineligibleValue ? null : capped;\n }\n\n private setCaretAfterComma(): void {\n if (!this.nativeFocusableElement) {\n return;\n }\n\n const afterCommaPosition = this.nativeValue.length - this.precision;\n\n this.nativeFocusableElement.setSelectionRange(\n afterCommaPosition,\n afterCommaPosition,\n );\n }\n}\n","<tui-primitive-textfield\n tuiValueAccessor\n class=\"t-textfield\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoFocus]=\"computedFocused\"\n [pseudoActive]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n [tuiTextfieldInputMode]=\"inputMode\"\n [tuiTextfieldMaxLength]=\"calculatedMaxLength\"\n [readOnly]=\"readOnly\"\n [disabled]=\"computedDisabled\"\n [textMask]=\"isNegativeAllowed | tuiMapper: mask:decimal:precision:nativeFocusableElement\"\n [value]=\"computedValue\"\n [prefix]=\"prefix\"\n [postfix]=\"postfix\"\n [focusable]=\"focusable\"\n (valueChange)=\"onValueChange($event)\"\n (focusedChange)=\"onFocused($event)\"\n (keydown)=\"onKeyDown($event)\"\n>\n <ng-content></ng-content>\n <ng-content\n select=\"input\"\n ngProjectAs=\"input\"\n ></ng-content>\n <div\n *ngIf=\"polymorpheusValueContent.length\"\n ngProjectAs=\"tuiContent\"\n class=\"t-value-content\"\n >\n <ng-container *polymorpheusOutlet=\"valueContent as text\">\n {{ text }}\n </ng-container>\n </div>\n</tui-primitive-textfield>\n\n<ng-container *ngIf=\"polymorpheusValueContent.changes | async\"></ng-container>\n\n<ng-template #valueContent>\n <ng-content select=\"tuiContent\"></ng-content>\n</ng-template>\n","import {Directive, DoCheck} from '@angular/core';\nimport {TuiAbstractTextfieldHost, tuiAsTextfieldHost} from '@taiga-ui/core';\n\nimport {TuiInputNumberComponent} from './input-number.component';\n\n@Directive({\n selector: `tui-input-number`,\n providers: [tuiAsTextfieldHost(TuiInputNumberDirective)],\n})\nexport class TuiInputNumberDirective\n extends TuiAbstractTextfieldHost<TuiInputNumberComponent>\n implements DoCheck\n{\n input?: HTMLInputElement;\n\n get value(): string {\n return this.host.computedValue;\n }\n\n onValueChange(value: string): void {\n this.host.onValueChange(value);\n }\n\n process(input: HTMLInputElement): void {\n this.input = input;\n }\n\n ngDoCheck(): void {\n if (!this.input) {\n return;\n }\n\n this.input.maxLength = this.host.calculatedMaxLength;\n this.input.inputMode = `decimal`;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiMapperPipeModule} from '@taiga-ui/cdk';\nimport {\n TuiPrimitiveTextfieldModule,\n TuiTextfieldComponent,\n TuiTextfieldControllerModule,\n} from '@taiga-ui/core';\nimport {TuiValueAccessorModule} from '@taiga-ui/kit/directives';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\nimport {TextMaskModule} from 'angular2-text-mask';\n\nimport {TuiInputNumberComponent} from './input-number.component';\nimport {TuiInputNumberDirective} from './input-number.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n TextMaskModule,\n TuiMapperPipeModule,\n TuiPrimitiveTextfieldModule,\n TuiTextfieldControllerModule,\n TuiValueAccessorModule,\n PolymorpheusModule,\n ],\n declarations: [TuiInputNumberComponent, TuiInputNumberDirective],\n exports: [TuiInputNumberComponent, TuiInputNumberDirective, TuiTextfieldComponent],\n})\nexport class TuiInputNumberModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AA2CA,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAYxB,MAAO,uBACT,SAAQ,0BAAkC,CAAA;AAiC1C,IAAA,WAAA,CAII,OAAyB,EAEzB,iBAAoC,EAEnB,YAAqC,EACjB,KAAc,EAAA;AAEnD,QAAA,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QAHjB,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAyB;QACjB,IAAK,CAAA,KAAA,GAAL,KAAK,CAAS;QAlCvD,IAAG,CAAA,GAAA,GAAG,CAAC,QAAQ,CAAC;QAIhB,IAAG,CAAA,GAAA,GAAG,QAAQ,CAAC;QAIf,IAAO,CAAA,OAAA,GAAe,UAAU,CAAC;QAIjC,IAAS,CAAA,SAAA,GAAG,CAAC,CAAC;QAId,IAAM,CAAA,MAAA,GAAG,EAAE,CAAC;QAIZ,IAAO,CAAA,OAAA,GAAG,EAAE,CAAC;QAGJ,IAAwB,CAAA,wBAAA,GAAuB,WAAW,CAAC;AAgFpE,QAAA,IAAA,CAAA,IAAI,GAAuC,CACvC,aAAsB,EACtB,OAAmB,EACnB,YAAoB,EACpB,sBAA+C,MAE9C;YACG,IAAI,EAAE,mBAAmB,CAAC;gBACtB,aAAa;gBACb,YAAY;gBACZ,YAAY,EAAE,OAAO,KAAK,CAAO,KAAA,CAAA;gBACjC,cAAc,EAAE,OAAO,KAAK,CAAQ,MAAA,CAAA;AACpC,gBAAA,aAAa,EAAE,IAAI,CAAC,YAAY,CAAC,gBAAgB;AACjD,gBAAA,cAAc,EAAE,IAAI,CAAC,YAAY,CAAC,iBAAiB;AACnD,gBAAA,wBAAwB,EAAE,iCAAiC,CACvD,IAAI,CAAC,YAAY,CAC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BAAoB,EAHd,YAAA,EAAA,CAAA,uBAAuB,EAAE,uBAAuB,aAR3D,YAAY;QACZ,cAAc;QACd,mBAAmB;QACnB,2BAA2B;QAC3B,4BAA4B;QAC5B,sBAAsB;AACtB,QAAA,kBAAkB,CAGZ,EAAA,OAAA,EAAA,CAAA,uBAAuB,EAAE,uBAAuB,EAAE,qBAAqB,CAAA,EAAA,CAAA,CAAA;AAExE,oBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,EAZpB,OAAA,EAAA,CAAA;YACL,YAAY;YACZ,cAAc;YACd,mBAAmB;YACnB,2BAA2B;YAC3B,4BAA4B;YAC5B,sBAAsB;YACtB,kBAAkB;AACrB,SAAA,CAAA,EAAA,CAAA,CAAA;4FAIQ,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAbhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,cAAc;wBACd,mBAAmB;wBACnB,2BAA2B;wBAC3B,4BAA4B;wBAC5B,sBAAsB;wBACtB,kBAAkB;AACrB,qBAAA;AACD,oBAAA,YAAY,EAAE,CAAC,uBAAuB,EAAE,uBAAuB,CAAC;AAChE,oBAAA,OAAO,EAAE,CAAC,uBAAuB,EAAE,uBAAuB,EAAE,qBAAqB,CAAC;AACrF,iBAAA,CAAA;;;AC3BD;;AAEG;;;;"}
@@ -1,19 +1,18 @@
1
1
  import { __decorate } from 'tslib';
2
2
  import * as i0 from '@angular/core';
3
- import { InjectionToken, ChangeDetectorRef, forwardRef, Component, ChangeDetectionStrategy, Optional, Self, Inject, ViewChild, Directive, NgModule } from '@angular/core';
4
- import * as i5 from '@angular/forms';
3
+ import { InjectionToken, ChangeDetectorRef, Component, ChangeDetectionStrategy, Optional, Self, Inject, ViewChild, Directive, NgModule } from '@angular/core';
4
+ import * as i4 from '@angular/forms';
5
5
  import { NgControl, FormsModule } from '@angular/forms';
6
- import * as i3 from '@taiga-ui/cdk';
7
- import { AbstractTuiControl, TUI_FOCUSABLE_ITEM_ACCESSOR, tuiPure, TuiLetModule } from '@taiga-ui/cdk';
6
+ import { AbstractTuiControl, tuiAsFocusableItemAccessor, tuiAsControl, tuiPure } from '@taiga-ui/cdk';
8
7
  import * as i1 from '@taiga-ui/core';
9
- import { TUI_TEXTFIELD_SIZE, TUI_HINT_WATCHED_CONTROLLER, TUI_MODE, HINT_CONTROLLER_PROVIDER, MODE_PROVIDER, TuiPrimitiveTextfieldComponent, TuiAbstractTextfieldHost, TUI_TEXTFIELD_HOST, TuiSvgModule, TuiHintModule, TuiPrimitiveTextfieldModule, TuiTextfieldControllerModule, TuiTextfieldComponent } from '@taiga-ui/core';
8
+ import { TUI_TEXTFIELD_SIZE, TUI_HINT_WATCHED_CONTROLLER, TUI_MODE, HINT_CONTROLLER_PROVIDER, MODE_PROVIDER, TuiPrimitiveTextfieldComponent, TuiAbstractTextfieldHost, tuiAsTextfieldHost, TuiSvgModule, TuiHintModule, TuiPrimitiveTextfieldModule, TuiTextfieldControllerModule, TuiTextfieldComponent } from '@taiga-ui/core';
10
9
  import { TUI_PASSWORD_TEXTS } from '@taiga-ui/kit/tokens';
11
- import * as i6 from 'rxjs';
10
+ import * as i5 from 'rxjs';
12
11
  import { combineLatest } from 'rxjs';
13
12
  import { map, startWith } from 'rxjs/operators';
14
13
  import * as i2 from '@tinkoff/ng-polymorpheus';
15
14
  import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
16
- import * as i4 from '@angular/common';
15
+ import * as i3 from '@angular/common';
17
16
  import { CommonModule } from '@angular/common';
18
17
 
19
18
  /** Default values for the input password options. */
@@ -31,7 +30,6 @@ const tuiInputPasswordOptionsProvider = (options) => ({
31
30
  useValue: Object.assign(Object.assign({}, TUI_INPUT_PASSWORD_DEFAULT_OPTIONS), options),
32
31
  });
33
32
 
34
- // @dynamic
35
33
  class TuiInputPasswordComponent extends AbstractTuiControl {
36
34
  constructor(control, changeDetectorRef, textfieldSize, passwordTexts$, options, hintController, mode$) {
37
35
  super(control, changeDetectorRef);
@@ -41,10 +39,10 @@ class TuiInputPasswordComponent extends AbstractTuiControl {
41
39
  this.hintController = hintController;
42
40
  this.mode$ = mode$;
43
41
  this.isPasswordHidden = true;
44
- this.computedMode$ = combineLatest([
45
- this.mode$.pipe(map(val => (val === `onDark` ? `onDark` : null))),
46
- this.hintController.change$.pipe(startWith(null), map(() => this.hintController.mode)),
47
- ]).pipe(map(([mode, controller]) => controller || mode), startWith(null));
42
+ this.computedAppearance$ = combineLatest([
43
+ this.mode$.pipe(map(val => (val === `onDark` ? `onDark` : ``))),
44
+ this.hintController.change$.pipe(startWith(null), map(() => this.hintController.appearance)),
45
+ ]).pipe(map(([mode, controller]) => controller || mode), startWith(``));
48
46
  }
49
47
  get nativeFocusableElement() {
50
48
  return this.computedDisabled || !this.textfield
@@ -81,17 +79,11 @@ class TuiInputPasswordComponent extends AbstractTuiControl {
81
79
  }
82
80
  TuiInputPasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiInputPasswordComponent, deps: [{ token: NgControl, optional: true, self: true }, { token: ChangeDetectorRef }, { token: TUI_TEXTFIELD_SIZE }, { token: TUI_PASSWORD_TEXTS }, { token: TUI_INPUT_PASSWORD_OPTIONS }, { token: TUI_HINT_WATCHED_CONTROLLER }, { token: TUI_MODE }], target: i0.ɵɵFactoryTarget.Component });
83
81
  TuiInputPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiInputPasswordComponent, selector: "tui-input-password", providers: [
84
- {
85
- provide: TUI_FOCUSABLE_ITEM_ACCESSOR,
86
- useExisting: forwardRef(() => TuiInputPasswordComponent),
87
- },
88
- {
89
- provide: AbstractTuiControl,
90
- useExisting: forwardRef(() => TuiInputPasswordComponent),
91
- },
82
+ tuiAsFocusableItemAccessor(TuiInputPasswordComponent),
83
+ tuiAsControl(TuiInputPasswordComponent),
92
84
  HINT_CONTROLLER_PROVIDER,
93
85
  MODE_PROVIDER,
94
- ], viewQueries: [{ propertyName: "textfield", first: true, predicate: TuiPrimitiveTextfieldComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<tui-primitive-textfield\n class=\"textfield\"\n [pseudoFocus]=\"pseudoFocus\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoActive]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n [focusable]=\"focusable\"\n [nativeId]=\"nativeId\"\n [tuiTextfieldType]=\"inputType\"\n [disabled]=\"computedDisabled\"\n [readOnly]=\"readOnly\"\n [tuiTextfieldIcon]=\"interactive ? iconContent : ''\"\n [value]=\"value\"\n (valueChange)=\"onValueChange($event)\"\n (focusedChange)=\"onFocused($event)\"\n>\n <ng-content></ng-content>\n <ng-content\n select=\"input\"\n ngProjectAs=\"input\"\n ></ng-content>\n</tui-primitive-textfield>\n\n<ng-template\n #iconContent=\"polymorpheus\"\n [polymorpheus]=\"type\"\n>\n <ng-container *tuiLet=\"passwordTexts$ | async as texts\">\n <tui-svg\n *polymorpheusOutlet=\"icon as src; context: context\"\n automation-id=\"tui-password__icon\"\n tuiHintId=\"not_required\"\n class=\"icon\"\n [tuiHint]=\"texts[0] && texts[1] && hintContent\"\n [tuiHintDirection]=\"hintController.direction\"\n [tuiHintMode]=\"computedMode$ | async\"\n [src]=\"src\"\n (click)=\"togglePasswordVisibility()\"\n ></tui-svg>\n\n <ng-template\n #hintContent=\"polymorpheus\"\n polymorpheus\n >\n {{ isPasswordHidden ? texts[0] : texts[1] }}\n </ng-template>\n </ng-container>\n</ng-template>\n", styles: [":host{display:block;border-radius:var(--tui-radius-m);text-align:left}.icon{cursor:pointer;pointer-events:auto}.textfield{border-radius:inherit;text-align:inherit}\n"], components: [{ type: i1.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "filler", "iconCleaner", "readOnly", "invalid", "disabled", "prefix", "postfix", "value"], outputs: ["valueChange"] }, { type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i1.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { type: i1.TuiTextfieldTypeDirective, selector: "[tuiTextfieldType]", inputs: ["tuiTextfieldType"] }, { type: i1.TuiTextfieldIconDirective, selector: "[tuiTextfieldIcon]", inputs: ["tuiTextfieldIcon"] }, { type: i2.PolymorpheusTemplate, selector: "ng-template[polymorpheus]", inputs: ["polymorpheus"], exportAs: ["polymorpheus"] }, { type: i3.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { type: i2.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i1.TuiHintDirective, selector: "[tuiHint]:not(ng-container)", inputs: ["tuiHintId", "tuiHintShowDelay", "tuiHintHideDelay", "tuiHintHost", "tuiHint"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
86
+ ], viewQueries: [{ propertyName: "textfield", first: true, predicate: TuiPrimitiveTextfieldComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<tui-primitive-textfield\n class=\"t-textfield\"\n [pseudoFocus]=\"pseudoFocus\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoActive]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n [focusable]=\"focusable\"\n [nativeId]=\"nativeId\"\n [tuiTextfieldType]=\"inputType\"\n [disabled]=\"computedDisabled\"\n [readOnly]=\"readOnly\"\n [tuiTextfieldIcon]=\"interactive ? iconContent : ''\"\n [value]=\"value\"\n (valueChange)=\"onValueChange($event)\"\n (focusedChange)=\"onFocused($event)\"\n>\n <ng-content></ng-content>\n <ng-content\n select=\"input\"\n ngProjectAs=\"input\"\n ></ng-content>\n</tui-primitive-textfield>\n\n<ng-template\n #iconContent=\"polymorpheus\"\n [polymorpheus]=\"type\"\n>\n <ng-container *ngIf=\"passwordTexts$ | async as texts\">\n <tui-svg\n *polymorpheusOutlet=\"icon as src; context: context\"\n automation-id=\"tui-password__icon\"\n tuiHintId=\"not_required\"\n class=\"t-icon\"\n [tuiHint]=\"texts[0] && texts[1] && hintContent\"\n [tuiHintDirection]=\"hintController.direction\"\n [tuiHintAppearance]=\"(computedAppearance$ | async) || ''\"\n [src]=\"src\"\n (click)=\"togglePasswordVisibility()\"\n ></tui-svg>\n\n <ng-template\n #hintContent=\"polymorpheus\"\n polymorpheus\n >\n {{ isPasswordHidden ? texts[0] : texts[1] }}\n </ng-template>\n </ng-container>\n</ng-template>\n", styles: [":host{display:block;border-radius:var(--tui-radius-m);text-align:left}.t-icon{cursor:pointer;pointer-events:auto}.t-textfield{border-radius:inherit;text-align:inherit}\n"], components: [{ type: i1.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "filler", "iconCleaner", "readOnly", "invalid", "disabled", "prefix", "postfix", "value"], outputs: ["valueChange"] }, { type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i1.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { type: i1.TuiTextfieldTypeDirective, selector: "[tuiTextfieldType]", inputs: ["tuiTextfieldType"] }, { type: i1.TuiTextfieldIconDirective, selector: "[tuiTextfieldIcon]", inputs: ["tuiTextfieldIcon"] }, { type: i2.PolymorpheusTemplate, selector: "ng-template[polymorpheus]", inputs: ["polymorpheus"], exportAs: ["polymorpheus"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i1.TuiHintDirective, selector: "[tuiHint]:not(ng-container)", inputs: ["tuiHintId", "tuiHint", "tuiHintContext", "tuiHintAppearance"] }, { type: i1.TuiHintDriverDirective, selector: "[tuiHint]" }, { type: i1.TuiHintHoverDirective, selector: "[tuiHint]:not(ng-container)", inputs: ["tuiHintShowDelay", "tuiHintHideDelay"] }, { type: i1.TuiHintPositionDirective, selector: "[tuiHint]:not([tuiHintCustomPosition])", inputs: ["tuiHintDirection"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
95
87
  __decorate([
96
88
  tuiPure
97
89
  ], TuiInputPasswordComponent.prototype, "getContext", null);
@@ -103,19 +95,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
103
95
  styleUrls: [`./input-password.style.less`],
104
96
  changeDetection: ChangeDetectionStrategy.OnPush,
105
97
  providers: [
106
- {
107
- provide: TUI_FOCUSABLE_ITEM_ACCESSOR,
108
- useExisting: forwardRef(() => TuiInputPasswordComponent),
109
- },
110
- {
111
- provide: AbstractTuiControl,
112
- useExisting: forwardRef(() => TuiInputPasswordComponent),
113
- },
98
+ tuiAsFocusableItemAccessor(TuiInputPasswordComponent),
99
+ tuiAsControl(TuiInputPasswordComponent),
114
100
  HINT_CONTROLLER_PROVIDER,
115
101
  MODE_PROVIDER,
116
102
  ],
117
103
  }]
118
- }], ctorParameters: function () { return [{ type: i5.NgControl, decorators: [{
104
+ }], ctorParameters: function () { return [{ type: i4.NgControl, decorators: [{
119
105
  type: Optional
120
106
  }, {
121
107
  type: Self
@@ -128,7 +114,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
128
114
  }] }, { type: i1.TuiTextfieldSizeDirective, decorators: [{
129
115
  type: Inject,
130
116
  args: [TUI_TEXTFIELD_SIZE]
131
- }] }, { type: i6.Observable, decorators: [{
117
+ }] }, { type: i5.Observable, decorators: [{
132
118
  type: Inject,
133
119
  args: [TUI_PASSWORD_TEXTS]
134
120
  }] }, { type: undefined, decorators: [{
@@ -137,7 +123,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
137
123
  }] }, { type: i1.TuiHintControllerDirective, decorators: [{
138
124
  type: Inject,
139
125
  args: [TUI_HINT_WATCHED_CONTROLLER]
140
- }] }, { type: i6.Observable, decorators: [{
126
+ }] }, { type: i5.Observable, decorators: [{
141
127
  type: Inject,
142
128
  args: [TUI_MODE]
143
129
  }] }]; }, propDecorators: { textfield: [{
@@ -159,22 +145,12 @@ class TuiInputPasswordDirective extends TuiAbstractTextfieldHost {
159
145
  }
160
146
  }
161
147
  TuiInputPasswordDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiInputPasswordDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
162
- TuiInputPasswordDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiInputPasswordDirective, selector: "tui-input-password", providers: [
163
- {
164
- provide: TUI_TEXTFIELD_HOST,
165
- useExisting: forwardRef(() => TuiInputPasswordDirective),
166
- },
167
- ], usesInheritance: true, ngImport: i0 });
148
+ TuiInputPasswordDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiInputPasswordDirective, selector: "tui-input-password", providers: [tuiAsTextfieldHost(TuiInputPasswordDirective)], usesInheritance: true, ngImport: i0 });
168
149
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiInputPasswordDirective, decorators: [{
169
150
  type: Directive,
170
151
  args: [{
171
152
  selector: `tui-input-password`,
172
- providers: [
173
- {
174
- provide: TUI_TEXTFIELD_HOST,
175
- useExisting: forwardRef(() => TuiInputPasswordDirective),
176
- },
177
- ],
153
+ providers: [tuiAsTextfieldHost(TuiInputPasswordDirective)],
178
154
  }]
179
155
  }] });
180
156
 
@@ -184,7 +160,6 @@ TuiInputPasswordModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", v
184
160
  TuiInputPasswordModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiInputPasswordModule, declarations: [TuiInputPasswordComponent, TuiInputPasswordDirective], imports: [CommonModule,
185
161
  FormsModule,
186
162
  PolymorpheusModule,
187
- TuiLetModule,
188
163
  TuiSvgModule,
189
164
  TuiHintModule,
190
165
  TuiPrimitiveTextfieldModule,
@@ -195,7 +170,6 @@ TuiInputPasswordModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
195
170
  CommonModule,
196
171
  FormsModule,
197
172
  PolymorpheusModule,
198
- TuiLetModule,
199
173
  TuiSvgModule,
200
174
  TuiHintModule,
201
175
  TuiPrimitiveTextfieldModule,
@@ -208,7 +182,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
208
182
  CommonModule,
209
183
  FormsModule,
210
184
  PolymorpheusModule,
211
- TuiLetModule,
212
185
  TuiSvgModule,
213
186
  TuiHintModule,
214
187
  TuiPrimitiveTextfieldModule,
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-input-password.js","sources":["../../../projects/kit/components/input-password/input-password-options.ts","../../../projects/kit/components/input-password/input-password.component.ts","../../../projects/kit/components/input-password/input-password.template.html","../../../projects/kit/components/input-password/input-password.directive.ts","../../../projects/kit/components/input-password/input-password.module.ts","../../../projects/kit/components/input-password/taiga-ui-kit-components-input-password.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiContextWithImplicit} from '@taiga-ui/cdk';\nimport {TuiSizeL, TuiSizeS} from '@taiga-ui/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport interface TuiInputPasswordOptions {\n readonly icons: Readonly<{\n hide: PolymorpheusContent<TuiContextWithImplicit<TuiSizeS | TuiSizeL>>;\n show: PolymorpheusContent<TuiContextWithImplicit<TuiSizeS | TuiSizeL>>;\n }>;\n}\n\n/** Default values for the input password options. */\nexport const TUI_INPUT_PASSWORD_DEFAULT_OPTIONS: TuiInputPasswordOptions = {\n icons: {\n hide: ({$implicit}) =>\n $implicit === `s` ? `tuiIconEyeClosed` : `tuiIconHideLarge`,\n show: ({$implicit}) =>\n $implicit === `s` ? `tuiIconEyeOpen` : `tuiIconShowLarge`,\n },\n};\n\nexport const TUI_INPUT_PASSWORD_OPTIONS = new InjectionToken<TuiInputPasswordOptions>(\n `Default parameters for input password component`,\n {\n factory: () => TUI_INPUT_PASSWORD_DEFAULT_OPTIONS,\n },\n);\n\nexport const tuiInputPasswordOptionsProvider: (\n options: Partial<TuiInputPasswordOptions>,\n) => ValueProvider = (options: Partial<TuiInputPasswordOptions>) => ({\n provide: TUI_INPUT_PASSWORD_OPTIONS,\n useValue: {...TUI_INPUT_PASSWORD_DEFAULT_OPTIONS, ...options},\n});\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n forwardRef,\n Inject,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TuiContextWithImplicit,\n TuiFocusableElementAccessor,\n TuiInputType,\n TuiNativeFocusableElement,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {\n HINT_CONTROLLER_PROVIDER,\n MODE_PROVIDER,\n TUI_HINT_WATCHED_CONTROLLER,\n TUI_MODE,\n TUI_TEXTFIELD_SIZE,\n TuiBrightness,\n TuiHintControllerDirective,\n TuiHintMode,\n TuiPrimitiveTextfieldComponent,\n TuiSizeL,\n TuiSizeS,\n TuiTextfieldSizeDirective,\n} from '@taiga-ui/core';\nimport {TUI_PASSWORD_TEXTS} from '@taiga-ui/kit/tokens';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {combineLatest, Observable} from 'rxjs';\nimport {map, startWith} from 'rxjs/operators';\n\nimport {\n TUI_INPUT_PASSWORD_OPTIONS,\n TuiInputPasswordOptions,\n} from './input-password-options';\n\n// @dynamic\n@Component({\n selector: `tui-input-password`,\n templateUrl: `./input-password.template.html`,\n styleUrls: [`./input-password.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiInputPasswordComponent),\n },\n {\n provide: AbstractTuiControl,\n useExisting: forwardRef(() => TuiInputPasswordComponent),\n },\n HINT_CONTROLLER_PROVIDER,\n MODE_PROVIDER,\n ],\n})\nexport class TuiInputPasswordComponent\n extends AbstractTuiControl<string>\n implements TuiFocusableElementAccessor\n{\n @ViewChild(TuiPrimitiveTextfieldComponent)\n private readonly textfield?: TuiPrimitiveTextfieldComponent;\n\n isPasswordHidden = true;\n\n readonly computedMode$: Observable<TuiHintMode | null> = combineLatest([\n this.mode$.pipe(map(val => (val === `onDark` ? `onDark` : null))),\n this.hintController.change$.pipe(\n startWith(null),\n map(() => this.hintController.mode),\n ),\n ]).pipe(\n map(([mode, controller]) => controller || mode),\n startWith(null),\n );\n\n readonly type!: TuiContextWithImplicit<TuiSizeS | TuiSizeL>;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_TEXTFIELD_SIZE)\n private readonly textfieldSize: TuiTextfieldSizeDirective,\n @Inject(TUI_PASSWORD_TEXTS)\n readonly passwordTexts$: Observable<[string, string]>,\n @Inject(TUI_INPUT_PASSWORD_OPTIONS)\n readonly options: TuiInputPasswordOptions,\n @Inject(TUI_HINT_WATCHED_CONTROLLER)\n readonly hintController: TuiHintControllerDirective,\n @Inject(TUI_MODE)\n private readonly mode$: Observable<TuiBrightness | null>,\n ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.computedDisabled || !this.textfield\n ? null\n : this.textfield.nativeFocusableElement;\n }\n\n get focused(): boolean {\n return !!this.textfield && this.textfield.focused;\n }\n\n get icon(): PolymorpheusContent<TuiContextWithImplicit<TuiSizeS | TuiSizeL>> {\n return this.isPasswordHidden ? this.options.icons.hide : this.options.icons.show;\n }\n\n get context(): TuiContextWithImplicit<TuiSizeS | TuiSizeL> {\n return this.getContext(this.textfieldSize.size);\n }\n\n get inputType(): TuiInputType {\n return this.isPasswordHidden || !this.interactive ? `password` : `text`;\n }\n\n onValueChange(textValue: string): void {\n this.updateValue(textValue);\n }\n\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n\n togglePasswordVisibility(): void {\n this.isPasswordHidden = !this.isPasswordHidden;\n }\n\n protected getFallbackValue(): string {\n return ``;\n }\n\n @tuiPure\n private getContext(\n $implicit: TuiSizeS | TuiSizeL,\n ): TuiContextWithImplicit<TuiSizeS | TuiSizeL> {\n return {$implicit};\n }\n}\n","<tui-primitive-textfield\n class=\"textfield\"\n [pseudoFocus]=\"pseudoFocus\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoActive]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n [focusable]=\"focusable\"\n [nativeId]=\"nativeId\"\n [tuiTextfieldType]=\"inputType\"\n [disabled]=\"computedDisabled\"\n [readOnly]=\"readOnly\"\n [tuiTextfieldIcon]=\"interactive ? iconContent : ''\"\n [value]=\"value\"\n (valueChange)=\"onValueChange($event)\"\n (focusedChange)=\"onFocused($event)\"\n>\n <ng-content></ng-content>\n <ng-content\n select=\"input\"\n ngProjectAs=\"input\"\n ></ng-content>\n</tui-primitive-textfield>\n\n<ng-template\n #iconContent=\"polymorpheus\"\n [polymorpheus]=\"type\"\n>\n <ng-container *tuiLet=\"passwordTexts$ | async as texts\">\n <tui-svg\n *polymorpheusOutlet=\"icon as src; context: context\"\n automation-id=\"tui-password__icon\"\n tuiHintId=\"not_required\"\n class=\"icon\"\n [tuiHint]=\"texts[0] && texts[1] && hintContent\"\n [tuiHintDirection]=\"hintController.direction\"\n [tuiHintMode]=\"computedMode$ | async\"\n [src]=\"src\"\n (click)=\"togglePasswordVisibility()\"\n ></tui-svg>\n\n <ng-template\n #hintContent=\"polymorpheus\"\n polymorpheus\n >\n {{ isPasswordHidden ? texts[0] : texts[1] }}\n </ng-template>\n </ng-container>\n</ng-template>\n","import {Directive, DoCheck, forwardRef} from '@angular/core';\nimport {TUI_TEXTFIELD_HOST, TuiAbstractTextfieldHost} from '@taiga-ui/core';\n\nimport {TuiInputPasswordComponent} from './input-password.component';\n\n@Directive({\n selector: `tui-input-password`,\n providers: [\n {\n provide: TUI_TEXTFIELD_HOST,\n useExisting: forwardRef(() => TuiInputPasswordDirective),\n },\n ],\n})\nexport class TuiInputPasswordDirective\n extends TuiAbstractTextfieldHost<TuiInputPasswordComponent>\n implements DoCheck\n{\n input?: HTMLInputElement;\n\n onValueChange(value: string): void {\n this.host.onValueChange(value);\n }\n\n process(input: HTMLInputElement): void {\n this.input = input;\n }\n\n ngDoCheck(): void {\n if (this.input) {\n this.input.type = this.host.isPasswordHidden ? `password` : `text`;\n }\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TuiLetModule} from '@taiga-ui/cdk';\nimport {\n TuiHintModule,\n TuiPrimitiveTextfieldModule,\n TuiSvgModule,\n TuiTextfieldComponent,\n TuiTextfieldControllerModule,\n} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiInputPasswordComponent} from './input-password.component';\nimport {TuiInputPasswordDirective} from './input-password.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n PolymorpheusModule,\n TuiLetModule,\n TuiSvgModule,\n TuiHintModule,\n TuiPrimitiveTextfieldModule,\n TuiTextfieldControllerModule,\n ],\n declarations: [TuiInputPasswordComponent, TuiInputPasswordDirective],\n exports: [\n TuiInputPasswordComponent,\n TuiInputPasswordDirective,\n TuiTextfieldComponent,\n ],\n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BACZ,WAAW;wBACX,kBAAkB;wBAClB,YAAY;wBACZ,YAAY;wBACZ,aAAa;wBACb,2BAA2B;wBAC3B,4BAA4B;AAC/B,qBAAA;AACD,oBAAA,YAAY,EAAE,CAAC,yBAAyB,EAAE,yBAAyB,CAAC;AACpE,oBAAA,OAAO,EAAE;wBACL,yBAAyB;wBACzB,yBAAyB;wBACzB,qBAAqB;AACxB,qBAAA;AACJ,iBAAA,CAAA;;;ACjCD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-input-password.js","sources":["../../../projects/kit/components/input-password/input-password-options.ts","../../../projects/kit/components/input-password/input-password.component.ts","../../../projects/kit/components/input-password/input-password.template.html","../../../projects/kit/components/input-password/input-password.directive.ts","../../../projects/kit/components/input-password/input-password.module.ts","../../../projects/kit/components/input-password/taiga-ui-kit-components-input-password.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiContextWithImplicit} from '@taiga-ui/cdk';\nimport {TuiSizeL, TuiSizeS} from '@taiga-ui/core';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport interface TuiInputPasswordOptions {\n readonly icons: Readonly<{\n hide: PolymorpheusContent<TuiContextWithImplicit<TuiSizeS | TuiSizeL>>;\n show: PolymorpheusContent<TuiContextWithImplicit<TuiSizeS | TuiSizeL>>;\n }>;\n}\n\n/** Default values for the input password options. */\nexport const TUI_INPUT_PASSWORD_DEFAULT_OPTIONS: TuiInputPasswordOptions = {\n icons: {\n hide: ({$implicit}) =>\n $implicit === `s` ? `tuiIconEyeClosed` : `tuiIconHideLarge`,\n show: ({$implicit}) =>\n $implicit === `s` ? `tuiIconEyeOpen` : `tuiIconShowLarge`,\n },\n};\n\nexport const TUI_INPUT_PASSWORD_OPTIONS = new InjectionToken<TuiInputPasswordOptions>(\n `Default parameters for input password component`,\n {\n factory: () => TUI_INPUT_PASSWORD_DEFAULT_OPTIONS,\n },\n);\n\nexport const tuiInputPasswordOptionsProvider: (\n options: Partial<TuiInputPasswordOptions>,\n) => ValueProvider = (options: Partial<TuiInputPasswordOptions>) => ({\n provide: TUI_INPUT_PASSWORD_OPTIONS,\n useValue: {...TUI_INPUT_PASSWORD_DEFAULT_OPTIONS, ...options},\n});\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Inject,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n AbstractTuiControl,\n tuiAsControl,\n tuiAsFocusableItemAccessor,\n TuiContextWithImplicit,\n TuiFocusableElementAccessor,\n TuiInputType,\n TuiNativeFocusableElement,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {\n HINT_CONTROLLER_PROVIDER,\n MODE_PROVIDER,\n TUI_HINT_WATCHED_CONTROLLER,\n TUI_MODE,\n TUI_TEXTFIELD_SIZE,\n TuiBrightness,\n TuiHintControllerDirective,\n TuiPrimitiveTextfieldComponent,\n TuiSizeL,\n TuiSizeS,\n TuiTextfieldSizeDirective,\n} from '@taiga-ui/core';\nimport {TUI_PASSWORD_TEXTS} from '@taiga-ui/kit/tokens';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {combineLatest, Observable} from 'rxjs';\nimport {map, startWith} from 'rxjs/operators';\n\nimport {\n TUI_INPUT_PASSWORD_OPTIONS,\n TuiInputPasswordOptions,\n} from './input-password-options';\n\n@Component({\n selector: `tui-input-password`,\n templateUrl: `./input-password.template.html`,\n styleUrls: [`./input-password.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsFocusableItemAccessor(TuiInputPasswordComponent),\n tuiAsControl(TuiInputPasswordComponent),\n HINT_CONTROLLER_PROVIDER,\n MODE_PROVIDER,\n ],\n})\nexport class TuiInputPasswordComponent\n extends AbstractTuiControl<string>\n implements TuiFocusableElementAccessor\n{\n @ViewChild(TuiPrimitiveTextfieldComponent)\n private readonly textfield?: TuiPrimitiveTextfieldComponent;\n\n isPasswordHidden = true;\n\n readonly computedAppearance$: Observable<string> = combineLatest([\n this.mode$.pipe(map(val => (val === `onDark` ? `onDark` : ``))),\n this.hintController.change$.pipe(\n startWith(null),\n map(() => this.hintController.appearance),\n ),\n ]).pipe(\n map(([mode, controller]) => controller || mode),\n startWith(``),\n );\n\n readonly type!: TuiContextWithImplicit<TuiSizeS | TuiSizeL>;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_TEXTFIELD_SIZE)\n private readonly textfieldSize: TuiTextfieldSizeDirective,\n @Inject(TUI_PASSWORD_TEXTS)\n readonly passwordTexts$: Observable<[string, string]>,\n @Inject(TUI_INPUT_PASSWORD_OPTIONS)\n readonly options: TuiInputPasswordOptions,\n @Inject(TUI_HINT_WATCHED_CONTROLLER)\n readonly hintController: TuiHintControllerDirective,\n @Inject(TUI_MODE)\n private readonly mode$: Observable<TuiBrightness | null>,\n ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return this.computedDisabled || !this.textfield\n ? null\n : this.textfield.nativeFocusableElement;\n }\n\n get focused(): boolean {\n return !!this.textfield && this.textfield.focused;\n }\n\n get icon(): PolymorpheusContent<TuiContextWithImplicit<TuiSizeS | TuiSizeL>> {\n return this.isPasswordHidden ? this.options.icons.hide : this.options.icons.show;\n }\n\n get context(): TuiContextWithImplicit<TuiSizeS | TuiSizeL> {\n return this.getContext(this.textfieldSize.size);\n }\n\n get inputType(): TuiInputType {\n return this.isPasswordHidden || !this.interactive ? `password` : `text`;\n }\n\n onValueChange(textValue: string): void {\n this.updateValue(textValue);\n }\n\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n\n togglePasswordVisibility(): void {\n this.isPasswordHidden = !this.isPasswordHidden;\n }\n\n protected getFallbackValue(): string {\n return ``;\n }\n\n @tuiPure\n private getContext(\n $implicit: TuiSizeS | TuiSizeL,\n ): TuiContextWithImplicit<TuiSizeS | TuiSizeL> {\n return {$implicit};\n }\n}\n","<tui-primitive-textfield\n class=\"t-textfield\"\n [pseudoFocus]=\"pseudoFocus\"\n [pseudoHover]=\"pseudoHover\"\n [pseudoActive]=\"pseudoActive\"\n [invalid]=\"computedInvalid\"\n [focusable]=\"focusable\"\n [nativeId]=\"nativeId\"\n [tuiTextfieldType]=\"inputType\"\n [disabled]=\"computedDisabled\"\n [readOnly]=\"readOnly\"\n [tuiTextfieldIcon]=\"interactive ? iconContent : ''\"\n [value]=\"value\"\n (valueChange)=\"onValueChange($event)\"\n (focusedChange)=\"onFocused($event)\"\n>\n <ng-content></ng-content>\n <ng-content\n select=\"input\"\n ngProjectAs=\"input\"\n ></ng-content>\n</tui-primitive-textfield>\n\n<ng-template\n #iconContent=\"polymorpheus\"\n [polymorpheus]=\"type\"\n>\n <ng-container *ngIf=\"passwordTexts$ | async as texts\">\n <tui-svg\n *polymorpheusOutlet=\"icon as src; context: context\"\n automation-id=\"tui-password__icon\"\n tuiHintId=\"not_required\"\n class=\"t-icon\"\n [tuiHint]=\"texts[0] && texts[1] && hintContent\"\n [tuiHintDirection]=\"hintController.direction\"\n [tuiHintAppearance]=\"(computedAppearance$ | async) || ''\"\n [src]=\"src\"\n (click)=\"togglePasswordVisibility()\"\n ></tui-svg>\n\n <ng-template\n #hintContent=\"polymorpheus\"\n polymorpheus\n >\n {{ isPasswordHidden ? texts[0] : texts[1] }}\n </ng-template>\n </ng-container>\n</ng-template>\n","import {Directive, DoCheck} from '@angular/core';\nimport {TuiAbstractTextfieldHost, tuiAsTextfieldHost} from '@taiga-ui/core';\n\nimport {TuiInputPasswordComponent} from './input-password.component';\n\n@Directive({\n selector: `tui-input-password`,\n providers: [tuiAsTextfieldHost(TuiInputPasswordDirective)],\n})\nexport class TuiInputPasswordDirective\n extends TuiAbstractTextfieldHost<TuiInputPasswordComponent>\n implements DoCheck\n{\n input?: HTMLInputElement;\n\n onValueChange(value: string): void {\n this.host.onValueChange(value);\n }\n\n process(input: HTMLInputElement): void {\n this.input = input;\n }\n\n ngDoCheck(): void {\n if (this.input) {\n this.input.type = this.host.isPasswordHidden ? `password` : `text`;\n }\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {\n TuiHintModule,\n TuiPrimitiveTextfieldModule,\n TuiSvgModule,\n TuiTextfieldComponent,\n TuiTextfieldControllerModule,\n} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiInputPasswordComponent} from './input-password.component';\nimport {TuiInputPasswordDirective} from './input-password.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n PolymorpheusModule,\n TuiSvgModule,\n TuiHintModule,\n TuiPrimitiveTextfieldModule,\n TuiTextfieldControllerModule,\n ],\n declarations: [TuiInputPasswordComponent, TuiInputPasswordDirective],\n exports: [\n TuiInputPasswordComponent,\n TuiInputPasswordDirective,\n TuiTextfieldComponent,\n ],\n})\nexport class TuiInputPasswordModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAYA;AACa,MAAA,kCAAkC,GAA4B;AACvE,IAAA,KAAK,EAAE;AACH,QAAA,IAAI,EAAE,CAAC,EAAC,SAAS,EAAC,KACd,SAAS,KAAK,CAAA,CAAA,CAAG,GAAG,kBAAkB,GAAG,CAAkB,gBAAA,CAAA;AAC/D,QAAA,IAAI,EAAE,CAAC,EAAC,SAAS,EAAC,KACd,SAAS,KAAK,CAAA,CAAA,CAAG,GAAG,gBAAgB,GAAG,CAAkB,gBAAA,CAAA;AAChE,KAAA;EACH;MAEW,0BAA0B,GAAG,IAAI,cAAc,CACxD,iDAAiD,EACjD;AACI,IAAA,OAAO,EAAE,MAAM,kCAAkC;AACpD,CAAA,EACH;MAEW,+BAA+B,GAEvB,CAAC,OAAyC,MAAM;AACjE,IAAA,OAAO,EAA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,CAAA,CAAA;AAGhB,sBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,EAhBtB,OAAA,EAAA,CAAA;YACL,YAAY;YACZ,WAAW;YACX,kBAAkB;YAClB,YAAY;YACZ,aAAa;YACb,2BAA2B;YAC3B,4BAA4B;AAC/B,SAAA,CAAA,EAAA,CAAA,CAAA;4FAQQ,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAjBlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,WAAW;wBACX,kBAAkB;wBAClB,YAAY;wBACZ,aAAa;wBACb,2BAA2B;wBAC3B,4BAA4B;AAC/B,qBAAA;AACD,oBAAA,YAAY,EAAE,CAAC,yBAAyB,EAAE,yBAAyB,CAAC;AACpE,oBAAA,OAAO,EAAE;wBACL,yBAAyB;wBACzB,yBAAyB;wBACzB,qBAAqB;AACxB,qBAAA;AACJ,iBAAA,CAAA;;;AC/BD;;AAEG;;;;"}
@@ -1,10 +1,10 @@
1
1
  import { __decorate } from 'tslib';
2
2
  import * as i0 from '@angular/core';
3
- import { InjectionToken, EventEmitter, ChangeDetectorRef, forwardRef, Component, ChangeDetectionStrategy, Optional, Self, Inject, ViewChild, Input, Output, HostListener, NgModule } from '@angular/core';
4
- import * as i4 from '@angular/forms';
3
+ import { InjectionToken, EventEmitter, ChangeDetectorRef, Component, ChangeDetectionStrategy, Optional, Self, Inject, ViewChild, Input, Output, HostListener, NgModule } from '@angular/core';
4
+ import * as i5 from '@angular/forms';
5
5
  import { NgControl, FormsModule } from '@angular/forms';
6
- import * as i3 from '@taiga-ui/cdk';
7
- import { getClipboardDataText, AbstractTuiControl, CHAR_PLUS, setNativeFocused, TUI_FOCUSABLE_ITEM_ACCESSOR, tuiDefaultProp, tuiPure, TuiLetModule, TuiMapperPipeModule, TuiActiveZoneModule } from '@taiga-ui/cdk';
6
+ import * as i4 from '@taiga-ui/cdk';
7
+ import { tuiGetClipboardDataText, AbstractTuiControl, CHAR_PLUS, tuiAsFocusableItemAccessor, tuiAsControl, tuiDefaultProp, tuiPure, TuiLetModule, TuiMapperPipeModule, TuiActiveZoneModule } from '@taiga-ui/cdk';
8
8
  import * as i1 from '@taiga-ui/core';
9
9
  import { TUI_NON_DIGITS_REGEXP, TUI_MASK_SYMBOLS_REGEXP, TUI_ICONS_PATH, TuiPrimitiveTextfieldComponent, TuiSvgModule, TuiGroupModule, TuiPrimitiveTextfieldModule, TuiTextfieldControllerModule, TuiHintControllerModule, TuiHostedDropdownModule, TuiDataListModule } from '@taiga-ui/core';
10
10
  import { TuiCountryIsoCode } from '@taiga-ui/i18n';
@@ -13,7 +13,7 @@ import * as i2 from '@taiga-ui/kit/components/input-phone';
13
13
  import { TuiInputPhoneComponent, TuiInputPhoneModule } from '@taiga-ui/kit/components/input-phone';
14
14
  import { FIXED_DROPDOWN_CONTROLLER_PROVIDER } from '@taiga-ui/kit/providers';
15
15
  import { TUI_COUNTRIES } from '@taiga-ui/kit/tokens';
16
- import * as i5 from '@angular/common';
16
+ import * as i3 from '@angular/common';
17
17
  import { CommonModule } from '@angular/common';
18
18
  import * as i6 from 'rxjs';
19
19
  import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
@@ -244,20 +244,13 @@ const TUI_COUNTRIES_MASKS = new InjectionToken(`Countries masks`, {
244
244
  }),
245
245
  });
246
246
 
247
- /**
248
- * @deprecated: use {@link tuiExtractValueFromEvent} instead
249
- */
250
- // eslint-disable-next-line @typescript-eslint/naming-convention
251
- function extractValueFromEvent(event) {
247
+ function tuiExtractValueFromEvent(event) {
252
248
  var _a;
253
- // TODO: iframe warning
254
- return event instanceof DragEvent
249
+ return `dataTransfer` in event
255
250
  ? ((_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.getData(`text/plain`)) || ``
256
- : getClipboardDataText(event);
251
+ : tuiGetClipboardDataText(event);
257
252
  }
258
- const tuiExtractValueFromEvent = extractValueFromEvent;
259
253
 
260
- // @dynamic
261
254
  class TuiInputPhoneInternationalComponent extends AbstractTuiControl {
262
255
  constructor(control, changeDetectorRef, iconsPath, countriesNames$, countriesMasks, options) {
263
256
  super(control, changeDetectorRef);
@@ -298,7 +291,7 @@ class TuiInputPhoneInternationalComponent extends AbstractTuiControl {
298
291
  return this.getFlagPath(this.countryIsoCode);
299
292
  }
300
293
  onPaste(event) {
301
- let value = extractValueFromEvent(event).replace(TUI_NON_DIGITS_REGEXP, ``);
294
+ let value = tuiExtractValueFromEvent(event).replace(TUI_NON_DIGITS_REGEXP, ``);
302
295
  const countryIsoCode = this.extractCountryCode(value);
303
296
  if (!countryIsoCode) {
304
297
  this.updateValue(`${this.inputPhoneCountryCode}${value}`
@@ -325,7 +318,7 @@ class TuiInputPhoneInternationalComponent extends AbstractTuiControl {
325
318
  this.updateValue(this.value.slice(0, maxLength));
326
319
  }
327
320
  if (this.nativeFocusableElement) {
328
- setNativeFocused(this.nativeFocusableElement);
321
+ this.nativeFocusableElement.focus();
329
322
  }
330
323
  }
331
324
  setDisabledState() {
@@ -371,12 +364,9 @@ class TuiInputPhoneInternationalComponent extends AbstractTuiControl {
371
364
  }
372
365
  TuiInputPhoneInternationalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiInputPhoneInternationalComponent, deps: [{ token: NgControl, optional: true, self: true }, { token: ChangeDetectorRef }, { token: TUI_ICONS_PATH }, { token: TUI_COUNTRIES }, { token: TUI_COUNTRIES_MASKS }, { token: TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS }], target: i0.ɵɵFactoryTarget.Component });
373
366
  TuiInputPhoneInternationalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiInputPhoneInternationalComponent, selector: "tui-input-phone-international", inputs: { isoCode: ["countryIsoCode", "isoCode"], countries: "countries" }, outputs: { countryIsoCodeChange: "countryIsoCodeChange" }, host: { listeners: { "paste.capture.prevent.stop": "onPaste($event)", "drop.capture.prevent.stop": "onPaste($event)" } }, providers: [
374
- {
375
- provide: TUI_FOCUSABLE_ITEM_ACCESSOR,
376
- useExisting: forwardRef(() => TuiInputPhoneInternationalComponent),
377
- },
378
- FIXED_DROPDOWN_CONTROLLER_PROVIDER,
379
- ], viewQueries: [{ propertyName: "inputPhoneComponent", first: true, predicate: TuiInputPhoneComponent, descendants: true }, { propertyName: "primitiveTextfield", first: true, predicate: TuiPrimitiveTextfieldComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<tui-hosted-dropdown\n *tuiLet=\"countriesNames$ | async as countriesNames\"\n class=\"hosted-dropdown\"\n [content]=\"dropdown\"\n [canOpen]=\"!readOnly\"\n [(open)]=\"open\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n>\n <div tuiGroup>\n <tui-primitive-textfield\n tuiHostedDropdownHost\n class=\"country-select tui-group__auto-width-item\"\n [tuiTextfieldCustomContent]=\"countryValueContent\"\n [tuiTextfieldLabelOutside]=\"true\"\n [tuiTextfieldIcon]=\"arrow\"\n [disabled]=\"disabled\"\n [focusable]=\"focusable\"\n [editable]=\"false\"\n [pseudoFocus]=\"open || null\"\n [readOnly]=\"readOnly\"\n [tuiHintContent]=\"null\"\n ></tui-primitive-textfield>\n <tui-input-phone\n tuiTextfieldAutocomplete=\"off\"\n class=\"input-phone tui-group__auto-width-item\"\n [ngModel]=\"value\"\n [disabled]=\"disabled\"\n [focusable]=\"focusable\"\n [countryCode]=\"inputPhoneCountryCode\"\n [phoneMaskAfterCountryCode]=\"phoneMaskAfterCountryCode\"\n [readOnly]=\"readOnly\"\n [pseudoInvalid]=\"computedInvalid\"\n [pseudoFocus]=\"pseudoFocus\"\n [pseudoHover]=\"pseudoHover\"\n (ngModelChange)=\"onModelChange($event)\"\n >\n <ng-content></ng-content>\n </tui-input-phone>\n </div>\n\n <ng-template #dropdown>\n <tui-data-list>\n <button\n *ngFor=\"let item of countries\"\n tuiOption\n (click)=\"onItemClick(item)\"\n >\n <img\n alt=\"\"\n class=\"country-item-flag\"\n [src]=\"getFlagPath(item)\"\n />\n <span class=\"country-item-name\">\n {{ countriesNames[item] }}\n </span>\n <span class=\"country-item-code\">\n {{ item | tuiMapper: isoToCountryCodeMapper }}\n </span>\n </button>\n </tui-data-list>\n </ng-template>\n\n <ng-template #countryValueContent>\n <img\n class=\"flag\"\n [alt]=\"countriesNames[countryIsoCode]\"\n [src]=\"countryFlagPath\"\n />\n </ng-template>\n</tui-hosted-dropdown>\n", styles: [":host{display:block}:host._disabled{pointer-events:none}.hosted-dropdown{display:block}.country-select{width:5.625rem}.country-select:not(._readonly) ::ng-deep input:not(:disabled){cursor:pointer}.country-select._readonly ::ng-deep input{cursor:default}.arrow-icon{transition-property:all;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);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}.arrow-icon:hover{color:var(--tui-text-02)}:host._readonly .arrow-icon,:host._disabled .arrow-icon{pointer-events:none}:host[data-mode=onDark] .arrow-icon{color:var(--tui-text-03-night)}:host[data-mode=onDark] .arrow-icon:hover{color:var(--tui-text-01-night)}.arrow-icon_open{transform:rotate(180deg)}.input-phone{flex:1}.flag{width:1.75rem;height:1.25rem;margin-left:-.5rem}.country-item-flag{width:1.75rem;height:1.25rem}.country-item-name{margin-left:.75rem;margin-right:auto}.country-item-code{color:var(--tui-text-02);margin-right:.25rem}\n"], components: [{ type: i1.TuiHostedDropdownComponent, selector: "tui-hosted-dropdown", inputs: ["content", "canOpen", "open"], outputs: ["openChange", "focusedChange"] }, { type: i1.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "filler", "iconCleaner", "readOnly", "invalid", "disabled", "prefix", "postfix", "value"], outputs: ["valueChange"] }, { type: i2.TuiInputPhoneComponent, selector: "tui-input-phone", inputs: ["countryCode", "phoneMaskAfterCountryCode", "allowText", "search"], outputs: ["searchChange"] }, { type: i1.TuiDataListComponent, selector: "tui-data-list", inputs: ["role", "emptyContent"] }, { type: i1.TuiOptionComponent, selector: "button[tuiOption], a[tuiOption]", inputs: ["size", "role", "disabled", "value"] }], directives: [{ type: i3.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { type: i3.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { type: i1.TuiGroupDirective, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "adaptive", "collapsed", "rounded", "size"] }, { type: i1.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { type: i1.TuiHostedDropdownConnectorDirective, selector: "[tuiHostedDropdownHost]" }, { type: i1.TuiTextfieldCustomContentDirective, selector: "[tuiTextfieldCustomContent]", inputs: ["tuiTextfieldCustomContent"] }, { type: i1.TuiTextfieldLabelOutsideDirective, selector: "[tuiTextfieldLabelOutside]", inputs: ["tuiTextfieldLabelOutside"] }, { type: i1.TuiTextfieldIconDirective, selector: "[tuiTextfieldIcon]", inputs: ["tuiTextfieldIcon"] }, { type: i1.TuiHintControllerDirective, selector: "[tuiHintContent]", inputs: ["tuiHintContent", "tuiHintDirection", "tuiHintMode", "tuiHintShowDelay", "tuiHintHideDelay"] }, { type: i2.TuiInputPhoneDirective, selector: "tui-input-phone" }, { type: i1.TuiTextfieldAutocompleteDirective, selector: "[tuiTextfieldAutocomplete]", inputs: ["tuiTextfieldAutocomplete"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i5.AsyncPipe, "tuiMapper": i3.TuiMapperPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
367
+ tuiAsFocusableItemAccessor(TuiInputPhoneInternationalComponent),
368
+ tuiAsControl(TuiInputPhoneInternationalComponent),
369
+ ], viewQueries: [{ propertyName: "inputPhoneComponent", first: true, predicate: TuiInputPhoneComponent, descendants: true }, { propertyName: "primitiveTextfield", first: true, predicate: TuiPrimitiveTextfieldComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<tui-hosted-dropdown\n *ngIf=\"countriesNames$ | async as countriesNames\"\n class=\"t-hosted-dropdown\"\n [content]=\"dropdown\"\n [canOpen]=\"!readOnly\"\n [(open)]=\"open\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n>\n <div tuiGroup>\n <tui-primitive-textfield\n class=\"t-country-select tui-group__auto-width-item\"\n [tuiTextfieldCustomContent]=\"countryValueContent\"\n [tuiTextfieldLabelOutside]=\"true\"\n [tuiTextfieldIcon]=\"arrow\"\n [disabled]=\"disabled\"\n [focusable]=\"focusable\"\n [editable]=\"false\"\n [pseudoFocus]=\"open || null\"\n [readOnly]=\"readOnly\"\n [tuiHintContent]=\"null\"\n ></tui-primitive-textfield>\n <tui-input-phone\n tuiTextfieldAutocomplete=\"off\"\n class=\"t-input-phone tui-group__auto-width-item\"\n [ngModel]=\"value\"\n [disabled]=\"disabled\"\n [focusable]=\"focusable\"\n [countryCode]=\"inputPhoneCountryCode\"\n [phoneMaskAfterCountryCode]=\"phoneMaskAfterCountryCode\"\n [readOnly]=\"readOnly\"\n [pseudoInvalid]=\"computedInvalid\"\n [pseudoFocus]=\"pseudoFocus\"\n [pseudoHover]=\"pseudoHover\"\n (ngModelChange)=\"onModelChange($event)\"\n >\n <ng-content></ng-content>\n </tui-input-phone>\n </div>\n\n <ng-template #dropdown>\n <tui-data-list>\n <button\n *ngFor=\"let item of countries\"\n tuiOption\n (click)=\"onItemClick(item)\"\n >\n <img\n alt=\"\"\n class=\"t-country-item-flag\"\n [src]=\"getFlagPath(item)\"\n />\n <span class=\"t-country-item-name\">\n {{ countriesNames[item] }}\n </span>\n <span class=\"t-country-item-code\">\n {{ item | tuiMapper: isoToCountryCodeMapper }}\n </span>\n </button>\n </tui-data-list>\n </ng-template>\n\n <ng-template #countryValueContent>\n <img\n class=\"t-flag\"\n [alt]=\"countriesNames[countryIsoCode]\"\n [src]=\"countryFlagPath\"\n />\n </ng-template>\n</tui-hosted-dropdown>\n", styles: [":host{display:block}:host._disabled{pointer-events:none}.t-hosted-dropdown{display:block}.t-country-select{width:5.625rem}.t-country-select:not(._readonly) ::ng-deep input:not(:disabled){cursor:pointer}.t-country-select._readonly ::ng-deep input{cursor:default}.t-arrow-icon{transition-property:all;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);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}.t-arrow-icon:hover{color:var(--tui-text-02)}:host._readonly .t-arrow-icon,:host._disabled .t-arrow-icon{pointer-events:none}:host[data-mode=onDark] .t-arrow-icon{color:var(--tui-text-03-night)}:host[data-mode=onDark] .t-arrow-icon:hover{color:var(--tui-text-01-night)}.t-arrow-icon_open{transform:rotate(180deg)}.t-input-phone{flex:1}.t-flag{width:1.75rem;height:1.25rem;margin-left:-.5rem}.t-country-item-flag{width:1.75rem;height:1.25rem}.t-country-item-name{margin-left:.75rem;margin-right:auto}.t-country-item-code{color:var(--tui-text-02);margin-right:.25rem}\n"], components: [{ type: i1.TuiHostedDropdownComponent, selector: "tui-hosted-dropdown", inputs: ["content", "canOpen", "open"], outputs: ["openChange", "focusedChange"] }, { type: i1.TuiPrimitiveTextfieldComponent, selector: "tui-primitive-textfield", inputs: ["editable", "filler", "iconCleaner", "readOnly", "invalid", "disabled", "prefix", "postfix", "value"], outputs: ["valueChange"] }, { type: i2.TuiInputPhoneComponent, selector: "tui-input-phone", inputs: ["countryCode", "phoneMaskAfterCountryCode", "allowText", "search"], outputs: ["searchChange"] }, { type: i1.TuiDataListComponent, selector: "tui-data-list", inputs: ["role", "emptyContent"] }, { type: i1.TuiOptionComponent, selector: "button[tuiOption], a[tuiOption]", inputs: ["size", "role", "disabled", "value"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { type: i1.TuiGroupDirective, selector: "[tuiGroup]:not(ng-container)", inputs: ["orientation", "adaptive", "collapsed", "rounded", "size"] }, { type: i1.TuiPrimitiveTextfieldDirective, selector: "tui-primitive-textfield" }, { type: i1.TuiTextfieldCustomContentDirective, selector: "[tuiTextfieldCustomContent]", inputs: ["tuiTextfieldCustomContent"] }, { type: i1.TuiTextfieldLabelOutsideDirective, selector: "[tuiTextfieldLabelOutside]", inputs: ["tuiTextfieldLabelOutside"] }, { type: i1.TuiTextfieldIconDirective, selector: "[tuiTextfieldIcon]", inputs: ["tuiTextfieldIcon"] }, { type: i1.TuiHintControllerDirective, selector: "[tuiHintContent]", inputs: ["tuiHintContent", "tuiHintDirection", "tuiHintAppearance", "tuiHintShowDelay", "tuiHintHideDelay"] }, { type: i2.TuiInputPhoneDirective, selector: "tui-input-phone" }, { type: i1.TuiTextfieldAutocompleteDirective, selector: "[tuiTextfieldAutocomplete]", inputs: ["tuiTextfieldAutocomplete"] }, { type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i3.AsyncPipe, "tuiMapper": i4.TuiMapperPipe }, viewProviders: [FIXED_DROPDOWN_CONTROLLER_PROVIDER], changeDetection: i0.ChangeDetectionStrategy.OnPush });
380
370
  __decorate([
381
371
  tuiDefaultProp()
382
372
  ], TuiInputPhoneInternationalComponent.prototype, "isoCode", null);
@@ -391,14 +381,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
391
381
  styleUrls: [`./input-phone-international.style.less`],
392
382
  changeDetection: ChangeDetectionStrategy.OnPush,
393
383
  providers: [
394
- {
395
- provide: TUI_FOCUSABLE_ITEM_ACCESSOR,
396
- useExisting: forwardRef(() => TuiInputPhoneInternationalComponent),
397
- },
398
- FIXED_DROPDOWN_CONTROLLER_PROVIDER,
384
+ tuiAsFocusableItemAccessor(TuiInputPhoneInternationalComponent),
385
+ tuiAsControl(TuiInputPhoneInternationalComponent),
399
386
  ],
387
+ viewProviders: [FIXED_DROPDOWN_CONTROLLER_PROVIDER],
400
388
  }]
401
- }], ctorParameters: function () { return [{ type: i4.NgControl, decorators: [{
389
+ }], ctorParameters: function () { return [{ type: i5.NgControl, decorators: [{
402
390
  type: Optional
403
391
  }, {
404
392
  type: Self
@@ -505,5 +493,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
505
493
  * Generated bundle index. Do not edit.
506
494
  */
507
495
 
508
- export { MASK_AFTER_CODE_REGEXP, TUI_COUNTRIES_MASKS, TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS, TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS, TuiInputPhoneInternationalComponent, TuiInputPhoneInternationalModule, extractValueFromEvent, tuiExtractValueFromEvent, tuiInputPhoneInternationalOptionsProvider };
496
+ export { MASK_AFTER_CODE_REGEXP, TUI_COUNTRIES_MASKS, TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS, TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS, TuiInputPhoneInternationalComponent, TuiInputPhoneInternationalModule, tuiExtractValueFromEvent, tuiInputPhoneInternationalOptionsProvider };
509
497
  //# sourceMappingURL=taiga-ui-kit-components-input-phone-international.js.map