@taiga-ui/core 3.51.0 → 3.52.0

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 (614) hide show
  1. package/abstract/taiga-ui-core-abstract.d.ts +3 -0
  2. package/animations/taiga-ui-core-animations.d.ts +3 -0
  3. package/bundles/taiga-ui-core-abstract.umd.js +9 -0
  4. package/bundles/taiga-ui-core-abstract.umd.js.map +1 -1
  5. package/bundles/taiga-ui-core-animations.umd.js +4 -0
  6. package/bundles/taiga-ui-core-animations.umd.js.map +1 -1
  7. package/bundles/taiga-ui-core-components-alert.umd.js +16 -1
  8. package/bundles/taiga-ui-core-components-alert.umd.js.map +1 -1
  9. package/bundles/taiga-ui-core-components-button.umd.js +7 -0
  10. package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
  11. package/bundles/taiga-ui-core-components-calendar.umd.js +4 -0
  12. package/bundles/taiga-ui-core-components-calendar.umd.js.map +1 -1
  13. package/bundles/taiga-ui-core-components-data-list.umd.js +10 -0
  14. package/bundles/taiga-ui-core-components-data-list.umd.js.map +1 -1
  15. package/bundles/taiga-ui-core-components-dialog.umd.js +12 -0
  16. package/bundles/taiga-ui-core-components-dialog.umd.js.map +1 -1
  17. package/bundles/taiga-ui-core-components-error.umd.js +4 -0
  18. package/bundles/taiga-ui-core-components-error.umd.js.map +1 -1
  19. package/bundles/taiga-ui-core-components-expand.umd.js +5 -0
  20. package/bundles/taiga-ui-core-components-expand.umd.js.map +1 -1
  21. package/bundles/taiga-ui-core-components-group.umd.js +4 -0
  22. package/bundles/taiga-ui-core-components-group.umd.js.map +1 -1
  23. package/bundles/taiga-ui-core-components-hints-host.umd.js +8 -0
  24. package/bundles/taiga-ui-core-components-hints-host.umd.js.map +1 -1
  25. package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js +6 -0
  26. package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js.map +1 -1
  27. package/bundles/taiga-ui-core-components-label.umd.js +4 -0
  28. package/bundles/taiga-ui-core-components-label.umd.js.map +1 -1
  29. package/bundles/taiga-ui-core-components-link.umd.js +5 -0
  30. package/bundles/taiga-ui-core-components-link.umd.js.map +1 -1
  31. package/bundles/taiga-ui-core-components-loader.umd.js +10 -1
  32. package/bundles/taiga-ui-core-components-loader.umd.js.map +1 -1
  33. package/bundles/taiga-ui-core-components-notification.umd.js +7 -0
  34. package/bundles/taiga-ui-core-components-notification.umd.js.map +1 -1
  35. package/bundles/taiga-ui-core-components-primitive-calendar.umd.js +7 -0
  36. package/bundles/taiga-ui-core-components-primitive-calendar.umd.js.map +1 -1
  37. package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js +8 -0
  38. package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js.map +1 -1
  39. package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js +4 -0
  40. package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js.map +1 -1
  41. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +33 -1
  42. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
  43. package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js +4 -0
  44. package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js.map +1 -1
  45. package/bundles/taiga-ui-core-components-root.umd.js +7 -1
  46. package/bundles/taiga-ui-core-components-root.umd.js.map +1 -1
  47. package/bundles/taiga-ui-core-components-scroll-controls.umd.js +5 -0
  48. package/bundles/taiga-ui-core-components-scroll-controls.umd.js.map +1 -1
  49. package/bundles/taiga-ui-core-components-scrollbar.umd.js +8 -0
  50. package/bundles/taiga-ui-core-components-scrollbar.umd.js.map +1 -1
  51. package/bundles/taiga-ui-core-components-svg.umd.js +9 -0
  52. package/bundles/taiga-ui-core-components-svg.umd.js.map +1 -1
  53. package/bundles/taiga-ui-core-components-theme-night.umd.js +4 -0
  54. package/bundles/taiga-ui-core-components-theme-night.umd.js.map +1 -1
  55. package/bundles/taiga-ui-core-components-tooltip.umd.js +4 -0
  56. package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
  57. package/bundles/taiga-ui-core-components.umd.js +4 -0
  58. package/bundles/taiga-ui-core-components.umd.js.map +1 -1
  59. package/bundles/taiga-ui-core-constants.umd.js +27 -0
  60. package/bundles/taiga-ui-core-constants.umd.js.map +1 -1
  61. package/bundles/taiga-ui-core-directives-dropdown.umd.js +34 -1
  62. package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
  63. package/bundles/taiga-ui-core-directives-hint.umd.js +13 -0
  64. package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
  65. package/bundles/taiga-ui-core-directives-mask-accessor.umd.js +7 -0
  66. package/bundles/taiga-ui-core-directives-mask-accessor.umd.js.map +1 -1
  67. package/bundles/taiga-ui-core-directives-mode.umd.js +4 -0
  68. package/bundles/taiga-ui-core-directives-mode.umd.js.map +1 -1
  69. package/bundles/taiga-ui-core-directives-number-format.umd.js +414 -0
  70. package/bundles/taiga-ui-core-directives-number-format.umd.js.map +1 -0
  71. package/bundles/taiga-ui-core-directives-scroll-into-view.umd.js +9 -0
  72. package/bundles/taiga-ui-core-directives-scroll-into-view.umd.js.map +1 -1
  73. package/bundles/taiga-ui-core-directives-textfield-controller.umd.js +11 -0
  74. package/bundles/taiga-ui-core-directives-textfield-controller.umd.js.map +1 -1
  75. package/bundles/taiga-ui-core-directives-wrapper.umd.js +4 -0
  76. package/bundles/taiga-ui-core-directives-wrapper.umd.js.map +1 -1
  77. package/bundles/taiga-ui-core-directives.umd.js +14 -4
  78. package/bundles/taiga-ui-core-directives.umd.js.map +1 -1
  79. package/bundles/taiga-ui-core-enums.umd.js +22 -0
  80. package/bundles/taiga-ui-core-enums.umd.js.map +1 -1
  81. package/bundles/taiga-ui-core-interfaces.umd.js +3 -1
  82. package/bundles/taiga-ui-core-interfaces.umd.js.map +1 -1
  83. package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js +4 -0
  84. package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js.map +1 -1
  85. package/bundles/taiga-ui-core-internal-svg-defs-host.umd.js +5 -0
  86. package/bundles/taiga-ui-core-internal-svg-defs-host.umd.js.map +1 -1
  87. package/bundles/taiga-ui-core-internal.umd.js +4 -0
  88. package/bundles/taiga-ui-core-internal.umd.js.map +1 -1
  89. package/bundles/taiga-ui-core-mask.umd.js +3 -1
  90. package/bundles/taiga-ui-core-mask.umd.js.map +1 -1
  91. package/bundles/taiga-ui-core-observables.umd.js +11 -0
  92. package/bundles/taiga-ui-core-observables.umd.js.map +1 -1
  93. package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.js +11 -0
  94. package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.js.map +1 -1
  95. package/bundles/taiga-ui-core-pipes-flag.umd.js +4 -0
  96. package/bundles/taiga-ui-core-pipes-flag.umd.js.map +1 -1
  97. package/bundles/taiga-ui-core-pipes-format-date.umd.js +4 -0
  98. package/bundles/taiga-ui-core-pipes-format-date.umd.js.map +1 -1
  99. package/bundles/taiga-ui-core-pipes-format-number.umd.js +10 -0
  100. package/bundles/taiga-ui-core-pipes-format-number.umd.js.map +1 -1
  101. package/bundles/taiga-ui-core-pipes-format-phone.umd.js +11 -0
  102. package/bundles/taiga-ui-core-pipes-format-phone.umd.js.map +1 -1
  103. package/bundles/taiga-ui-core-pipes-month.umd.js +4 -0
  104. package/bundles/taiga-ui-core-pipes-month.umd.js.map +1 -1
  105. package/bundles/taiga-ui-core-pipes-order-week-days.umd.js +4 -0
  106. package/bundles/taiga-ui-core-pipes-order-week-days.umd.js.map +1 -1
  107. package/bundles/taiga-ui-core-pipes.umd.js +4 -0
  108. package/bundles/taiga-ui-core-pipes.umd.js.map +1 -1
  109. package/bundles/taiga-ui-core-providers.umd.js +7 -0
  110. package/bundles/taiga-ui-core-providers.umd.js.map +1 -1
  111. package/bundles/taiga-ui-core-services.umd.js +20 -2
  112. package/bundles/taiga-ui-core-services.umd.js.map +1 -1
  113. package/bundles/taiga-ui-core-tokens.umd.js +129 -0
  114. package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
  115. package/bundles/taiga-ui-core-types.umd.js +3 -1
  116. package/bundles/taiga-ui-core-types.umd.js.map +1 -1
  117. package/bundles/taiga-ui-core-utils-dom.umd.js +50 -0
  118. package/bundles/taiga-ui-core-utils-dom.umd.js.map +1 -1
  119. package/bundles/taiga-ui-core-utils-format.umd.js +51 -0
  120. package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
  121. package/bundles/taiga-ui-core-utils-mask.umd.js +40 -1
  122. package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
  123. package/bundles/taiga-ui-core-utils-miscellaneous.umd.js +17 -0
  124. package/bundles/taiga-ui-core-utils-miscellaneous.umd.js.map +1 -1
  125. package/bundles/taiga-ui-core-utils-mobile.umd.js +4 -0
  126. package/bundles/taiga-ui-core-utils-mobile.umd.js.map +1 -1
  127. package/bundles/taiga-ui-core-utils.umd.js +4 -0
  128. package/bundles/taiga-ui-core-utils.umd.js.map +1 -1
  129. package/bundles/taiga-ui-core.umd.js +4 -0
  130. package/bundles/taiga-ui-core.umd.js.map +1 -1
  131. package/components/alert/taiga-ui-core-components-alert.d.ts +3 -0
  132. package/components/button/button.options.d.ts +3 -0
  133. package/components/button/taiga-ui-core-components-button.d.ts +3 -0
  134. package/components/calendar/taiga-ui-core-components-calendar.d.ts +3 -0
  135. package/components/data-list/option/option.component.d.ts +1 -0
  136. package/components/data-list/taiga-ui-core-components-data-list.d.ts +3 -0
  137. package/components/dialog/dialog.tokens.d.ts +6 -0
  138. package/components/dialog/taiga-ui-core-components-dialog.d.ts +3 -0
  139. package/components/error/taiga-ui-core-components-error.d.ts +3 -0
  140. package/components/expand/taiga-ui-core-components-expand.d.ts +3 -0
  141. package/components/group/taiga-ui-core-components-group.d.ts +3 -0
  142. package/components/hints-host/taiga-ui-core-components-hints-host.d.ts +3 -0
  143. package/components/hosted-dropdown/hosted-dropdown.component.d.ts +1 -0
  144. package/components/hosted-dropdown/taiga-ui-core-components-hosted-dropdown.d.ts +3 -0
  145. package/components/label/taiga-ui-core-components-label.d.ts +3 -0
  146. package/components/link/taiga-ui-core-components-link.d.ts +3 -0
  147. package/components/loader/loader.options.d.ts +4 -0
  148. package/components/loader/taiga-ui-core-components-loader.d.ts +3 -0
  149. package/components/notification/notification.component.d.ts +3 -0
  150. package/components/notification/taiga-ui-core-components-notification.d.ts +3 -0
  151. package/components/primitive-calendar/primitive-calendar.component.d.ts +3 -0
  152. package/components/primitive-calendar/taiga-ui-core-components-primitive-calendar.d.ts +3 -0
  153. package/components/primitive-checkbox/checkbox.options.d.ts +4 -0
  154. package/components/primitive-checkbox/taiga-ui-core-components-primitive-checkbox.d.ts +3 -0
  155. package/components/primitive-spin-button/taiga-ui-core-components-primitive-spin-button.d.ts +3 -0
  156. package/components/primitive-textfield/primitive-textfield-options.d.ts +16 -0
  157. package/components/primitive-textfield/primitive-textfield.component.d.ts +7 -0
  158. package/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.d.ts +3 -0
  159. package/components/primitive-year-picker/taiga-ui-core-components-primitive-year-picker.d.ts +3 -0
  160. package/components/root/taiga-ui-core-components-root.d.ts +3 -0
  161. package/components/scroll-controls/scroll-controls.module.d.ts +1 -0
  162. package/components/scroll-controls/taiga-ui-core-components-scroll-controls.d.ts +3 -0
  163. package/components/scrollbar/scroll-ref.directive.d.ts +2 -0
  164. package/components/scrollbar/taiga-ui-core-components-scrollbar.d.ts +3 -0
  165. package/components/svg/svg-options.d.ts +3 -0
  166. package/components/svg/taiga-ui-core-components-svg.d.ts +3 -0
  167. package/components/taiga-ui-core-components.d.ts +3 -0
  168. package/components/theme-night/taiga-ui-core-components-theme-night.d.ts +3 -0
  169. package/components/tooltip/taiga-ui-core-components-tooltip.d.ts +3 -0
  170. package/constants/cache-basting-payload.d.ts +1 -1
  171. package/constants/decimal-symbols.d.ts +4 -0
  172. package/constants/events.d.ts +14 -0
  173. package/constants/mask-caret-trap.d.ts +4 -0
  174. package/constants/taiga-ui-core-constants.d.ts +3 -0
  175. package/directives/dropdown/dropdown-hover.options.d.ts +4 -0
  176. package/directives/dropdown/dropdown-options.directive.d.ts +4 -0
  177. package/directives/dropdown/dropdown-selection.directive.d.ts +9 -0
  178. package/directives/dropdown/dropdown.component.d.ts +5 -0
  179. package/directives/dropdown/dropdown.providers.d.ts +3 -0
  180. package/directives/dropdown/taiga-ui-core-directives-dropdown.d.ts +3 -0
  181. package/directives/hint/hint-options.directive.d.ts +4 -0
  182. package/directives/hint/hint.providers.d.ts +3 -0
  183. package/directives/hint/taiga-ui-core-directives-hint.d.ts +3 -0
  184. package/directives/index.d.ts +1 -0
  185. package/directives/mask-accessor/mask-accessor.module.d.ts +3 -0
  186. package/directives/mask-accessor/taiga-ui-core-directives-mask-accessor.d.ts +3 -0
  187. package/directives/mode/taiga-ui-core-directives-mode.d.ts +3 -0
  188. package/directives/number-format/index.d.ts +2 -0
  189. package/directives/number-format/number-format.directive.d.ts +10 -0
  190. package/directives/number-format/number-format.module.d.ts +7 -0
  191. package/directives/number-format/package.json +10 -0
  192. package/directives/number-format/taiga-ui-core-directives-number-format.d.ts +5 -0
  193. package/directives/scroll-into-view/scroll-into-view.directive.d.ts +3 -0
  194. package/directives/scroll-into-view/taiga-ui-core-directives-scroll-into-view.d.ts +3 -0
  195. package/directives/taiga-ui-core-directives.d.ts +3 -0
  196. package/directives/textfield-controller/taiga-ui-core-directives-textfield-controller.d.ts +3 -0
  197. package/directives/textfield-controller/textfield.options.d.ts +7 -0
  198. package/directives/wrapper/taiga-ui-core-directives-wrapper.d.ts +3 -0
  199. package/enums/dropdown-animation.d.ts +1 -0
  200. package/enums/interactive-state.d.ts +3 -0
  201. package/enums/notification.d.ts +3 -0
  202. package/enums/range-state.d.ts +3 -0
  203. package/enums/taiga-ui-core-enums.d.ts +3 -0
  204. package/esm2015/abstract/driver.js +2 -1
  205. package/esm2015/abstract/position-accessor.js +2 -1
  206. package/esm2015/abstract/rect-accessor.js +3 -1
  207. package/esm2015/abstract/taiga-ui-core-abstract.js +4 -1
  208. package/esm2015/abstract/vehicle.js +2 -1
  209. package/esm2015/animations/taiga-ui-core-animations.js +4 -1
  210. package/esm2015/components/alert/alert.component.js +13 -2
  211. package/esm2015/components/alert/taiga-ui-core-components-alert.js +4 -1
  212. package/esm2015/components/button/button.options.js +4 -1
  213. package/esm2015/components/button/taiga-ui-core-components-button.js +4 -1
  214. package/esm2015/components/calendar/taiga-ui-core-components-calendar.js +4 -1
  215. package/esm2015/components/data-list/data-list.component.js +3 -1
  216. package/esm2015/components/data-list/option/option.component.js +5 -1
  217. package/esm2015/components/data-list/taiga-ui-core-components-data-list.js +4 -1
  218. package/esm2015/components/dialog/dialog.component.js +3 -1
  219. package/esm2015/components/dialog/dialog.tokens.js +7 -1
  220. package/esm2015/components/dialog/taiga-ui-core-components-dialog.js +4 -1
  221. package/esm2015/components/error/taiga-ui-core-components-error.js +4 -1
  222. package/esm2015/components/expand/expand.component.js +2 -1
  223. package/esm2015/components/expand/taiga-ui-core-components-expand.js +4 -1
  224. package/esm2015/components/group/taiga-ui-core-components-group.js +4 -1
  225. package/esm2015/components/hints-host/hints-host.component.js +5 -1
  226. package/esm2015/components/hints-host/taiga-ui-core-components-hints-host.js +4 -1
  227. package/esm2015/components/hosted-dropdown/hosted-dropdown.component.js +3 -1
  228. package/esm2015/components/hosted-dropdown/taiga-ui-core-components-hosted-dropdown.js +4 -1
  229. package/esm2015/components/label/taiga-ui-core-components-label.js +4 -1
  230. package/esm2015/components/link/link.component.js +2 -1
  231. package/esm2015/components/link/taiga-ui-core-components-link.js +4 -1
  232. package/esm2015/components/loader/loader.component.js +3 -2
  233. package/esm2015/components/loader/loader.options.js +5 -1
  234. package/esm2015/components/loader/taiga-ui-core-components-loader.js +4 -1
  235. package/esm2015/components/notification/notification.component.js +4 -1
  236. package/esm2015/components/notification/taiga-ui-core-components-notification.js +4 -1
  237. package/esm2015/components/primitive-calendar/primitive-calendar.component.js +4 -1
  238. package/esm2015/components/primitive-calendar/taiga-ui-core-components-primitive-calendar.js +4 -1
  239. package/esm2015/components/primitive-checkbox/checkbox.options.js +5 -1
  240. package/esm2015/components/primitive-checkbox/taiga-ui-core-components-primitive-checkbox.js +4 -1
  241. package/esm2015/components/primitive-spin-button/taiga-ui-core-components-primitive-spin-button.js +4 -1
  242. package/esm2015/components/primitive-textfield/primitive-textfield-options.js +13 -1
  243. package/esm2015/components/primitive-textfield/primitive-textfield.component.js +9 -1
  244. package/esm2015/components/primitive-textfield/primitive-textfield.directive.js +6 -1
  245. package/esm2015/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.js +4 -1
  246. package/esm2015/components/primitive-textfield/value-decoration/value-decoration.component.js +3 -1
  247. package/esm2015/components/primitive-year-picker/taiga-ui-core-components-primitive-year-picker.js +4 -1
  248. package/esm2015/components/root/root.component.js +4 -2
  249. package/esm2015/components/root/taiga-ui-core-components-root.js +4 -1
  250. package/esm2015/components/scroll-controls/scroll-controls.module.js +2 -1
  251. package/esm2015/components/scroll-controls/taiga-ui-core-components-scroll-controls.js +4 -1
  252. package/esm2015/components/scrollbar/scroll-ref.directive.js +3 -1
  253. package/esm2015/components/scrollbar/scrollbar.component.js +3 -1
  254. package/esm2015/components/scrollbar/taiga-ui-core-components-scrollbar.js +4 -1
  255. package/esm2015/components/svg/svg-options.js +4 -1
  256. package/esm2015/components/svg/svg.component.js +3 -1
  257. package/esm2015/components/svg/taiga-ui-core-components-svg.js +4 -1
  258. package/esm2015/components/taiga-ui-core-components.js +4 -1
  259. package/esm2015/components/theme-night/taiga-ui-core-components-theme-night.js +4 -1
  260. package/esm2015/components/tooltip/taiga-ui-core-components-tooltip.js +4 -1
  261. package/esm2015/constants/decimal-symbols.js +5 -1
  262. package/esm2015/constants/default-number-format.js +2 -1
  263. package/esm2015/constants/events.js +15 -1
  264. package/esm2015/constants/mask-caret-trap.js +5 -1
  265. package/esm2015/constants/taiga-ui-core-constants.js +4 -1
  266. package/esm2015/directives/dropdown/dropdown-driver.directive.js +2 -1
  267. package/esm2015/directives/dropdown/dropdown-hover.options.js +5 -1
  268. package/esm2015/directives/dropdown/dropdown-options.directive.js +5 -1
  269. package/esm2015/directives/dropdown/dropdown-position-sided.directive.js +2 -2
  270. package/esm2015/directives/dropdown/dropdown-selection.directive.js +10 -1
  271. package/esm2015/directives/dropdown/dropdown.component.js +8 -1
  272. package/esm2015/directives/dropdown/dropdown.directive.js +2 -1
  273. package/esm2015/directives/dropdown/dropdown.providers.js +4 -1
  274. package/esm2015/directives/dropdown/taiga-ui-core-directives-dropdown.js +4 -1
  275. package/esm2015/directives/hint/hint-driver.directive.js +2 -1
  276. package/esm2015/directives/hint/hint-hover.directive.js +2 -1
  277. package/esm2015/directives/hint/hint-options.directive.js +5 -1
  278. package/esm2015/directives/hint/hint-position.directive.js +2 -1
  279. package/esm2015/directives/hint/hint.directive.js +2 -1
  280. package/esm2015/directives/hint/hint.providers.js +5 -1
  281. package/esm2015/directives/hint/taiga-ui-core-directives-hint.js +4 -1
  282. package/esm2015/directives/index.js +2 -1
  283. package/esm2015/directives/mask-accessor/mask-accessor.module.js +4 -1
  284. package/esm2015/directives/mask-accessor/taiga-ui-core-directives-mask-accessor.js +4 -1
  285. package/esm2015/directives/mode/taiga-ui-core-directives-mode.js +4 -1
  286. package/esm2015/directives/number-format/index.js +3 -0
  287. package/esm2015/directives/number-format/number-format.directive.js +38 -0
  288. package/esm2015/directives/number-format/number-format.module.js +16 -0
  289. package/esm2015/directives/number-format/taiga-ui-core-directives-number-format.js +5 -0
  290. package/esm2015/directives/scroll-into-view/scroll-into-view.directive.js +6 -1
  291. package/esm2015/directives/scroll-into-view/taiga-ui-core-directives-scroll-into-view.js +4 -1
  292. package/esm2015/directives/taiga-ui-core-directives.js +4 -1
  293. package/esm2015/directives/textfield-controller/taiga-ui-core-directives-textfield-controller.js +4 -1
  294. package/esm2015/directives/textfield-controller/textfield-appearance.directive.js +4 -1
  295. package/esm2015/directives/textfield-controller/textfield.options.js +5 -1
  296. package/esm2015/directives/wrapper/taiga-ui-core-directives-wrapper.js +4 -1
  297. package/esm2015/enums/appearance.js +3 -1
  298. package/esm2015/enums/dropdown-animation.js +3 -1
  299. package/esm2015/enums/interactive-state.js +6 -1
  300. package/esm2015/enums/notification.js +5 -1
  301. package/esm2015/enums/range-state.js +6 -1
  302. package/esm2015/enums/taiga-ui-core-enums.js +4 -1
  303. package/esm2015/interfaces/number-format-settings.js +1 -1
  304. package/esm2015/interfaces/taiga-ui-core-interfaces.js +4 -1
  305. package/esm2015/internal/primitive-year-month-pagination/taiga-ui-core-internal-primitive-year-month-pagination.js +4 -1
  306. package/esm2015/internal/svg-defs-host/svg-defs-host.component.js +2 -1
  307. package/esm2015/internal/svg-defs-host/taiga-ui-core-internal-svg-defs-host.js +4 -1
  308. package/esm2015/internal/taiga-ui-core-internal.js +4 -1
  309. package/esm2015/mask/taiga-ui-core-mask.js +4 -1
  310. package/esm2015/observables/taiga-ui-core-observables.js +4 -1
  311. package/esm2015/observables/zoneful-map.js +8 -1
  312. package/esm2015/pipes/calendar-sheet/taiga-ui-core-pipes-calendar-sheet.js +4 -1
  313. package/esm2015/pipes/calendar-sheet/utils.js +8 -1
  314. package/esm2015/pipes/flag/taiga-ui-core-pipes-flag.js +4 -1
  315. package/esm2015/pipes/format-date/taiga-ui-core-pipes-format-date.js +4 -1
  316. package/esm2015/pipes/format-number/format-number.pipe.js +7 -1
  317. package/esm2015/pipes/format-number/taiga-ui-core-pipes-format-number.js +4 -1
  318. package/esm2015/pipes/format-phone/format-phone.pipe.js +8 -1
  319. package/esm2015/pipes/format-phone/taiga-ui-core-pipes-format-phone.js +4 -1
  320. package/esm2015/pipes/month/taiga-ui-core-pipes-month.js +4 -1
  321. package/esm2015/pipes/order-week-days/taiga-ui-core-pipes-order-week-days.js +4 -1
  322. package/esm2015/pipes/taiga-ui-core-pipes.js +4 -1
  323. package/esm2015/providers/is-mobile-resolution.provider.js +4 -1
  324. package/esm2015/providers/taiga-ui-core-providers.js +4 -1
  325. package/esm2015/services/breakpoint.service.js +4 -1
  326. package/esm2015/services/hint.service.js +4 -1
  327. package/esm2015/services/position.service.js +4 -2
  328. package/esm2015/services/router-link-active.service.js +4 -2
  329. package/esm2015/services/svg.service.js +4 -1
  330. package/esm2015/services/taiga-ui-core-services.js +4 -1
  331. package/esm2015/services/visual-viewport.service.js +2 -1
  332. package/esm2015/taiga-ui-core.js +4 -1
  333. package/esm2015/tokens/animation-options.js +4 -1
  334. package/esm2015/tokens/animations-duration.js +4 -1
  335. package/esm2015/tokens/assert-enabled.js +8 -1
  336. package/esm2015/tokens/data-list-accessor.js +4 -1
  337. package/esm2015/tokens/data-list-host.js +4 -1
  338. package/esm2015/tokens/day-type-handler.js +4 -1
  339. package/esm2015/tokens/element-ref.js +4 -1
  340. package/esm2015/tokens/first-day-of-week.js +4 -1
  341. package/esm2015/tokens/i18n.js +19 -1
  342. package/esm2015/tokens/icon-place.js +5 -1
  343. package/esm2015/tokens/icons-path.js +5 -1
  344. package/esm2015/tokens/icons.js +4 -1
  345. package/esm2015/tokens/index.js +2 -1
  346. package/esm2015/tokens/is-mobile-resolution.js +6 -1
  347. package/esm2015/tokens/legacy-mask.js +6 -1
  348. package/esm2015/tokens/media.js +4 -1
  349. package/esm2015/tokens/mode.js +4 -1
  350. package/esm2015/tokens/notification-options.js +6 -1
  351. package/esm2015/tokens/number-format-observable.js +8 -0
  352. package/esm2015/tokens/number-format.js +4 -1
  353. package/esm2015/tokens/option-content.js +4 -1
  354. package/esm2015/tokens/ordered-short-week-days.js +8 -1
  355. package/esm2015/tokens/sanitizer.js +4 -1
  356. package/esm2015/tokens/scroll-ref.js +4 -1
  357. package/esm2015/tokens/selection-stream.js +4 -1
  358. package/esm2015/tokens/svg-content-processor.js +5 -1
  359. package/esm2015/tokens/svg-src-processor.js +5 -1
  360. package/esm2015/tokens/taiga-ui-core-tokens.js +4 -1
  361. package/esm2015/tokens/textfield-appearance.js +6 -1
  362. package/esm2015/tokens/textfield-host.js +4 -1
  363. package/esm2015/tokens/value-accessor.js +4 -1
  364. package/esm2015/tokens/viewport.js +4 -1
  365. package/esm2015/types/size.js +12 -1
  366. package/esm2015/types/taiga-ui-core-types.js +4 -1
  367. package/esm2015/utils/dom/get-safe-area-size.js +6 -1
  368. package/esm2015/utils/dom/get-viewport-height.js +18 -1
  369. package/esm2015/utils/dom/get-viewport-width.js +18 -1
  370. package/esm2015/utils/dom/get-word-range.js +8 -1
  371. package/esm2015/utils/dom/taiga-ui-core-utils-dom.js +4 -1
  372. package/esm2015/utils/format/capitalize.js +8 -1
  373. package/esm2015/utils/format/format-number.js +9 -1
  374. package/esm2015/utils/format/format-phone.js +20 -1
  375. package/esm2015/utils/format/get-fractional-part-padded.js +8 -1
  376. package/esm2015/utils/format/number-to-string-without-exp.js +7 -1
  377. package/esm2015/utils/format/taiga-ui-core-utils-format.js +4 -1
  378. package/esm2015/utils/mask/create-auto-corrected-money-pipe.js +9 -1
  379. package/esm2015/utils/mask/create-correction-mask.js +5 -1
  380. package/esm2015/utils/mask/create-number-mask.js +10 -2
  381. package/esm2015/utils/mask/enable-auto-correct-decimal-symbol.js +5 -1
  382. package/esm2015/utils/mask/masked-money-value-is-empty.js +8 -1
  383. package/esm2015/utils/mask/masked-number-string-to-number.js +5 -1
  384. package/esm2015/utils/mask/taiga-ui-core-utils-mask.js +4 -1
  385. package/esm2015/utils/miscellaneous/is-editing-key.js +4 -1
  386. package/esm2015/utils/miscellaneous/is-obscured.js +4 -1
  387. package/esm2015/utils/miscellaneous/override-options.js +2 -1
  388. package/esm2015/utils/miscellaneous/size-bigger.js +7 -1
  389. package/esm2015/utils/miscellaneous/taiga-ui-core-utils-miscellaneous.js +4 -1
  390. package/esm2015/utils/mobile/taiga-ui-core-utils-mobile.js +4 -1
  391. package/esm2015/utils/taiga-ui-core-utils.js +4 -1
  392. package/fesm2015/taiga-ui-core-abstract.js +9 -0
  393. package/fesm2015/taiga-ui-core-abstract.js.map +1 -1
  394. package/fesm2015/taiga-ui-core-animations.js +4 -0
  395. package/fesm2015/taiga-ui-core-animations.js.map +1 -1
  396. package/fesm2015/taiga-ui-core-components-alert.js +16 -1
  397. package/fesm2015/taiga-ui-core-components-alert.js.map +1 -1
  398. package/fesm2015/taiga-ui-core-components-button.js +7 -0
  399. package/fesm2015/taiga-ui-core-components-button.js.map +1 -1
  400. package/fesm2015/taiga-ui-core-components-calendar.js +4 -0
  401. package/fesm2015/taiga-ui-core-components-calendar.js.map +1 -1
  402. package/fesm2015/taiga-ui-core-components-data-list.js +10 -0
  403. package/fesm2015/taiga-ui-core-components-data-list.js.map +1 -1
  404. package/fesm2015/taiga-ui-core-components-dialog.js +12 -0
  405. package/fesm2015/taiga-ui-core-components-dialog.js.map +1 -1
  406. package/fesm2015/taiga-ui-core-components-error.js +4 -0
  407. package/fesm2015/taiga-ui-core-components-error.js.map +1 -1
  408. package/fesm2015/taiga-ui-core-components-expand.js +5 -0
  409. package/fesm2015/taiga-ui-core-components-expand.js.map +1 -1
  410. package/fesm2015/taiga-ui-core-components-group.js +4 -0
  411. package/fesm2015/taiga-ui-core-components-group.js.map +1 -1
  412. package/fesm2015/taiga-ui-core-components-hints-host.js +8 -0
  413. package/fesm2015/taiga-ui-core-components-hints-host.js.map +1 -1
  414. package/fesm2015/taiga-ui-core-components-hosted-dropdown.js +6 -0
  415. package/fesm2015/taiga-ui-core-components-hosted-dropdown.js.map +1 -1
  416. package/fesm2015/taiga-ui-core-components-label.js +4 -0
  417. package/fesm2015/taiga-ui-core-components-label.js.map +1 -1
  418. package/fesm2015/taiga-ui-core-components-link.js +5 -0
  419. package/fesm2015/taiga-ui-core-components-link.js.map +1 -1
  420. package/fesm2015/taiga-ui-core-components-loader.js +10 -1
  421. package/fesm2015/taiga-ui-core-components-loader.js.map +1 -1
  422. package/fesm2015/taiga-ui-core-components-notification.js +7 -0
  423. package/fesm2015/taiga-ui-core-components-notification.js.map +1 -1
  424. package/fesm2015/taiga-ui-core-components-primitive-calendar.js +7 -0
  425. package/fesm2015/taiga-ui-core-components-primitive-calendar.js.map +1 -1
  426. package/fesm2015/taiga-ui-core-components-primitive-checkbox.js +8 -0
  427. package/fesm2015/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
  428. package/fesm2015/taiga-ui-core-components-primitive-spin-button.js +4 -0
  429. package/fesm2015/taiga-ui-core-components-primitive-spin-button.js.map +1 -1
  430. package/fesm2015/taiga-ui-core-components-primitive-textfield.js +31 -0
  431. package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
  432. package/fesm2015/taiga-ui-core-components-primitive-year-picker.js +4 -0
  433. package/fesm2015/taiga-ui-core-components-primitive-year-picker.js.map +1 -1
  434. package/fesm2015/taiga-ui-core-components-root.js +7 -1
  435. package/fesm2015/taiga-ui-core-components-root.js.map +1 -1
  436. package/fesm2015/taiga-ui-core-components-scroll-controls.js +5 -0
  437. package/fesm2015/taiga-ui-core-components-scroll-controls.js.map +1 -1
  438. package/fesm2015/taiga-ui-core-components-scrollbar.js +8 -0
  439. package/fesm2015/taiga-ui-core-components-scrollbar.js.map +1 -1
  440. package/fesm2015/taiga-ui-core-components-svg.js +9 -0
  441. package/fesm2015/taiga-ui-core-components-svg.js.map +1 -1
  442. package/fesm2015/taiga-ui-core-components-theme-night.js +4 -0
  443. package/fesm2015/taiga-ui-core-components-theme-night.js.map +1 -1
  444. package/fesm2015/taiga-ui-core-components-tooltip.js +4 -0
  445. package/fesm2015/taiga-ui-core-components-tooltip.js.map +1 -1
  446. package/fesm2015/taiga-ui-core-components.js +4 -0
  447. package/fesm2015/taiga-ui-core-components.js.map +1 -1
  448. package/fesm2015/taiga-ui-core-constants.js +27 -0
  449. package/fesm2015/taiga-ui-core-constants.js.map +1 -1
  450. package/fesm2015/taiga-ui-core-directives-dropdown.js +34 -1
  451. package/fesm2015/taiga-ui-core-directives-dropdown.js.map +1 -1
  452. package/fesm2015/taiga-ui-core-directives-hint.js +14 -0
  453. package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
  454. package/fesm2015/taiga-ui-core-directives-mask-accessor.js +7 -0
  455. package/fesm2015/taiga-ui-core-directives-mask-accessor.js.map +1 -1
  456. package/fesm2015/taiga-ui-core-directives-mode.js +4 -0
  457. package/fesm2015/taiga-ui-core-directives-mode.js.map +1 -1
  458. package/fesm2015/taiga-ui-core-directives-number-format.js +58 -0
  459. package/fesm2015/taiga-ui-core-directives-number-format.js.map +1 -0
  460. package/fesm2015/taiga-ui-core-directives-scroll-into-view.js +9 -0
  461. package/fesm2015/taiga-ui-core-directives-scroll-into-view.js.map +1 -1
  462. package/fesm2015/taiga-ui-core-directives-textfield-controller.js +11 -0
  463. package/fesm2015/taiga-ui-core-directives-textfield-controller.js.map +1 -1
  464. package/fesm2015/taiga-ui-core-directives-wrapper.js +4 -0
  465. package/fesm2015/taiga-ui-core-directives-wrapper.js.map +1 -1
  466. package/fesm2015/taiga-ui-core-directives.js +5 -0
  467. package/fesm2015/taiga-ui-core-directives.js.map +1 -1
  468. package/fesm2015/taiga-ui-core-enums.js +22 -0
  469. package/fesm2015/taiga-ui-core-enums.js.map +1 -1
  470. package/fesm2015/taiga-ui-core-interfaces.js +3 -1
  471. package/fesm2015/taiga-ui-core-interfaces.js.map +1 -1
  472. package/fesm2015/taiga-ui-core-internal-primitive-year-month-pagination.js +4 -0
  473. package/fesm2015/taiga-ui-core-internal-primitive-year-month-pagination.js.map +1 -1
  474. package/fesm2015/taiga-ui-core-internal-svg-defs-host.js +5 -0
  475. package/fesm2015/taiga-ui-core-internal-svg-defs-host.js.map +1 -1
  476. package/fesm2015/taiga-ui-core-internal.js +4 -0
  477. package/fesm2015/taiga-ui-core-internal.js.map +1 -1
  478. package/fesm2015/taiga-ui-core-mask.js +3 -1
  479. package/fesm2015/taiga-ui-core-mask.js.map +1 -1
  480. package/fesm2015/taiga-ui-core-observables.js +11 -0
  481. package/fesm2015/taiga-ui-core-observables.js.map +1 -1
  482. package/fesm2015/taiga-ui-core-pipes-calendar-sheet.js +11 -0
  483. package/fesm2015/taiga-ui-core-pipes-calendar-sheet.js.map +1 -1
  484. package/fesm2015/taiga-ui-core-pipes-flag.js +4 -0
  485. package/fesm2015/taiga-ui-core-pipes-flag.js.map +1 -1
  486. package/fesm2015/taiga-ui-core-pipes-format-date.js +4 -0
  487. package/fesm2015/taiga-ui-core-pipes-format-date.js.map +1 -1
  488. package/fesm2015/taiga-ui-core-pipes-format-number.js +10 -0
  489. package/fesm2015/taiga-ui-core-pipes-format-number.js.map +1 -1
  490. package/fesm2015/taiga-ui-core-pipes-format-phone.js +11 -0
  491. package/fesm2015/taiga-ui-core-pipes-format-phone.js.map +1 -1
  492. package/fesm2015/taiga-ui-core-pipes-month.js +4 -0
  493. package/fesm2015/taiga-ui-core-pipes-month.js.map +1 -1
  494. package/fesm2015/taiga-ui-core-pipes-order-week-days.js +4 -0
  495. package/fesm2015/taiga-ui-core-pipes-order-week-days.js.map +1 -1
  496. package/fesm2015/taiga-ui-core-pipes.js +4 -0
  497. package/fesm2015/taiga-ui-core-pipes.js.map +1 -1
  498. package/fesm2015/taiga-ui-core-providers.js +7 -0
  499. package/fesm2015/taiga-ui-core-providers.js.map +1 -1
  500. package/fesm2015/taiga-ui-core-services.js +20 -2
  501. package/fesm2015/taiga-ui-core-services.js.map +1 -1
  502. package/fesm2015/taiga-ui-core-tokens.js +133 -2
  503. package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
  504. package/fesm2015/taiga-ui-core-types.js +14 -0
  505. package/fesm2015/taiga-ui-core-types.js.map +1 -1
  506. package/fesm2015/taiga-ui-core-utils-dom.js +50 -0
  507. package/fesm2015/taiga-ui-core-utils-dom.js.map +1 -1
  508. package/fesm2015/taiga-ui-core-utils-format.js +51 -0
  509. package/fesm2015/taiga-ui-core-utils-format.js.map +1 -1
  510. package/fesm2015/taiga-ui-core-utils-mask.js +40 -1
  511. package/fesm2015/taiga-ui-core-utils-mask.js.map +1 -1
  512. package/fesm2015/taiga-ui-core-utils-miscellaneous.js +17 -0
  513. package/fesm2015/taiga-ui-core-utils-miscellaneous.js.map +1 -1
  514. package/fesm2015/taiga-ui-core-utils-mobile.js +4 -0
  515. package/fesm2015/taiga-ui-core-utils-mobile.js.map +1 -1
  516. package/fesm2015/taiga-ui-core-utils.js +4 -0
  517. package/fesm2015/taiga-ui-core-utils.js.map +1 -1
  518. package/fesm2015/taiga-ui-core.js +4 -0
  519. package/fesm2015/taiga-ui-core.js.map +1 -1
  520. package/interfaces/alert-options.d.ts +2 -0
  521. package/interfaces/dialog-options.d.ts +11 -0
  522. package/interfaces/number-format-settings.d.ts +26 -1
  523. package/interfaces/taiga-ui-core-interfaces.d.ts +3 -0
  524. package/internal/primitive-year-month-pagination/taiga-ui-core-internal-primitive-year-month-pagination.d.ts +3 -0
  525. package/internal/svg-defs-host/taiga-ui-core-internal-svg-defs-host.d.ts +3 -0
  526. package/internal/taiga-ui-core-internal.d.ts +3 -0
  527. package/mask/taiga-ui-core-mask.d.ts +3 -0
  528. package/mask/text-mask-config.d.ts +5 -0
  529. package/mask/text-mask-correction-handler.d.ts +3 -0
  530. package/mask/text-mask-list-handler.d.ts +3 -0
  531. package/mask/text-mask-list.d.ts +4 -0
  532. package/mask/text-mask-options.d.ts +22 -0
  533. package/mask/text-mask-pipe-handler.d.ts +4 -0
  534. package/mask/text-mask-pipe-result.d.ts +4 -0
  535. package/observables/taiga-ui-core-observables.d.ts +3 -0
  536. package/observables/zoneful-map.d.ts +7 -0
  537. package/package.json +4 -4
  538. package/pipes/calendar-sheet/taiga-ui-core-pipes-calendar-sheet.d.ts +3 -0
  539. package/pipes/calendar-sheet/utils.d.ts +13 -0
  540. package/pipes/flag/taiga-ui-core-pipes-flag.d.ts +3 -0
  541. package/pipes/format-date/taiga-ui-core-pipes-format-date.d.ts +3 -0
  542. package/pipes/format-number/format-number.pipe.d.ts +6 -0
  543. package/pipes/format-number/taiga-ui-core-pipes-format-number.d.ts +3 -0
  544. package/pipes/format-phone/format-phone.pipe.d.ts +7 -0
  545. package/pipes/format-phone/taiga-ui-core-pipes-format-phone.d.ts +3 -0
  546. package/pipes/month/taiga-ui-core-pipes-month.d.ts +3 -0
  547. package/pipes/order-week-days/taiga-ui-core-pipes-order-week-days.d.ts +3 -0
  548. package/pipes/taiga-ui-core-pipes.d.ts +3 -0
  549. package/providers/is-mobile-resolution.provider.d.ts +3 -0
  550. package/providers/taiga-ui-core-providers.d.ts +3 -0
  551. package/services/breakpoint.service.d.ts +3 -0
  552. package/services/hint.service.d.ts +3 -0
  553. package/services/svg.service.d.ts +3 -0
  554. package/services/taiga-ui-core-services.d.ts +3 -0
  555. package/styles/theme/variables.less +1 -0
  556. package/taiga-ui-core.d.ts +3 -0
  557. package/tokens/animation-options.d.ts +3 -0
  558. package/tokens/animations-duration.d.ts +3 -0
  559. package/tokens/assert-enabled.d.ts +7 -0
  560. package/tokens/data-list-accessor.d.ts +3 -0
  561. package/tokens/data-list-host.d.ts +3 -0
  562. package/tokens/day-type-handler.d.ts +3 -0
  563. package/tokens/element-ref.d.ts +3 -0
  564. package/tokens/first-day-of-week.d.ts +3 -0
  565. package/tokens/i18n.d.ts +18 -0
  566. package/tokens/icon-place.d.ts +4 -0
  567. package/tokens/icons-path.d.ts +4 -0
  568. package/tokens/icons.d.ts +3 -0
  569. package/tokens/index.d.ts +1 -0
  570. package/tokens/is-mobile-resolution.d.ts +5 -0
  571. package/tokens/legacy-mask.d.ts +5 -0
  572. package/tokens/media.d.ts +3 -0
  573. package/tokens/mode.d.ts +3 -0
  574. package/tokens/notification-options.d.ts +5 -0
  575. package/tokens/number-format-observable.d.ts +11 -0
  576. package/tokens/number-format.d.ts +3 -0
  577. package/tokens/option-content.d.ts +3 -0
  578. package/tokens/ordered-short-week-days.d.ts +7 -0
  579. package/tokens/sanitizer.d.ts +3 -0
  580. package/tokens/scroll-ref.d.ts +3 -0
  581. package/tokens/selection-stream.d.ts +3 -0
  582. package/tokens/svg-content-processor.d.ts +4 -0
  583. package/tokens/svg-src-processor.d.ts +4 -0
  584. package/tokens/taiga-ui-core-tokens.d.ts +3 -0
  585. package/tokens/textfield-appearance.d.ts +5 -0
  586. package/tokens/textfield-host.d.ts +3 -0
  587. package/tokens/value-accessor.d.ts +3 -0
  588. package/tokens/viewport.d.ts +3 -0
  589. package/types/size.d.ts +11 -0
  590. package/types/taiga-ui-core-types.d.ts +3 -0
  591. package/utils/dom/get-safe-area-size.d.ts +5 -0
  592. package/utils/dom/get-viewport-height.d.ts +17 -0
  593. package/utils/dom/get-viewport-width.d.ts +17 -0
  594. package/utils/dom/get-word-range.d.ts +6 -0
  595. package/utils/dom/taiga-ui-core-utils-dom.d.ts +3 -0
  596. package/utils/format/capitalize.d.ts +7 -0
  597. package/utils/format/format-number.d.ts +8 -0
  598. package/utils/format/format-phone.d.ts +19 -0
  599. package/utils/format/get-fractional-part-padded.d.ts +7 -0
  600. package/utils/format/number-to-string-without-exp.d.ts +6 -0
  601. package/utils/format/taiga-ui-core-utils-format.d.ts +3 -0
  602. package/utils/mask/create-auto-corrected-money-pipe.d.ts +5 -0
  603. package/utils/mask/create-correction-mask.d.ts +4 -0
  604. package/utils/mask/create-number-mask.d.ts +5 -0
  605. package/utils/mask/enable-auto-correct-decimal-symbol.d.ts +4 -0
  606. package/utils/mask/masked-money-value-is-empty.d.ts +7 -0
  607. package/utils/mask/masked-number-string-to-number.d.ts +4 -0
  608. package/utils/mask/taiga-ui-core-utils-mask.d.ts +3 -0
  609. package/utils/miscellaneous/is-editing-key.d.ts +3 -0
  610. package/utils/miscellaneous/is-obscured.d.ts +3 -0
  611. package/utils/miscellaneous/size-bigger.d.ts +6 -0
  612. package/utils/miscellaneous/taiga-ui-core-utils-miscellaneous.d.ts +3 -0
  613. package/utils/mobile/taiga-ui-core-utils-mobile.d.ts +3 -0
  614. package/utils/taiga-ui-core-utils.d.ts +3 -0
