@taiga-ui/kit 4.52.0-canary.6ee9658 → 4.52.0-canary.7c53ccc

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/components/avatar/avatar-labeled.component.d.ts +3 -3
  2. package/components/avatar/avatar-stack.component.d.ts +2 -2
  3. package/components/badge-notification/badge-notification.component.d.ts +2 -3
  4. package/components/badged-content/badged-content.directive.d.ts +2 -3
  5. package/components/breadcrumbs/breadcrumbs.component.d.ts +6 -7
  6. package/components/button-loading/button-loading.component.d.ts +5 -5
  7. package/components/calendar-range/calendar-range.component.d.ts +0 -1
  8. package/components/calendar-range/day-range-period.d.ts +2 -1
  9. package/components/carousel/carousel-autoscroll.directive.d.ts +1 -2
  10. package/components/carousel/carousel-scroll.directive.d.ts +1 -1
  11. package/components/carousel/carousel.component.d.ts +15 -18
  12. package/components/carousel/carousel.directive.d.ts +5 -4
  13. package/components/combo-box/combo-box.d.ts +5 -0
  14. package/components/combo-box/combo-box.directive.d.ts +7 -9
  15. package/components/combo-box/index.d.ts +1 -0
  16. package/components/compass/compass.component.d.ts +2 -2
  17. package/components/confirm/confirm.component.d.ts +1 -1
  18. package/components/confirm/confirm.service.d.ts +1 -1
  19. package/components/copy/copy.component.d.ts +2 -3
  20. package/components/copy/copy.directive.d.ts +1 -2
  21. package/components/data-list-wrapper/data-list-group-wrapper.component.d.ts +2 -2
  22. package/components/data-list-wrapper/data-list-wrapper.component.d.ts +14 -22
  23. package/components/data-list-wrapper/{data-list-wrapper.module.d.ts → data-list-wrapper.d.ts} +1 -2
  24. package/components/data-list-wrapper/index.d.ts +1 -1
  25. package/components/drawer/drawer.component.d.ts +3 -4
  26. package/components/files/file/file.component.d.ts +16 -29
  27. package/components/files/files/files.component.d.ts +5 -8
  28. package/components/files/input-files/input-files.component.d.ts +2 -2
  29. package/components/files/input-files/input-files.content.d.ts +7 -8
  30. package/components/files/input-files/input-files.directive.d.ts +2 -2
  31. package/components/filter/filter.component.d.ts +9 -12
  32. package/components/fullscreen/fullscreen.component.d.ts +5 -8
  33. package/components/index.d.ts +0 -3
  34. package/components/input-chip/input-chip.component.d.ts +1 -1
  35. package/components/input-chip/input-chip.d.ts +5 -1
  36. package/components/input-chip/input-chip.directive.d.ts +4 -4
  37. package/components/input-color/index.d.ts +1 -0
  38. package/components/input-color/input-color.component.d.ts +8 -12
  39. package/components/input-color/input-color.d.ts +5 -0
  40. package/components/input-date/input-date.component.d.ts +2 -2
  41. package/components/input-date/input-date.d.ts +4 -1
  42. package/components/input-date/input-date.directive.d.ts +21 -22
  43. package/components/input-date/input-date.options.d.ts +3 -3
  44. package/components/input-date-multi/input-date-multi.d.ts +1 -2
  45. package/components/input-date-multi/input-date-multi.directive.d.ts +3 -3
  46. package/components/input-date-range/input-date-range.d.ts +4 -1
  47. package/components/input-date-range/input-date-range.directive.d.ts +9 -10
  48. package/components/input-date-range/input-date-range.options.d.ts +2 -2
  49. package/components/input-date-time/input-date-time.d.ts +4 -1
  50. package/components/input-date-time/input-date-time.directive.d.ts +14 -14
  51. package/components/input-date-time/input-date-time.options.d.ts +2 -2
  52. package/components/input-inline/input-inline.component.d.ts +3 -2
  53. package/components/input-month/input-month.component.d.ts +3 -5
  54. package/components/input-month/input-month.d.ts +4 -1
  55. package/components/input-month/input-month.directive.d.ts +6 -5
  56. package/components/input-month-range/input-month-range.d.ts +4 -1
  57. package/components/input-month-range/input-month-range.directive.d.ts +6 -5
  58. package/components/input-number/input-number.d.ts +4 -1
  59. package/components/input-number/input-number.directive.d.ts +6 -8
  60. package/components/input-number/input-number.options.d.ts +2 -3
  61. package/components/input-number/step/input-number-step.component.d.ts +3 -3
  62. package/components/input-phone/index.d.ts +1 -0
  63. package/components/input-phone/input-phone.d.ts +5 -0
  64. package/components/input-phone/input-phone.directive.d.ts +12 -14
  65. package/components/input-phone-international/index.d.ts +1 -0
  66. package/components/input-phone-international/input-phone-international.component.d.ts +14 -16
  67. package/components/input-phone-international/input-phone-international.d.ts +5 -0
  68. package/components/input-phone-international/input-phone-international.options.d.ts +1 -0
  69. package/components/input-pin/index.d.ts +1 -0
  70. package/components/input-pin/input-pin.component.d.ts +5 -6
  71. package/components/input-pin/input-pin.d.ts +5 -0
  72. package/components/input-range/index.d.ts +0 -1
  73. package/components/input-range/input-range.component.d.ts +22 -52
  74. package/components/input-slider/input-slider.d.ts +4 -1
  75. package/components/input-time/input-time.component.d.ts +1 -3
  76. package/components/input-time/input-time.d.ts +4 -1
  77. package/components/input-time/input-time.directive.d.ts +5 -5
  78. package/components/input-year/input-year.d.ts +4 -1
  79. package/components/input-year/input-year.directive.d.ts +8 -10
  80. package/components/input-year/input-year.options.d.ts +2 -2
  81. package/components/items-with-more/items-with-more.component.d.ts +6 -6
  82. package/components/items-with-more/items-with-more.directive.d.ts +6 -6
  83. package/components/like/like.options.d.ts +1 -1
  84. package/components/line-clamp/line-clamp-box.component.d.ts +1 -1
  85. package/components/multi-select/multi-select-native/multi-select-native.component.d.ts +5 -4
  86. package/components/notification-middle/notification-middle.service.d.ts +1 -1
  87. package/components/pager/pager.component.d.ts +12 -12
  88. package/components/pagination/pagination.component.d.ts +22 -52
  89. package/components/pagination/pagination.options.d.ts +3 -6
  90. package/components/preview/dialog/preview-dialog.service.d.ts +1 -1
  91. package/components/preview/index.d.ts +1 -0
  92. package/components/preview/pagination/preview-pagination.component.d.ts +6 -10
  93. package/components/preview/preview.component.d.ts +6 -6
  94. package/components/preview/zoom/preview-zoom.component.d.ts +11 -17
  95. package/components/progress/progress-bar/progress-bar.component.d.ts +3 -4
  96. package/components/progress/progress-circle/progress-circle.component.d.ts +7 -11
  97. package/components/pulse/pulse.component.d.ts +2 -2
  98. package/components/push/push-alert.component.d.ts +1 -1
  99. package/components/push/push.component.d.ts +6 -7
  100. package/components/push/push.options.d.ts +1 -1
  101. package/components/push/push.service.d.ts +1 -1
  102. package/components/radio/radio.component.d.ts +1 -1
  103. package/components/radio-list/radio-list.component.d.ts +11 -9
  104. package/components/range/range.component.d.ts +3 -4
  105. package/components/rating/rating.component.d.ts +1 -1
  106. package/components/routable-dialog/generate-dialogable-route.d.ts +1 -1
  107. package/components/select/native-select/native-select.component.d.ts +4 -4
  108. package/components/select/select.d.ts +4 -1
  109. package/components/select/select.directive.d.ts +4 -3
  110. package/components/slider/helpers/slider-key-steps.directive.d.ts +6 -5
  111. package/components/slider/helpers/slider-readonly.directive.d.ts +2 -4
  112. package/components/slider/helpers/slider-thumb-label.component.d.ts +2 -4
  113. package/components/slider/slider.component.d.ts +4 -7
  114. package/components/stepper/step.component.d.ts +9 -2
  115. package/components/stepper/stepper.component.d.ts +1 -3
  116. package/components/switch/switch.component.d.ts +1 -0
  117. package/components/tabs/tabs-horizontal.directive.d.ts +3 -4
  118. package/components/tabs/tabs-vertical.directive.d.ts +2 -2
  119. package/components/tabs/tabs-with-more.component.d.ts +12 -16
  120. package/components/tabs/tabs.directive.d.ts +5 -7
  121. package/components/textarea/index.d.ts +2 -1
  122. package/components/textarea/textarea.component.d.ts +10 -11
  123. package/components/textarea/textarea.d.ts +6 -0
  124. package/components/textarea/textarea.directive.d.ts +13 -0
  125. package/components/tiles/tile.component.d.ts +7 -10
  126. package/components/tiles/tile.service.d.ts +1 -1
  127. package/components/tiles/tiles.component.d.ts +4 -7
  128. package/components/toast/toast.component.d.ts +1 -1
  129. package/components/toast/toast.options.d.ts +1 -1
  130. package/components/toast/toast.service.d.ts +1 -1
  131. package/components/tree/components/tree/tree.component.d.ts +7 -7
  132. package/components/tree/components/tree-item/tree-item.component.d.ts +1 -1
  133. package/components/tree/directives/tree-children.directive.d.ts +2 -2
  134. package/components/tree/directives/tree-controller.directive.d.ts +4 -5
  135. package/components/tree/directives/tree-item-controller.directive.d.ts +2 -2
  136. package/components/tree/directives/tree-node.directive.d.ts +5 -4
  137. package/directives/appearance-proxy/appearance-proxy.directive.d.ts +10 -0
  138. package/directives/appearance-proxy/index.d.ts +1 -0
  139. package/directives/button-select/button-select.directive.d.ts +1 -1
  140. package/directives/fade/fade.directive.d.ts +5 -6
  141. package/directives/highlight/highlight.directive.d.ts +4 -4
  142. package/directives/index.d.ts +1 -1
  143. package/directives/password/password.directive.d.ts +1 -1
  144. package/directives/present/present.directive.d.ts +2 -4
  145. package/directives/tooltip/tooltip.directive.d.ts +1 -1
  146. package/directives/unfinished-validator/unfinished-validator.directive.d.ts +2 -2
  147. package/directives/unmask-handler/unmask-handler.directive.d.ts +3 -3
  148. package/fesm2022/taiga-ui-kit-components-accordion.mjs +8 -8
  149. package/fesm2022/taiga-ui-kit-components-accordion.mjs.map +1 -1
  150. package/fesm2022/taiga-ui-kit-components-action-bar.mjs +7 -7
  151. package/fesm2022/taiga-ui-kit-components-action-bar.mjs.map +1 -1
  152. package/fesm2022/taiga-ui-kit-components-avatar.mjs +33 -47
  153. package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
  154. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +8 -10
  155. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
  156. package/fesm2022/taiga-ui-kit-components-badge.mjs +7 -7
  157. package/fesm2022/taiga-ui-kit-components-badged-content.mjs +9 -11
  158. package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
  159. package/fesm2022/taiga-ui-kit-components-block.mjs +7 -7
  160. package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
  161. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs +16 -30
  162. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs.map +1 -1
  163. package/fesm2022/taiga-ui-kit-components-button-loading.mjs +18 -26
  164. package/fesm2022/taiga-ui-kit-components-button-loading.mjs.map +1 -1
  165. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +5 -13
  166. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
  167. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +23 -23
  168. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
  169. package/fesm2022/taiga-ui-kit-components-carousel.mjs +69 -116
  170. package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
  171. package/fesm2022/taiga-ui-kit-components-checkbox.mjs +3 -3
  172. package/fesm2022/taiga-ui-kit-components-chip.mjs +7 -7
  173. package/fesm2022/taiga-ui-kit-components-combo-box.mjs +40 -44
  174. package/fesm2022/taiga-ui-kit-components-combo-box.mjs.map +1 -1
  175. package/fesm2022/taiga-ui-kit-components-comment.mjs +7 -7
  176. package/fesm2022/taiga-ui-kit-components-compass.mjs +7 -9
  177. package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
  178. package/fesm2022/taiga-ui-kit-components-confirm.mjs +8 -8
  179. package/fesm2022/taiga-ui-kit-components-confirm.mjs.map +1 -1
  180. package/fesm2022/taiga-ui-kit-components-copy.mjs +15 -25
  181. package/fesm2022/taiga-ui-kit-components-copy.mjs.map +1 -1
  182. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +24 -85
  183. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
  184. package/fesm2022/taiga-ui-kit-components-drawer.mjs +15 -32
  185. package/fesm2022/taiga-ui-kit-components-drawer.mjs.map +1 -1
  186. package/fesm2022/taiga-ui-kit-components-files.mjs +108 -228
  187. package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
  188. package/fesm2022/taiga-ui-kit-components-filter.mjs +21 -34
  189. package/fesm2022/taiga-ui-kit-components-filter.mjs.map +1 -1
  190. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs +23 -42
  191. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs.map +1 -1
  192. package/fesm2022/taiga-ui-kit-components-input-chip.mjs +32 -28
  193. package/fesm2022/taiga-ui-kit-components-input-chip.mjs.map +1 -1
  194. package/fesm2022/taiga-ui-kit-components-input-color.mjs +27 -28
  195. package/fesm2022/taiga-ui-kit-components-input-color.mjs.map +1 -1
  196. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs +14 -12
  197. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs.map +1 -1
  198. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs +36 -35
  199. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs.map +1 -1
  200. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs +39 -54
  201. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs.map +1 -1
  202. package/fesm2022/taiga-ui-kit-components-input-date.mjs +51 -57
  203. package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -1
  204. package/fesm2022/taiga-ui-kit-components-input-inline.mjs +10 -12
  205. package/fesm2022/taiga-ui-kit-components-input-inline.mjs.map +1 -1
  206. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs +25 -21
  207. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs.map +1 -1
  208. package/fesm2022/taiga-ui-kit-components-input-month.mjs +38 -44
  209. package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
  210. package/fesm2022/taiga-ui-kit-components-input-number.mjs +50 -49
  211. package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
  212. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +62 -67
  213. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
  214. package/fesm2022/taiga-ui-kit-components-input-phone.mjs +37 -41
  215. package/fesm2022/taiga-ui-kit-components-input-phone.mjs.map +1 -1
  216. package/fesm2022/taiga-ui-kit-components-input-pin.mjs +24 -22
  217. package/fesm2022/taiga-ui-kit-components-input-pin.mjs.map +1 -1
  218. package/fesm2022/taiga-ui-kit-components-input-range.mjs +42 -69
  219. package/fesm2022/taiga-ui-kit-components-input-range.mjs.map +1 -1
  220. package/fesm2022/taiga-ui-kit-components-input-slider.mjs +13 -7
  221. package/fesm2022/taiga-ui-kit-components-input-slider.mjs.map +1 -1
  222. package/fesm2022/taiga-ui-kit-components-input-time.mjs +37 -37
  223. package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
  224. package/fesm2022/taiga-ui-kit-components-input-year.mjs +30 -35
  225. package/fesm2022/taiga-ui-kit-components-input-year.mjs.map +1 -1
  226. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +50 -70
  227. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs.map +1 -1
  228. package/fesm2022/taiga-ui-kit-components-like.mjs +3 -3
  229. package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -1
  230. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +14 -14
  231. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
  232. package/fesm2022/taiga-ui-kit-components-message.mjs +7 -7
  233. package/fesm2022/taiga-ui-kit-components-message.mjs.map +1 -1
  234. package/fesm2022/taiga-ui-kit-components-multi-select.mjs +27 -32
  235. package/fesm2022/taiga-ui-kit-components-multi-select.mjs.map +1 -1
  236. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs +12 -12
  237. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs.map +1 -1
  238. package/fesm2022/taiga-ui-kit-components-pager.mjs +30 -44
  239. package/fesm2022/taiga-ui-kit-components-pager.mjs.map +1 -1
  240. package/fesm2022/taiga-ui-kit-components-pagination.mjs +65 -150
  241. package/fesm2022/taiga-ui-kit-components-pagination.mjs.map +1 -1
  242. package/fesm2022/taiga-ui-kit-components-pin.mjs +7 -7
  243. package/fesm2022/taiga-ui-kit-components-preview.mjs +77 -145
  244. package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
  245. package/fesm2022/taiga-ui-kit-components-progress.mjs +44 -63
  246. package/fesm2022/taiga-ui-kit-components-progress.mjs.map +1 -1
  247. package/fesm2022/taiga-ui-kit-components-pulse.mjs +7 -11
  248. package/fesm2022/taiga-ui-kit-components-pulse.mjs.map +1 -1
  249. package/fesm2022/taiga-ui-kit-components-push.mjs +23 -36
  250. package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
  251. package/fesm2022/taiga-ui-kit-components-radio-list.mjs +23 -35
  252. package/fesm2022/taiga-ui-kit-components-radio-list.mjs.map +1 -1
  253. package/fesm2022/taiga-ui-kit-components-radio.mjs +6 -6
  254. package/fesm2022/taiga-ui-kit-components-radio.mjs.map +1 -1
  255. package/fesm2022/taiga-ui-kit-components-range.mjs +19 -29
  256. package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
  257. package/fesm2022/taiga-ui-kit-components-rating.mjs +4 -4
  258. package/fesm2022/taiga-ui-kit-components-rating.mjs.map +1 -1
  259. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs +4 -4
  260. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs.map +1 -1
  261. package/fesm2022/taiga-ui-kit-components-segmented.mjs +7 -7
  262. package/fesm2022/taiga-ui-kit-components-segmented.mjs.map +1 -1
  263. package/fesm2022/taiga-ui-kit-components-select.mjs +48 -25
  264. package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
  265. package/fesm2022/taiga-ui-kit-components-slider.mjs +49 -67
  266. package/fesm2022/taiga-ui-kit-components-slider.mjs.map +1 -1
  267. package/fesm2022/taiga-ui-kit-components-status.mjs +6 -6
  268. package/fesm2022/taiga-ui-kit-components-stepper.mjs +36 -29
  269. package/fesm2022/taiga-ui-kit-components-stepper.mjs.map +1 -1
  270. package/fesm2022/taiga-ui-kit-components-switch.mjs +9 -4
  271. package/fesm2022/taiga-ui-kit-components-switch.mjs.map +1 -1
  272. package/fesm2022/taiga-ui-kit-components-tabs.mjs +73 -126
  273. package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
  274. package/fesm2022/taiga-ui-kit-components-textarea.mjs +59 -69
  275. package/fesm2022/taiga-ui-kit-components-textarea.mjs.map +1 -1
  276. package/fesm2022/taiga-ui-kit-components-tiles.mjs +36 -68
  277. package/fesm2022/taiga-ui-kit-components-tiles.mjs.map +1 -1
  278. package/fesm2022/taiga-ui-kit-components-toast.mjs +20 -21
  279. package/fesm2022/taiga-ui-kit-components-toast.mjs.map +1 -1
  280. package/fesm2022/taiga-ui-kit-components-tree.mjs +60 -91
  281. package/fesm2022/taiga-ui-kit-components-tree.mjs.map +1 -1
  282. package/fesm2022/taiga-ui-kit-components.mjs +0 -3
  283. package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
  284. package/fesm2022/taiga-ui-kit-directives-appearance-proxy.mjs +27 -0
  285. package/fesm2022/taiga-ui-kit-directives-appearance-proxy.mjs.map +1 -0
  286. package/fesm2022/taiga-ui-kit-directives-button-close.mjs +3 -3
  287. package/fesm2022/taiga-ui-kit-directives-button-group.mjs +7 -7
  288. package/fesm2022/taiga-ui-kit-directives-button-group.mjs.map +1 -1
  289. package/fesm2022/taiga-ui-kit-directives-button-select.mjs +6 -6
  290. package/fesm2022/taiga-ui-kit-directives-button-select.mjs.map +1 -1
  291. package/fesm2022/taiga-ui-kit-directives-chevron.mjs +8 -8
  292. package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
  293. package/fesm2022/taiga-ui-kit-directives-connected.mjs +7 -7
  294. package/fesm2022/taiga-ui-kit-directives-connected.mjs.map +1 -1
  295. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs +4 -4
  296. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs.map +1 -1
  297. package/fesm2022/taiga-ui-kit-directives-fade.mjs +25 -34
  298. package/fesm2022/taiga-ui-kit-directives-fade.mjs.map +1 -1
  299. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs +3 -3
  300. package/fesm2022/taiga-ui-kit-directives-highlight.mjs +16 -20
  301. package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
  302. package/fesm2022/taiga-ui-kit-directives-password.mjs +5 -5
  303. package/fesm2022/taiga-ui-kit-directives-password.mjs.map +1 -1
  304. package/fesm2022/taiga-ui-kit-directives-present.mjs +10 -17
  305. package/fesm2022/taiga-ui-kit-directives-present.mjs.map +1 -1
  306. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs +6 -6
  307. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs +6 -6
  308. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs +7 -6
  309. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs.map +1 -1
  310. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs +8 -8
  311. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs.map +1 -1
  312. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs +7 -9
  313. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs.map +1 -1
  314. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs +9 -13
  315. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs.map +1 -1
  316. package/fesm2022/taiga-ui-kit-directives.mjs +1 -1
  317. package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs +43 -0
  318. package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs.map +1 -0
  319. package/fesm2022/taiga-ui-kit-pipes-emails.mjs +3 -3
  320. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +12 -24
  321. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
  322. package/fesm2022/taiga-ui-kit-pipes-flag.mjs +30 -0
  323. package/fesm2022/taiga-ui-kit-pipes-flag.mjs.map +1 -0
  324. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs +3 -3
  325. package/fesm2022/taiga-ui-kit-pipes-initials.mjs +28 -0
  326. package/fesm2022/taiga-ui-kit-pipes-initials.mjs.map +1 -0
  327. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs +10 -8
  328. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs.map +1 -1
  329. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs +3 -3
  330. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs.map +1 -1
  331. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs +3 -3
  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 +4 -108
  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 +26 -26
  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 +13 -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/avatar.less +14 -14
  350. package/styles/components/badge.less +3 -3
  351. package/styles/components/block.less +4 -4
  352. package/styles/components/chip.less +3 -3
  353. package/styles/components/comment.less +1 -1
  354. package/styles/components/message.less +1 -1
  355. package/styles/components/pin.less +3 -3
  356. package/styles/components/switch.less +3 -2
  357. package/styles/components/toast.less +1 -1
  358. package/tokens/i18n.d.ts +1 -0
  359. package/tokens/index.d.ts +0 -7
  360. package/utils/index.d.ts +0 -2
  361. package/utils/maskito.binding.d.ts +1 -1
  362. package/components/elastic-container/elastic-container.component.d.ts +0 -8
  363. package/components/elastic-container/elastic-container.directive.d.ts +0 -7
  364. package/components/elastic-container/index.d.ts +0 -2
  365. package/components/floating-container/floating-container.directive.d.ts +0 -7
  366. package/components/floating-container/index.d.ts +0 -1
  367. package/components/input-range/input-range.d.ts +0 -3
  368. package/components/slides/index.d.ts +0 -1
  369. package/components/slides/slides.directive.d.ts +0 -11
  370. package/components/textarea/textarea-limit.directive.d.ts +0 -26
  371. package/directives/lazy-loading/index.d.ts +0 -2
  372. package/directives/lazy-loading/lazy-loading.directive.d.ts +0 -18
  373. package/directives/lazy-loading/lazy-loading.service.d.ts +0 -12
  374. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs +0 -77
  375. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs.map +0 -1
  376. package/fesm2022/taiga-ui-kit-components-floating-container.mjs +0 -37
  377. package/fesm2022/taiga-ui-kit-components-floating-container.mjs.map +0 -1
  378. package/fesm2022/taiga-ui-kit-components-slides.mjs +0 -49
  379. package/fesm2022/taiga-ui-kit-components-slides.mjs.map +0 -1
  380. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs +0 -80
  381. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs.map +0 -1
  382. package/tokens/calendar-date-stream.d.ts +0 -10
  383. package/tokens/date-inputs-value-transformers.d.ts +0 -19
  384. package/tokens/input-date-options.d.ts +0 -15
  385. package/tokens/items-handlers.d.ts +0 -20
  386. package/tokens/mobile-calendar.d.ts +0 -6
  387. package/tokens/month-formatter.d.ts +0 -5
  388. package/utils/phone.d.ts +0 -3
  389. package/utils/toggle-day.d.ts +0 -2
  390. /package/{tokens/preview-icons.d.ts → components/preview/preview.options.d.ts} +0 -0
