@taiga-ui/core 2.51.0 → 2.53.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 (311) hide show
  1. package/bundles/taiga-ui-core-components-data-list.umd.js +1 -0
  2. package/bundles/taiga-ui-core-components-data-list.umd.js.map +1 -1
  3. package/bundles/taiga-ui-core-components-data-list.umd.min.js.map +1 -1
  4. package/bundles/taiga-ui-core-components-dialog.umd.js +1 -0
  5. package/bundles/taiga-ui-core-components-dialog.umd.js.map +1 -1
  6. package/bundles/taiga-ui-core-components-dialog.umd.min.js.map +1 -1
  7. package/bundles/taiga-ui-core-components-expand.umd.js +1 -1
  8. package/bundles/taiga-ui-core-components-expand.umd.js.map +1 -1
  9. package/bundles/taiga-ui-core-components-expand.umd.min.js +1 -1
  10. package/bundles/taiga-ui-core-components-expand.umd.min.js.map +1 -1
  11. package/bundles/taiga-ui-core-components-hints-host.umd.js +14 -20
  12. package/bundles/taiga-ui-core-components-hints-host.umd.js.map +1 -1
  13. package/bundles/taiga-ui-core-components-hints-host.umd.min.js +1 -1
  14. package/bundles/taiga-ui-core-components-hints-host.umd.min.js.map +1 -1
  15. package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js +1 -1
  16. package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js.map +1 -1
  17. package/bundles/taiga-ui-core-components-hosted-dropdown.umd.min.js +1 -1
  18. package/bundles/taiga-ui-core-components-hosted-dropdown.umd.min.js.map +1 -1
  19. package/bundles/taiga-ui-core-components-link.umd.js +1 -1
  20. package/bundles/taiga-ui-core-components-link.umd.min.js +1 -1
  21. package/bundles/taiga-ui-core-components-link.umd.min.js.map +1 -1
  22. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +3 -3
  23. package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
  24. package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js +1 -1
  25. package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js.map +1 -1
  26. package/bundles/taiga-ui-core-components-scrollbar.umd.js +1 -0
  27. package/bundles/taiga-ui-core-components-scrollbar.umd.js.map +1 -1
  28. package/bundles/taiga-ui-core-components-scrollbar.umd.min.js.map +1 -1
  29. package/bundles/taiga-ui-core-constants.umd.js +1 -1
  30. package/bundles/taiga-ui-core-constants.umd.js.map +1 -1
  31. package/bundles/taiga-ui-core-constants.umd.min.js +1 -1
  32. package/bundles/taiga-ui-core-constants.umd.min.js.map +1 -1
  33. package/bundles/taiga-ui-core-directives-described-by.umd.js +1 -0
  34. package/bundles/taiga-ui-core-directives-described-by.umd.js.map +1 -1
  35. package/bundles/taiga-ui-core-directives-described-by.umd.min.js.map +1 -1
  36. package/bundles/taiga-ui-core-directives-mask-accessor.umd.js +1 -0
  37. package/bundles/taiga-ui-core-directives-mask-accessor.umd.js.map +1 -1
  38. package/bundles/taiga-ui-core-directives-mask-accessor.umd.min.js.map +1 -1
  39. package/bundles/taiga-ui-core-directives-textfield-controller.umd.js +15 -0
  40. package/bundles/taiga-ui-core-directives-textfield-controller.umd.js.map +1 -1
  41. package/bundles/taiga-ui-core-directives-textfield-controller.umd.min.js +1 -1
  42. package/bundles/taiga-ui-core-directives-textfield-controller.umd.min.js.map +1 -1
  43. package/bundles/taiga-ui-core-observables.umd.js +9 -3
  44. package/bundles/taiga-ui-core-observables.umd.js.map +1 -1
  45. package/bundles/taiga-ui-core-observables.umd.min.js +1 -1
  46. package/bundles/taiga-ui-core-observables.umd.min.js.map +1 -1
  47. package/bundles/taiga-ui-core-providers.umd.js +18 -0
  48. package/bundles/taiga-ui-core-providers.umd.js.map +1 -1
  49. package/bundles/taiga-ui-core-providers.umd.min.js +1 -1
  50. package/bundles/taiga-ui-core-providers.umd.min.js.map +1 -1
  51. package/bundles/taiga-ui-core-utils-dom.umd.js +26 -0
  52. package/bundles/taiga-ui-core-utils-dom.umd.js.map +1 -1
  53. package/bundles/taiga-ui-core-utils-dom.umd.min.js +1 -1
  54. package/bundles/taiga-ui-core-utils-dom.umd.min.js.map +1 -1
  55. package/bundles/taiga-ui-core-utils-format.umd.js +33 -0
  56. package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
  57. package/bundles/taiga-ui-core-utils-format.umd.min.js +1 -1
  58. package/bundles/taiga-ui-core-utils-format.umd.min.js.map +1 -1
  59. package/bundles/taiga-ui-core-utils-mask.umd.js +12 -0
  60. package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
  61. package/bundles/taiga-ui-core-utils-mask.umd.min.js +1 -1
  62. package/bundles/taiga-ui-core-utils-mask.umd.min.js.map +1 -1
  63. package/bundles/taiga-ui-core-utils-miscellaneous.umd.js +30 -1
  64. package/bundles/taiga-ui-core-utils-miscellaneous.umd.js.map +1 -1
  65. package/bundles/taiga-ui-core-utils-miscellaneous.umd.min.js +1 -1
  66. package/bundles/taiga-ui-core-utils-miscellaneous.umd.min.js.map +1 -1
  67. package/bundles/taiga-ui-core-utils-mobile.umd.js +1 -1
  68. package/bundles/taiga-ui-core-utils-mobile.umd.js.map +1 -1
  69. package/bundles/taiga-ui-core-utils-mobile.umd.min.js +1 -1
  70. package/bundles/taiga-ui-core-utils-mobile.umd.min.js.map +1 -1
  71. package/bundles/taiga-ui-core-utils-polyfills.umd.js +1 -0
  72. package/bundles/taiga-ui-core-utils-polyfills.umd.js.map +1 -1
  73. package/bundles/taiga-ui-core-utils-polyfills.umd.min.js.map +1 -1
  74. package/components/data-list/taiga-ui-core-components-data-list.metadata.json +1 -1
  75. package/components/dialog/taiga-ui-core-components-dialog.metadata.json +1 -1
  76. package/components/expand/taiga-ui-core-components-expand.metadata.json +1 -1
  77. package/components/hints-host/hint-box/hint-box.component.d.ts +1 -0
  78. package/components/hints-host/hints-host.component.d.ts +4 -5
  79. package/components/hints-host/taiga-ui-core-components-hints-host.metadata.json +1 -1
  80. package/components/hosted-dropdown/taiga-ui-core-components-hosted-dropdown.metadata.json +1 -1
  81. package/components/link/taiga-ui-core-components-link.metadata.json +1 -1
  82. package/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.metadata.json +1 -1
  83. package/components/scrollbar/taiga-ui-core-components-scrollbar.metadata.json +1 -1
  84. package/constants/taiga-ui-core-constants.metadata.json +1 -1
  85. package/constants/version.d.ts +1 -1
  86. package/directives/described-by/taiga-ui-core-directives-described-by.metadata.json +1 -1
  87. package/directives/mask-accessor/taiga-ui-core-directives-mask-accessor.metadata.json +1 -1
  88. package/directives/textfield-controller/taiga-ui-core-directives-textfield-controller.metadata.json +1 -1
  89. package/directives/textfield-controller/textfield-controller.provider.d.ts +4 -0
  90. package/esm2015/components/data-list/option/option.component.js +2 -1
  91. package/esm2015/components/dialog/dialog.providers.js +2 -1
  92. package/esm2015/components/expand/expand.component.js +2 -2
  93. package/esm2015/components/hints-host/hint-box/hint-box.component.js +8 -2
  94. package/esm2015/components/hints-host/hint-box/hint-box.module.js +3 -2
  95. package/esm2015/components/hints-host/hints-host.component.js +4 -9
  96. package/esm2015/components/hints-host/hints-host.module.js +3 -9
  97. package/esm2015/components/hosted-dropdown/hosted-dropdown.component.js +2 -2
  98. package/esm2015/components/link/link.component.js +1 -1
  99. package/esm2015/components/primitive-textfield/primitive-textfield.component.js +2 -2
  100. package/esm2015/components/primitive-textfield/value-decoration/value-decoration.component.js +3 -3
  101. package/esm2015/components/scrollbar/scrollbar.component.js +2 -1
  102. package/esm2015/constants/version.js +2 -2
  103. package/esm2015/directives/described-by/described-by.providers.js +2 -1
  104. package/esm2015/directives/mask-accessor/mask-accessor.directive.js +2 -1
  105. package/esm2015/directives/textfield-controller/textfield-autocomplete.directive.js +2 -1
  106. package/esm2015/directives/textfield-controller/textfield-cleaner.directive.js +2 -1
  107. package/esm2015/directives/textfield-controller/textfield-controller.provider.js +6 -1
  108. package/esm2015/directives/textfield-controller/textfield-custom-content.directive.js +2 -1
  109. package/esm2015/directives/textfield-controller/textfield-example-text.directive.js +2 -1
  110. package/esm2015/directives/textfield-controller/textfield-input-mode.directive.js +2 -1
  111. package/esm2015/directives/textfield-controller/textfield-label-outside.directive.js +2 -1
  112. package/esm2015/directives/textfield-controller/textfield-max-length.directive.js +2 -1
  113. package/esm2015/directives/textfield-controller/textfield-size.directive.js +2 -1
  114. package/esm2015/directives/textfield-controller/textfield-type.directive.js +2 -1
  115. package/esm2015/interfaces/hint.js +1 -0
  116. package/esm2015/interfaces/index.js +1 -1
  117. package/esm2015/observables/smart-search.js +8 -3
  118. package/esm2015/providers/is-mobile-resolution.provider.js +6 -1
  119. package/esm2015/providers/mode.provider.js +6 -1
  120. package/esm2015/providers/watched-controller-provider-factory.js +6 -1
  121. package/esm2015/utils/dom/are-css-vars-supported.js +4 -1
  122. package/esm2015/utils/dom/check-fixed-position.js +6 -1
  123. package/esm2015/utils/dom/get-safe-area-size.js +4 -1
  124. package/esm2015/utils/dom/get-screen-width.js +6 -1
  125. package/esm2015/utils/dom/process-icon.js +6 -1
  126. package/esm2015/utils/format/capitalize-first-letter.js +6 -1
  127. package/esm2015/utils/format/capitalize.js +4 -1
  128. package/esm2015/utils/format/format-number.js +4 -1
  129. package/esm2015/utils/format/format-phone.js +4 -1
  130. package/esm2015/utils/format/get-fractional-part-padded.js +4 -1
  131. package/esm2015/utils/format/number-to-string-without-exp.js +4 -1
  132. package/esm2015/utils/format/other-decimal-symbol.js +6 -1
  133. package/esm2015/utils/format/pluralize.js +2 -1
  134. package/esm2015/utils/mask/masked-money-value-is-empty.js +6 -1
  135. package/esm2015/utils/mask/masked-number-string-to-number.js +6 -1
  136. package/esm2015/utils/miscellaneous/color-fallback.js +5 -2
  137. package/esm2015/utils/miscellaneous/get-border.js +6 -1
  138. package/esm2015/utils/miscellaneous/icons-path-factory.js +6 -1
  139. package/esm2015/utils/miscellaneous/is-editing-key.js +4 -1
  140. package/esm2015/utils/miscellaneous/is-presumed-html-string.js +6 -1
  141. package/esm2015/utils/miscellaneous/size-bigger.js +4 -1
  142. package/esm2015/utils/mobile/is-mobile.js +2 -2
  143. package/esm2015/utils/polyfills/inner-html.js +2 -1
  144. package/esm5/components/data-list/option/option.component.js +2 -1
  145. package/esm5/components/dialog/dialog.providers.js +2 -1
  146. package/esm5/components/expand/expand.component.js +2 -2
  147. package/esm5/components/hints-host/hint-box/hint-box.component.js +8 -2
  148. package/esm5/components/hints-host/hint-box/hint-box.module.js +3 -2
  149. package/esm5/components/hints-host/hints-host.component.js +4 -9
  150. package/esm5/components/hints-host/hints-host.module.js +3 -9
  151. package/esm5/components/hosted-dropdown/hosted-dropdown.component.js +2 -2
  152. package/esm5/components/link/link.component.js +1 -1
  153. package/esm5/components/primitive-textfield/primitive-textfield.component.js +2 -2
  154. package/esm5/components/primitive-textfield/value-decoration/value-decoration.component.js +3 -3
  155. package/esm5/components/scrollbar/scrollbar.component.js +2 -1
  156. package/esm5/constants/version.js +2 -2
  157. package/esm5/directives/described-by/described-by.providers.js +2 -1
  158. package/esm5/directives/mask-accessor/mask-accessor.directive.js +2 -1
  159. package/esm5/directives/textfield-controller/textfield-autocomplete.directive.js +2 -1
  160. package/esm5/directives/textfield-controller/textfield-cleaner.directive.js +2 -1
  161. package/esm5/directives/textfield-controller/textfield-controller.provider.js +6 -1
  162. package/esm5/directives/textfield-controller/textfield-custom-content.directive.js +2 -1
  163. package/esm5/directives/textfield-controller/textfield-example-text.directive.js +2 -1
  164. package/esm5/directives/textfield-controller/textfield-input-mode.directive.js +2 -1
  165. package/esm5/directives/textfield-controller/textfield-label-outside.directive.js +2 -1
  166. package/esm5/directives/textfield-controller/textfield-max-length.directive.js +2 -1
  167. package/esm5/directives/textfield-controller/textfield-size.directive.js +2 -1
  168. package/esm5/directives/textfield-controller/textfield-type.directive.js +2 -1
  169. package/esm5/interfaces/hint.js +1 -0
  170. package/esm5/interfaces/index.js +1 -1
  171. package/esm5/observables/smart-search.js +9 -4
  172. package/esm5/providers/is-mobile-resolution.provider.js +6 -1
  173. package/esm5/providers/mode.provider.js +6 -1
  174. package/esm5/providers/watched-controller-provider-factory.js +6 -1
  175. package/esm5/utils/dom/are-css-vars-supported.js +4 -1
  176. package/esm5/utils/dom/check-fixed-position.js +6 -1
  177. package/esm5/utils/dom/get-safe-area-size.js +4 -1
  178. package/esm5/utils/dom/get-screen-width.js +6 -1
  179. package/esm5/utils/dom/process-icon.js +6 -1
  180. package/esm5/utils/format/capitalize-first-letter.js +6 -1
  181. package/esm5/utils/format/capitalize.js +4 -1
  182. package/esm5/utils/format/format-number.js +4 -1
  183. package/esm5/utils/format/format-phone.js +4 -1
  184. package/esm5/utils/format/get-fractional-part-padded.js +4 -1
  185. package/esm5/utils/format/number-to-string-without-exp.js +4 -1
  186. package/esm5/utils/format/other-decimal-symbol.js +6 -1
  187. package/esm5/utils/format/pluralize.js +2 -1
  188. package/esm5/utils/mask/masked-money-value-is-empty.js +6 -1
  189. package/esm5/utils/mask/masked-number-string-to-number.js +6 -1
  190. package/esm5/utils/miscellaneous/color-fallback.js +5 -2
  191. package/esm5/utils/miscellaneous/get-border.js +6 -1
  192. package/esm5/utils/miscellaneous/icons-path-factory.js +6 -1
  193. package/esm5/utils/miscellaneous/is-editing-key.js +4 -1
  194. package/esm5/utils/miscellaneous/is-presumed-html-string.js +6 -1
  195. package/esm5/utils/miscellaneous/size-bigger.js +4 -1
  196. package/esm5/utils/mobile/is-mobile.js +2 -2
  197. package/esm5/utils/polyfills/inner-html.js +2 -1
  198. package/fesm2015/taiga-ui-core-components-data-list.js +1 -0
  199. package/fesm2015/taiga-ui-core-components-data-list.js.map +1 -1
  200. package/fesm2015/taiga-ui-core-components-dialog.js +1 -0
  201. package/fesm2015/taiga-ui-core-components-dialog.js.map +1 -1
  202. package/fesm2015/taiga-ui-core-components-expand.js +1 -1
  203. package/fesm2015/taiga-ui-core-components-expand.js.map +1 -1
  204. package/fesm2015/taiga-ui-core-components-hints-host.js +11 -17
  205. package/fesm2015/taiga-ui-core-components-hints-host.js.map +1 -1
  206. package/fesm2015/taiga-ui-core-components-hosted-dropdown.js +1 -1
  207. package/fesm2015/taiga-ui-core-components-hosted-dropdown.js.map +1 -1
  208. package/fesm2015/taiga-ui-core-components-link.js +1 -1
  209. package/fesm2015/taiga-ui-core-components-primitive-textfield.js +3 -3
  210. package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
  211. package/fesm2015/taiga-ui-core-components-scrollbar.js +1 -0
  212. package/fesm2015/taiga-ui-core-components-scrollbar.js.map +1 -1
  213. package/fesm2015/taiga-ui-core-constants.js +1 -1
  214. package/fesm2015/taiga-ui-core-constants.js.map +1 -1
  215. package/fesm2015/taiga-ui-core-directives-described-by.js +1 -0
  216. package/fesm2015/taiga-ui-core-directives-described-by.js.map +1 -1
  217. package/fesm2015/taiga-ui-core-directives-mask-accessor.js +1 -0
  218. package/fesm2015/taiga-ui-core-directives-mask-accessor.js.map +1 -1
  219. package/fesm2015/taiga-ui-core-directives-textfield-controller.js +15 -1
  220. package/fesm2015/taiga-ui-core-directives-textfield-controller.js.map +1 -1
  221. package/fesm2015/taiga-ui-core-observables.js +8 -3
  222. package/fesm2015/taiga-ui-core-observables.js.map +1 -1
  223. package/fesm2015/taiga-ui-core-providers.js +16 -1
  224. package/fesm2015/taiga-ui-core-providers.js.map +1 -1
  225. package/fesm2015/taiga-ui-core-utils-dom.js +22 -1
  226. package/fesm2015/taiga-ui-core-utils-dom.js.map +1 -1
  227. package/fesm2015/taiga-ui-core-utils-format.js +27 -1
  228. package/fesm2015/taiga-ui-core-utils-format.js.map +1 -1
  229. package/fesm2015/taiga-ui-core-utils-mask.js +11 -1
  230. package/fesm2015/taiga-ui-core-utils-mask.js.map +1 -1
  231. package/fesm2015/taiga-ui-core-utils-miscellaneous.js +26 -2
  232. package/fesm2015/taiga-ui-core-utils-miscellaneous.js.map +1 -1
  233. package/fesm2015/taiga-ui-core-utils-mobile.js +1 -1
  234. package/fesm2015/taiga-ui-core-utils-mobile.js.map +1 -1
  235. package/fesm2015/taiga-ui-core-utils-polyfills.js +1 -0
  236. package/fesm2015/taiga-ui-core-utils-polyfills.js.map +1 -1
  237. package/fesm5/taiga-ui-core-components-data-list.js +1 -0
  238. package/fesm5/taiga-ui-core-components-data-list.js.map +1 -1
  239. package/fesm5/taiga-ui-core-components-dialog.js +1 -0
  240. package/fesm5/taiga-ui-core-components-dialog.js.map +1 -1
  241. package/fesm5/taiga-ui-core-components-expand.js +1 -1
  242. package/fesm5/taiga-ui-core-components-expand.js.map +1 -1
  243. package/fesm5/taiga-ui-core-components-hints-host.js +11 -17
  244. package/fesm5/taiga-ui-core-components-hints-host.js.map +1 -1
  245. package/fesm5/taiga-ui-core-components-hosted-dropdown.js +1 -1
  246. package/fesm5/taiga-ui-core-components-hosted-dropdown.js.map +1 -1
  247. package/fesm5/taiga-ui-core-components-link.js +1 -1
  248. package/fesm5/taiga-ui-core-components-primitive-textfield.js +3 -3
  249. package/fesm5/taiga-ui-core-components-primitive-textfield.js.map +1 -1
  250. package/fesm5/taiga-ui-core-components-scrollbar.js +1 -0
  251. package/fesm5/taiga-ui-core-components-scrollbar.js.map +1 -1
  252. package/fesm5/taiga-ui-core-constants.js +1 -1
  253. package/fesm5/taiga-ui-core-constants.js.map +1 -1
  254. package/fesm5/taiga-ui-core-directives-described-by.js +1 -0
  255. package/fesm5/taiga-ui-core-directives-described-by.js.map +1 -1
  256. package/fesm5/taiga-ui-core-directives-mask-accessor.js +1 -0
  257. package/fesm5/taiga-ui-core-directives-mask-accessor.js.map +1 -1
  258. package/fesm5/taiga-ui-core-directives-textfield-controller.js +15 -1
  259. package/fesm5/taiga-ui-core-directives-textfield-controller.js.map +1 -1
  260. package/fesm5/taiga-ui-core-observables.js +9 -4
  261. package/fesm5/taiga-ui-core-observables.js.map +1 -1
  262. package/fesm5/taiga-ui-core-providers.js +16 -1
  263. package/fesm5/taiga-ui-core-providers.js.map +1 -1
  264. package/fesm5/taiga-ui-core-utils-dom.js +22 -1
  265. package/fesm5/taiga-ui-core-utils-dom.js.map +1 -1
  266. package/fesm5/taiga-ui-core-utils-format.js +27 -1
  267. package/fesm5/taiga-ui-core-utils-format.js.map +1 -1
  268. package/fesm5/taiga-ui-core-utils-mask.js +11 -1
  269. package/fesm5/taiga-ui-core-utils-mask.js.map +1 -1
  270. package/fesm5/taiga-ui-core-utils-miscellaneous.js +26 -2
  271. package/fesm5/taiga-ui-core-utils-miscellaneous.js.map +1 -1
  272. package/fesm5/taiga-ui-core-utils-mobile.js +1 -1
  273. package/fesm5/taiga-ui-core-utils-mobile.js.map +1 -1
  274. package/fesm5/taiga-ui-core-utils-polyfills.js +1 -0
  275. package/fesm5/taiga-ui-core-utils-polyfills.js.map +1 -1
  276. package/interfaces/hint.d.ts +7 -0
  277. package/interfaces/index.d.ts +1 -0
  278. package/interfaces/taiga-ui-core-interfaces.metadata.json +1 -1
  279. package/observables/smart-search.d.ts +5 -1
  280. package/observables/taiga-ui-core-observables.metadata.json +1 -1
  281. package/package.json +4 -4
  282. package/providers/is-mobile-resolution.provider.d.ts +4 -0
  283. package/providers/mode.provider.d.ts +4 -0
  284. package/providers/taiga-ui-core-providers.metadata.json +1 -1
  285. package/providers/watched-controller-provider-factory.d.ts +4 -0
  286. package/styles/mixins/mixins.less +2 -2
  287. package/utils/dom/are-css-vars-supported.d.ts +2 -0
  288. package/utils/dom/check-fixed-position.d.ts +4 -0
  289. package/utils/dom/get-safe-area-size.d.ts +2 -0
  290. package/utils/dom/get-screen-width.d.ts +4 -0
  291. package/utils/dom/process-icon.d.ts +4 -0
  292. package/utils/dom/taiga-ui-core-utils-dom.metadata.json +1 -1
  293. package/utils/format/capitalize-first-letter.d.ts +4 -0
  294. package/utils/format/capitalize.d.ts +2 -0
  295. package/utils/format/format-number.d.ts +2 -0
  296. package/utils/format/format-phone.d.ts +2 -0
  297. package/utils/format/get-fractional-part-padded.d.ts +2 -0
  298. package/utils/format/number-to-string-without-exp.d.ts +2 -0
  299. package/utils/format/other-decimal-symbol.d.ts +4 -0
  300. package/utils/format/taiga-ui-core-utils-format.metadata.json +1 -1
  301. package/utils/mask/masked-money-value-is-empty.d.ts +4 -0
  302. package/utils/mask/masked-number-string-to-number.d.ts +4 -0
  303. package/utils/mask/taiga-ui-core-utils-mask.metadata.json +1 -1
  304. package/utils/miscellaneous/color-fallback.d.ts +3 -1
  305. package/utils/miscellaneous/get-border.d.ts +4 -0
  306. package/utils/miscellaneous/icons-path-factory.d.ts +4 -0
  307. package/utils/miscellaneous/is-editing-key.d.ts +2 -0
  308. package/utils/miscellaneous/is-presumed-html-string.d.ts +4 -0
  309. package/utils/miscellaneous/size-bigger.d.ts +2 -0
  310. package/utils/miscellaneous/taiga-ui-core-utils-miscellaneous.metadata.json +1 -1
  311. package/utils/mobile/taiga-ui-core-utils-mobile.metadata.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-directives-mask-accessor.js","sources":["ng://@taiga-ui/core/directives/mask-accessor/mask-accessor.directive.ts","ng://@taiga-ui/core/directives/mask-accessor/mask-accessor.module.ts","ng://@taiga-ui/core/directives/mask-accessor/taiga-ui-core-directives-mask-accessor.ts"],"sourcesContent":["import {Directive, Optional} from '@angular/core';\nimport {\n ControlValueAccessor,\n DefaultValueAccessor,\n NG_VALUE_ACCESSOR,\n} from '@angular/forms';\nimport {TUI_VALUE_ACCESSOR} from '@taiga-ui/core/tokens';\n\nexport function fallbackAccessorFactory(\n accessor: readonly ControlValueAccessor[] | null,\n fallback: ControlValueAccessor,\n): ControlValueAccessor {\n return accessor ? accessor[0] : fallback;\n}\n\n@Directive({\n selector: 'input[tuiMaskAccessor]',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n deps: [[new Optional(), TUI_VALUE_ACCESSOR], DefaultValueAccessor],\n useFactory: fallbackAccessorFactory,\n multi: true,\n },\n ],\n})\nexport class TuiMaskAccessorDirective {}\n","import {NgModule} from '@angular/core';\n\nimport {TuiMaskAccessorDirective} from './mask-accessor.directive';\n\n/**\n * @internal\n */\n@NgModule({\n declarations: [TuiMaskAccessorDirective],\n exports: [TuiMaskAccessorDirective],\n})\nexport class TuiMaskAccessorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;SAQgB,uBAAuB,CACnC,QAAgD,EAChD,QAA8B;IAE9B,OAAO,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC;AAC7C,CAAC;IAaY,wBAAwB,GAArC,MAAa,wBAAwB;EAAG;AAA3B,wBAAwB;IAXpC,SAAS,CAAC;QACP,QAAQ,EAAE,wBAAwB;QAClC,SAAS,EAAE;YACP;gBACI,OAAO,EAAE,iBAAiB;gBAC1B,IAAI,EAAE,CAAC,CAAC,IAAI,QAAQ,EAAE,EAAE,kBAAkB,CAAC,EAAE,oBAAoB,CAAC;gBAClE,UAAU,EAAE,uBAAuB;gBACnC,KAAK,EAAE,IAAI;aACd;SACJ;KACJ,CAAC;GACW,wBAAwB,CAAG;;ACtBxC;;;IAOa,qBAAqB,GAAlC,MAAa,qBAAqB;EAAG;AAAxB,qBAAqB;IAJjC,QAAQ,CAAC;QACN,YAAY,EAAE,CAAC,wBAAwB,CAAC;QACxC,OAAO,EAAE,CAAC,wBAAwB,CAAC;KACtC,CAAC;GACW,qBAAqB,CAAG;;ACXrC;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-directives-mask-accessor.js","sources":["ng://@taiga-ui/core/directives/mask-accessor/mask-accessor.directive.ts","ng://@taiga-ui/core/directives/mask-accessor/mask-accessor.module.ts","ng://@taiga-ui/core/directives/mask-accessor/taiga-ui-core-directives-mask-accessor.ts"],"sourcesContent":["import {Directive, Optional} from '@angular/core';\nimport {\n ControlValueAccessor,\n DefaultValueAccessor,\n NG_VALUE_ACCESSOR,\n} from '@angular/forms';\nimport {TUI_VALUE_ACCESSOR} from '@taiga-ui/core/tokens';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function fallbackAccessorFactory(\n accessor: readonly ControlValueAccessor[] | null,\n fallback: ControlValueAccessor,\n): ControlValueAccessor {\n return accessor ? accessor[0] : fallback;\n}\n\n@Directive({\n selector: 'input[tuiMaskAccessor]',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n deps: [[new Optional(), TUI_VALUE_ACCESSOR], DefaultValueAccessor],\n useFactory: fallbackAccessorFactory,\n multi: true,\n },\n ],\n})\nexport class TuiMaskAccessorDirective {}\n","import {NgModule} from '@angular/core';\n\nimport {TuiMaskAccessorDirective} from './mask-accessor.directive';\n\n/**\n * @internal\n */\n@NgModule({\n declarations: [TuiMaskAccessorDirective],\n exports: [TuiMaskAccessorDirective],\n})\nexport class TuiMaskAccessorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAQA;SACgB,uBAAuB,CACnC,QAAgD,EAChD,QAA8B;IAE9B,OAAO,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC;AAC7C,CAAC;IAaY,wBAAwB,GAArC,MAAa,wBAAwB;EAAG;AAA3B,wBAAwB;IAXpC,SAAS,CAAC;QACP,QAAQ,EAAE,wBAAwB;QAClC,SAAS,EAAE;YACP;gBACI,OAAO,EAAE,iBAAiB;gBAC1B,IAAI,EAAE,CAAC,CAAC,IAAI,QAAQ,EAAE,EAAE,kBAAkB,CAAC,EAAE,oBAAoB,CAAC;gBAClE,UAAU,EAAE,uBAAuB;gBACnC,KAAK,EAAE,IAAI;aACd;SACJ;KACJ,CAAC;GACW,wBAAwB,CAAG;;ACvBxC;;;IAOa,qBAAqB,GAAlC,MAAa,qBAAqB;EAAG;AAAxB,qBAAqB;IAJjC,QAAQ,CAAC;QACN,YAAY,EAAE,CAAC,wBAAwB,CAAC;QACxC,OAAO,EAAE,CAAC,wBAAwB,CAAC;KACtC,CAAC;GACW,qBAAqB,CAAG;;ACXrC;;;;;;"}
