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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (585) hide show
  1. package/bundles/taiga-ui-kit-components-accordion.umd.js +5 -17
  2. package/bundles/taiga-ui-kit-components-accordion.umd.js.map +1 -1
  3. package/bundles/taiga-ui-kit-components-action.umd.js +3 -9
  4. package/bundles/taiga-ui-kit-components-action.umd.js.map +1 -1
  5. package/bundles/taiga-ui-kit-components-arrow.umd.js +1 -1
  6. package/bundles/taiga-ui-kit-components-arrow.umd.js.map +1 -1
  7. package/bundles/taiga-ui-kit-components-avatar.umd.js +3 -3
  8. package/bundles/taiga-ui-kit-components-avatar.umd.js.map +1 -1
  9. package/bundles/taiga-ui-kit-components-badge.umd.js +3 -3
  10. package/bundles/taiga-ui-kit-components-badge.umd.js.map +1 -1
  11. package/bundles/taiga-ui-kit-components-badged-content.umd.js +3 -6
  12. package/bundles/taiga-ui-kit-components-badged-content.umd.js.map +1 -1
  13. package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js +1 -1
  14. package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js.map +1 -1
  15. package/bundles/taiga-ui-kit-components-calendar-month.umd.js +0 -1
  16. package/bundles/taiga-ui-kit-components-calendar-month.umd.js.map +1 -1
  17. package/bundles/taiga-ui-kit-components-calendar-range.umd.js +12 -8
  18. package/bundles/taiga-ui-kit-components-calendar-range.umd.js.map +1 -1
  19. package/bundles/taiga-ui-kit-components-carousel.umd.js +4 -5
  20. package/bundles/taiga-ui-kit-components-carousel.umd.js.map +1 -1
  21. package/bundles/taiga-ui-kit-components-checkbox-block.umd.js +7 -10
  22. package/bundles/taiga-ui-kit-components-checkbox-block.umd.js.map +1 -1
  23. package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js +5 -9
  24. package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js.map +1 -1
  25. package/bundles/taiga-ui-kit-components-checkbox.umd.js +5 -9
  26. package/bundles/taiga-ui-kit-components-checkbox.umd.js.map +1 -1
  27. package/bundles/taiga-ui-kit-components-combo-box.umd.js +21 -41
  28. package/bundles/taiga-ui-kit-components-combo-box.umd.js.map +1 -1
  29. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js +5 -26
  30. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js.map +1 -1
  31. package/bundles/taiga-ui-kit-components-files.umd.js +1 -2
  32. package/bundles/taiga-ui-kit-components-files.umd.js.map +1 -1
  33. package/bundles/taiga-ui-kit-components-filter.umd.js +1 -1
  34. package/bundles/taiga-ui-kit-components-filter.umd.js.map +1 -1
  35. package/bundles/taiga-ui-kit-components-input-copy.umd.js +21 -36
  36. package/bundles/taiga-ui-kit-components-input-copy.umd.js.map +1 -1
  37. package/bundles/taiga-ui-kit-components-input-count.umd.js +12 -35
  38. package/bundles/taiga-ui-kit-components-input-count.umd.js.map +1 -1
  39. package/bundles/taiga-ui-kit-components-input-date-range.umd.js +19 -42
  40. package/bundles/taiga-ui-kit-components-input-date-range.umd.js.map +1 -1
  41. package/bundles/taiga-ui-kit-components-input-date-time.umd.js +18 -42
  42. package/bundles/taiga-ui-kit-components-input-date-time.umd.js.map +1 -1
  43. package/bundles/taiga-ui-kit-components-input-date.umd.js +17 -41
  44. package/bundles/taiga-ui-kit-components-input-date.umd.js.map +1 -1
  45. package/bundles/taiga-ui-kit-components-input-files.umd.js +4 -17
  46. package/bundles/taiga-ui-kit-components-input-files.umd.js.map +1 -1
  47. package/bundles/taiga-ui-kit-components-input-inline.umd.js +2 -8
  48. package/bundles/taiga-ui-kit-components-input-inline.umd.js.map +1 -1
  49. package/bundles/taiga-ui-kit-components-input-month-range.umd.js +19 -37
  50. package/bundles/taiga-ui-kit-components-input-month-range.umd.js.map +1 -1
  51. package/bundles/taiga-ui-kit-components-input-month.umd.js +19 -37
  52. package/bundles/taiga-ui-kit-components-input-month.umd.js.map +1 -1
  53. package/bundles/taiga-ui-kit-components-input-number.umd.js +14 -37
  54. package/bundles/taiga-ui-kit-components-input-number.umd.js.map +1 -1
  55. package/bundles/taiga-ui-kit-components-input-password.umd.js +29 -56
  56. package/bundles/taiga-ui-kit-components-input-password.umd.js.map +1 -1
  57. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js +38 -51
  58. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js.map +1 -1
  59. package/bundles/taiga-ui-kit-components-input-phone.umd.js +30 -57
  60. package/bundles/taiga-ui-kit-components-input-phone.umd.js.map +1 -1
  61. package/bundles/taiga-ui-kit-components-input-range.umd.js +17 -13
  62. package/bundles/taiga-ui-kit-components-input-range.umd.js.map +1 -1
  63. package/bundles/taiga-ui-kit-components-input-slider.umd.js +14 -12
  64. package/bundles/taiga-ui-kit-components-input-slider.umd.js.map +1 -1
  65. package/bundles/taiga-ui-kit-components-input-tag.umd.js +33 -50
  66. package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
  67. package/bundles/taiga-ui-kit-components-input-time.umd.js +8 -15
  68. package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
  69. package/bundles/taiga-ui-kit-components-input.umd.js +16 -33
  70. package/bundles/taiga-ui-kit-components-input.umd.js.map +1 -1
  71. package/bundles/taiga-ui-kit-components-line-clamp.umd.js +108 -18
  72. package/bundles/taiga-ui-kit-components-line-clamp.umd.js.map +1 -1
  73. package/bundles/taiga-ui-kit-components-marker-icon.umd.js +1 -1
  74. package/bundles/taiga-ui-kit-components-marker-icon.umd.js.map +1 -1
  75. package/bundles/taiga-ui-kit-components-multi-select-option.umd.js +3 -3
  76. package/bundles/taiga-ui-kit-components-multi-select-option.umd.js.map +1 -1
  77. package/bundles/taiga-ui-kit-components-multi-select.umd.js +34 -69
  78. package/bundles/taiga-ui-kit-components-multi-select.umd.js.map +1 -1
  79. package/bundles/taiga-ui-kit-components-pagination.umd.js +10 -23
  80. package/bundles/taiga-ui-kit-components-pagination.umd.js.map +1 -1
  81. package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js +2 -15
  82. package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js.map +1 -1
  83. package/bundles/taiga-ui-kit-components-progress.umd.js +5 -15
  84. package/bundles/taiga-ui-kit-components-progress.umd.js.map +1 -1
  85. package/bundles/taiga-ui-kit-components-radio-block.umd.js +7 -10
  86. package/bundles/taiga-ui-kit-components-radio-block.umd.js.map +1 -1
  87. package/bundles/taiga-ui-kit-components-radio-labeled.umd.js +5 -9
  88. package/bundles/taiga-ui-kit-components-radio-labeled.umd.js.map +1 -1
  89. package/bundles/taiga-ui-kit-components-radio-list.umd.js +5 -9
  90. package/bundles/taiga-ui-kit-components-radio-list.umd.js.map +1 -1
  91. package/bundles/taiga-ui-kit-components-radio.umd.js +5 -10
  92. package/bundles/taiga-ui-kit-components-radio.umd.js.map +1 -1
  93. package/bundles/taiga-ui-kit-components-range.umd.js +40 -86
  94. package/bundles/taiga-ui-kit-components-range.umd.js.map +1 -1
  95. package/bundles/taiga-ui-kit-components-rating.umd.js +4 -8
  96. package/bundles/taiga-ui-kit-components-rating.umd.js.map +1 -1
  97. package/bundles/taiga-ui-kit-components-select-option.umd.js +5 -5
  98. package/bundles/taiga-ui-kit-components-select-option.umd.js.map +1 -1
  99. package/bundles/taiga-ui-kit-components-select.umd.js +20 -40
  100. package/bundles/taiga-ui-kit-components-select.umd.js.map +1 -1
  101. package/bundles/taiga-ui-kit-components-slider.umd.js +40 -38
  102. package/bundles/taiga-ui-kit-components-slider.umd.js.map +1 -1
  103. package/bundles/taiga-ui-kit-components-stepper.umd.js +9 -7
  104. package/bundles/taiga-ui-kit-components-stepper.umd.js.map +1 -1
  105. package/bundles/taiga-ui-kit-components-tabs.umd.js +40 -40
  106. package/bundles/taiga-ui-kit-components-tabs.umd.js.map +1 -1
  107. package/bundles/taiga-ui-kit-components-tag.umd.js +6 -17
  108. package/bundles/taiga-ui-kit-components-tag.umd.js.map +1 -1
  109. package/bundles/taiga-ui-kit-components-text-area.umd.js +18 -31
  110. package/bundles/taiga-ui-kit-components-text-area.umd.js.map +1 -1
  111. package/bundles/taiga-ui-kit-components-toggle.umd.js +5 -9
  112. package/bundles/taiga-ui-kit-components-toggle.umd.js.map +1 -1
  113. package/bundles/taiga-ui-kit-components-tree.umd.js +2 -8
  114. package/bundles/taiga-ui-kit-components-tree.umd.js.map +1 -1
  115. package/bundles/taiga-ui-kit-constants.umd.js +334 -3
  116. package/bundles/taiga-ui-kit-constants.umd.js.map +1 -1
  117. package/bundles/{taiga-ui-kit-directives-dropdown-context.umd.js → taiga-ui-kit-directives-data-list-dropdown-manager.umd.js} +117 -141
  118. package/bundles/taiga-ui-kit-directives-data-list-dropdown-manager.umd.js.map +1 -0
  119. package/bundles/taiga-ui-kit-directives-highlight.umd.js +0 -1
  120. package/bundles/taiga-ui-kit-directives-highlight.umd.js.map +1 -1
  121. package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js +2 -2
  122. package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js.map +1 -1
  123. package/bundles/taiga-ui-kit-directives-present.umd.js +2 -2
  124. package/bundles/taiga-ui-kit-directives-present.umd.js.map +1 -1
  125. package/bundles/taiga-ui-kit-directives-project-class.umd.js +0 -3
  126. package/bundles/taiga-ui-kit-directives-project-class.umd.js.map +1 -1
  127. package/bundles/taiga-ui-kit-directives.umd.js +6 -18
  128. package/bundles/taiga-ui-kit-directives.umd.js.map +1 -1
  129. package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js +4 -4
  130. package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js.map +1 -1
  131. package/bundles/taiga-ui-kit-pipes-field-error.umd.js +0 -2
  132. package/bundles/taiga-ui-kit-pipes-field-error.umd.js.map +1 -1
  133. package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.js +3 -3
  134. package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.js.map +1 -1
  135. package/bundles/taiga-ui-kit-providers.umd.js +11 -42
  136. package/bundles/taiga-ui-kit-providers.umd.js.map +1 -1
  137. package/bundles/taiga-ui-kit-tokens.umd.js +17 -12
  138. package/bundles/taiga-ui-kit-tokens.umd.js.map +1 -1
  139. package/bundles/taiga-ui-kit-utils-files.umd.js +3 -15
  140. package/bundles/taiga-ui-kit-utils-files.umd.js.map +1 -1
  141. package/bundles/taiga-ui-kit-utils-format.umd.js +1 -5
  142. package/bundles/taiga-ui-kit-utils-format.umd.js.map +1 -1
  143. package/bundles/taiga-ui-kit-utils-mask.umd.js +3 -9
  144. package/bundles/taiga-ui-kit-utils-mask.umd.js.map +1 -1
  145. package/bundles/taiga-ui-kit-utils-math.umd.js +1 -1
  146. package/bundles/taiga-ui-kit-utils-math.umd.js.map +1 -1
  147. package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js +1 -5
  148. package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js.map +1 -1
  149. package/bundles/taiga-ui-kit-utils.umd.js +4 -10
  150. package/bundles/taiga-ui-kit-utils.umd.js.map +1 -1
  151. package/components/badge/badge.component.d.ts +2 -2
  152. package/components/badged-content/badged-content.component.d.ts +2 -2
  153. package/components/combo-box/index.d.ts +0 -1
  154. package/components/filter/filter.component.d.ts +1 -1
  155. package/components/input/index.d.ts +0 -1
  156. package/components/input-copy/index.d.ts +0 -1
  157. package/components/input-copy/input-copy.component.d.ts +4 -4
  158. package/components/input-date/index.d.ts +0 -1
  159. package/components/input-date-range/index.d.ts +0 -1
  160. package/components/input-date-time/index.d.ts +0 -1
  161. package/components/input-month/index.d.ts +0 -1
  162. package/components/input-month-range/index.d.ts +0 -1
  163. package/components/input-password/input-password.component.d.ts +2 -2
  164. package/components/input-password/input-password.module.d.ts +2 -3
  165. package/components/input-phone/index.d.ts +0 -1
  166. package/components/input-phone/input-phone.component.d.ts +2 -2
  167. package/components/input-phone-international/utils/extract-value-from-event.d.ts +1 -5
  168. package/components/input-range/input-range.component.d.ts +1 -0
  169. package/components/input-slider/input-slider.component.d.ts +1 -0
  170. package/components/input-tag/input-tag-options.d.ts +4 -1
  171. package/components/input-tag/input-tag.component.d.ts +3 -5
  172. package/components/line-clamp/index.d.ts +1 -0
  173. package/components/line-clamp/line-clamp-box.component.d.ts +7 -0
  174. package/components/line-clamp/line-clamp-position.directive.d.ts +9 -0
  175. package/components/line-clamp/line-clamp.module.d.ts +7 -5
  176. package/components/multi-select/multi-select-group/multi-select-group.directive.d.ts +0 -3
  177. package/components/pagination/pagination.component.d.ts +0 -1
  178. package/components/progress/progress-segmented/progress-segmented.component.d.ts +0 -2
  179. package/components/range/range.component.d.ts +7 -23
  180. package/components/select/index.d.ts +0 -1
  181. package/components/slider/helpers/slider-key-steps.directive.d.ts +1 -3
  182. package/components/slider/slider.component.d.ts +5 -3
  183. package/components/stepper/step/step.component.d.ts +2 -2
  184. package/components/tabs/tab/tab.providers.d.ts +1 -4
  185. package/components/tabs/tabs-with-more/tabs-with-more.component.d.ts +2 -1
  186. package/components/tabs/tabs-with-more/tabs-with-more.providers.d.ts +3 -4
  187. package/components/tag/tag.component.d.ts +1 -3
  188. package/components/text-area/index.d.ts +0 -1
  189. package/components/tree/components/tree-item/tree-item.providers.d.ts +0 -1
  190. package/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.d.ts +15 -0
  191. package/directives/data-list-dropdown-manager/data-list-dropdown-manager.module.d.ts +7 -0
  192. package/directives/data-list-dropdown-manager/index.d.ts +2 -0
  193. package/directives/data-list-dropdown-manager/package.json +10 -0
  194. package/directives/data-list-dropdown-manager/taiga-ui-kit-directives-data-list-dropdown-manager.d.ts +5 -0
  195. package/directives/index.d.ts +1 -3
  196. package/esm2015/components/accordion/accordion-item/accordion-item.component.js +5 -17
  197. package/esm2015/components/accordion/accordion.component.js +5 -5
  198. package/esm2015/components/action/action.component.js +6 -12
  199. package/esm2015/components/arrow/arrow.component.js +3 -3
  200. package/esm2015/components/avatar/avatar.component.js +6 -6
  201. package/esm2015/components/badge/badge.component.js +6 -6
  202. package/esm2015/components/badged-content/badged-content.component.js +4 -7
  203. package/esm2015/components/breadcrumbs/breadcrumbs.component.js +2 -2
  204. package/esm2015/components/calendar-month/calendar-month.component.js +1 -2
  205. package/esm2015/components/calendar-range/calendar-range.component.js +12 -11
  206. package/esm2015/components/carousel/carousel-scroll.directive.js +3 -3
  207. package/esm2015/components/carousel/carousel.component.js +4 -5
  208. package/esm2015/components/carousel/carousel.directive.js +3 -3
  209. package/esm2015/components/checkbox/checkbox.component.js +8 -12
  210. package/esm2015/components/checkbox-block/checkbox-block.component.js +10 -13
  211. package/esm2015/components/checkbox-labeled/checkbox-labeled.component.js +8 -12
  212. package/esm2015/components/combo-box/combo-box.component.js +20 -8
  213. package/esm2015/components/combo-box/combo-box.directive.js +5 -15
  214. package/esm2015/components/combo-box/index.js +1 -2
  215. package/esm2015/components/data-list-wrapper/data-list-group-wrapper.component.js +5 -15
  216. package/esm2015/components/data-list-wrapper/data-list-wrapper.component.js +5 -15
  217. package/esm2015/components/data-list-wrapper/data-list-wrapper.js +3 -4
  218. package/esm2015/components/files/file/file.component.js +3 -4
  219. package/esm2015/components/filter/filter.component.js +2 -2
  220. package/esm2015/components/input/index.js +1 -2
  221. package/esm2015/components/input/input.component.js +18 -7
  222. package/esm2015/components/input/input.directive.js +5 -15
  223. package/esm2015/components/input-copy/index.js +1 -2
  224. package/esm2015/components/input-copy/input-copy.component.js +18 -10
  225. package/esm2015/components/input-copy/input-copy.directive.js +5 -15
  226. package/esm2015/components/input-count/input-count.component.js +14 -27
  227. package/esm2015/components/input-count/input-count.directive.js +5 -15
  228. package/esm2015/components/input-date/index.js +1 -2
  229. package/esm2015/components/input-date/input-date.component.js +15 -9
  230. package/esm2015/components/input-date/input-date.directive.js +5 -15
  231. package/esm2015/components/input-date-range/index.js +1 -2
  232. package/esm2015/components/input-date-range/input-date-range.component.js +18 -11
  233. package/esm2015/components/input-date-range/input-date-range.directive.js +5 -15
  234. package/esm2015/components/input-date-time/index.js +1 -2
  235. package/esm2015/components/input-date-time/input-date-time.component.js +16 -10
  236. package/esm2015/components/input-date-time/input-date-time.directive.js +5 -15
  237. package/esm2015/components/input-files/input-files.component.js +8 -21
  238. package/esm2015/components/input-inline/input-inline.component.js +5 -11
  239. package/esm2015/components/input-month/index.js +1 -2
  240. package/esm2015/components/input-month/input-month.component.js +17 -8
  241. package/esm2015/components/input-month/input-month.directive.js +5 -17
  242. package/esm2015/components/input-month-range/index.js +1 -2
  243. package/esm2015/components/input-month-range/input-month-range.component.js +17 -8
  244. package/esm2015/components/input-month-range/input-month-range.directive.js +5 -17
  245. package/esm2015/components/input-number/input-number.component.js +16 -29
  246. package/esm2015/components/input-number/input-number.directive.js +5 -15
  247. package/esm2015/components/input-password/input-password.component.js +18 -32
  248. package/esm2015/components/input-password/input-password.directive.js +5 -15
  249. package/esm2015/components/input-password/input-password.module.js +1 -5
  250. package/esm2015/components/input-phone/index.js +1 -2
  251. package/esm2015/components/input-phone/input-phone.component.js +28 -14
  252. package/esm2015/components/input-phone/input-phone.directive.js +5 -15
  253. package/esm2015/components/input-phone-international/input-phone-international.component.js +16 -22
  254. package/esm2015/components/input-phone-international/utils/extract-value-from-event.js +5 -11
  255. package/esm2015/components/input-range/input-range.component.js +20 -16
  256. package/esm2015/components/input-slider/input-slider.component.js +13 -15
  257. package/esm2015/components/input-tag/input-tag-options.js +8 -1
  258. package/esm2015/components/input-tag/input-tag.component.js +24 -54
  259. package/esm2015/components/input-time/input-time.component.js +11 -18
  260. package/esm2015/components/line-clamp/index.js +2 -1
  261. package/esm2015/components/line-clamp/line-clamp-box.component.js +32 -0
  262. package/esm2015/components/line-clamp/line-clamp-position.directive.js +26 -0
  263. package/esm2015/components/line-clamp/line-clamp.component.js +22 -9
  264. package/esm2015/components/line-clamp/line-clamp.module.js +30 -6
  265. package/esm2015/components/marker-icon/marker-icon.component.js +2 -2
  266. package/esm2015/components/multi-select/multi-select-group/multi-select-group.component.js +11 -21
  267. package/esm2015/components/multi-select/multi-select-group/multi-select-group.directive.js +17 -28
  268. package/esm2015/components/multi-select/multi-select.component.js +15 -30
  269. package/esm2015/components/multi-select-option/multi-select-option.component.js +6 -6
  270. package/esm2015/components/pagination/pagination.component.js +13 -25
  271. package/esm2015/components/pdf-viewer/pdf-viewer.module.js +4 -17
  272. package/esm2015/components/progress/progress-bar/progress-color-segments.directive.js +4 -4
  273. package/esm2015/components/progress/progress-circle/progress-circle.component.js +2 -2
  274. package/esm2015/components/progress/progress-segmented/progress-segmented.component.js +3 -11
  275. package/esm2015/components/radio/radio.component.js +8 -13
  276. package/esm2015/components/radio-block/radio-block.component.js +10 -13
  277. package/esm2015/components/radio-labeled/radio-labeled.component.js +8 -12
  278. package/esm2015/components/radio-list/radio-list.component.js +8 -12
  279. package/esm2015/components/range/range-change.directive.js +10 -9
  280. package/esm2015/components/range/range.component.js +27 -79
  281. package/esm2015/components/rating/rating.component.js +7 -11
  282. package/esm2015/components/select/index.js +1 -2
  283. package/esm2015/components/select/select.component.js +19 -7
  284. package/esm2015/components/select/select.directive.js +5 -15
  285. package/esm2015/components/select-option/select-option.component.js +7 -7
  286. package/esm2015/components/slider/helpers/slider-key-steps.directive.js +14 -22
  287. package/esm2015/components/slider/helpers/slider-readonly.directive.js +5 -6
  288. package/esm2015/components/slider/slider.component.js +21 -10
  289. package/esm2015/components/stepper/step/step.component.js +5 -5
  290. package/esm2015/components/stepper/stepper.component.js +7 -5
  291. package/esm2015/components/tabs/tab/tab.providers.js +10 -10
  292. package/esm2015/components/tabs/tabs/tabs.component.js +1 -2
  293. package/esm2015/components/tabs/tabs-with-more/tabs-with-more.component.js +18 -17
  294. package/esm2015/components/tabs/tabs-with-more/tabs-with-more.providers.js +9 -11
  295. package/esm2015/components/tag/tag.component.js +10 -20
  296. package/esm2015/components/text-area/index.js +1 -2
  297. package/esm2015/components/text-area/text-area.component.js +19 -8
  298. package/esm2015/components/text-area/text-area.directive.js +5 -15
  299. package/esm2015/components/toggle/toggle.component.js +8 -12
  300. package/esm2015/components/tree/components/tree-item/tree-item.providers.js +2 -6
  301. package/esm2015/components/tree/directives/tree-controller.directive.js +3 -3
  302. package/esm2015/components/tree/misc/tree.service.js +1 -2
  303. package/esm2015/constants/max-day-range-length-mapper.js +5 -4
  304. package/esm2015/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.js +100 -0
  305. package/esm2015/directives/data-list-dropdown-manager/data-list-dropdown-manager.module.js +16 -0
  306. package/esm2015/directives/data-list-dropdown-manager/index.js +3 -0
  307. package/esm2015/directives/data-list-dropdown-manager/taiga-ui-kit-directives-data-list-dropdown-manager.js +5 -0
  308. package/esm2015/directives/highlight/highlight.directive.js +1 -2
  309. package/esm2015/directives/index.js +2 -4
  310. package/esm2015/directives/lazy-loading/lazy-loading.directive.js +2 -2
  311. package/esm2015/directives/lazy-loading/lazy-loading.service.js +3 -3
  312. package/esm2015/directives/present/present.directive.js +4 -4
  313. package/esm2015/directives/project-class/project-class.directive.js +1 -4
  314. package/esm2015/interfaces/index.js +1 -2
  315. package/esm2015/internal/primitive-calendar-range/primitive-calendar-range.component.js +7 -7
  316. package/esm2015/pipes/field-error/field-error-content-pipe.js +1 -2
  317. package/esm2015/pipes/field-error/field-error-pipe.js +1 -2
  318. package/esm2015/pipes/filter-by-input/filter-by-input.base.js +5 -5
  319. package/esm2015/providers/month-formatter.provider.js +8 -13
  320. package/esm2015/providers/specific-dropdown-controllers.js +6 -29
  321. package/esm2015/tokens/calendar-date-stream.js +15 -0
  322. package/esm2015/tokens/index.js +2 -3
  323. package/esm2015/utils/files/format-size.js +4 -9
  324. package/esm2015/utils/files/get-accept-array.js +2 -7
  325. package/esm2015/utils/format/string-hash-to-hsl.js +2 -5
  326. package/esm2015/utils/index.js +1 -2
  327. package/esm2015/utils/mask/create-auto-corrected-date-pipe.js +3 -8
  328. package/esm2015/utils/mask/create-auto-corrected-date-time-pipe.js +3 -3
  329. package/esm2015/utils/math/key-steps.js +3 -3
  330. package/esm2015/utils/miscellaneous/get-precision.js +2 -5
  331. package/fesm2015/taiga-ui-kit-components-accordion.js +7 -19
  332. package/fesm2015/taiga-ui-kit-components-accordion.js.map +1 -1
  333. package/fesm2015/taiga-ui-kit-components-action.js +5 -11
  334. package/fesm2015/taiga-ui-kit-components-action.js.map +1 -1
  335. package/fesm2015/taiga-ui-kit-components-arrow.js +2 -2
  336. package/fesm2015/taiga-ui-kit-components-arrow.js.map +1 -1
  337. package/fesm2015/taiga-ui-kit-components-avatar.js +5 -5
  338. package/fesm2015/taiga-ui-kit-components-avatar.js.map +1 -1
  339. package/fesm2015/taiga-ui-kit-components-badge.js +4 -4
  340. package/fesm2015/taiga-ui-kit-components-badge.js.map +1 -1
  341. package/fesm2015/taiga-ui-kit-components-badged-content.js +3 -6
  342. package/fesm2015/taiga-ui-kit-components-badged-content.js.map +1 -1
  343. package/fesm2015/taiga-ui-kit-components-breadcrumbs.js +1 -1
  344. package/fesm2015/taiga-ui-kit-components-breadcrumbs.js.map +1 -1
  345. package/fesm2015/taiga-ui-kit-components-calendar-month.js +0 -1
  346. package/fesm2015/taiga-ui-kit-components-calendar-month.js.map +1 -1
  347. package/fesm2015/taiga-ui-kit-components-calendar-range.js +12 -11
  348. package/fesm2015/taiga-ui-kit-components-calendar-range.js.map +1 -1
  349. package/fesm2015/taiga-ui-kit-components-carousel.js +5 -6
  350. package/fesm2015/taiga-ui-kit-components-carousel.js.map +1 -1
  351. package/fesm2015/taiga-ui-kit-components-checkbox-block.js +9 -12
  352. package/fesm2015/taiga-ui-kit-components-checkbox-block.js.map +1 -1
  353. package/fesm2015/taiga-ui-kit-components-checkbox-labeled.js +7 -11
  354. package/fesm2015/taiga-ui-kit-components-checkbox-labeled.js.map +1 -1
  355. package/fesm2015/taiga-ui-kit-components-checkbox.js +7 -11
  356. package/fesm2015/taiga-ui-kit-components-checkbox.js.map +1 -1
  357. package/fesm2015/taiga-ui-kit-components-combo-box.js +22 -41
  358. package/fesm2015/taiga-ui-kit-components-combo-box.js.map +1 -1
  359. package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js +7 -28
  360. package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
  361. package/fesm2015/taiga-ui-kit-components-files.js +2 -3
  362. package/fesm2015/taiga-ui-kit-components-files.js.map +1 -1
  363. package/fesm2015/taiga-ui-kit-components-filter.js +1 -1
  364. package/fesm2015/taiga-ui-kit-components-filter.js.map +1 -1
  365. package/fesm2015/taiga-ui-kit-components-input-copy.js +22 -36
  366. package/fesm2015/taiga-ui-kit-components-input-copy.js.map +1 -1
  367. package/fesm2015/taiga-ui-kit-components-input-count.js +15 -38
  368. package/fesm2015/taiga-ui-kit-components-input-count.js.map +1 -1
  369. package/fesm2015/taiga-ui-kit-components-input-date-range.js +20 -44
  370. package/fesm2015/taiga-ui-kit-components-input-date-range.js.map +1 -1
  371. package/fesm2015/taiga-ui-kit-components-input-date-time.js +19 -44
  372. package/fesm2015/taiga-ui-kit-components-input-date-time.js.map +1 -1
  373. package/fesm2015/taiga-ui-kit-components-input-date.js +18 -43
  374. package/fesm2015/taiga-ui-kit-components-input-date.js.map +1 -1
  375. package/fesm2015/taiga-ui-kit-components-input-files.js +7 -20
  376. package/fesm2015/taiga-ui-kit-components-input-files.js.map +1 -1
  377. package/fesm2015/taiga-ui-kit-components-input-inline.js +4 -10
  378. package/fesm2015/taiga-ui-kit-components-input-inline.js.map +1 -1
  379. package/fesm2015/taiga-ui-kit-components-input-month-range.js +20 -37
  380. package/fesm2015/taiga-ui-kit-components-input-month-range.js.map +1 -1
  381. package/fesm2015/taiga-ui-kit-components-input-month.js +20 -37
  382. package/fesm2015/taiga-ui-kit-components-input-month.js.map +1 -1
  383. package/fesm2015/taiga-ui-kit-components-input-number.js +17 -40
  384. package/fesm2015/taiga-ui-kit-components-input-number.js.map +1 -1
  385. package/fesm2015/taiga-ui-kit-components-input-password.js +20 -47
  386. package/fesm2015/taiga-ui-kit-components-input-password.js.map +1 -1
  387. package/fesm2015/taiga-ui-kit-components-input-phone-international.js +18 -30
  388. package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
  389. package/fesm2015/taiga-ui-kit-components-input-phone.js +31 -57
  390. package/fesm2015/taiga-ui-kit-components-input-phone.js.map +1 -1
  391. package/fesm2015/taiga-ui-kit-components-input-range.js +19 -15
  392. package/fesm2015/taiga-ui-kit-components-input-range.js.map +1 -1
  393. package/fesm2015/taiga-ui-kit-components-input-slider.js +12 -14
  394. package/fesm2015/taiga-ui-kit-components-input-slider.js.map +1 -1
  395. package/fesm2015/taiga-ui-kit-components-input-tag.js +33 -55
  396. package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
  397. package/fesm2015/taiga-ui-kit-components-input-time.js +10 -17
  398. package/fesm2015/taiga-ui-kit-components-input-time.js.map +1 -1
  399. package/fesm2015/taiga-ui-kit-components-input.js +20 -36
  400. package/fesm2015/taiga-ui-kit-components-input.js.map +1 -1
  401. package/fesm2015/taiga-ui-kit-components-line-clamp.js +96 -14
  402. package/fesm2015/taiga-ui-kit-components-line-clamp.js.map +1 -1
  403. package/fesm2015/taiga-ui-kit-components-marker-icon.js +1 -1
  404. package/fesm2015/taiga-ui-kit-components-marker-icon.js.map +1 -1
  405. package/fesm2015/taiga-ui-kit-components-multi-select-option.js +5 -5
  406. package/fesm2015/taiga-ui-kit-components-multi-select-option.js.map +1 -1
  407. package/fesm2015/taiga-ui-kit-components-multi-select.js +37 -73
  408. package/fesm2015/taiga-ui-kit-components-multi-select.js.map +1 -1
  409. package/fesm2015/taiga-ui-kit-components-pagination.js +13 -25
  410. package/fesm2015/taiga-ui-kit-components-pagination.js.map +1 -1
  411. package/fesm2015/taiga-ui-kit-components-pdf-viewer.js +3 -16
  412. package/fesm2015/taiga-ui-kit-components-pdf-viewer.js.map +1 -1
  413. package/fesm2015/taiga-ui-kit-components-progress.js +7 -15
  414. package/fesm2015/taiga-ui-kit-components-progress.js.map +1 -1
  415. package/fesm2015/taiga-ui-kit-components-radio-block.js +9 -12
  416. package/fesm2015/taiga-ui-kit-components-radio-block.js.map +1 -1
  417. package/fesm2015/taiga-ui-kit-components-radio-labeled.js +7 -11
  418. package/fesm2015/taiga-ui-kit-components-radio-labeled.js.map +1 -1
  419. package/fesm2015/taiga-ui-kit-components-radio-list.js +7 -11
  420. package/fesm2015/taiga-ui-kit-components-radio-list.js.map +1 -1
  421. package/fesm2015/taiga-ui-kit-components-radio.js +7 -12
  422. package/fesm2015/taiga-ui-kit-components-radio.js.map +1 -1
  423. package/fesm2015/taiga-ui-kit-components-range.js +38 -86
  424. package/fesm2015/taiga-ui-kit-components-range.js.map +1 -1
  425. package/fesm2015/taiga-ui-kit-components-rating.js +6 -10
  426. package/fesm2015/taiga-ui-kit-components-rating.js.map +1 -1
  427. package/fesm2015/taiga-ui-kit-components-select-option.js +6 -6
  428. package/fesm2015/taiga-ui-kit-components-select-option.js.map +1 -1
  429. package/fesm2015/taiga-ui-kit-components-select.js +21 -40
  430. package/fesm2015/taiga-ui-kit-components-select.js.map +1 -1
  431. package/fesm2015/taiga-ui-kit-components-slider.js +34 -32
  432. package/fesm2015/taiga-ui-kit-components-slider.js.map +1 -1
  433. package/fesm2015/taiga-ui-kit-components-stepper.js +10 -8
  434. package/fesm2015/taiga-ui-kit-components-stepper.js.map +1 -1
  435. package/fesm2015/taiga-ui-kit-components-tabs.js +33 -35
  436. package/fesm2015/taiga-ui-kit-components-tabs.js.map +1 -1
  437. package/fesm2015/taiga-ui-kit-components-tag.js +10 -20
  438. package/fesm2015/taiga-ui-kit-components-tag.js.map +1 -1
  439. package/fesm2015/taiga-ui-kit-components-text-area.js +22 -34
  440. package/fesm2015/taiga-ui-kit-components-text-area.js.map +1 -1
  441. package/fesm2015/taiga-ui-kit-components-toggle.js +7 -11
  442. package/fesm2015/taiga-ui-kit-components-toggle.js.map +1 -1
  443. package/fesm2015/taiga-ui-kit-components-tree.js +4 -9
  444. package/fesm2015/taiga-ui-kit-components-tree.js.map +1 -1
  445. package/fesm2015/taiga-ui-kit-constants.js +4 -3
  446. package/fesm2015/taiga-ui-kit-constants.js.map +1 -1
  447. package/fesm2015/taiga-ui-kit-directives-data-list-dropdown-manager.js +120 -0
  448. package/fesm2015/taiga-ui-kit-directives-data-list-dropdown-manager.js.map +1 -0
  449. package/fesm2015/taiga-ui-kit-directives-highlight.js +0 -1
  450. package/fesm2015/taiga-ui-kit-directives-highlight.js.map +1 -1
  451. package/fesm2015/taiga-ui-kit-directives-lazy-loading.js +3 -3
  452. package/fesm2015/taiga-ui-kit-directives-lazy-loading.js.map +1 -1
  453. package/fesm2015/taiga-ui-kit-directives-present.js +3 -3
  454. package/fesm2015/taiga-ui-kit-directives-present.js.map +1 -1
  455. package/fesm2015/taiga-ui-kit-directives-project-class.js +0 -3
  456. package/fesm2015/taiga-ui-kit-directives-project-class.js.map +1 -1
  457. package/fesm2015/taiga-ui-kit-directives.js +1 -3
  458. package/fesm2015/taiga-ui-kit-directives.js.map +1 -1
  459. package/fesm2015/taiga-ui-kit-internal-primitive-calendar-range.js +6 -6
  460. package/fesm2015/taiga-ui-kit-internal-primitive-calendar-range.js.map +1 -1
  461. package/fesm2015/taiga-ui-kit-pipes-field-error.js +0 -2
  462. package/fesm2015/taiga-ui-kit-pipes-field-error.js.map +1 -1
  463. package/fesm2015/taiga-ui-kit-pipes-filter-by-input.js +4 -4
  464. package/fesm2015/taiga-ui-kit-pipes-filter-by-input.js.map +1 -1
  465. package/fesm2015/taiga-ui-kit-providers.js +13 -40
  466. package/fesm2015/taiga-ui-kit-providers.js.map +1 -1
  467. package/fesm2015/taiga-ui-kit-tokens.js +15 -8
  468. package/fesm2015/taiga-ui-kit-tokens.js.map +1 -1
  469. package/fesm2015/taiga-ui-kit-utils-files.js +5 -15
  470. package/fesm2015/taiga-ui-kit-utils-files.js.map +1 -1
  471. package/fesm2015/taiga-ui-kit-utils-format.js +2 -5
  472. package/fesm2015/taiga-ui-kit-utils-format.js.map +1 -1
  473. package/fesm2015/taiga-ui-kit-utils-mask.js +4 -9
  474. package/fesm2015/taiga-ui-kit-utils-mask.js.map +1 -1
  475. package/fesm2015/taiga-ui-kit-utils-math.js +2 -2
  476. package/fesm2015/taiga-ui-kit-utils-math.js.map +1 -1
  477. package/fesm2015/taiga-ui-kit-utils-miscellaneous.js +2 -5
  478. package/fesm2015/taiga-ui-kit-utils-miscellaneous.js.map +1 -1
  479. package/fesm2015/taiga-ui-kit-utils.js +0 -1
  480. package/fesm2015/taiga-ui-kit-utils.js.map +1 -1
  481. package/interfaces/index.d.ts +0 -1
  482. package/package.json +5 -5
  483. package/providers/month-formatter.provider.d.ts +0 -7
  484. package/providers/specific-dropdown-controllers.d.ts +1 -6
  485. package/tokens/calendar-date-stream.d.ts +5 -0
  486. package/tokens/index.d.ts +1 -2
  487. package/tokens/validation-errors.d.ts +1 -1
  488. package/utils/files/format-size.d.ts +1 -5
  489. package/utils/files/get-accept-array.d.ts +1 -5
  490. package/utils/format/string-hash-to-hsl.d.ts +1 -3
  491. package/utils/index.d.ts +0 -1
  492. package/utils/mask/create-auto-corrected-date-pipe.d.ts +1 -5
  493. package/utils/miscellaneous/get-precision.d.ts +1 -3
  494. package/abstract/index.d.ts +0 -1
  495. package/abstract/package.json +0 -10
  496. package/abstract/slider/slider.d.ts +0 -69
  497. package/abstract/taiga-ui-kit-abstract.d.ts +0 -5
  498. package/bundles/taiga-ui-kit-abstract.umd.js +0 -651
  499. package/bundles/taiga-ui-kit-abstract.umd.js.map +0 -1
  500. package/bundles/taiga-ui-kit-directives-dropdown-context.umd.js.map +0 -1
  501. package/bundles/taiga-ui-kit-directives-dropdown-hover.umd.js +0 -107
  502. package/bundles/taiga-ui-kit-directives-dropdown-hover.umd.js.map +0 -1
  503. package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js +0 -643
  504. package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js.map +0 -1
  505. package/bundles/taiga-ui-kit-utils-dom.umd.js +0 -124
  506. package/bundles/taiga-ui-kit-utils-dom.umd.js.map +0 -1
  507. package/components/combo-box/combo-box.providers.d.ts +0 -1
  508. package/components/input/input.providers.d.ts +0 -1
  509. package/components/input-copy/input-copy.providers.d.ts +0 -2
  510. package/components/input-date/input-date.providers.d.ts +0 -1
  511. package/components/input-date-range/input-date-range.providers.d.ts +0 -1
  512. package/components/input-date-time/input-date-time.providers.d.ts +0 -1
  513. package/components/input-month/input-month.providers.d.ts +0 -2
  514. package/components/input-month-range/input-month-range.providers.d.ts +0 -2
  515. package/components/input-phone/input-phone.providers.d.ts +0 -5
  516. package/components/select/select.providers.d.ts +0 -1
  517. package/components/text-area/text-area.providers.d.ts +0 -2
  518. package/directives/dropdown-context/dropdown-context.directive.d.ts +0 -30
  519. package/directives/dropdown-context/dropdown-context.module.d.ts +0 -8
  520. package/directives/dropdown-context/index.d.ts +0 -2
  521. package/directives/dropdown-context/package.json +0 -10
  522. package/directives/dropdown-context/taiga-ui-kit-directives-dropdown-context.d.ts +0 -5
  523. package/directives/dropdown-hover/dropdown-hover.directive.d.ts +0 -11
  524. package/directives/dropdown-hover/dropdown-hover.module.d.ts +0 -7
  525. package/directives/dropdown-hover/index.d.ts +0 -2
  526. package/directives/dropdown-hover/package.json +0 -10
  527. package/directives/dropdown-hover/taiga-ui-kit-directives-dropdown-hover.d.ts +0 -5
  528. package/directives/dropdown-selection/dropdown-selection.directive.d.ts +0 -46
  529. package/directives/dropdown-selection/dropdown-selection.module.d.ts +0 -8
  530. package/directives/dropdown-selection/index.d.ts +0 -2
  531. package/directives/dropdown-selection/package.json +0 -10
  532. package/directives/dropdown-selection/taiga-ui-kit-directives-dropdown-selection.d.ts +0 -5
  533. package/esm2015/abstract/index.js +0 -2
  534. package/esm2015/abstract/slider/slider.js +0 -264
  535. package/esm2015/abstract/taiga-ui-kit-abstract.js +0 -5
  536. package/esm2015/components/combo-box/combo-box.providers.js +0 -26
  537. package/esm2015/components/input/input.providers.js +0 -22
  538. package/esm2015/components/input-copy/input-copy.providers.js +0 -16
  539. package/esm2015/components/input-date/input-date.providers.js +0 -27
  540. package/esm2015/components/input-date-range/input-date-range.providers.js +0 -27
  541. package/esm2015/components/input-date-time/input-date-time.providers.js +0 -27
  542. package/esm2015/components/input-month/input-month.providers.js +0 -19
  543. package/esm2015/components/input-month-range/input-month-range.providers.js +0 -19
  544. package/esm2015/components/input-phone/input-phone.providers.js +0 -35
  545. package/esm2015/components/select/select.providers.js +0 -26
  546. package/esm2015/components/text-area/text-area.providers.js +0 -18
  547. package/esm2015/directives/dropdown-context/dropdown-context.directive.js +0 -141
  548. package/esm2015/directives/dropdown-context/dropdown-context.module.js +0 -18
  549. package/esm2015/directives/dropdown-context/index.js +0 -3
  550. package/esm2015/directives/dropdown-context/taiga-ui-kit-directives-dropdown-context.js +0 -5
  551. package/esm2015/directives/dropdown-hover/dropdown-hover.directive.js +0 -56
  552. package/esm2015/directives/dropdown-hover/dropdown-hover.module.js +0 -16
  553. package/esm2015/directives/dropdown-hover/index.js +0 -3
  554. package/esm2015/directives/dropdown-hover/taiga-ui-kit-directives-dropdown-hover.js +0 -5
  555. package/esm2015/directives/dropdown-selection/dropdown-selection.directive.js +0 -252
  556. package/esm2015/directives/dropdown-selection/dropdown-selection.module.js +0 -18
  557. package/esm2015/directives/dropdown-selection/index.js +0 -3
  558. package/esm2015/directives/dropdown-selection/taiga-ui-kit-directives-dropdown-selection.js +0 -5
  559. package/esm2015/interfaces/bread-crumbs-item.js +0 -2
  560. package/esm2015/tokens/calendar-data-stream.js +0 -3
  561. package/esm2015/tokens/tag-status.js +0 -6
  562. package/esm2015/utils/dom/get-word-range.js +0 -53
  563. package/esm2015/utils/dom/index.js +0 -4
  564. package/esm2015/utils/dom/scroll-to-element.js +0 -23
  565. package/esm2015/utils/dom/set-range-offset.js +0 -29
  566. package/esm2015/utils/dom/taiga-ui-kit-utils-dom.js +0 -5
  567. package/fesm2015/taiga-ui-kit-abstract.js +0 -271
  568. package/fesm2015/taiga-ui-kit-abstract.js.map +0 -1
  569. package/fesm2015/taiga-ui-kit-directives-dropdown-context.js +0 -162
  570. package/fesm2015/taiga-ui-kit-directives-dropdown-context.js.map +0 -1
  571. package/fesm2015/taiga-ui-kit-directives-dropdown-hover.js +0 -76
  572. package/fesm2015/taiga-ui-kit-directives-dropdown-hover.js.map +0 -1
  573. package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js +0 -273
  574. package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js.map +0 -1
  575. package/fesm2015/taiga-ui-kit-utils-dom.js +0 -111
  576. package/fesm2015/taiga-ui-kit-utils-dom.js.map +0 -1
  577. package/interfaces/bread-crumbs-item.d.ts +0 -6
  578. package/tokens/calendar-data-stream.d.ts +0 -4
  579. package/tokens/tag-status.d.ts +0 -3
  580. package/utils/dom/get-word-range.d.ts +0 -9
  581. package/utils/dom/index.d.ts +0 -3
  582. package/utils/dom/package.json +0 -10
  583. package/utils/dom/scroll-to-element.d.ts +0 -5
  584. package/utils/dom/set-range-offset.d.ts +0 -6
  585. package/utils/dom/taiga-ui-kit-utils-dom.d.ts +0 -5
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-utils-mask.js","sources":["../../../projects/kit/utils/mask/create-auto-corrected-date-pipe.ts","../../../projects/kit/utils/mask/create-auto-corrected-date-range-pipe.ts","../../../projects/kit/utils/mask/create-auto-corrected-time-pipe.ts","../../../projects/kit/utils/mask/create-auto-corrected-date-time-pipe.ts","../../../projects/kit/utils/mask/create-date-mask.ts","../../../projects/kit/utils/mask/create-date-range-mask.ts","../../../projects/kit/utils/mask/create-time-mask.ts","../../../projects/kit/utils/mask/taiga-ui-kit-utils-mask.ts"],"sourcesContent":["import {DATE_FILLER_LENGTH, TuiDateMode, TuiDay} from '@taiga-ui/cdk';\nimport {TuiTextMaskPipeHandler, TuiWithOptionalMinMaxWithValue} from '@taiga-ui/core';\n\nexport interface TuiAutoCorrectedDatePipeConfigs\n extends TuiWithOptionalMinMaxWithValue<TuiDay | null, TuiDay> {\n dateFormat: TuiDateMode;\n dateSeparator: string;\n}\n\n/**\n * @deprecated: use {@link tuiNormalizeDateValue} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function normalizeDateValue(\n dateValue: string,\n {value, min, max, dateFormat, dateSeparator}: TuiAutoCorrectedDatePipeConfigs,\n): string {\n return value && value.toString(dateFormat, dateSeparator) === dateValue\n ? dateValue\n : TuiDay.normalizeParse(dateValue, dateFormat)\n .dayLimit(min, max)\n .toString(dateFormat, dateSeparator);\n}\n\nexport function tuiCreateAutoCorrectedDatePipe(\n config: TuiAutoCorrectedDatePipeConfigs,\n): TuiTextMaskPipeHandler {\n return value => {\n if (value.length !== DATE_FILLER_LENGTH) {\n return {value};\n }\n\n return {\n value: normalizeDateValue(value, config),\n };\n };\n}\n\nexport const tuiNormalizeDateValue = normalizeDateValue;\n","import {\n DATE_FILLER_LENGTH,\n DATE_RANGE_FILLER_LENGTH,\n RANGE_SEPARATOR_CHAR,\n TuiDateMode,\n TuiDay,\n TuiDayRange,\n} from '@taiga-ui/cdk';\nimport {TuiTextMaskPipeHandler, TuiWithOptionalMinMaxWithValue} from '@taiga-ui/core';\n\ninterface TuiAutoCorrectedDatePipeConfigs\n extends TuiWithOptionalMinMaxWithValue<TuiDayRange | null, TuiDay> {\n dateFormat: TuiDateMode;\n dateSeparator: string;\n}\n\nfunction parseWithLimit(value: string, config: TuiAutoCorrectedDatePipeConfigs): TuiDay {\n return TuiDay.normalizeParse(\n value.slice(0, DATE_FILLER_LENGTH),\n config.dateFormat,\n ).dayLimit(config.min, config.max);\n}\n\nfunction processRawValue(value: string, config: TuiAutoCorrectedDatePipeConfigs): string {\n const {dateFormat, dateSeparator} = config;\n\n switch (value.length) {\n case DATE_FILLER_LENGTH:\n return parseWithLimit(value, config).toString(dateFormat, dateSeparator);\n case DATE_FILLER_LENGTH + RANGE_SEPARATOR_CHAR.length:\n return (\n parseWithLimit(value, config).toString(dateFormat, dateSeparator) +\n RANGE_SEPARATOR_CHAR\n );\n case DATE_RANGE_FILLER_LENGTH:\n return config.value &&\n config.value.toString(dateFormat, dateSeparator) === value\n ? value\n : TuiDayRange.sort(\n parseWithLimit(value.slice(0, DATE_FILLER_LENGTH), config),\n parseWithLimit(\n value.slice(DATE_FILLER_LENGTH + RANGE_SEPARATOR_CHAR.length),\n config,\n ),\n ).toString(dateFormat, dateSeparator);\n default:\n return value;\n }\n}\n\n/**\n * Normalizes date in formatted string\n *\n * Normalizes when:\n *\n * 1. It is a single date\n * 2. It is a single date and a separator\n * 3. It is two dates and a separator between them\n *\n * In **other** cases, the value does not change.\n *\n * @param config with min and max date\n * @return mask pipe handler that handles `min` and `max`\n */\nexport function tuiCreateAutoCorrectedDateRangePipe(\n config: TuiAutoCorrectedDatePipeConfigs,\n): TuiTextMaskPipeHandler {\n return value => ({value: processRawValue(value, config)});\n}\n","import {TuiTimeMode} from '@taiga-ui/cdk';\nimport {TuiTextMaskPipeHandler} from '@taiga-ui/core';\nimport {MAX_TIME_VALUES} from '@taiga-ui/kit/constants';\nimport {TuiTimeFormatParts} from '@taiga-ui/kit/types';\n\n/**\n * Adjusts the entered time by omitting only suitable values for hours and minutes\n * @returns time as a string\n */\nexport function tuiCreateAutoCorrectedTimePipe(\n timeMode: TuiTimeMode = `HH:MM`,\n maxValues: Partial<Record<TuiTimeFormatParts, number>> = {},\n): TuiTextMaskPipeHandler {\n const timeFormatArray = [`HH`, `MM`, `SS`, `MS`] as const;\n const safeValues = {\n ...MAX_TIME_VALUES,\n ...maxValues,\n };\n\n return conformedValue => {\n const indexesOfPipedChars: number[] = [];\n const conformedValueArr = conformedValue.split(``);\n\n timeFormatArray.forEach(format => {\n const position = timeMode.indexOf(format);\n const maxFirstDigit = parseInt(String(safeValues[format]).slice(0, 1), 10);\n\n if (parseInt(conformedValueArr[position], 10) > maxFirstDigit) {\n conformedValueArr[position + 1] = conformedValueArr[position];\n conformedValueArr[position] = `0`;\n indexesOfPipedChars.push(position);\n }\n });\n\n const isInvalid = timeFormatArray.some(\n format =>\n parseInt(conformedValue.slice(timeMode.indexOf(format), 2), 10) >\n safeValues[format],\n );\n\n return isInvalid\n ? false\n : {\n value: conformedValueArr.join(``),\n indexesOfPipedChars,\n };\n };\n}\n","import {DATE_FILLER_LENGTH, tuiIsString, TuiTimeMode} from '@taiga-ui/cdk';\nimport {\n TuiTextMaskConfig,\n TuiTextMaskOptions,\n TuiTextMaskPipeHandler,\n} from '@taiga-ui/core';\nimport {DATE_TIME_SEPARATOR} from '@taiga-ui/kit/constants';\n\nimport {\n normalizeDateValue,\n TuiAutoCorrectedDatePipeConfigs,\n} from './create-auto-corrected-date-pipe';\nimport {tuiCreateAutoCorrectedTimePipe} from './create-auto-corrected-time-pipe';\n\ninterface TuiAutoCorrectedDateTimePipeConfigs extends TuiAutoCorrectedDatePipeConfigs {\n timeMode: TuiTimeMode;\n}\n\nexport function tuiCreateAutoCorrectedDateTimePipe(\n configs: TuiAutoCorrectedDateTimePipeConfigs,\n): TuiTextMaskPipeHandler {\n const timePipe = tuiCreateAutoCorrectedTimePipe(configs.timeMode);\n\n return value => {\n if (value.length < DATE_FILLER_LENGTH) {\n return {value};\n }\n\n const [date, time] = value.split(DATE_TIME_SEPARATOR);\n\n const formattedDate = normalizeDateValue(date, configs);\n\n if (!time) {\n return {value: formattedDate};\n }\n\n const pipedTime = timePipe(\n time,\n {} as unknown as TuiTextMaskOptions & TuiTextMaskConfig,\n );\n\n if (!pipedTime || tuiIsString(pipedTime)) {\n return false;\n }\n\n return {\n value: `${formattedDate}${DATE_TIME_SEPARATOR}${pipedTime.value}`,\n indexesOfPipedChars: pipedTime.indexesOfPipedChars\n ? pipedTime.indexesOfPipedChars.map(i => i + date.length + 2)\n : undefined,\n };\n };\n}\n","import {tuiAssert, TuiDateMode} from '@taiga-ui/cdk';\nimport {TUI_DIGIT_REGEXP, TuiTextMaskList} from '@taiga-ui/core';\n\nconst TWO_DIGITS = new Array(2).fill(TUI_DIGIT_REGEXP);\nconst FOUR_DIGITS = new Array(4).fill(TUI_DIGIT_REGEXP);\n\nexport function tuiCreateDateMask(mode: TuiDateMode, separator: string): TuiTextMaskList {\n tuiAssert.assert(separator.length === 1, `Separator should consist of only 1 symbol`);\n\n switch (mode) {\n case `YMD`:\n return [...FOUR_DIGITS, separator, ...TWO_DIGITS, separator, ...TWO_DIGITS];\n case `MDY`:\n case `DMY`:\n default:\n return [...TWO_DIGITS, separator, ...TWO_DIGITS, separator, ...FOUR_DIGITS];\n }\n}\n","import {CHAR_EN_DASH, CHAR_NO_BREAK_SPACE, tuiAssert, TuiDateMode} from '@taiga-ui/cdk';\nimport {TuiTextMaskList} from '@taiga-ui/core';\n\nimport {tuiCreateDateMask} from './create-date-mask';\n\nexport function tuiCreateDateRangeMask(\n dateMode: TuiDateMode,\n dateSeparator: string,\n): TuiTextMaskList {\n tuiAssert.assert(\n dateSeparator.length === 1,\n `Separator should consist of only 1 symbol`,\n );\n\n const dateMask = tuiCreateDateMask(dateMode, dateSeparator);\n\n return [\n ...dateMask,\n CHAR_NO_BREAK_SPACE,\n CHAR_EN_DASH,\n CHAR_NO_BREAK_SPACE,\n ...dateMask,\n ];\n}\n","import {TuiTimeMode} from '@taiga-ui/cdk';\nimport {TUI_DIGIT_REGEXP, TuiTextMaskList} from '@taiga-ui/core';\nimport {MAX_TIME_VALUES} from '@taiga-ui/kit/constants';\nimport {TuiTimeFormatParts} from '@taiga-ui/kit/types';\n\nfunction tuiCreateTimePartMask(\n maxPartValue: number,\n prefix?: string,\n): Array<string | RegExp> {\n const {length} = String(maxPartValue);\n const regExp = new Array(length).fill(TUI_DIGIT_REGEXP);\n\n if (prefix) {\n regExp.unshift(prefix);\n }\n\n return regExp;\n}\n\nexport function tuiCreateTimeMask(\n mode: TuiTimeMode,\n maxValues: Partial<Record<TuiTimeFormatParts, number>> = {},\n): TuiTextMaskList {\n const {HH, MM, SS, MS} = {\n ...MAX_TIME_VALUES,\n ...maxValues,\n };\n\n return [\n ...tuiCreateTimePartMask(HH),\n ...tuiCreateTimePartMask(MM, `:`),\n ...(mode.includes(`HH:MM:SS`) ? tuiCreateTimePartMask(SS, `:`) : []),\n ...(mode === `HH:MM:SS.MSS` ? tuiCreateTimePartMask(MS, `.`) : []),\n ];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AASA;;AAEG;AACH;AACgB,SAAA,kBAAkB,CAC9B,SAAiB,EACjB,EAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,UAAU,EAAE,aAAa,EAAkC,EAAA;IAE7E,OAAO,KAAK,IAAI,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC,KAAK,SAAS;AACnE,UAAE,SAAS;UACT,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,UAAU,CAAC;AACvC,aAAA,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC;AAClB,aAAA,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;AACnD,CAAC;AAEK,SAAU,8BAA8B,CAC1C,MAAuC,EAAA;IAEvC,OAAO,KAAK,IAAG;AACX,QAAA,IAAI,KAAK,CAAC,MAAM,KAAK,kBAAkB,EAAE;YACrC,OAAO,EAAC,KAAK,EAAC,CAAC;AAClB,SAAA;QAED,OAAO;AACH,YAAA,KAAK,EAAE,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC;SAC3C,CAAC;AACN,KAAC,CAAC;AACN,CAAC;AAEM,MAAM,qBAAqB,GAAG;;ACtBrC,SAAS,cAAc,CAAC,KAAa,EAAE,MAAuC,EAAA;AAC1E,IAAA,OAAO,MAAM,CAAC,cAAc,CACxB,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,kBAAkB,CAAC,EAClC,MAAM,CAAC,UAAU,CACpB,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;AACvC,CAAC;AAED,SAAS,eAAe,CAAC,KAAa,EAAE,MAAuC,EAAA;AAC3E,IAAA,MAAM,EAAC,UAAU,EAAE,aAAa,EAAC,GAAG,MAAM,CAAC;IA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,IAAA,MAAM,EAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAC,GACf,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,eAAe,CACf,EAAA,SAAS,CACf,CAAC;IAEF,OAAO;QACH,GAAG,qBAAqB,CAAC,EAAE,CAAC;AAC5B,QAAA,GAAG,qBAAqB,CAAC,EAAE,EAAE,GAAG,CAAC;QACjC,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAU,QAAA,CAAA,CAAC,GAAG,qBAAqB,CAAC,EAAE,EAAE,CAAG,CAAA,CAAA,CAAC,GAAG,EAAE,CAAC;AACpE,QAAA,IAAI,IAAI,KAAK,CAAc,YAAA,CAAA,GAAG,qBAAqB,CAAC,EAAE,EAAE,CAAG,CAAA,CAAA,CAAC,GAAG,EAAE,CAAC;KACrE,CAAC;AACN;;AClCA;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-utils-mask.js","sources":["../../../projects/kit/utils/mask/create-auto-corrected-date-pipe.ts","../../../projects/kit/utils/mask/create-auto-corrected-date-range-pipe.ts","../../../projects/kit/utils/mask/create-auto-corrected-time-pipe.ts","../../../projects/kit/utils/mask/create-auto-corrected-date-time-pipe.ts","../../../projects/kit/utils/mask/create-date-mask.ts","../../../projects/kit/utils/mask/create-date-range-mask.ts","../../../projects/kit/utils/mask/create-time-mask.ts","../../../projects/kit/utils/mask/taiga-ui-kit-utils-mask.ts"],"sourcesContent":["import {DATE_FILLER_LENGTH, TuiDateMode, TuiDay} from '@taiga-ui/cdk';\nimport {TuiTextMaskPipeHandler, TuiWithOptionalMinMaxWithValue} from '@taiga-ui/core';\n\nexport interface TuiAutoCorrectedDatePipeConfigs\n extends TuiWithOptionalMinMaxWithValue<TuiDay | null, TuiDay> {\n dateFormat: TuiDateMode;\n dateSeparator: string;\n}\n\nexport function tuiNormalizeDateValue(\n dateValue: string,\n {value, min, max, dateFormat, dateSeparator}: TuiAutoCorrectedDatePipeConfigs,\n): string {\n return value && value.toString(dateFormat, dateSeparator) === dateValue\n ? dateValue\n : TuiDay.normalizeParse(dateValue, dateFormat)\n .dayLimit(min, max)\n .toString(dateFormat, dateSeparator);\n}\n\nexport function tuiCreateAutoCorrectedDatePipe(\n config: TuiAutoCorrectedDatePipeConfigs,\n): TuiTextMaskPipeHandler {\n return value => {\n if (value.length !== DATE_FILLER_LENGTH) {\n return {value};\n }\n\n return {\n value: tuiNormalizeDateValue(value, config),\n };\n };\n}\n","import {\n DATE_FILLER_LENGTH,\n DATE_RANGE_FILLER_LENGTH,\n RANGE_SEPARATOR_CHAR,\n TuiDateMode,\n TuiDay,\n TuiDayRange,\n} from '@taiga-ui/cdk';\nimport {TuiTextMaskPipeHandler, TuiWithOptionalMinMaxWithValue} from '@taiga-ui/core';\n\ninterface TuiAutoCorrectedDatePipeConfigs\n extends TuiWithOptionalMinMaxWithValue<TuiDayRange | null, TuiDay> {\n dateFormat: TuiDateMode;\n dateSeparator: string;\n}\n\nfunction parseWithLimit(value: string, config: TuiAutoCorrectedDatePipeConfigs): TuiDay {\n return TuiDay.normalizeParse(\n value.slice(0, DATE_FILLER_LENGTH),\n config.dateFormat,\n ).dayLimit(config.min, config.max);\n}\n\nfunction processRawValue(value: string, config: TuiAutoCorrectedDatePipeConfigs): string {\n const {dateFormat, dateSeparator} = config;\n\n switch (value.length) {\n case DATE_FILLER_LENGTH:\n return parseWithLimit(value, config).toString(dateFormat, dateSeparator);\n case DATE_FILLER_LENGTH + RANGE_SEPARATOR_CHAR.length:\n return (\n parseWithLimit(value, config).toString(dateFormat, dateSeparator) +\n RANGE_SEPARATOR_CHAR\n );\n case DATE_RANGE_FILLER_LENGTH:\n return config.value &&\n config.value.toString(dateFormat, dateSeparator) === value\n ? value\n : TuiDayRange.sort(\n parseWithLimit(value.slice(0, DATE_FILLER_LENGTH), config),\n parseWithLimit(\n value.slice(DATE_FILLER_LENGTH + RANGE_SEPARATOR_CHAR.length),\n config,\n ),\n ).toString(dateFormat, dateSeparator);\n default:\n return value;\n }\n}\n\n/**\n * Normalizes date in formatted string\n *\n * Normalizes when:\n *\n * 1. It is a single date\n * 2. It is a single date and a separator\n * 3. It is two dates and a separator between them\n *\n * In **other** cases, the value does not change.\n *\n * @param config with min and max date\n * @return mask pipe handler that handles `min` and `max`\n */\nexport function tuiCreateAutoCorrectedDateRangePipe(\n config: TuiAutoCorrectedDatePipeConfigs,\n): TuiTextMaskPipeHandler {\n return value => ({value: processRawValue(value, config)});\n}\n","import {TuiTimeMode} from '@taiga-ui/cdk';\nimport {TuiTextMaskPipeHandler} from '@taiga-ui/core';\nimport {MAX_TIME_VALUES} from '@taiga-ui/kit/constants';\nimport {TuiTimeFormatParts} from '@taiga-ui/kit/types';\n\n/**\n * Adjusts the entered time by omitting only suitable values for hours and minutes\n * @returns time as a string\n */\nexport function tuiCreateAutoCorrectedTimePipe(\n timeMode: TuiTimeMode = `HH:MM`,\n maxValues: Partial<Record<TuiTimeFormatParts, number>> = {},\n): TuiTextMaskPipeHandler {\n const timeFormatArray = [`HH`, `MM`, `SS`, `MS`] as const;\n const safeValues = {\n ...MAX_TIME_VALUES,\n ...maxValues,\n };\n\n return conformedValue => {\n const indexesOfPipedChars: number[] = [];\n const conformedValueArr = conformedValue.split(``);\n\n timeFormatArray.forEach(format => {\n const position = timeMode.indexOf(format);\n const maxFirstDigit = parseInt(String(safeValues[format]).slice(0, 1), 10);\n\n if (parseInt(conformedValueArr[position], 10) > maxFirstDigit) {\n conformedValueArr[position + 1] = conformedValueArr[position];\n conformedValueArr[position] = `0`;\n indexesOfPipedChars.push(position);\n }\n });\n\n const isInvalid = timeFormatArray.some(\n format =>\n parseInt(conformedValue.slice(timeMode.indexOf(format), 2), 10) >\n safeValues[format],\n );\n\n return isInvalid\n ? false\n : {\n value: conformedValueArr.join(``),\n indexesOfPipedChars,\n };\n };\n}\n","import {DATE_FILLER_LENGTH, tuiIsString, TuiTimeMode} from '@taiga-ui/cdk';\nimport {\n TuiTextMaskConfig,\n TuiTextMaskOptions,\n TuiTextMaskPipeHandler,\n} from '@taiga-ui/core';\nimport {DATE_TIME_SEPARATOR} from '@taiga-ui/kit/constants';\n\nimport {\n TuiAutoCorrectedDatePipeConfigs,\n tuiNormalizeDateValue,\n} from './create-auto-corrected-date-pipe';\nimport {tuiCreateAutoCorrectedTimePipe} from './create-auto-corrected-time-pipe';\n\ninterface TuiAutoCorrectedDateTimePipeConfigs extends TuiAutoCorrectedDatePipeConfigs {\n timeMode: TuiTimeMode;\n}\n\nexport function tuiCreateAutoCorrectedDateTimePipe(\n configs: TuiAutoCorrectedDateTimePipeConfigs,\n): TuiTextMaskPipeHandler {\n const timePipe = tuiCreateAutoCorrectedTimePipe(configs.timeMode);\n\n return value => {\n if (value.length < DATE_FILLER_LENGTH) {\n return {value};\n }\n\n const [date, time] = value.split(DATE_TIME_SEPARATOR);\n\n const formattedDate = tuiNormalizeDateValue(date, configs);\n\n if (!time) {\n return {value: formattedDate};\n }\n\n const pipedTime = timePipe(\n time,\n {} as unknown as TuiTextMaskOptions & TuiTextMaskConfig,\n );\n\n if (!pipedTime || tuiIsString(pipedTime)) {\n return false;\n }\n\n return {\n value: `${formattedDate}${DATE_TIME_SEPARATOR}${pipedTime.value}`,\n indexesOfPipedChars: pipedTime.indexesOfPipedChars\n ? pipedTime.indexesOfPipedChars.map(i => i + date.length + 2)\n : undefined,\n };\n };\n}\n","import {tuiAssert, TuiDateMode} from '@taiga-ui/cdk';\nimport {TUI_DIGIT_REGEXP, TuiTextMaskList} from '@taiga-ui/core';\n\nconst TWO_DIGITS = new Array(2).fill(TUI_DIGIT_REGEXP);\nconst FOUR_DIGITS = new Array(4).fill(TUI_DIGIT_REGEXP);\n\nexport function tuiCreateDateMask(mode: TuiDateMode, separator: string): TuiTextMaskList {\n tuiAssert.assert(separator.length === 1, `Separator should consist of only 1 symbol`);\n\n switch (mode) {\n case `YMD`:\n return [...FOUR_DIGITS, separator, ...TWO_DIGITS, separator, ...TWO_DIGITS];\n case `MDY`:\n case `DMY`:\n default:\n return [...TWO_DIGITS, separator, ...TWO_DIGITS, separator, ...FOUR_DIGITS];\n }\n}\n","import {CHAR_EN_DASH, CHAR_NO_BREAK_SPACE, tuiAssert, TuiDateMode} from '@taiga-ui/cdk';\nimport {TuiTextMaskList} from '@taiga-ui/core';\n\nimport {tuiCreateDateMask} from './create-date-mask';\n\nexport function tuiCreateDateRangeMask(\n dateMode: TuiDateMode,\n dateSeparator: string,\n): TuiTextMaskList {\n tuiAssert.assert(\n dateSeparator.length === 1,\n `Separator should consist of only 1 symbol`,\n );\n\n const dateMask = tuiCreateDateMask(dateMode, dateSeparator);\n\n return [\n ...dateMask,\n CHAR_NO_BREAK_SPACE,\n CHAR_EN_DASH,\n CHAR_NO_BREAK_SPACE,\n ...dateMask,\n ];\n}\n","import {TuiTimeMode} from '@taiga-ui/cdk';\nimport {TUI_DIGIT_REGEXP, TuiTextMaskList} from '@taiga-ui/core';\nimport {MAX_TIME_VALUES} from '@taiga-ui/kit/constants';\nimport {TuiTimeFormatParts} from '@taiga-ui/kit/types';\n\nfunction tuiCreateTimePartMask(\n maxPartValue: number,\n prefix?: string,\n): Array<string | RegExp> {\n const {length} = String(maxPartValue);\n const regExp = new Array(length).fill(TUI_DIGIT_REGEXP);\n\n if (prefix) {\n regExp.unshift(prefix);\n }\n\n return regExp;\n}\n\nexport function tuiCreateTimeMask(\n mode: TuiTimeMode,\n maxValues: Partial<Record<TuiTimeFormatParts, number>> = {},\n): TuiTextMaskList {\n const {HH, MM, SS, MS} = {\n ...MAX_TIME_VALUES,\n ...maxValues,\n };\n\n return [\n ...tuiCreateTimePartMask(HH),\n ...tuiCreateTimePartMask(MM, `:`),\n ...(mode.includes(`HH:MM:SS`) ? tuiCreateTimePartMask(SS, `:`) : []),\n ...(mode === `HH:MM:SS.MSS` ? tuiCreateTimePartMask(MS, `.`) : []),\n ];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"m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H,GAAG,qBAAqB,CAAC,EAAE,CAAC;AAC5B,QAAA,GAAG,qBAAqB,CAAC,EAAE,EAAE,GAAG,CAAC;QACjC,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAU,QAAA,CAAA,CAAC,GAAG,qBAAqB,CAAC,EAAE,EAAE,CAAG,CAAA,CAAA,CAAC,GAAG,EAAE,CAAC;AACpE,QAAA,IAAI,IAAI,KAAK,CAAc,YAAA,CAAA,GAAG,qBAAqB,CAAC,EAAE,EAAE,CAAG,CAAA,CAAA,CAAC,GAAG,EAAE,CAAC;KACrE,CAAC;AACN;;AClCA;;AAEG;;;;"}
@@ -1,4 +1,4 @@
1
- import { round } from '@taiga-ui/cdk';
1
+ import { tuiRound } from '@taiga-ui/cdk';
2
2
  import { TUI_FLOATING_PRECISION } from '@taiga-ui/kit/constants';
3
3
 
4
4
  /**
@@ -23,7 +23,7 @@ function tuiPercentageToKeyStepValue(valuePercentage, keySteps) {
23
23
  const [[lowerStepPercent, lowerStepValue], [upperStepPercent, upperStepValue]] = tuiFindKeyStepsBoundariesByFn(keySteps, ([keyStepPercentage, _]) => valuePercentage <= keyStepPercentage);
24
24
  const ratio = (valuePercentage - lowerStepPercent) / (upperStepPercent - lowerStepPercent);
25
25
  const controlValue = (upperStepValue - lowerStepValue) * ratio + lowerStepValue;
26
- return round(controlValue, TUI_FLOATING_PRECISION);
26
+ return tuiRound(controlValue, TUI_FLOATING_PRECISION);
27
27
  }
28
28
  function tuiKeyStepValueToPercentage(value, keySteps) {
29
29
  const [[lowerStepPercent, lowerStepValue], [upperStepPercent, upperStepValue]] = tuiFindKeyStepsBoundariesByFn(keySteps, ([_, keyStepValue]) => value <= keyStepValue);
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-utils-math.js","sources":["../../../projects/kit/utils/math/horizontal-direction-to-number.ts","../../../projects/kit/utils/math/key-steps.ts","../../../projects/kit/utils/math/taiga-ui-kit-utils-math.ts"],"sourcesContent":["import {TuiHorizontalDirection} from '@taiga-ui/core';\n\n/**\n * @internal\n */\nexport function tuiHorizontalDirectionToNumber(\n direction: TuiHorizontalDirection,\n): -1 | 1 {\n switch (direction) {\n case `left`:\n return -1;\n case `right`:\n return 1;\n }\n}\n","import {round} from '@taiga-ui/cdk';\nimport {TUI_FLOATING_PRECISION} from '@taiga-ui/kit/constants';\nimport {TuiKeySteps} from '@taiga-ui/kit/types';\n\nfunction tuiFindKeyStepsBoundariesByFn(\n keySteps: TuiKeySteps,\n fn: ([keyStepPercent, keyStepValue]: [number, number]) => boolean,\n): [[number, number], [number, number]] {\n const keyStepUpperIndex = keySteps.findIndex((keyStep, i) => i && fn(keyStep));\n const lowerStep = keySteps[keyStepUpperIndex - 1];\n const upperStep = keySteps[keyStepUpperIndex];\n\n return [lowerStep, upperStep];\n}\n\nexport function tuiPercentageToKeyStepValue(\n valuePercentage: number,\n keySteps: TuiKeySteps,\n): number {\n const [[lowerStepPercent, lowerStepValue], [upperStepPercent, upperStepValue]] =\n tuiFindKeyStepsBoundariesByFn(\n keySteps,\n ([keyStepPercentage, _]) => valuePercentage <= keyStepPercentage,\n );\n const ratio =\n (valuePercentage - lowerStepPercent) / (upperStepPercent - lowerStepPercent);\n const controlValue = (upperStepValue - lowerStepValue) * ratio + lowerStepValue;\n\n return round(controlValue, TUI_FLOATING_PRECISION);\n}\n\nexport function tuiKeyStepValueToPercentage(\n value: number,\n keySteps: TuiKeySteps,\n): number {\n const [[lowerStepPercent, lowerStepValue], [upperStepPercent, upperStepValue]] =\n tuiFindKeyStepsBoundariesByFn(\n keySteps,\n ([_, keyStepValue]) => value <= keyStepValue,\n );\n const ratio = (value - lowerStepValue) / (upperStepValue - lowerStepValue) || 0;\n\n return (upperStepPercent - lowerStepPercent) * ratio + lowerStepPercent;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA;;AAEG;AACG,SAAU,8BAA8B,CAC1C,SAAiC,EAAA;AAEjC,IAAA,QAAQ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,EACR,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,KAAK,KAAK,IAAI,YAAY,CAC/C,CAAC;AACN,IAAA,MAAM,KAAK,GAAG,CAAC,KAAK,GAAG,cAAc,KAAK,cAAc,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IAEhF,OAAO,CAAC,gBAAgB,GAAG,gBAAgB,IAAI,KAAK,GAAG,gBAAgB,CAAC;AAC5E;;AC3CA;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-utils-math.js","sources":["../../../projects/kit/utils/math/horizontal-direction-to-number.ts","../../../projects/kit/utils/math/key-steps.ts","../../../projects/kit/utils/math/taiga-ui-kit-utils-math.ts"],"sourcesContent":["import {TuiHorizontalDirection} from '@taiga-ui/core';\n\n/**\n * @internal\n */\nexport function tuiHorizontalDirectionToNumber(\n direction: TuiHorizontalDirection,\n): -1 | 1 {\n switch (direction) {\n case `left`:\n return -1;\n case `right`:\n return 1;\n }\n}\n","import {tuiRound} from '@taiga-ui/cdk';\nimport {TUI_FLOATING_PRECISION} from '@taiga-ui/kit/constants';\nimport {TuiKeySteps} from '@taiga-ui/kit/types';\n\nfunction tuiFindKeyStepsBoundariesByFn(\n keySteps: TuiKeySteps,\n fn: ([keyStepPercent, keyStepValue]: [number, number]) => boolean,\n): [[number, number], [number, number]] {\n const keyStepUpperIndex = keySteps.findIndex((keyStep, i) => i && fn(keyStep));\n const lowerStep = keySteps[keyStepUpperIndex - 1];\n const upperStep = keySteps[keyStepUpperIndex];\n\n return [lowerStep, upperStep];\n}\n\nexport function tuiPercentageToKeyStepValue(\n valuePercentage: number,\n keySteps: TuiKeySteps,\n): number {\n const [[lowerStepPercent, lowerStepValue], [upperStepPercent, upperStepValue]] =\n tuiFindKeyStepsBoundariesByFn(\n keySteps,\n ([keyStepPercentage, _]) => valuePercentage <= keyStepPercentage,\n );\n const ratio =\n (valuePercentage - lowerStepPercent) / (upperStepPercent - lowerStepPercent);\n const controlValue = (upperStepValue - lowerStepValue) * ratio + lowerStepValue;\n\n return tuiRound(controlValue, TUI_FLOATING_PRECISION);\n}\n\nexport function tuiKeyStepValueToPercentage(\n value: number,\n keySteps: TuiKeySteps,\n): number {\n const [[lowerStepPercent, lowerStepValue], [upperStepPercent, upperStepValue]] =\n tuiFindKeyStepsBoundariesByFn(\n keySteps,\n ([_, keyStepValue]) => value <= keyStepValue,\n );\n const ratio = (value - lowerStepValue) / (upperStepValue - lowerStepValue) || 0;\n\n return (upperStepPercent - lowerStepPercent) * ratio + lowerStepPercent;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA;;AAEG;AACG,SAAU,8BAA8B,CAC1C,SAAiC,EAAA;AAEjC,IAAA,QAAQ,SAAS;AACb,QAAA,KAAK,CAAM,IAAA,CAAA;YACP,OAAO,CAAC,CAAC,CAAC;AACd,QAAA,KAAK,CAAO,KAAA,CAAA;AACR,YAAA,OAAO,CAAC,CAAC;AAChB,KAAA;AACL;;ACVA,SAAS,6BAA6B,CAClC,QAAqB,EACrB,EAAiE,EAAA;IAEjE,MAAM,iBAAiB,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/E,MAAM,SAAS,GAAG,QAAQ,CAAC,iBAAiB,GAAG,CAAC,CAAC,CAAC;AAClD,IAAA,MAAM,SAAS,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAC;AAE9C,IAAA,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;AAClC,CAAC;AAEe,SAAA,2BAA2B,CACvC,eAAuB,EACvB,QAAqB,EAAA;AAErB,IAAA,MAAM,CAAC,CAAC,gBAAgB,EAAE,cAAc,CAAC,EAAE,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC,GAC1E,6BAA6B,CACzB,QAAQ,EACR,CAAC,CAAC,iBAAiB,EAAE,CAAC,CAAC,KAAK,eAAe,IAAI,iBAAiB,CACnE,CAAC;AACN,IAAA,MAAM,KAAK,GACP,CAAC,eAAe,GAAG,gBAAgB,KAAK,gBAAgB,GAAG,gBAAgB,CAAC,CAAC;IACjF,MAAM,YAAY,GAAG,CAAC,cAAc,GAAG,cAAc,IAAI,KAAK,GAAG,cAAc,CAAC;AAEhF,IAAA,OAAO,QAAQ,CAAC,YAAY,EAAE,sBAAsB,CAAC,CAAC;AAC1D,CAAC;AAEe,SAAA,2BAA2B,CACvC,KAAa,EACb,QAAqB,EAAA;AAErB,IAAA,MAAM,CAAC,CAAC,gBAAgB,EAAE,cAAc,CAAC,EAAE,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC,GAC1E,6BAA6B,CACzB,QAAQ,EACR,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,KAAK,KAAK,IAAI,YAAY,CAC/C,CAAC;AACN,IAAA,MAAM,KAAK,GAAG,CAAC,KAAK,GAAG,cAAc,KAAK,cAAc,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IAEhF,OAAO,CAAC,gBAAgB,GAAG,gBAAgB,IAAI,KAAK,GAAG,gBAAgB,CAAC;AAC5E;;AC3CA;;AAEG;;;;"}
@@ -40,15 +40,12 @@ function tuiCreateTimePeriods(minHour = 0, maxHour = HOURS_IN_DAY, minutes = [0,
40
40
  }
41
41
 
42
42
  /**
43
- * @deprecated: use {@link tuiGetPrecision} instead
44
43
  * @return fractional length
45
44
  */
46
- // eslint-disable-next-line @typescript-eslint/naming-convention
47
- function getPrecision(num) {
45
+ function tuiGetPrecision(num) {
48
46
  const [, fractionPart = ``] = String(num).split(`.`);
49
47
  return fractionPart.length;
50
48
  }
51
- const tuiGetPrecision = getPrecision;
52
49
 
53
50
  function tuiIsFlat(items) {
54
51
  return !Array.isArray(items[0]);
@@ -69,5 +66,5 @@ function tuiControlValueFactory(control, valueTransformer) {
69
66
  * Generated bundle index. Do not edit.
70
67
  */
71
68
 
72
- export { getPrecision, tuiControlValueFactory, tuiCreateDefaultDayRangePeriods, tuiCreateTimePeriods, tuiGetPrecision, tuiIsFlat };
69
+ export { tuiControlValueFactory, tuiCreateDefaultDayRangePeriods, tuiCreateTimePeriods, tuiGetPrecision, tuiIsFlat };
73
70
  //# sourceMappingURL=taiga-ui-kit-utils-miscellaneous.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-utils-miscellaneous.js","sources":["../../../projects/kit/utils/miscellaneous/create-default-day-range-periods.ts","../../../projects/kit/utils/miscellaneous/create-time-periods.ts","../../../projects/kit/utils/miscellaneous/get-precision.ts","../../../projects/kit/utils/miscellaneous/is-flat.ts","../../../projects/kit/utils/miscellaneous/replay-control-value-changes-factory.ts","../../../projects/kit/utils/miscellaneous/taiga-ui-kit-utils-miscellaneous.ts"],"sourcesContent":["import {TUI_FIRST_DAY, TuiDay, TuiDayRange} from '@taiga-ui/cdk';\nimport {TuiDayRangePeriod} from '@taiga-ui/kit/classes';\n\nexport function tuiCreateDefaultDayRangePeriods(\n periodTitles: [string, string, string, string, string, string] = [\n `For all the time`,\n `Today`,\n `Yesterday`,\n `Current week`,\n `Current month`,\n `Previous month`,\n ],\n): readonly TuiDayRangePeriod[] {\n const today = TuiDay.currentLocal();\n const yesterday = today.append({day: -1});\n const startOfWeek = today.append({day: -today.dayOfWeek()});\n const endOfWeek = startOfWeek.append({day: 6});\n const startOfMonth = today.append({day: 1 - today.day});\n const endOfMonth = startOfMonth.append({month: 1, day: -1});\n const startOfLastMonth = startOfMonth.append({month: -1});\n\n return [\n new TuiDayRangePeriod(new TuiDayRange(TUI_FIRST_DAY, today), periodTitles[0]),\n new TuiDayRangePeriod(new TuiDayRange(today, today), periodTitles[1]),\n new TuiDayRangePeriod(new TuiDayRange(yesterday, yesterday), periodTitles[2]),\n new TuiDayRangePeriod(new TuiDayRange(startOfWeek, endOfWeek), periodTitles[3]),\n new TuiDayRangePeriod(new TuiDayRange(startOfMonth, endOfMonth), periodTitles[4]),\n new TuiDayRangePeriod(\n new TuiDayRange(startOfLastMonth, startOfMonth.append({day: -1})),\n periodTitles[5],\n ),\n ];\n}\n","import {HOURS_IN_DAY, TuiTime} from '@taiga-ui/cdk';\n\nexport function tuiCreateTimePeriods(\n minHour: number = 0,\n maxHour: number = HOURS_IN_DAY,\n minutes: readonly number[] = [0, 30],\n): readonly TuiTime[] {\n const timeArray: TuiTime[] = [];\n\n for (let i = minHour; i < maxHour; i++) {\n for (let j = 0; j < minutes.length; j++) {\n const time = new TuiTime(i, minutes[j]);\n\n timeArray.push(time);\n }\n }\n\n return timeArray;\n}\n","/**\n * @deprecated: use {@link tuiGetPrecision} instead\n * @return fractional length\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function getPrecision(num: number): number {\n const [, fractionPart = ``] = String(num).split(`.`);\n\n return fractionPart.length;\n}\n\nexport const tuiGetPrecision = getPrecision;\n","export function tuiIsFlat<T>(\n items: readonly T[] | ReadonlyArray<readonly T[]>,\n): items is readonly T[] {\n return !Array.isArray(items[0]);\n}\n","import {NgControl} from '@angular/forms';\nimport {\n tuiControlValue,\n TuiControlValueTransformer,\n TuiDay,\n TuiDayRange,\n TuiTime,\n} from '@taiga-ui/cdk';\nimport {Observable, of} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\n/**\n * @internal\n */\nexport function tuiControlValueFactory<\n T extends TuiDayRange | TuiDay | [TuiDay | null, TuiTime | null],\n>(\n control: NgControl | null,\n valueTransformer?: TuiControlValueTransformer<T> | null,\n): Observable<T | null> | null {\n return control\n ? tuiControlValue(control).pipe(\n map(value =>\n valueTransformer\n ? valueTransformer.fromControlValue(value)\n : (value as T),\n ),\n )\n : of(null);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGM,SAAU,+BAA+B,CAC3C,YAAiE,GAAA;IAC7D,CAAkB,gBAAA,CAAA;IAClB,CAAO,KAAA,CAAA;IACP,CAAW,SAAA,CAAA;IACX,CAAc,YAAA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AAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACpC;;ACOA;;AAEG;AACa,SAAA,sBAAsB,CAGlC,OAAyB,EACzB,gBAAuD,EAAA;AAEvD,IAAA,OAAO,OAAO;AACV,UAAE,eAAe,CAAC,OAAO,CAAC,CAAC,IAAI,CACzB,GAAG,CAAC,KAAK,IACL,gBAAgB;AACZ,cAAE,gBAAgB,CAAC,gBAAgB,CAAC,KAAK,CAAC;cACvC,KAAW,CACrB,CACJ;AACH,UAAE,EAAE,CAAC,IAAI,CAAC,CAAC;AACnB;;AC7BA;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-utils-miscellaneous.js","sources":["../../../projects/kit/utils/miscellaneous/create-default-day-range-periods.ts","../../../projects/kit/utils/miscellaneous/create-time-periods.ts","../../../projects/kit/utils/miscellaneous/get-precision.ts","../../../projects/kit/utils/miscellaneous/is-flat.ts","../../../projects/kit/utils/miscellaneous/replay-control-value-changes-factory.ts","../../../projects/kit/utils/miscellaneous/taiga-ui-kit-utils-miscellaneous.ts"],"sourcesContent":["import {TUI_FIRST_DAY, TuiDay, TuiDayRange} from '@taiga-ui/cdk';\nimport {TuiDayRangePeriod} from '@taiga-ui/kit/classes';\n\nexport function tuiCreateDefaultDayRangePeriods(\n periodTitles: [string, string, string, string, string, string] = [\n `For all the time`,\n `Today`,\n `Yesterday`,\n `Current week`,\n `Current month`,\n `Previous month`,\n ],\n): readonly TuiDayRangePeriod[] {\n const today = TuiDay.currentLocal();\n const yesterday = today.append({day: -1});\n const startOfWeek = today.append({day: -today.dayOfWeek()});\n const endOfWeek = startOfWeek.append({day: 6});\n const startOfMonth = today.append({day: 1 - today.day});\n const endOfMonth = startOfMonth.append({month: 1, day: -1});\n const startOfLastMonth = startOfMonth.append({month: -1});\n\n return [\n new TuiDayRangePeriod(new TuiDayRange(TUI_FIRST_DAY, today), periodTitles[0]),\n new TuiDayRangePeriod(new TuiDayRange(today, today), periodTitles[1]),\n new TuiDayRangePeriod(new TuiDayRange(yesterday, yesterday), periodTitles[2]),\n new TuiDayRangePeriod(new TuiDayRange(startOfWeek, endOfWeek), periodTitles[3]),\n new TuiDayRangePeriod(new TuiDayRange(startOfMonth, endOfMonth), periodTitles[4]),\n new TuiDayRangePeriod(\n new TuiDayRange(startOfLastMonth, startOfMonth.append({day: -1})),\n periodTitles[5],\n ),\n ];\n}\n","import {HOURS_IN_DAY, TuiTime} from '@taiga-ui/cdk';\n\nexport function tuiCreateTimePeriods(\n minHour: number = 0,\n maxHour: number = HOURS_IN_DAY,\n minutes: readonly number[] = [0, 30],\n): readonly TuiTime[] {\n const timeArray: TuiTime[] = [];\n\n for (let i = minHour; i < maxHour; i++) {\n for (let j = 0; j < minutes.length; j++) {\n const time = new TuiTime(i, minutes[j]);\n\n timeArray.push(time);\n }\n }\n\n return timeArray;\n}\n","/**\n * @return fractional length\n */\nexport function tuiGetPrecision(num: number): number {\n const [, fractionPart = ``] = String(num).split(`.`);\n\n return fractionPart.length;\n}\n","export function tuiIsFlat<T>(\n items: readonly T[] | ReadonlyArray<readonly T[]>,\n): items is readonly T[] {\n return !Array.isArray(items[0]);\n}\n","import {NgControl} from '@angular/forms';\nimport {\n tuiControlValue,\n TuiControlValueTransformer,\n TuiDay,\n TuiDayRange,\n TuiTime,\n} from '@taiga-ui/cdk';\nimport {Observable, of} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\n/**\n * @internal\n */\nexport function tuiControlValueFactory<\n T extends TuiDayRange | TuiDay | [TuiDay | null, TuiTime | null],\n>(\n control: NgControl | null,\n valueTransformer?: TuiControlValueTransformer<T> | null,\n): Observable<T | null> | null {\n return control\n ? tuiControlValue(control).pipe(\n map(value =>\n valueTransformer\n ? valueTransformer.fromControlValue(value)\n : (value as T),\n ),\n )\n : of(null);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGM,SAAU,+BAA+B,CAC3C,YAAiE,GAAA;IAC7D,CAAkB,gBAA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D,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACpC;;ACOA;;AAEG;AACa,SAAA,sBAAsB,CAGlC,OAAyB,EACzB,gBAAuD,EAAA;AAEvD,IAAA,OAAO,OAAO;AACV,UAAE,eAAe,CAAC,OAAO,CAAC,CAAC,IAAI,CACzB,GAAG,CAAC,KAAK,IACL,gBAAgB;AACZ,cAAE,gBAAgB,CAAC,gBAAgB,CAAC,KAAK,CAAC;cACvC,KAAW,CACrB,CACJ;AACH,UAAE,EAAE,CAAC,IAAI,CAAC,CAAC;AACnB;;AC7BA;;AAEG;;;;"}
@@ -1,4 +1,3 @@
1
- export * from '@taiga-ui/kit/utils/dom';
2
1
  export * from '@taiga-ui/kit/utils/files';
3
2
  export * from '@taiga-ui/kit/utils/format';
4
3
  export * from '@taiga-ui/kit/utils/mask';
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-utils.js","sources":["../../../projects/kit/utils/taiga-ui-kit-utils.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;;AAEG"}
1
+ {"version":3,"file":"taiga-ui-kit-utils.js","sources":["../../../projects/kit/utils/taiga-ui-kit-utils.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;;AAEG"}
@@ -1,4 +1,3 @@
1
- export * from './bread-crumbs-item';
2
1
  export * from './file-like';
3
2
  export * from './mobile-calendar-data';
4
3
  export * from './month-context';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/kit",
3
- "version": "3.0.0-rc.0",
3
+ "version": "3.0.0-rc.1",
4
4
  "description": "Taiga UI Angular main components kit",
5
5
  "keywords": [
6
6
  "angular",
@@ -13,7 +13,7 @@
13
13
  "repository": "https://github.com/tinkoff/taiga-ui",
14
14
  "license": "Apache-2.0",
15
15
  "dependencies": {
16
- "@ng-web-apis/intersection-observer": "3.0.0",
16
+ "@ng-web-apis/intersection-observer": "^3.0.0",
17
17
  "angular2-text-mask": "^9.0.0",
18
18
  "tslib": "^2.0.0"
19
19
  },
@@ -24,9 +24,9 @@
24
24
  "@angular/router": ">=9.0.0",
25
25
  "@ng-web-apis/common": ">=2.0.0",
26
26
  "@ng-web-apis/mutation-observer": ">=2.0.0",
27
- "@taiga-ui/cdk": ">=3.0.0-rc.0",
28
- "@taiga-ui/core": ">=3.0.0-rc.0",
29
- "@taiga-ui/i18n": ">=3.0.0-rc.0",
27
+ "@taiga-ui/cdk": ">=3.0.0-rc.1",
28
+ "@taiga-ui/core": ">=3.0.0-rc.1",
29
+ "@taiga-ui/i18n": ">=3.0.0-rc.1",
30
30
  "@tinkoff/ng-polymorpheus": ">=4.0.0",
31
31
  "rxjs": ">=6.0.0"
32
32
  },
@@ -1,9 +1,2 @@
1
1
  import { FactoryProvider } from '@angular/core';
2
- import { TuiHandler, TuiMonth } from '@taiga-ui/cdk';
3
- import { TuiMonthPipe } from '@taiga-ui/core';
4
- import { Observable } from 'rxjs';
5
2
  export declare const TUI_MONTH_FORMATTER_PROVIDER: FactoryProvider;
6
- /**
7
- * Range.setStart/set-end, except it uses offset in characters only
8
- */
9
- export declare function monthFormatterFactory(pipe: TuiMonthPipe): TuiHandler<TuiMonth | null, Observable<string>>;
@@ -1,6 +1 @@
1
- import { Provider } from '@angular/core';
2
- import { TuiDropdownControllerDirective } from '@taiga-ui/core';
3
- export declare function fixedDropdownControllerFactory(directive: TuiDropdownControllerDirective | null): TuiDropdownControllerDirective;
4
- export declare const FIXED_DROPDOWN_CONTROLLER_PROVIDER: Provider;
5
- export declare function leftAlignedDropdownControllerFactory(directive: TuiDropdownControllerDirective | null): TuiDropdownControllerDirective;
6
- export declare const LEFT_ALIGNED_DROPDOWN_CONTROLLER_PROVIDER: Provider;
1
+ export declare const FIXED_DROPDOWN_CONTROLLER_PROVIDER: import("@angular/core").FactoryProvider;
@@ -0,0 +1,5 @@
1
+ import { InjectionToken, Provider } from '@angular/core';
2
+ import { TuiControlValueTransformer, TuiDay, TuiDayRange } from '@taiga-ui/cdk';
3
+ import { Observable } from 'rxjs';
4
+ export declare const TUI_CALENDAR_DATE_STREAM: InjectionToken<Observable<TuiDay | TuiDayRange | null>>;
5
+ export declare function tuiDateStreamWithTransformer(transformer: InjectionToken<TuiControlValueTransformer<any>>): Provider;
package/tokens/index.d.ts CHANGED
@@ -1,9 +1,8 @@
1
- export * from './calendar-data-stream';
1
+ export * from './calendar-date-stream';
2
2
  export * from './date-inputs-value-transformers';
3
3
  export * from './i18n';
4
4
  export * from './items-handlers';
5
5
  export * from './mobile-calendar';
6
6
  export * from './month-formatter';
7
7
  export * from './tab-margin';
8
- export * from './tag-status';
9
8
  export * from './validation-errors';
@@ -1,4 +1,4 @@
1
1
  import { InjectionToken } from '@angular/core';
2
2
  import { PolymorpheusContent } from '@tinkoff/ng-polymorpheus';
3
3
  import { Observable } from 'rxjs';
4
- export declare const TUI_VALIDATION_ERRORS: InjectionToken<Record<string, PolymorpheusContent<{}> | Observable<PolymorpheusContent<{}>>>>;
4
+ export declare const TUI_VALIDATION_ERRORS: InjectionToken<Record<string, PolymorpheusContent<any> | Observable<PolymorpheusContent<any>>>>;
@@ -1,5 +1 @@
1
- /**
2
- * @deprecated: use {@link tuiFormatSize} instead
3
- */
4
- export declare function formatSize(units: [string, string, string], size?: number): string | null;
5
- export declare const tuiFormatSize: typeof formatSize;
1
+ export declare function tuiFormatSize(units: [string, string, string], size?: number): string | null;
@@ -1,5 +1 @@
1
- /**
2
- * @deprecated: use {@link tuiGetAcceptArray} instead
3
- */
4
- export declare function getAcceptArray(accept: string): readonly string[];
5
- export declare const tuiGetAcceptArray: typeof getAcceptArray;
1
+ export declare function tuiGetAcceptArray(accept: string): readonly string[];
@@ -1,8 +1,6 @@
1
1
  /**
2
- * @deprecated: use {@link tuiStringHashToHsl} instead
3
2
  * Converts a string to an HSL color
4
3
  * @param value string to convert
5
4
  * @return HSL color string
6
5
  */
7
- export declare function stringHashToHsl(value: string): string;
8
- export declare const tuiStringHashToHsl: typeof stringHashToHsl;
6
+ export declare function tuiStringHashToHsl(value: string): string;
package/utils/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- export * from '@taiga-ui/kit/utils/dom';
2
1
  export * from '@taiga-ui/kit/utils/files';
3
2
  export * from '@taiga-ui/kit/utils/format';
4
3
  export * from '@taiga-ui/kit/utils/mask';
@@ -4,9 +4,5 @@ export interface TuiAutoCorrectedDatePipeConfigs extends TuiWithOptionalMinMaxWi
4
4
  dateFormat: TuiDateMode;
5
5
  dateSeparator: string;
6
6
  }
7
- /**
8
- * @deprecated: use {@link tuiNormalizeDateValue} instead
9
- */
10
- export declare function normalizeDateValue(dateValue: string, { value, min, max, dateFormat, dateSeparator }: TuiAutoCorrectedDatePipeConfigs): string;
7
+ export declare function tuiNormalizeDateValue(dateValue: string, { value, min, max, dateFormat, dateSeparator }: TuiAutoCorrectedDatePipeConfigs): string;
11
8
  export declare function tuiCreateAutoCorrectedDatePipe(config: TuiAutoCorrectedDatePipeConfigs): TuiTextMaskPipeHandler;
12
- export declare const tuiNormalizeDateValue: typeof normalizeDateValue;
@@ -1,6 +1,4 @@
1
1
  /**
2
- * @deprecated: use {@link tuiGetPrecision} instead
3
2
  * @return fractional length
4
3
  */
5
- export declare function getPrecision(num: number): number;
6
- export declare const tuiGetPrecision: typeof getPrecision;
4
+ export declare function tuiGetPrecision(num: number): number;
@@ -1 +0,0 @@
1
- export * from './slider/slider';
@@ -1,10 +0,0 @@
1
- {
2
- "main": "../bundles/taiga-ui-kit-abstract.umd.js",
3
- "module": "../fesm2015/taiga-ui-kit-abstract.js",
4
- "es2015": "../fesm2015/taiga-ui-kit-abstract.js",
5
- "esm2015": "../esm2015/abstract/taiga-ui-kit-abstract.js",
6
- "fesm2015": "../fesm2015/taiga-ui-kit-abstract.js",
7
- "typings": "taiga-ui-kit-abstract.d.ts",
8
- "sideEffects": false,
9
- "name": "@taiga-ui/kit/abstract"
10
- }
@@ -1,69 +0,0 @@
1
- import { ChangeDetectorRef, ElementRef } from '@angular/core';
2
- import { NgControl } from '@angular/forms';
3
- import { AbstractTuiControl, TuiNativeFocusableElement } from '@taiga-ui/cdk';
4
- import { TuiSizeS, TuiWithOptionalMinMax } from '@taiga-ui/core';
5
- import { TuiKeySteps } from '@taiga-ui/kit/types';
6
- import { Observable } from 'rxjs';
7
- import * as i0 from "@angular/core";
8
- export declare const SLIDER_KEYBOARD_STEP = 0.05;
9
- export declare const DOT_WIDTH: {
10
- [key: string]: number;
11
- };
12
- /**
13
- * @awful TODO: 3.0 remove
14
- * @internal
15
- * @dynamic
16
- */
17
- export declare abstract class AbstractTuiSlider<T> extends AbstractTuiControl<T> implements TuiWithOptionalMinMax<number> {
18
- private readonly documentRef;
19
- readonly fromToTexts$: Observable<[string, string]>;
20
- private readonly pointerDown$;
21
- protected dotLeft?: ElementRef<TuiNativeFocusableElement>;
22
- protected dotRight?: ElementRef<TuiNativeFocusableElement>;
23
- min: number;
24
- max: number;
25
- segments: number;
26
- steps: number;
27
- quantum: number;
28
- pluralize: Record<string, string> | null;
29
- size: TuiSizeS;
30
- keySteps: TuiKeySteps | null;
31
- focusVisibleLeft: boolean;
32
- focusVisibleRight: boolean;
33
- protected constructor(ngControl: NgControl | null, changeDetectorRef: ChangeDetectorRef, documentRef: Document, fromToTexts$: Observable<[string, string]>);
34
- get segmented(): boolean;
35
- get discrete(): boolean;
36
- get length(): number;
37
- get computedStep(): number;
38
- get isLeftFocusable(): boolean;
39
- get isRightFocusable(): boolean;
40
- abstract get left(): number;
41
- abstract get right(): number;
42
- abstract processValue(value: number, right?: boolean): void;
43
- ngOnInit(): void;
44
- ngOnDestroy(): void;
45
- onMouseDown(event: MouseEvent): void;
46
- onTouchStart(event: TouchEvent): void;
47
- getSegmentLabel(segment: number): number;
48
- getSegmentPrefix(segment: number, texts: [string, string]): string;
49
- onActiveZone(active: boolean): void;
50
- onLeftFocusVisible(focusVisible: boolean): void;
51
- onRightFocusVisible(focusVisible: boolean): void;
52
- getValueFromFraction(fraction: number): number;
53
- fractionGuard(fraction: number): number;
54
- protected getFractionFromValue(value: number): number;
55
- protected getCalibratedFractionFromEvents(rect: ClientRect, clientX: number, _: boolean): number;
56
- protected valueGuard(value: number): number;
57
- private processFocus;
58
- /**
59
- * Function for converting the fullness of the slider to a value and vice versa
60
- * taking into account the steps of linear dependence.
61
- *
62
- * @param value passed value
63
- * @param isFraction translation is carried out from fullness to value
64
- */
65
- private fractionValueKeyStepConverter;
66
- private getFractionFromEvents;
67
- static ɵfac: i0.ɵɵFactoryDeclaration<AbstractTuiSlider<any>, never>;
68
- static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractTuiSlider<any>, never, never, { "min": "min"; "max": "max"; "segments": "segments"; "steps": "steps"; "quantum": "quantum"; "pluralize": "pluralize"; "size": "size"; "keySteps": "keySteps"; }, {}, never>;
69
- }
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@taiga-ui/kit/abstract" />
5
- export * from './index';