@@ -1,6 +1,13 @@
1
1
  import { tuiIsNumber, tuiRoundWith, CHAR_HYPHEN, CHAR_PLUS } from '@taiga-ui/cdk';
2
2
  import { TUI_DEFAULT_NUMBER_FORMAT } from '@taiga-ui/core/constants';
3
3
 
4
+ /**
5
+ * Capitalizes a given string, replacing it with a lowercase string and making
6
+ * the first letter of each word uppercase.
7
+ *
8
+ * @param value the input string
9
+ * @return the capitalized string
10
+ */
4
11
  function tuiCapitalize(value) {
5
12
  return value.toLowerCase().replace(/(?:^|\s)\S/g, char => char.toUpperCase());
6
13
  }
@@ -9,6 +16,12 @@ function tuiCapitalizeFirstLetter(value) {
9
16
  return `${value.charAt(0).toUpperCase()}${value.slice(1)}`;
10
17
  }
11
18
 
19
+ /**
20
+ * Convert number to string with replacing exponent part on decimals
21
+ *
22
+ * @param value the number
23
+ * @return string representation of a number
24
+ */
12
25
  function tuiNumberToStringWithoutExp(value) {
13
26
  const valueAsString = String(value);
14
27
  const [numberPart, expPart] = valueAsString.split(`e-`);
@@ -21,6 +34,13 @@ function tuiNumberToStringWithoutExp(value) {
21
34
  return valueWithoutExp;
22
35
  }
23
36
 
37
+ /**
38
+ * Return fractional part of number
39
+ *
40
+ * @param value the number
41
+ * @param precision number of digits of decimal part, null to keep untouched
42
+ * @return the fractional part of number
43
+ */
24
44
  function tuiGetFractionPartPadded(value, precision) {
25
45
  const [, fractionPartPadded = ``] = tuiNumberToStringWithoutExp(value).split(`.`);
26
46
  return tuiIsNumber(precision)
@@ -28,6 +48,14 @@ function tuiGetFractionPartPadded(value, precision) {
28
48
  : fractionPartPadded;
29
49
  }
30
50
 
51
+ /**
52
+ * Formats number adding a thousand separators and correct decimal separator
53
+ * padding decimal part with zeroes to given length
54
+ *
55
+ * @param value the input number
56
+ * @param settings See {@link TuiNumberFormatSettings}
57
+ * @return the formatted string
58
+ */
31
59
  function tuiFormatNumber(value, settings = {}) {
32
60
  const { decimalLimit, decimalSeparator, thousandSeparator, zeroPadding, rounding } = Object.assign(Object.assign({}, TUI_DEFAULT_NUMBER_FORMAT), settings);
33
61
  const rounded = Number.isFinite(decimalLimit)
@@ -57,6 +85,25 @@ function tuiFormatNumber(value, settings = {}) {
57
85
  return fractionPartPadded ? result + decimalSeparator + fractionPartPadded : result;
58
86
  }
59
87
 
88
+ /**
89
+ * TODO: delete in v4.0
90
+ * @deprecated Use {@link https://maskito.dev/core-concepts/transformer maskitoTransform} instead<br/>
91
+ * @example
92
+ * import {maskitoTransform} from '@maskito/core';
93
+ *
94
+ * const mask = {
95
+ * mask: ['+', '1', ' ', /\d/, /\d/, /\d/, ')', ' ', /\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/, /\d/],
96
+ * };
97
+ * maskitoTransform('12125552368', mask); // +1 (212) 555-2368
98
+ * ___
99
+ * Formats a string with the phone format +7XXXXXXXXXXXX or XXXXXXXXXXXX,
100
+ * adding parentheses and hyphens.
101
+ *
102
+ * @param value the input string
103
+ * @param countryCode a country code
104
+ * @param phoneMask a phone number mask
105
+ * @return the formatted phone string of the form +7 XXX XXX-XX-XX
106
+ */
60
107
  function tuiFormatPhone(value, countryCode, phoneMask) {
61
108
  if (!value) {
62
109
  return ``;
@@ -91,5 +138,9 @@ function tuiOtherDecimalSymbol(symbol) {
91
138
  return symbol === `.` ? `,` : `.`;
92
139
  }
93
140
 
141
+ /**
142
+ * Generated bundle index. Do not edit.
143
+ */
144
+
94
145
  export { tuiCapitalize, tuiCapitalizeFirstLetter, tuiFormatNumber, tuiFormatPhone, tuiGetFractionPartPadded, tuiNumberToStringWithoutExp, tuiOtherDecimalSymbol };
95
146
  //# sourceMappingURL=taiga-ui-core-utils-format.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-utils-format.js","sources":["../../../projects/core/utils/format/capitalize.ts","../../../projects/core/utils/format/capitalize-first-letter.ts","../../../projects/core/utils/format/number-to-string-without-exp.ts","../../../projects/core/utils/format/get-fractional-part-padded.ts","../../../projects/core/utils/format/format-number.ts","../../../projects/core/utils/format/format-phone.ts","../../../projects/core/utils/format/other-decimal-symbol.ts"],"sourcesContent":["/**\n * Capitalizes a given string, replacing it with a lowercase string and making\n * the first letter of each word uppercase.\n *\n * @param value the input string\n * @return the capitalized string\n */\nexport function tuiCapitalize(value: string): string {\n return value.toLowerCase().replace(/(?:^|\\s)\\S/g, char => char.toUpperCase());\n}\n","export function tuiCapitalizeFirstLetter(value: string): string {\n return `${value.charAt(0).toUpperCase()}${value.slice(1)}`;\n}\n","/**\n * Convert number to string with replacing exponent part on decimals\n *\n * @param value the number\n * @return string representation of a number\n */\nexport function tuiNumberToStringWithoutExp(value: number): string {\n const valueAsString = String(value);\n const [numberPart, expPart] = valueAsString.split(`e-`);\n\n let valueWithoutExp = valueAsString;\n\n if (expPart) {\n const [, fractionalPart] = numberPart.split(`.`);\n const decimalDigits = Number(expPart) + (fractionalPart?.length || 0);\n\n valueWithoutExp = value.toFixed(decimalDigits);\n }\n\n return valueWithoutExp;\n}\n","import {tuiIsNumber} from '@taiga-ui/cdk';\n\nimport {tuiNumberToStringWithoutExp} from './number-to-string-without-exp';\n\n/**\n * Return fractional part of number\n *\n * @param value the number\n * @param precision number of digits of decimal part, null to keep untouched\n * @return the fractional part of number\n */\nexport function tuiGetFractionPartPadded(\n value: number,\n precision?: number | null,\n): string {\n const [, fractionPartPadded = ``] = tuiNumberToStringWithoutExp(value).split(`.`);\n\n return tuiIsNumber(precision)\n ? fractionPartPadded.slice(0, Math.max(0, precision))\n : fractionPartPadded;\n}\n","import {CHAR_HYPHEN, tuiRoundWith} from '@taiga-ui/cdk';\nimport {TUI_DEFAULT_NUMBER_FORMAT} from '@taiga-ui/core/constants';\nimport {TuiNumberFormatSettings} from '@taiga-ui/core/interfaces';\n\nimport {tuiGetFractionPartPadded} from './get-fractional-part-padded';\n\n/**\n * Formats number adding a thousand separators and correct decimal separator\n * padding decimal part with zeroes to given length\n *\n * @param value the input number\n * @param settings See {@link TuiNumberFormatSettings}\n * @return the formatted string\n */\nexport function tuiFormatNumber(\n value: number,\n settings: Partial<TuiNumberFormatSettings> = {},\n): string {\n const {decimalLimit, decimalSeparator, thousandSeparator, zeroPadding, rounding} = {\n ...TUI_DEFAULT_NUMBER_FORMAT,\n ...settings,\n };\n\n const rounded = Number.isFinite(decimalLimit)\n ? tuiRoundWith({value, precision: decimalLimit, method: rounding})\n : value;\n const integerPartString = String(Math.floor(Math.abs(rounded)));\n\n let fractionPartPadded = tuiGetFractionPartPadded(rounded, decimalLimit);\n\n if (Number.isFinite(decimalLimit)) {\n if (zeroPadding) {\n const zeroPaddingSize: number = Math.max(\n decimalLimit - fractionPartPadded.length,\n 0,\n );\n const zeroPartString = `0`.repeat(zeroPaddingSize);\n\n fractionPartPadded = `${fractionPartPadded}${zeroPartString}`;\n } else {\n fractionPartPadded = fractionPartPadded.replace(/0*$/, ``);\n }\n }\n\n const remainder = integerPartString.length % 3;\n const sign = value < 0 ? CHAR_HYPHEN : ``;\n let result = sign + integerPartString.charAt(0);\n\n for (let i = 1; i < integerPartString.length; i++) {\n if (i % 3 === remainder && integerPartString.length > 3) {\n result += thousandSeparator;\n }\n\n result += integerPartString.charAt(i);\n }\n\n return fractionPartPadded ? result + decimalSeparator + fractionPartPadded : result;\n}\n","import {CHAR_PLUS} from '@taiga-ui/cdk';\n\n/**\n * TODO: delete in v4.0\n * @deprecated Use {@link https://maskito.dev/core-concepts/transformer maskitoTransform} instead<br/>\n * @example\n * import {maskitoTransform} from '@maskito/core';\n *\n * const mask = {\n * mask: ['+', '1', ' ', /\\d/, /\\d/, /\\d/, ')', ' ', /\\d/, /\\d/, /\\d/, '-', /\\d/, /\\d/, /\\d/, /\\d/],\n * };\n * maskitoTransform('12125552368', mask); // +1 (212) 555-2368\n * ___\n * Formats a string with the phone format +7XXXXXXXXXXXX or XXXXXXXXXXXX,\n * adding parentheses and hyphens.\n *\n * @param value the input string\n * @param countryCode a country code\n * @param phoneMask a phone number mask\n * @return the formatted phone string of the form +7 XXX XXX-XX-XX\n */\nexport function tuiFormatPhone(\n value: string,\n countryCode: string,\n phoneMask: string,\n): string {\n if (!value) {\n return ``;\n }\n\n let result = countryCode;\n\n countryCode = countryCode.replace(/[()]/g, ``);\n\n if (!value.startsWith(countryCode)) {\n value = countryCode + value.replace(CHAR_PLUS, ``);\n }\n\n const splitPhoneMask = phoneMask.split(``);\n const splitValue = value.slice(countryCode.length).split(``);\n\n result += ` `;\n\n if (splitValue.length === 0) {\n return result;\n }\n\n for (const mask of splitPhoneMask) {\n if (splitValue.length === 0) {\n break;\n }\n\n if (mask === `#`) {\n result += splitValue[0] || ``;\n splitValue.splice(0, 1);\n } else {\n result += mask;\n }\n }\n\n return result;\n}\n","import {TuiDecimalSymbol} from '@taiga-ui/core/types';\n\nexport function tuiOtherDecimalSymbol(symbol: TuiDecimalSymbol): TuiDecimalSymbol {\n return symbol === `.` ? `,` : `.`;\n}\n"],"names":[],"mappings":";;;AAOM,SAAU,aAAa,CAAC,KAAa,EAAA;AACvC,IAAA,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,aAAa,EAAE,IAAI,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;AAClF;;ACTM,SAAU,wBAAwB,CAAC,KAAa,EAAA;AAClD,IAAA,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA,EAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AAC/D;;ACIM,SAAU,2BAA2B,CAAC,KAAa,EAAA;AACrD,IAAA,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AACpC,IAAA,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,CAAI,EAAA,CAAA,CAAC,CAAC;IAExD,IAAI,eAAe,GAAG,aAAa,CAAC;AAEpC,IAAA,IAAI,OAAO,EAAE;QACT,MAAM,GAAG,cAAc,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,CAAG,CAAA,CAAA,CAAC,CAAC;AACjD,QAAA,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CA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format/capitalize-first-letter.ts","../../../projects/core/utils/format/number-to-string-without-exp.ts","../../../projects/core/utils/format/get-fractional-part-padded.ts","../../../projects/core/utils/format/format-number.ts","../../../projects/core/utils/format/format-phone.ts","../../../projects/core/utils/format/other-decimal-symbol.ts","../../../projects/core/utils/format/taiga-ui-core-utils-format.ts"],"sourcesContent":["/**\n * Capitalizes a given string, replacing it with a lowercase string and making\n * the first letter of each word uppercase.\n *\n * @param value the input string\n * @return the capitalized string\n */\nexport function tuiCapitalize(value: string): string {\n return value.toLowerCase().replace(/(?:^|\\s)\\S/g, char => char.toUpperCase());\n}\n","export function tuiCapitalizeFirstLetter(value: string): string {\n return `${value.charAt(0).toUpperCase()}${value.slice(1)}`;\n}\n","/**\n * Convert number to string with replacing exponent part on decimals\n *\n * @param value the number\n * @return string representation of a number\n */\nexport function tuiNumberToStringWithoutExp(value: number): string {\n const valueAsString = String(value);\n const [numberPart, expPart] = valueAsString.split(`e-`);\n\n let valueWithoutExp = valueAsString;\n\n if (expPart) {\n const [, fractionalPart] = numberPart.split(`.`);\n const decimalDigits = Number(expPart) + (fractionalPart?.length || 0);\n\n valueWithoutExp = value.toFixed(decimalDigits);\n }\n\n return valueWithoutExp;\n}\n","import {tuiIsNumber} from '@taiga-ui/cdk';\n\nimport {tuiNumberToStringWithoutExp} from './number-to-string-without-exp';\n\n/**\n * Return fractional part of number\n *\n * @param value the number\n * @param precision number of digits of decimal part, null to keep untouched\n * @return the fractional part of number\n */\nexport function tuiGetFractionPartPadded(\n value: number,\n precision?: number | null,\n): string {\n const [, fractionPartPadded = ``] = tuiNumberToStringWithoutExp(value).split(`.`);\n\n return tuiIsNumber(precision)\n ? fractionPartPadded.slice(0, Math.max(0, precision))\n : fractionPartPadded;\n}\n","import {CHAR_HYPHEN, tuiRoundWith} from '@taiga-ui/cdk';\nimport {TUI_DEFAULT_NUMBER_FORMAT} from '@taiga-ui/core/constants';\nimport {TuiNumberFormatSettings} from '@taiga-ui/core/interfaces';\n\nimport {tuiGetFractionPartPadded} from './get-fractional-part-padded';\n\n/**\n * Formats number adding a thousand separators and correct decimal separator\n * padding decimal part with zeroes to given length\n *\n * @param value the input number\n * @param settings See {@link TuiNumberFormatSettings}\n * @return the formatted string\n */\nexport function tuiFormatNumber(\n value: number,\n settings: Partial<TuiNumberFormatSettings> = {},\n): string {\n const {decimalLimit, decimalSeparator, thousandSeparator, zeroPadding, rounding} = {\n ...TUI_DEFAULT_NUMBER_FORMAT,\n ...settings,\n };\n\n const rounded = Number.isFinite(decimalLimit)\n ? tuiRoundWith({value, precision: decimalLimit, method: rounding})\n : value;\n const integerPartString = String(Math.floor(Math.abs(rounded)));\n\n let fractionPartPadded = tuiGetFractionPartPadded(rounded, decimalLimit);\n\n if (Number.isFinite(decimalLimit)) {\n if (zeroPadding) {\n const zeroPaddingSize: number = Math.max(\n decimalLimit - fractionPartPadded.length,\n 0,\n );\n const zeroPartString = `0`.repeat(zeroPaddingSize);\n\n fractionPartPadded = `${fractionPartPadded}${zeroPartString}`;\n } else {\n fractionPartPadded = fractionPartPadded.replace(/0*$/, ``);\n }\n }\n\n const remainder = integerPartString.length % 3;\n const sign = value < 0 ? CHAR_HYPHEN : ``;\n let result = sign + integerPartString.charAt(0);\n\n for (let i = 1; i < integerPartString.length; i++) {\n if (i % 3 === remainder && integerPartString.length > 3) {\n result += thousandSeparator;\n }\n\n result += integerPartString.charAt(i);\n }\n\n return fractionPartPadded ? result + decimalSeparator + fractionPartPadded : result;\n}\n","import {CHAR_PLUS} from '@taiga-ui/cdk';\n\n/**\n * TODO: delete in v4.0\n * @deprecated Use {@link https://maskito.dev/core-concepts/transformer maskitoTransform} instead<br/>\n * @example\n * import {maskitoTransform} from '@maskito/core';\n *\n * const mask = {\n * mask: ['+', '1', ' ', /\\d/, /\\d/, /\\d/, ')', ' ', /\\d/, /\\d/, /\\d/, '-', /\\d/, /\\d/, /\\d/, /\\d/],\n * };\n * maskitoTransform('12125552368', mask); // +1 (212) 555-2368\n * ___\n * Formats a string with the phone format +7XXXXXXXXXXXX or XXXXXXXXXXXX,\n * adding parentheses and hyphens.\n *\n * @param value the input string\n * @param countryCode a country code\n * @param phoneMask a phone number mask\n * @return the formatted phone string of the form +7 XXX XXX-XX-XX\n */\nexport function tuiFormatPhone(\n value: string,\n countryCode: string,\n phoneMask: string,\n): string {\n if (!value) {\n return ``;\n }\n\n let result = countryCode;\n\n countryCode = countryCode.replace(/[()]/g, ``);\n\n if (!value.startsWith(countryCode)) {\n value = countryCode + value.replace(CHAR_PLUS, ``);\n }\n\n const splitPhoneMask = phoneMask.split(``);\n const splitValue = value.slice(countryCode.length).split(``);\n\n result += ` `;\n\n if (splitValue.length === 0) {\n return result;\n }\n\n for (const mask of splitPhoneMask) {\n if (splitValue.length === 0) {\n break;\n }\n\n if (mask === `#`) {\n result += splitValue[0] || ``;\n splitValue.splice(0, 1);\n } else {\n result += mask;\n }\n }\n\n return result;\n}\n","import {TuiDecimalSymbol} from '@taiga-ui/core/types';\n\nexport function tuiOtherDecimalSymbol(symbol: TuiDecimalSymbol): TuiDecimalSymbol {\n return symbol === `.` ? `,` : `.`;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;;;;AAMG;AACG,SAAU,aAAa,CAAC,KAAa,EAAA;AACvC,IAAA,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,aAAa,EAAE,IAAI,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;AAClF;;ACTM,SAAU,wBAAwB,CAAC,KAAa,EAAA;AAClD,IAAA,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA,EAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AAC/D;;ACFA;;;;;AAKG;AACG,SAAU,2BAA2B,CAAC,KAAa,EAAA;AACrD,IAAA,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,CA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,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC3B,SAAA;AAAM,aAAA;YACH,MAAM,IAAI,IAAI,CAAC;AAClB,SAAA;AACJ,KAAA;AAED,IAAA,OAAO,MAAM,CAAC;AAClB;;AC3DM,SAAU,qBAAqB,CAAC,MAAwB,EAAA;IAC1D,OAAO,MAAM,KAAK,CAAA,CAAA,CAAG,GAAG,CAAA,CAAA,CAAG,GAAG,CAAA,CAAA,CAAG,CAAC;AACtC;;ACJA;;AAEG;;;;"}
@@ -2,8 +2,14 @@ import { tuiAssert, tuiIsSafari, CHAR_HYPHEN, tuiIsNativeFocused, tuiGetDocument
2
2
  import { MASK_CARET_TRAP, TUI_DIGIT_REGEXP, TUI_NON_DIGITS_REGEXP, TUI_LEADING_ZEROES_REGEXP, TUI_DECIMAL_SYMBOLS } from '@taiga-ui/core/constants';
3
3
  import { tuiOtherDecimalSymbol } from '@taiga-ui/core/utils/format';
4
4
 
5
+ /**
6
+ * TODO: delete in v4.0
7
+ * @deprecated Use {@link https://maskito.dev/kit/number Number} from {@link https://github.com/taiga-family/maskito Maskito} instead <br/>
8
+ * Used to finish a number with zeros to a given precision
9
+ */
5
10
  function tuiCreateAutoCorrectedNumberPipe(decimalLimit = 0, decimalSymbol = `,`, thousandSymbol = CHAR_NO_BREAK_SPACE, nativeInput, allowNegative, isIOS = false) {
6
11
  ngDevMode && tuiAssert.assert(decimalLimit >= 0);
12
+ // Guess for which browser I need this :)
7
13
  let previousCaret = -1;
8
14
  const unlucky = (!!nativeInput && tuiIsSafari(nativeInput)) || isIOS;
9
15
  if (nativeInput && unlucky) {
@@ -12,9 +18,11 @@ function tuiCreateAutoCorrectedNumberPipe(decimalLimit = 0, decimalSymbol = `,`,
12
18
  });
13
19
  }
14
20
  return (conformedValue, config) => {
21
+ // Removing everything by selecting and pressing '-'
15
22
  if (!conformedValue && config.rawValue === CHAR_HYPHEN && allowNegative) {
16
23
  return CHAR_HYPHEN;
17
24
  }
25
+ // remove these hacks after text mask library has changed
18
26
  if (nativeInput && unlucky && tuiIsNativeFocused(nativeInput)) {
19
27
  const caret = calculateSafariCaret(config.previousConformedValue, conformedValue, previousCaret);
20
28
  setTimeout(() => {
@@ -86,6 +94,10 @@ function calculateCaretGap(previousValue = ``, current, thousandSymbol) {
86
94
  }
87
95
 
88
96
  const ASSERTION = `Correction function must return single char or null`;
97
+ /**
98
+ * TODO: delete in v4.0
99
+ * @deprecated Use {@link https://maskito.dev/core-concepts/processors processors} from {@link https://github.com/taiga-family/maskito Maskito}
100
+ */
89
101
  function tuiCreateCorrectionMask(allowed, correctionHandler) {
90
102
  return rawValue => {
91
103
  const mask = rawValue.split(``).reduce((result, char, index) => {
@@ -112,10 +124,16 @@ function tuiCreateCorrectionMask(allowed, correctionHandler) {
112
124
  }
113
125
 
114
126
  const NON_ZERO_DIGIT = /[1-9]/;
127
+ /**
128
+ * TODO: delete in v4.0
129
+ * @deprecated Use {@link https://maskito.dev/kit/number Number} from {@link https://github.com/taiga-family/maskito Maskito} instead <br/>
130
+ * Adaptation for {@link https://github.com/text-mask/text-mask/tree/master/addons#createnumbermask `createNumberMask`}
131
+ */
115
132
  function tuiCreateNumberMask({ allowDecimal = false, decimalSymbol = `,`, thousandSymbol = CHAR_NO_BREAK_SPACE, autoCorrectDecimalSymbol = true, decimalLimit = 2, requireDecimal = false, allowNegative = false, integerLimit = 0, } = {}) {
116
133
  ngDevMode && tuiAssert.assert(decimalLimit >= 0);
117
134
  ngDevMode && tuiAssert.assert(Number.isInteger(integerLimit));
118
135
  ngDevMode && tuiAssert.assert(integerLimit >= 0);
136
+ // eslint-disable-next-line max-statements
119
137
  return (rawValue, { previousConformedValue }) => {
120
138
  if (previousConformedValue && requireDecimal) {
121
139
  const conformedWithoutSeparator = rawValue.split(thousandSymbol).join(``);
@@ -124,6 +142,7 @@ function tuiCreateNumberMask({ allowDecimal = false, decimalSymbol = `,`, thousa
124
142
  .join(``)
125
143
  .split(decimalSymbol)
126
144
  .join(``);
145
+ // Forbid removal of decimal separator if decimal part is required
127
146
  if (conformedWithoutSeparator ===
128
147
  previousConformedValueWithoutDecimalSymbolAndSeparator) {
129
148
  rawValue = previousConformedValue;
@@ -217,15 +236,27 @@ function convertToMask(strNumber) {
217
236
  }
218
237
  function addThousandsSeparator(strNumber, thousandSymbol) {
219
238
  return strNumber.length > 3
220
- ?
239
+ ? // TODO: investigate to disallow potentially catastrophic exponential-time regular expressions.
240
+ // eslint-disable-next-line unicorn/no-unsafe-regex
221
241
  strNumber.replace(/\B(?=(\d{3})+(?!\d))/g, thousandSymbol)
222
242
  : strNumber;
223
243
  }
224
244
 
245
+ /**
246
+ * TODO: delete in v4.0
247
+ * @deprecated Use {@link https://maskito.dev/kit/number Number} from {@link https://github.com/taiga-family/maskito Maskito} instead
248
+ */
225
249
  function tuiEnableAutoCorrectDecimalSymbol({ thousandSeparator, }) {
226
250
  return !TUI_DECIMAL_SYMBOLS.includes(thousandSeparator);
227
251
  }
228
252
 
253
+ /**
254
+ * TODO: delete in v4.0
255
+ * @deprecated use {@link https://maskito.dev/kit/number maskitoParseNumber} instead
256
+ * ```ts
257
+ * Number.isNaN(maskitoParseNumber(value, decimalSeparator))
258
+ * ```
259
+ */
229
260
  function tuiMaskedMoneyValueIsEmpty(value) {
230
261
  switch (value) {
231
262
  case ``:
@@ -238,9 +269,17 @@ function tuiMaskedMoneyValueIsEmpty(value) {
238
269
  }
239
270
  }
240
271
 
272
+ /**
273
+ * TODO: delete in v4.0
274
+ * @deprecated use {@link https://maskito.dev/kit/number maskitoParseNumber} instead
275
+ */
241
276
  function tuiMaskedNumberStringToNumber(value, decimalsSymbol, thousandSymbol) {
242
277
  return parseFloat(value.split(thousandSymbol).join(``).split(decimalsSymbol).join(`.`));
243
278
  }
244
279
 
280
+ /**
281
+ * Generated bundle index. Do not edit.
282
+ */
283
+
245
284
  export { tuiCreateAutoCorrectedNumberPipe, tuiCreateCorrectionMask, tuiCreateNumberMask, tuiEnableAutoCorrectDecimalSymbol, tuiMaskedMoneyValueIsEmpty, tuiMaskedNumberStringToNumber };
246
285
  //# sourceMappingURL=taiga-ui-core-utils-mask.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-utils-mask.js","sources":["../../../projects/core/utils/mask/create-auto-corrected-money-pipe.ts","../../../projects/core/utils/mask/create-correction-mask.ts","../../../projects/core/utils/mask/create-number-mask.ts","../../../projects/core/utils/mask/enable-auto-correct-decimal-symbol.ts","../../../projects/core/utils/mask/masked-money-value-is-empty.ts","../../../projects/core/utils/mask/masked-number-string-to-number.ts"],"sourcesContent":["import {\n CHAR_HYPHEN,\n CHAR_NO_BREAK_SPACE,\n tuiAssert,\n tuiGetDocumentOrShadowRoot,\n tuiIsNativeFocused,\n tuiIsSafari,\n} from '@taiga-ui/cdk';\nimport {TuiTextMaskPipeHandler} from '@taiga-ui/core/mask';\nimport {TuiDecimalSymbol} from '@taiga-ui/core/types';\n\n/**\n * TODO: delete in v4.0\n * @deprecated Use {@link https://maskito.dev/kit/number Number} from {@link https://github.com/taiga-family/maskito Maskito} instead <br/>\n * Used to finish a number with zeros to a given precision\n */\nexport function tuiCreateAutoCorrectedNumberPipe(\n decimalLimit: number = 0,\n decimalSymbol: TuiDecimalSymbol = `,`,\n thousandSymbol: string = CHAR_NO_BREAK_SPACE,\n nativeInput?: HTMLInputElement | null,\n allowNegative?: boolean,\n isIOS = false,\n): TuiTextMaskPipeHandler {\n ngDevMode && tuiAssert.assert(decimalLimit >= 0);\n\n // Guess for which browser I need this :)\n let previousCaret = -1;\n const unlucky = (!!nativeInput && tuiIsSafari(nativeInput)) || isIOS;\n\n if (nativeInput && unlucky) {\n nativeInput.addEventListener(`beforeinput`, () => {\n previousCaret = nativeInput.selectionStart || 0;\n });\n }\n\n return (conformedValue, config) => {\n // Removing everything by selecting and pressing '-'\n if (!conformedValue && config.rawValue === CHAR_HYPHEN && allowNegative) {\n return CHAR_HYPHEN;\n }\n\n // remove these hacks after text mask library has changed\n if (nativeInput && unlucky && tuiIsNativeFocused(nativeInput)) {\n const caret = calculateSafariCaret(\n config.previousConformedValue,\n conformedValue,\n previousCaret,\n );\n\n setTimeout(() => {\n nativeInput.setSelectionRange(caret, caret);\n });\n }\n\n if (\n nativeInput &&\n nativeInput.ownerDocument !== tuiGetDocumentOrShadowRoot(nativeInput) &&\n tuiIsNativeFocused(nativeInput) &&\n config.currentCaretPosition\n ) {\n const realCaretPosition =\n config.currentCaretPosition +\n calculateCaretGap(\n config.previousConformedValue,\n conformedValue,\n thousandSymbol,\n );\n\n setTimeout(() => {\n nativeInput.setSelectionRange(realCaretPosition, realCaretPosition);\n });\n }\n\n if (conformedValue === `` || !decimalLimit || !Number.isInteger(decimalLimit)) {\n return {value: conformedValue};\n }\n\n const withDecimalSymbol = addDecimalSymbolIfNeeded(conformedValue, decimalSymbol);\n const decimalPart = withDecimalSymbol.split(decimalSymbol)[1];\n const zeroPaddingSize = decimalLimit - decimalPart.length;\n\n return {\n value: withDecimalSymbol + `0`.repeat(zeroPaddingSize),\n };\n };\n}\n\nfunction addDecimalSymbolIfNeeded(\n value: string,\n decimalSymbol: TuiDecimalSymbol = `,`,\n): string {\n return !value.includes(decimalSymbol) ? value + decimalSymbol : value;\n}\n\nfunction calculateSafariCaret(\n previousValue: string = ``,\n current: string,\n previousCaret: number,\n decimalSymbol: string = `,`,\n): number {\n const tailRegex = new RegExp(`${decimalSymbol}.+`);\n const previousWithoutTail = previousValue.replace(tailRegex, ``);\n const currentWithoutTail = current.replace(tailRegex, ``);\n\n const pasteOrCutOperation =\n Math.abs(previousWithoutTail.length - currentWithoutTail.length) > 2;\n\n if (pasteOrCutOperation) {\n return current.length;\n }\n\n if (previousValue.length === current.length) {\n if (previousValue.indexOf(decimalSymbol) <= previousCaret) {\n return calculateChangedTailIndex(previousValue, current);\n }\n\n return previousWithoutTail === currentWithoutTail\n ? previousCaret - 1\n : previousCaret + 1;\n }\n\n if (previousValue.length === 0) {\n return 1;\n }\n\n const changeLength = current.length - previousValue.length;\n\n return previousCaret + changeLength;\n}\n\nfunction calculateChangedTailIndex(previous: string, current: string): number {\n for (let i = 0; i < current.length; i++) {\n if (previous[i] !== current[i]) {\n return current[i] === `0` ? i : i + 1;\n }\n }\n\n return current.length;\n}\n\nfunction calculateCaretGap(\n previousValue: string = ``,\n current: string,\n thousandSymbol: string,\n): number {\n const pasteOrCutOperation = Math.abs(previousValue.length - current.length) > 2;\n\n if (pasteOrCutOperation) {\n return 0;\n }\n\n const wereSpaces = previousValue.split(thousandSymbol).length;\n const nowSpaces = current.split(thousandSymbol).length;\n\n return nowSpaces - wereSpaces;\n}\n","import {tuiAssert} from '@taiga-ui/cdk';\nimport {MASK_CARET_TRAP} from '@taiga-ui/core/constants';\nimport {\n TuiTextMaskCorrectionHandler,\n TuiTextMaskList,\n TuiTextMaskListHandler,\n} from '@taiga-ui/core/mask';\n\nconst ASSERTION = `Correction function must return single char or null`;\n\n/**\n * TODO: delete in v4.0\n * @deprecated Use {@link https://maskito.dev/core-concepts/processors processors} from {@link https://github.com/taiga-family/maskito Maskito}\n */\nexport function tuiCreateCorrectionMask(\n allowed: RegExp,\n correctionHandler: TuiTextMaskCorrectionHandler,\n): TuiTextMaskListHandler {\n return rawValue => {\n const mask = rawValue.split(``).reduce<TuiTextMaskList>((result, char, index) => {\n const corrected = correctionHandler(char, index);\n\n ngDevMode &&\n tuiAssert.assert(corrected === null || corrected.length === 1, ASSERTION);\n\n if (!allowed.test(char) && !corrected) {\n return result;\n }\n\n if (allowed.test(char)) {\n return [...result, allowed];\n }\n\n if (corrected) {\n return [...result, corrected, MASK_CARET_TRAP];\n }\n\n return result;\n }, []);\n const lastIndex = mask.lastIndexOf(MASK_CARET_TRAP);\n const filtered = mask.filter(\n (item, index) => item !== MASK_CARET_TRAP || index === lastIndex,\n );\n\n return filtered.some(item => item !== allowed)\n ? [...filtered, allowed]\n : filtered;\n };\n}\n","import {CHAR_EN_DASH, CHAR_HYPHEN, CHAR_NO_BREAK_SPACE, tuiAssert} from '@taiga-ui/cdk';\nimport {\n MASK_CARET_TRAP,\n TUI_DIGIT_REGEXP,\n TUI_LEADING_ZEROES_REGEXP,\n TUI_NON_DIGITS_REGEXP,\n} from '@taiga-ui/core/constants';\nimport {TuiNumberMaskOptions, TuiTextMaskListHandler} from '@taiga-ui/core/mask';\nimport {TuiDecimalSymbol} from '@taiga-ui/core/types';\nimport {tuiOtherDecimalSymbol} from '@taiga-ui/core/utils/format';\n\nconst NON_ZERO_DIGIT = /[1-9]/;\n\n/**\n * TODO: delete in v4.0\n * @deprecated Use {@link https://maskito.dev/kit/number Number} from {@link https://github.com/taiga-family/maskito Maskito} instead <br/>\n * Adaptation for {@link https://github.com/text-mask/text-mask/tree/master/addons#createnumbermask `createNumberMask`}\n */\nexport function tuiCreateNumberMask({\n allowDecimal = false,\n decimalSymbol = `,`,\n thousandSymbol = CHAR_NO_BREAK_SPACE,\n autoCorrectDecimalSymbol = true,\n decimalLimit = 2,\n requireDecimal = false,\n allowNegative = false,\n integerLimit = 0,\n}: TuiNumberMaskOptions = {}): TuiTextMaskListHandler {\n ngDevMode && tuiAssert.assert(decimalLimit >= 0);\n ngDevMode && tuiAssert.assert(Number.isInteger(integerLimit));\n ngDevMode && tuiAssert.assert(integerLimit >= 0);\n\n // eslint-disable-next-line max-statements\n return (rawValue, {previousConformedValue}) => {\n if (previousConformedValue && requireDecimal) {\n const conformedWithoutSeparator = rawValue.split(thousandSymbol).join(``);\n const previousConformedValueWithoutDecimalSymbolAndSeparator =\n previousConformedValue\n .split(thousandSymbol)\n .join(``)\n .split(decimalSymbol)\n .join(``);\n\n // Forbid removal of decimal separator if decimal part is required\n if (\n conformedWithoutSeparator ===\n previousConformedValueWithoutDecimalSymbolAndSeparator\n ) {\n rawValue = previousConformedValue;\n }\n }\n\n const isNegative =\n (rawValue?.startsWith(CHAR_HYPHEN) || rawValue?.startsWith(CHAR_EN_DASH)) &&\n allowNegative;\n\n if (\n isDecimalSymbol(rawValue, decimalSymbol, autoCorrectDecimalSymbol) &&\n allowDecimal\n ) {\n return [`0`, decimalSymbol, TUI_DIGIT_REGEXP];\n }\n\n if (isNegative) {\n rawValue = rawValue.slice(1);\n }\n\n const decimalIndex = getDecimalSymbolIndex(\n rawValue,\n decimalSymbol,\n autoCorrectDecimalSymbol,\n );\n const hasDecimal = decimalIndex !== -1;\n const integer = hasDecimal ? rawValue.slice(0, decimalIndex) : rawValue;\n const thousandSeparators = integer.match(new RegExp(thousandSymbol, `g`)) || [];\n const integerCapped = integerLimit\n ? integer.slice(0, integerLimit + thousandSeparators.length)\n : integer;\n const integerCappedClean = integerCapped.replace(TUI_NON_DIGITS_REGEXP, ``);\n const [leadingZerosMatch] = integerCappedClean.match(\n TUI_LEADING_ZEROES_REGEXP,\n ) || [``];\n const leadingZerosAmount = leadingZerosMatch.length;\n const integerCappedZerosClean = integerCappedClean\n .replace(/^0+(?!\\.|$)/, ``)\n .trim();\n const withSeparator = addThousandsSeparator(\n integerCappedZerosClean,\n thousandSymbol,\n );\n const mask = convertToMask(withSeparator);\n\n if ((hasDecimal && allowDecimal) || requireDecimal) {\n const fraction = hasDecimal\n ? convertToMask(\n rawValue.slice(decimalIndex + 1).replace(TUI_NON_DIGITS_REGEXP, ``),\n )\n : [];\n const fractionCapped = decimalLimit\n ? fraction.slice(0, decimalLimit)\n : fraction;\n\n if (rawValue[decimalIndex] !== tuiOtherDecimalSymbol(decimalSymbol)) {\n mask.push(MASK_CARET_TRAP);\n }\n\n mask.push(decimalSymbol, MASK_CARET_TRAP, ...fractionCapped);\n\n for (let i = 0; i < Math.min(decimalLimit - fractionCapped.length, 20); i++) {\n mask.push(TUI_DIGIT_REGEXP);\n }\n }\n\n const isOnlyZeroDigit = mask.length === 1 && integerCappedZerosClean === `0`;\n\n if (isNegative) {\n if (mask.length === 0) {\n mask.push(TUI_DIGIT_REGEXP);\n }\n\n mask.unshift(CHAR_HYPHEN);\n }\n\n return preventLeadingZeroes(mask, isOnlyZeroDigit, leadingZerosAmount);\n };\n}\n\nfunction preventLeadingZeroes(\n mask: Array<RegExp | string>,\n isOnlyZeroDigit: boolean = false,\n leadingZerosAmount: number = 0,\n): Array<RegExp | string> {\n if (isOnlyZeroDigit || leadingZerosAmount === 0) {\n return mask;\n }\n\n const firstDigitIndex = mask.indexOf(TUI_DIGIT_REGEXP);\n\n if (firstDigitIndex === -1) {\n return mask;\n }\n\n const secondMaskDigit = mask[firstDigitIndex + 1];\n const isCaretTrap = secondMaskDigit === MASK_CARET_TRAP;\n\n if (isCaretTrap && leadingZerosAmount === 1) {\n return mask;\n }\n\n if (isCaretTrap) {\n mask.unshift(NON_ZERO_DIGIT);\n\n return mask;\n }\n\n mask[firstDigitIndex] = NON_ZERO_DIGIT;\n\n return mask;\n}\n\nfunction getDecimalSymbolIndex(\n str: string,\n decimalSymbol: TuiDecimalSymbol,\n autoCorrectDecimalSymbol: boolean,\n): number {\n if (!autoCorrectDecimalSymbol) {\n return str.lastIndexOf(decimalSymbol);\n }\n\n return Math.max(\n str.lastIndexOf(decimalSymbol),\n str.lastIndexOf(tuiOtherDecimalSymbol(decimalSymbol)),\n );\n}\n\nfunction isDecimalSymbol(\n str: string,\n decimalSymbol: TuiDecimalSymbol,\n autoCorrectDecimalSymbol: boolean,\n): boolean {\n if (autoCorrectDecimalSymbol) {\n return /^[,.]$/.test(str);\n }\n\n return str === decimalSymbol;\n}\n\nfunction convertToMask(strNumber: string): Array<RegExp | string> {\n return strNumber\n .split(``)\n .map(char => (TUI_DIGIT_REGEXP.test(char) ? TUI_DIGIT_REGEXP : char));\n}\n\nfunction addThousandsSeparator(strNumber: string, thousandSymbol: string): string {\n return strNumber.length > 3\n ? // TODO: investigate to disallow potentially catastrophic exponential-time regular expressions.\n // eslint-disable-next-line unicorn/no-unsafe-regex\n strNumber.replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandSymbol)\n : strNumber;\n}\n","import {TUI_DECIMAL_SYMBOLS} from '@taiga-ui/core/constants';\nimport {TuiNumberFormatSettings} from '@taiga-ui/core/interfaces';\n\n/**\n * TODO: delete in v4.0\n * @deprecated Use {@link https://maskito.dev/kit/number Number} from {@link https://github.com/taiga-family/maskito Maskito} instead\n */\nexport function tuiEnableAutoCorrectDecimalSymbol({\n thousandSeparator,\n}: TuiNumberFormatSettings): boolean {\n return !TUI_DECIMAL_SYMBOLS.includes(thousandSeparator);\n}\n","import {CHAR_HYPHEN} from '@taiga-ui/cdk';\n\n/**\n * TODO: delete in v4.0\n * @deprecated use {@link https://maskito.dev/kit/number maskitoParseNumber} instead\n * ```ts\n * Number.isNaN(maskitoParseNumber(value, decimalSeparator))\n * ```\n */\nexport function tuiMaskedMoneyValueIsEmpty(value: string): boolean {\n switch (value) {\n case ``:\n case CHAR_HYPHEN:\n case `,`:\n case `${CHAR_HYPHEN},`:\n return true;\n default:\n return false;\n }\n}\n","import {TuiDecimalSymbol} from '@taiga-ui/core/types';\n\n/**\n * TODO: delete in v4.0\n * @deprecated use {@link https://maskito.dev/kit/number maskitoParseNumber} instead\n */\nexport function tuiMaskedNumberStringToNumber(\n value: string,\n decimalsSymbol: TuiDecimalSymbol,\n thousandSymbol: string,\n): number {\n return parseFloat(\n value.split(thousandSymbol).join(``).split(decimalsSymbol).join(`.`),\n );\n}\n"],"names":[],"mappings":";;;;SAgBgB,gCAAgC,CAC5C,eAAuB,CAAC,EACxB,gBAAkC,CAAG,CAAA,CAAA,EACrC,cAAyB,GAAA,mBAAmB,EAC5C,WAAqC,EACrC,aAAuB,EACvB,KAAK,GAAG,KAAK,EAAA;IAEb,SAAS,IAAI,SAAS,CAAC,MAAM,CAAC,YAAY,IAAI,CAAC,CAAC,CAAC;AAGjD,IAAA,IAAI,aAAa,GAAG,CAAC,CAAC,CAAC;AACvB,IAAA,MAAM,OAAO,GAAG,CAAC,CAAC,CAAC,WAAW,IAAI,WAAW,CAAC,WAAW,CAAC,KAAK,KAAK,CAAC;IAErE,IAAI,WAAW,IAAI,OAAO,EAAE;AACxB,QAAA,WAAW,CAAC,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AAU,CACb,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,CAAA,CAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,CAAA,CAAA,CAAG,CAAC,CACvE,CAAC;AACN;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-utils-mask.js","sources":["../../../projects/core/utils/mask/create-auto-corrected-money-pipe.ts","../../../projects/core/utils/mask/create-correction-mask.ts","../../../projects/core/utils/mask/create-number-mask.ts","../../../projects/core/utils/mask/enable-auto-correct-decimal-symbol.ts","../../../projects/core/utils/mask/masked-money-value-is-empty.ts","../../../projects/core/utils/mask/masked-number-string-to-number.ts","../../../projects/core/utils/mask/taiga-ui-core-utils-mask.ts"],"sourcesContent":["import {\n CHAR_HYPHEN,\n CHAR_NO_BREAK_SPACE,\n tuiAssert,\n tuiGetDocumentOrShadowRoot,\n tuiIsNativeFocused,\n tuiIsSafari,\n} from '@taiga-ui/cdk';\nimport {TuiTextMaskPipeHandler} from '@taiga-ui/core/mask';\nimport {TuiDecimalSymbol} from '@taiga-ui/core/types';\n\n/**\n * TODO: delete in v4.0\n * @deprecated Use {@link https://maskito.dev/kit/number Number} from {@link https://github.com/taiga-family/maskito Maskito} instead <br/>\n * Used to finish a number with zeros to a given precision\n */\nexport function tuiCreateAutoCorrectedNumberPipe(\n decimalLimit: number = 0,\n decimalSymbol: TuiDecimalSymbol = `,`,\n thousandSymbol: string = CHAR_NO_BREAK_SPACE,\n nativeInput?: HTMLInputElement | null,\n allowNegative?: boolean,\n isIOS = false,\n): TuiTextMaskPipeHandler {\n ngDevMode && tuiAssert.assert(decimalLimit >= 0);\n\n // Guess for which browser I need this :)\n let previousCaret = -1;\n const unlucky = (!!nativeInput && tuiIsSafari(nativeInput)) || isIOS;\n\n if (nativeInput && unlucky) {\n nativeInput.addEventListener(`beforeinput`, () => {\n previousCaret = nativeInput.selectionStart || 0;\n });\n }\n\n return (conformedValue, config) => {\n // Removing everything by selecting and pressing '-'\n if (!conformedValue && config.rawValue === CHAR_HYPHEN && allowNegative) {\n return CHAR_HYPHEN;\n }\n\n // remove these hacks after text mask library has changed\n if (nativeInput && unlucky && tuiIsNativeFocused(nativeInput)) {\n const caret = calculateSafariCaret(\n config.previousConformedValue,\n conformedValue,\n previousCaret,\n );\n\n setTimeout(() => {\n nativeInput.setSelectionRange(caret, caret);\n });\n }\n\n if (\n nativeInput &&\n nativeInput.ownerDocument !== tuiGetDocumentOrShadowRoot(nativeInput) &&\n tuiIsNativeFocused(nativeInput) &&\n config.currentCaretPosition\n ) {\n const realCaretPosition =\n config.currentCaretPosition +\n calculateCaretGap(\n config.previousConformedValue,\n conformedValue,\n thousandSymbol,\n );\n\n setTimeout(() => {\n nativeInput.setSelectionRange(realCaretPosition, realCaretPosition);\n });\n }\n\n if (conformedValue === `` || !decimalLimit || !Number.isInteger(decimalLimit)) {\n return {value: conformedValue};\n }\n\n const withDecimalSymbol = addDecimalSymbolIfNeeded(conformedValue, decimalSymbol);\n const decimalPart = withDecimalSymbol.split(decimalSymbol)[1];\n const zeroPaddingSize = decimalLimit - decimalPart.length;\n\n return {\n value: withDecimalSymbol + `0`.repeat(zeroPaddingSize),\n };\n };\n}\n\nfunction addDecimalSymbolIfNeeded(\n value: string,\n decimalSymbol: TuiDecimalSymbol = `,`,\n): string {\n return !value.includes(decimalSymbol) ? value + decimalSymbol : value;\n}\n\nfunction calculateSafariCaret(\n previousValue: string = ``,\n current: string,\n previousCaret: number,\n decimalSymbol: string = `,`,\n): number {\n const tailRegex = new RegExp(`${decimalSymbol}.+`);\n const previousWithoutTail = previousValue.replace(tailRegex, ``);\n const currentWithoutTail = current.replace(tailRegex, ``);\n\n const pasteOrCutOperation =\n Math.abs(previousWithoutTail.length - currentWithoutTail.length) > 2;\n\n if (pasteOrCutOperation) {\n return current.length;\n }\n\n if (previousValue.length === current.length) {\n if (previousValue.indexOf(decimalSymbol) <= previousCaret) {\n return calculateChangedTailIndex(previousValue, current);\n }\n\n return previousWithoutTail === currentWithoutTail\n ? previousCaret - 1\n : previousCaret + 1;\n }\n\n if (previousValue.length === 0) {\n return 1;\n }\n\n const changeLength = current.length - previousValue.length;\n\n return previousCaret + changeLength;\n}\n\nfunction calculateChangedTailIndex(previous: string, current: string): number {\n for (let i = 0; i < current.length; i++) {\n if (previous[i] !== current[i]) {\n return current[i] === `0` ? i : i + 1;\n }\n }\n\n return current.length;\n}\n\nfunction calculateCaretGap(\n previousValue: string = ``,\n current: string,\n thousandSymbol: string,\n): number {\n const pasteOrCutOperation = Math.abs(previousValue.length - current.length) > 2;\n\n if (pasteOrCutOperation) {\n return 0;\n }\n\n const wereSpaces = previousValue.split(thousandSymbol).length;\n const nowSpaces = current.split(thousandSymbol).length;\n\n return nowSpaces - wereSpaces;\n}\n","import {tuiAssert} from '@taiga-ui/cdk';\nimport {MASK_CARET_TRAP} from '@taiga-ui/core/constants';\nimport {\n TuiTextMaskCorrectionHandler,\n TuiTextMaskList,\n TuiTextMaskListHandler,\n} from '@taiga-ui/core/mask';\n\nconst ASSERTION = `Correction function must return single char or null`;\n\n/**\n * TODO: delete in v4.0\n * @deprecated Use {@link https://maskito.dev/core-concepts/processors processors} from {@link https://github.com/taiga-family/maskito Maskito}\n */\nexport function tuiCreateCorrectionMask(\n allowed: RegExp,\n correctionHandler: TuiTextMaskCorrectionHandler,\n): TuiTextMaskListHandler {\n return rawValue => {\n const mask = rawValue.split(``).reduce<TuiTextMaskList>((result, char, index) => {\n const corrected = correctionHandler(char, index);\n\n ngDevMode &&\n tuiAssert.assert(corrected === null || corrected.length === 1, ASSERTION);\n\n if (!allowed.test(char) && !corrected) {\n return result;\n }\n\n if (allowed.test(char)) {\n return [...result, allowed];\n }\n\n if (corrected) {\n return [...result, corrected, MASK_CARET_TRAP];\n }\n\n return result;\n }, []);\n const lastIndex = mask.lastIndexOf(MASK_CARET_TRAP);\n const filtered = mask.filter(\n (item, index) => item !== MASK_CARET_TRAP || index === lastIndex,\n );\n\n return filtered.some(item => item !== allowed)\n ? [...filtered, allowed]\n : filtered;\n };\n}\n","import {CHAR_EN_DASH, CHAR_HYPHEN, CHAR_NO_BREAK_SPACE, tuiAssert} from '@taiga-ui/cdk';\nimport {\n MASK_CARET_TRAP,\n TUI_DIGIT_REGEXP,\n TUI_LEADING_ZEROES_REGEXP,\n TUI_NON_DIGITS_REGEXP,\n} from '@taiga-ui/core/constants';\nimport {TuiNumberMaskOptions, TuiTextMaskListHandler} from '@taiga-ui/core/mask';\nimport {TuiDecimalSymbol} from '@taiga-ui/core/types';\nimport {tuiOtherDecimalSymbol} from '@taiga-ui/core/utils/format';\n\nconst NON_ZERO_DIGIT = /[1-9]/;\n\n/**\n * TODO: delete in v4.0\n * @deprecated Use {@link https://maskito.dev/kit/number Number} from {@link https://github.com/taiga-family/maskito Maskito} instead <br/>\n * Adaptation for {@link https://github.com/text-mask/text-mask/tree/master/addons#createnumbermask `createNumberMask`}\n */\nexport function tuiCreateNumberMask({\n allowDecimal = false,\n decimalSymbol = `,`,\n thousandSymbol = CHAR_NO_BREAK_SPACE,\n autoCorrectDecimalSymbol = true,\n decimalLimit = 2,\n requireDecimal = false,\n allowNegative = false,\n integerLimit = 0,\n}: TuiNumberMaskOptions = {}): TuiTextMaskListHandler {\n ngDevMode && tuiAssert.assert(decimalLimit >= 0);\n ngDevMode && tuiAssert.assert(Number.isInteger(integerLimit));\n ngDevMode && tuiAssert.assert(integerLimit >= 0);\n\n // eslint-disable-next-line max-statements\n return (rawValue, {previousConformedValue}) => {\n if (previousConformedValue && requireDecimal) {\n const conformedWithoutSeparator = rawValue.split(thousandSymbol).join(``);\n const previousConformedValueWithoutDecimalSymbolAndSeparator =\n previousConformedValue\n .split(thousandSymbol)\n .join(``)\n .split(decimalSymbol)\n .join(``);\n\n // Forbid removal of decimal separator if decimal part is required\n if (\n conformedWithoutSeparator ===\n previousConformedValueWithoutDecimalSymbolAndSeparator\n ) {\n rawValue = previousConformedValue;\n }\n }\n\n const isNegative =\n (rawValue?.startsWith(CHAR_HYPHEN) || rawValue?.startsWith(CHAR_EN_DASH)) &&\n allowNegative;\n\n if (\n isDecimalSymbol(rawValue, decimalSymbol, autoCorrectDecimalSymbol) &&\n allowDecimal\n ) {\n return [`0`, decimalSymbol, TUI_DIGIT_REGEXP];\n }\n\n if (isNegative) {\n rawValue = rawValue.slice(1);\n }\n\n const decimalIndex = getDecimalSymbolIndex(\n rawValue,\n decimalSymbol,\n autoCorrectDecimalSymbol,\n );\n const hasDecimal = decimalIndex !== -1;\n const integer = hasDecimal ? rawValue.slice(0, decimalIndex) : rawValue;\n const thousandSeparators = integer.match(new RegExp(thousandSymbol, `g`)) || [];\n const integerCapped = integerLimit\n ? integer.slice(0, integerLimit + thousandSeparators.length)\n : integer;\n const integerCappedClean = integerCapped.replace(TUI_NON_DIGITS_REGEXP, ``);\n const [leadingZerosMatch] = integerCappedClean.match(\n TUI_LEADING_ZEROES_REGEXP,\n ) || [``];\n const leadingZerosAmount = leadingZerosMatch.length;\n const integerCappedZerosClean = integerCappedClean\n .replace(/^0+(?!\\.|$)/, ``)\n .trim();\n const withSeparator = addThousandsSeparator(\n integerCappedZerosClean,\n thousandSymbol,\n );\n const mask = convertToMask(withSeparator);\n\n if ((hasDecimal && allowDecimal) || requireDecimal) {\n const fraction = hasDecimal\n ? convertToMask(\n rawValue.slice(decimalIndex + 1).replace(TUI_NON_DIGITS_REGEXP, ``),\n )\n : [];\n const fractionCapped = decimalLimit\n ? fraction.slice(0, decimalLimit)\n : fraction;\n\n if (rawValue[decimalIndex] !== tuiOtherDecimalSymbol(decimalSymbol)) {\n mask.push(MASK_CARET_TRAP);\n }\n\n mask.push(decimalSymbol, MASK_CARET_TRAP, ...fractionCapped);\n\n for (let i = 0; i < Math.min(decimalLimit - fractionCapped.length, 20); i++) {\n mask.push(TUI_DIGIT_REGEXP);\n }\n }\n\n const isOnlyZeroDigit = mask.length === 1 && integerCappedZerosClean === `0`;\n\n if (isNegative) {\n if (mask.length === 0) {\n mask.push(TUI_DIGIT_REGEXP);\n }\n\n mask.unshift(CHAR_HYPHEN);\n }\n\n return preventLeadingZeroes(mask, isOnlyZeroDigit, leadingZerosAmount);\n };\n}\n\nfunction preventLeadingZeroes(\n mask: Array<RegExp | string>,\n isOnlyZeroDigit: boolean = false,\n leadingZerosAmount: number = 0,\n): Array<RegExp | string> {\n if (isOnlyZeroDigit || leadingZerosAmount === 0) {\n return mask;\n }\n\n const firstDigitIndex = mask.indexOf(TUI_DIGIT_REGEXP);\n\n if (firstDigitIndex === -1) {\n return mask;\n }\n\n const secondMaskDigit = mask[firstDigitIndex + 1];\n const isCaretTrap = secondMaskDigit === MASK_CARET_TRAP;\n\n if (isCaretTrap && leadingZerosAmount === 1) {\n return mask;\n }\n\n if (isCaretTrap) {\n mask.unshift(NON_ZERO_DIGIT);\n\n return mask;\n }\n\n mask[firstDigitIndex] = NON_ZERO_DIGIT;\n\n return mask;\n}\n\nfunction getDecimalSymbolIndex(\n str: string,\n decimalSymbol: TuiDecimalSymbol,\n autoCorrectDecimalSymbol: boolean,\n): number {\n if (!autoCorrectDecimalSymbol) {\n return str.lastIndexOf(decimalSymbol);\n }\n\n return Math.max(\n str.lastIndexOf(decimalSymbol),\n str.lastIndexOf(tuiOtherDecimalSymbol(decimalSymbol)),\n );\n}\n\nfunction isDecimalSymbol(\n str: string,\n decimalSymbol: TuiDecimalSymbol,\n autoCorrectDecimalSymbol: boolean,\n): boolean {\n if (autoCorrectDecimalSymbol) {\n return /^[,.]$/.test(str);\n }\n\n return str === decimalSymbol;\n}\n\nfunction convertToMask(strNumber: string): Array<RegExp | string> {\n return strNumber\n .split(``)\n .map(char => (TUI_DIGIT_REGEXP.test(char) ? TUI_DIGIT_REGEXP : char));\n}\n\nfunction addThousandsSeparator(strNumber: string, thousandSymbol: string): string {\n return strNumber.length > 3\n ? // TODO: investigate to disallow potentially catastrophic exponential-time regular expressions.\n // eslint-disable-next-line unicorn/no-unsafe-regex\n strNumber.replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandSymbol)\n : strNumber;\n}\n","import {TUI_DECIMAL_SYMBOLS} from '@taiga-ui/core/constants';\nimport {TuiNumberFormatSettings} from '@taiga-ui/core/interfaces';\n\n/**\n * TODO: delete in v4.0\n * @deprecated Use {@link https://maskito.dev/kit/number Number} from {@link https://github.com/taiga-family/maskito Maskito} instead\n */\nexport function tuiEnableAutoCorrectDecimalSymbol({\n thousandSeparator,\n}: TuiNumberFormatSettings): boolean {\n return !TUI_DECIMAL_SYMBOLS.includes(thousandSeparator);\n}\n","import {CHAR_HYPHEN} from '@taiga-ui/cdk';\n\n/**\n * TODO: delete in v4.0\n * @deprecated use {@link https://maskito.dev/kit/number maskitoParseNumber} instead\n * ```ts\n * Number.isNaN(maskitoParseNumber(value, decimalSeparator))\n * ```\n */\nexport function tuiMaskedMoneyValueIsEmpty(value: string): boolean {\n switch (value) {\n case ``:\n case CHAR_HYPHEN:\n case `,`:\n case `${CHAR_HYPHEN},`:\n return true;\n default:\n return false;\n }\n}\n","import {TuiDecimalSymbol} from '@taiga-ui/core/types';\n\n/**\n * TODO: delete in v4.0\n * @deprecated use {@link https://maskito.dev/kit/number maskitoParseNumber} instead\n */\nexport function tuiMaskedNumberStringToNumber(\n value: string,\n decimalsSymbol: TuiDecimalSymbol,\n thousandSymbol: string,\n): number {\n return parseFloat(\n value.split(thousandSymbol).join(``).split(decimalsSymbol).join(`.`),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAWA;;;;AAIG;SACa,gCAAgC,CAC5C,eAAuB,CAAC,EACxB,gBAAkC,CAAG,CAAA,CAAA,EACrC,cAAyB,GAAA,mBAAmB,EAC5C,WAAqC,EACrC,aAAuB,EACvB,KAAK,GAAG,KAAK,EAAA;IAEb,SAAS,IAAI,SAAS,CAAC,MAAM,CAAC,YAAY,IAAI,CAAC,CAAC,CAAC;;AAGjD,IAAA,IAAI,aAAa,GAAG,CAAC,CAAC,CAAC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AA,KAAK,GAAG,CAAC;QACT,KAAK,CAAA,EAAG,WAAW,CAAG,CAAA,CAAA;AAClB,YAAA,OAAO,IAAI,CAAC;AAChB,QAAA;AACI,YAAA,OAAO,KAAK,CAAC;AACpB,KAAA;AACL;;ACjBA;;;AAGG;SACa,6BAA6B,CACzC,KAAa,EACb,cAAgC,EAChC,cAAsB,EAAA;IAEtB,OAAO,UAAU,CACb,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,CAAA,CAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,CAAA,CAAA,CAAG,CAAC,CACvE,CAAC;AACN;;ACdA;;AAEG;;;;"}
@@ -31,10 +31,16 @@ function tuiIconsPathFactory(staticPath) {
31
31
  };
32
32
  }
33
33
 
34
+ /**
35
+ * Check if pressed key is interactive in terms of input field
36
+ */
34
37
  function tuiIsEditingKey(key) {
35
38
  return key.length === 1 || tuiEditingKeys.includes(key);
36
39
  }
37
40
 
41
+ /**
42
+ * @internal
43
+ */
38
44
  function tuiIsObscured(el, exceptSelector = `tui-hints-host`) {
39
45
  var _a;
40
46
  return !!((_a = tuiGetElementObscures(el)) === null || _a === void 0 ? void 0 : _a.some(el => !el.closest(exceptSelector)));
@@ -49,6 +55,7 @@ function tuiOverrideOptions(override, fallback) {
49
55
  return (directive, options) => {
50
56
  const result = directive || Object.assign({}, (options || fallback));
51
57
  Object.keys(override).forEach(key => {
58
+ // Update directive props with new defaults before inputs are processed
52
59
  result[key] = override[key];
53
60
  });
54
61
  return result;
@@ -64,9 +71,19 @@ const SIZES = {
64
71
  xl: 5,
65
72
  xxl: 6,
66
73
  };
74
+ /**
75
+ * Compares size constants to determine if first size is bigger than the second
76
+ *
77
+ * @param size size that we need to compare
78
+ * @param biggerThanSize size to compare with, 's' by default
79
+ */
67
80
  function tuiSizeBigger(size, biggerThanSize = `s`) {
68
81
  return SIZES[size] > SIZES[biggerThanSize];
69
82
  }
70
83
 
84
+ /**
85
+ * Generated bundle index. Do not edit.
86
+ */
87
+
71
88
  export { tuiGetBorder, tuiIconsPathFactory, tuiIsEditingKey, tuiIsObscured, tuiIsPresumedHTMLString, tuiOverrideOptions, tuiSizeBigger };
72
89
  //# sourceMappingURL=taiga-ui-core-utils-miscellaneous.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-utils-miscellaneous.js","sources":["../../../projects/core/utils/miscellaneous/get-border.ts","../../../projects/core/utils/miscellaneous/icons-path-factory.ts","../../../projects/core/utils/miscellaneous/is-editing-key.ts","../../../projects/core/utils/miscellaneous/is-obscured.ts","../../../projects/core/utils/miscellaneous/is-presumed-html-string.ts","../../../projects/core/utils/miscellaneous/override-options.ts","../../../projects/core/utils/miscellaneous/size-bigger.ts"],"sourcesContent":["import {TuiSizeL, TuiSizeS} from '@taiga-ui/core/types';\n\nconst ITEM_SIZE = 1.5;\nconst CONTENT_SIZE = 2.5;\n\nexport function tuiGetBorder(\n hasIcon: boolean,\n hasCleaner: boolean = false,\n hasTooltip: boolean = false,\n hasContent: boolean = false,\n size: TuiSizeL | TuiSizeS = `m`,\n): number {\n const offset = size === `s` ? 0 : 0.25;\n let border = 0;\n\n if (hasIcon) {\n border += ITEM_SIZE + offset;\n }\n\n if (hasCleaner) {\n border += ITEM_SIZE + offset;\n }\n\n if (hasTooltip) {\n border += ITEM_SIZE + offset;\n }\n\n if (hasContent) {\n border += CONTENT_SIZE + offset;\n }\n\n return border;\n}\n","import {TuiStringHandler} from '@taiga-ui/cdk';\nimport {DEFAULT_ICONS_PATH, TUI_CACHE_BUSTING_PAYLOAD} from '@taiga-ui/core/constants';\n\nexport function tuiIconsPathFactory(staticPath: string): TuiStringHandler<string> {\n const base = staticPath.endsWith(`/`) ? staticPath : `${staticPath}/`;\n\n return name => {\n if (name.startsWith(`tuiIcon`)) {\n return `${base}${name}.svg${TUI_CACHE_BUSTING_PAYLOAD}#${name}`;\n }\n\n return DEFAULT_ICONS_PATH(name);\n };\n}\n","import {tuiEditingKeys} from '@taiga-ui/core/constants';\n\n/**\n * Check if pressed key is interactive in terms of input field\n */\nexport function tuiIsEditingKey(key: string): boolean {\n return key.length === 1 || tuiEditingKeys.includes(key);\n}\n","import {tuiGetElementObscures} from '@taiga-ui/cdk';\n\n/**\n * @internal\n */\nexport function tuiIsObscured(\n el: HTMLElement,\n exceptSelector = `tui-hints-host`,\n): boolean {\n return !!tuiGetElementObscures(el)?.some(el => !el.closest(exceptSelector));\n}\n","export function tuiIsPresumedHTMLString(candidate: string): boolean {\n const trimmed = candidate.trim();\n\n return trimmed.startsWith(`<`) && trimmed.endsWith(`>`);\n}\n","export function tuiOverrideOptions<T>(\n override: Partial<T>,\n fallback: T,\n): (directive: T | null, options: T | null) => T {\n return (directive, options) => {\n const result = directive || {...(options || fallback)};\n\n Object.keys(override).forEach(key => {\n // Update directive props with new defaults before inputs are processed\n (result as any)[key] = override[key as keyof T];\n });\n\n return result;\n };\n}\n","import {TuiSizeXXL, TuiSizeXXS} from '@taiga-ui/core/types';\n\nconst SIZES: Record<TuiSizeXXL | TuiSizeXXS, number> = {\n xxs: 0,\n xs: 1,\n s: 2,\n m: 3,\n l: 4,\n xl: 5,\n xxl: 6,\n};\n\n/**\n * Compares size constants to determine if first size is bigger than the second\n *\n * @param size size that we need to compare\n * @param biggerThanSize size to compare with, 's' by default\n */\nexport function tuiSizeBigger(\n size: TuiSizeXXL | TuiSizeXXS,\n biggerThanSize: TuiSizeXXL | TuiSizeXXS = `s`,\n): boolean {\n return SIZES[size] > SIZES[biggerThanSize];\n}\n"],"names":[],"mappings":";;;AAEA,MAAM,SAAS,GAAG,GAAG,CAAC;AACtB,MAAM,YAAY,GAAG,GAAG,CAAC;AAET,SAAA,YAAY,CACxB,OAAgB,EAChB,UAAsB,GAAA,KAAK,EAC3B,UAAA,GAAsB,KAAK,EAC3B,UAAA,GAAsB,KAAK,EAC3B,OAA4B,CAAG,CAAA,CAAA,EAAA;AAE/B,IAAA,MAAM,MAAM,GA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"taiga-ui-core-utils-miscellaneous.js","sources":["../../../projects/core/utils/miscellaneous/get-border.ts","../../../projects/core/utils/miscellaneous/icons-path-factory.ts","../../../projects/core/utils/miscellaneous/is-editing-key.ts","../../../projects/core/utils/miscellaneous/is-obscured.ts","../../../projects/core/utils/miscellaneous/is-presumed-html-string.ts","../../../projects/core/utils/miscellaneous/override-options.ts","../../../projects/core/utils/miscellaneous/size-bigger.ts","../../../projects/core/utils/miscellaneous/taiga-ui-core-utils-miscellaneous.ts"],"sourcesContent":["import {TuiSizeL, TuiSizeS} from '@taiga-ui/core/types';\n\nconst ITEM_SIZE = 1.5;\nconst CONTENT_SIZE = 2.5;\n\nexport function tuiGetBorder(\n hasIcon: boolean,\n hasCleaner: boolean = false,\n hasTooltip: boolean = false,\n hasContent: boolean = false,\n size: TuiSizeL | TuiSizeS = `m`,\n): number {\n const offset = size === `s` ? 0 : 0.25;\n let border = 0;\n\n if (hasIcon) {\n border += ITEM_SIZE + offset;\n }\n\n if (hasCleaner) {\n border += ITEM_SIZE + offset;\n }\n\n if (hasTooltip) {\n border += ITEM_SIZE + offset;\n }\n\n if (hasContent) {\n border += CONTENT_SIZE + offset;\n }\n\n return border;\n}\n","import {TuiStringHandler} from '@taiga-ui/cdk';\nimport {DEFAULT_ICONS_PATH, TUI_CACHE_BUSTING_PAYLOAD} from '@taiga-ui/core/constants';\n\nexport function tuiIconsPathFactory(staticPath: string): TuiStringHandler<string> {\n const base = staticPath.endsWith(`/`) ? staticPath : `${staticPath}/`;\n\n return name => {\n if (name.startsWith(`tuiIcon`)) {\n return `${base}${name}.svg${TUI_CACHE_BUSTING_PAYLOAD}#${name}`;\n }\n\n return DEFAULT_ICONS_PATH(name);\n };\n}\n","import {tuiEditingKeys} from '@taiga-ui/core/constants';\n\n/**\n * Check if pressed key is interactive in terms of input field\n */\nexport function tuiIsEditingKey(key: string): boolean {\n return key.length === 1 || tuiEditingKeys.includes(key);\n}\n","import {tuiGetElementObscures} from '@taiga-ui/cdk';\n\n/**\n * @internal\n */\nexport function tuiIsObscured(\n el: HTMLElement,\n exceptSelector = `tui-hints-host`,\n): boolean {\n return !!tuiGetElementObscures(el)?.some(el => !el.closest(exceptSelector));\n}\n","export function tuiIsPresumedHTMLString(candidate: string): boolean {\n const trimmed = candidate.trim();\n\n return trimmed.startsWith(`<`) && trimmed.endsWith(`>`);\n}\n","export function tuiOverrideOptions<T>(\n override: Partial<T>,\n fallback: T,\n): (directive: T | null, options: T | null) => T {\n return (directive, options) => {\n const result = directive || {...(options || fallback)};\n\n Object.keys(override).forEach(key => {\n // Update directive props with new defaults before inputs are processed\n (result as any)[key] = override[key as keyof T];\n });\n\n return result;\n };\n}\n","import {TuiSizeXXL, TuiSizeXXS} from '@taiga-ui/core/types';\n\nconst SIZES: Record<TuiSizeXXL | TuiSizeXXS, number> = {\n xxs: 0,\n xs: 1,\n s: 2,\n m: 3,\n l: 4,\n xl: 5,\n xxl: 6,\n};\n\n/**\n * Compares size constants to determine if first size is bigger than the second\n *\n * @param size size that we need to compare\n * @param biggerThanSize size to compare with, 's' by default\n */\nexport function tuiSizeBigger(\n size: TuiSizeXXL | TuiSizeXXS,\n biggerThanSize: TuiSizeXXL | TuiSizeXXS = `s`,\n): boolean {\n return SIZES[size] > SIZES[biggerThanSize];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA,MAAM,SAAS,GAAG,GAAG,CAAC;AACtB,MAAM,YAAY,GAAG,GAAG,CAAC;AAET,SAAA,YAAY,CACxB,OAAgB,EAChB,UAAsB,GAAA,KAAK,EAC3B,UAAA,GAAsB,KAAK,EAC3B,UAAA,GAAsB,KAAK,EAC3B,OAA4B,CAAG,CAAA,CAAA,EAAA;AAE/B,IAAA,MAAM,MAAM,GAAG,IAAI,KAAK,CAAG,CAAA,CAAA,GAAG,CAAC,GAAG,IAAI,CAAC;IACvC,IAAI,MAAM,GAAG,CAAC,CAAC;AAEf,IAAA,IAAI,OAAO,EA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
 
7
+ /**
8
+ * Generated bundle index. Do not edit.
9
+ */
10
+
7
11
  export { tuiIsMobile };
8
12
  //# sourceMappingURL=taiga-ui-core-utils-mobile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-utils-mobile.js","sources":["../../../projects/core/utils/mobile/is-mobile.ts"],"sourcesContent":["import {TuiMedia} from '@taiga-ui/core/interfaces';\nimport {tuiGetViewportWidth} from '@taiga-ui/core/utils/dom';\n\nexport function tuiIsMobile(win: Window, {mobile}: TuiMedia): boolean {\n return tuiGetViewportWidth(win) < mobile;\n}\n"],"names":[],"mappings":";;SAGgB,WAAW,CAAC,GAAW,EAAE,EAAC,MAAM,EAAW,EAAA;AACvD,IAAA,OAAO,mBAAmB,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;AAC7C;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-utils-mobile.js","sources":["../../../projects/core/utils/mobile/is-mobile.ts","../../../projects/core/utils/mobile/taiga-ui-core-utils-mobile.ts"],"sourcesContent":["import {TuiMedia} from '@taiga-ui/core/interfaces';\nimport {tuiGetViewportWidth} from '@taiga-ui/core/utils/dom';\n\nexport function tuiIsMobile(win: Window, {mobile}: TuiMedia): boolean {\n return tuiGetViewportWidth(win) < mobile;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;SAGgB,WAAW,CAAC,GAAW,EAAE,EAAC,MAAM,EAAW,EAAA;AACvD,IAAA,OAAO,mBAAmB,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;AAC7C;;ACLA;;AAEG;;;;"}
@@ -3,4 +3,8 @@ export * from '@taiga-ui/core/utils/format';
3
3
  export * from '@taiga-ui/core/utils/mask';
4
4
  export * from '@taiga-ui/core/utils/miscellaneous';
5
5
  export * from '@taiga-ui/core/utils/mobile';
6
+
7
+ /**
8
+ * Generated bundle index. Do not edit.
9
+ */
6
10
  //# sourceMappingURL=taiga-ui-core-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-utils.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"taiga-ui-core-utils.js","sources":["../../../projects/core/utils/taiga-ui-core-utils.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;;AAEG"}
@@ -14,4 +14,8 @@ export * from '@taiga-ui/core/services';
14
14
  export * from '@taiga-ui/core/tokens';
15
15
  export * from '@taiga-ui/core/types';
16
16
  export * from '@taiga-ui/core/utils';
17
+
18
+ /**
19
+ * Generated bundle index. Do not edit.
20
+ */
17
21
  //# sourceMappingURL=taiga-ui-core.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core.js","sources":["../../../projects/core/taiga-ui-core.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;AAEG"}
@@ -6,8 +6,10 @@ export declare type TuiAlertAutoClose = TuiHandler<TuiNotification | TuiNotifica
6
6
  export interface TuiAlertOptions<I> {
7
7
  readonly autoClose: TuiAlertAutoClose;
8
8
  readonly data: I;
9
+ /** @deprecated use autoClose instead **/
9
10
  readonly defaultAutoCloseTime: number;
10
11
  readonly hasCloseButton: boolean;
12
+ /** @deprecated use icon instead **/
11
13
  readonly hasIcon: boolean;
12
14
  readonly icon: PolymorpheusContent<TuiContextWithImplicit<TuiNotificationT>>;
13
15
  readonly label: PolymorpheusContent<TuiAlertOptions<I>>;
@@ -2,6 +2,17 @@ import { TuiDialog } from '@taiga-ui/cdk';
2
2
  import { TuiDialogSize } from '@taiga-ui/core/types';
3
3
  import { PolymorpheusContent } from '@tinkoff/ng-polymorpheus';
4
4
  import { Observable } from 'rxjs';
5
+ /**
6
+ * Options for a dialog
7
+ *
8
+ * size - size of the dialog ('m' by default)
9
+ * required - closing dialog throws (false by default)
10
+ * closeable - show close button (true by default)
11
+ * dismissible - close dialog by Esc button or click on overlay (true by default)
12
+ * label - string title for the dialog ('' by default)
13
+ * header - content above title ('' by default)
14
+ * data - arbitrary data for dialog (undefined by default)
15
+ */
5
16
  export interface TuiDialogOptions<I> {
6
17
  readonly appearance?: string;
7
18
  readonly closeable: Observable<boolean> | boolean;
@@ -1,9 +1,34 @@
1
1
  import { TuiRounding } from '@taiga-ui/cdk';
2
- import { TuiDecimalSymbol } from '@taiga-ui/core/types';
2
+ import { TuiDecimal, TuiDecimalSymbol } from '@taiga-ui/core/types';
3
+ /**
4
+ * Formatting configuration for displayed numbers
5
+ */
3
6
  export interface TuiNumberFormatSettings {
7
+ /**
8
+ * Number of digits of decimal part.
9
+ * @note Use `Infinity` to keep untouched.
10
+ */
4
11
  readonly decimalLimit: number;
12
+ /**
13
+ * Separator between the integer and the decimal part.
14
+ * @example 0,42 (',' by default)
15
+ */
5
16
  readonly decimalSeparator: TuiDecimalSymbol;
17
+ /**
18
+ * Rounding method.
19
+ */
6
20
  readonly rounding: TuiRounding;
21
+ /**
22
+ * Separator between thousands.
23
+ * @example 360 000 (' ' by default)
24
+ */
7
25
  readonly thousandSeparator: string;
26
+ /**
27
+ * Enable zeros at the end of decimal part.
28
+ */
8
29
  readonly zeroPadding: boolean;
30
+ /**
31
+ * Decimal part display mode. ('not-zero' by default)
32
+ */
33
+ readonly decimal?: TuiDecimal;
9
34
  }
@@ -1,2 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
1
4
  /// <amd-module name="@taiga-ui/core/interfaces" />
2
5
  export * from './index';
@@ -1,2 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
1
4
  /// <amd-module name="@taiga-ui/core/internal/primitive-year-month-pagination" />
2
5
  export * from './index';
@@ -1,2 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
1
4
  /// <amd-module name="@taiga-ui/core/internal/svg-defs-host" />
2
5
  export * from './index';
@@ -1,2 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
1
4
  /// <amd-module name="@taiga-ui/core/internal" />
2
5
  export * from './index';
@@ -1,2 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
1
4
  /// <amd-module name="@taiga-ui/core/mask" />
2
5
  export * from './index';
@@ -1,3 +1,8 @@
1
+ /**
2
+ * @deprecated Use {@link https://github.com/taiga-family/maskito Maskito}
3
+ * Link lies about config object having all the same configurations so separate interface is required
4
+ * {@link https://github.com/text-mask/text-mask/blob/master/componentDocumentation.md#pipe}
5
+ */
1
6
  export interface TuiTextMaskConfig {
2
7
  readonly currentCaretPosition?: number;
3
8
  readonly previousConformedValue?: string;
@@ -1 +1,4 @@
1
+ /**
2
+ * @deprecated Use {@link https://github.com/taiga-family/maskito Maskito}
3
+ */
1
4
  export declare type TuiTextMaskCorrectionHandler = (char: string, index: number) => string | null;
@@ -1,3 +1,6 @@
1
1
  import { TuiTextMaskConfig } from './text-mask-config';
2
2
  import { TuiTextMaskList } from './text-mask-list';
3
+ /**
4
+ * @deprecated Use {@link https://github.com/taiga-family/maskito Maskito}
5
+ */
3
6
  export declare type TuiTextMaskListHandler = (rawValue: string, config: TuiTextMaskConfig) => TuiTextMaskList | false;