@@ -70,6 +70,7 @@ TuiTextfieldAutocompleteDirective = TuiTextfieldAutocompleteDirective_1 = __deco
70
70
  ],
71
71
  })
72
72
  ], TuiTextfieldAutocompleteDirective);
73
+ // eslint-disable-next-line @typescript-eslint/naming-convention
73
74
  function autocompleteDirectiveFactory() {
74
75
  return new TuiTextfieldAutocompleteDirective();
75
76
  }
@@ -98,6 +99,7 @@ TuiTextfieldCleanerDirective = TuiTextfieldCleanerDirective_1 = __decorate([
98
99
  ],
99
100
  })
100
101
  ], TuiTextfieldCleanerDirective);
102
+ // eslint-disable-next-line @typescript-eslint/naming-convention
101
103
  function cleanerDirectiveFactory() {
102
104
  return new TuiTextfieldCleanerDirective();
103
105
  }
@@ -127,6 +129,7 @@ TuiTextfieldCustomContentDirective = TuiTextfieldCustomContentDirective_1 = __de
127
129
  ],
128
130
  })
129
131
  ], TuiTextfieldCustomContentDirective);
132
+ // eslint-disable-next-line @typescript-eslint/naming-convention
130
133
  function customContentDirectiveFactory() {
131
134
  return new TuiTextfieldCustomContentDirective();
132
135
  }
