@taiga-ui/cdk 3.0.0-rc.0 → 3.0.0-rc.3

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 (479) hide show
  1. package/abstract/control.d.ts +2 -1
  2. package/abstract/dialog.service.d.ts +1 -1
  3. package/abstract/portal-host.d.ts +5 -3
  4. package/abstract/portal-service.d.ts +3 -2
  5. package/abstract/theme-switcher.d.ts +0 -1
  6. package/bundles/taiga-ui-cdk-abstract.umd.js +25 -16
  7. package/bundles/taiga-ui-cdk-abstract.umd.js.map +1 -1
  8. package/bundles/taiga-ui-cdk-classes.umd.js +0 -8
  9. package/bundles/taiga-ui-cdk-classes.umd.js.map +1 -1
  10. package/bundles/taiga-ui-cdk-components-dialog-host.umd.js +0 -1
  11. package/bundles/taiga-ui-cdk-components-dialog-host.umd.js.map +1 -1
  12. package/bundles/taiga-ui-cdk-components-dropdown-host.umd.js +3 -1
  13. package/bundles/taiga-ui-cdk-components-dropdown-host.umd.js.map +1 -1
  14. package/bundles/taiga-ui-cdk-constants.umd.js +18 -1
  15. package/bundles/taiga-ui-cdk-constants.umd.js.map +1 -1
  16. package/bundles/taiga-ui-cdk-date-time.umd.js +3 -29
  17. package/bundles/taiga-ui-cdk-date-time.umd.js.map +1 -1
  18. package/bundles/taiga-ui-cdk-directives-active-zone.umd.js +5 -6
  19. package/bundles/taiga-ui-cdk-directives-active-zone.umd.js.map +1 -1
  20. package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js +8 -9
  21. package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js.map +1 -1
  22. package/bundles/taiga-ui-cdk-directives-autofilled.umd.js +1 -1
  23. package/bundles/taiga-ui-cdk-directives-autofilled.umd.js.map +1 -1
  24. package/bundles/taiga-ui-cdk-directives-copy-processor.umd.js +0 -1
  25. package/bundles/taiga-ui-cdk-directives-copy-processor.umd.js.map +1 -1
  26. package/bundles/taiga-ui-cdk-directives-drag.umd.js +1 -1
  27. package/bundles/taiga-ui-cdk-directives-drag.umd.js.map +1 -1
  28. package/bundles/taiga-ui-cdk-directives-droppable.umd.js +5 -6
  29. package/bundles/taiga-ui-cdk-directives-droppable.umd.js.map +1 -1
  30. package/bundles/taiga-ui-cdk-directives-focus-trap.umd.js +11 -9
  31. package/bundles/taiga-ui-cdk-directives-focus-trap.umd.js.map +1 -1
  32. package/bundles/taiga-ui-cdk-directives-focus-visible.umd.js +0 -1
  33. package/bundles/taiga-ui-cdk-directives-focus-visible.umd.js.map +1 -1
  34. package/bundles/taiga-ui-cdk-directives-focused.umd.js +1 -1
  35. package/bundles/taiga-ui-cdk-directives-focused.umd.js.map +1 -1
  36. package/bundles/taiga-ui-cdk-directives-high-dpi.umd.js +0 -1
  37. package/bundles/taiga-ui-cdk-directives-high-dpi.umd.js.map +1 -1
  38. package/bundles/taiga-ui-cdk-directives-hovered.umd.js +7 -10
  39. package/bundles/taiga-ui-cdk-directives-hovered.umd.js.map +1 -1
  40. package/bundles/taiga-ui-cdk-directives-media.umd.js +4 -11
  41. package/bundles/taiga-ui-cdk-directives-media.umd.js.map +1 -1
  42. package/bundles/taiga-ui-cdk-directives-overscroll.umd.js +10 -12
  43. package/bundles/taiga-ui-cdk-directives-overscroll.umd.js.map +1 -1
  44. package/bundles/taiga-ui-cdk-directives-pan.umd.js +0 -1
  45. package/bundles/taiga-ui-cdk-directives-pan.umd.js.map +1 -1
  46. package/bundles/taiga-ui-cdk-directives-pressed.umd.js +1 -1
  47. package/bundles/taiga-ui-cdk-directives-pressed.umd.js.map +1 -1
  48. package/bundles/taiga-ui-cdk-directives-prevent-default.umd.js +1 -2
  49. package/bundles/taiga-ui-cdk-directives-prevent-default.umd.js.map +1 -1
  50. package/bundles/taiga-ui-cdk-directives-repeat-times.umd.js +1 -1
  51. package/bundles/taiga-ui-cdk-directives-repeat-times.umd.js.map +1 -1
  52. package/bundles/taiga-ui-cdk-directives-resize.umd.js +0 -1
  53. package/bundles/taiga-ui-cdk-directives-resize.umd.js.map +1 -1
  54. package/bundles/taiga-ui-cdk-directives-swipe.umd.js +0 -1
  55. package/bundles/taiga-ui-cdk-directives-swipe.umd.js.map +1 -1
  56. package/bundles/taiga-ui-cdk-directives-zoom.umd.js +0 -1
  57. package/bundles/taiga-ui-cdk-directives-zoom.umd.js.map +1 -1
  58. package/bundles/taiga-ui-cdk-observables.umd.js +20 -76
  59. package/bundles/taiga-ui-cdk-observables.umd.js.map +1 -1
  60. package/bundles/taiga-ui-cdk-pipes-keys.umd.js +68 -0
  61. package/bundles/taiga-ui-cdk-pipes-keys.umd.js.map +1 -0
  62. package/bundles/taiga-ui-cdk-pipes.umd.js +10 -4
  63. package/bundles/taiga-ui-cdk-pipes.umd.js.map +1 -1
  64. package/bundles/taiga-ui-cdk-services.umd.js +37 -72
  65. package/bundles/taiga-ui-cdk-services.umd.js.map +1 -1
  66. package/bundles/taiga-ui-cdk-tokens.umd.js +46 -20
  67. package/bundles/taiga-ui-cdk-tokens.umd.js.map +1 -1
  68. package/bundles/taiga-ui-cdk-utils-browser.umd.js +3 -26
  69. package/bundles/taiga-ui-cdk-utils-browser.umd.js.map +1 -1
  70. package/bundles/taiga-ui-cdk-utils-color.umd.js +81 -0
  71. package/bundles/taiga-ui-cdk-utils-color.umd.js.map +1 -0
  72. package/bundles/taiga-ui-cdk-utils-dom.umd.js +57 -87
  73. package/bundles/taiga-ui-cdk-utils-dom.umd.js.map +1 -1
  74. package/bundles/taiga-ui-cdk-utils-focus.umd.js +24 -67
  75. package/bundles/taiga-ui-cdk-utils-focus.umd.js.map +1 -1
  76. package/bundles/taiga-ui-cdk-utils-format.umd.js +0 -1
  77. package/bundles/taiga-ui-cdk-utils-format.umd.js.map +1 -1
  78. package/bundles/taiga-ui-cdk-utils-math.umd.js +8 -48
  79. package/bundles/taiga-ui-cdk-utils-math.umd.js.map +1 -1
  80. package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.js +349 -84
  81. package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.js.map +1 -1
  82. package/bundles/taiga-ui-cdk-utils-os.umd.js +5 -21
  83. package/bundles/taiga-ui-cdk-utils-os.umd.js.map +1 -1
  84. package/bundles/taiga-ui-cdk-utils-svg.umd.js +1 -5
  85. package/bundles/taiga-ui-cdk-utils-svg.umd.js.map +1 -1
  86. package/bundles/taiga-ui-cdk-utils.umd.js +10 -4
  87. package/bundles/taiga-ui-cdk-utils.umd.js.map +1 -1
  88. package/classes/assert.d.ts +0 -3
  89. package/constants/browser.d.ts +4 -0
  90. package/constants/index.d.ts +1 -0
  91. package/constants/unicode-chars.d.ts +8 -0
  92. package/constants/version.d.ts +1 -0
  93. package/constants/version.js +4 -0
  94. package/date-time/day-range.d.ts +0 -5
  95. package/date-time/day.d.ts +1 -2
  96. package/date-time/month.d.ts +1 -2
  97. package/date-time/year.d.ts +1 -1
  98. package/directives/auto-focus/autofocus.directive.d.ts +2 -2
  99. package/directives/focus-visible/focus-visible.directive.d.ts +0 -1
  100. package/directives/high-dpi/high-dpi.directive.d.ts +0 -1
  101. package/directives/media/media.directive.d.ts +0 -2
  102. package/directives/overscroll/overscroll.directive.d.ts +0 -1
  103. package/directives/prevent-default/prevent-default.directive.d.ts +0 -1
  104. package/esm2015/abstract/control.js +7 -1
  105. package/esm2015/abstract/dialog.service.js +1 -1
  106. package/esm2015/abstract/portal-host.js +18 -15
  107. package/esm2015/abstract/portal-service.js +4 -4
  108. package/esm2015/abstract/theme-switcher.js +1 -2
  109. package/esm2015/classes/assert.js +1 -8
  110. package/esm2015/components/dialog-host/dialog-host.component.js +1 -2
  111. package/esm2015/components/dropdown-host/dropdown-host.component.js +4 -2
  112. package/esm2015/constants/browser.js +5 -1
  113. package/esm2015/constants/index.js +2 -1
  114. package/esm2015/constants/parent-animation.js +2 -2
  115. package/esm2015/constants/unicode-chars.js +9 -1
  116. package/esm2015/constants/version.js +2 -0
  117. package/esm2015/date-time/day-range.js +1 -6
  118. package/esm2015/date-time/day.js +2 -9
  119. package/esm2015/date-time/month.js +2 -8
  120. package/esm2015/date-time/year.js +2 -6
  121. package/esm2015/directives/active-zone/active-zone.directive.js +3 -6
  122. package/esm2015/directives/auto-focus/autofocus.directive.js +6 -5
  123. package/esm2015/directives/auto-focus/handlers/ios.handler.js +1 -2
  124. package/esm2015/directives/autofilled/autofilled-style.component.js +1 -1
  125. package/esm2015/directives/copy-processor/copy-processor.directive.js +1 -2
  126. package/esm2015/directives/drag/drag.directive.js +3 -3
  127. package/esm2015/directives/droppable/droppable.directive.js +7 -8
  128. package/esm2015/directives/focus-trap/focus-trap.directive.js +14 -12
  129. package/esm2015/directives/focus-visible/focus-visible.directive.js +1 -2
  130. package/esm2015/directives/focused/focused.directive.js +3 -3
  131. package/esm2015/directives/high-dpi/high-dpi.directive.js +1 -2
  132. package/esm2015/directives/hovered/hovered.service.js +5 -8
  133. package/esm2015/directives/media/media.directive.js +5 -10
  134. package/esm2015/directives/overscroll/overscroll.directive.js +13 -15
  135. package/esm2015/directives/pan/pan.directive.js +1 -2
  136. package/esm2015/directives/pressed/pressed.directive.js +3 -3
  137. package/esm2015/directives/prevent-default/prevent-default.directive.js +3 -4
  138. package/esm2015/directives/repeat-times/repeat-times.directive.js +3 -3
  139. package/esm2015/directives/resize/resize.directive.js +1 -2
  140. package/esm2015/directives/swipe/swipe.directive.js +1 -2
  141. package/esm2015/directives/zoom/zoom.directive.js +1 -2
  142. package/esm2015/observables/drag-and-drop-from.js +6 -11
  143. package/esm2015/observables/focus-visible-observable.js +7 -12
  144. package/esm2015/observables/items-query-list-observable.js +4 -7
  145. package/esm2015/observables/mouse-drag-finish-from.js +4 -7
  146. package/esm2015/observables/must-be-present.js +4 -9
  147. package/esm2015/observables/pressed-observable.js +5 -10
  148. package/esm2015/observables/prevent-default.js +2 -7
  149. package/esm2015/observables/stop-propagation.js +2 -7
  150. package/esm2015/observables/typed-from-event.js +2 -7
  151. package/esm2015/observables/watch.js +2 -7
  152. package/esm2015/pipes/index.js +2 -1
  153. package/esm2015/pipes/keys/index.js +3 -0
  154. package/esm2015/pipes/keys/keys.module.js +16 -0
  155. package/esm2015/pipes/keys/keys.pipe.js +14 -0
  156. package/esm2015/pipes/keys/taiga-ui-cdk-pipes-keys.js +5 -0
  157. package/esm2015/services/directive-styles.service.js +3 -26
  158. package/esm2015/services/focus-visible.service.js +3 -4
  159. package/esm2015/services/obscured.service.js +3 -5
  160. package/esm2015/services/pan.service.js +6 -9
  161. package/esm2015/services/parents-scroll.service.js +3 -5
  162. package/esm2015/services/resize.service.js +1 -2
  163. package/esm2015/services/scroll.service.js +4 -5
  164. package/esm2015/services/swipe.service.js +6 -9
  165. package/esm2015/services/zoom.service.js +8 -9
  166. package/esm2015/tokens/active-element.js +16 -16
  167. package/esm2015/tokens/alerts.js +8 -1
  168. package/esm2015/tokens/dialogs.js +8 -1
  169. package/esm2015/tokens/focusable-item-accessor.js +7 -1
  170. package/esm2015/tokens/index.js +2 -2
  171. package/esm2015/tokens/is-apple.js +3 -3
  172. package/esm2015/tokens/is-cypress.js +1 -1
  173. package/esm2015/tokens/is-ios.js +3 -3
  174. package/esm2015/tokens/range.js +8 -0
  175. package/esm2015/tokens/window-height.js +3 -3
  176. package/esm2015/utils/browser/index.js +1 -2
  177. package/esm2015/utils/browser/is-edge.js +2 -7
  178. package/esm2015/utils/browser/is-firefox.js +2 -7
  179. package/esm2015/utils/browser/is-safari.js +2 -7
  180. package/esm2015/utils/color/hex-to-rgb.js +12 -0
  181. package/esm2015/utils/color/hsv-to-rgb.js +11 -0
  182. package/esm2015/utils/color/index.js +6 -0
  183. package/esm2015/utils/color/parse-color.js +27 -0
  184. package/esm2015/utils/color/rgb-to-hex.js +4 -0
  185. package/esm2015/utils/color/rgb-to-hsv.js +7 -0
  186. package/esm2015/utils/color/taiga-ui-cdk-utils-color.js +5 -0
  187. package/esm2015/utils/dom/can-scroll.js +2 -7
  188. package/esm2015/utils/dom/contains-or-after.js +2 -7
  189. package/esm2015/utils/dom/element-checks.js +21 -0
  190. package/esm2015/utils/dom/get-actual-target.js +2 -5
  191. package/esm2015/utils/dom/get-clipboard-data-text.js +2 -5
  192. package/esm2015/utils/dom/get-document-or-shadow-root.js +2 -7
  193. package/esm2015/utils/dom/get-element-obscurers.js +14 -17
  194. package/esm2015/utils/dom/get-element-offset.js +4 -7
  195. package/esm2015/utils/dom/get-scroll-parent.js +3 -6
  196. package/esm2015/utils/dom/get-selected-text.js +3 -3
  197. package/esm2015/utils/dom/index.js +3 -2
  198. package/esm2015/utils/dom/is-current-target.js +2 -7
  199. package/esm2015/utils/dom/is-element-editable.js +5 -0
  200. package/esm2015/utils/dom/is-inside-iframe.js +2 -5
  201. package/esm2015/utils/dom/is-node-in.js +5 -7
  202. package/esm2015/utils/focus/blur-native-focused.js +4 -7
  203. package/esm2015/utils/focus/get-closest-focusable.js +26 -0
  204. package/esm2015/utils/focus/get-native-focused.js +3 -3
  205. package/esm2015/utils/focus/index.js +2 -3
  206. package/esm2015/utils/focus/is-native-focused-in.js +1 -2
  207. package/esm2015/utils/focus/is-native-focused.js +1 -2
  208. package/esm2015/utils/focus/is-native-keyboard-focusable.js +3 -3
  209. package/esm2015/utils/focus/is-native-mouse-focusable.js +1 -4
  210. package/esm2015/utils/focus/move-focus.js +2 -4
  211. package/esm2015/utils/focus/set-native-mouse-focused.js +8 -7
  212. package/esm2015/utils/format/px.js +1 -2
  213. package/esm2015/utils/index.js +2 -1
  214. package/esm2015/utils/math/clamp.js +2 -5
  215. package/esm2015/utils/math/quantize.js +2 -5
  216. package/esm2015/utils/math/round.js +4 -19
  217. package/esm2015/utils/math/sum.js +2 -5
  218. package/esm2015/utils/math/to-int.js +2 -7
  219. package/esm2015/utils/math/to-radians.js +2 -5
  220. package/esm2015/utils/miscellaneous/array-remove.js +4 -0
  221. package/esm2015/utils/miscellaneous/array-toggle.js +6 -0
  222. package/esm2015/utils/miscellaneous/distance-between-touches.js +2 -7
  223. package/esm2015/utils/miscellaneous/ease-in-out-quad.js +2 -7
  224. package/esm2015/utils/miscellaneous/flat-length.js +2 -5
  225. package/esm2015/utils/miscellaneous/get-original-array-from-query-list.js +2 -5
  226. package/esm2015/utils/miscellaneous/get-swipe-direction.js +2 -7
  227. package/esm2015/utils/miscellaneous/index.js +3 -3
  228. package/esm2015/utils/miscellaneous/is-number.js +2 -7
  229. package/esm2015/utils/miscellaneous/is-present.js +2 -7
  230. package/esm2015/utils/miscellaneous/mark-control-as-touched-and-validate.js +4 -9
  231. package/esm2015/utils/miscellaneous/uniq-by.js +2 -7
  232. package/esm2015/utils/os/is-apple-platform.js +2 -5
  233. package/esm2015/utils/os/is-apple.js +4 -9
  234. package/esm2015/utils/os/is-ios.js +4 -9
  235. package/esm2015/utils/svg/svg-linear-gradient-processor.js +2 -5
  236. package/fesm2015/taiga-ui-cdk-abstract.js +26 -18
  237. package/fesm2015/taiga-ui-cdk-abstract.js.map +1 -1
  238. package/fesm2015/taiga-ui-cdk-classes.js +1 -8
  239. package/fesm2015/taiga-ui-cdk-classes.js.map +1 -1
  240. package/fesm2015/taiga-ui-cdk-components-dialog-host.js +0 -1
  241. package/fesm2015/taiga-ui-cdk-components-dialog-host.js.map +1 -1
  242. package/fesm2015/taiga-ui-cdk-components-dropdown-host.js +3 -1
  243. package/fesm2015/taiga-ui-cdk-components-dropdown-host.js.map +1 -1
  244. package/fesm2015/taiga-ui-cdk-constants.js +16 -2
  245. package/fesm2015/taiga-ui-cdk-constants.js.map +1 -1
  246. package/fesm2015/taiga-ui-cdk-date-time.js +4 -26
  247. package/fesm2015/taiga-ui-cdk-date-time.js.map +1 -1
  248. package/fesm2015/taiga-ui-cdk-directives-active-zone.js +2 -5
  249. package/fesm2015/taiga-ui-cdk-directives-active-zone.js.map +1 -1
  250. package/fesm2015/taiga-ui-cdk-directives-auto-focus.js +5 -5
  251. package/fesm2015/taiga-ui-cdk-directives-auto-focus.js.map +1 -1
  252. package/fesm2015/taiga-ui-cdk-directives-autofilled.js +1 -1
  253. package/fesm2015/taiga-ui-cdk-directives-autofilled.js.map +1 -1
  254. package/fesm2015/taiga-ui-cdk-directives-copy-processor.js +0 -1
  255. package/fesm2015/taiga-ui-cdk-directives-copy-processor.js.map +1 -1
  256. package/fesm2015/taiga-ui-cdk-directives-drag.js +2 -2
  257. package/fesm2015/taiga-ui-cdk-directives-drag.js.map +1 -1
  258. package/fesm2015/taiga-ui-cdk-directives-droppable.js +6 -7
  259. package/fesm2015/taiga-ui-cdk-directives-droppable.js.map +1 -1
  260. package/fesm2015/taiga-ui-cdk-directives-focus-trap.js +13 -11
  261. package/fesm2015/taiga-ui-cdk-directives-focus-trap.js.map +1 -1
  262. package/fesm2015/taiga-ui-cdk-directives-focus-visible.js +0 -1
  263. package/fesm2015/taiga-ui-cdk-directives-focus-visible.js.map +1 -1
  264. package/fesm2015/taiga-ui-cdk-directives-focused.js +2 -2
  265. package/fesm2015/taiga-ui-cdk-directives-focused.js.map +1 -1
  266. package/fesm2015/taiga-ui-cdk-directives-high-dpi.js +0 -1
  267. package/fesm2015/taiga-ui-cdk-directives-high-dpi.js.map +1 -1
  268. package/fesm2015/taiga-ui-cdk-directives-hovered.js +4 -7
  269. package/fesm2015/taiga-ui-cdk-directives-hovered.js.map +1 -1
  270. package/fesm2015/taiga-ui-cdk-directives-media.js +5 -10
  271. package/fesm2015/taiga-ui-cdk-directives-media.js.map +1 -1
  272. package/fesm2015/taiga-ui-cdk-directives-overscroll.js +12 -14
  273. package/fesm2015/taiga-ui-cdk-directives-overscroll.js.map +1 -1
  274. package/fesm2015/taiga-ui-cdk-directives-pan.js +0 -1
  275. package/fesm2015/taiga-ui-cdk-directives-pan.js.map +1 -1
  276. package/fesm2015/taiga-ui-cdk-directives-pressed.js +2 -2
  277. package/fesm2015/taiga-ui-cdk-directives-pressed.js.map +1 -1
  278. package/fesm2015/taiga-ui-cdk-directives-prevent-default.js +2 -3
  279. package/fesm2015/taiga-ui-cdk-directives-prevent-default.js.map +1 -1
  280. package/fesm2015/taiga-ui-cdk-directives-repeat-times.js +2 -2
  281. package/fesm2015/taiga-ui-cdk-directives-repeat-times.js.map +1 -1
  282. package/fesm2015/taiga-ui-cdk-directives-resize.js +0 -1
  283. package/fesm2015/taiga-ui-cdk-directives-resize.js.map +1 -1
  284. package/fesm2015/taiga-ui-cdk-directives-swipe.js +0 -1
  285. package/fesm2015/taiga-ui-cdk-directives-swipe.js.map +1 -1
  286. package/fesm2015/taiga-ui-cdk-directives-zoom.js +0 -1
  287. package/fesm2015/taiga-ui-cdk-directives-zoom.js.map +1 -1
  288. package/fesm2015/taiga-ui-cdk-observables.js +21 -67
  289. package/fesm2015/taiga-ui-cdk-observables.js.map +1 -1
  290. package/fesm2015/taiga-ui-cdk-pipes-keys.js +34 -0
  291. package/fesm2015/taiga-ui-cdk-pipes-keys.js.map +1 -0
  292. package/fesm2015/taiga-ui-cdk-pipes.js +1 -0
  293. package/fesm2015/taiga-ui-cdk-pipes.js.map +1 -1
  294. package/fesm2015/taiga-ui-cdk-services.js +25 -60
  295. package/fesm2015/taiga-ui-cdk-services.js.map +1 -1
  296. package/fesm2015/taiga-ui-cdk-tokens.js +46 -23
  297. package/fesm2015/taiga-ui-cdk-tokens.js.map +1 -1
  298. package/fesm2015/taiga-ui-cdk-utils-browser.js +4 -23
  299. package/fesm2015/taiga-ui-cdk-utils-browser.js.map +1 -1
  300. package/fesm2015/taiga-ui-cdk-utils-color.js +67 -0
  301. package/fesm2015/taiga-ui-cdk-utils-color.js.map +1 -0
  302. package/fesm2015/taiga-ui-cdk-utils-dom.js +53 -78
  303. package/fesm2015/taiga-ui-cdk-utils-dom.js.map +1 -1
  304. package/fesm2015/taiga-ui-cdk-utils-focus.js +21 -57
  305. package/fesm2015/taiga-ui-cdk-utils-focus.js.map +1 -1
  306. package/fesm2015/taiga-ui-cdk-utils-format.js +0 -1
  307. package/fesm2015/taiga-ui-cdk-utils-format.js.map +1 -1
  308. package/fesm2015/taiga-ui-cdk-utils-math.js +9 -41
  309. package/fesm2015/taiga-ui-cdk-utils-math.js.map +1 -1
  310. package/fesm2015/taiga-ui-cdk-utils-miscellaneous.js +21 -73
  311. package/fesm2015/taiga-ui-cdk-utils-miscellaneous.js.map +1 -1
  312. package/fesm2015/taiga-ui-cdk-utils-os.js +6 -19
  313. package/fesm2015/taiga-ui-cdk-utils-os.js.map +1 -1
  314. package/fesm2015/taiga-ui-cdk-utils-svg.js +2 -5
  315. package/fesm2015/taiga-ui-cdk-utils-svg.js.map +1 -1
  316. package/fesm2015/taiga-ui-cdk-utils.js +1 -0
  317. package/fesm2015/taiga-ui-cdk-utils.js.map +1 -1
  318. package/observables/drag-and-drop-from.d.ts +1 -5
  319. package/observables/focus-visible-observable.d.ts +1 -5
  320. package/observables/items-query-list-observable.d.ts +1 -3
  321. package/observables/mouse-drag-finish-from.d.ts +1 -3
  322. package/observables/must-be-present.d.ts +1 -5
  323. package/observables/pressed-observable.d.ts +1 -5
  324. package/observables/prevent-default.d.ts +1 -5
  325. package/observables/stop-propagation.d.ts +1 -5
  326. package/observables/typed-from-event.d.ts +5 -21
  327. package/observables/watch.d.ts +1 -5
  328. package/package.json +7 -3
  329. package/pipes/index.d.ts +1 -0
  330. package/pipes/keys/index.d.ts +2 -0
  331. package/pipes/keys/keys.module.d.ts +7 -0
  332. package/pipes/keys/keys.pipe.d.ts +7 -0
  333. package/pipes/keys/package.json +10 -0
  334. package/pipes/keys/taiga-ui-cdk-pipes-keys.d.ts +5 -0
  335. package/schematics/collection.json +6 -0
  336. package/schematics/constants/file-globs.d.ts +2 -0
  337. package/schematics/constants/file-globs.js +11 -0
  338. package/schematics/constants/index.d.ts +1 -0
  339. package/schematics/constants/index.js +4 -0
  340. package/schematics/constants/taiga-styles.d.ts +2 -1
  341. package/schematics/constants/taiga-styles.js +3 -2
  342. package/schematics/ng-add/constants/versions.js +2 -2
  343. package/schematics/ng-add/index.js +6 -0
  344. package/schematics/ng-add/schema.d.ts +8 -0
  345. package/schematics/ng-add/schema.json +9 -0
  346. package/schematics/ng-add/steps/add-taiga-icons.js +5 -3
  347. package/schematics/ng-add/steps/add-taiga-modules.js +4 -0
  348. package/schematics/ng-add/steps/add-taiga-styles.js +6 -3
  349. package/schematics/ng-add/steps/wrap-with-tui-root.js +3 -0
  350. package/schematics/ng-update/constants/breakpoints.d.ts +82 -0
  351. package/schematics/ng-update/constants/breakpoints.js +34 -0
  352. package/schematics/ng-update/constants/consts.d.ts +1 -1
  353. package/schematics/ng-update/constants/consts.js +170 -0
  354. package/schematics/ng-update/constants/deprecated-functions.js +1 -36
  355. package/schematics/ng-update/constants/services.js +1 -1
  356. package/schematics/ng-update/constants/templates.d.ts +16 -0
  357. package/schematics/ng-update/constants/templates.js +261 -1
  358. package/schematics/ng-update/constants/warnings.js +10 -0
  359. package/schematics/ng-update/index.js +21 -10
  360. package/schematics/ng-update/schema.json +13 -0
  361. package/schematics/ng-update/steps/migrate-date-time.js +45 -1
  362. package/schematics/ng-update/steps/migrate-progress.d.ts +1 -1
  363. package/schematics/ng-update/steps/migrate-progress.js +2 -1
  364. package/schematics/ng-update/steps/migrate-sliders/index.d.ts +1 -1
  365. package/schematics/ng-update/steps/migrate-sliders/index.js +2 -0
  366. package/schematics/ng-update/steps/migrate-sliders/migrate-input-range.d.ts +1 -1
  367. package/schematics/ng-update/steps/migrate-sliders/migrate-input-range.js +4 -3
  368. package/schematics/ng-update/steps/migrate-sliders/migrate-input-slider.d.ts +1 -1
  369. package/schematics/ng-update/steps/migrate-sliders/migrate-input-slider.js +3 -2
  370. package/schematics/ng-update/steps/migrate-taiga-proprietary-icons.d.ts +3 -0
  371. package/schematics/ng-update/steps/migrate-taiga-proprietary-icons.js +51 -0
  372. package/schematics/ng-update/steps/migrate-templates.d.ts +1 -1
  373. package/schematics/ng-update/steps/migrate-templates.js +77 -5
  374. package/schematics/ng-update/steps/replace-deep-import.js +2 -1
  375. package/schematics/ng-update/steps/replace-enums.js +2 -1
  376. package/schematics/ng-update/steps/replace-functions.js +42 -2
  377. package/schematics/ng-update/steps/replace-styles.d.ts +1 -0
  378. package/schematics/ng-update/steps/replace-styles.js +18 -0
  379. package/schematics/ng-update/steps/show-warnings.js +2 -1
  380. package/schematics/utils/add-import-to-closest-module.d.ts +1 -0
  381. package/schematics/utils/add-import-to-closest-module.js +18 -0
  382. package/schematics/utils/add-styles.d.ts +6 -2
  383. package/schematics/utils/add-styles.js +32 -4
  384. package/schematics/utils/angular/ng-component.d.ts +1 -2
  385. package/schematics/utils/angular/ng-module.d.ts +1 -2
  386. package/schematics/utils/angular/ng-module.js +2 -1
  387. package/schematics/utils/colored-log.d.ts +1 -0
  388. package/schematics/utils/colored-log.js +5 -1
  389. package/schematics/utils/get-execution-time.d.ts +1 -0
  390. package/schematics/utils/get-execution-time.js +8 -0
  391. package/schematics/utils/get-named-import-references.js +2 -1
  392. package/schematics/utils/get-project.d.ts +1 -1
  393. package/schematics/utils/get-project.js +0 -4
  394. package/schematics/utils/insert-todo.d.ts +1 -0
  395. package/schematics/utils/insert-todo.js +3 -2
  396. package/schematics/utils/progress.d.ts +1 -0
  397. package/schematics/utils/progress.js +13 -0
  398. package/schematics/utils/templates/get-component-templates.d.ts +1 -2
  399. package/schematics/utils/templates/get-component-templates.js +1 -1
  400. package/schematics/utils/templates/ng-component-input-manipulations.js +2 -12
  401. package/schematics/utils/templates/template-resource.d.ts +1 -1
  402. package/services/directive-styles.service.d.ts +2 -9
  403. package/services/focus-visible.service.d.ts +0 -1
  404. package/services/pan.service.d.ts +0 -3
  405. package/services/swipe.service.d.ts +0 -3
  406. package/tokens/alerts.d.ts +2 -1
  407. package/tokens/dialogs.d.ts +2 -1
  408. package/tokens/focusable-item-accessor.d.ts +2 -1
  409. package/tokens/index.d.ts +1 -1
  410. package/tokens/is-cypress.d.ts +0 -3
  411. package/tokens/range.d.ts +2 -0
  412. package/utils/browser/index.d.ts +0 -1
  413. package/utils/browser/is-edge.d.ts +1 -5
  414. package/utils/browser/is-firefox.d.ts +1 -5
  415. package/utils/browser/is-safari.d.ts +1 -5
  416. package/utils/color/hex-to-rgb.d.ts +1 -0
  417. package/utils/color/hsv-to-rgb.d.ts +4 -0
  418. package/utils/color/index.d.ts +5 -0
  419. package/utils/color/package.json +10 -0
  420. package/utils/color/parse-color.d.ts +1 -0
  421. package/utils/color/rgb-to-hex.d.ts +1 -0
  422. package/utils/color/rgb-to-hsv.d.ts +1 -0
  423. package/utils/color/taiga-ui-cdk-utils-color.d.ts +5 -0
  424. package/utils/dom/can-scroll.d.ts +1 -5
  425. package/utils/dom/contains-or-after.d.ts +1 -5
  426. package/utils/dom/element-checks.d.ts +6 -0
  427. package/utils/dom/get-actual-target.d.ts +1 -3
  428. package/utils/dom/get-clipboard-data-text.d.ts +1 -3
  429. package/utils/dom/get-document-or-shadow-root.d.ts +1 -5
  430. package/utils/dom/get-element-obscurers.d.ts +1 -3
  431. package/utils/dom/get-element-offset.d.ts +1 -3
  432. package/utils/dom/get-scroll-parent.d.ts +1 -3
  433. package/utils/dom/index.d.ts +2 -1
  434. package/utils/dom/is-current-target.d.ts +1 -5
  435. package/utils/dom/is-element-editable.d.ts +1 -0
  436. package/utils/dom/is-inside-iframe.d.ts +1 -3
  437. package/utils/dom/is-node-in.d.ts +1 -3
  438. package/utils/focus/blur-native-focused.d.ts +1 -3
  439. package/utils/focus/get-closest-focusable.d.ts +27 -0
  440. package/utils/focus/index.d.ts +1 -2
  441. package/utils/focus/is-native-mouse-focusable.d.ts +0 -2
  442. package/utils/focus/set-native-mouse-focused.d.ts +1 -3
  443. package/utils/index.d.ts +1 -0
  444. package/utils/math/clamp.d.ts +1 -3
  445. package/utils/math/quantize.d.ts +1 -3
  446. package/utils/math/round.d.ts +3 -15
  447. package/utils/math/sum.d.ts +1 -3
  448. package/utils/math/to-int.d.ts +1 -5
  449. package/utils/math/to-radians.d.ts +1 -3
  450. package/utils/miscellaneous/array-remove.d.ts +1 -0
  451. package/utils/miscellaneous/array-toggle.d.ts +1 -0
  452. package/utils/miscellaneous/distance-between-touches.d.ts +1 -5
  453. package/utils/miscellaneous/ease-in-out-quad.d.ts +1 -5
  454. package/utils/miscellaneous/flat-length.d.ts +1 -3
  455. package/utils/miscellaneous/get-original-array-from-query-list.d.ts +1 -3
  456. package/utils/miscellaneous/get-swipe-direction.d.ts +1 -5
  457. package/utils/miscellaneous/index.d.ts +2 -2
  458. package/utils/miscellaneous/is-number.d.ts +1 -5
  459. package/utils/miscellaneous/is-present.d.ts +1 -5
  460. package/utils/miscellaneous/mark-control-as-touched-and-validate.d.ts +1 -5
  461. package/utils/miscellaneous/uniq-by.d.ts +1 -5
  462. package/utils/os/is-apple-platform.d.ts +1 -3
  463. package/utils/os/is-apple.d.ts +1 -5
  464. package/utils/os/is-ios.d.ts +1 -5
  465. package/utils/svg/svg-linear-gradient-processor.d.ts +1 -3
  466. package/esm2015/tokens/sanitizer.js +0 -4
  467. package/esm2015/utils/browser/is-ie.js +0 -4
  468. package/esm2015/utils/dom/is-form-field.js +0 -8
  469. package/esm2015/utils/focus/get-closest-keyboard-focusable.js +0 -34
  470. package/esm2015/utils/focus/set-native-focused.js +0 -19
  471. package/esm2015/utils/miscellaneous/identity.js +0 -8
  472. package/esm2015/utils/miscellaneous/is-element-editable.js +0 -12
  473. package/tokens/sanitizer.d.ts +0 -2
  474. package/utils/browser/is-ie.d.ts +0 -1
  475. package/utils/dom/is-form-field.d.ts +0 -1
  476. package/utils/focus/get-closest-keyboard-focusable.d.ts +0 -10
  477. package/utils/focus/set-native-focused.d.ts +0 -10
  478. package/utils/miscellaneous/identity.d.ts +0 -4
  479. package/utils/miscellaneous/is-element-editable.d.ts +0 -5