@@ -1,13 +1,15 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, computed, effect, signal, untracked, Input, Directive, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
2
+ import { inject, computed, effect, untracked, Directive, input, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
3
  import { tuiDirectiveBinding, tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
4
- import { changeDateSeparator } from '@taiga-ui/cdk/utils/miscellaneous';
5
- import * as i1 from '@taiga-ui/core/components/textfield';
6
- import { TuiTextfieldComponent, tuiInjectAuxiliary, TuiTextfieldDirective, tuiTextfieldIcon, TuiWithNativePicker, TuiWithTextfield, TuiTextfieldContent } from '@taiga-ui/core/components/textfield';
4
+ import * as i1$1 from '@taiga-ui/core/components/textfield';
5
+ import { TuiTextfieldComponent, tuiInjectAuxiliary, tuiTextfieldIcon, TuiWithNativePicker, TuiTextfieldContent, TuiTextfieldOptionsDirective } from '@taiga-ui/core/components/textfield';
7
6
  import { TUI_DATE_FORMAT } from '@taiga-ui/core/tokens';
8
7
  import { TUI_DATE_TEXTS } from '@taiga-ui/kit/tokens';
9
8
  import { identity } from 'rxjs';
10
9
  import { TuiCalendar } from '@taiga-ui/core/components/calendar';
10
+ import { TuiLabel } from '@taiga-ui/core/components/label';
11
+ import * as i2 from '@taiga-ui/core/portals/dropdown';
12
+ import { TuiDropdownOpen, tuiDropdownEnabled, TuiDropdownAuto, TuiDropdownContent } from '@taiga-ui/core/portals/dropdown';
11
13
  import { TUI_LAST_DAY, TUI_FIRST_DAY, TuiDay, DATE_FILLER_LENGTH } from '@taiga-ui/cdk/date-time';
12
14
  import * as i4 from '@maskito/angular';
13
15
  import { MaskitoDirective } from '@maskito/angular';
@@ -16,14 +18,17 @@ import { TUI_IDENTITY_VALUE_TRANSFORMER, TuiControl, tuiAsControl, tuiValueTrans
16
18
  import { TUI_IS_MOBILE } from '@taiga-ui/cdk/tokens';
17
19
  import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
18
20
  import { tuiAsOptionContent } from '@taiga-ui/core/components/data-list';
19
- import * as i2 from '@taiga-ui/core/directives/dropdown';
20
- import { tuiDropdownOpen, tuiDropdownEnabled, TuiDropdownAuto } from '@taiga-ui/core/directives/dropdown';
21
+ import * as i1 from '@taiga-ui/core/components/input';
22
+ import { TuiInputDirective, TuiWithInput } from '@taiga-ui/core/components/input';
21
23
  import * as i3 from '@taiga-ui/core/directives/items-handlers';
22
- import { TuiItemsHandlersDirective, TUI_ITEMS_HANDLERS, TuiItemsHandlersValidator } from '@taiga-ui/core/directives/items-handlers';
24
+ import { TuiItemsHandlersDirective, TuiItemsHandlersValidator } from '@taiga-ui/core/directives/items-handlers';
23
25
  import { TuiCalendarRange } from '@taiga-ui/kit/components/calendar-range';
24
26
  import { TuiSelectOption } from '@taiga-ui/kit/components/select';
25
27
  import { tuiMaskito } from '@taiga-ui/kit/utils';
26
28
 
29
+ function changeDateSeparator(dateString, newDateSeparator) {
30
+ return dateString.replaceAll(/[^0-9A-Za-zА-Яа-я]/gi, newDateSeparator);
31
+ }
27
32
  function tuiWithDateFiller(fn = identity) {
28
33
  const texts = inject(TUI_DATE_TEXTS);
29
34
  const format = inject(TUI_DATE_FORMAT);
@@ -35,37 +40,33 @@ function tuiWithDateFiller(fn = identity) {
35
40
  }), {});
36
41
  }
37
42
 
38
- const TUI_INPUT_DATE_DEFAULT_OPTIONS_NEW = {
43
+ const TUI_INPUT_DATE_DEFAULT_OPTIONS = {
39
44
  icon: () => '@tui.calendar',
40
45
  min: TUI_FIRST_DAY,
41
46
  max: TUI_LAST_DAY,
42
47
  valueTransformer: TUI_IDENTITY_VALUE_TRANSFORMER,
43
48
  };
44
- const [TUI_INPUT_DATE_OPTIONS_NEW, tuiInputDateOptionsProviderNew] = tuiCreateOptions(TUI_INPUT_DATE_DEFAULT_OPTIONS_NEW);
49
+ const [TUI_INPUT_DATE_OPTIONS, tuiInputDateOptionsProvider] = tuiCreateOptions(TUI_INPUT_DATE_DEFAULT_OPTIONS);
45
50
 
46
- const TUI_DATE_ADAPTER = {
47
- DMY: 'dd/mm/yyyy',
48
- MDY: 'mm/dd/yyyy',
49
- YMD: 'yyyy/mm/dd',
50
- };
51
51
  class TuiInputDateBase extends TuiControl {
52
52
  constructor() {
53
53
  super(...arguments);
54
54
  this.calendar = tuiInjectAuxiliary((x) => x instanceof TuiCalendar || x instanceof TuiCalendarRange);
55
55
  this.el = tuiInjectElement();
56
- this.textfield = inject(TuiTextfieldDirective);
56
+ this.input = inject(TuiInputDirective);
57
57
  this.filler = tuiWithDateFiller();
58
58
  this.mobile = inject(TUI_IS_MOBILE);
59
- this.open = tuiDropdownOpen();
60
- this.icon = tuiTextfieldIcon(TUI_INPUT_DATE_OPTIONS_NEW);
59
+ this.open = inject(TuiDropdownOpen).open;
60
+ this.icon = tuiTextfieldIcon(TUI_INPUT_DATE_OPTIONS);
61
61
  this.handlers = inject(TuiItemsHandlersDirective);
62
- this.dropdownEnabled = tuiDropdownEnabled(computed(() => !this.native && this.interactive()));
63
- this.options = inject(TUI_INPUT_DATE_OPTIONS_NEW);
64
62
  this.format = inject(TUI_DATE_FORMAT);
63
+ this.dropdownEnabled = tuiDropdownEnabled(computed(() => !this.native && this.interactive()));
64
+ this.identity = tuiDirectiveBinding(TuiItemsHandlersDirective, 'identityMatcher', (a, b) => a.daySame(b), {});
65
+ this.options = inject(TUI_INPUT_DATE_OPTIONS);
65
66
  this.valueEffect = effect(() => {
66
67
  const value = this.stringify(this.value()) ||
67
68
  (this.filler().length === this.el.value.length ? '' : this.el.value);
68
- this.textfield.value.set(value);
69
+ this.input.value.set(value);
69
70
  });
70
71
  this.calendarIn = effect(() => {
71
72
  if (this.calendar()) {
@@ -77,21 +78,13 @@ class TuiInputDateBase extends TuiControl {
77
78
  onCleanup(() => subscription?.unsubscribe());
78
79
  });
79
80
  this.native = !!inject(TuiWithNativePicker, { optional: true }) && this.mobile;
80
- this.min = signal(this.options.min);
81
- this.max = signal(this.options.max);
82
- }
83
- set minSetter(min) {
84
- this.min.set(min instanceof TuiDay ? min : this.options.min);
85
- }
86
- set maxSetter(max) {
87
- this.max.set(max instanceof TuiDay ? max : this.options.max);
88
81
  }
89
82
  writeValue(value) {
90
83
  const reset = this.control.pristine && this.control.untouched && !value;
91
84
  const changed = untracked(() => value !== this.value());
92
85
  if (changed || reset) {
93
86
  super.writeValue(value);
94
- this.textfield.value.set(this.stringify(this.value()));
87
+ this.input.value.set(this.stringify(this.value()));
95
88
  }
96
89
  }
97
90
  setDate(value) {
@@ -117,10 +110,10 @@ class TuiInputDateBase extends TuiControl {
117
110
  stringify(value) {
118
111
  return value?.toString(this.format().mode, this.format().separator) ?? '';
119
112
  }
120
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputDateBase, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
121
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiInputDateBase, isStandalone: true, inputs: { minSetter: ["min", "minSetter"], maxSetter: ["max", "maxSetter"] }, host: { listeners: { "input": "onValueChange($event.target.value)", "click.capture.stop": "onClick()" }, properties: { "attr.inputmode": "mobile && open() ? \"none\" : \"numeric\"", "disabled": "disabled()" } }, usesInheritance: true, ngImport: i0 }); }
113
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputDateBase, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
114
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiInputDateBase, isStandalone: true, host: { listeners: { "input": "onValueChange($event.target.value)", "click.capture.stop": "onClick()" }, properties: { "attr.inputmode": "mobile && open() ? \"none\" : \"numeric\"", "disabled": "disabled()" } }, usesInheritance: true, ngImport: i0 }); }
122
115
  }