@@ -155,6 +158,7 @@ TuiTextfieldExampleTextDirective = TuiTextfieldExampleTextDirective_1 = __decora
155
158
  ],
156
159
  })
157
160
  ], TuiTextfieldExampleTextDirective);
161
+ // eslint-disable-next-line @typescript-eslint/naming-convention
158
162
  function exampleTextDirectiveFactory() {
159
163
  return new TuiTextfieldExampleTextDirective();
160
164
  }
@@ -183,6 +187,7 @@ TuiTextfieldInputModeDirective = TuiTextfieldInputModeDirective_1 = __decorate([
183
187
  ],
184
188
  })
185
189
  ], TuiTextfieldInputModeDirective);
190
+ // eslint-disable-next-line @typescript-eslint/naming-convention
186
191
  function inputModeDirectiveFactory() {
187
192
  return new TuiTextfieldInputModeDirective();
188
193
  }
@@ -211,6 +216,7 @@ TuiTextfieldLabelOutsideDirective = TuiTextfieldLabelOutsideDirective_1 = __deco
211
216
  ],
212
217
  })
213
218
  ], TuiTextfieldLabelOutsideDirective);
219
+ // eslint-disable-next-line @typescript-eslint/naming-convention
214
220
  function labelOutsideDirectiveFactory() {
215
221
  return new TuiTextfieldLabelOutsideDirective();
216
222
  }
@@ -239,6 +245,7 @@ TuiTextfieldMaxLengthDirective = TuiTextfieldMaxLengthDirective_1 = __decorate([
239
245
  ],
240
246
  })
241
247
  ], TuiTextfieldMaxLengthDirective);
248
+ // eslint-disable-next-line @typescript-eslint/naming-convention
242
249
  function maxLengthDirectiveFactory() {
243
250
  return new TuiTextfieldMaxLengthDirective();
244
251
  }
@@ -267,6 +274,7 @@ TuiTextfieldSizeDirective = TuiTextfieldSizeDirective_1 = __decorate([
267
274
  ],
268
275
  })
269
276
  ], TuiTextfieldSizeDirective);
277
+ // eslint-disable-next-line @typescript-eslint/naming-convention
270
278
  function sizeDirectiveFactory() {
271
279
  return new TuiTextfieldSizeDirective();
272
280
  }
@@ -295,6 +303,7 @@ TuiTextfieldTypeDirective = TuiTextfieldTypeDirective_1 = __decorate([
295
303
  ],
296
304
  })
297
305
  ], TuiTextfieldTypeDirective);
306
+ // eslint-disable-next-line @typescript-eslint/naming-convention
298
307
  function typeDirectiveFactory() {
299
308
  return new TuiTextfieldTypeDirective();
300
309
  }
@@ -329,6 +338,10 @@ TuiTextfieldControllerModule = __decorate([
329
338
  ], TuiTextfieldControllerModule);
330
339
 
331
340
  const TUI_TEXTFIELD_WATCHED_CONTROLLER = new InjectionToken('watched textfield controller');
341
+ /**
342
+ * @deprecated: use {@link tuiTextfieldWatchedControllerFactory} instead
343
+ */
344
+ // eslint-disable-next-line @typescript-eslint/naming-convention
332
345
  function textfieldWatchedControllerFactory(changeDetectorRef, destroy$, ...controllers) {
333
346
  const change$ = merge(...controllers.map(({ change$ }) => change$ || NEVER)).pipe(watch(changeDetectorRef), takeUntil(destroy$));
334
347
  change$.subscribe();
@@ -354,10 +367,11 @@ const TEXTFIELD_CONTROLLER_PROVIDER = [
354
367
  useFactory: textfieldWatchedControllerFactory,
355
368
  },
356
369
  ];
370
+ const tuiTextfieldWatchedControllerFactory = textfieldWatchedControllerFactory;
357
371
 
358
372
  /**
359
373
  * Generated bundle index. Do not edit.
360
374
  */
361
375
 