@@ -13,6 +13,16 @@ exports.CONSTS_TO_REPLACE = [
13
13
  moduleSpecifier: '@angular/forms',
14
14
  },
15
15
  },
16
+ {
17
+ from: {
18
+ name: 'TUI_CALENDAR_DATA_STREAM',
19
+ moduleSpecifier: '@taiga-ui/kit',
20
+ },
21
+ to: {
22
+ name: 'TUI_CALENDAR_DATE_STREAM',
23
+ moduleSpecifier: '@taiga-ui/kit',
24
+ },
25
+ },
16
26
  {
17
27
  from: {
18
28
  name: 'TUI_DATE_MASK',
@@ -53,6 +63,66 @@ exports.CONSTS_TO_REPLACE = [
53
63
  moduleSpecifier: '@taiga-ui/core',
54
64
  },
55
65
  },
66
+ {
67
+ from: {
68
+ name: 'TuiManualHintModule',
69
+ moduleSpecifier: '@taiga-ui/core',
70
+ },
71
+ to: {
72
+ name: 'TuiHintModule',
73
+ moduleSpecifier: '@taiga-ui/core',
74
+ },
75
+ },
76
+ {
77
+ from: {
78
+ name: 'TuiPointerHintModule',
79
+ moduleSpecifier: '@taiga-ui/core',
80
+ },
81
+ to: {
82
+ name: 'TuiHintModule',
83
+ moduleSpecifier: '@taiga-ui/core',
84
+ },
85
+ },
86
+ {
87
+ from: {
88
+ name: 'TuiDropdownControllerModule',
89
+ moduleSpecifier: '@taiga-ui/core',
90
+ },
91
+ to: {
92
+ name: 'TuiDropdownModule',
93
+ moduleSpecifier: '@taiga-ui/core',
94
+ },
95
+ },
96
+ {
97
+ from: {
98
+ name: 'TuiDropdownSelectionModule',
99
+ moduleSpecifier: '@taiga-ui/kit',
100
+ },
101
+ to: {
102
+ name: 'TuiDropdownModule',
103
+ moduleSpecifier: '@taiga-ui/core',
104
+ },
105
+ },
106
+ {
107
+ from: {
108
+ name: 'TuiDropdownHoverModule',
109
+ moduleSpecifier: '@taiga-ui/kit',
110
+ },
111
+ to: {
112
+ name: 'TuiDropdownModule',
113
+ moduleSpecifier: '@taiga-ui/core',
114
+ },
115
+ },
116
+ {
117
+ from: {
118
+ name: 'TuiDropdownContextModule',
119
+ moduleSpecifier: '@taiga-ui/kit',
120
+ },
121
+ to: {
122
+ name: 'TuiDropdownModule',
123
+ moduleSpecifier: '@taiga-ui/core',
124
+ },
125
+ },
56
126
  {
57
127
  from: { name: 'identity', moduleSpecifier: '@taiga-ui/cdk' },
58
128
  to: { name: 'identity', moduleSpecifier: 'rxjs' },
@@ -143,4 +213,104 @@ exports.CONSTS_TO_REPLACE = [
143
213
  moduleSpecifier: '@taiga-ui/kit',
144
214
  },
145
215
  },
216
+ {
217
+ from: {
218
+ name: 'hexToRgb',
219
+ moduleSpecifier: ['@taiga-ui/addon-doc', '@taiga-ui/addon-editor'],
220
+ },
221
+ to: {
222
+ name: 'tuiHexToRgb',
223
+ moduleSpecifier: '@taiga-ui/cdk',
224
+ },
225
+ },
226
+ {
227
+ from: {
228
+ name: 'tuiHexToRgb',
229
+ moduleSpecifier: ['@taiga-ui/addon-doc', '@taiga-ui/addon-editor'],
230
+ },
231
+ to: {
232
+ name: 'tuiHexToRgb',
233
+ moduleSpecifier: '@taiga-ui/cdk',
234
+ },
235
+ },
236
+ {
237
+ from: {
238
+ name: 'hsvToRgb',
239
+ moduleSpecifier: '@taiga-ui/addon-editor',
240
+ },
241
+ to: {
242
+ name: 'tuiHsvToRgb',
243
+ moduleSpecifier: '@taiga-ui/cdk',
244
+ },
245
+ },
246
+ {
247
+ from: {
248
+ name: 'tuiHsvToRgb',
249
+ moduleSpecifier: '@taiga-ui/addon-editor',
250
+ },
251
+ to: {
252
+ name: 'tuiHsvToRgb',
253
+ moduleSpecifier: '@taiga-ui/cdk',
254
+ },
255
+ },
256
+ {
257
+ from: {
258
+ name: 'parseColor',
259
+ moduleSpecifier: '@taiga-ui/addon-editor',
260
+ },
261
+ to: {
262
+ name: 'tuiParseColor',
263
+ moduleSpecifier: '@taiga-ui/cdk',
264
+ },
265
+ },
266
+ {
267
+ from: {
268
+ name: 'tuiParseColor',
269
+ moduleSpecifier: '@taiga-ui/addon-editor',
270
+ },
271
+ to: {
272
+ name: 'tuiParseColor',
273
+ moduleSpecifier: '@taiga-ui/cdk',
274
+ },
275
+ },
276
+ {
277
+ from: {
278
+ name: 'rgbToHex',
279
+ moduleSpecifier: ['@taiga-ui/addon-doc', '@taiga-ui/addon-editor'],
280
+ },
281
+ to: {
282
+ name: 'tuiRgbToHex',
283
+ moduleSpecifier: '@taiga-ui/cdk',
284
+ },
285
+ },
286
+ {
287
+ from: {
288
+ name: 'tuiRgbToHex',
289
+ moduleSpecifier: ['@taiga-ui/addon-doc', '@taiga-ui/addon-editor'],
290
+ },
291
+ to: {
292
+ name: 'tuiRgbToHex',
293
+ moduleSpecifier: '@taiga-ui/cdk',
294
+ },
295
+ },
296
+ {
297
+ from: {
298
+ name: 'rgbToHsv',
299
+ moduleSpecifier: '@taiga-ui/addon-editor',
300
+ },
301
+ to: {
302
+ name: 'tuiRgbToHsv',
303
+ moduleSpecifier: '@taiga-ui/cdk',
304
+ },
305
+ },
306
+ {
307
+ from: {
308
+ name: 'tuiRgbToHsv',
309
+ moduleSpecifier: '@taiga-ui/addon-editor',
310
+ },
311
+ to: {
312
+ name: 'tuiRgbToHsv',
313
+ moduleSpecifier: '@taiga-ui/cdk',
314
+ },
315
+ },
146
316
  ];