123
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputDateBase, decorators: [{
116
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputDateBase, decorators: [{
124
117
  type: Directive,
125
118
  args: [{
126
119
  host: {
@@ -130,20 +123,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
130
123
  '(click.capture.stop)': 'onClick()',
131
124
  },
132
125
  }]
133
- }], propDecorators: { minSetter: [{
134
- type: Input,
135
- args: ['min']
136
- }], maxSetter: [{
137
- type: Input,
138
- args: ['max']
139
- }] } });
126
+ }] });
140
127
  class TuiInputDateDirective extends TuiInputDateBase {
141
128
  constructor() {
142
129
  super(...arguments);
143
- this.identity = inject(TUI_ITEMS_HANDLERS).identityMatcher.set((a, b) => a.daySame(b));
130
+ this.max = input(this.options.max, {
131
+ transform: (max) => max instanceof TuiDay ? max : TUI_LAST_DAY,
132
+ });
133
+ this.min = input(this.options.min, {
134
+ transform: (min) => min instanceof TuiDay ? min : TUI_FIRST_DAY,
135
+ });
144
136
  this.mask = tuiMaskito(computed(() => maskitoDateOptionsGenerator({
145
137
  separator: this.format().separator,
146
- mode: TUI_DATE_ADAPTER[this.format().mode],
138
+ mode: this.format().mode,
147
139
  min: this.min().toLocalNativeDate(),
148
140
  max: this.max().toLocalNativeDate(),
149
141
  })));
@@ -154,24 +146,24 @@ class TuiInputDateDirective extends TuiInputDateBase {
154
146
  ? TuiDay.normalizeParse(value, this.format().mode)
155
147
  : null);
156
148
  }
157
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputDateDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
158
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiInputDateDirective, isStandalone: true, selector: "input[tuiInputDate]", providers: [
149
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputDateDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
150
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiInputDateDirective, isStandalone: true, selector: "input[tuiInputDate]", inputs: { max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
159
151
  tuiAsOptionContent(TuiSelectOption),
160
152
  tuiAsControl(TuiInputDateDirective),
161
- tuiValueTransformerFrom(TUI_INPUT_DATE_OPTIONS_NEW),
162
- ], usesInheritance: true, hostDirectives: [{ directive: i1.TuiWithTextfield }, { directive: i2.TuiDropdownAuto }, { directive: i3.TuiItemsHandlersValidator }, { directive: i4.MaskitoDirective }], ngImport: i0 }); }
153
+ tuiValueTransformerFrom(TUI_INPUT_DATE_OPTIONS),
154
+ ], usesInheritance: true, hostDirectives: [{ directive: i1.TuiWithInput }, { directive: i2.TuiDropdownAuto }, { directive: i3.TuiItemsHandlersValidator }, { directive: i4.MaskitoDirective }], ngImport: i0 }); }
163
155
  }