362
- export { TEXTFIELD_CONTROLLER_PROVIDER, TUI_TEXTFIELD_AUTOCOMPLETE, TUI_TEXTFIELD_CLEANER, TUI_TEXTFIELD_CUSTOM_CONTENT, TUI_TEXTFIELD_EXAMPLE_TEXT, TUI_TEXTFIELD_INPUT_MODE, TUI_TEXTFIELD_LABEL_OUTSIDE, TUI_TEXTFIELD_MAX_LENGTH, TUI_TEXTFIELD_SIZE, TUI_TEXTFIELD_TYPE, TUI_TEXTFIELD_WATCHED_CONTROLLER, TuiTextfieldAutocompleteDirective, TuiTextfieldCleanerDirective, TuiTextfieldController, TuiTextfieldControllerModule, TuiTextfieldCustomContentDirective, TuiTextfieldExampleTextDirective, TuiTextfieldInputModeDirective, TuiTextfieldLabelOutsideDirective, TuiTextfieldMaxLengthDirective, TuiTextfieldSizeDirective, TuiTextfieldTypeDirective, autocompleteDirectiveFactory, cleanerDirectiveFactory, customContentDirectiveFactory, exampleTextDirectiveFactory, inputModeDirectiveFactory, labelOutsideDirectiveFactory, maxLengthDirectiveFactory, sizeDirectiveFactory, textfieldWatchedControllerFactory, typeDirectiveFactory };
376
+ export { TEXTFIELD_CONTROLLER_PROVIDER, TUI_TEXTFIELD_AUTOCOMPLETE, TUI_TEXTFIELD_CLEANER, TUI_TEXTFIELD_CUSTOM_CONTENT, TUI_TEXTFIELD_EXAMPLE_TEXT, TUI_TEXTFIELD_INPUT_MODE, TUI_TEXTFIELD_LABEL_OUTSIDE, TUI_TEXTFIELD_MAX_LENGTH, TUI_TEXTFIELD_SIZE, TUI_TEXTFIELD_TYPE, TUI_TEXTFIELD_WATCHED_CONTROLLER, TuiTextfieldAutocompleteDirective, TuiTextfieldCleanerDirective, TuiTextfieldController, TuiTextfieldControllerModule, TuiTextfieldCustomContentDirective, TuiTextfieldExampleTextDirective, TuiTextfieldInputModeDirective, TuiTextfieldLabelOutsideDirective, TuiTextfieldMaxLengthDirective, TuiTextfieldSizeDirective, TuiTextfieldTypeDirective, autocompleteDirectiveFactory, cleanerDirectiveFactory, customContentDirectiveFactory, exampleTextDirectiveFactory, inputModeDirectiveFactory, labelOutsideDirectiveFactory, maxLengthDirectiveFactory, sizeDirectiveFactory, textfieldWatchedControllerFactory, tuiTextfieldWatchedControllerFactory, typeDirectiveFactory };
363
377
  //# sourceMappingURL=taiga-ui-core-directives-textfield-controller.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-directives-textfield-controller.js","sources":["ng://@taiga-ui/core/directives/textfield-controller/textfield.controller.ts","ng://@taiga-ui/core/directives/textfield-controller/textfield-autocomplete.directive.ts","ng://@taiga-ui/core/directives/textfield-controller/textfield-cleaner.directive.ts","ng://@taiga-ui/core/directives/textfield-controller/textfield-custom-content.directive.ts","ng://@taiga-ui/core/directives/textfield-controller/textfield-example-text.directive.ts","ng://@taiga-ui/core/directives/textfield-controller/textfield-input-mode.directive.ts","ng://@taiga-ui/core/directives/textfield-controller/textfield-label-outside.directive.ts","ng://@taiga-ui/core/directives/textfield-controller/textfield-max-length.directive.ts","ng://@taiga-ui/core/directives/textfield-controller/textfield-size.directive.ts","ng://@taiga-ui/core/directives/textfield-controller/textfield-type.directive.ts","ng://@taiga-ui/core/directives/textfield-controller/textfield-controller.module.ts","ng://@taiga-ui/core/directives/textfield-controller/textfield-controller.provider.ts","ng://@taiga-ui/core/directives/textfield-controller/taiga-ui-core-directives-textfield-controller.ts"],"sourcesContent":["import {TuiAutofillFieldName, TuiInputModeT, TuiInputTypeT} from '@taiga-ui/cdk';\nimport {TuiSizeL, TuiSizeS} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\nimport {TuiTextfieldAutocompleteDirective} from './textfield-autocomplete.directive';\nimport {TuiTextfieldCleanerDirective} from './textfield-cleaner.directive';\nimport {TuiTextfieldCustomContentDirective} from './textfield-custom-content.directive';\nimport {TuiTextfieldExampleTextDirective} from './textfield-example-text.directive';\nimport {TuiTextfieldInputModeDirective} from './textfield-input-mode.directive';\nimport {TuiTextfieldLabelOutsideDirective} from './textfield-label-outside.directive';\nimport {TuiTextfieldMaxLengthDirective} from './textfield-max-length.directive';\nimport {TuiTextfieldSizeDirective} from './textfield-size.directive';\nimport {TuiTextfieldTypeDirective} from './textfield-type.directive';\n\nexport class TuiTextfieldController {\n constructor(\n readonly change$: Observable<void>,\n private readonly autocompleteDirective: TuiTextfieldAutocompleteDirective,\n private readonly cleanerDirective: TuiTextfieldCleanerDirective,\n private readonly customContentDirective: TuiTextfieldCustomContentDirective,\n private readonly exampleTextDirective: TuiTextfieldExampleTextDirective,\n private readonly inputModeDirective: TuiTextfieldInputModeDirective,\n private readonly labelOutsideDirective: TuiTextfieldLabelOutsideDirective,\n private readonly maxLengthDirective: TuiTextfieldMaxLengthDirective,\n private readonly sizeDirective: TuiTextfieldSizeDirective,\n private readonly typeDirective: TuiTextfieldTypeDirective,\n ) {}\n\n get autocomplete(): TuiAutofillFieldName | '' {\n return this.autocompleteDirective.autocomplete;\n }\n\n get cleaner(): boolean {\n return this.cleanerDirective.cleaner;\n }\n\n get customContent(): PolymorpheusContent {\n return this.customContentDirective.customContent || '';\n }\n\n get exampleText(): string {\n return this.exampleTextDirective.exampleText;\n }\n\n get inputMode(): TuiInputModeT {\n return this.inputModeDirective.inputMode;\n }\n\n get labelOutside(): boolean {\n return this.labelOutsideDirective.labelOutside;\n }\n\n get maxLength(): number | null {\n return this.maxLengthDirective.maxLength;\n }\n\n get size(): TuiSizeS | TuiSizeL {\n return this.sizeDirective.size;\n }\n\n get type(): TuiInputTypeT {\n return this.typeDirective.type;\n }\n}\n","import {Directive, forwardRef, InjectionToken, Input} from '@angular/core';\nimport {TuiAutofillFieldName, TuiController} from '@taiga-ui/cdk';\n\nexport const TUI_TEXTFIELD_AUTOCOMPLETE =\n new InjectionToken<TuiTextfieldAutocompleteDirective>('tuiTextfieldAutocomplete', {\n factory: autocompleteDirectiveFactory,\n });\n\n@Directive({\n selector: '[tuiTextfieldAutocomplete]',\n providers: [\n {\n provide: TUI_TEXTFIELD_AUTOCOMPLETE,\n useExisting: forwardRef(() => TuiTextfieldAutocompleteDirective),\n },\n ],\n})\nexport class TuiTextfieldAutocompleteDirective extends TuiController {\n @Input('tuiTextfieldAutocomplete')\n autocomplete: TuiAutofillFieldName | '' = '';\n}\n\nexport function autocompleteDirectiveFactory(): TuiTextfieldAutocompleteDirective {\n return new TuiTextfieldAutocompleteDirective();\n}\n","import {Directive, forwardRef, InjectionToken, Input} from '@angular/core';\nimport {TuiController} from '@taiga-ui/cdk';\n\nexport const TUI_TEXTFIELD_CLEANER = new InjectionToken<TuiTextfieldCleanerDirective>(\n 'tuiTextfieldCleaner',\n {\n factory: cleanerDirectiveFactory,\n },\n);\n\n@Directive({\n selector: '[tuiTextfieldCleaner]',\n providers: [\n {\n provide: TUI_TEXTFIELD_CLEANER,\n useExisting: forwardRef(() => TuiTextfieldCleanerDirective),\n },\n ],\n})\nexport class TuiTextfieldCleanerDirective extends TuiController {\n @Input('tuiTextfieldCleaner')\n cleaner = false;\n}\n\nexport function cleanerDirectiveFactory(): TuiTextfieldCleanerDirective {\n return new TuiTextfieldCleanerDirective();\n}\n","import {Directive, forwardRef, InjectionToken, Input} from '@angular/core';\nimport {TuiController} from '@taiga-ui/cdk';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport const TUI_TEXTFIELD_CUSTOM_CONTENT =\n new InjectionToken<TuiTextfieldCustomContentDirective>('tuiTextfieldCustomContent', {\n factory: customContentDirectiveFactory,\n });\n\n@Directive({\n selector: '[tuiTextfieldCustomContent]',\n providers: [\n {\n provide: TUI_TEXTFIELD_CUSTOM_CONTENT,\n useExisting: forwardRef(() => TuiTextfieldCustomContentDirective),\n },\n ],\n})\nexport class TuiTextfieldCustomContentDirective extends TuiController {\n // TODO: 3.0 Remove null\n @Input('tuiTextfieldCustomContent')\n customContent: PolymorpheusContent | null = '';\n}\n\nexport function customContentDirectiveFactory(): TuiTextfieldCustomContentDirective {\n return new TuiTextfieldCustomContentDirective();\n}\n","import {Directive, forwardRef, InjectionToken, Input} from '@angular/core';\nimport {TuiController} from '@taiga-ui/cdk';\n\nexport const TUI_TEXTFIELD_EXAMPLE_TEXT =\n new InjectionToken<TuiTextfieldExampleTextDirective>('tuiTextfieldExampleText', {\n factory: exampleTextDirectiveFactory,\n });\n\n@Directive({\n selector: '[tuiTextfieldExampleText]',\n providers: [\n {\n provide: TUI_TEXTFIELD_EXAMPLE_TEXT,\n useExisting: forwardRef(() => TuiTextfieldExampleTextDirective),\n },\n ],\n})\nexport class TuiTextfieldExampleTextDirective extends TuiController {\n @Input('tuiTextfieldExampleText')\n exampleText = '';\n}\n\nexport function exampleTextDirectiveFactory(): TuiTextfieldExampleTextDirective {\n return new TuiTextfieldExampleTextDirective();\n}\n","import {Directive, forwardRef, InjectionToken, Input} from '@angular/core';\nimport {TuiController, TuiInputModeT} from '@taiga-ui/cdk';\n\nexport const TUI_TEXTFIELD_INPUT_MODE =\n new InjectionToken<TuiTextfieldInputModeDirective>('tuiTextfieldInputMode', {\n factory: inputModeDirectiveFactory,\n });\n\n@Directive({\n selector: '[tuiTextfieldInputMode]',\n providers: [\n {\n provide: TUI_TEXTFIELD_INPUT_MODE,\n useExisting: forwardRef(() => TuiTextfieldInputModeDirective),\n },\n ],\n})\nexport class TuiTextfieldInputModeDirective extends TuiController {\n @Input('tuiTextfieldInputMode')\n inputMode: TuiInputModeT = 'text';\n}\n\nexport function inputModeDirectiveFactory(): TuiTextfieldInputModeDirective {\n return new TuiTextfieldInputModeDirective();\n}\n","import {Directive, forwardRef, InjectionToken, Input} from '@angular/core';\nimport {TuiController} from '@taiga-ui/cdk';\n\nexport const TUI_TEXTFIELD_LABEL_OUTSIDE =\n new InjectionToken<TuiTextfieldLabelOutsideDirective>('tuiTextfieldLabelOutside', {\n factory: labelOutsideDirectiveFactory,\n });\n\n@Directive({\n selector: '[tuiTextfieldLabelOutside]',\n providers: [\n {\n provide: TUI_TEXTFIELD_LABEL_OUTSIDE,\n useExisting: forwardRef(() => TuiTextfieldLabelOutsideDirective),\n },\n ],\n})\nexport class TuiTextfieldLabelOutsideDirective extends TuiController {\n @Input('tuiTextfieldLabelOutside')\n labelOutside = false;\n}\n\nexport function labelOutsideDirectiveFactory(): TuiTextfieldLabelOutsideDirective {\n return new TuiTextfieldLabelOutsideDirective();\n}\n","import {Directive, forwardRef, InjectionToken, Input} from '@angular/core';\nimport {TuiController} from '@taiga-ui/cdk';\n\nexport const TUI_TEXTFIELD_MAX_LENGTH =\n new InjectionToken<TuiTextfieldMaxLengthDirective>('tuiTextfieldMaxLength', {\n factory: maxLengthDirectiveFactory,\n });\n\n@Directive({\n selector: '[tuiTextfieldMaxLength]',\n providers: [\n {\n provide: TUI_TEXTFIELD_MAX_LENGTH,\n useExisting: forwardRef(() => TuiTextfieldMaxLengthDirective),\n },\n ],\n})\nexport class TuiTextfieldMaxLengthDirective extends TuiController {\n @Input('tuiTextfieldMaxLength')\n maxLength: number | null = null;\n}\n\nexport function maxLengthDirectiveFactory(): TuiTextfieldMaxLengthDirective {\n return new TuiTextfieldMaxLengthDirective();\n}\n","import {Directive, forwardRef, InjectionToken, Input} from '@angular/core';\nimport {TuiController} from '@taiga-ui/cdk';\nimport {TuiSizeL, TuiSizeS} from '@taiga-ui/core/types';\n\nexport const TUI_TEXTFIELD_SIZE = new InjectionToken<TuiTextfieldSizeDirective>(\n 'tuiTextfieldSize',\n {\n factory: sizeDirectiveFactory,\n },\n);\n\n@Directive({\n selector: '[tuiTextfieldSize]',\n providers: [\n {\n provide: TUI_TEXTFIELD_SIZE,\n useExisting: forwardRef(() => TuiTextfieldSizeDirective),\n },\n ],\n})\nexport class TuiTextfieldSizeDirective extends TuiController {\n @Input('tuiTextfieldSize')\n size: TuiSizeS | TuiSizeL = 'l';\n}\n\nexport function sizeDirectiveFactory(): TuiTextfieldSizeDirective {\n return new TuiTextfieldSizeDirective();\n}\n","import {Directive, forwardRef, InjectionToken, Input} from '@angular/core';\nimport {TuiController, TuiInputTypeT} from '@taiga-ui/cdk';\n\nexport const TUI_TEXTFIELD_TYPE = new InjectionToken<TuiTextfieldTypeDirective>(\n 'tuiTextfieldType',\n {\n factory: typeDirectiveFactory,\n },\n);\n\n@Directive({\n selector: '[tuiTextfieldType]',\n providers: [\n {\n provide: TUI_TEXTFIELD_TYPE,\n useExisting: forwardRef(() => TuiTextfieldTypeDirective),\n },\n ],\n})\nexport class TuiTextfieldTypeDirective extends TuiController {\n @Input('tuiTextfieldType')\n type: TuiInputTypeT = 'text';\n}\n\nexport function typeDirectiveFactory(): TuiTextfieldTypeDirective {\n return new TuiTextfieldTypeDirective();\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiTextfieldAutocompleteDirective} from './textfield-autocomplete.directive';\nimport {TuiTextfieldCleanerDirective} from './textfield-cleaner.directive';\nimport {TuiTextfieldCustomContentDirective} from './textfield-custom-content.directive';\nimport {TuiTextfieldExampleTextDirective} from './textfield-example-text.directive';\nimport {TuiTextfieldInputModeDirective} from './textfield-input-mode.directive';\nimport {TuiTextfieldLabelOutsideDirective} from './textfield-label-outside.directive';\nimport {TuiTextfieldMaxLengthDirective} from './textfield-max-length.directive';\nimport {TuiTextfieldSizeDirective} from './textfield-size.directive';\nimport {TuiTextfieldTypeDirective} from './textfield-type.directive';\n\n@NgModule({\n declarations: [\n TuiTextfieldAutocompleteDirective,\n TuiTextfieldCleanerDirective,\n TuiTextfieldCustomContentDirective,\n TuiTextfieldExampleTextDirective,\n TuiTextfieldInputModeDirective,\n TuiTextfieldLabelOutsideDirective,\n TuiTextfieldMaxLengthDirective,\n TuiTextfieldSizeDirective,\n TuiTextfieldTypeDirective,\n ],\n exports: [\n TuiTextfieldAutocompleteDirective,\n TuiTextfieldCleanerDirective,\n TuiTextfieldCustomContentDirective,\n TuiTextfieldExampleTextDirective,\n TuiTextfieldInputModeDirective,\n TuiTextfieldLabelOutsideDirective,\n TuiTextfieldMaxLengthDirective,\n TuiTextfieldSizeDirective,\n TuiTextfieldTypeDirective,\n ],\n})\nexport class TuiTextfieldControllerModule {}\n","import {ChangeDetectorRef, InjectionToken, Provider} from '@angular/core';\nimport {TuiDestroyService, watch} from '@taiga-ui/cdk';\nimport {merge, NEVER, Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\nimport {TuiTextfieldController} from './textfield.controller';\nimport {\n TUI_TEXTFIELD_AUTOCOMPLETE,\n TuiTextfieldAutocompleteDirective,\n} from './textfield-autocomplete.directive';\nimport {\n TUI_TEXTFIELD_CLEANER,\n TuiTextfieldCleanerDirective,\n} from './textfield-cleaner.directive';\nimport {\n TUI_TEXTFIELD_CUSTOM_CONTENT,\n TuiTextfieldCustomContentDirective,\n} from './textfield-custom-content.directive';\nimport {\n TUI_TEXTFIELD_EXAMPLE_TEXT,\n TuiTextfieldExampleTextDirective,\n} from './textfield-example-text.directive';\nimport {\n TUI_TEXTFIELD_INPUT_MODE,\n TuiTextfieldInputModeDirective,\n} from './textfield-input-mode.directive';\nimport {\n TUI_TEXTFIELD_LABEL_OUTSIDE,\n TuiTextfieldLabelOutsideDirective,\n} from './textfield-label-outside.directive';\nimport {\n TUI_TEXTFIELD_MAX_LENGTH,\n TuiTextfieldMaxLengthDirective,\n} from './textfield-max-length.directive';\nimport {TUI_TEXTFIELD_SIZE, TuiTextfieldSizeDirective} from './textfield-size.directive';\nimport {TUI_TEXTFIELD_TYPE, TuiTextfieldTypeDirective} from './textfield-type.directive';\n\nexport const TUI_TEXTFIELD_WATCHED_CONTROLLER =\n new InjectionToken<TuiTextfieldController>('watched textfield controller');\n\nexport function textfieldWatchedControllerFactory(\n changeDetectorRef: ChangeDetectorRef,\n destroy$: Observable<void>,\n ...controllers: [\n TuiTextfieldAutocompleteDirective,\n TuiTextfieldCleanerDirective,\n TuiTextfieldCustomContentDirective,\n TuiTextfieldExampleTextDirective,\n TuiTextfieldInputModeDirective,\n TuiTextfieldLabelOutsideDirective,\n TuiTextfieldMaxLengthDirective,\n TuiTextfieldSizeDirective,\n // @ts-ignore remove after TS update\n TuiTextfieldTypeDirective,\n ]\n): TuiTextfieldController {\n const change$ = merge(...controllers.map(({change$}) => change$ || NEVER)).pipe(\n watch(changeDetectorRef),\n takeUntil(destroy$),\n );\n\n change$.subscribe();\n\n return new TuiTextfieldController(change$, ...controllers);\n}\n\nexport const TEXTFIELD_CONTROLLER_PROVIDER: Provider = [\n TuiDestroyService,\n {\n provide: TUI_TEXTFIELD_WATCHED_CONTROLLER,\n deps: [\n ChangeDetectorRef,\n TuiDestroyService,\n TUI_TEXTFIELD_AUTOCOMPLETE,\n TUI_TEXTFIELD_CLEANER,\n TUI_TEXTFIELD_CUSTOM_CONTENT,\n TUI_TEXTFIELD_EXAMPLE_TEXT,\n TUI_TEXTFIELD_INPUT_MODE,\n TUI_TEXTFIELD_LABEL_OUTSIDE,\n TUI_TEXTFIELD_MAX_LENGTH,\n TUI_TEXTFIELD_SIZE,\n TUI_TEXTFIELD_TYPE,\n ],\n useFactory: textfieldWatchedControllerFactory,\n },\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAea,sBAAsB;IAC/B,YACa,OAAyB,EACjB,qBAAwD,EACxD,gBAA8C,EAC9C,sBAA0D,EAC1D,oBAAsD,EACtD,kBAAkD,EAClD,qBAAwD,EACxD,kBAAkD,EAClD,aAAwC,EACxC,aAAwC;QAThD,YAAO,GAAP,OAAO,CAAkB;QACjB,0BAAqB,GAArB,qBAAqB,CAAmC;QACxD,qBAAgB,GAAhB,gBAAgB,CAA8B;QAC9C,2BAAsB,GAAtB,sBAAsB,CAAoC;QAC1D,yBAAoB,GAApB,oBAAoB,CAAkC;QACtD,uBAAkB,GAAlB,kBAAkB,CAAgC;QAClD,0BAAqB,GAArB,qBAAqB,CAAmC;QACxD,uBAAkB,GAAlB,kBAAkB,CAAgC;QAClD,kBAAa,GAAb,aAAa,CAA2B;QACxC,kBAAa,GAAb,aAAa,CAA2B;KACzD;IAEJ,IAAI,YAAY;QACZ,OAAO,IAAI,CAAC,qBAAqB,CAAC,YAAY,C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0BAA0B;YAC1B,qBAAqB;YACrB,4BAA4B;YAC5B,0BAA0B;YAC1B,wBAAwB;YACxB,2BAA2B;YAC3B,wBAAwB;YACxB,kBAAkB;YAClB,kBAAkB;SACrB;QACD,UAAU,EAAE,iCAAiC;KAChD;;;ACpFL;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-directives-textfield-controller.js","sources":["ng://@taiga-ui/core/directives/textfield-controller/textfield.controller.ts","ng://@taiga-ui/core/directives/textfield-controller/textfield-autocomplete.directive.ts","ng://@taiga-ui/core/directives/textfield-controller/textfield-cleaner.directive.ts","ng://@taiga-ui/core/directives/textfield-controller/textfield-custom-content.directive.ts","ng://@taiga-ui/core/directives/textfield-controller/textfield-example-text.directive.ts","ng://@taiga-ui/core/directives/textfield-controller/textfield-input-mode.directive.ts","ng://@taiga-ui/core/directives/textfield-controller/textfield-label-outside.directive.ts","ng://@taiga-ui/core/directives/textfield-controller/textfield-max-length.directive.ts","ng://@taiga-ui/core/directives/textfield-controller/textfield-size.directive.ts","ng://@taiga-ui/core/directives/textfield-controller/textfield-type.directive.ts","ng://@taiga-ui/core/directives/textfield-controller/textfield-controller.module.ts","ng://@taiga-ui/core/directives/textfield-controller/textfield-controller.provider.ts","ng://@taiga-ui/core/directives/textfield-controller/taiga-ui-core-directives-textfield-controller.ts"],"sourcesContent":["import {TuiAutofillFieldName, TuiInputModeT, TuiInputTypeT} from '@taiga-ui/cdk';\nimport {TuiSizeL, TuiSizeS} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\nimport {TuiTextfieldAutocompleteDirective} from './textfield-autocomplete.directive';\nimport {TuiTextfieldCleanerDirective} from './textfield-cleaner.directive';\nimport {TuiTextfieldCustomContentDirective} from './textfield-custom-content.directive';\nimport {TuiTextfieldExampleTextDirective} from './textfield-example-text.directive';\nimport {TuiTextfieldInputModeDirective} from './textfield-input-mode.directive';\nimport {TuiTextfieldLabelOutsideDirective} from './textfield-label-outside.directive';\nimport {TuiTextfieldMaxLengthDirective} from './textfield-max-length.directive';\nimport {TuiTextfieldSizeDirective} from './textfield-size.directive';\nimport {TuiTextfieldTypeDirective} from './textfield-type.directive';\n\nexport class TuiTextfieldController {\n constructor(\n readonly change$: Observable<void>,\n private readonly autocompleteDirective: TuiTextfieldAutocompleteDirective,\n private readonly cleanerDirective: TuiTextfieldCleanerDirective,\n private readonly customContentDirective: TuiTextfieldCustomContentDirective,\n private readonly exampleTextDirective: TuiTextfieldExampleTextDirective,\n private readonly inputModeDirective: TuiTextfieldInputModeDirective,\n private readonly labelOutsideDirective: TuiTextfieldLabelOutsideDirective,\n private readonly maxLengthDirective: TuiTextfieldMaxLengthDirective,\n private readonly sizeDirective: TuiTextfieldSizeDirective,\n private readonly typeDirective: TuiTextfieldTypeDirective,\n ) {}\n\n get autocomplete(): TuiAutofillFieldName | '' {\n return this.autocompleteDirective.autocomplete;\n }\n\n get cleaner(): boolean {\n return this.cleanerDirective.cleaner;\n }\n\n get customContent(): PolymorpheusContent {\n return this.customContentDirective.customContent || '';\n }\n\n get exampleText(): string {\n return this.exampleTextDirective.exampleText;\n }\n\n get inputMode(): TuiInputModeT {\n return this.inputModeDirective.inputMode;\n }\n\n get labelOutside(): boolean {\n return this.labelOutsideDirective.labelOutside;\n }\n\n get maxLength(): number | null {\n return this.maxLengthDirective.maxLength;\n }\n\n get size(): TuiSizeS | TuiSizeL {\n return this.sizeDirective.size;\n }\n\n get type(): TuiInputTypeT {\n return this.typeDirective.type;\n }\n}\n","import {Directive, forwardRef, InjectionToken, Input} from '@angular/core';\nimport {TuiAutofillFieldName, TuiController} from '@taiga-ui/cdk';\n\nexport const TUI_TEXTFIELD_AUTOCOMPLETE =\n new InjectionToken<TuiTextfieldAutocompleteDirective>('tuiTextfieldAutocomplete', {\n factory: autocompleteDirectiveFactory,\n });\n\n@Directive({\n selector: '[tuiTextfieldAutocomplete]',\n providers: [\n {\n provide: TUI_TEXTFIELD_AUTOCOMPLETE,\n useExisting: forwardRef(() => TuiTextfieldAutocompleteDirective),\n },\n ],\n})\nexport class TuiTextfieldAutocompleteDirective extends TuiController {\n @Input('tuiTextfieldAutocomplete')\n autocomplete: TuiAutofillFieldName | '' = '';\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function autocompleteDirectiveFactory(): TuiTextfieldAutocompleteDirective {\n return new TuiTextfieldAutocompleteDirective();\n}\n","import {Directive, forwardRef, InjectionToken, Input} from '@angular/core';\nimport {TuiController} from '@taiga-ui/cdk';\n\nexport const TUI_TEXTFIELD_CLEANER = new InjectionToken<TuiTextfieldCleanerDirective>(\n 'tuiTextfieldCleaner',\n {\n factory: cleanerDirectiveFactory,\n },\n);\n\n@Directive({\n selector: '[tuiTextfieldCleaner]',\n providers: [\n {\n provide: TUI_TEXTFIELD_CLEANER,\n useExisting: forwardRef(() => TuiTextfieldCleanerDirective),\n },\n ],\n})\nexport class TuiTextfieldCleanerDirective extends TuiController {\n @Input('tuiTextfieldCleaner')\n cleaner = false;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function cleanerDirectiveFactory(): TuiTextfieldCleanerDirective {\n return new TuiTextfieldCleanerDirective();\n}\n","import {Directive, forwardRef, InjectionToken, Input} from '@angular/core';\nimport {TuiController} from '@taiga-ui/cdk';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nexport const TUI_TEXTFIELD_CUSTOM_CONTENT =\n new InjectionToken<TuiTextfieldCustomContentDirective>('tuiTextfieldCustomContent', {\n factory: customContentDirectiveFactory,\n });\n\n@Directive({\n selector: '[tuiTextfieldCustomContent]',\n providers: [\n {\n provide: TUI_TEXTFIELD_CUSTOM_CONTENT,\n useExisting: forwardRef(() => TuiTextfieldCustomContentDirective),\n },\n ],\n})\nexport class TuiTextfieldCustomContentDirective extends TuiController {\n // TODO: 3.0 Remove null\n @Input('tuiTextfieldCustomContent')\n customContent: PolymorpheusContent | null = '';\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function customContentDirectiveFactory(): TuiTextfieldCustomContentDirective {\n return new TuiTextfieldCustomContentDirective();\n}\n","import {Directive, forwardRef, InjectionToken, Input} from '@angular/core';\nimport {TuiController} from '@taiga-ui/cdk';\n\nexport const TUI_TEXTFIELD_EXAMPLE_TEXT =\n new InjectionToken<TuiTextfieldExampleTextDirective>('tuiTextfieldExampleText', {\n factory: exampleTextDirectiveFactory,\n });\n\n@Directive({\n selector: '[tuiTextfieldExampleText]',\n providers: [\n {\n provide: TUI_TEXTFIELD_EXAMPLE_TEXT,\n useExisting: forwardRef(() => TuiTextfieldExampleTextDirective),\n },\n ],\n})\nexport class TuiTextfieldExampleTextDirective extends TuiController {\n @Input('tuiTextfieldExampleText')\n exampleText = '';\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function exampleTextDirectiveFactory(): TuiTextfieldExampleTextDirective {\n return new TuiTextfieldExampleTextDirective();\n}\n","import {Directive, forwardRef, InjectionToken, Input} from '@angular/core';\nimport {TuiController, TuiInputModeT} from '@taiga-ui/cdk';\n\nexport const TUI_TEXTFIELD_INPUT_MODE =\n new InjectionToken<TuiTextfieldInputModeDirective>('tuiTextfieldInputMode', {\n factory: inputModeDirectiveFactory,\n });\n\n@Directive({\n selector: '[tuiTextfieldInputMode]',\n providers: [\n {\n provide: TUI_TEXTFIELD_INPUT_MODE,\n useExisting: forwardRef(() => TuiTextfieldInputModeDirective),\n },\n ],\n})\nexport class TuiTextfieldInputModeDirective extends TuiController {\n @Input('tuiTextfieldInputMode')\n inputMode: TuiInputModeT = 'text';\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function inputModeDirectiveFactory(): TuiTextfieldInputModeDirective {\n return new TuiTextfieldInputModeDirective();\n}\n","import {Directive, forwardRef, InjectionToken, Input} from '@angular/core';\nimport {TuiController} from '@taiga-ui/cdk';\n\nexport const TUI_TEXTFIELD_LABEL_OUTSIDE =\n new InjectionToken<TuiTextfieldLabelOutsideDirective>('tuiTextfieldLabelOutside', {\n factory: labelOutsideDirectiveFactory,\n });\n\n@Directive({\n selector: '[tuiTextfieldLabelOutside]',\n providers: [\n {\n provide: TUI_TEXTFIELD_LABEL_OUTSIDE,\n useExisting: forwardRef(() => TuiTextfieldLabelOutsideDirective),\n },\n ],\n})\nexport class TuiTextfieldLabelOutsideDirective extends TuiController {\n @Input('tuiTextfieldLabelOutside')\n labelOutside = false;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function labelOutsideDirectiveFactory(): TuiTextfieldLabelOutsideDirective {\n return new TuiTextfieldLabelOutsideDirective();\n}\n","import {Directive, forwardRef, InjectionToken, Input} from '@angular/core';\nimport {TuiController} from '@taiga-ui/cdk';\n\nexport const TUI_TEXTFIELD_MAX_LENGTH =\n new InjectionToken<TuiTextfieldMaxLengthDirective>('tuiTextfieldMaxLength', {\n factory: maxLengthDirectiveFactory,\n });\n\n@Directive({\n selector: '[tuiTextfieldMaxLength]',\n providers: [\n {\n provide: TUI_TEXTFIELD_MAX_LENGTH,\n useExisting: forwardRef(() => TuiTextfieldMaxLengthDirective),\n },\n ],\n})\nexport class TuiTextfieldMaxLengthDirective extends TuiController {\n @Input('tuiTextfieldMaxLength')\n maxLength: number | null = null;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function maxLengthDirectiveFactory(): TuiTextfieldMaxLengthDirective {\n return new TuiTextfieldMaxLengthDirective();\n}\n","import {Directive, forwardRef, InjectionToken, Input} from '@angular/core';\nimport {TuiController} from '@taiga-ui/cdk';\nimport {TuiSizeL, TuiSizeS} from '@taiga-ui/core/types';\n\nexport const TUI_TEXTFIELD_SIZE = new InjectionToken<TuiTextfieldSizeDirective>(\n 'tuiTextfieldSize',\n {\n factory: sizeDirectiveFactory,\n },\n);\n\n@Directive({\n selector: '[tuiTextfieldSize]',\n providers: [\n {\n provide: TUI_TEXTFIELD_SIZE,\n useExisting: forwardRef(() => TuiTextfieldSizeDirective),\n },\n ],\n})\nexport class TuiTextfieldSizeDirective extends TuiController {\n @Input('tuiTextfieldSize')\n size: TuiSizeS | TuiSizeL = 'l';\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function sizeDirectiveFactory(): TuiTextfieldSizeDirective {\n return new TuiTextfieldSizeDirective();\n}\n","import {Directive, forwardRef, InjectionToken, Input} from '@angular/core';\nimport {TuiController, TuiInputTypeT} from '@taiga-ui/cdk';\n\nexport const TUI_TEXTFIELD_TYPE = new InjectionToken<TuiTextfieldTypeDirective>(\n 'tuiTextfieldType',\n {\n factory: typeDirectiveFactory,\n },\n);\n\n@Directive({\n selector: '[tuiTextfieldType]',\n providers: [\n {\n provide: TUI_TEXTFIELD_TYPE,\n useExisting: forwardRef(() => TuiTextfieldTypeDirective),\n },\n ],\n})\nexport class TuiTextfieldTypeDirective extends TuiController {\n @Input('tuiTextfieldType')\n type: TuiInputTypeT = 'text';\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function typeDirectiveFactory(): TuiTextfieldTypeDirective {\n return new TuiTextfieldTypeDirective();\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiTextfieldAutocompleteDirective} from './textfield-autocomplete.directive';\nimport {TuiTextfieldCleanerDirective} from './textfield-cleaner.directive';\nimport {TuiTextfieldCustomContentDirective} from './textfield-custom-content.directive';\nimport {TuiTextfieldExampleTextDirective} from './textfield-example-text.directive';\nimport {TuiTextfieldInputModeDirective} from './textfield-input-mode.directive';\nimport {TuiTextfieldLabelOutsideDirective} from './textfield-label-outside.directive';\nimport {TuiTextfieldMaxLengthDirective} from './textfield-max-length.directive';\nimport {TuiTextfieldSizeDirective} from './textfield-size.directive';\nimport {TuiTextfieldTypeDirective} from './textfield-type.directive';\n\n@NgModule({\n declarations: [\n TuiTextfieldAutocompleteDirective,\n TuiTextfieldCleanerDirective,\n TuiTextfieldCustomContentDirective,\n TuiTextfieldExampleTextDirective,\n TuiTextfieldInputModeDirective,\n TuiTextfieldLabelOutsideDirective,\n TuiTextfieldMaxLengthDirective,\n TuiTextfieldSizeDirective,\n TuiTextfieldTypeDirective,\n ],\n exports: [\n TuiTextfieldAutocompleteDirective,\n TuiTextfieldCleanerDirective,\n TuiTextfieldCustomContentDirective,\n TuiTextfieldExampleTextDirective,\n TuiTextfieldInputModeDirective,\n TuiTextfieldLabelOutsideDirective,\n TuiTextfieldMaxLengthDirective,\n TuiTextfieldSizeDirective,\n TuiTextfieldTypeDirective,\n ],\n})\nexport class TuiTextfieldControllerModule {}\n","import {ChangeDetectorRef, InjectionToken, Provider} from '@angular/core';\nimport {TuiDestroyService, watch} from '@taiga-ui/cdk';\nimport {merge, NEVER, Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\nimport {TuiTextfieldController} from './textfield.controller';\nimport {\n TUI_TEXTFIELD_AUTOCOMPLETE,\n TuiTextfieldAutocompleteDirective,\n} from './textfield-autocomplete.directive';\nimport {\n TUI_TEXTFIELD_CLEANER,\n TuiTextfieldCleanerDirective,\n} from './textfield-cleaner.directive';\nimport {\n TUI_TEXTFIELD_CUSTOM_CONTENT,\n TuiTextfieldCustomContentDirective,\n} from './textfield-custom-content.directive';\nimport {\n TUI_TEXTFIELD_EXAMPLE_TEXT,\n TuiTextfieldExampleTextDirective,\n} from './textfield-example-text.directive';\nimport {\n TUI_TEXTFIELD_INPUT_MODE,\n TuiTextfieldInputModeDirective,\n} from './textfield-input-mode.directive';\nimport {\n TUI_TEXTFIELD_LABEL_OUTSIDE,\n TuiTextfieldLabelOutsideDirective,\n} from './textfield-label-outside.directive';\nimport {\n TUI_TEXTFIELD_MAX_LENGTH,\n TuiTextfieldMaxLengthDirective,\n} from './textfield-max-length.directive';\nimport {TUI_TEXTFIELD_SIZE, TuiTextfieldSizeDirective} from './textfield-size.directive';\nimport {TUI_TEXTFIELD_TYPE, TuiTextfieldTypeDirective} from './textfield-type.directive';\n\nexport const TUI_TEXTFIELD_WATCHED_CONTROLLER =\n new InjectionToken<TuiTextfieldController>('watched textfield controller');\n\n/**\n * @deprecated: use {@link tuiTextfieldWatchedControllerFactory} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function textfieldWatchedControllerFactory(\n changeDetectorRef: ChangeDetectorRef,\n destroy$: Observable<void>,\n ...controllers: [\n TuiTextfieldAutocompleteDirective,\n TuiTextfieldCleanerDirective,\n TuiTextfieldCustomContentDirective,\n TuiTextfieldExampleTextDirective,\n TuiTextfieldInputModeDirective,\n TuiTextfieldLabelOutsideDirective,\n TuiTextfieldMaxLengthDirective,\n TuiTextfieldSizeDirective,\n // @ts-ignore remove after TS update\n TuiTextfieldTypeDirective,\n ]\n): TuiTextfieldController {\n const change$ = merge(...controllers.map(({change$}) => change$ || NEVER)).pipe(\n watch(changeDetectorRef),\n takeUntil(destroy$),\n );\n\n change$.subscribe();\n\n return new TuiTextfieldController(change$, ...controllers);\n}\n\nexport const TEXTFIELD_CONTROLLER_PROVIDER: Provider = [\n TuiDestroyService,\n {\n provide: TUI_TEXTFIELD_WATCHED_CONTROLLER,\n deps: [\n ChangeDetectorRef,\n TuiDestroyService,\n TUI_TEXTFIELD_AUTOCOMPLETE,\n TUI_TEXTFIELD_CLEANER,\n TUI_TEXTFIELD_CUSTOM_CONTENT,\n TUI_TEXTFIELD_EXAMPLE_TEXT,\n TUI_TEXTFIELD_INPUT_MODE,\n TUI_TEXTFIELD_LABEL_OUTSIDE,\n TUI_TEXTFIELD_MAX_LENGTH,\n TUI_TEXTFIELD_SIZE,\n TUI_TEXTFIELD_TYPE,\n ],\n useFactory: textfieldWatchedControllerFactory,\n },\n];\n\nexport const tuiTextfieldWatchedControllerFactory = textfieldWatchedControllerFactory;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAea,sBAAsB;IAC/B,YACa,OAAyB,EACjB,qBAAwD,EACxD,gBAA8C,EAC9C,sBAA0D,EAC1D,oBAAsD,EACtD,kBAAkD,EAClD,qBAAwD,EACxD,kBAAkD,EAClD,a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AiC,CAC7C,iBAAoC,EACpC,QAA0B,EAC1B,GAAG,WAWF;IAED,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,EAAC,OAAO,EAAC,KAAK,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,CAC3E,KAAK,CAAC,iBAAiB,CAAC,EACxB,SAAS,CAAC,QAAQ,CAAC,CACtB,CAAC;IAEF,OAAO,CAAC,SAAS,EAAE,CAAC;IAEpB,OAAO,IAAI,sBAAsB,CAAC,OAAO,EAAE,GAAG,WAAW,CAAC,CAAC;AAC/D,CAAC;MAEY,6BAA6B,GAAa;IACnD,iBAAiB;IACjB;QACI,OAAO,EAAE,gCAAgC;QACzC,IAAI,EAAE;YACF,iBAAiB;YACjB,iBAAiB;YACjB,0BAA0B;YAC1B,qBAAqB;YACrB,4BAA4B;YAC5B,0BAA0B;YAC1B,wBAAwB;YACxB,2BAA2B;YAC3B,wBAAwB;YACxB,kBAAkB;YAClB,kBAAkB;SACrB;QACD,UAAU,EAAE,iCAAiC;KAChD;EACH;MAEW,oCAAoC,GAAG;;AC3FpD;;;;;;"}