@@ -97,16 +97,6 @@ exports.DEPRECATED_FUNCTIONS = [
97
97
  to: 'tuiCoerceValue',
98
98
  moduleSpecifier: ['@taiga-ui/addon-doc'],
99
99
  },
100
- {
101
- from: 'rgbToHex',
102
- to: 'tuiRgbToHex',
103
- moduleSpecifier: ['@taiga-ui/addon-doc'],
104
- },
105
- {
106
- from: 'hexToRgb',
107
- to: 'tuiHexToRgb',
108
- moduleSpecifier: ['@taiga-ui/addon-doc'],
109
- },
110
100
  {
111
101
  from: 'generateRoutes',
112
102
  to: 'tuiGenerateRoutes',
@@ -147,41 +137,16 @@ exports.DEPRECATED_FUNCTIONS = [
147
137
  to: 'tuiGetMarkRange',
148
138
  moduleSpecifier: ['@taiga-ui/addon-editor'],
149
139
  },
150
- {
151
- from: 'hexToRgb',
152
- to: 'tuiHexToRgb',
153
- moduleSpecifier: ['@taiga-ui/addon-editor'],
154
- },
155
- {
156
- from: 'hsvToRgb',
157
- to: 'tuiHsvToRgb',
158
- moduleSpecifier: ['@taiga-ui/addon-editor'],
159
- },
160
140
  {
161
141
  from: 'isSelectionIn',
162
142
  to: 'tuiIsSelectionIn',
163
143
  moduleSpecifier: ['@taiga-ui/addon-editor'],
164
144
  },
165
- {
166
- from: 'parseColor',
167
- to: 'tuiParseColor',
168
- moduleSpecifier: ['@taiga-ui/addon-editor'],
169
- },
170
145
  {
171
146
  from: 'parseGradient',
172
147
  to: 'tuiParseGradient',
173
148
  moduleSpecifier: ['@taiga-ui/addon-editor'],
174
149
  },
175
- {
176
- from: 'rgbToHex',
177
- to: 'tuiRgbToHex',
178
- moduleSpecifier: ['@taiga-ui/addon-editor'],
179
- },
180
- {
181
- from: 'rgbToHsv',
182
- to: 'tuiRgbToHsv',
183
- moduleSpecifier: ['@taiga-ui/addon-editor'],
184
- },
185
150
  {
186
151
  from: 'toGradient',
187
152
  to: 'tuiToGradient',
@@ -354,7 +319,7 @@ exports.DEPRECATED_FUNCTIONS = [
354
319
  },
355
320
  {
356
321
  from: 'getClosestKeyboardFocusable',
357
- to: 'tuiGetClosestKeyboardFocusable',
322
+ to: 'tuiGetClosestFocusable',
358
323
  moduleSpecifier: ['@taiga-ui/cdk'],
359
324
  },
360
325
  {
@@ -17,7 +17,7 @@ exports.SERVICES_TO_REPLACE = [
17
17
  },
18
18
  to: {
19
19
  name: 'TuiAlertService',
20
- moduleSpecifier: '@taiga-ui/cdk',
20
+ moduleSpecifier: '@taiga-ui/core',
21
21
  },
22
22
  replaceMethods: [
23
23
  {
@@ -33,6 +33,10 @@ export declare const ATTRS_TO_REPLACE: ReplacementAttributes[];
33
33
  export declare const INPUTS_TO_REMOVE: InputToRemove[];
34
34
  export declare const TAGS_TO_REPLACE: ReplacementTags[];
35
35
  export declare const ATTR_TO_DIRECTIVE: AttributeToDirective[];
36
+ /**
37
+ * @example `<div [tuiDropdownSided]="true" />` => `<div tuiDropdownSided />`
38
+ */
39
+ export declare const TRUTHY_BOOLEAN_INPUT_TO_HTML_BINARY_ATTRIBUTE: readonly ["tuiDropdownSided"];
36
40
  export declare const TEMPLATE_COMMENTS: readonly [{
37
41
  readonly tag: "tui-input-slider";
38
42
  readonly withAttr: "pluralize";
@@ -49,6 +53,10 @@ export declare const TEMPLATE_COMMENTS: readonly [{
49
53
  readonly tag: "tui-range";
50
54
  readonly withAttr: "pluralize";
51
55
  readonly comment: "See examples how create labels for ticks without this property (outside the component): https://taiga-ui.dev/components/range#segments";
56
+ }, {
57
+ readonly tag: "tui-range";
58
+ readonly withAttr: "steps";
59
+ readonly comment: "This component has new API. Use property [step] instead. See: https://taiga-ui.dev/components/range/API";
52
60
  }, {
53
61
  readonly tag: "tui-preview-host";
54
62
  readonly withAttr: "ngProjectAs";
@@ -57,4 +65,12 @@ export declare const TEMPLATE_COMMENTS: readonly [{
57
65
  readonly tag: "tui-progress";
58
66
  readonly withAttr: "value";
59
67
  readonly comment: "This legacy component was replaced by 3 new ones (https://taiga-ui.dev/components/progress-bar | https://taiga-ui.dev/components/progress-circle | https://taiga-ui.dev/components/progress-segmented ) ";
68
+ }, {
69
+ readonly tag: "tui-input-file";
70
+ readonly withAttr: "loadingFiles";
71
+ readonly comment: "This legacy component was replaced by new one (https://taiga-ui.dev/components/input-files) ";
72
+ }, {
73
+ readonly tag: "tui-input-tag";
74
+ readonly withAttr: "allowSpaces";
75
+ readonly comment: "Use property [separator] to forbid spaces. See example: https://taiga-ui.dev/components/input-tag#no-spaces-inside-tags";
60
76
  }];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TEMPLATE_COMMENTS = exports.ATTR_TO_DIRECTIVE = exports.TAGS_TO_REPLACE = exports.INPUTS_TO_REMOVE = exports.ATTRS_TO_REPLACE = void 0;
3
+ exports.TEMPLATE_COMMENTS = exports.TRUTHY_BOOLEAN_INPUT_TO_HTML_BINARY_ATTRIBUTE = exports.ATTR_TO_DIRECTIVE = exports.TAGS_TO_REPLACE = exports.INPUTS_TO_REMOVE = exports.ATTRS_TO_REPLACE = void 0;
4
4
  const tui_interactive_selectors_1 = require("./tui-interactive-selectors");
5
5
  const elements_1 = require("../../utils/templates/elements");
6
6
  exports.ATTRS_TO_REPLACE = [
@@ -16,6 +16,7 @@ exports.ATTRS_TO_REPLACE = [
16
16
  'tui-range',
17
17
  'tui-input-range',
18
18
  'tui-input-slider',
19
+ 'tui-feed-item',
19
20
  ],
20
21
  },
21
22
  to: { attrName: '' },
@@ -40,6 +41,42 @@ exports.ATTRS_TO_REPLACE = [
40
41
  attrName: '[active]',
41
42
  },
42
43
  },
44
+ {
45
+ from: {
46
+ attrName: '[label]',
47
+ withAttrsNames: ['tuiLabel'],
48
+ },
49
+ to: {
50
+ attrName: '[tuiLabel]',
51
+ },
52
+ },
53
+ {
54
+ from: {
55
+ attrName: 'label',
56
+ withAttrsNames: ['tuiLabel'],
57
+ },
58
+ to: {
59
+ attrName: 'tuiLabel',
60
+ },
61
+ },
62
+ {
63
+ from: {
64
+ attrName: '[state]',
65
+ withAttrsNames: ['tuiStep'],
66
+ },
67
+ to: {
68
+ attrName: '[stepState]',
69
+ },
70
+ },
71
+ {
72
+ from: {
73
+ attrName: 'state',
74
+ withAttrsNames: ['tuiStep'],
75
+ },
76
+ to: {
77
+ attrName: 'stepState',
78
+ },
79
+ },
43
80
  {
44
81
  from: {
45
82
  attrName: '[focused]',
@@ -96,6 +133,15 @@ exports.ATTRS_TO_REPLACE = [
96
133
  attrName: '[step]',
97
134
  },
98
135
  },
136
+ {
137
+ from: {
138
+ attrName: '[quantum]',
139
+ withTagNames: ['tui-range'],
140
+ },
141
+ to: {
142
+ attrName: '[step]',
143
+ },
144
+ },
99
145
  {
100
146
  from: {
101
147
  attrName: '*tuiTab',
@@ -123,12 +169,196 @@ exports.ATTRS_TO_REPLACE = [
123
169
  attrName: 'tuiItem',
124
170
  },
125
171
  },
172
+ {
173
+ from: {
174
+ attrName: 'tuiManualHint',
175
+ withTagNames: ['*'],
176
+ },
177
+ to: {
178
+ attrName: 'tuiHint',
179
+ },
180
+ },
181
+ {
182
+ from: {
183
+ attrName: '[tuiManualHint]',
184
+ withTagNames: ['*'],
185
+ },
186
+ to: {
187
+ attrName: '[tuiHint]',
188
+ },
189
+ },
190
+ {
191
+ from: {
192
+ attrName: '[tuiManualHintShow]',
193
+ withTagNames: ['*'],
194
+ },
195
+ to: {
196
+ attrName: '[tuiHintManual]',
197
+ },
198
+ },
199
+ {
200
+ from: {
201
+ attrName: '[tuiPointerHint]',
202
+ withTagNames: ['*'],
203
+ },
204
+ to: {
205
+ attrName: 'tuiHintPointer [tuiHint]',
206
+ },
207
+ },
208
+ {
209
+ from: {
210
+ attrName: 'tuiPointerHint',
211
+ withTagNames: ['*'],
212
+ },
213
+ to: {
214
+ attrName: 'tuiHintPointer tuiHint',
215
+ },
216
+ },
217
+ {
218
+ from: {
219
+ attrName: 'messageMode',
220
+ withTagNames: ['tui-input-copy'],
221
+ },
222
+ to: {
223
+ attrName: 'messageAppearance',
224
+ },
225
+ },
226
+ {
227
+ from: {
228
+ attrName: '[messageMode]',
229
+ withTagNames: ['tui-input-copy'],
230
+ },
231
+ to: {
232
+ attrName: '[messageAppearance]',
233
+ },
234
+ },
235
+ {
236
+ from: {
237
+ attrName: '[hintMode]',
238
+ withTagNames: ['tui-bar-chart'],
239
+ },
240
+ to: {
241
+ attrName: '[tuiHintAppearance]',
242
+ },
243
+ },
244
+ {
245
+ from: {
246
+ attrName: 'tuiHintMode',
247
+ withTagNames: ['*'],
248
+ },
249
+ to: {
250
+ attrName: 'tuiHintAppearance',
251
+ },
252
+ },
253
+ {
254
+ from: {
255
+ attrName: '[tuiHintMode]',
256
+ withTagNames: ['*'],
257
+ },
258
+ to: {
259
+ attrName: '[tuiHintAppearance]',
260
+ },
261
+ },
262
+ {
263
+ from: {
264
+ attrName: 'mode',
265
+ withTagNames: ['tui-tooltip'],
266
+ },
267
+ to: {
268
+ attrName: 'appearance',
269
+ },
270
+ },
271
+ {
272
+ from: {
273
+ attrName: '[mode]',
274
+ withTagNames: ['tui-tooltip'],
275
+ },
276
+ to: {
277
+ attrName: '[appearance]',
278
+ },
279
+ },
280
+ {
281
+ from: {
282
+ attrName: '[itemLabel]',
283
+ withTagNames: ['tui-feed-item'],
284
+ },
285
+ to: {
286
+ attrName: '[description]',
287
+ },
288
+ },
289
+ {
290
+ from: {
291
+ attrName: '[itemValue]',
292
+ withTagNames: ['tui-feed-item'],
293
+ },
294
+ to: {
295
+ attrName: '[title]',
296
+ },
297
+ },
298
+ {
299
+ from: {
300
+ attrName: '[sumLabel]',
301
+ withTagNames: ['tui-feed-item'],
302
+ },
303
+ to: {
304
+ attrName: '[secondaryDescription]',
305
+ },
306
+ },
307
+ {
308
+ from: {
309
+ attrName: '[sumValue]',
310
+ withTagNames: ['tui-feed-item'],
311
+ },
312
+ to: {
313
+ attrName: '[secondaryTitle]',
314
+ },
315
+ },
316
+ {
317
+ from: {
318
+ attrName: 'tuiDropdown',
319
+ withTagNames: ['*'],
320
+ },
321
+ to: {
322
+ attrName: 'tuiDropdownManual',
323
+ },
324
+ },
325
+ {
326
+ from: {
327
+ attrName: '[tuiDropdown]',
328
+ withTagNames: ['*'],
329
+ },
330
+ to: {
331
+ attrName: '[tuiDropdownManual]',
332
+ },
333
+ },
334
+ {
335
+ from: {
336
+ attrName: 'tuiDropdownContent',
337
+ withTagNames: ['*'],
338
+ },
339
+ to: {
340
+ attrName: 'tuiDropdown',
341
+ },
342
+ },
343
+ {
344
+ from: {
345
+ attrName: '[tuiDropdownContent]',
346
+ withTagNames: ['*'],
347
+ },
348
+ to: {
349
+ attrName: '[tuiDropdown]',
350
+ },
351
+ },
126
352
  ];
127
353
  exports.INPUTS_TO_REMOVE = [
128
354
  {
129
355
  inputName: 'iconAlign',
130
356
  tags: ['tui-input', 'tui-primitive-textfield', 'tui-input-tag'],
131
357
  },
358
+ {
359
+ inputName: 'tuiLabel',
360
+ tags: ['label'],
361
+ },
132
362
  ];
133
363
  exports.TAGS_TO_REPLACE = [
134
364
  {
@@ -283,6 +513,21 @@ exports.ATTR_TO_DIRECTIVE = [
283
513
  moduleSpecifier: '@taiga-ui/addon-doc',
284
514
  },
285
515
  },
516
+ {
517
+ componentSelector: ['tui-bar-chart', 'tui-pie-chart', 'tui-line-chart'],
518
+ inputProperty: 'hintContent',
519
+ directive: 'tuiHintContent',
520
+ directiveModule: {
521
+ name: 'TuiHintControllerModule',
522
+ moduleSpecifier: '@taiga-ui/core',
523
+ },
524
+ },
525
+ ];
526
+ /**
527
+ * @example `<div [tuiDropdownSided]="true" />` => `<div tuiDropdownSided />`
528
+ */
529
+ exports.TRUTHY_BOOLEAN_INPUT_TO_HTML_BINARY_ATTRIBUTE = [
530
+ 'tuiDropdownSided',
286
531
  ];
287
532
  exports.TEMPLATE_COMMENTS = [
288
533
  {
@@ -305,6 +550,11 @@ exports.TEMPLATE_COMMENTS = [
305
550
  withAttr: 'pluralize',
306
551
  comment: 'See examples how create labels for ticks without this property (outside the component): https://taiga-ui.dev/components/range#segments',
307
552
  },
553
+ {
554
+ tag: 'tui-range',
555
+ withAttr: 'steps',
556
+ comment: 'This component has new API. Use property [step] instead. See: https://taiga-ui.dev/components/range/API',
557
+ },
308
558
  {
309
559
  tag: 'tui-preview-host',
310
560
  withAttr: 'ngProjectAs',
@@ -315,4 +565,14 @@ exports.TEMPLATE_COMMENTS = [
315
565
  withAttr: 'value',
316
566
  comment: 'This legacy component was replaced by 3 new ones (https://taiga-ui.dev/components/progress-bar | https://taiga-ui.dev/components/progress-circle | https://taiga-ui.dev/components/progress-segmented ) ',
317
567
  },
568
+ {
569
+ tag: 'tui-input-file',
570
+ withAttr: 'loadingFiles',
571
+ comment: 'This legacy component was replaced by new one (https://taiga-ui.dev/components/input-files) ',
572
+ },
573
+ {
574
+ tag: 'tui-input-tag',
575
+ withAttr: 'allowSpaces',
576
+ comment: 'Use property [separator] to forbid spaces. See example: https://taiga-ui.dev/components/input-tag#no-spaces-inside-tags',
577
+ },
318
578
  ];
@@ -98,4 +98,14 @@ exports.MIGRATION_WARNINGS = [
98
98
  moduleSpecifier: '@taiga-ui/proprietary-core',
99
99
  message: 'Proprietary Carousel is old and has different API. Use new version of the same module from @taiga-ui/kit. Also, check new API: https://taiga-ui.dev/components/carousel/API',
100
100
  },
101
+ {
102
+ name: 'TUI_EDITOR_STYLES',
103
+ moduleSpecifier: '@taiga-ui/addon-editor',
104
+ message: 'TUI_EDITOR_STYLES token has been deleted in 3.0, please use global styles to override default editor styles',
105
+ },
106
+ {
107
+ name: 'TuiNotificationContentContext',
108
+ moduleSpecifier: '@taiga-ui/core',
109
+ message: 'TuiNotificationContentContext has been deleted in 3.0. Please, use TuiDialog<TuiAlertOptions<I>, O> instead of TuiNotificationContentContext<O, I>',
110
+ },
101
111
  ];
@@ -21,30 +21,33 @@ const colored_log_1 = require("../utils/colored-log");
21
21
  const migrate_date_time_1 = require("./steps/migrate-date-time");
22
22
  const add_styles_1 = require("../utils/add-styles");
23
23
  const taiga_styles_1 = require("../constants/taiga-styles");
24
- const { performance } = require('perf_hooks');
24
+ const replace_styles_1 = require("./steps/replace-styles");
25
+ const constants_1 = require("../constants");
26
+ const get_execution_time_1 = require("../utils/get-execution-time");
27
+ const migrate_taiga_proprietary_icons_1 = require("./steps/migrate-taiga-proprietary-icons");
25
28
  function updateToV3(options) {
26
29
  const t0 = performance.now();
27
30
  colored_log_1.titleLog(`\n\n${colored_log_1.START_SYMBOL} Your packages will be updated to @taiga-ui/*@${versions_1.TAIGA_VERSION}\n`);
28
31
  return schematics_1.chain([
29
32
  main(options),
30
33
  addTaigaStyles(options),
34
+ migrate_taiga_proprietary_icons_1.migrateTaigaProprietaryIcons(options),
31
35
  () => {
32
- const t1 = performance.now();
33
- const sum = t1 - t0;
34
- const result = sum > 1000 ? `${(sum / 1000).toFixed(2)} sec.` : `${sum.toFixed(2)} ms.`;
35
- colored_log_1.titleLog(`${colored_log_1.FINISH_SYMBOL} We migrated packages to @taiga-ui/*@${versions_1.TAIGA_VERSION} in ${result} \n`);
36
+ const executionTime = get_execution_time_1.getExecutionTime(t0, performance.now());
37
+ colored_log_1.titleLog(`${colored_log_1.FINISH_SYMBOL} We migrated packages to @taiga-ui/*@${versions_1.TAIGA_VERSION} in ${executionTime}. \n`);
36
38
  },
37
39
  ]);
38
40
  }
39
41
  exports.updateToV3 = updateToV3;
40
- function main(_) {
42
+ function main(options) {
41
43
  return (tree, context) => tslib_1.__awaiter(this, void 0, void 0, function* () {
42
44
  const fileSystem = getFileSystem(tree);
43
- replace_deep_import_1.replaceDeepImports();
45
+ !options['skip-deep-imports'] && replace_deep_import_1.replaceDeepImports();
44
46
  replace_enums_1.replaceEnums();
45
47
  rename_types_1.renameTypes();
46
48
  replace_const_1.replaceConstants();
47
49
  replace_services_1.replaceServices();
50
+ replace_styles_1.replaceStyles();
48
51
  show_warnings_1.showWarnings(context);
49
52
  migrate_templates_1.migrateTemplates(fileSystem);
50
53
  fileSystem.commitEdits();
@@ -60,13 +63,21 @@ function main(_) {
60
63
  });
61
64
  }
62
65
  function addTaigaStyles(options) {
63
- return (_) => tslib_1.__awaiter(this, void 0, void 0, function* () {
66
+ return (tree, context) => tslib_1.__awaiter(this, void 0, void 0, function* () {
64
67
  const taigaStyles = [taiga_styles_1.TAIGA_THEME_FONTS];
65
- return add_styles_1.addStylesToAngularJson(options, taigaStyles);
68
+ const stylesToReplace = {
69
+ from: taiga_styles_1.TAIGA_GLOBAL_OLD_STYLE,
70
+ to: [taiga_styles_1.TAIGA_GLOBAL_NEW_STYLE],
71
+ };
72
+ ng_morph_1.addPackageJsonDependency(tree, {
73
+ name: `@taiga-ui/styles`,
74
+ version: versions_1.TAIGA_VERSION,
75
+ });
76
+ return add_styles_1.addStylesToAngularJson(options, context, taigaStyles, existingStyles => !!(existingStyles === null || existingStyles === void 0 ? void 0 : existingStyles.some(s => String(s).includes('tinkoff-theme'))), stylesToReplace, tree);
66
77
  });
67
78
  }
68
79
  function getFileSystem(tree) {
69
- const project = ng_morph_1.createProject(tree, '/', '**/**.{html,ts}');
80
+ const project = ng_morph_1.createProject(tree, '/', [constants_1.ALL_FILES]);
70
81
  ng_morph_1.setActiveProject(project);
71
82
  return project.getFileSystem().fs;
72
83
  }