@taiga-ui/kit 4.52.0-canary.24b31eb → 4.52.0-canary.2d877cf

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 (390) hide show
  1. package/README.md +1 -1
  2. package/components/action-bar/action-bar.component.d.ts +5 -7
  3. package/components/action-bar/index.d.ts +0 -2
  4. package/components/badge/badge.options.d.ts +1 -3
  5. package/components/badge-notification/badge-notification.options.d.ts +1 -3
  6. package/components/block/block.options.d.ts +1 -3
  7. package/components/breadcrumbs/breadcrumbs.options.d.ts +1 -3
  8. package/components/calendar-month/calendar-month.component.d.ts +1 -1
  9. package/components/calendar-range/calendar-range.component.d.ts +1 -2
  10. package/components/chip/chip.options.d.ts +1 -3
  11. package/components/combo-box/combo-box.d.ts +5 -0
  12. package/components/combo-box/combo-box.directive.d.ts +5 -5
  13. package/components/combo-box/index.d.ts +1 -0
  14. package/components/confirm/confirm.component.d.ts +5 -4
  15. package/components/confirm/confirm.service.d.ts +1 -1
  16. package/components/copy/copy.component.d.ts +2 -2
  17. package/components/copy/copy.directive.d.ts +3 -4
  18. package/components/data-list-wrapper/data-list-group-wrapper.component.d.ts +4 -2
  19. package/components/data-list-wrapper/data-list-wrapper.component.d.ts +14 -22
  20. package/components/data-list-wrapper/{data-list-wrapper.module.d.ts → data-list-wrapper.d.ts} +1 -2
  21. package/components/data-list-wrapper/index.d.ts +1 -1
  22. package/components/files/file/file.options.d.ts +1 -1
  23. package/components/files/files/files.component.d.ts +2 -2
  24. package/components/files/input-files/input-files.options.d.ts +1 -3
  25. package/components/index.d.ts +0 -4
  26. package/components/input-chip/input-chip.component.d.ts +9 -8
  27. package/components/input-chip/input-chip.d.ts +5 -1
  28. package/components/input-chip/input-chip.directive.d.ts +7 -12
  29. package/components/input-color/index.d.ts +1 -0
  30. package/components/input-color/input-color.component.d.ts +4 -4
  31. package/components/input-color/input-color.d.ts +5 -0
  32. package/components/input-date/input-date.d.ts +4 -1
  33. package/components/input-date/input-date.directive.d.ts +12 -14
  34. package/components/input-date/input-date.options.d.ts +3 -3
  35. package/components/input-date-multi/input-date-multi.d.ts +1 -2
  36. package/components/input-date-multi/input-date-multi.directive.d.ts +10 -14
  37. package/components/input-date-range/input-date-range.d.ts +4 -1
  38. package/components/input-date-range/input-date-range.directive.d.ts +5 -8
  39. package/components/input-date-range/input-date-range.options.d.ts +2 -2
  40. package/components/input-date-time/input-date-time.d.ts +4 -1
  41. package/components/input-date-time/input-date-time.directive.d.ts +6 -6
  42. package/components/input-date-time/input-date-time.options.d.ts +2 -2
  43. package/components/input-month/input-month.d.ts +4 -1
  44. package/components/input-month/input-month.directive.d.ts +6 -5
  45. package/components/input-month-range/input-month-range.d.ts +4 -1
  46. package/components/input-month-range/input-month-range.directive.d.ts +6 -5
  47. package/components/input-number/input-number.d.ts +4 -1
  48. package/components/input-number/input-number.directive.d.ts +7 -11
  49. package/components/input-number/step/input-number-step.component.d.ts +1 -1
  50. package/components/input-phone/index.d.ts +1 -0
  51. package/components/input-phone/input-phone.d.ts +5 -0
  52. package/components/input-phone/input-phone.directive.d.ts +7 -7
  53. package/components/input-phone-international/index.d.ts +1 -0
  54. package/components/input-phone-international/input-phone-international.component.d.ts +11 -11
  55. package/components/input-phone-international/input-phone-international.d.ts +5 -0
  56. package/components/input-phone-international/input-phone-international.options.d.ts +1 -3
  57. package/components/input-pin/index.d.ts +1 -0
  58. package/components/input-pin/input-pin.component.d.ts +4 -4
  59. package/components/input-pin/input-pin.d.ts +5 -0
  60. package/components/input-range/input-range.component.d.ts +4 -7
  61. package/components/input-slider/input-slider.d.ts +4 -1
  62. package/components/input-slider/input-slider.directive.d.ts +1 -2
  63. package/components/input-time/input-time.component.d.ts +1 -3
  64. package/components/input-time/input-time.d.ts +4 -1
  65. package/components/input-time/input-time.directive.d.ts +8 -10
  66. package/components/input-year/input-year.d.ts +4 -1
  67. package/components/input-year/input-year.directive.d.ts +5 -5
  68. package/components/input-year/input-year.options.d.ts +2 -2
  69. package/components/like/like.options.d.ts +1 -1
  70. package/components/line-clamp/line-clamp-box.component.d.ts +1 -1
  71. package/components/line-clamp/line-clamp.component.d.ts +8 -10
  72. package/components/line-clamp/line-clamp.options.d.ts +1 -3
  73. package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +5 -7
  74. package/components/multi-select/multi-select-option/multi-select-option.component.d.ts +1 -1
  75. package/components/notification-middle/notification-middle.component.d.ts +2 -2
  76. package/components/notification-middle/notification-middle.directive.d.ts +4 -3
  77. package/components/notification-middle/notification-middle.service.d.ts +7 -3
  78. package/components/pagination/index.d.ts +1 -0
  79. package/components/pagination/pagination.component.d.ts +25 -54
  80. package/components/pagination/pagination.options.d.ts +7 -0
  81. package/components/preview/dialog/preview-dialog.component.d.ts +2 -2
  82. package/components/preview/dialog/preview-dialog.directive.d.ts +3 -3
  83. package/components/preview/dialog/preview-dialog.service.d.ts +5 -2
  84. package/components/preview/index.d.ts +1 -0
  85. package/components/preview/pagination/preview-pagination.component.d.ts +3 -2
  86. package/components/preview/preview.component.d.ts +2 -2
  87. package/components/preview/preview.d.ts +2 -1
  88. package/{tokens/preview-icons.d.ts → components/preview/preview.options.d.ts} +1 -3
  89. package/components/preview/zoom/preview-zoom.component.d.ts +4 -2
  90. package/components/progress/progress-bar/progress-color-segments.directive.d.ts +4 -4
  91. package/components/progress/progress.options.d.ts +1 -3
  92. package/components/push/push-alert.component.d.ts +4 -3
  93. package/components/push/push.component.d.ts +1 -1
  94. package/components/push/push.directive.d.ts +4 -6
  95. package/components/push/push.options.d.ts +5 -8
  96. package/components/push/push.service.d.ts +6 -2
  97. package/components/radio/radio.component.d.ts +1 -1
  98. package/components/radio-list/radio-list.component.d.ts +5 -3
  99. package/components/range/range-change.directive.d.ts +1 -2
  100. package/components/range/range.component.d.ts +16 -24
  101. package/components/rating/rating.component.d.ts +1 -1
  102. package/components/rating/rating.options.d.ts +1 -3
  103. package/components/routable-dialog/generate-dialogable-route.d.ts +1 -1
  104. package/components/segmented/segmented.component.d.ts +4 -6
  105. package/components/segmented/segmented.directive.d.ts +6 -7
  106. package/components/select/native-select/native-select.component.d.ts +7 -8
  107. package/components/select/select.d.ts +4 -1
  108. package/components/select/select.directive.d.ts +4 -3
  109. package/components/slider/helpers/key-steps.d.ts +1 -2
  110. package/components/slider/helpers/slider-key-steps.directive.d.ts +12 -21
  111. package/components/slider/slider.options.d.ts +1 -6
  112. package/components/stepper/step.component.d.ts +6 -8
  113. package/components/stepper/stepper.component.d.ts +6 -11
  114. package/components/switch/switch.component.d.ts +1 -0
  115. package/components/tabs/tabs-with-more.component.d.ts +1 -1
  116. package/components/tabs/tabs.options.d.ts +1 -6
  117. package/components/textarea/index.d.ts +2 -1
  118. package/components/textarea/textarea.component.d.ts +4 -4
  119. package/components/textarea/textarea.d.ts +6 -0
  120. package/components/textarea/textarea.directive.d.ts +13 -0
  121. package/components/toast/toast.component.d.ts +4 -3
  122. package/components/toast/toast.options.d.ts +9 -7
  123. package/components/toast/toast.service.d.ts +10 -9
  124. package/components/tree/components/tree-item-content/tree-item-content.component.d.ts +8 -1
  125. package/components/tree/misc/tree.constants.d.ts +0 -3
  126. package/components/tree/misc/tree.tokens.d.ts +1 -6
  127. package/directives/button-close/button-close.directive.d.ts +2 -1
  128. package/directives/button-select/button-select.directive.d.ts +4 -4
  129. package/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.d.ts +5 -5
  130. package/directives/fade/fade.directive.d.ts +1 -2
  131. package/directives/fluid-typography/fluid-typography.directive.d.ts +3 -6
  132. package/directives/fluid-typography/fluid-typography.options.d.ts +1 -3
  133. package/directives/index.d.ts +0 -1
  134. package/directives/password/password.directive.d.ts +1 -1
  135. package/directives/tooltip/tooltip.directive.d.ts +1 -1
  136. package/fesm2022/taiga-ui-kit-components-accordion.mjs +7 -8
  137. package/fesm2022/taiga-ui-kit-components-accordion.mjs.map +1 -1
  138. package/fesm2022/taiga-ui-kit-components-action-bar.mjs +22 -38
  139. package/fesm2022/taiga-ui-kit-components-action-bar.mjs.map +1 -1
  140. package/fesm2022/taiga-ui-kit-components-avatar.mjs +20 -20
  141. package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
  142. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +7 -12
  143. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
  144. package/fesm2022/taiga-ui-kit-components-badge.mjs +11 -15
  145. package/fesm2022/taiga-ui-kit-components-badge.mjs.map +1 -1
  146. package/fesm2022/taiga-ui-kit-components-badged-content.mjs +6 -7
  147. package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
  148. package/fesm2022/taiga-ui-kit-components-block.mjs +10 -14
  149. package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
  150. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs +12 -18
  151. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs.map +1 -1
  152. package/fesm2022/taiga-ui-kit-components-button-loading.mjs +6 -6
  153. package/fesm2022/taiga-ui-kit-components-button-loading.mjs.map +1 -1
  154. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +6 -17
  155. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
  156. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +7 -8
  157. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
  158. package/fesm2022/taiga-ui-kit-components-carousel.mjs +17 -23
  159. package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
  160. package/fesm2022/taiga-ui-kit-components-checkbox.mjs +5 -6
  161. package/fesm2022/taiga-ui-kit-components-checkbox.mjs.map +1 -1
  162. package/fesm2022/taiga-ui-kit-components-chip.mjs +11 -15
  163. package/fesm2022/taiga-ui-kit-components-chip.mjs.map +1 -1
  164. package/fesm2022/taiga-ui-kit-components-combo-box.mjs +42 -32
  165. package/fesm2022/taiga-ui-kit-components-combo-box.mjs.map +1 -1
  166. package/fesm2022/taiga-ui-kit-components-comment.mjs +6 -6
  167. package/fesm2022/taiga-ui-kit-components-comment.mjs.map +1 -1
  168. package/fesm2022/taiga-ui-kit-components-compass.mjs +5 -5
  169. package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
  170. package/fesm2022/taiga-ui-kit-components-confirm.mjs +11 -14
  171. package/fesm2022/taiga-ui-kit-components-confirm.mjs.map +1 -1
  172. package/fesm2022/taiga-ui-kit-components-copy.mjs +19 -25
  173. package/fesm2022/taiga-ui-kit-components-copy.mjs.map +1 -1
  174. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +25 -78
  175. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
  176. package/fesm2022/taiga-ui-kit-components-drawer.mjs +5 -5
  177. package/fesm2022/taiga-ui-kit-components-drawer.mjs.map +1 -1
  178. package/fesm2022/taiga-ui-kit-components-files.mjs +41 -48
  179. package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
  180. package/fesm2022/taiga-ui-kit-components-filter.mjs +4 -4
  181. package/fesm2022/taiga-ui-kit-components-filter.mjs.map +1 -1
  182. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs +3 -3
  183. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs.map +1 -1
  184. package/fesm2022/taiga-ui-kit-components-input-chip.mjs +69 -74
  185. package/fesm2022/taiga-ui-kit-components-input-chip.mjs.map +1 -1
  186. package/fesm2022/taiga-ui-kit-components-input-color.mjs +24 -13
  187. package/fesm2022/taiga-ui-kit-components-input-color.mjs.map +1 -1
  188. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs +36 -53
  189. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs.map +1 -1
  190. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs +31 -36
  191. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs.map +1 -1
  192. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs +34 -31
  193. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs.map +1 -1
  194. package/fesm2022/taiga-ui-kit-components-input-date.mjs +50 -53
  195. package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -1
  196. package/fesm2022/taiga-ui-kit-components-input-inline.mjs +4 -5
  197. package/fesm2022/taiga-ui-kit-components-input-inline.mjs.map +1 -1
  198. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs +30 -27
  199. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs.map +1 -1
  200. package/fesm2022/taiga-ui-kit-components-input-month.mjs +36 -27
  201. package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
  202. package/fesm2022/taiga-ui-kit-components-input-number.mjs +54 -72
  203. package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
  204. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +51 -43
  205. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
  206. package/fesm2022/taiga-ui-kit-components-input-phone.mjs +32 -23
  207. package/fesm2022/taiga-ui-kit-components-input-phone.mjs.map +1 -1
  208. package/fesm2022/taiga-ui-kit-components-input-pin.mjs +18 -9
  209. package/fesm2022/taiga-ui-kit-components-input-pin.mjs.map +1 -1
  210. package/fesm2022/taiga-ui-kit-components-input-range.mjs +9 -16
  211. package/fesm2022/taiga-ui-kit-components-input-range.mjs.map +1 -1
  212. package/fesm2022/taiga-ui-kit-components-input-slider.mjs +24 -25
  213. package/fesm2022/taiga-ui-kit-components-input-slider.mjs.map +1 -1
  214. package/fesm2022/taiga-ui-kit-components-input-time.mjs +64 -70
  215. package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
  216. package/fesm2022/taiga-ui-kit-components-input-year.mjs +29 -21
  217. package/fesm2022/taiga-ui-kit-components-input-year.mjs.map +1 -1
  218. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +14 -16
  219. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs.map +1 -1
  220. package/fesm2022/taiga-ui-kit-components-like.mjs +4 -4
  221. package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -1
  222. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +36 -78
  223. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
  224. package/fesm2022/taiga-ui-kit-components-message.mjs +6 -7
  225. package/fesm2022/taiga-ui-kit-components-message.mjs.map +1 -1
  226. package/fesm2022/taiga-ui-kit-components-multi-select.mjs +34 -46
  227. package/fesm2022/taiga-ui-kit-components-multi-select.mjs.map +1 -1
  228. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs +36 -25
  229. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs.map +1 -1
  230. package/fesm2022/taiga-ui-kit-components-pager.mjs +6 -8
  231. package/fesm2022/taiga-ui-kit-components-pager.mjs.map +1 -1
  232. package/fesm2022/taiga-ui-kit-components-pagination.mjs +67 -138
  233. package/fesm2022/taiga-ui-kit-components-pagination.mjs.map +1 -1
  234. package/fesm2022/taiga-ui-kit-components-pin.mjs +7 -7
  235. package/fesm2022/taiga-ui-kit-components-pin.mjs.map +1 -1
  236. package/fesm2022/taiga-ui-kit-components-preview.mjs +72 -52
  237. package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
  238. package/fesm2022/taiga-ui-kit-components-progress.mjs +64 -56
  239. package/fesm2022/taiga-ui-kit-components-progress.mjs.map +1 -1
  240. package/fesm2022/taiga-ui-kit-components-pulse.mjs +4 -4
  241. package/fesm2022/taiga-ui-kit-components-pulse.mjs.map +1 -1
  242. package/fesm2022/taiga-ui-kit-components-push.mjs +49 -57
  243. package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
  244. package/fesm2022/taiga-ui-kit-components-radio-list.mjs +8 -8
  245. package/fesm2022/taiga-ui-kit-components-radio-list.mjs.map +1 -1
  246. package/fesm2022/taiga-ui-kit-components-radio.mjs +8 -9
  247. package/fesm2022/taiga-ui-kit-components-radio.mjs.map +1 -1
  248. package/fesm2022/taiga-ui-kit-components-range.mjs +41 -85
  249. package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
  250. package/fesm2022/taiga-ui-kit-components-rating.mjs +7 -12
  251. package/fesm2022/taiga-ui-kit-components-rating.mjs.map +1 -1
  252. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs +11 -7
  253. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs.map +1 -1
  254. package/fesm2022/taiga-ui-kit-components-segmented.mjs +32 -59
  255. package/fesm2022/taiga-ui-kit-components-segmented.mjs.map +1 -1
  256. package/fesm2022/taiga-ui-kit-components-select.mjs +82 -62
  257. package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
  258. package/fesm2022/taiga-ui-kit-components-slider.mjs +73 -81
  259. package/fesm2022/taiga-ui-kit-components-slider.mjs.map +1 -1
  260. package/fesm2022/taiga-ui-kit-components-status.mjs +6 -6
  261. package/fesm2022/taiga-ui-kit-components-status.mjs.map +1 -1
  262. package/fesm2022/taiga-ui-kit-components-stepper.mjs +45 -79
  263. package/fesm2022/taiga-ui-kit-components-stepper.mjs.map +1 -1
  264. package/fesm2022/taiga-ui-kit-components-switch.mjs +10 -6
  265. package/fesm2022/taiga-ui-kit-components-switch.mjs.map +1 -1
  266. package/fesm2022/taiga-ui-kit-components-tabs.mjs +28 -36
  267. package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
  268. package/fesm2022/taiga-ui-kit-components-textarea.mjs +54 -62
  269. package/fesm2022/taiga-ui-kit-components-textarea.mjs.map +1 -1
  270. package/fesm2022/taiga-ui-kit-components-tiles.mjs +14 -15
  271. package/fesm2022/taiga-ui-kit-components-tiles.mjs.map +1 -1
  272. package/fesm2022/taiga-ui-kit-components-toast.mjs +51 -53
  273. package/fesm2022/taiga-ui-kit-components-toast.mjs.map +1 -1
  274. package/fesm2022/taiga-ui-kit-components-tree.mjs +56 -60
  275. package/fesm2022/taiga-ui-kit-components-tree.mjs.map +1 -1
  276. package/fesm2022/taiga-ui-kit-components.mjs +0 -4
  277. package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
  278. package/fesm2022/taiga-ui-kit-directives-button-close.mjs +15 -7
  279. package/fesm2022/taiga-ui-kit-directives-button-close.mjs.map +1 -1
  280. package/fesm2022/taiga-ui-kit-directives-button-group.mjs +6 -6
  281. package/fesm2022/taiga-ui-kit-directives-button-group.mjs.map +1 -1
  282. package/fesm2022/taiga-ui-kit-directives-button-select.mjs +20 -19
  283. package/fesm2022/taiga-ui-kit-directives-button-select.mjs.map +1 -1
  284. package/fesm2022/taiga-ui-kit-directives-chevron.mjs +9 -8
  285. package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
  286. package/fesm2022/taiga-ui-kit-directives-connected.mjs +6 -7
  287. package/fesm2022/taiga-ui-kit-directives-connected.mjs.map +1 -1
  288. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs +25 -53
  289. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs.map +1 -1
  290. package/fesm2022/taiga-ui-kit-directives-fade.mjs +12 -11
  291. package/fesm2022/taiga-ui-kit-directives-fade.mjs.map +1 -1
  292. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs +14 -27
  293. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs.map +1 -1
  294. package/fesm2022/taiga-ui-kit-directives-highlight.mjs +3 -4
  295. package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
  296. package/fesm2022/taiga-ui-kit-directives-password.mjs +12 -14
  297. package/fesm2022/taiga-ui-kit-directives-password.mjs.map +1 -1
  298. package/fesm2022/taiga-ui-kit-directives-present.mjs +3 -4
  299. package/fesm2022/taiga-ui-kit-directives-present.mjs.map +1 -1
  300. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs +6 -6
  301. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs.map +1 -1
  302. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs +6 -6
  303. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs.map +1 -1
  304. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs +7 -6
  305. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs.map +1 -1
  306. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs +11 -11
  307. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs.map +1 -1
  308. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs +5 -6
  309. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs.map +1 -1
  310. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs +4 -5
  311. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs.map +1 -1
  312. package/fesm2022/taiga-ui-kit-directives.mjs +0 -1
  313. package/fesm2022/taiga-ui-kit-directives.mjs.map +1 -1
  314. package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs +43 -0
  315. package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs.map +1 -0
  316. package/fesm2022/taiga-ui-kit-pipes-emails.mjs +3 -4
  317. package/fesm2022/taiga-ui-kit-pipes-emails.mjs.map +1 -1
  318. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +12 -25
  319. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
  320. package/fesm2022/taiga-ui-kit-pipes-flag.mjs +30 -0
  321. package/fesm2022/taiga-ui-kit-pipes-flag.mjs.map +1 -0
  322. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs +4 -5
  323. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs.map +1 -1
  324. package/fesm2022/taiga-ui-kit-pipes-initials.mjs +28 -0
  325. package/fesm2022/taiga-ui-kit-pipes-initials.mjs.map +1 -0
  326. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs +10 -8
  327. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs.map +1 -1
  328. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs +3 -4
  329. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs.map +1 -1
  330. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs +3 -4
  331. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs.map +1 -1
  332. package/fesm2022/taiga-ui-kit-pipes.mjs +3 -0
  333. package/fesm2022/taiga-ui-kit-pipes.mjs.map +1 -1
  334. package/fesm2022/taiga-ui-kit-tokens.mjs +2 -98
  335. package/fesm2022/taiga-ui-kit-tokens.mjs.map +1 -1
  336. package/fesm2022/taiga-ui-kit-utils.mjs +2 -14
  337. package/fesm2022/taiga-ui-kit-utils.mjs.map +1 -1
  338. package/package.json +50 -58
  339. package/pipes/auto-color/auto-color.pipe.d.ts +13 -0
  340. package/pipes/auto-color/index.d.ts +1 -0
  341. package/pipes/filter-by-input/filter-by-input.pipe.d.ts +2 -2
  342. package/pipes/flag/flag.pipe.d.ts +14 -0
  343. package/pipes/flag/index.d.ts +1 -0
  344. package/pipes/index.d.ts +3 -0
  345. package/pipes/initials/index.d.ts +1 -0
  346. package/pipes/initials/initials.pipe.d.ts +7 -0
  347. package/pipes/sort-countries/sort-countries.pipe.d.ts +4 -3
  348. package/pipes/stringify-content/stringify-content.pipe.d.ts +2 -3
  349. package/styles/components/badge.less +1 -0
  350. package/styles/components/chip.less +12 -1
  351. package/tokens/i18n.d.ts +25 -26
  352. package/tokens/index.d.ts +0 -6
  353. package/utils/index.d.ts +0 -2
  354. package/components/action-bar/action-bar.d.ts +0 -3
  355. package/components/action-bar/action-bar.directive.d.ts +0 -6
  356. package/components/elastic-container/elastic-container.component.d.ts +0 -8
  357. package/components/elastic-container/elastic-container.directive.d.ts +0 -7
  358. package/components/elastic-container/index.d.ts +0 -2
  359. package/components/floating-container/floating-container.directive.d.ts +0 -7
  360. package/components/floating-container/index.d.ts +0 -1
  361. package/components/pdf-viewer/index.d.ts +0 -4
  362. package/components/pdf-viewer/pdf-viewer.component.d.ts +0 -12
  363. package/components/pdf-viewer/pdf-viewer.directive.d.ts +0 -7
  364. package/components/pdf-viewer/pdf-viewer.options.d.ts +0 -13
  365. package/components/pdf-viewer/pdf-viewer.service.d.ts +0 -13
  366. package/components/slides/index.d.ts +0 -1
  367. package/components/slides/slides.directive.d.ts +0 -11
  368. package/components/textarea/textarea-limit.directive.d.ts +0 -27
  369. package/directives/lazy-loading/index.d.ts +0 -2
  370. package/directives/lazy-loading/lazy-loading.directive.d.ts +0 -18
  371. package/directives/lazy-loading/lazy-loading.service.d.ts +0 -12
  372. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs +0 -78
  373. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs.map +0 -1
  374. package/fesm2022/taiga-ui-kit-components-floating-container.mjs +0 -37
  375. package/fesm2022/taiga-ui-kit-components-floating-container.mjs.map +0 -1
  376. package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs +0 -83
  377. package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs.map +0 -1
  378. package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs +0 -64
  379. package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs.map +0 -1
  380. package/fesm2022/taiga-ui-kit-components-slides.mjs +0 -49
  381. package/fesm2022/taiga-ui-kit-components-slides.mjs.map +0 -1
  382. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs +0 -81
  383. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs.map +0 -1
  384. package/tokens/date-inputs-value-transformers.d.ts +0 -19
  385. package/tokens/input-date-options.d.ts +0 -15
  386. package/tokens/items-handlers.d.ts +0 -26
  387. package/tokens/mobile-calendar.d.ts +0 -6
  388. package/tokens/month-formatter.d.ts +0 -5
  389. package/utils/phone.d.ts +0 -3
  390. package/utils/toggle-day.d.ts +0 -2