@@ -2,13 +2,18 @@ import { EMPTY_ARRAY, tuiZonefull } from '@taiga-ui/cdk';
2
2
  import { debounceTime, scan, distinctUntilChanged, switchMap, startWith, map } from 'rxjs/operators';
3
3
  import { pipe } from 'rxjs';
4
4
 
5
- function smartSearch(getSearchFunction, searchDebouceTimeMs = 400) {
6
- return source => source.pipe(debounceTime(searchDebouceTimeMs), scan((previousSearched, current) => {
5
+ /**
6
+ * @deprecated: use {@link tuiSmartSearch} instead
7
+ */
8
+ // eslint-disable-next-line @typescript-eslint/naming-convention
9
+ function smartSearch(getSearchFunction, searchDebounceTimeMs = 400) {
10
+ return source => source.pipe(debounceTime(searchDebounceTimeMs), scan((previousSearched, current) => {
7
11
  return previousSearched !== '' && current.startsWith(previousSearched)
8
12
  ? previousSearched
9
13
  : current;
10
14
  }, ''), distinctUntilChanged(), switchMap(value => getSearchFunction(value).pipe(startWith(null))), startWith(EMPTY_ARRAY));
11
15
  }
16
+ const tuiSmartSearch = smartSearch;
12
17
 
13
18
  /**
14
19
  * Works like regular map + distinctUntilChanged
@@ -25,5 +30,5 @@ function tuiZonefulMap(project, ngZone) {
25
30
  * Generated bundle index. Do not edit.
26
31
  */
27
32
 
28
- export { smartSearch, tuiZonefulMap };
33
+ export { smartSearch, tuiSmartSearch, tuiZonefulMap };
29
34
  //# sourceMappingURL=taiga-ui-core-observables.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-observables.js","sources":["ng://@taiga-ui/core/observables/smart-search.ts","ng://@taiga-ui/core/observables/zoneful-map.ts","ng://@taiga-ui/core/observables/taiga-ui-core-observables.ts"],"sourcesContent":["import {EMPTY_ARRAY} from '@taiga-ui/cdk';\nimport {Observable, OperatorFunction} from 'rxjs';\nimport {\n debounceTime,\n distinctUntilChanged,\n scan,\n startWith,\n switchMap,\n} from 'rxjs/operators';\n\nexport function smartSearch<T>(\n getSearchFunction: (search: string) => Observable<readonly T[] | readonly T[][]>,\n searchDebouceTimeMs: number = 400,\n): OperatorFunction<string, readonly T[] | readonly T[][] | null> {\n return source =>\n source.pipe(\n debounceTime(searchDebouceTimeMs),\n scan((previousSearched, current) => {\n return previousSearched !== '' && current.startsWith(previousSearched)\n ? previousSearched\n : current;\n }, ''),\n distinctUntilChanged(),\n switchMap(value => getSearchFunction(value).pipe(startWith(null))),\n startWith(EMPTY_ARRAY),\n );\n}\n","import {NgZone} from '@angular/core';\nimport {tuiZonefull} from '@taiga-ui/cdk';\nimport {OperatorFunction, pipe} from 'rxjs';\nimport {distinctUntilChanged, map} from 'rxjs/operators';\n\n/**\n * Works like regular map + distinctUntilChanged\n * and only returns to NgZone if value has changed\n *\n * @param project mapping function\n * @param ngZone NgZone instance\n */\nexport function tuiZonefulMap<T, R>(\n project: (value: T, index: number) => R,\n ngZone: NgZone,\n): OperatorFunction<T, R> {\n return pipe(map(project), distinctUntilChanged(), tuiZonefull(ngZone));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;SAUgB,WAAW,CACvB,iBAAgF,EAChF,sBAA8B,GAAG;IAEjC,OAAO,MAAM,IACT,MAAM,CAAC,IAAI,CACP,YAAY,CAAC,mBAAmB,CAAC,EACjC,IAAI,CAAC,CAAC,gBAAgB,EAAE,OAAO;QAC3B,OAAO,gBAAgB,KAAK,EAAE,IAAI,OAAO,CAAC,UAAU,CAAC,gBAAgB,CAAC;cAChE,gBAAgB;cAChB,OAAO,CAAC;KACjB,EAAE,EAAE,CAAC,EACN,oBAAoB,EAAE,EACtB,SAAS,CAAC,KAAK,IAAI,iBAAiB,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAClE,SAAS,CAAC,WAAW,CAAC,CACzB,CAAC;AACV;;ACrBA;;;;;;;SAOgB,aAAa,CACzB,OAAuC,EACvC,MAAc;IAEd,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,oBAAoB,EAAE,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;AAC3E;;ACjBA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-observables.js","sources":["ng://@taiga-ui/core/observables/smart-search.ts","ng://@taiga-ui/core/observables/zoneful-map.ts","ng://@taiga-ui/core/observables/taiga-ui-core-observables.ts"],"sourcesContent":["import {EMPTY_ARRAY} from '@taiga-ui/cdk';\nimport {Observable, OperatorFunction} from 'rxjs';\nimport {\n debounceTime,\n distinctUntilChanged,\n scan,\n startWith,\n switchMap,\n} from 'rxjs/operators';\n\n/**\n * @deprecated: use {@link tuiSmartSearch} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function smartSearch<T>(\n getSearchFunction: (search: string) => Observable<readonly T[] | readonly T[][]>,\n searchDebounceTimeMs: number = 400,\n): OperatorFunction<string, readonly T[] | readonly T[][] | null> {\n return source =>\n source.pipe(\n debounceTime(searchDebounceTimeMs),\n scan((previousSearched, current) => {\n return previousSearched !== '' && current.startsWith(previousSearched)\n ? previousSearched\n : current;\n }, ''),\n distinctUntilChanged(),\n switchMap(value => getSearchFunction(value).pipe(startWith(null))),\n startWith(EMPTY_ARRAY),\n );\n}\n\nexport const tuiSmartSearch = smartSearch;\n","import {NgZone} from '@angular/core';\nimport {tuiZonefull} from '@taiga-ui/cdk';\nimport {OperatorFunction, pipe} from 'rxjs';\nimport {distinctUntilChanged, map} from 'rxjs/operators';\n\n/**\n * Works like regular map + distinctUntilChanged\n * and only returns to NgZone if value has changed\n *\n * @param project mapping function\n * @param ngZone NgZone instance\n */\nexport function tuiZonefulMap<T, R>(\n project: (value: T, index: number) => R,\n ngZone: NgZone,\n): OperatorFunction<T, R> {\n return pipe(map(project), distinctUntilChanged(), tuiZonefull(ngZone));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAUA;;;AAGA;SACgB,WAAW,CACvB,iBAAgF,EAChF,uBAA+B,GAAG;IAElC,OAAO,MAAM,IACT,MAAM,CAAC,IAAI,CACP,YAAY,CAAC,oBAAoB,CAAC,EAClC,IAAI,CAAC,CAAC,gBAAgB,EAAE,OAAO;QAC3B,OAAO,gBAAgB,KAAK,EAAE,IAAI,OAAO,CAAC,UAAU,CAAC,gBAAgB,CAAC;cAChE,gBAAgB;cAChB,OAAO,CAAC;KACjB,EAAE,EAAE,CAAC,EACN,oBAAoB,EAAE,EACtB,SAAS,CAAC,KAAK,IAAI,iBAAiB,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAClE,SAAS,CAAC,WAAW,CAAC,CACzB,CAAC;AACV,CAAC;MAEY,cAAc,GAAG;;AC3B9B;;;;;;;SAOgB,aAAa,CACzB,OAAuC,EACvC,MAAc;IAEd,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,oBAAoB,EAAE,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;AAC3E;;ACjBA;;;;;;"}
@@ -5,6 +5,10 @@ import { of } from 'rxjs';
5
5
  import { startWith, map, takeUntil } from 'rxjs/operators';
6
6
  import { watch } from '@taiga-ui/cdk';
7
7
 
8
+ /**
9
+ * @deprecated: use {@link tuiIsMobileResFactory} instead
10
+ */
11
+ // eslint-disable-next-line @typescript-eslint/naming-convention
8
12
  function isMobileResFactory(mobile$, { nativeElement }) {
9
13
  nativeElement['$.class._mobile'] = mobile$;
10
14
  return mobile$;
@@ -14,7 +18,12 @@ const TUI_IS_MOBILE_RES_PROVIDER = {
14
18
  deps: [[new SkipSelf(), TUI_IS_MOBILE_RES], ElementRef],
15
19
  useFactory: isMobileResFactory,
16
20
  };
21
+ const tuiIsMobileResFactory = isMobileResFactory;
17
22
 
23
+ /**
24
+ * @deprecated: use {@link tuiModeFactory} instead
25
+ */
26
+ // eslint-disable-next-line @typescript-eslint/naming-convention
18
27
  function modeFactory(mode, { nativeElement }) {
19
28
  const mode$ = mode
20
29
  ? mode.change$.pipe(startWith(null), map(() => mode.mode))
@@ -27,15 +36,21 @@ const MODE_PROVIDER = {
27
36
  deps: [[new Optional(), TuiModeDirective], ElementRef],
28
37
  useFactory: modeFactory,
29
38
  };
39
+ const tuiModeFactory = modeFactory;
30
40
 
41
+ /**
42
+ * @deprecated: use {@link tuiWatchedControllerFactory} instead
43
+ */
44
+ // eslint-disable-next-line @typescript-eslint/naming-convention
31
45
  function watchedControllerFactory(controller, changeDetectorRef, destroy$) {
32
46
  controller.change$.pipe(watch(changeDetectorRef), takeUntil(destroy$)).subscribe();
33
47
  return controller;
34
48
  }
49
+ const tuiWatchedControllerFactory = watchedControllerFactory;
35
50
 
36
51
  /**
37
52
  * Generated bundle index. Do not edit.
38
53
  */
39
54
 
40
- export { MODE_PROVIDER, TUI_IS_MOBILE_RES_PROVIDER, isMobileResFactory, modeFactory, watchedControllerFactory };
55
+ export { MODE_PROVIDER, TUI_IS_MOBILE_RES_PROVIDER, isMobileResFactory, modeFactory, tuiIsMobileResFactory, tuiModeFactory, tuiWatchedControllerFactory, watchedControllerFactory };
41
56
  //# sourceMappingURL=taiga-ui-core-providers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-providers.js","sources":["ng://@taiga-ui/core/providers/is-mobile-resolution.provider.ts","ng://@taiga-ui/core/providers/mode.provider.ts","ng://@taiga-ui/core/providers/watched-controller-provider-factory.ts","ng://@taiga-ui/core/providers/taiga-ui-core-providers.ts"],"sourcesContent":["import {ElementRef, Provider, SkipSelf} from '@angular/core';\nimport {TUI_IS_MOBILE_RES} from '@taiga-ui/core/tokens';\nimport {Observable} from 'rxjs';\n\nexport function isMobileResFactory(\n mobile$: Observable<boolean>,\n {nativeElement}: ElementRef,\n): Observable<boolean> {\n nativeElement['$.class._mobile'] = mobile$;\n\n return mobile$;\n}\n\nexport const TUI_IS_MOBILE_RES_PROVIDER: Provider = {\n provide: TUI_IS_MOBILE_RES,\n deps: [[new SkipSelf(), TUI_IS_MOBILE_RES], ElementRef],\n useFactory: isMobileResFactory,\n};\n","import {ElementRef, Optional, Provider} from '@angular/core';\nimport {TuiModeDirective} from '@taiga-ui/core/directives/mode';\nimport {TUI_MODE} from '@taiga-ui/core/tokens';\nimport {TuiBrightness} from '@taiga-ui/core/types';\nimport {Observable, of} from 'rxjs';\nimport {map, startWith} from 'rxjs/operators';\n\nexport function modeFactory(\n mode: TuiModeDirective | null,\n {nativeElement}: ElementRef,\n): Observable<TuiBrightness | null> {\n const mode$ = mode\n ? mode.change$.pipe(\n startWith(null),\n map(() => mode.mode),\n )\n : of(null);\n\n nativeElement['$.data-mode.attr'] = mode$;\n\n return mode$;\n}\n\nexport const MODE_PROVIDER: Provider = {\n provide: TUI_MODE,\n deps: [[new Optional(), TuiModeDirective], ElementRef],\n useFactory: modeFactory,\n};\n","import {ChangeDetectorRef} from '@angular/core';\nimport {TuiController, watch} from '@taiga-ui/cdk';\nimport {Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\nexport function watchedControllerFactory(\n controller: TuiController,\n changeDetectorRef: ChangeDetectorRef,\n destroy$: Observable<void>,\n): TuiController {\n controller.change$.pipe(watch(changeDetectorRef), takeUntil(destroy$)).subscribe();\n\n return controller;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;SAIgB,kBAAkB,CAC9B,OAA4B,EAC5B,EAAC,aAAa,EAAa;IAE3B,aAAa,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC;IAE3C,OAAO,OAAO,CAAC;AACnB,CAAC;MAEY,0BAA0B,GAAa;IAChD,OAAO,EAAE,iBAAiB;IAC1B,IAAI,EAAE,CAAC,CAAC,IAAI,QAAQ,EAAE,EAAE,iBAAiB,CAAC,EAAE,UAAU,CAAC;IACvD,UAAU,EAAE,kBAAkB;;;SCTlB,WAAW,CACvB,IAA6B,EAC7B,EAAC,aAAa,EAAa;IAE3B,MAAM,KAAK,GAAG,IAAI;UACZ,IAAI,CAAC,OAAO,CAAC,IAAI,CACb,SAAS,CAAC,IAAI,CAAC,EACf,GAAG,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,CACvB;UACD,EAAE,CAAC,IAAI,CAAC,CAAC;IAEf,aAAa,CAAC,kBAAkB,CAAC,GAAG,KAAK,CAAC;IAE1C,OAAO,KAAK,CAAC;AACjB,CAAC;MAEY,aAAa,GAAa;IACnC,OAAO,EAAE,QAAQ;IACjB,IAAI,EAAE,CAAC,CAAC,IAAI,QAAQ,EAAE,EAAE,gBAAgB,CAAC,EAAE,UAAU,CAAC;IACtD,UAAU,EAAE,WAAW;;;SCrBX,wBAAwB,CACpC,UAAyB,EACzB,iBAAoC,EACpC,QAA0B;IAE1B,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;IAEnF,OAAO,UAAU,CAAC;AACtB;;ACbA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-providers.js","sources":["ng://@taiga-ui/core/providers/is-mobile-resolution.provider.ts","ng://@taiga-ui/core/providers/mode.provider.ts","ng://@taiga-ui/core/providers/watched-controller-provider-factory.ts","ng://@taiga-ui/core/providers/taiga-ui-core-providers.ts"],"sourcesContent":["import {ElementRef, Provider, SkipSelf} from '@angular/core';\nimport {TUI_IS_MOBILE_RES} from '@taiga-ui/core/tokens';\nimport {Observable} from 'rxjs';\n\n/**\n * @deprecated: use {@link tuiIsMobileResFactory} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function isMobileResFactory(\n mobile$: Observable<boolean>,\n {nativeElement}: ElementRef,\n): Observable<boolean> {\n nativeElement['$.class._mobile'] = mobile$;\n\n return mobile$;\n}\n\nexport const TUI_IS_MOBILE_RES_PROVIDER: Provider = {\n provide: TUI_IS_MOBILE_RES,\n deps: [[new SkipSelf(), TUI_IS_MOBILE_RES], ElementRef],\n useFactory: isMobileResFactory,\n};\n\nexport const tuiIsMobileResFactory = isMobileResFactory;\n","import {ElementRef, Optional, Provider} from '@angular/core';\nimport {TuiModeDirective} from '@taiga-ui/core/directives/mode';\nimport {TUI_MODE} from '@taiga-ui/core/tokens';\nimport {TuiBrightness} from '@taiga-ui/core/types';\nimport {Observable, of} from 'rxjs';\nimport {map, startWith} from 'rxjs/operators';\n\n/**\n * @deprecated: use {@link tuiModeFactory} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function modeFactory(\n mode: TuiModeDirective | null,\n {nativeElement}: ElementRef,\n): Observable<TuiBrightness | null> {\n const mode$ = mode\n ? mode.change$.pipe(\n startWith(null),\n map(() => mode.mode),\n )\n : of(null);\n\n nativeElement['$.data-mode.attr'] = mode$;\n\n return mode$;\n}\n\nexport const MODE_PROVIDER: Provider = {\n provide: TUI_MODE,\n deps: [[new Optional(), TuiModeDirective], ElementRef],\n useFactory: modeFactory,\n};\n\nexport const tuiModeFactory = modeFactory;\n","import {ChangeDetectorRef} from '@angular/core';\nimport {TuiController, watch} from '@taiga-ui/cdk';\nimport {Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\n/**\n * @deprecated: use {@link tuiWatchedControllerFactory} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function watchedControllerFactory(\n controller: TuiController,\n changeDetectorRef: ChangeDetectorRef,\n destroy$: Observable<void>,\n): TuiController {\n controller.change$.pipe(watch(changeDetectorRef), takeUntil(destroy$)).subscribe();\n\n return controller;\n}\n\nexport const tuiWatchedControllerFactory = watchedControllerFactory;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAIA;;;AAGA;SACgB,kBAAkB,CAC9B,OAA4B,EAC5B,EAAC,aAAa,EAAa;IAE3B,aAAa,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC;IAE3C,OAAO,OAAO,CAAC;AACnB,CAAC;MAEY,0BAA0B,GAAa;IAChD,OAAO,EAAE,iBAAiB;IAC1B,IAAI,EAAE,CAAC,CAAC,IAAI,QAAQ,EAAE,EAAE,iBAAiB,CAAC,EAAE,UAAU,CAAC;IACvD,UAAU,EAAE,kBAAkB;EAChC;MAEW,qBAAqB,GAAG;;AChBrC;;;AAGA;SACgB,WAAW,CACvB,IAA6B,EAC7B,EAAC,aAAa,EAAa;IAE3B,MAAM,KAAK,GAAG,IAAI;UACZ,IAAI,CAAC,OAAO,CAAC,IAAI,CACb,SAAS,CAAC,IAAI,CAAC,EACf,GAAG,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,CACvB;UACD,EAAE,CAAC,IAAI,CAAC,CAAC;IAEf,aAAa,CAAC,kBAAkB,CAAC,GAAG,KAAK,CAAC;IAE1C,OAAO,KAAK,CAAC;AACjB,CAAC;MAEY,aAAa,GAAa;IACnC,OAAO,EAAE,QAAQ;IACjB,IAAI,EAAE,CAAC,CAAC,IAAI,QAAQ,EAAE,EAAE,gBAAgB,CAAC,EAAE,UAAU,CAAC;IACtD,UAAU,EAAE,WAAW;EACzB;MAEW,cAAc,GAAG;;AC5B9B;;;AAGA;SACgB,wBAAwB,CACpC,UAAyB,EACzB,iBAAoC,EACpC,QAA0B;IAE1B,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;IAEnF,OAAO,UAAU,CAAC;AACtB,CAAC;MAEY,2BAA2B,GAAG;;ACnB3C;;;;;;"}
@@ -1,12 +1,19 @@
1
1
  import { isEdgeOlderThan } from '@taiga-ui/cdk';
2
2
 
3
3
  /**
4
+ * @deprecated: use {@link tuiAreCssVarsSupported} instead
4
5
  * TODO: 3.0 remove this function
5
6
  */
7
+ // eslint-disable-next-line @typescript-eslint/naming-convention
6
8
  function areCssVarsSupported(cssRef, userAgent) {
7
9
  return cssRef.supports('(--a: 0)') && !isEdgeOlderThan(17, userAgent);
8
10
  }
11
+ const tuiAreCssVarsSupported = areCssVarsSupported;
9
12
 
13
+ /**
14
+ * @deprecated: use {@link tuiCheckFixedPosition} instead
15
+ */
16
+ // eslint-disable-next-line @typescript-eslint/naming-convention
10
17
  function checkFixedPosition(element) {
11
18
  if (!element || typeof getComputedStyle === 'undefined') {
12
19
  return false;
@@ -15,12 +22,15 @@ function checkFixedPosition(element) {
15
22
  return (style.getPropertyValue('position') === 'fixed' ||
16
23
  checkFixedPosition(element.parentElement));
17
24
  }
25
+ const tuiCheckFixedPosition = checkFixedPosition;
18
26
 
19
27
  /**
28
+ * @deprecated: use {@link tuiGetSafeAreaSize} instead
20
29
  * Calculates size of safe area on mobile devices (status bars)
21
30
  *
22
31
  * ATTENTION: Only use in browser environment
23
32
  */
33
+ // eslint-disable-next-line @typescript-eslint/naming-convention
24
34
  function getSafeAreaSize() {
25
35
  if (!CSS.supports('padding-top: env(safe-area-inset-top)')) {
26
36
  return 0;
@@ -32,10 +42,16 @@ function getSafeAreaSize() {
32
42
  document.body.removeChild(div);
33
43
  return safeAreaSize;
34
44
  }
45
+ const tuiGetSafeAreaSize = getSafeAreaSize;
35
46
 
47
+ /**
48
+ * @deprecated: use {@link tuiGetScreenWidth} instead
49
+ */
50
+ // eslint-disable-next-line @typescript-eslint/naming-convention
36
51
  function getScreenWidth(documentRef) {
37
52
  return Math.max(documentRef.documentElement.clientWidth, documentRef.defaultView ? documentRef.defaultView.innerWidth : 0);
38
53
  }
54
+ const tuiGetScreenWidth = getScreenWidth;
39
55
 
40
56
  /**
41
57
  * @description:
@@ -82,6 +98,10 @@ function tuiGetViewportWidth({ document, innerWidth }) {
82
98
  const WIDTH_SEARCH = 'width="';
83
99
  const HEIGHT_SEARCH = 'height="';
84
100
  const START = '<svg';
101
+ /**
102
+ * @deprecated: use {@link tuiProcessIcon} instead
103
+ */
104
+ // eslint-disable-next-line @typescript-eslint/naming-convention
85
105
  function processIcon(source, name) {
86
106
  if (source.includes(`id="${name}"`)) {
87
107
  return source;
@@ -111,10 +131,11 @@ function processIcon(source, name) {
111
131
  const height = parseInt(heightString, 10);
112
132
  return `<g id="${name}" xmlns="http://www.w3.org/2000/svg"><svg x="50%" y="50%" width="${width / 16}em" height="${height / 16}em" overflow="visible" viewBox="0 0 ${width} ${height}"><svg x="${-width / 2}" y="${-height / 2}">${src}</svg></svg></g>`;
113
133
  }
134
+ const tuiProcessIcon = processIcon;
114
135
 
115
136
  /**
116
137
  * Generated bundle index. Do not edit.
117
138
  */
118
139
 
119
- export { areCssVarsSupported, checkFixedPosition, getSafeAreaSize, getScreenWidth, processIcon, tuiGetViewportHeight, tuiGetViewportWidth };
140
+ export { areCssVarsSupported, checkFixedPosition, getSafeAreaSize, getScreenWidth, processIcon, tuiAreCssVarsSupported, tuiCheckFixedPosition, tuiGetSafeAreaSize, tuiGetScreenWidth, tuiGetViewportHeight, tuiGetViewportWidth, tuiProcessIcon };
120
141
  //# sourceMappingURL=taiga-ui-core-utils-dom.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-utils-dom.js","sources":["ng://@taiga-ui/core/utils/dom/are-css-vars-supported.ts","ng://@taiga-ui/core/utils/dom/check-fixed-position.ts","ng://@taiga-ui/core/utils/dom/get-safe-area-size.ts","ng://@taiga-ui/core/utils/dom/get-screen-width.ts","ng://@taiga-ui/core/utils/dom/get-viewport-height.ts","ng://@taiga-ui/core/utils/dom/get-viewport-width.ts","ng://@taiga-ui/core/utils/dom/process-icon.ts","ng://@taiga-ui/core/utils/dom/taiga-ui-core-utils-dom.ts"],"sourcesContent":["import {isEdgeOlderThan} from '@taiga-ui/cdk';\n\n/**\n * TODO: 3.0 remove this function\n */\nexport function areCssVarsSupported(cssRef: typeof CSS, userAgent: string): boolean {\n return cssRef.supports('(--a: 0)') && !isEdgeOlderThan(17, userAgent);\n}\n","export function checkFixedPosition(element: HTMLElement | null): boolean {\n if (!element || typeof getComputedStyle === 'undefined') {\n return false;\n }\n\n const style = getComputedStyle(element);\n\n return (\n style.getPropertyValue('position') === 'fixed' ||\n checkFixedPosition(element.parentElement)\n );\n}\n","/**\n * Calculates size of safe area on mobile devices (status bars)\n *\n * ATTENTION: Only use in browser environment\n */\nexport function getSafeAreaSize(): number {\n if (!CSS.supports('padding-top: env(safe-area-inset-top)')) {\n return 0;\n }\n\n const div = document.createElement('div');\n\n div.style.paddingTop = 'env(safe-area-inset-top)';\n document.body.appendChild(div);\n\n const safeAreaSize = parseInt(window.getComputedStyle(div).paddingTop!, 10) || 0;\n\n document.body.removeChild(div);\n\n return safeAreaSize;\n}\n","export function getScreenWidth(documentRef: Document): number {\n return Math.max(\n documentRef.documentElement.clientWidth,\n documentRef.defaultView ? documentRef.defaultView.innerWidth : 0,\n );\n}\n","/**\n * @description:\n * Cross-browser @media (height)\n *\n * 1. window.innerWidth\n * 1.1. gets CSS viewport @media (height) which include scrollbars\n * 1.2. initial-scale and zoom variations may cause mobile values to\n * wrongly scale down to what PPK calls the visual\n * viewport and be smaller than the @media values\n * 1.3. zoom may cause values to be 1px off due to native rounding\n *\n * 2. document.documentElement.clientHeight\n * 2.1. equals CSS viewport width minus scrollbar width\n * 2.2. matches @media (height) when there is no scrollbar\n * 2.3. available cross-browser\n * 2.4. inaccurate if doctype is missing\n */\nexport function tuiGetViewportHeight({document, innerHeight}: Window): number {\n return Math.max(document.documentElement.clientHeight || 0, innerHeight || 0);\n}\n","/**\n * @description:\n * Cross-browser @media (width)\n *\n * 1. window.innerWidth\n * 1.1. gets CSS viewport @media (width) which include scrollbars\n * 1.2. initial-scale and zoom variations may cause mobile values to\n * wrongly scale down to what PPK calls the visual\n * viewport and be smaller than the @media values\n * 1.3. zoom may cause values to be 1px off due to native rounding\n *\n * 2. document.documentElement.clientWidth\n * 2.1. equals CSS viewport width minus scrollbar width\n * 2.2. matches @media (width) when there is no scrollbar\n * 2.3. available cross-browser\n * 2.4. inaccurate if doctype is missing\n */\nexport function tuiGetViewportWidth({document, innerWidth}: Window): number {\n return Math.max(document.documentElement.clientWidth || 0, innerWidth || 0);\n}\n","const WIDTH_SEARCH = 'width=\"';\nconst HEIGHT_SEARCH = 'height=\"';\nconst START = '<svg';\n\nexport function processIcon(source: string, name: string): string {\n if (source.includes(`id=\"${name}\"`)) {\n return source;\n }\n\n const src = source.slice(Math.max(0, source.indexOf(START)));\n const attributes = src.slice(0, Math.max(0, src.indexOf('>')));\n\n if (\n !attributes ||\n !attributes.includes(WIDTH_SEARCH) ||\n !attributes.includes(HEIGHT_SEARCH)\n ) {\n return `${src.replace(\n START,\n `<svg xmlns=\"http://www.w3.org/2000/svg\"><g id=\"${name}\" xmlns=\"http://www.w3.org/2000/svg\"><svg`,\n )}</g></svg>`;\n }\n\n const indexOfWidth = attributes.indexOf(WIDTH_SEARCH);\n const indexOfHeight = attributes.indexOf(HEIGHT_SEARCH);\n const widthOffset = indexOfWidth + WIDTH_SEARCH.length;\n const heightOffset = indexOfHeight + HEIGHT_SEARCH.length;\n const widthString = attributes.slice(\n widthOffset,\n attributes.indexOf('\"', widthOffset),\n );\n const heightString = attributes.slice(\n heightOffset,\n attributes.indexOf('\"', heightOffset),\n );\n\n if (\n !heightString ||\n !widthString ||\n widthString.includes('%') ||\n heightString.includes('%') ||\n widthString.includes('em') ||\n heightString.includes('em')\n ) {\n return src.replace(START, `<svg id=\"${name}\"`);\n }\n\n const width = parseInt(widthString, 10);\n const height = parseInt(heightString, 10);\n\n return `<g id=\"${name}\" xmlns=\"http://www.w3.org/2000/svg\"><svg x=\"50%\" y=\"50%\" width=\"${\n width / 16\n }em\" height=\"${\n height / 16\n }em\" overflow=\"visible\" viewBox=\"0 0 ${width} ${height}\"><svg x=\"${-width / 2}\" y=\"${\n -height / 2\n }\">${src}</svg></svg></g>`;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAEA;;;SAGgB,mBAAmB,CAAC,MAAkB,EAAE,SAAiB;IACrE,OAAO,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;AAC1E;;SCPgB,kBAAkB,CAAC,OAA2B;IAC1D,IAAI,CAAC,OAAO,IAAI,OAAO,gBAAgB,KAAK,WAAW,EAAE;QACrD,OAAO,KAAK,CAAC;KAChB;IAED,MAAM,KAAK,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAExC,QACI,KAAK,CAAC,gBAAgB,CAAC,UAAU,CAAC,KAAK,OAAO;QAC9C,kBAAkB,CAAC,OAAO,CAAC,aAAa,CAAC,EAC3C;AACN;;ACXA;;;;;SAKgB,eAAe;IAC3B,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,uCAAuC,CAAC,EAAE;QACxD,OAAO,CAAC,CAAC;KACZ;IAED,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,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I,GAAG,CAAC,CAAC;KAClD;IAED,MAAM,KAAK,GAAG,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IACxC,MAAM,MAAM,GAAG,QAAQ,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;IAE1C,OAAO,UAAU,IAAI,qEACjB,KAAK,GAAG,EACZ,eACI,MAAM,GAAG,EACb,uCAAuC,KAAK,IAAI,MAAM,aAAa,CAAC,KAAK,GAAG,CAAC,QACzE,CAAC,MAAM,GAAG,CACd,KAAK,GAAG,kBAAkB,CAAC;AAC/B;;ACzDA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-utils-dom.js","sources":["ng://@taiga-ui/core/utils/dom/are-css-vars-supported.ts","ng://@taiga-ui/core/utils/dom/check-fixed-position.ts","ng://@taiga-ui/core/utils/dom/get-safe-area-size.ts","ng://@taiga-ui/core/utils/dom/get-screen-width.ts","ng://@taiga-ui/core/utils/dom/get-viewport-height.ts","ng://@taiga-ui/core/utils/dom/get-viewport-width.ts","ng://@taiga-ui/core/utils/dom/process-icon.ts","ng://@taiga-ui/core/utils/dom/taiga-ui-core-utils-dom.ts"],"sourcesContent":["import {isEdgeOlderThan} from '@taiga-ui/cdk';\n\n/**\n * @deprecated: use {@link tuiAreCssVarsSupported} instead\n * TODO: 3.0 remove this function\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function areCssVarsSupported(cssRef: typeof CSS, userAgent: string): boolean {\n return cssRef.supports('(--a: 0)') && !isEdgeOlderThan(17, userAgent);\n}\n\nexport const tuiAreCssVarsSupported = areCssVarsSupported;\n","/**\n * @deprecated: use {@link tuiCheckFixedPosition} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function checkFixedPosition(element: HTMLElement | null): boolean {\n if (!element || typeof getComputedStyle === 'undefined') {\n return false;\n }\n\n const style = getComputedStyle(element);\n\n return (\n style.getPropertyValue('position') === 'fixed' ||\n checkFixedPosition(element.parentElement)\n );\n}\n\nexport const tuiCheckFixedPosition = checkFixedPosition;\n","/**\n * @deprecated: use {@link tuiGetSafeAreaSize} instead\n * Calculates size of safe area on mobile devices (status bars)\n *\n * ATTENTION: Only use in browser environment\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function getSafeAreaSize(): number {\n if (!CSS.supports('padding-top: env(safe-area-inset-top)')) {\n return 0;\n }\n\n const div = document.createElement('div');\n\n div.style.paddingTop = 'env(safe-area-inset-top)';\n document.body.appendChild(div);\n\n const safeAreaSize = parseInt(window.getComputedStyle(div).paddingTop!, 10) || 0;\n\n document.body.removeChild(div);\n\n return safeAreaSize;\n}\n\nexport const tuiGetSafeAreaSize = getSafeAreaSize;\n","/**\n * @deprecated: use {@link tuiGetScreenWidth} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function getScreenWidth(documentRef: Document): number {\n return Math.max(\n documentRef.documentElement.clientWidth,\n documentRef.defaultView ? documentRef.defaultView.innerWidth : 0,\n );\n}\n\nexport const tuiGetScreenWidth = getScreenWidth;\n","/**\n * @description:\n * Cross-browser @media (height)\n *\n * 1. window.innerWidth\n * 1.1. gets CSS viewport @media (height) which include scrollbars\n * 1.2. initial-scale and zoom variations may cause mobile values to\n * wrongly scale down to what PPK calls the visual\n * viewport and be smaller than the @media values\n * 1.3. zoom may cause values to be 1px off due to native rounding\n *\n * 2. document.documentElement.clientHeight\n * 2.1. equals CSS viewport width minus scrollbar width\n * 2.2. matches @media (height) when there is no scrollbar\n * 2.3. available cross-browser\n * 2.4. inaccurate if doctype is missing\n */\nexport function tuiGetViewportHeight({document, innerHeight}: Window): number {\n return Math.max(document.documentElement.clientHeight || 0, innerHeight || 0);\n}\n","/**\n * @description:\n * Cross-browser @media (width)\n *\n * 1. window.innerWidth\n * 1.1. gets CSS viewport @media (width) which include scrollbars\n * 1.2. initial-scale and zoom variations may cause mobile values to\n * wrongly scale down to what PPK calls the visual\n * viewport and be smaller than the @media values\n * 1.3. zoom may cause values to be 1px off due to native rounding\n *\n * 2. document.documentElement.clientWidth\n * 2.1. equals CSS viewport width minus scrollbar width\n * 2.2. matches @media (width) when there is no scrollbar\n * 2.3. available cross-browser\n * 2.4. inaccurate if doctype is missing\n */\nexport function tuiGetViewportWidth({document, innerWidth}: Window): number {\n return Math.max(document.documentElement.clientWidth || 0, innerWidth || 0);\n}\n","const WIDTH_SEARCH = 'width=\"';\nconst HEIGHT_SEARCH = 'height=\"';\nconst START = '<svg';\n\n/**\n * @deprecated: use {@link tuiProcessIcon} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function processIcon(source: string, name: string): string {\n if (source.includes(`id=\"${name}\"`)) {\n return source;\n }\n\n const src = source.slice(Math.max(0, source.indexOf(START)));\n const attributes = src.slice(0, Math.max(0, src.indexOf('>')));\n\n if (\n !attributes ||\n !attributes.includes(WIDTH_SEARCH) ||\n !attributes.includes(HEIGHT_SEARCH)\n ) {\n return `${src.replace(\n START,\n `<svg xmlns=\"http://www.w3.org/2000/svg\"><g id=\"${name}\" xmlns=\"http://www.w3.org/2000/svg\"><svg`,\n )}</g></svg>`;\n }\n\n const indexOfWidth = attributes.indexOf(WIDTH_SEARCH);\n const indexOfHeight = attributes.indexOf(HEIGHT_SEARCH);\n const widthOffset = indexOfWidth + WIDTH_SEARCH.length;\n const heightOffset = indexOfHeight + HEIGHT_SEARCH.length;\n const widthString = attributes.slice(\n widthOffset,\n attributes.indexOf('\"', widthOffset),\n );\n const heightString = attributes.slice(\n heightOffset,\n attributes.indexOf('\"', heightOffset),\n );\n\n if (\n !heightString ||\n !widthString ||\n widthString.includes('%') ||\n heightString.includes('%') ||\n widthString.includes('em') ||\n heightString.includes('em')\n ) {\n return src.replace(START, `<svg id=\"${name}\"`);\n }\n\n const width = parseInt(widthString, 10);\n const height = parseInt(heightString, 10);\n\n return `<g id=\"${name}\" xmlns=\"http://www.w3.org/2000/svg\"><svg x=\"50%\" y=\"50%\" width=\"${\n width / 16\n }em\" height=\"${\n height / 16\n }em\" overflow=\"visible\" viewBox=\"0 0 ${width} ${height}\"><svg x=\"${-width / 2}\" y=\"${\n -height / 2\n }\">${src}</svg></svg></g>`;\n}\n\nexport const tuiProcessIcon = processIcon;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAEA;;;;AAIA;SACgB,mBAAmB,CAAC,MAAkB,EAAE,SAAiB;IACrE,OAAO,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;AAC1E,CAAC;MAEY,sBAAsB,GAAG;;ACXtC;;;AAGA;SACgB,kBAAkB,CAAC,OAA2B;IAC1D,IAAI,CAAC,OAAO,IAAI,OAAO,gBAAgB,KAAK,WAAW,EAAE;QACrD,OAAO,KAAK,CAAC;KAChB;IAED,MAAM,KAAK,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAExC,QACI,KAAK,CAAC,gBAAgB,CAAC,UAAU,CAAC,KAAK,OAAO;QAC9C,kBAAkB,CAAC,OAAO,CAAC,aAAa,CAAC,EAC3C;AACN,CAAC;MAEY,qBAAqB,GAAG;;ACjBrC;;;;;;AAMA;SACgB,eAAe;IAC3B,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,uCAAuC,CAAC,EAAE;QACxD,OAAO,CAAC,CAAC;KACZ;IAED,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAE1C,GAAG,CAAC,KAAK,CAAC,UAAU,GAAG,0BAA0B,CAAC;IAClD,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAE/B,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,UAAW,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;IAEjF,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAE/B,OAAO,YAAY,CAAC;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AM,aAAa,CAAC,KAAK,GAAG,CAAC,QACzE,CAAC,MAAM,GAAG,CACd,KAAK,GAAG,kBAAkB,CAAC;AAC/B,CAAC;MAEY,cAAc,GAAG;;AC/D9B;;;;;;"}
@@ -1,26 +1,36 @@
1
1
  import { CHAR_NO_BREAK_SPACE, CHAR_HYPHEN, CHAR_PLUS } from '@taiga-ui/cdk';
2
2
 
3
3
  /**
4
+ * @deprecated: use {@link tuiCapitalize} instead
4
5
  * Capitalizes a given string, replacing it with a lowercase string and making
5
6
  * the first letter of each word uppercase.
6
7
  *
7
8
  * @param value the input string
8
9
  * @return the capitalized string
9
10
  */
11
+ // eslint-disable-next-line @typescript-eslint/naming-convention
10
12
  function capitalize(value) {
11
13
  return value.toLowerCase().replace(/(?:^|\s)\S/g, char => char.toUpperCase());
12
14
  }
15
+ const tuiCapitalize = capitalize;
13
16
 
17
+ /**
18
+ * @deprecated: use {@link tuiCapitalizeFirstLetter} instead
19
+ */
20
+ // eslint-disable-next-line @typescript-eslint/naming-convention
14
21
  function capitalizeFirstLetter(value) {
15
22
  return `${value.charAt(0).toUpperCase()}${value.slice(1)}`;
16
23
  }
24
+ const tuiCapitalizeFirstLetter = capitalizeFirstLetter;
17
25
 
18
26
  /**
27
+ * @deprecated: use {@link tuiNumberToStringWithoutExp} instead
19
28
  * Convert number to string with replacing exponent part on decimals
20
29
  *
21
30
  * @param value the number
22
31
  * @return string representation of a number
23
32
  */
33
+ // eslint-disable-next-line @typescript-eslint/naming-convention
24
34
  function numberToStringWithoutExp(value) {
25
35
  const valueAsString = String(value);
26
36
  const [numberPart, expPart] = valueAsString.split('e-');
@@ -32,23 +42,28 @@ function numberToStringWithoutExp(value) {
32
42
  }
33
43
  return valueWithoutExp;
34
44
  }
45
+ const tuiNumberToStringWithoutExp = numberToStringWithoutExp;
35
46
 
36
47
  /**
48
+ * @deprecated: use {@link tuiGetFractionPartPadded} instead
37
49
  * Return fractional part of number
38
50
  *
39
51
  * @param value the number
40
52
  * @param precision number of digits of decimal part, null to keep untouched
41
53
  * @return the fractional part of number
42
54
  */
55
+ // eslint-disable-next-line @typescript-eslint/naming-convention
43
56
  function getFractionPartPadded(value, precision) {
44
57
  const [, fractionPartPadded = ''] = numberToStringWithoutExp(value).split('.');
45
58
  return typeof precision === 'number'
46
59
  ? fractionPartPadded.slice(0, Math.max(0, precision))
47
60
  : fractionPartPadded;
48
61
  }
62
+ const tuiGetFractionPartPadded = getFractionPartPadded;
49
63
 
50
64
  // TODO: refactor later to `formatNumber(value: number, options: Partial<AllTheStuff>)`
51
65
  /**
66
+ * @deprecated: use {@link tuiFormatNumber} instead
52
67
  * Formats number adding a thousand separators and correct decimal separator
53
68
  * padding decimal part with zeroes to given length
54
69
  *
@@ -59,6 +74,7 @@ function getFractionPartPadded(value, precision) {
59
74
  * @param zeroPadding enable zeros at the end of decimal part
60
75
  * @return the formatted string
61
76
  */
77
+ // eslint-disable-next-line @typescript-eslint/naming-convention
62
78
  function formatNumber(value, decimalLimit = null, decimalSeparator = ',', thousandSeparator = CHAR_NO_BREAK_SPACE, zeroPadding = true) {
63
79
  const integerPartString = String(Math.floor(Math.abs(value)));
64
80
  let fractionPartPadded = getFractionPartPadded(value, decimalLimit);
@@ -83,8 +99,10 @@ function formatNumber(value, decimalLimit = null, decimalSeparator = ',', thousa
83
99
  }
84
100
  return fractionPartPadded ? result + decimalSeparator + fractionPartPadded : result;
85
101
  }
102
+ const tuiFormatNumber = formatNumber;
86
103
 
87
104
  /**
105
+ * @deprecated: use {@link tuiFormatPhone} instead
88
106
  * Formats a string with the phone format +7XXXXXXXXXXXX or XXXXXXXXXXXX,
89
107
  * adding parentheses and hyphens.
90
108
  *
@@ -93,6 +111,7 @@ function formatNumber(value, decimalLimit = null, decimalSeparator = ',', thousa
93
111
  * @param phoneMask a phone number mask
94
112
  * @return the formatted phone string of the form +7 XXX XXX-XX-XX
95
113
  */
114
+ // eslint-disable-next-line @typescript-eslint/naming-convention
96
115
  function formatPhone(value, countryCode, phoneMask) {
97
116
  if (!value) {
98
117
  return '';
@@ -122,10 +141,16 @@ function formatPhone(value, countryCode, phoneMask) {
122
141
  }
123
142
  return result;
124
143
  }
144
+ const tuiFormatPhone = formatPhone;
125
145
 
146
+ /**
147
+ * @deprecated: use {@link tuiOtherDecimalSymbol} instead
148
+ */
149
+ // eslint-disable-next-line @typescript-eslint/naming-convention
126
150
  function otherDecimalSymbol(symbol) {
127
151
  return symbol === '.' ? ',' : '.';
128
152
  }
153
+ const tuiOtherDecimalSymbol = otherDecimalSymbol;
129
154
 
130
155
  /**
131
156
  * Selects the correct plural form to display.
@@ -135,6 +160,7 @@ function otherDecimalSymbol(symbol) {
135
160
  * @deprecated This implementation targets Russian.
136
161
  * Use https://angular.io/api/common/NgPlural for your implementations.
137
162
  */
163
+ // eslint-disable-next-line @typescript-eslint/naming-convention
138
164
  function pluralize(value, [one, few, many]) {
139
165
  const ten = value % 10;
140
166
  const hundred = value % 100;
@@ -166,5 +192,5 @@ function tuiPluralizeToICU(pluralize) {
166
192
  * Generated bundle index. Do not edit.
167
193
  */
168
194
 
169
- export { capitalize, capitalizeFirstLetter, formatNumber, formatPhone, getFractionPartPadded, numberToStringWithoutExp, otherDecimalSymbol, pluralize, tuiPluralizeToICU };
195
+ export { capitalize, capitalizeFirstLetter, formatNumber, formatPhone, getFractionPartPadded, numberToStringWithoutExp, otherDecimalSymbol, pluralize, tuiCapitalize, tuiCapitalizeFirstLetter, tuiFormatNumber, tuiFormatPhone, tuiGetFractionPartPadded, tuiNumberToStringWithoutExp, tuiOtherDecimalSymbol, tuiPluralizeToICU };
170
196
  //# sourceMappingURL=taiga-ui-core-utils-format.js.map