164
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputDateDirective, decorators: [{
156
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputDateDirective, decorators: [{
165
157
  type: Directive,
166
158
  args: [{
167
159
  selector: 'input[tuiInputDate]',
168
160
  providers: [
169
161
  tuiAsOptionContent(TuiSelectOption),
170
162
  tuiAsControl(TuiInputDateDirective),
171
- tuiValueTransformerFrom(TUI_INPUT_DATE_OPTIONS_NEW),
163
+ tuiValueTransformerFrom(TUI_INPUT_DATE_OPTIONS),
172
164
  ],
173
165
  hostDirectives: [
174
- TuiWithTextfield,
166
+ TuiWithInput,
175
167
  TuiDropdownAuto,
176
168
  TuiItemsHandlersValidator,
177
169
  MaskitoDirective,
@@ -182,7 +174,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
182
174
  class TuiInputDateComponent {
183
175
  constructor() {
184
176
  this.host = inject(TuiInputDateDirective);
185
- this.list = null;
177
+ this.list = input();
186
178
  }
187
179
  onInput(value) {
188
180
  if (!value) {
@@ -191,28 +183,30 @@ class TuiInputDateComponent {
191
183
  const [year = 0, month = 0, day = 0] = value.split('-').map(Number);
192
184
  this.host.onChange(new TuiDay(year, month - 1, day));
193
185
  }
194
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
195
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiInputDateComponent, isStandalone: true, selector: "input[tuiInputDate][type=\"date\"]", inputs: { list: "list" }, host: { attributes: { "ngSkipHydration": "true" }, properties: { "attr.list": "null" } }, hostDirectives: [{ directive: i1.TuiWithNativePicker }], ngImport: i0, template: "@if (host.native) {\n <input\n *tuiTextfieldContent\n type=\"date\"\n [attr.list]=\"list\"\n [max]=\"host.max().toJSON()\"\n [min]=\"host.min().toJSON()\"\n [value]=\"host.value()?.toJSON()\"\n (click.stop.zoneless)=\"(0)\"\n (input)=\"onInput($any($event.target).value)\"\n (pointerdown.stop.zoneless)=\"(0)\"\n />\n}\n", styles: ["tui-textfield input[tuiInputDate]~.t-content input[type=date]{position:absolute;inset:0 0 0 auto;inline-size:2.5rem;padding:0;opacity:0}tui-textfield input[tuiInputDate]~.t-content input[type=date]::-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 }); }
186
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
187
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiInputDateComponent, isStandalone: true, selector: "input[tuiInputDate][type=\"date\"]", inputs: { list: { classPropertyName: "list", publicName: "list", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "ngSkipHydration": "true" }, properties: { "attr.list": "null" } }, hostDirectives: [{ directive: i1$1.TuiWithNativePicker }], ngImport: i0, template: "@if (host.native) {\n <input\n *tuiTextfieldContent\n type=\"date\"\n [attr.list]=\"list()\"\n [max]=\"host.max().toJSON()\"\n [min]=\"host.min().toJSON()\"\n [value]=\"host.value()?.toJSON()\"\n (click.stop.zoneless)=\"(0)\"\n (input)=\"onInput($any($event.target).value)\"\n (pointerdown.stop.zoneless)=\"(0)\"\n />\n}\n", styles: ["tui-textfield input[tuiInputDate]~.t-content input[type=date]{position:absolute;inset:0 0 0 auto;inline-size:2.5rem;padding:0;opacity:0}tui-textfield input[tuiInputDate]~.t-content input[type=date]::-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 }); }
196
188
  }
197
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputDateComponent, decorators: [{
189
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputDateComponent, decorators: [{
198
190
  type: Component,
199
191
  args: [{ selector: 'input[tuiInputDate][type="date"]', imports: [TuiTextfieldContent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [TuiWithNativePicker], host: {
200
192
  ngSkipHydration: 'true',
201
193
  '[attr.list]': 'null',
202
- }, template: "@if (host.native) {\n <input\n *tuiTextfieldContent\n type=\"date\"\n [attr.list]=\"list\"\n [max]=\"host.max().toJSON()\"\n [min]=\"host.min().toJSON()\"\n [value]=\"host.value()?.toJSON()\"\n (click.stop.zoneless)=\"(0)\"\n (input)=\"onInput($any($event.target).value)\"\n (pointerdown.stop.zoneless)=\"(0)\"\n />\n}\n", styles: ["tui-textfield input[tuiInputDate]~.t-content input[type=date]{position:absolute;inset:0 0 0 auto;inline-size:2.5rem;padding:0;opacity:0}tui-textfield input[tuiInputDate]~.t-content input[type=date]::-webkit-calendar-picker-indicator{position:absolute;top:0;left:0;inline-size:100%;block-size:100%}\n"] }]
203
- }], propDecorators: { list: [{
204
- type: Input
205
- }] } });
194
+ }, template: "@if (host.native) {\n <input\n *tuiTextfieldContent\n type=\"date\"\n [attr.list]=\"list()\"\n [max]=\"host.max().toJSON()\"\n [min]=\"host.min().toJSON()\"\n [value]=\"host.value()?.toJSON()\"\n (click.stop.zoneless)=\"(0)\"\n (input)=\"onInput($any($event.target).value)\"\n (pointerdown.stop.zoneless)=\"(0)\"\n />\n}\n", styles: ["tui-textfield input[tuiInputDate]~.t-content input[type=date]{position:absolute;inset:0 0 0 auto;inline-size:2.5rem;padding:0;opacity:0}tui-textfield input[tuiInputDate]~.t-content input[type=date]::-webkit-calendar-picker-indicator{position:absolute;top:0;left:0;inline-size:100%;block-size:100%}\n"] }]
195
+ }] });
206
196
 
207
197
  const TuiInputDate = [
208
198
  TuiInputDateDirective,
209
199
  TuiInputDateComponent,
210
200
  TuiCalendar,
201
+ TuiLabel,
202
+ TuiTextfieldComponent,
203
+ TuiTextfieldOptionsDirective,
204
+ TuiDropdownContent,
211
205
  ];
212
206
 
213
207
  /**
214
208
  * Generated bundle index. Do not edit.
215
209
  */
216
210
 
217
- export { TUI_DATE_ADAPTER, TUI_INPUT_DATE_DEFAULT_OPTIONS_NEW, TUI_INPUT_DATE_OPTIONS_NEW, TuiInputDate, TuiInputDateBase, TuiInputDateComponent, TuiInputDateDirective, tuiInputDateOptionsProviderNew, tuiWithDateFiller };
211
+ export { TUI_INPUT_DATE_DEFAULT_OPTIONS, TUI_INPUT_DATE_OPTIONS, TuiInputDate, TuiInputDateBase, TuiInputDateComponent, TuiInputDateDirective, tuiInputDateOptionsProvider, tuiWithDateFiller };
218
212
  //# sourceMappingURL=taiga-ui-kit-components-input-date.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-input-date.mjs","sources":["../../../projects/kit/components/input-date/date-filler.ts","../../../projects/kit/components/input-date/input-date.options.ts","../../../projects/kit/components/input-date/input-date.directive.ts","../../../projects/kit/components/input-date/input-date.component.ts","../../../projects/kit/components/input-date/input-date.template.html","../../../projects/kit/components/input-date/input-date.ts","../../../projects/kit/components/input-date/taiga-ui-kit-components-input-date.ts"],"sourcesContent":["import {computed, inject, type Signal} from '@angular/core';\nimport {tuiDirectiveBinding} from '@taiga-ui/cdk/utils/di';\nimport {changeDateSeparator} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\nimport {TUI_DATE_FORMAT} from '@taiga-ui/core/tokens';\nimport {TUI_DATE_TEXTS} from '@taiga-ui/kit/tokens';\nimport {identity} from 'rxjs';\n\nexport function tuiWithDateFiller(\n fn: (dateFiller: string) => string = identity,\n): Signal<string> {\n const texts = inject(TUI_DATE_TEXTS);\n const format = inject(TUI_DATE_FORMAT);\n\n return tuiDirectiveBinding(\n TuiTextfieldComponent,\n 'filler',\n computed(() => {\n const {mode, separator} = format();\n const fillersMap = texts() ?? '';\n const filler = fillersMap && changeDateSeparator(fillersMap[mode], separator);\n\n return fn(filler);\n }),\n {},\n );\n}\n","import {\n TUI_IDENTITY_VALUE_TRANSFORMER,\n type TuiValueTransformer,\n} from '@taiga-ui/cdk/classes';\nimport {TUI_FIRST_DAY, TUI_LAST_DAY, type TuiDay} 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 TuiInputDateOptionsNew {\n readonly icon: TuiHandler<TuiSizeL | TuiSizeS, string>;\n readonly max: TuiDay;\n readonly min: TuiDay;\n readonly valueTransformer: TuiValueTransformer<TuiDay | null, any>;\n}\n\nexport const TUI_INPUT_DATE_DEFAULT_OPTIONS_NEW = {\n icon: () => '@tui.calendar',\n min: TUI_FIRST_DAY,\n max: TUI_LAST_DAY,\n valueTransformer: TUI_IDENTITY_VALUE_TRANSFORMER,\n} as const;\n\nexport const [TUI_INPUT_DATE_OPTIONS_NEW, tuiInputDateOptionsProviderNew] =\n tuiCreateOptions<TuiInputDateOptionsNew>(TUI_INPUT_DATE_DEFAULT_OPTIONS_NEW);\n","import {\n computed,\n Directive,\n effect,\n inject,\n Input,\n signal,\n untracked,\n} from '@angular/core';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {type MaskitoDateMode, maskitoDateOptionsGenerator} from '@maskito/kit';\nimport {tuiAsControl, TuiControl, tuiValueTransformerFrom} from '@taiga-ui/cdk/classes';\nimport {\n DATE_FILLER_LENGTH,\n type TuiDateMode,\n TuiDay,\n type TuiDayRange,\n type TuiTime,\n} from '@taiga-ui/cdk/date-time';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {type TuiBooleanHandler} from '@taiga-ui/cdk/types';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TuiCalendar} from '@taiga-ui/core/components/calendar';\nimport {tuiAsOptionContent} from '@taiga-ui/core/components/data-list';\nimport {\n tuiInjectAuxiliary,\n TuiTextfieldDirective,\n tuiTextfieldIcon,\n TuiWithNativePicker,\n TuiWithTextfield,\n} from '@taiga-ui/core/components/textfield';\nimport {\n TuiDropdownAuto,\n tuiDropdownEnabled,\n tuiDropdownOpen,\n} from '@taiga-ui/core/directives/dropdown';\nimport {\n TUI_ITEMS_HANDLERS,\n type TuiItemsHandlers,\n TuiItemsHandlersDirective,\n TuiItemsHandlersValidator,\n} from '@taiga-ui/core/directives/items-handlers';\nimport {TUI_DATE_FORMAT} from '@taiga-ui/core/tokens';\nimport {TuiCalendarRange} from '@taiga-ui/kit/components/calendar-range';\nimport {TuiSelectOption} from '@taiga-ui/kit/components/select';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\n\nimport {tuiWithDateFiller} from './date-filler';\nimport {\n TUI_INPUT_DATE_OPTIONS_NEW,\n type TuiInputDateOptionsNew,\n} from './input-date.options';\n\nexport const TUI_DATE_ADAPTER: Record<TuiDateMode, MaskitoDateMode> = {\n DMY: 'dd/mm/yyyy',\n MDY: 'mm/dd/yyyy',\n YMD: 'yyyy/mm/dd',\n};\n\n@Directive({\n host: {\n '[attr.inputmode]': 'mobile && open() ? \"none\" : \"numeric\"',\n '[disabled]': 'disabled()',\n '(input)': 'onValueChange($event.target.value)',\n '(click.capture.stop)': 'onClick()',\n },\n})\nexport abstract class TuiInputDateBase<\n T extends TuiDay | TuiDayRange | readonly [TuiDay, TuiTime | null],\n> extends TuiControl<T | null> {\n private readonly calendar = tuiInjectAuxiliary<TuiCalendar | TuiCalendarRange>(\n (x) => x instanceof TuiCalendar || x instanceof TuiCalendarRange,\n );\n\n protected readonly el = tuiInjectElement<HTMLInputElement>();\n protected readonly textfield = inject(TuiTextfieldDirective);\n protected readonly filler = tuiWithDateFiller();\n protected readonly mobile = inject(TUI_IS_MOBILE);\n protected readonly open = tuiDropdownOpen();\n protected readonly icon = tuiTextfieldIcon(TUI_INPUT_DATE_OPTIONS_NEW);\n protected readonly handlers = inject<TuiItemsHandlers<T>>(TuiItemsHandlersDirective);\n\n protected readonly dropdownEnabled = tuiDropdownEnabled(\n computed(() => !this.native && this.interactive()),\n );\n\n protected readonly options: Omit<TuiInputDateOptionsNew, 'valueTransformer'> = inject(\n TUI_INPUT_DATE_OPTIONS_NEW,\n );\n\n protected readonly format = inject(TUI_DATE_FORMAT);\n\n protected readonly valueEffect = effect(() => {\n const value =\n this.stringify(this.value()) ||\n (this.filler().length === this.el.value.length ? '' : this.el.value);\n\n this.textfield.value.set(value);\n });\n\n protected readonly calendarIn = effect(() => {\n if (this.calendar()) {\n this.processCalendar(this.calendar()!);\n }\n });\n\n protected readonly calendarOut = effect((onCleanup) => {\n const subscription = this.calendar()?.valueChange.subscribe((value) =>\n this.setDate(value),\n );\n\n onCleanup(() => subscription?.unsubscribe());\n });\n\n public readonly native =\n !!inject(TuiWithNativePicker, {optional: true}) && this.mobile;\n\n public readonly min = signal(this.options.min);\n public readonly max = signal(this.options.max);\n\n protected abstract onValueChange(value: string): void;\n\n @Input('min')\n public set minSetter(min: Exclude<T, TuiDayRange> | TuiDay | null) {\n this.min.set(min instanceof TuiDay ? min : this.options.min);\n }\n\n @Input('max')\n public set maxSetter(max: Exclude<T, TuiDayRange> | TuiDay | null) {\n this.max.set(max instanceof TuiDay ? max : this.options.max);\n }\n\n public override writeValue(value: T | 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 this.textfield.value.set(this.stringify(this.value()));\n }\n }\n\n public setDate(value: TuiDay | TuiDayRange | readonly TuiDay[]): void {\n this.onChange(value as T);\n this.open.set(false);\n\n if (!this.el.closest('tui-dropdown')) {\n this.el.blur();\n }\n }\n\n protected processCalendar(calendar: TuiCalendar | TuiCalendarRange): void {\n const value = this.value();\n\n calendar.value = Array.isArray(value) ? value[0] : value;\n calendar.disabledItemHandler =\n this.handlers.disabledItemHandler() as TuiBooleanHandler<\n TuiDay | TuiDayRange\n >;\n calendar.min = this.min();\n calendar.max = this.max();\n }\n\n protected onClick(): void {\n if (!this.mobile && this.dropdownEnabled()) {\n this.open.update((open) => !open);\n }\n }\n\n protected stringify(value: T | null): string {\n return value?.toString(this.format().mode, this.format().separator) ?? '';\n }\n}\n\n@Directive({\n selector: 'input[tuiInputDate]',\n providers: [\n tuiAsOptionContent(TuiSelectOption),\n tuiAsControl(TuiInputDateDirective),\n tuiValueTransformerFrom(TUI_INPUT_DATE_OPTIONS_NEW),\n ],\n hostDirectives: [\n TuiWithTextfield,\n TuiDropdownAuto,\n TuiItemsHandlersValidator,\n MaskitoDirective,\n ],\n})\nexport class TuiInputDateDirective extends TuiInputDateBase<TuiDay> {\n protected readonly identity = inject<TuiItemsHandlers<TuiDay>>(\n TUI_ITEMS_HANDLERS,\n ).identityMatcher.set((a, b) => a.daySame(b));\n\n protected readonly mask = tuiMaskito(\n computed(() =>\n maskitoDateOptionsGenerator({\n separator: this.format().separator,\n mode: TUI_DATE_ADAPTER[this.format().mode],\n min: this.min().toLocalNativeDate(),\n max: this.max().toLocalNativeDate(),\n }),\n ),\n );\n\n protected override onValueChange(value: string): void {\n this.control?.control?.updateValueAndValidity({emitEvent: false});\n this.onChange(\n value.length === DATE_FILLER_LENGTH\n ? TuiDay.normalizeParse(value, this.format().mode)\n : null,\n );\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n inject,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TuiDay} from '@taiga-ui/cdk/date-time';\nimport {\n TuiTextfieldContent,\n TuiWithNativePicker,\n} from '@taiga-ui/core/components/textfield';\n\nimport {TuiInputDateDirective} from './input-date.directive';\n\n@Component({\n selector: 'input[tuiInputDate][type=\"date\"]',\n imports: [TuiTextfieldContent],\n templateUrl: './input-date.template.html',\n styleUrl: './input-date.style.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiWithNativePicker],\n host: {\n ngSkipHydration: 'true',\n '[attr.list]': 'null',\n },\n})\nexport class TuiInputDateComponent {\n protected readonly host = inject(TuiInputDateDirective);\n\n @Input()\n public list: string | null = null;\n\n protected onInput(value: string): void {\n if (!value) {\n return this.host.onChange(null);\n }\n\n const [year = 0, month = 0, day = 0] = value.split('-').map(Number);\n\n this.host.onChange(new TuiDay(year, month - 1, day));\n }\n}\n","@if (host.native) {\n <input\n *tuiTextfieldContent\n type=\"date\"\n [attr.list]=\"list\"\n [max]=\"host.max().toJSON()\"\n [min]=\"host.min().toJSON()\"\n [value]=\"host.value()?.toJSON()\"\n (click.stop.zoneless)=\"(0)\"\n (input)=\"onInput($any($event.target).value)\"\n (pointerdown.stop.zoneless)=\"(0)\"\n />\n}\n","import {TuiCalendar} from '@taiga-ui/core/components/calendar';\n\nimport {TuiInputDateComponent} from './input-date.component';\nimport {TuiInputDateDirective} from './input-date.directive';\n\nexport const TuiInputDate = [\n TuiInputDateDirective,\n T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EAAA,SAAA,EAAA,EAAA,CAAA,mBAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC5BlC,uYAaA,EAAA,MAAA,EAAA,CAAA,6SAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDIc,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;;4FAWpB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAbjC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kCAAkC,WACnC,CAAC,mBAAmB,CAAC,EAAA,aAAA,EAGf,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,cAAA,EAC/B,CAAC,mBAAmB,CAAC,EAC/B,IAAA,EAAA;AACF,wBAAA,eAAe,EAAE,MAAM;AACvB,wBAAA,aAAa,EAAE,MAAM;AACxB,qBAAA,EAAA,QAAA,EAAA,uYAAA,EAAA,MAAA,EAAA,CAAA,6SAAA,CAAA,EAAA;8BAMM,IAAI,EAAA,CAAA;sBADV;;;AE1BQ,MAAA,YAAY,GAAG;IACxB,qBAAqB;IACrB,qBAAqB;IACrB,WAAW;;;ACRf;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-input-date.mjs","sources":["../../../projects/kit/components/input-date/date-filler.ts","../../../projects/kit/components/input-date/input-date.options.ts","../../../projects/kit/components/input-date/input-date.directive.ts","../../../projects/kit/components/input-date/input-date.component.ts","../../../projects/kit/components/input-date/input-date.template.html","../../../projects/kit/components/input-date/input-date.ts","../../../projects/kit/components/input-date/taiga-ui-kit-components-input-date.ts"],"sourcesContent":["import {computed, inject, type Signal} from '@angular/core';\nimport {tuiDirectiveBinding} from '@taiga-ui/cdk/utils/di';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\nimport {TUI_DATE_FORMAT} from '@taiga-ui/core/tokens';\nimport {TUI_DATE_TEXTS} from '@taiga-ui/kit/tokens';\nimport {identity} from 'rxjs';\n\nfunction changeDateSeparator(dateString: string, newDateSeparator: string): string {\n return dateString.replaceAll(/[^0-9A-Za-zА-Яа-я]/gi, newDateSeparator);\n}\n\nexport function tuiWithDateFiller(\n fn: (dateFiller: string) => string = identity,\n): Signal<string> {\n const texts = inject(TUI_DATE_TEXTS);\n const format = inject(TUI_DATE_FORMAT);\n\n return tuiDirectiveBinding(\n TuiTextfieldComponent,\n 'filler',\n computed(() => {\n const {mode, separator} = format();\n const fillersMap = texts() ?? '';\n const filler = fillersMap && changeDateSeparator(fillersMap[mode], separator);\n\n return fn(filler);\n }),\n {},\n );\n}\n","import {\n TUI_IDENTITY_VALUE_TRANSFORMER,\n type TuiValueTransformer,\n} from '@taiga-ui/cdk/classes';\nimport {TUI_FIRST_DAY, TUI_LAST_DAY, type TuiDay} 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 TuiInputDateOptions {\n readonly icon: TuiHandler<TuiSizeL | TuiSizeS, string>;\n readonly max: TuiDay;\n readonly min: TuiDay;\n readonly valueTransformer: TuiValueTransformer<TuiDay | null, any>;\n}\n\nexport const TUI_INPUT_DATE_DEFAULT_OPTIONS = {\n icon: () => '@tui.calendar',\n min: TUI_FIRST_DAY,\n max: TUI_LAST_DAY,\n valueTransformer: TUI_IDENTITY_VALUE_TRANSFORMER,\n} as const;\n\nexport const [TUI_INPUT_DATE_OPTIONS, tuiInputDateOptionsProvider] =\n tuiCreateOptions<TuiInputDateOptions>(TUI_INPUT_DATE_DEFAULT_OPTIONS);\n","import {\n computed,\n Directive,\n effect,\n inject,\n input,\n type Signal,\n untracked,\n} from '@angular/core';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {maskitoDateOptionsGenerator} from '@maskito/kit';\nimport {tuiAsControl, TuiControl, tuiValueTransformerFrom} from '@taiga-ui/cdk/classes';\nimport {\n DATE_FILLER_LENGTH,\n TUI_FIRST_DAY,\n TUI_LAST_DAY,\n TuiDay,\n type TuiDayRange,\n type TuiTime,\n} from '@taiga-ui/cdk/date-time';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {type TuiBooleanHandler} from '@taiga-ui/cdk/types';\nimport {tuiDirectiveBinding} from '@taiga-ui/cdk/utils/di';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TuiCalendar} from '@taiga-ui/core/components/calendar';\nimport {tuiAsOptionContent} from '@taiga-ui/core/components/data-list';\nimport {TuiInputDirective, TuiWithInput} from '@taiga-ui/core/components/input';\nimport {\n tuiInjectAuxiliary,\n tuiTextfieldIcon,\n TuiWithNativePicker,\n} from '@taiga-ui/core/components/textfield';\nimport {\n type TuiItemsHandlers,\n TuiItemsHandlersDirective,\n TuiItemsHandlersValidator,\n} from '@taiga-ui/core/directives/items-handlers';\nimport {\n TuiDropdownAuto,\n tuiDropdownEnabled,\n TuiDropdownOpen,\n} from '@taiga-ui/core/portals/dropdown';\nimport {TUI_DATE_FORMAT} from '@taiga-ui/core/tokens';\nimport {TuiCalendarRange} from '@taiga-ui/kit/components/calendar-range';\nimport {TuiSelectOption} from '@taiga-ui/kit/components/select';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\n\nimport {tuiWithDateFiller} from './date-filler';\nimport {TUI_INPUT_DATE_OPTIONS, type TuiInputDateOptions} from './input-date.options';\n\n@Directive({\n host: {\n '[attr.inputmode]': 'mobile && open() ? \"none\" : \"numeric\"',\n '[disabled]': 'disabled()',\n '(input)': 'onValueChange($event.target.value)',\n '(click.capture.stop)': 'onClick()',\n },\n})\nexport abstract class TuiInputDateBase<\n T extends TuiDay | TuiDayRange | readonly [TuiDay, TuiTime | null],\n> extends TuiControl<T | null> {\n public abstract readonly max: Signal<TuiDay>;\n public abstract readonly min: Signal<TuiDay>;\n\n private readonly calendar = tuiInjectAuxiliary<TuiCalendar | TuiCalendarRange>(\n (x) => x instanceof TuiCalendar || x instanceof TuiCalendarRange,\n );\n\n protected readonly el = tuiInjectElement<HTMLInputElement>();\n protected readonly input = inject(TuiInputDirective);\n protected readonly filler = tuiWithDateFiller();\n protected readonly mobile = inject(TUI_IS_MOBILE);\n protected readonly open = inject(TuiDropdownOpen).open;\n protected readonly icon = tuiTextfieldIcon(TUI_INPUT_DATE_OPTIONS);\n protected readonly handlers = inject<TuiItemsHandlers<T>>(TuiItemsHandlersDirective);\n protected readonly format = inject(TUI_DATE_FORMAT);\n protected readonly dropdownEnabled = tuiDropdownEnabled(\n computed(() => !this.native && this.interactive()),\n );\n\n protected readonly identity = tuiDirectiveBinding(\n TuiItemsHandlersDirective,\n 'identityMatcher',\n (a: TuiDay, b: TuiDay) => a.daySame(b),\n {},\n );\n\n protected readonly options: Omit<TuiInputDateOptions, 'valueTransformer'> =\n inject(TUI_INPUT_DATE_OPTIONS);\n\n protected readonly valueEffect = effect(() => {\n const value =\n this.stringify(this.value()) ||\n (this.filler().length === this.el.value.length ? '' : this.el.value);\n\n this.input.value.set(value);\n });\n\n protected readonly calendarIn = effect(() => {\n if (this.calendar()) {\n this.processCalendar(this.calendar()!);\n }\n });\n\n protected readonly calendarOut = effect((onCleanup) => {\n const subscription = this.calendar()?.valueChange.subscribe((value) =>\n this.setDate(value),\n );\n\n onCleanup(() => subscription?.unsubscribe());\n });\n\n public readonly native =\n !!inject(TuiWithNativePicker, {optional: true}) && this.mobile;\n\n protected abstract onValueChange(value: string): void;\n\n public override writeValue(value: T | 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 this.input.value.set(this.stringify(this.value()));\n }\n }\n\n public setDate(value: TuiDay | TuiDayRange | readonly TuiDay[]): void {\n this.onChange(value as T);\n this.open.set(false);\n\n if (!this.el.closest('tui-dropdown')) {\n this.el.blur();\n }\n }\n\n protected processCalendar(calendar: TuiCalendar | TuiCalendarRange): void {\n const value = this.value();\n\n calendar.value = Array.isArray(value) ? value[0] : value;\n calendar.disabledItemHandler =\n this.handlers.disabledItemHandler() as TuiBooleanHandler<\n TuiDay | TuiDayRange\n >;\n calendar.min = this.min();\n calendar.max = this.max();\n }\n\n protected onClick(): void {\n if (!this.mobile && this.dropdownEnabled()) {\n this.open.update((open) => !open);\n }\n }\n\n protected stringify(value: T | null): string {\n return value?.toString(this.format().mode, this.format().separator) ?? '';\n }\n}\n\n@Directive({\n selector: 'input[tuiInputDate]',\n providers: [\n tuiAsOptionContent(TuiSelectOption),\n tuiAsControl(TuiInputDateDirective),\n tuiValueTransformerFrom(TUI_INPUT_DATE_OPTIONS),\n ],\n hostDirectives: [\n TuiWithInput,\n TuiDropdownAuto,\n TuiItemsHandlersValidator,\n MaskitoDirective,\n ],\n})\nexport class TuiInputDateDirective extends TuiInputDateBase<TuiDay> {\n public override readonly max = input(this.options.max, {\n transform: (max: TuiDay | null): TuiDay =>\n max instanceof TuiDay ? max : TUI_LAST_DAY,\n });\n\n public override readonly min = input(this.options.min, {\n transform: (min: TuiDay | null): TuiDay =>\n min instanceof TuiDay ? min : TUI_FIRST_DAY,\n });\n\n protected readonly mask = tuiMaskito(\n computed(() =>\n maskitoDateOptionsGenerator({\n separator: this.format().separator,\n mode: this.format().mode,\n min: this.min().toLocalNativeDate(),\n max: this.max().toLocalNativeDate(),\n }),\n ),\n );\n\n protected override onValueChange(value: string): void {\n this.control?.control?.updateValueAndValidity({emitEvent: false});\n this.onChange(\n value.length === DATE_FILLER_LENGTH\n ? TuiDay.normalizeParse(value, this.format().mode)\n : null,\n );\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TuiDay} from '@taiga-ui/cdk/date-time';\nimport {\n TuiTextfieldContent,\n TuiWithNativePicker,\n} from '@taiga-ui/core/components/textfield';\n\nimport {TuiInputDateDirective} from './input-date.directive';\n\n@Component({\n selector: 'input[tuiInputDate][type=\"date\"]',\n imports: [TuiTextfieldContent],\n templateUrl: './input-date.template.html',\n styleUrl: './input-date.style.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiWithNativePicker],\n host: {\n ngSkipHydration: 'true',\n '[attr.list]': 'null',\n },\n})\nexport class TuiInputDateComponent {\n protected readonly host = inject(TuiInputDateDirective);\n\n public readonly list = input<string>();\n\n protected onInput(value: string): void {\n if (!value) {\n return this.host.onChange(null);\n }\n\n const [year = 0, month = 0, day = 0] = value.split('-').map(Number);\n\n this.host.onChange(new TuiDay(year, month - 1, day));\n }\n}\n","@if (host.native) {\n <input\n *tuiTextfieldContent\n type=\"date\"\n [attr.list]=\"list()\"\n [max]=\"host.max().toJSON()\"\n [min]=\"host.min().toJSON()\"\n [value]=\"host.value()?.toJSON()\"\n (click.stop.zoneless)=\"(0)\"\n (input)=\"onInput($any($event.target).value)\"\n (pointerdown.stop.zoneless)=\"(0)\"\n />\n}\n","import {TuiCalendar} 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/dropdown';\n\nimport {TuiInputDateComponent} from './input-date.component';\nimport {TuiInputDateDirective} from './input-date.directive';\n\nexport const TuiInputDate = [\n TuiInputDateDirective,\n TuiInputDateComponent,\n TuiCalendar,\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":";;;;;;;;;;;;;;;;;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,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAAA,IAAA,CAAA,mBAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC5BlC,yYAaA,EAAA,MAAA,EAAA,CAAA,6SAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDIc,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;;4FAWpB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAbjC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kCAAkC,WACnC,CAAC,mBAAmB,CAAC,EAAA,aAAA,EAGf,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,cAAA,EAC/B,CAAC,mBAAmB,CAAC,EAC/B,IAAA,EAAA;AACF,wBAAA,eAAe,EAAE,MAAM;AACvB,wBAAA,aAAa,EAAE,MAAM;AACxB,qBAAA,EAAA,QAAA,EAAA,yYAAA,EAAA,MAAA,EAAA,CAAA,6SAAA,CAAA,EAAA;;;AEfQ,MAAA,YAAY,GAAG;IACxB,qBAAqB;IACrB,qBAAqB;IACrB,WAAW;IACX,QAAQ;IACR,qBAAqB;IACrB,4BAA4B;IAC5B,kBAAkB;;;AClBtB;;AAEG;;;;"}
@@ -1,24 +1,22 @@
1
- import { AsyncPipe } from '@angular/common';
2
1
  import * as i0 from '@angular/core';
3
- import { ContentChild, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
2
+ import { contentChild, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
+ import { toSignal, toObservable } from '@angular/core/rxjs-interop';
4
4
  import { NgControl } from '@angular/forms';
5
5
  import { tuiControlValue } from '@taiga-ui/cdk/observables';
6
- import { defer } from 'rxjs';
6
+ import { switchMap } from 'rxjs';
7
7
 
8
8
  class TuiInputInline {
9
9
  constructor() {
10
- this.value$ = defer(() => tuiControlValue(this.control));
10
+ this.control = contentChild(NgControl);
11
+ this.value = toSignal(toObservable(this.control).pipe(switchMap(tuiControlValue)));
11
12
  }
12
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputInline, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
13
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiInputInline, isStandalone: true, selector: "tui-input-inline", queries: [{ propertyName: "control", first: true, predicate: NgControl, descendants: true }], ngImport: i0, template: "@let value = value$ | async;\n<span\n class=\"t-before\"\n [textContent]=\"value\"\n></span>\n\n@if (!value) {\n <span\n automation-id=\"tui-input-inline__placeholder\"\n class=\"t-placeholder\"\n >\n <ng-content />\n </span>\n}\n<ng-content select=\"input\" />\n", styles: ["tui-input-inline{position:relative;display:inline-block;white-space:nowrap;box-sizing:border-box}tui-input-inline>.t-before{padding-inline-end:.02em;margin-inline-start:1px;white-space:pre;visibility:hidden}tui-input-inline>.t-placeholder{display:inline-block;min-inline-size:1px;margin-inline-start:-1px}tui-input-inline>input{position:absolute;top:0;left:0;background-color:transparent;padding:inherit;font:inherit;color:inherit;box-sizing:border-box;inline-size:100%;block-size:100%;border-width:0;text-align:inherit;letter-spacing:inherit;text-indent:inherit;text-transform:inherit;outline:none}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
13
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputInline, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
14
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiInputInline, isStandalone: true, selector: "tui-input-inline", queries: [{ propertyName: "control", first: true, predicate: NgControl, descendants: true, isSignal: true }], ngImport: i0, template: "<span\n class=\"t-before\"\n [textContent]=\"value()\"\n></span>\n\n@if (!value()) {\n <span\n automation-id=\"tui-input-inline__placeholder\"\n class=\"t-placeholder\"\n >\n <ng-content />\n </span>\n}\n<ng-content select=\"input\" />\n", styles: ["tui-input-inline{position:relative;display:inline-block;white-space:nowrap;box-sizing:border-box}tui-input-inline>.t-before{padding-inline-end:.02em;margin-inline-start:1px;white-space:pre;visibility:hidden}tui-input-inline>.t-placeholder{display:inline-block;min-inline-size:1px;margin-inline-start:-1px}tui-input-inline>input{position:absolute;top:0;left:0;background-color:transparent;padding:inherit;font:inherit;color:inherit;box-sizing:border-box;inline-size:100%;block-size:100%;border-width:0;text-align:inherit;letter-spacing:inherit;text-indent:inherit;text-transform:inherit;outline:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
14
15
  }
15
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputInline, decorators: [{
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputInline, decorators: [{
16
17
  type: Component,
17
- args: [{ selector: 'tui-input-inline', imports: [AsyncPipe], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "@let value = value$ | async;\n<span\n class=\"t-before\"\n [textContent]=\"value\"\n></span>\n\n@if (!value) {\n <span\n automation-id=\"tui-input-inline__placeholder\"\n class=\"t-placeholder\"\n >\n <ng-content />\n </span>\n}\n<ng-content select=\"input\" />\n", styles: ["tui-input-inline{position:relative;display:inline-block;white-space:nowrap;box-sizing:border-box}tui-input-inline>.t-before{padding-inline-end:.02em;margin-inline-start:1px;white-space:pre;visibility:hidden}tui-input-inline>.t-placeholder{display:inline-block;min-inline-size:1px;margin-inline-start:-1px}tui-input-inline>input{position:absolute;top:0;left:0;background-color:transparent;padding:inherit;font:inherit;color:inherit;box-sizing:border-box;inline-size:100%;block-size:100%;border-width:0;text-align:inherit;letter-spacing:inherit;text-indent:inherit;text-transform:inherit;outline:none}\n"] }]
18
- }], propDecorators: { control: [{
19
- type: ContentChild,
20
- args: [NgControl]
21
- }] } });
18
+ args: [{ selector: 'tui-input-inline', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n class=\"t-before\"\n [textContent]=\"value()\"\n></span>\n\n@if (!value()) {\n <span\n automation-id=\"tui-input-inline__placeholder\"\n class=\"t-placeholder\"\n >\n <ng-content />\n </span>\n}\n<ng-content select=\"input\" />\n", styles: ["tui-input-inline{position:relative;display:inline-block;white-space:nowrap;box-sizing:border-box}tui-input-inline>.t-before{padding-inline-end:.02em;margin-inline-start:1px;white-space:pre;visibility:hidden}tui-input-inline>.t-placeholder{display:inline-block;min-inline-size:1px;margin-inline-start:-1px}tui-input-inline>input{position:absolute;top:0;left:0;background-color:transparent;padding:inherit;font:inherit;color:inherit;box-sizing:border-box;inline-size:100%;block-size:100%;border-width:0;text-align:inherit;letter-spacing:inherit;text-indent:inherit;text-transform:inherit;outline:none}\n"] }]
19
+ }] });
22
20
 
23
21
  /**
24
22
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-input-inline.mjs","sources":["../../../projects/kit/components/input-inline/input-inline.component.ts","../../../projects/kit/components/input-inline/input-inline.template.html","../../../projects/kit/components/input-inline/taiga-ui-kit-components-input-inline.ts"],"sourcesContent":["import {AsyncPipe} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {tuiControlValue} from '@taiga-ui/cdk/observables';\nimport {defer} from 'rxjs';\n\n@Component({\n selector: 'tui-input-inline',\n imports: [AsyncPipe],\n templateUrl: './input-inline.template.html',\n styleUrl: './input-inline.style.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiInputInline {\n @ContentChild(NgControl)\n private readonly control?: NgControl;\n\n protected readonly value$ = defer(() => tuiControlValue(this.control));\n}\n","@let value = value$ | async;\n<span\n class=\"t-before\"\n [textContent]=\"value\"\n></span>\n\n@if (!value) {\n <span\n automation-id=\"tui-input-inline__placeholder\"\n class=\"t-placeholder\"\n >\n <ng-content />\n </span>\n}\n<ng-content select=\"input\" />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAmBa,cAAc,CAAA;AAR3B,IAAA,WAAA,GAAA;AAYuB,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,MAAM,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACzE;+GALY,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAd,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,cAAc,EACT,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,OAAA,EAAA,CAAA,EAAA,YAAA,EAAA,SAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,SAAS,ECpB3B,WAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,6SAeA,8oBDFc,SAAS,EAAA,IAAA,EAAA,OAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAMV,cAAc,EAAA,UAAA,EAAA,CAAA;kBAR1B,SAAS;+BACI,kBAAkB,EAAA,OAAA,EACnB,CAAC,SAAS,CAAC,EAAA,aAAA,EAGL,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,6SAAA,EAAA,MAAA,EAAA,CAAA,2lBAAA,CAAA,EAAA;8BAI9B,OAAO,EAAA,CAAA;sBADvB,YAAY;uBAAC,SAAS;;;AEpB3B;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-input-inline.mjs","sources":["../../../projects/kit/components/input-inline/input-inline.component.ts","../../../projects/kit/components/input-inline/input-inline.template.html","../../../projects/kit/components/input-inline/taiga-ui-kit-components-input-inline.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n contentChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {toObservable, toSignal} from '@angular/core/rxjs-interop';\nimport {NgControl} from '@angular/forms';\nimport {tuiControlValue} from '@taiga-ui/cdk/observables';\nimport {switchMap} from 'rxjs';\n\n@Component({\n selector: 'tui-input-inline',\n templateUrl: './input-inline.template.html',\n styleUrl: './input-inline.style.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiInputInline {\n protected readonly control = contentChild(NgControl);\n protected readonly value = toSignal(\n toObservable(this.control).pipe(switchMap(tuiControlValue)),\n );\n}\n","<span\n class=\"t-before\"\n [textContent]=\"value()\"\n></span>\n\n@if (!value()) {\n <span\n automation-id=\"tui-input-inline__placeholder\"\n class=\"t-placeholder\"\n >\n <ng-content />\n </span>\n}\n<ng-content select=\"input\" />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAkBa,cAAc,CAAA;AAP3B,IAAA,WAAA,GAAA;AAQuB,QAAA,IAAA,CAAA,OAAO,GAAG,YAAY,CAAC,SAAS,CAAC;AACjC,QAAA,IAAA,CAAA,KAAK,GAAG,QAAQ,CAC/B,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,CAC9D;AACJ;+GALY,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,OAAA,EAAA,CAAA,EAAA,YAAA,EAAA,SAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EACmB,SAAS,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECnBvD,mRAcA,EAAA,MAAA,EAAA,CAAA,2lBAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FDIa,cAAc,EAAA,UAAA,EAAA,CAAA;kBAP1B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,iBAGb,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,mRAAA,EAAA,MAAA,EAAA,CAAA,2lBAAA,CAAA,EAAA;;;AEhBnD;;AAEG;;;;"}
@@ -1,16 +1,18 @@
1
+ import { TuiLabel } from '@taiga-ui/core/components/label';
2
+ import * as i2 from '@taiga-ui/core/components/textfield';
3
+ import { tuiInjectAuxiliary, tuiTextfieldIcon, TuiSelectLike, TuiTextfieldComponent, TuiTextfieldOptionsDirective } from '@taiga-ui/core/components/textfield';
4
+ import * as i3 from '@taiga-ui/core/portals/dropdown';
5
+ import { TuiDropdownOpen, tuiDropdownEnabled, TuiDropdownAuto, TuiDropdownContent } from '@taiga-ui/core/portals/dropdown';
1
6
  import { TuiCalendarMonth } from '@taiga-ui/kit/components/calendar-month';
2
7
  import * as i0 from '@angular/core';
3
8
  import { InjectionToken, inject, signal, effect, Directive } from '@angular/core';
4
- import { toSignal } from '@angular/core/rxjs-interop';
5
9
  import { TUI_IDENTITY_VALUE_TRANSFORMER, TuiControl, tuiAsControl, tuiValueTransformerFrom } from '@taiga-ui/cdk/classes';
6
10
  import { RANGE_SEPARATOR_CHAR, TuiMonthRange } from '@taiga-ui/cdk/date-time';
7
- import * as i1 from '@taiga-ui/core/components/textfield';
8
- import { TuiTextfieldDirective, tuiInjectAuxiliary, tuiTextfieldIcon, TuiWithTextfield, TuiSelectLike } from '@taiga-ui/core/components/textfield';
9
- import * as i2 from '@taiga-ui/core/directives/dropdown';
10
- import { tuiDropdownOpen, tuiDropdownEnabled, TuiDropdownAuto } from '@taiga-ui/core/directives/dropdown';
11
- import { TUI_MONTH_FORMATTER } from '@taiga-ui/kit/tokens';
11
+ import * as i1 from '@taiga-ui/core/components/input';
12
+ import { TuiInputDirective, TuiWithInput } from '@taiga-ui/core/components/input';
13
+ import { TUI_MONTHS } from '@taiga-ui/core/tokens';
12
14
  import { tuiProvideOptions } from '@taiga-ui/cdk/utils/di';
13
- import { TUI_INPUT_DATE_DEFAULT_OPTIONS_NEW } from '@taiga-ui/kit/components/input-date';
15
+ import { TUI_INPUT_DATE_DEFAULT_OPTIONS } from '@taiga-ui/kit/components/input-date';
14
16
  import { TUI_INPUT_MONTH_OPTIONS } from '@taiga-ui/kit/components/input-month';
15
17
 
16
18
  const TUI_INPUT_MONTH_RANGE_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_INPUT_MONTH_RANGE_OPTIONS' : '', {
@@ -19,25 +21,23 @@ const TUI_INPUT_MONTH_RANGE_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_INPUT_
19
21
  valueTransformer: TUI_IDENTITY_VALUE_TRANSFORMER,
20
22
  }),
21
23
  });
22
- const tuiInputMonthRangeOptionsProvider = (options) => tuiProvideOptions(TUI_INPUT_MONTH_RANGE_OPTIONS, options, TUI_INPUT_DATE_DEFAULT_OPTIONS_NEW);
24
+ const tuiInputMonthRangeOptionsProvider = (options) => tuiProvideOptions(TUI_INPUT_MONTH_RANGE_OPTIONS, options, TUI_INPUT_DATE_DEFAULT_OPTIONS);
23
25
 
24
26
  class TuiInputMonthRangeDirective extends TuiControl {
25
27
  constructor() {
26
28
  super(...arguments);
27
- this.textfield = inject(TuiTextfieldDirective);
28
- this.formatter = toSignal(inject(TUI_MONTH_FORMATTER));
29
- this.open = tuiDropdownOpen();
29
+ this.input = inject(TuiInputDirective);
30
+ this.months = inject(TUI_MONTHS);
31
+ this.open = inject(TuiDropdownOpen).open;
30
32
  this.intermediateValue = signal(null);
31
33
  this.calendar = tuiInjectAuxiliary((x) => x instanceof TuiCalendarMonth);
32
34
  this.icon = tuiTextfieldIcon(TUI_INPUT_MONTH_RANGE_OPTIONS);
33
35
  this.dropdownEnabled = tuiDropdownEnabled(this.interactive);
34
36
  this.valueEffect = effect(() => {
35
37
  const value = this.value();
36
- const format = this.formatter() || (() => '');
37
- const string = value
38
- ? format(value.from) + RANGE_SEPARATOR_CHAR + format(value.to)
39
- : '';
40
- this.textfield.value.set(string);
38
+ const months = this.months();
39
+ const format = ({ month, formattedYear }) => `${months[month] ?? ''} ${formattedYear}`;
40
+ this.input.value.set(value ? format(value.from) + RANGE_SEPARATOR_CHAR + format(value.to) : '');
41
41
  });
42
42
  this.calendarInit = effect(() => {
43
43
  const calendar = this.calendar();
@@ -70,13 +70,13 @@ class TuiInputMonthRangeDirective extends TuiControl {
70
70
  this.onChange(null);
71
71
  this.open.set(true);
72
72
  }
73
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputMonthRangeDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
74
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiInputMonthRangeDirective, isStandalone: true, selector: "input[tuiInputMonthRange]", host: { listeners: { "input": "$event.inputType?.includes(\"delete\") && clear()" }, properties: { "disabled": "disabled()" } }, providers: [
73
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputMonthRangeDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
74
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiInputMonthRangeDirective, isStandalone: true, selector: "input[tuiInputMonthRange]", host: { listeners: { "input": "$event.inputType?.includes(\"delete\") && clear()" }, properties: { "disabled": "disabled()" } }, providers: [
75
75
  tuiAsControl(TuiInputMonthRangeDirective),
76
76
  tuiValueTransformerFrom(TUI_INPUT_MONTH_RANGE_OPTIONS),
77
- ], usesInheritance: true, hostDirectives: [{ directive: i1.TuiWithTextfield }, { directive: i1.TuiSelectLike }, { directive: i2.TuiDropdownAuto }], ngImport: i0 }); }
77
+ ], usesInheritance: true, hostDirectives: [{ directive: i1.TuiWithInput }, { directive: i2.TuiSelectLike }, { directive: i3.TuiDropdownAuto }], ngImport: i0 }); }
78
78
  }
79
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiInputMonthRangeDirective, decorators: [{
79
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputMonthRangeDirective, decorators: [{
80
80
  type: Directive,
81
81
  args: [{
82
82
  selector: 'input[tuiInputMonthRange]',
@@ -84,7 +84,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
84
84
  tuiAsControl(TuiInputMonthRangeDirective),
85
85
  tuiValueTransformerFrom(TUI_INPUT_MONTH_RANGE_OPTIONS),
86
86
  ],
87
- hostDirectives: [TuiWithTextfield, TuiSelectLike, TuiDropdownAuto],
87
+ hostDirectives: [TuiWithInput, TuiSelectLike, TuiDropdownAuto],
88
88
  host: {
89
89
  '[disabled]': 'disabled()',
90
90
  '(input)': '$event.inputType?.includes("delete") && clear()',
@@ -95,6 +95,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
95
95
  const TuiInputMonthRange = [
96
96
  TuiInputMonthRangeDirective,
97
97
  TuiCalendarMonth,
98
+ TuiLabel,
99
+ TuiTextfieldComponent,
100
+ TuiTextfieldOptionsDirective,
101
+ TuiDropdownContent,
98
102
  ];
99
103
 
100
104
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-input-month-range.mjs","sources":["../../../projects/kit/components/input-month-range/input-month-range.options.ts","../../../projects/kit/components/input-month-range/input-month-range.directive.ts","../../../projects/kit/components/input-month-range/input-month-range.ts","../../../projects/kit/components/input-month-range/taiga-ui-kit-components-input-month-range.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 {type TuiMonthRange} from '@taiga-ui/cdk/date-time';\nimport {type TuiHandler} from '@taiga-ui/cdk/types';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\nimport {TUI_INPUT_DATE_DEFAULT_OPTIONS_NEW} from '@taiga-ui/kit/components/input-date';\nimport {TUI_INPUT_MONTH_OPTIONS} from '@taiga-ui/kit/components/input-month';\n\nexport interface TuiInputMonthRangeOptions {\n readonly icon: TuiHandler<TuiSizeL | TuiSizeS, string>;\n readonly valueTransformer: TuiValueTransformer<TuiMonthRange | null, any>;\n}\n\nexport const TUI_INPUT_MONTH_RANGE_OPTIONS =\n new InjectionToken<TuiInputMonthRangeOptions>(\n ngDevMode ? 'TUI_INPUT_MONTH_RANGE_OPTIONS' : '',\n {\n factory: () => ({\n ...inject(TUI_INPUT_MONTH_OPTIONS),\n valueTransformer: TUI_IDENTITY_VALUE_TRANSFORMER,\n }),\n },\n );\n\nexport const tuiInputMonthRangeOptionsProvider = (\n options: Partial<TuiInputMonthRangeOptions>,\n): FactoryProvider =>\n tuiProvideOptions(\n TUI_INPUT_MONTH_RANGE_OPTIONS,\n options,\n TUI_INPUT_DATE_DEFAULT_OPTIONS_NEW,\n );\n","import {Directive, effect, inject, signal} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {tuiAsControl, TuiControl, tuiValueTransformerFrom} from '@taiga-ui/cdk/classes';\nimport {\n RANGE_SEPARATOR_CHAR,\n type TuiMonth,\n TuiMonthRange,\n} from '@taiga-ui/cdk/date-time';\nimport {\n tuiInjectAuxiliary,\n TuiSelectLike,\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 {TuiCalendarMonth} from '@taiga-ui/kit/components/calendar-month';\nimport {TUI_MONTH_FORMATTER} from '@taiga-ui/kit/tokens';\n\nimport {TUI_INPUT_MONTH_RANGE_OPTIONS} from './input-month-range.options';\n\n@Directive({\n selector: 'input[tuiInputMonthRange]',\n providers: [\n tuiAsControl(TuiInputMonthRangeDirective),\n tuiValueTransformerFrom(TUI_INPUT_MONTH_RANGE_OPTIONS),\n ],\n hostDirectives: [TuiWithTextfield, TuiSelectLike, TuiDropdownAuto],\n host: {\n '[disabled]': 'disabled()',\n '(input)': '$event.inputType?.includes(\"delete\") && clear()',\n },\n})\nexport class TuiInputMonthRangeDirective extends TuiControl<TuiMonthRange | null> {\n private readonly textfield = inject(TuiTextfieldDirective);\n private readonly formatter = toSignal(inject(TUI_MONTH_FORMATTER));\n private readonly open = tuiDropdownOpen();\n private readonly intermediateValue = signal<TuiMonth | null>(null);\n\n private readonly calendar = tuiInjectAuxiliary<TuiCalendarMonth>(\n (x) => x instanceof TuiCalendarMonth,\n );\n\n protected readonly icon = tuiTextfieldIcon(TUI_INPUT_MONTH_RANGE_OPTIONS);\n protected readonly dropdownEnabled = tuiDropdownEnabled(this.interactive);\n\n protected readonly valueEffect = effect(() => {\n const value = this.value();\n const format = this.formatter() || (() => '');\n const string = value\n ? format(value.from) + RANGE_SEPARATOR_CHAR + format(value.to)\n : '';\n\n this.textfield.value.set(string);\n });\n\n protected readonly calendarInit = effect(() => {\n const calendar = this.calendar();\n\n if (calendar) {\n calendar.options.rangeMode = true;\n }\n });\n\n protected readonly calendarSync = effect(() => {\n this.calendar()?.value.set(this.intermediateValue() ?? this.value());\n });\n\n // TODO: use linked signal (Angular 19+)\n protected readonly resetIntermediateValue = effect(() => {\n this.intermediateValue.set(this.value() && null);\n });\n\n protected onMonthClickEffect = effect((onCleanup) => {\n const subscription = this.calendar()?.monthClick.subscribe((month) => {\n const intermediateValue = this.intermediateValue();\n\n if (!intermediateValue) {\n this.intermediateValue.set(month);\n } else {\n this.onChange(TuiMonthRange.sort(intermediateValue, month));\n this.open.set(false);\n }\n });\n\n onCleanup(() => subscription?.unsubscribe());\n });\n\n protected clear(): void {\n this.onChange(null);\n this.open.set(true);\n }\n}\n","import {TuiCalendarMonth} from '@taiga-ui/kit/components/calendar-month';\n\nimport {TuiInputMonthRangeDirective} from './input-month-range.directive';\n\nexport const TuiInputMonthRange = [\n TuiInputMonthRangeDirective,\n TuiCalendarMonth,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAiBa,MAAA,6BAA6B,GACtC,IAAI,cAAc,CACd,SAAS,GAAG,+BAA+B,GAAG,EAAE,EAChD;AACI,IAAA,OAAO,EAAE,OAAO;QACZ,GAAG,MAAM,CAAC,uBAAuB,CAAC;AAClC,QAAA,gBAAgB,EAAE,8BAA8B;KACnD,CAAC;AACL,CAAA;AAGI,MAAA,iCAAiC,GAAG,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A,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,2BAA2B,EAVzB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,2BAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,mDAAA,EAAA,EAAA,UAAA,EAAA,EAAA,UAAA,EAAA,YAAA,EAAA,EAAA,EAAA,SAAA,EAAA;YACP,YAAY,CAAC,2BAA2B,CAAC;YACzC,uBAAuB,CAAC,6BAA6B,CAAC;AACzD,SAAA,EAAA,eAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,aAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,eAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAOQ,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAZvC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,2BAA2B;AACrC,oBAAA,SAAS,EAAE;AACP,wBAAA,YAAY,CAA6B,2BAAA,CAAA;wBACzC,uBAAuB,CAAC,6BAA6B,CAAC;AACzD,qBAAA;AACD,oBAAA,cAAc,EAAE,CAAC,gBAAgB,EAAE,aAAa,EAAE,eAAe,CAAC;AAClE,oBAAA,IAAI,EAAE;AACF,wBAAA,YAAY,EAAE,YAAY;AAC1B,wBAAA,SAAS,EAAE,iDAAiD;AAC/D,qBAAA;AACJ,iBAAA;;;AChCY,MAAA,kBAAkB,GAAG;IAC9B,2BAA2B;IAC3B,gBAAgB;;;ACNpB;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-input-month-range.mjs","sources":["../../../projects/kit/components/input-month-range/input-month-range.options.ts","../../../projects/kit/components/input-month-range/input-month-range.directive.ts","../../../projects/kit/components/input-month-range/input-month-range.ts","../../../projects/kit/components/input-month-range/taiga-ui-kit-components-input-month-range.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 {type TuiMonthRange} from '@taiga-ui/cdk/date-time';\nimport {type TuiHandler} from '@taiga-ui/cdk/types';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\nimport {TUI_INPUT_DATE_DEFAULT_OPTIONS} from '@taiga-ui/kit/components/input-date';\nimport {TUI_INPUT_MONTH_OPTIONS} from '@taiga-ui/kit/components/input-month';\n\nexport interface TuiInputMonthRangeOptions {\n readonly icon: TuiHandler<TuiSizeL | TuiSizeS, string>;\n readonly valueTransformer: TuiValueTransformer<TuiMonthRange | null, any>;\n}\n\nexport const TUI_INPUT_MONTH_RANGE_OPTIONS =\n new InjectionToken<TuiInputMonthRangeOptions>(\n ngDevMode ? 'TUI_INPUT_MONTH_RANGE_OPTIONS' : '',\n {\n factory: () => ({\n ...inject(TUI_INPUT_MONTH_OPTIONS),\n valueTransformer: TUI_IDENTITY_VALUE_TRANSFORMER,\n }),\n },\n );\n\nexport const tuiInputMonthRangeOptionsProvider = (\n options: Partial<TuiInputMonthRangeOptions>,\n): FactoryProvider =>\n tuiProvideOptions(\n TUI_INPUT_MONTH_RANGE_OPTIONS,\n options,\n TUI_INPUT_DATE_DEFAULT_OPTIONS,\n );\n","import {Directive, effect, inject, signal} from '@angular/core';\nimport {tuiAsControl, TuiControl, tuiValueTransformerFrom} from '@taiga-ui/cdk/classes';\nimport {\n RANGE_SEPARATOR_CHAR,\n type TuiMonth,\n TuiMonthRange,\n} from '@taiga-ui/cdk/date-time';\nimport {TuiInputDirective, TuiWithInput} from '@taiga-ui/core/components/input';\nimport {\n tuiInjectAuxiliary,\n TuiSelectLike,\n tuiTextfieldIcon,\n} from '@taiga-ui/core/components/textfield';\nimport {\n TuiDropdownAuto,\n tuiDropdownEnabled,\n TuiDropdownOpen,\n} from '@taiga-ui/core/portals/dropdown';\nimport {TUI_MONTHS} from '@taiga-ui/core/tokens';\nimport {TuiCalendarMonth} from '@taiga-ui/kit/components/calendar-month';\n\nimport {TUI_INPUT_MONTH_RANGE_OPTIONS} from './input-month-range.options';\n\n@Directive({\n selector: 'input[tuiInputMonthRange]',\n providers: [\n tuiAsControl(TuiInputMonthRangeDirective),\n tuiValueTransformerFrom(TUI_INPUT_MONTH_RANGE_OPTIONS),\n ],\n hostDirectives: [TuiWithInput, TuiSelectLike, TuiDropdownAuto],\n host: {\n '[disabled]': 'disabled()',\n '(input)': '$event.inputType?.includes(\"delete\") && clear()',\n },\n})\nexport class TuiInputMonthRangeDirective extends TuiControl<TuiMonthRange | null> {\n private readonly input = inject(TuiInputDirective);\n private readonly months = inject(TUI_MONTHS);\n private readonly open = inject(TuiDropdownOpen).open;\n private readonly intermediateValue = signal<TuiMonth | null>(null);\n private readonly calendar = tuiInjectAuxiliary<TuiCalendarMonth>(\n (x) => x instanceof TuiCalendarMonth,\n );\n\n protected readonly icon = tuiTextfieldIcon(TUI_INPUT_MONTH_RANGE_OPTIONS);\n protected readonly dropdownEnabled = tuiDropdownEnabled(this.interactive);\n protected readonly valueEffect = effect(() => {\n const value = this.value();\n const months = this.months();\n const format = ({month, formattedYear}: TuiMonth): string =>\n `${months[month] ?? ''} ${formattedYear}`;\n\n this.input.value.set(\n value ? format(value.from) + RANGE_SEPARATOR_CHAR + format(value.to) : '',\n );\n });\n\n protected readonly calendarInit = effect(() => {\n const calendar = this.calendar();\n\n if (calendar) {\n calendar.options.rangeMode = true;\n }\n });\n\n protected readonly calendarSync = effect(() => {\n this.calendar()?.value.set(this.intermediateValue() ?? this.value());\n });\n\n // TODO: use linked signal (Angular 19+)\n protected readonly resetIntermediateValue = effect(() => {\n this.intermediateValue.set(this.value() && null);\n });\n\n protected onMonthClickEffect = effect((onCleanup) => {\n const subscription = this.calendar()?.monthClick.subscribe((month) => {\n const intermediateValue = this.intermediateValue();\n\n if (!intermediateValue) {\n this.intermediateValue.set(month);\n } else {\n this.onChange(TuiMonthRange.sort(intermediateValue, month));\n this.open.set(false);\n }\n });\n\n onCleanup(() => subscription?.unsubscribe());\n });\n\n protected clear(): void {\n this.onChange(null);\n this.open.set(true);\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/dropdown';\nimport {TuiCalendarMonth} from '@taiga-ui/kit/components/calendar-month';\n\nimport {TuiInputMonthRangeDirective} from './input-month-range.directive';\n\nexport const TuiInputMonthRange = [\n TuiInputMonthRangeDirective,\n TuiCalendarMonth,\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":[],"mappings":";;;;;;;;;;;;;;;;;AAiBa,MAAA,6BAA6B,GACtC,IAAI,cAAc,CACd,SAAS,GAAG,+BAA+B,GAAG,EAAE,EAChD;AACI,IAAA,OAAO,EAAE,OAAO;QACZ,GAAG,MAAM,CAAC,uBAAuB,CAAC;AAClC,QAAA,gBAAgB,EAAE,8BAA8B;KACnD,CAAC;AACL,CAAA;AAGI,MAAA,iCAAiC,GAAG,CAC7C,OAA2C,KAE3C,iBAAiB,CACb,6BAA6B,EAC7B,OAAO,EACP,8BAA8B;;ACChC,MAAO,2BAA4B,SAAQ,UAAgC,CAAA;AAZjF,IAAA,WAAA,GAAA;;AAaqB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,iBAAiB,CAAC;AACjC,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC;A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