@@ -1,23 +1,23 @@
1
+ import { TuiLabel } from '@taiga-ui/core/components/label';
2
+ import * as i1$1 from '@taiga-ui/core/components/textfield';
3
+ import { tuiTextfieldIcon, TuiTextfieldComponent, TuiWithNativePicker, tuiAsTextfieldAccessor, TuiTextfieldContent, TuiTextfieldOptionsDirective } from '@taiga-ui/core/components/textfield';
4
+ import { TuiDropdownContent } from '@taiga-ui/core/portals';
1
5
  import * as i0 from '@angular/core';
2
- import { inject, signal, computed, untracked, Input, Directive, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
6
+ import { inject, computed, input, untracked, Directive, HostAttributeToken, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
7
  import { TuiControl, tuiAsControl, tuiValueTransformerFrom } from '@taiga-ui/cdk/classes';
4
8
  import { TuiTime } from '@taiga-ui/cdk/date-time';
5
- import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
6
- import * as i1 from '@taiga-ui/core/components/textfield';
7
- import { TuiTextfieldDirective, tuiTextfieldIcon, TuiTextfieldComponent, TuiWithNativePicker, tuiAsTextfieldAccessor, TuiWithTextfield, TuiTextfieldContent } from '@taiga-ui/core/components/textfield';
8
- import { toSignal } from '@angular/core/rxjs-interop';
9
9
  import * as i2 from '@maskito/angular';
10
10
  import { MaskitoDirective } from '@maskito/angular';
11
11
  import { maskitoTimeOptionsGenerator, maskitoSelectionChangeHandler, maskitoCaretGuard, maskitoAddOnFocusPlugin, maskitoRemoveOnBlurPlugin } from '@maskito/kit';
12
12
  import { TUI_IS_MOBILE } from '@taiga-ui/cdk/tokens';
13
- import { tuiDirectiveBinding } from '@taiga-ui/cdk/utils/miscellaneous';
13
+ import { tuiCreateOptions, tuiDirectiveBinding } from '@taiga-ui/cdk/utils/di';
14
14
  import { tuiAsOptionContent } from '@taiga-ui/core/components/data-list';
15
- import { TuiDropdownDirective, tuiDropdownOpen, tuiDropdownEnabled } from '@taiga-ui/core/directives/dropdown';
16
- import { tuiAsAuxiliary } from '@taiga-ui/core/tokens';
15
+ import * as i1 from '@taiga-ui/core/components/input';
16
+ import { TuiInputDirective, TuiWithInput } from '@taiga-ui/core/components/input';
17
+ import { TuiDropdownDirective, TuiDropdownOpen, tuiDropdownEnabled } from '@taiga-ui/core/portals/dropdown';
17
18
  import { TuiSelectOption } from '@taiga-ui/kit/components/select';
18
19
  import { TUI_TIME_TEXTS } from '@taiga-ui/kit/tokens';
19
20
  import { tuiMaskito } from '@taiga-ui/kit/utils';
20
- import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
21
21
 
22
22
  const TUI_INPUT_TIME_DEFAULT_OPTIONS = {
23
23
  icon: () => '@tui.clock',
@@ -31,46 +31,34 @@ const [TUI_INPUT_TIME_OPTIONS, tuiInputTimeOptionsProvider] = tuiCreateOptions(T
31
31
  class TuiInputTimeDirective extends TuiControl {
32
32
  constructor() {
33
33
  super(...arguments);
34
- this.textfield = inject(TuiTextfieldDirective);
34
+ this.input = inject(TuiInputDirective);
35
35
  this.dropdown = inject(TuiDropdownDirective);
36
- this.open = tuiDropdownOpen();
36
+ this.open = inject(TuiDropdownOpen).open;
37
37
  this.options = inject(TUI_INPUT_TIME_OPTIONS);
38
- this.fillers = toSignal(inject(TUI_TIME_TEXTS));
39
- this.prefix = signal('');
40
- this.postfix = signal('');
38
+ this.fillers = inject(TUI_TIME_TEXTS);
41
39
  this.icon = tuiTextfieldIcon(TUI_INPUT_TIME_OPTIONS);
42
40
  this.dropdownEnabled = tuiDropdownEnabled(computed(() => !this.native && this.interactive()));
43
- this.filler = tuiDirectiveBinding(TuiTextfieldComponent, 'fillerSetter', computed((filler = this.fillers()?.[this.timeMode()] ?? '') => this.postfix() ? '' : this.prefix() + filler), {});
41
+ this.filler = tuiDirectiveBinding(TuiTextfieldComponent, 'filler', computed((filler = this.fillers()?.[this.timeMode()] ?? '') => this.postfix() ? '' : this.prefix() + filler), {});
44
42
  this.mask = tuiMaskito(computed(() => this.computeMask({
45
43
  ...this.options,
46
44
  mode: this.timeMode(),
47
- step: this.interactive() && !this.dropdown._content() ? 1 : 0,
45
+ step: this.interactive() && !this.dropdown.content() ? 1 : 0,
48
46
  prefix: this.prefix(),
49
47
  postfix: this.postfix(),
50
48
  })));
51
- this.accept = [];
49
+ this.accept = input([]);
50
+ this.timeMode = input(this.options.mode, { alias: 'mode' });
51
+ this.prefix = input('');
52
+ this.postfix = input('');
52
53
  this.native = !!inject(TuiWithNativePicker, { optional: true }) && inject(TUI_IS_MOBILE);
53
- this.timeMode = signal(this.options.mode);
54
- }
55
- // TODO(v5): use signal inputs
56
- set modeSetter(x) {
57
- this.timeMode.set(x);
58
- }
59
- // TODO(v5): use signal inputs
60
- set prefixSetter(x) {
61
- this.prefix.set(x);
62
- }
63
- // TODO(v5): use signal inputs
64
- set postfixSetter(x) {
65
- this.postfix.set(x);
66
54
  }
67
55
  setValue(value) {
68
56
  this.onChange(value);
69
57
  if (value) {
70
- this.textfield.value.set(this.stringify(value));
58
+ this.input.value.set(this.stringify(value));
71
59
  }
72
60
  else {
73
- this.textfield.setValue(value);
61
+ this.input.setValue(value);
74
62
  }
75
63
  if (!value && this.dropdownEnabled()) {
76
64
  this.open.set(true);
@@ -81,7 +69,7 @@ class TuiInputTimeDirective extends TuiControl {
81
69
  const changed = untracked(() => value !== this.value());
82
70
  if (changed || reset) {
83
71
  super.writeValue(value);
84
- untracked(() => this.textfield.value.set(this.stringify(this.value())));
72
+ untracked(() => this.input.value.set(this.stringify(this.value())));
85
73
  }
86
74
  }
87
75
  onInput(valueWithAffixes) {
@@ -89,16 +77,34 @@ class TuiInputTimeDirective extends TuiControl {
89
77
  .replace(this.prefix(), '')
90
78
  .replace(this.postfix(), '');
91
79
  const time = value.length === this.timeMode().length ? TuiTime.fromString(value) : null;
92
- const newValue = this.accept.length && time ? this.findNearestTime(time, this.accept) : time;
80
+ const newValue = this.accept().length && time
81
+ ? this.findNearestTime(time, this.accept())
82
+ : time;
93
83
  this.control?.control?.updateValueAndValidity({ emitEvent: false });
94
84
  this.onChange(newValue);
95
85
  if (newValue && newValue !== time) {
96
- this.textfield.value.set(this.stringify(newValue));
86
+ this.input.value.set(this.stringify(newValue));
97
87
  }
98
88
  }
99
89
  toggle() {
100
90
  this.open.update((x) => !x);
101
91
  }
92
+ onBlur(valueWithAffixes) {
93
+ const value = valueWithAffixes
94
+ .replace(this.prefix(), '')
95
+ .replace(this.postfix(), '');
96
+ if (value && !this.value()) {
97
+ const time = TuiTime.fromString(value);
98
+ const newValue = this.accept().length
99
+ ? this.findNearestTime(time, this.accept())
100
+ : time;
101
+ this.control?.control?.updateValueAndValidity({ emitEvent: false });
102
+ this.onChange(newValue);
103
+ if (newValue) {
104
+ this.input.value.set(this.stringify(newValue));
105
+ }
106
+ }
107
+ }
102
108
  computeMask(params) {
103
109
  const options = maskitoTimeOptionsGenerator(params);
104
110
  const { mode, prefix, postfix } = params;
@@ -125,51 +131,38 @@ class TuiInputTimeDirective extends TuiControl {
125
131
  stringify(time) {
126
132
  return this.prefix() + (time?.toString(this.timeMode()) || '') + this.postfix();
127
133
  }
128
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputTimeDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
129
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiInputTimeDirective, isStandalone: true, selector: "input[tuiInputTime]", inputs: { accept: "accept", modeSetter: ["mode", "modeSetter"], prefixSetter: ["prefix", "prefixSetter"], postfixSetter: ["postfix", "postfixSetter"] }, host: { attributes: { "inputmode": "numeric" }, listeners: { "click": "toggle()", "input": "onInput($event.target.value)" }, properties: { "disabled": "disabled()" } }, providers: [
134
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputTimeDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
135
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiInputTimeDirective, isStandalone: true, selector: "input[tuiInputTime]", inputs: { accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, timeMode: { classPropertyName: "timeMode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, postfix: { classPropertyName: "postfix", publicName: "postfix", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "inputmode": "numeric" }, listeners: { "click": "toggle()", "input": "onInput($event.target.value)", "blur": "onBlur($event.target.value)" }, properties: { "disabled": "disabled()" } }, providers: [
130
136
  tuiAsControl(TuiInputTimeDirective),
131
137
  tuiAsTextfieldAccessor(TuiInputTimeDirective),
132
- tuiAsAuxiliary(TuiInputTimeDirective),
133
138
  tuiValueTransformerFrom(TUI_INPUT_TIME_OPTIONS),
134
139
  tuiAsOptionContent(TuiSelectOption),
135
- ], usesInheritance: true, hostDirectives: [{ directive: i1.TuiWithTextfield }, { directive: i2.MaskitoDirective }], ngImport: i0 }); }
140
+ ], usesInheritance: true, hostDirectives: [{ directive: i1.TuiWithInput }, { directive: i2.MaskitoDirective }], ngImport: i0 }); }
136
141
  }
137
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputTimeDirective, decorators: [{
142
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputTimeDirective, decorators: [{
138
143
  type: Directive,
139
144
  args: [{
140
- standalone: true,
141
145
  selector: 'input[tuiInputTime]',
142
146
  providers: [
143
147
  tuiAsControl(TuiInputTimeDirective),
144
148
  tuiAsTextfieldAccessor(TuiInputTimeDirective),
145
- tuiAsAuxiliary(TuiInputTimeDirective),
146
149
  tuiValueTransformerFrom(TUI_INPUT_TIME_OPTIONS),
147
150
  tuiAsOptionContent(TuiSelectOption),
148
151
  ],
149
- hostDirectives: [TuiWithTextfield, MaskitoDirective],
152
+ hostDirectives: [TuiWithInput, MaskitoDirective],
150
153
  host: {
151
154
  inputmode: 'numeric',
152
155
  '[disabled]': 'disabled()',
153
156
  '(click)': 'toggle()',
154
157
  '(input)': 'onInput($event.target.value)',
158
+ '(blur)': 'onBlur($event.target.value)',
155
159
  },
156
160
  }]
157
- }], propDecorators: { accept: [{
158
- type: Input
159
- }], modeSetter: [{
160
- type: Input,
161
- args: ['mode']
162
- }], prefixSetter: [{
163
- type: Input,
164
- args: ['prefix']
165
- }], postfixSetter: [{
166
- type: Input,
167
- args: ['postfix']
168
- }] } });
161
+ }] });
169
162
 
170
163
  class TuiNativeTimePicker {
171
164
  constructor() {
172
- this.list = tuiInjectElement().getAttribute('list');
165
+ this.list = inject(new HostAttributeToken('list'), { optional: true });
173
166
  }
174
167
  getStep(timeMode) {
175
168
  switch (timeMode) {
@@ -189,39 +182,40 @@ class TuiNativeTimePicker {
189
182
  const timeString = time ? time.toString('HH:MM:SS.MSS') : '';
190
183
  return dateString + timeString;
191
184
  }
192
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiNativeTimePicker, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
193
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiNativeTimePicker, isStandalone: false, host: { properties: { "attr.list": "null" } }, ngImport: i0 }); }
185
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiNativeTimePicker, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
186
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiNativeTimePicker, isStandalone: true, host: { properties: { "attr.list": "null" } }, ngImport: i0 }); }
194
187
  }
195
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiNativeTimePicker, decorators: [{
188
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiNativeTimePicker, decorators: [{
196
189
  type: Directive,
197
- args: [{
198
- standalone: false,
199
- host: {
200
- '[attr.list]': 'null',
201
- },
202
- }]
190
+ args: [{ host: { '[attr.list]': 'null' } }]
203
191
  }] });
204
192
  class TuiInputTimeComponent extends TuiNativeTimePicker {
205
193
  constructor() {
206
194
  super(...arguments);
207
195
  this.control = inject(TuiControl);
208
196
  this.host = inject(TuiInputTimeDirective);
209
- this.textfield = inject(TuiTextfieldDirective);
210
197
  this.value = computed(() => this.toISOString(this.control.value()));
211
198
  this.step = computed(() => this.getStep(this.host.timeMode()));
212
199
  }
213
200
  setValue(value) {
214
201
  this.host.setValue(TuiTime.fromString(value));
215
202
  }
216
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputTimeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
217
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiInputTimeComponent, isStandalone: true, selector: "input[tuiInputTime][type=\"time\"]", host: { attributes: { "ngSkipHydration": "true" } }, usesInheritance: true, hostDirectives: [{ directive: i1.TuiWithNativePicker }], ngImport: i0, template: "@if (host.native) {\n <input\n *tuiTextfieldContent\n type=\"time\"\n [attr.list]=\"list\"\n [step]=\"step()\"\n [value]=\"value()\"\n (change)=\"setValue($any($event.target).value)\"\n />\n}\n", styles: ["tui-textfield input[tuiInputTime]~.t-content input[type=time]{position:absolute;right:0;left:auto;inline-size:calc(var(--t-right) + var(--t-padding));opacity:0;margin:0;padding:0}tui-textfield input[tuiInputTime]~.t-content input[type=time]::-webkit-calendar-picker-indicator{position:absolute;top:0;left:0;inline-size:100%;block-size:100%}\n"], dependencies: [{ kind: "directive", type: TuiTextfieldContent, selector: "ng-template[tuiTextfieldContent]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
203
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputTimeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
204
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiInputTimeComponent, isStandalone: true, selector: "input[tuiInputTime][type=\"time\"]", host: { attributes: { "ngSkipHydration": "true" } }, usesInheritance: true, hostDirectives: [{ directive: i1$1.TuiWithNativePicker }], ngImport: i0, template: "@if (host.native) {\n <input\n *tuiTextfieldContent\n type=\"time\"\n [attr.list]=\"list\"\n [step]=\"step()\"\n [value]=\"value()\"\n (change)=\"setValue($any($event.target).value)\"\n />\n}\n", styles: ["tui-textfield input[tuiInputTime]~.t-content input[type=time]{position:absolute;right:0;left:auto;inline-size:calc(var(--t-right) + var(--t-padding));opacity:0;margin:0;padding:0}tui-textfield input[tuiInputTime]~.t-content input[type=time]::-webkit-calendar-picker-indicator{position:absolute;top:0;left:0;inline-size:100%;block-size:100%}\n"], dependencies: [{ kind: "directive", type: TuiTextfieldContent, selector: "ng-template[tuiTextfieldContent]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
218
205
  }
219
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputTimeComponent, decorators: [{
206
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputTimeComponent, decorators: [{
220
207
  type: Component,
221
208
  args: [{ selector: 'input[tuiInputTime][type="time"]', imports: [TuiTextfieldContent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [TuiWithNativePicker], host: { ngSkipHydration: 'true' }, template: "@if (host.native) {\n <input\n *tuiTextfieldContent\n type=\"time\"\n [attr.list]=\"list\"\n [step]=\"step()\"\n [value]=\"value()\"\n (change)=\"setValue($any($event.target).value)\"\n />\n}\n", styles: ["tui-textfield input[tuiInputTime]~.t-content input[type=time]{position:absolute;right:0;left:auto;inline-size:calc(var(--t-right) + var(--t-padding));opacity:0;margin:0;padding:0}tui-textfield input[tuiInputTime]~.t-content input[type=time]::-webkit-calendar-picker-indicator{position:absolute;top:0;left:0;inline-size:100%;block-size:100%}\n"] }]
222
209
  }] });
223
210
 
224
- const TuiInputTime = [TuiInputTimeDirective, TuiInputTimeComponent];
211
+ const TuiInputTime = [
212
+ TuiInputTimeDirective,
213
+ TuiInputTimeComponent,
214
+ TuiLabel,
215
+ TuiTextfieldComponent,
216
+ TuiTextfieldOptionsDirective,
217
+ TuiDropdownContent,
218
+ ];
225
219
 
226
220
  /**
227
221
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-input-time.mjs","sources":["../../../projects/kit/components/input-time/input-time.options.ts","../../../projects/kit/components/input-time/input-time.directive.ts","../../../projects/kit/components/input-time/input-time.component.ts","../../../projects/kit/components/input-time/input-time.template.html","../../../projects/kit/components/input-time/input-time.ts","../../../projects/kit/components/input-time/taiga-ui-kit-components-input-time.ts"],"sourcesContent":["import {type MaskitoTimeParams} from '@maskito/kit';\nimport {type TuiValueTransformer} from '@taiga-ui/cdk/classes';\nimport {type TuiTime} from '@taiga-ui/cdk/date-time';\nimport {type TuiHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiInputTimeOptions\n extends Required<\n Pick<MaskitoTimeParams, 'mode' | 'timeSegmentMaxValues' | 'timeSegmentMinValues'>\n > {\n readonly icon: TuiHandler<TuiSizeL | TuiSizeS, string>;\n readonly valueTransformer: TuiValueTransformer<TuiTime | null, any> | null;\n}\n\nexport const TUI_INPUT_TIME_DEFAULT_OPTIONS: TuiInputTimeOptions = {\n icon: () => '@tui.clock',\n mode: 'HH:MM',\n timeSegmentMaxValues: {},\n timeSegmentMinValues: {},\n valueTransformer: null,\n};\n\nexport const [TUI_INPUT_TIME_OPTIONS, tuiInputTimeOptionsProvider] = tuiCreateOptions(\n TUI_INPUT_TIME_DEFAULT_OPTIONS,\n);\n","import {computed, Directive, inject, Input, signal, untracked} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {type MaskitoOptions} from '@maskito/core';\nimport {\n maskitoAddOnFocusPlugin,\n maskitoCaretGuard,\n maskitoRemoveOnBlurPlugin,\n maskitoSelectionChangeHandler,\n type MaskitoTimeMode,\n maskitoTimeOptionsGenerator,\n type MaskitoTimeParams,\n} from '@maskito/kit';\nimport {tuiAsControl, TuiControl, tuiValueTransformerFrom} from '@taiga-ui/cdk/classes';\nimport {TuiTime} from '@taiga-ui/cdk/date-time';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiDirectiveBinding} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {tuiAsOptionContent} from '@taiga-ui/core/components/data-list';\nimport {\n tuiAsTextfieldAccessor,\n type TuiTextfieldAccessor,\n TuiTextfieldComponent,\n TuiTextfieldDirective,\n tuiTextfieldIcon,\n TuiWithNativePicker,\n TuiWithTextfield,\n} from '@taiga-ui/core/components/textfield';\nimport {\n TuiDropdownDirective,\n tuiDropdownEnabled,\n tuiDropdownOpen,\n} from '@taiga-ui/core/directives/dropdown';\nimport {tuiAsAuxiliary} from '@taiga-ui/core/tokens';\nimport {TuiSelectOption} from '@taiga-ui/kit/components/select';\nimport {TUI_TIME_TEXTS} from '@taiga-ui/kit/tokens';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\n\nimport {TUI_INPUT_TIME_OPTIONS} from './input-time.options';\n\n@Directive({\n standalone: true,\n selector: 'input[tuiInputTime]',\n providers: [\n tuiAsControl(TuiInputTimeDirective),\n tuiAsTextfieldAccessor(TuiInputTimeDirective),\n tuiAsAuxiliary(TuiInputTimeDirective),\n tuiValueTransformerFrom(TUI_INPUT_TIME_OPTIONS),\n tuiAsOptionContent(TuiSelectOption),\n ],\n hostDirectives: [TuiWithTextfield, MaskitoDirective],\n host: {\n inputmode: 'numeric',\n '[disabled]': 'disabled()',\n '(click)': 'toggle()',\n '(input)': 'onInput($event.target.value)',\n },\n})\nexport class TuiInputTimeDirective\n extends TuiControl<TuiTime | null>\n implements TuiTextfieldAccessor<TuiTime | null>\n{\n private readonly textfield = inject(TuiTextfieldDirective);\n private readonly dropdown = inject(TuiDropdownDirective);\n private readonly open = tuiDropdownOpen();\n private readonly options = inject(TUI_INPUT_TIME_OPTIONS);\n private readonly fillers = toSignal(inject(TUI_TIME_TEXTS));\n private readonly prefix = signal('');\n private readonly postfix = signal('');\n\n protected readonly icon = tuiTextfieldIcon(TUI_INPUT_TIME_OPTIONS);\n protected readonly dropdownEnabled = tuiDropdownEnabled(\n computed(() => !this.native && this.interactive()),\n );\n\n protected readonly filler = tuiDirectiveBinding(\n TuiTextfieldComponent,\n 'fillerSetter',\n computed((filler = this.fillers()?.[this.timeMode()] ?? '') =>\n this.postfix() ? '' : this.prefix() + filler,\n ),\n {},\n );\n\n protected readonly mask = tuiMaskito(\n computed(() =>\n this.computeMask({\n ...this.options,\n mode: this.timeMode(),\n step: this.interactive() && !this.dropdown._content() ? 1 : 0,\n prefix: this.prefix(),\n postfix: this.postfix(),\n }),\n ),\n );\n\n @Input()\n public accept: readonly TuiTime[] = [];\n\n public readonly native =\n !!inject(TuiWithNativePicker, {optional: true}) && inject(TUI_IS_MOBILE);\n\n public readonly timeMode = signal(this.options.mode);\n\n // TODO(v5): use signal inputs\n @Input('mode')\n public set modeSetter(x: MaskitoTimeMode) {\n this.timeMode.set(x);\n }\n\n // TODO(v5): use signal inputs\n @Input('prefix')\n public set prefixSetter(x: string) {\n this.prefix.set(x);\n }\n\n // TODO(v5): use signal inputs\n @Input('postfix')\n public set postfixSetter(x: string) {\n this.postfix.set(x);\n }\n\n public setValue(value: TuiTime | null): void {\n this.onChange(value);\n\n if (value) {\n this.textfield.value.set(this.stringify(value));\n } else {\n this.textfield.setValue(value);\n }\n\n if (!value && this.dropdownEnabled()) {\n this.open.set(true);\n }\n }\n\n public override writeValue(value: TuiTime | null): void {\n const reset = this.control.pristine && this.control.untouched && !value;\n const changed = untracked(() => value !== this.value());\n\n if (changed || reset) {\n super.writeValue(value);\n untracked(() => this.textfield.value.set(this.stringify(this.value())));\n }\n }\n\n protected onInput(valueWithAffixes: string): void {\n const value = valueWithAffixes\n .replace(this.prefix(), '')\n .replace(this.postfix(), '');\n const time =\n value.length === this.timeMode().length ? TuiTime.fromString(value) : null;\n const newValue =\n this.accept.length && time ? this.findNearestTime(time, this.accept) : time;\n\n this.control?.control?.updateValueAndValidity({emitEvent: false});\n this.onChange(newValue);\n\n if (newValue && newValue !== time) {\n this.textfield.value.set(this.stringify(newValue));\n }\n }\n\n protected toggle(): void {\n this.open.update((x) => !x);\n }\n\n private computeMask(params: Required<MaskitoTimeParams>): MaskitoOptions {\n const options = maskitoTimeOptionsGenerator(params);\n const {mode, prefix, postfix} = params;\n const inputModeSwitchPlugin = maskitoSelectionChangeHandler((element) => {\n element.inputMode =\n element.selectionStart! >= mode.indexOf(' AA') ? 'text' : 'numeric';\n });\n const caretGuardPlugin = maskitoCaretGuard((value) => [\n prefix.length,\n value.length - postfix.length,\n ]);\n\n return {\n ...options,\n plugins: options.plugins.concat(\n caretGuardPlugin,\n maskitoAddOnFocusPlugin(prefix + postfix),\n maskitoRemoveOnBlurPlugin(prefix + postfix),\n mode.includes('AA') ? inputModeSwitchPlugin : [],\n ),\n };\n }\n\n private findNearestTime(value: TuiTime, items: readonly TuiTime[]): TuiTime | null {\n // eslint-disable-next-line no-restricted-syntax\n return items.reduce((previous, current) =>\n Math.abs(current.valueOf() - value.valueOf()) <\n Math.abs(previous.valueOf() - value.valueOf())\n ? current\n : previous,\n );\n }\n\n private stringify(time: TuiTime | null): string {\n return this.prefix() + (time?.toString(this.timeMode()) || '') + this.postfix();\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n Directive,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\nimport {type MaskitoTimeMode} from '@maskito/kit';\nimport {TuiControl} from '@taiga-ui/cdk/classes';\nimport {type TuiDay, TuiTime} from '@taiga-ui/cdk/date-time';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {\n TuiTextfieldContent,\n TuiTextfieldDirective,\n TuiWithNativePicker,\n} from '@taiga-ui/core/components/textfield';\n\nimport {TuiInputTimeDirective} from './input-time.directive';\n\n@Directive({\n standalone: false,\n host: {\n '[attr.list]': 'null',\n },\n})\nexport abstract class TuiNativeTimePicker {\n protected readonly list = tuiInjectElement().getAttribute('list');\n\n protected getStep(timeMode: MaskitoTimeMode): number {\n switch (timeMode) {\n case 'HH:MM:SS':\n case 'HH:MM:SS AA':\n return 1;\n case 'HH:MM:SS.MSS':\n case 'HH:MM:SS.MSS AA':\n return 0.001;\n default:\n return 60;\n }\n }\n\n protected toISOString(\n value: TuiTime | readonly [TuiDay, TuiTime | null] | null,\n ): string {\n const [day, time] = Array.isArray(value) ? value : [null, value];\n const dateString = day ? day.toJSON() + (time ? 'T' : '') : '';\n const timeString = time ? time.toString('HH:MM:SS.MSS') : '';\n\n return dateString + timeString;\n }\n}\n\n@Component({\n selector: 'input[tuiInputTime][type=\"time\"]',\n imports: [TuiTextfieldContent],\n templateUrl: './input-time.template.html',\n styleUrls: ['./input-time.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiWithNativePicker],\n host: {ngSkipHydration: 'true'},\n})\nexport class TuiInputTimeComponent extends TuiNativeTimePicker {\n private readonly control: TuiControl<TuiTime | null> = inject(TuiControl);\n\n protected readonly host = inject(TuiInputTimeDirective);\n\n protected readonly textfield = inject(TuiTextfieldDirective);\n protected readonly value = computed(() => this.toISOString(this.control.value()));\n\n protected readonly step = computed(() => this.getStep(this.host.timeMode()));\n\n protected setValue(value: string): void {\n this.host.setValue(TuiTime.fromString(value));\n }\n}\n","@if (host.native) {\n <input\n *tuiTextfieldContent\n type=\"time\"\n [attr.list]=\"list\"\n [step]=\"step()\"\n [value]=\"value()\"\n (change)=\"setValue($any($event.target).value)\"\n />\n}\n","import {TuiInputTimeComponent} from './input-time.component';\nimport {TuiInputTimeDirective} from './input-time.directive';\n\nexport const TuiInputTime = [TuiInputTimeDirective, TuiInputTimeComponent] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAea,MAAA,8BAA8B,GAAwB;AAC/D,IAAA,IAAI,EAAE,MAAM,YAAY;AACxB,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,oBAAoB,EAAE,EAAE;AACxB,IAAA,oBAAoB,EAAE,EAAE;AACxB,IAAA,gBAAgB,EAAE,IAAI;;AAGnB,MAAM,CAAC,sBAAsB,EAAE,2BAA2B,CAAC,GAAG,gBAAgB,CACjF,8BAA8B;;ACiC5B,MAAO,qBACT,SAAQ,UAA0B,CAAA;AAnBtC,IAAA,WAAA,GAAA;;AAsBqB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACzC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,oBAAoB,CAAC;QACvC,IAAI,CAAA,IAAA,GAAG,eAAe,EAAE;AACxB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,sBAAsB,CAAC;QACxC,IAAO,CAAA,OAAA,GAAG,QAAQ,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;AAC1C,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;AACnB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,EAAE,CAAC;AAElB,QAAA,IAAA,CAAA,IAAI,GAAG,gBAAgB,CAAC,sBAAsB,CAAC;AAC/C,QAAA,IAAA,CAAA,eAAe,GAAG,kBAAkB,CACnD,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,IAAI,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,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,ED6Cc,mBAAmB,EAAA,QAAA,EAAA,kCAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAQpB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAVjC,SAAS;+BACI,kCAAkC,EAAA,OAAA,EACnC,CAAC,mBAAmB,CAAC,iBAGf,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,cAAA,EAC/B,CAAC,mBAAmB,CAAC,QAC/B,EAAC,eAAe,EAAE,MAAM,EAAC,EAAA,QAAA,EAAA,mPAAA,EAAA,MAAA,EAAA,CAAA,wVAAA,CAAA,EAAA;;;ME1DtB,YAAY,GAAG,CAAC,qBAAqB,EAAE,qBAAqB;;ACHzE;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-input-time.mjs","sources":["../../../projects/kit/components/input-time/input-time.options.ts","../../../projects/kit/components/input-time/input-time.directive.ts","../../../projects/kit/components/input-time/input-time.component.ts","../../../projects/kit/components/input-time/input-time.template.html","../../../projects/kit/components/input-time/input-time.ts","../../../projects/kit/components/input-time/taiga-ui-kit-components-input-time.ts"],"sourcesContent":["import {type MaskitoTimeParams} from '@maskito/kit';\nimport {type TuiValueTransformer} from '@taiga-ui/cdk/classes';\nimport {type TuiTime} from '@taiga-ui/cdk/date-time';\nimport {type TuiHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiInputTimeOptions extends Required<\n Pick<MaskitoTimeParams, 'mode' | 'timeSegmentMaxValues' | 'timeSegmentMinValues'>\n> {\n readonly icon: TuiHandler<TuiSizeL | TuiSizeS, string>;\n readonly valueTransformer: TuiValueTransformer<TuiTime | null, any> | null;\n}\n\nexport const TUI_INPUT_TIME_DEFAULT_OPTIONS: TuiInputTimeOptions = {\n icon: () => '@tui.clock',\n mode: 'HH:MM',\n timeSegmentMaxValues: {},\n timeSegmentMinValues: {},\n valueTransformer: null,\n};\n\nexport const [TUI_INPUT_TIME_OPTIONS, tuiInputTimeOptionsProvider] = tuiCreateOptions(\n TUI_INPUT_TIME_DEFAULT_OPTIONS,\n);\n","import {computed, Directive, inject, input, untracked} from '@angular/core';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {type MaskitoOptions} from '@maskito/core';\nimport {\n maskitoAddOnFocusPlugin,\n maskitoCaretGuard,\n maskitoRemoveOnBlurPlugin,\n maskitoSelectionChangeHandler,\n type MaskitoTimeMode,\n maskitoTimeOptionsGenerator,\n type MaskitoTimeParams,\n} from '@maskito/kit';\nimport {tuiAsControl, TuiControl, tuiValueTransformerFrom} from '@taiga-ui/cdk/classes';\nimport {TuiTime} from '@taiga-ui/cdk/date-time';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiDirectiveBinding} from '@taiga-ui/cdk/utils/di';\nimport {tuiAsOptionContent} from '@taiga-ui/core/components/data-list';\nimport {TuiInputDirective, TuiWithInput} from '@taiga-ui/core/components/input';\nimport {\n tuiAsTextfieldAccessor,\n type TuiTextfieldAccessor,\n TuiTextfieldComponent,\n tuiTextfieldIcon,\n TuiWithNativePicker,\n} from '@taiga-ui/core/components/textfield';\nimport {\n TuiDropdownDirective,\n tuiDropdownEnabled,\n TuiDropdownOpen,\n} from '@taiga-ui/core/portals/dropdown';\nimport {TuiSelectOption} from '@taiga-ui/kit/components/select';\nimport {TUI_TIME_TEXTS} from '@taiga-ui/kit/tokens';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\n\nimport {TUI_INPUT_TIME_OPTIONS} from './input-time.options';\n\n@Directive({\n selector: 'input[tuiInputTime]',\n providers: [\n tuiAsControl(TuiInputTimeDirective),\n tuiAsTextfieldAccessor(TuiInputTimeDirective),\n tuiValueTransformerFrom(TUI_INPUT_TIME_OPTIONS),\n tuiAsOptionContent(TuiSelectOption),\n ],\n hostDirectives: [TuiWithInput, MaskitoDirective],\n host: {\n inputmode: 'numeric',\n '[disabled]': 'disabled()',\n '(click)': 'toggle()',\n '(input)': 'onInput($event.target.value)',\n '(blur)': 'onBlur($event.target.value)',\n },\n})\nexport class TuiInputTimeDirective\n extends TuiControl<TuiTime | null>\n implements TuiTextfieldAccessor<TuiTime | null>\n{\n private readonly input = inject(TuiInputDirective);\n private readonly dropdown = inject(TuiDropdownDirective);\n private readonly open = inject(TuiDropdownOpen).open;\n private readonly options = inject(TUI_INPUT_TIME_OPTIONS);\n private readonly fillers = inject(TUI_TIME_TEXTS);\n protected readonly icon = tuiTextfieldIcon(TUI_INPUT_TIME_OPTIONS);\n protected readonly dropdownEnabled = tuiDropdownEnabled(\n computed(() => !this.native && this.interactive()),\n );\n\n protected readonly filler = tuiDirectiveBinding(\n TuiTextfieldComponent,\n 'filler',\n computed((filler = this.fillers()?.[this.timeMode()] ?? '') =>\n this.postfix() ? '' : this.prefix() + filler,\n ),\n {},\n );\n\n protected readonly mask = tuiMaskito(\n computed(() =>\n this.computeMask({\n ...this.options,\n mode: this.timeMode(),\n step: this.interactive() && !this.dropdown.content() ? 1 : 0,\n prefix: this.prefix(),\n postfix: this.postfix(),\n }),\n ),\n );\n\n public readonly accept = input<readonly TuiTime[]>([]);\n public readonly timeMode = input<MaskitoTimeMode>(this.options.mode, {alias: 'mode'});\n public readonly prefix = input('');\n public readonly postfix = input('');\n public readonly native =\n !!inject(TuiWithNativePicker, {optional: true}) && inject(TUI_IS_MOBILE);\n\n public setValue(value: TuiTime | null): void {\n this.onChange(value);\n\n if (value) {\n this.input.value.set(this.stringify(value));\n } else {\n this.input.setValue(value);\n }\n\n if (!value && this.dropdownEnabled()) {\n this.open.set(true);\n }\n }\n\n public override writeValue(value: TuiTime | null): void {\n const reset = this.control.pristine && this.control.untouched && !value;\n const changed = untracked(() => value !== this.value());\n\n if (changed || reset) {\n super.writeValue(value);\n untracked(() => this.input.value.set(this.stringify(this.value())));\n }\n }\n\n protected onInput(valueWithAffixes: string): void {\n const value = valueWithAffixes\n .replace(this.prefix(), '')\n .replace(this.postfix(), '');\n const time =\n value.length === this.timeMode().length ? TuiTime.fromString(value) : null;\n const newValue =\n this.accept().length && time\n ? this.findNearestTime(time, this.accept())\n : time;\n\n this.control?.control?.updateValueAndValidity({emitEvent: false});\n this.onChange(newValue);\n\n if (newValue && newValue !== time) {\n this.input.value.set(this.stringify(newValue));\n }\n }\n\n protected toggle(): void {\n this.open.update((x) => !x);\n }\n\n protected onBlur(valueWithAffixes: string): void {\n const value = valueWithAffixes\n .replace(this.prefix(), '')\n .replace(this.postfix(), '');\n\n if (value && !this.value()) {\n const time = TuiTime.fromString(value);\n\n const newValue = this.accept().length\n ? this.findNearestTime(time, this.accept())\n : time;\n\n this.control?.control?.updateValueAndValidity({emitEvent: false});\n this.onChange(newValue);\n\n if (newValue) {\n this.input.value.set(this.stringify(newValue));\n }\n }\n }\n\n private computeMask(params: Required<MaskitoTimeParams>): MaskitoOptions {\n const options = maskitoTimeOptionsGenerator(params);\n const {mode, prefix, postfix} = params;\n const inputModeSwitchPlugin = maskitoSelectionChangeHandler((element) => {\n element.inputMode =\n element.selectionStart! >= mode.indexOf(' AA') ? 'text' : 'numeric';\n });\n const caretGuardPlugin = maskitoCaretGuard((value) => [\n prefix.length,\n value.length - postfix.length,\n ]);\n\n return {\n ...options,\n plugins: options.plugins.concat(\n caretGuardPlugin,\n maskitoAddOnFocusPlugin(prefix + postfix),\n maskitoRemoveOnBlurPlugin(prefix + postfix),\n mode.includes('AA') ? inputModeSwitchPlugin : [],\n ),\n };\n }\n\n private findNearestTime(value: TuiTime, items: readonly TuiTime[]): TuiTime | null {\n // eslint-disable-next-line no-restricted-syntax\n return items.reduce((previous, current) =>\n Math.abs(current.valueOf() - value.valueOf()) <\n Math.abs(previous.valueOf() - value.valueOf())\n ? current\n : previous,\n );\n }\n\n private stringify(time: TuiTime | null): string {\n return this.prefix() + (time?.toString(this.timeMode()) || '') + this.postfix();\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n Directive,\n HostAttributeToken,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\nimport {type MaskitoTimeMode} from '@maskito/kit';\nimport {TuiControl} from '@taiga-ui/cdk/classes';\nimport {type TuiDay, TuiTime} from '@taiga-ui/cdk/date-time';\nimport {\n TuiTextfieldContent,\n TuiWithNativePicker,\n} from '@taiga-ui/core/components/textfield';\n\nimport {TuiInputTimeDirective} from './input-time.directive';\n\n@Directive({host: {'[attr.list]': 'null'}})\nexport abstract class TuiNativeTimePicker {\n protected readonly list = inject(new HostAttributeToken('list'), {optional: true});\n\n protected getStep(timeMode: MaskitoTimeMode): number {\n switch (timeMode) {\n case 'HH:MM:SS':\n case 'HH:MM:SS AA':\n return 1;\n case 'HH:MM:SS.MSS':\n case 'HH:MM:SS.MSS AA':\n return 0.001;\n default:\n return 60;\n }\n }\n\n protected toISOString(\n value: TuiTime | readonly [TuiDay, TuiTime | null] | null,\n ): string {\n const [day, time] = Array.isArray(value) ? value : [null, value];\n const dateString = day ? day.toJSON() + (time ? 'T' : '') : '';\n const timeString = time ? time.toString('HH:MM:SS.MSS') : '';\n\n return dateString + timeString;\n }\n}\n\n@Component({\n selector: 'input[tuiInputTime][type=\"time\"]',\n imports: [TuiTextfieldContent],\n templateUrl: './input-time.template.html',\n styleUrl: './input-time.style.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiWithNativePicker],\n host: {ngSkipHydration: 'true'},\n})\nexport class TuiInputTimeComponent extends TuiNativeTimePicker {\n private readonly control: TuiControl<TuiTime | null> = inject(TuiControl);\n\n protected readonly host = inject(TuiInputTimeDirective);\n protected readonly value = computed(() => this.toISOString(this.control.value()));\n protected readonly step = computed(() => this.getStep(this.host.timeMode()));\n\n protected setValue(value: string): void {\n this.host.setValue(TuiTime.fromString(value));\n }\n}\n","@if (host.native) {\n <input\n *tuiTextfieldContent\n type=\"time\"\n [attr.list]=\"list\"\n [step]=\"step()\"\n [value]=\"value()\"\n (change)=\"setValue($any($event.target).value)\"\n />\n}\n","import {TuiLabel} from '@taiga-ui/core/components/label';\nimport {\n TuiTextfieldComponent,\n TuiTextfieldOptionsDirective,\n} from '@taiga-ui/core/components/textfield';\nimport {TuiDropdownContent} from '@taiga-ui/core/portals';\n\nimport {TuiInputTimeComponent} from './input-time.component';\nimport {TuiInputTimeDirective} from './input-time.directive';\n\nexport const TuiInputTime = [\n TuiInputTimeDirective,\n TuiInputTimeComponent,\n TuiLabel,\n TuiTextfieldComponent,\n TuiTextfieldOptionsDirective,\n TuiDropdownContent,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAca,MAAA,8BAA8B,GAAwB;AAC/D,IAAA,IAAI,EAAE,MAAM,YAAY;AACxB,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,oBAAoB,EAAE,EAAE;AACxB,IAAA,oBAAoB,EAAE,EAAE;AACxB,IAAA,gBAAgB,EAAE,IAAI;;AAGnB,MAAM,CAAC,sBAAsB,EAAE,2BAA2B,CAAC,GAAG,gBAAgB,CACjF,8BAA8B;;AC8B5B,MAAO,qBACT,SAAQ,UAA0B,CAAA;AAlBtC,IAAA,WAAA,GAAA;;AAqBqB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,iBAAiB,CAAC;AACjC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACvC,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC,IAAI;AACnC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,sBAAsB,CAAC;AACxC,QAAA,IAAA,CAAA,OAAO,GAAG,MAA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AGf,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,cAAA,EAC/B,CAAC,mBAAmB,CAAC,QAC/B,EAAC,eAAe,EAAE,MAAM,EAAC,EAAA,QAAA,EAAA,mPAAA,EAAA,MAAA,EAAA,CAAA,wVAAA,CAAA,EAAA;;;AE7CtB,MAAA,YAAY,GAAG;IACxB,qBAAqB;IACrB,qBAAqB;IACrB,QAAQ;IACR,qBAAqB;IACrB,4BAA4B;IAC5B,kBAAkB;;;AChBtB;;AAEG;;;;"}
@@ -1,44 +1,46 @@
1
1
  import { TuiCalendarYear } from '@taiga-ui/core/components/calendar';
2
+ import { TuiLabel } from '@taiga-ui/core/components/label';
3
+ import { tuiTextfieldIcon, tuiInjectAuxiliary, TuiTextfieldComponent, TuiTextfieldOptionsDirective } from '@taiga-ui/core/components/textfield';
4
+ import { TuiDropdownContent } from '@taiga-ui/core/portals';
2
5
  import * as i0 from '@angular/core';
3
6
  import { InjectionToken, inject, computed, signal, effect, Input, Directive } from '@angular/core';
4
7
  import * as i2 from '@maskito/angular';
5
8
  import { MaskitoDirective } from '@maskito/angular';
6
9
  import { maskitoNumberOptionsGenerator } from '@maskito/kit';
7
10
  import { TUI_IDENTITY_VALUE_TRANSFORMER, TuiControl, tuiAsControl, tuiValueTransformerFrom } from '@taiga-ui/cdk/classes';
8
- import { TUI_ALLOW_SIGNAL_WRITES } from '@taiga-ui/cdk/constants';
9
- import * as i1 from '@taiga-ui/core/components/textfield';
10
- import { TuiTextfieldDirective, tuiInjectAuxiliary, tuiTextfieldIcon, TuiWithTextfield } from '@taiga-ui/core/components/textfield';
11
- import * as i3 from '@taiga-ui/core/directives/dropdown';
12
- import { tuiDropdownOpen, tuiDropdownEnabled, TuiDropdownAuto } from '@taiga-ui/core/directives/dropdown';
11
+ import * as i1 from '@taiga-ui/core/components/input';
12
+ import { TuiInputDirective, TuiWithInput } from '@taiga-ui/core/components/input';
13
+ import * as i3 from '@taiga-ui/core/portals/dropdown';
14
+ import { TuiDropdownOpen, tuiDropdownEnabled, TuiDropdownAuto } from '@taiga-ui/core/portals/dropdown';
13
15
  import { tuiMaskito } from '@taiga-ui/kit/utils';
14
- import { tuiProvideOptions } from '@taiga-ui/cdk/utils/miscellaneous';
15
- import { TUI_INPUT_DATE_OPTIONS_NEW, TUI_INPUT_DATE_DEFAULT_OPTIONS_NEW } from '@taiga-ui/kit/components/input-date';
16
+ import { tuiProvideOptions } from '@taiga-ui/cdk/utils/di';
17
+ import { TUI_INPUT_DATE_OPTIONS, TUI_INPUT_DATE_DEFAULT_OPTIONS } from '@taiga-ui/kit/components/input-date';
16
18
 
17
19
  const TUI_INPUT_YEAR_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_INPUT_YEAR_OPTIONS' : '', {
18
20
  factory: () => ({
19
- ...inject(TUI_INPUT_DATE_OPTIONS_NEW),
21
+ ...inject(TUI_INPUT_DATE_OPTIONS),
20
22
  valueTransformer: TUI_IDENTITY_VALUE_TRANSFORMER,
21
23
  }),
22
24
  });
23
- const tuiInputInputYearOptionsProvider = (options) => tuiProvideOptions(TUI_INPUT_YEAR_OPTIONS, options, TUI_INPUT_DATE_DEFAULT_OPTIONS_NEW);
25
+ const tuiInputInputYearOptionsProvider = (options) => tuiProvideOptions(TUI_INPUT_YEAR_OPTIONS, options, TUI_INPUT_DATE_DEFAULT_OPTIONS);
24
26
 
25
27
  class TuiInputYearDirective extends TuiControl {
26
28
  constructor() {
27
29
  super(...arguments);
28
30
  this.options = inject(TUI_INPUT_YEAR_OPTIONS);
29
- this.textfield = inject(TuiTextfieldDirective);
30
- this.open = tuiDropdownOpen();
31
+ this.input = inject(TuiInputDirective);
32
+ this.open = inject(TuiDropdownOpen).open;
31
33
  this.initialItem = computed(() => this.value() ?? this.calendar()?.initialItem() ?? null);
32
- this.calendar = tuiInjectAuxiliary((x) => x instanceof TuiCalendarYear);
33
34
  this.dropdownEnabled = tuiDropdownEnabled(this.interactive);
34
35
  this.icon = tuiTextfieldIcon(TUI_INPUT_YEAR_OPTIONS);
35
36
  this.min = signal(this.options.min.year);
36
37
  this.max = signal(this.options.max.year);
38
+ this.calendar = tuiInjectAuxiliary((x) => x instanceof TuiCalendarYear);
37
39
  /**
38
40
  * TODO: move to [value]="value()" after update to Angular 17+
39
41
  * something wrong with change detection on host binding
40
42
  */
41
- this.valueEffect = effect(() => this.textfield.value.set(this.value()?.toString() ?? ''), TUI_ALLOW_SIGNAL_WRITES);
43
+ this.valueEffect = effect(() => this.input.value.set(this.value()?.toString() ?? ''));
42
44
  this.mask = tuiMaskito(computed(() => maskitoNumberOptionsGenerator({
43
45
  min: this.min(),
44
46
  max: this.max(),
@@ -52,7 +54,7 @@ class TuiInputYearDirective extends TuiControl {
52
54
  calendar.min.set(this.min());
53
55
  calendar.max.set(this.max());
54
56
  }
55
- }, TUI_ALLOW_SIGNAL_WRITES);
57
+ });
56
58
  this.calendarOutEffect = effect((onCleanup) => {
57
59
  const subscription = this.calendar()?.yearClick.subscribe((year) => {
58
60
  this.onChange(year);
@@ -78,22 +80,21 @@ class TuiInputYearDirective extends TuiControl {
78
80
  const value = Number(raw);
79
81
  this.onChange(!raw || Number.isNaN(value) ? null : value);
80
82
  }
81
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputYearDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
82
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiInputYearDirective, isStandalone: true, selector: "input[tuiInputYear]", inputs: { minSetter: ["min", "minSetter"], maxSetter: ["max", "maxSetter"] }, host: { attributes: { "maxlength": "4", "inputmode": "numeric" }, listeners: { "click": "toggle()", "input": "onInput($event.target.value)" }, properties: { "disabled": "disabled()" } }, providers: [
83
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputYearDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
84
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiInputYearDirective, isStandalone: true, selector: "input[tuiInputYear]", inputs: { minSetter: ["min", "minSetter"], maxSetter: ["max", "maxSetter"] }, host: { attributes: { "maxlength": "4", "inputmode": "numeric" }, listeners: { "click": "toggle()", "input": "onInput($event.target.value)" }, properties: { "disabled": "disabled()" } }, providers: [
83
85
  tuiAsControl(TuiInputYearDirective),
84
86
  tuiValueTransformerFrom(TUI_INPUT_YEAR_OPTIONS),
85
- ], usesInheritance: true, hostDirectives: [{ directive: i1.TuiWithTextfield }, { directive: i2.MaskitoDirective }, { directive: i3.TuiDropdownAuto }], ngImport: i0 }); }
87
+ ], usesInheritance: true, hostDirectives: [{ directive: i1.TuiWithInput }, { directive: i2.MaskitoDirective }, { directive: i3.TuiDropdownAuto }], ngImport: i0 }); }
86
88
  }
87
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputYearDirective, decorators: [{
89
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputYearDirective, decorators: [{
88
90
  type: Directive,
89
91
  args: [{
90
- standalone: true,
91
92
  selector: 'input[tuiInputYear]',
92
93
  providers: [
93
94
  tuiAsControl(TuiInputYearDirective),
94
95
  tuiValueTransformerFrom(TUI_INPUT_YEAR_OPTIONS),
95
96
  ],
96
- hostDirectives: [TuiWithTextfield, MaskitoDirective, TuiDropdownAuto],
97
+ hostDirectives: [TuiWithInput, MaskitoDirective, TuiDropdownAuto],
97
98
  host: {
98
99
  maxlength: '4',
99
100
  inputmode: 'numeric',
@@ -110,7 +111,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
110
111
  args: ['max']
111
112
  }] } });
112
113
 
113
- const TuiInputYear = [TuiInputYearDirective, TuiCalendarYear];
114
+ const TuiInputYear = [
115
+ TuiInputYearDirective,
116
+ TuiCalendarYear,
117
+ TuiLabel,
118
+ TuiTextfieldComponent,
119
+ TuiTextfieldOptionsDirective,
120
+ TuiDropdownContent,
121
+ ];
114
122
 
115
123
  /**
116
124
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-input-year.mjs","sources":["../../../projects/kit/components/input-year/input-year.options.ts","../../../projects/kit/components/input-year/input-year.directive.ts","../../../projects/kit/components/input-year/input-year.ts","../../../projects/kit/components/input-year/taiga-ui-kit-components-input-year.ts"],"sourcesContent":["import {type FactoryProvider, inject, InjectionToken} from '@angular/core';\nimport {\n TUI_IDENTITY_VALUE_TRANSFORMER,\n type TuiValueTransformer,\n} from '@taiga-ui/cdk/classes';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n TUI_INPUT_DATE_DEFAULT_OPTIONS_NEW,\n TUI_INPUT_DATE_OPTIONS_NEW,\n type TuiInputDateOptionsNew,\n} from '@taiga-ui/kit/components/input-date';\n\nexport interface TuiInputYearOptions\n extends Omit<TuiInputDateOptionsNew, 'valueTransformer'> {\n readonly valueTransformer: TuiValueTransformer<number | null, any>;\n}\n\nexport const TUI_INPUT_YEAR_OPTIONS = new InjectionToken<TuiInputYearOptions>(\n ngDevMode ? 'TUI_INPUT_YEAR_OPTIONS' : '',\n {\n factory: () => ({\n ...inject(TUI_INPUT_DATE_OPTIONS_NEW),\n valueTransformer: TUI_IDENTITY_VALUE_TRANSFORMER,\n }),\n },\n);\n\nexport const tuiInputInputYearOptionsProvider = (\n options: Partial<TuiInputYearOptions>,\n): FactoryProvider =>\n tuiProvideOptions(\n TUI_INPUT_YEAR_OPTIONS,\n options,\n TUI_INPUT_DATE_DEFAULT_OPTIONS_NEW,\n );\n","import {computed, Directive, effect, inject, Input, signal} from '@angular/core';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {maskitoNumberOptionsGenerator} from '@maskito/kit';\nimport {tuiAsControl, TuiControl, tuiValueTransformerFrom} from '@taiga-ui/cdk/classes';\nimport {TUI_ALLOW_SIGNAL_WRITES} from '@taiga-ui/cdk/constants';\nimport {TuiCalendarYear} from '@taiga-ui/core/components/calendar';\nimport {\n tuiInjectAuxiliary,\n TuiTextfieldDirective,\n tuiTextfieldIcon,\n TuiWithTextfield,\n} from '@taiga-ui/core/components/textfield';\nimport {\n TuiDropdownAuto,\n tuiDropdownEnabled,\n tuiDropdownOpen,\n} from '@taiga-ui/core/directives/dropdown';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\n\nimport {TUI_INPUT_YEAR_OPTIONS} from './input-year.options';\n\n@Directive({\n standalone: true,\n selector: 'input[tuiInputYear]',\n providers: [\n tuiAsControl(TuiInputYearDirective),\n tuiValueTransformerFrom(TUI_INPUT_YEAR_OPTIONS),\n ],\n hostDirectives: [TuiWithTextfield, MaskitoDirective, TuiDropdownAuto],\n host: {\n maxlength: '4',\n inputmode: 'numeric',\n '[disabled]': 'disabled()',\n '(click)': 'toggle()',\n '(input)': 'onInput($event.target.value)',\n },\n})\nexport class TuiInputYearDirective extends TuiControl<number | null> {\n private readonly options = inject(TUI_INPUT_YEAR_OPTIONS);\n private readonly textfield = inject(TuiTextfieldDirective);\n private readonly open = tuiDropdownOpen();\n\n private readonly initialItem = computed(\n () => this.value() ?? this.calendar()?.initialItem() ?? null,\n );\n\n protected readonly calendar = tuiInjectAuxiliary<TuiCalendarYear>(\n (x) => x instanceof TuiCalendarYear,\n );\n\n protected readonly dropdownEnabled = tuiDropdownEnabled(this.interactive);\n protected readonly icon = tuiTextfieldIcon(TUI_INPUT_YEAR_OPTIONS);\n protected readonly min = signal(this.options.min.year);\n protected readonly max = signal(this.options.max.year);\n\n /**\n * TODO: move to [value]=\"value()\" after update to Angular 17+\n * something wrong with change detection on host binding\n */\n protected readonly valueEffect = effect(\n () => this.textfield.value.set(this.value()?.toString() ?? ''),\n TUI_ALLOW_SIGNAL_WRITES,\n );\n\n protected readonly mask = tuiMaskito(\n computed(() =>\n maskitoNumberOptionsGenerator({\n min: this.min(),\n max: this.max(),\n thousandSeparator: '',\n }),\n ),\n );\n\n protected readonly calendarInEffect = effect(() => {\n const calendar = this.calendar();\n\n if (calendar) {\n calendar.initialItemSetter = this.initialItem();\n calendar.value.set(this.value());\n calendar.min.set(this.min());\n calendar.max.set(this.max());\n }\n }, TUI_ALLOW_SIGNAL_WRITES);\n\n protected readonly calendarOutEffect = effect((onCleanup) => {\n const subscription = this.calendar()?.yearClick.subscribe((year) => {\n this.onChange(year);\n this.open.set(false);\n });\n\n onCleanup(() => subscription?.unsubscribe());\n });\n\n // TODO(v5): use signal inputs\n @Input('min')\n public set minSetter(x: number) {\n this.min.set(x);\n }\n\n // TODO(v5): use signal inputs\n @Input('max')\n public set maxSetter(x: number) {\n this.max.set(x);\n }\n\n protected toggle(): void {\n if (this.interactive()) {\n this.open.update((x) => !x);\n }\n }\n\n protected onInput(raw: string): void {\n const value = Number(raw);\n\n this.onChange(!raw || Number.isNaN(value) ? null : value);\n }\n}\n","import {TuiCalendarYear} from '@taiga-ui/core/components/calendar';\n\nimport {TuiInputYearDirective} from './input-year.directive';\n\nexport const TuiInputYear = [TuiInputYearDirective, TuiCalendarYear] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAiBa,MAAA,sBAAsB,GAAG,IAAI,cAAc,CACpD,SAAS,GAAG,wBAAwB,GAAG,EAAE,EACzC;AACI,IAAA,OAAO,EAAE,OAAO;QACZ,GAAG,MAAM,CAAC,0BAA0B,CAAC;AACrC,QAAA,gBAAgB,EAAE,8BAA8B;KACnD,CAAC;AACL,CAAA;AAGQ,MAAA,gCAAgC,GAAG,CAC5C,OAAqC,KAErC,iBAAiB,CACb,sBAAsB,EACtB,OAAO,EACP,kCAAkC;;ACIpC,MAAO,qBAAsB,SAAQ,UAAyB,CAAA;AAhBpE,IAAA,WAAA,GAA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A,SAAS,EAAE;AACP,wBAAA,YAAY,CAAuB,qBAAA,CAAA;wBACnC,uBAAuB,CAAC,sBAAsB,CAAC;AAClD,qBAAA;AACD,oBAAA,cAAc,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,CAAC;AACrE,oBAAA,IAAI,EAAE;AACF,wBAAA,SAAS,EAAE,GAAG;AACd,wBAAA,SAAS,EAAE,SAAS;AACpB,wBAAA,YAAY,EAAE,YAAY;AAC1B,wBAAA,SAAS,EAAE,UAAU;AACrB,wBAAA,SAAS,EAAE,8BAA8B;AAC5C,qBAAA;AACJ,iBAAA;8BA4Dc,SAAS,EAAA,CAAA;sBADnB,KAAK;uBAAC,KAAK;gBAOD,SAAS,EAAA,CAAA;sBADnB,KAAK;uBAAC,KAAK;;;MCjGH,YAAY,GAAG,CAAC,qBAAqB,EAAE,eAAe;;ACJnE;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-input-year.mjs","sources":["../../../projects/kit/components/input-year/input-year.options.ts","../../../projects/kit/components/input-year/input-year.directive.ts","../../../projects/kit/components/input-year/input-year.ts","../../../projects/kit/components/input-year/taiga-ui-kit-components-input-year.ts"],"sourcesContent":["import {type FactoryProvider, inject, InjectionToken} from '@angular/core';\nimport {\n TUI_IDENTITY_VALUE_TRANSFORMER,\n type TuiValueTransformer,\n} from '@taiga-ui/cdk/classes';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/di';\nimport {\n TUI_INPUT_DATE_DEFAULT_OPTIONS,\n TUI_INPUT_DATE_OPTIONS,\n type TuiInputDateOptions,\n} from '@taiga-ui/kit/components/input-date';\n\nexport interface TuiInputYearOptions extends Omit<\n TuiInputDateOptions,\n 'valueTransformer'\n> {\n readonly valueTransformer: TuiValueTransformer<number | null, any>;\n}\n\nexport const TUI_INPUT_YEAR_OPTIONS = new InjectionToken<TuiInputYearOptions>(\n ngDevMode ? 'TUI_INPUT_YEAR_OPTIONS' : '',\n {\n factory: () => ({\n ...inject(TUI_INPUT_DATE_OPTIONS),\n valueTransformer: TUI_IDENTITY_VALUE_TRANSFORMER,\n }),\n },\n);\n\nexport const tuiInputInputYearOptionsProvider = (\n options: Partial<TuiInputYearOptions>,\n): FactoryProvider =>\n tuiProvideOptions(TUI_INPUT_YEAR_OPTIONS, options, TUI_INPUT_DATE_DEFAULT_OPTIONS);\n","import {computed, Directive, effect, inject, Input, signal} from '@angular/core';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {maskitoNumberOptionsGenerator} from '@maskito/kit';\nimport {tuiAsControl, TuiControl, tuiValueTransformerFrom} from '@taiga-ui/cdk/classes';\nimport {TuiCalendarYear} from '@taiga-ui/core/components/calendar';\nimport {TuiInputDirective, TuiWithInput} from '@taiga-ui/core/components/input';\nimport {tuiInjectAuxiliary, tuiTextfieldIcon} from '@taiga-ui/core/components/textfield';\nimport {\n TuiDropdownAuto,\n tuiDropdownEnabled,\n TuiDropdownOpen,\n} from '@taiga-ui/core/portals/dropdown';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\n\nimport {TUI_INPUT_YEAR_OPTIONS} from './input-year.options';\n\n@Directive({\n selector: 'input[tuiInputYear]',\n providers: [\n tuiAsControl(TuiInputYearDirective),\n tuiValueTransformerFrom(TUI_INPUT_YEAR_OPTIONS),\n ],\n hostDirectives: [TuiWithInput, MaskitoDirective, TuiDropdownAuto],\n host: {\n maxlength: '4',\n inputmode: 'numeric',\n '[disabled]': 'disabled()',\n '(click)': 'toggle()',\n '(input)': 'onInput($event.target.value)',\n },\n})\nexport class TuiInputYearDirective extends TuiControl<number | null> {\n private readonly options = inject(TUI_INPUT_YEAR_OPTIONS);\n private readonly input = inject(TuiInputDirective);\n private readonly open = inject(TuiDropdownOpen).open;\n private readonly initialItem = computed(\n () => this.value() ?? this.calendar()?.initialItem() ?? null,\n );\n\n protected readonly dropdownEnabled = tuiDropdownEnabled(this.interactive);\n protected readonly icon = tuiTextfieldIcon(TUI_INPUT_YEAR_OPTIONS);\n protected readonly min = signal(this.options.min.year);\n protected readonly max = signal(this.options.max.year);\n protected readonly calendar = tuiInjectAuxiliary<TuiCalendarYear>(\n (x) => x instanceof TuiCalendarYear,\n );\n\n /**\n * TODO: move to [value]=\"value()\" after update to Angular 17+\n * something wrong with change detection on host binding\n */\n protected readonly valueEffect = effect(() =>\n this.input.value.set(this.value()?.toString() ?? ''),\n );\n\n protected readonly mask = tuiMaskito(\n computed(() =>\n maskitoNumberOptionsGenerator({\n min: this.min(),\n max: this.max(),\n thousandSeparator: '',\n }),\n ),\n );\n\n protected readonly calendarInEffect = effect(() => {\n const calendar = this.calendar();\n\n if (calendar) {\n calendar.initialItemSetter = this.initialItem();\n calendar.value.set(this.value());\n calendar.min.set(this.min());\n calendar.max.set(this.max());\n }\n });\n\n protected readonly calendarOutEffect = effect((onCleanup) => {\n const subscription = this.calendar()?.yearClick.subscribe((year) => {\n this.onChange(year);\n this.open.set(false);\n });\n\n onCleanup(() => subscription?.unsubscribe());\n });\n\n // TODO(v5): use signal inputs\n @Input('min')\n public set minSetter(x: number) {\n this.min.set(x);\n }\n\n // TODO(v5): use signal inputs\n @Input('max')\n public set maxSetter(x: number) {\n this.max.set(x);\n }\n\n protected toggle(): void {\n if (this.interactive()) {\n this.open.update((x) => !x);\n }\n }\n\n protected onInput(raw: string): void {\n const value = Number(raw);\n\n this.onChange(!raw || Number.isNaN(value) ? null : value);\n }\n}\n","import {TuiCalendarYear} from '@taiga-ui/core/components/calendar';\nimport {TuiLabel} from '@taiga-ui/core/components/label';\nimport {\n TuiTextfieldComponent,\n TuiTextfieldOptionsDirective,\n} from '@taiga-ui/core/components/textfield';\nimport {TuiDropdownContent} from '@taiga-ui/core/portals';\n\nimport {TuiInputYearDirective} from './input-year.directive';\n\nexport const TuiInputYear = [\n TuiInputYearDirective,\n TuiCalendarYear,\n TuiLabel,\n TuiTextfieldComponent,\n TuiTextfieldOptionsDirective,\n TuiDropdownContent,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\n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