@taiga-ui/cdk 2.52.0 → 2.54.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (386) hide show
  1. package/bundles/taiga-ui-cdk-components-alert-host.umd.js +1 -1
  2. package/bundles/taiga-ui-cdk-components-alert-host.umd.js.map +1 -1
  3. package/bundles/taiga-ui-cdk-components-alert-host.umd.min.js +1 -1
  4. package/bundles/taiga-ui-cdk-components-alert-host.umd.min.js.map +1 -1
  5. package/bundles/taiga-ui-cdk-components-dialog-host.umd.js +1 -1
  6. package/bundles/taiga-ui-cdk-components-dialog-host.umd.min.js +1 -1
  7. package/bundles/taiga-ui-cdk-components-dialog-host.umd.min.js.map +1 -1
  8. package/bundles/taiga-ui-cdk-components-dropdown-host.umd.js +5 -13
  9. package/bundles/taiga-ui-cdk-components-dropdown-host.umd.js.map +1 -1
  10. package/bundles/taiga-ui-cdk-components-dropdown-host.umd.min.js +1 -1
  11. package/bundles/taiga-ui-cdk-components-dropdown-host.umd.min.js.map +1 -1
  12. package/bundles/taiga-ui-cdk-constants.umd.js +9 -0
  13. package/bundles/taiga-ui-cdk-constants.umd.js.map +1 -1
  14. package/bundles/taiga-ui-cdk-constants.umd.min.js +1 -1
  15. package/bundles/taiga-ui-cdk-constants.umd.min.js.map +1 -1
  16. package/bundles/taiga-ui-cdk-directives-hovered.umd.js +29 -14
  17. package/bundles/taiga-ui-cdk-directives-hovered.umd.js.map +1 -1
  18. package/bundles/taiga-ui-cdk-directives-hovered.umd.min.js +1 -1
  19. package/bundles/taiga-ui-cdk-directives-hovered.umd.min.js.map +1 -1
  20. package/bundles/taiga-ui-cdk-directives-media.umd.js +2 -0
  21. package/bundles/taiga-ui-cdk-directives-media.umd.js.map +1 -1
  22. package/bundles/taiga-ui-cdk-directives-media.umd.min.js.map +1 -1
  23. package/bundles/taiga-ui-cdk-observables.umd.js +56 -0
  24. package/bundles/taiga-ui-cdk-observables.umd.js.map +1 -1
  25. package/bundles/taiga-ui-cdk-observables.umd.min.js +1 -1
  26. package/bundles/taiga-ui-cdk-observables.umd.min.js.map +1 -1
  27. package/bundles/taiga-ui-cdk-services.umd.js +1 -0
  28. package/bundles/taiga-ui-cdk-services.umd.js.map +1 -1
  29. package/bundles/taiga-ui-cdk-services.umd.min.js.map +1 -1
  30. package/bundles/taiga-ui-cdk-tokens.umd.js +1 -1
  31. package/bundles/taiga-ui-cdk-tokens.umd.js.map +1 -1
  32. package/bundles/taiga-ui-cdk-tokens.umd.min.js +1 -1
  33. package/bundles/taiga-ui-cdk-tokens.umd.min.js.map +1 -1
  34. package/bundles/taiga-ui-cdk-utils-browser.umd.js +30 -0
  35. package/bundles/taiga-ui-cdk-utils-browser.umd.js.map +1 -1
  36. package/bundles/taiga-ui-cdk-utils-browser.umd.min.js +1 -1
  37. package/bundles/taiga-ui-cdk-utils-browser.umd.min.js.map +1 -1
  38. package/bundles/taiga-ui-cdk-utils-dom.umd.js +69 -2
  39. package/bundles/taiga-ui-cdk-utils-dom.umd.js.map +1 -1
  40. package/bundles/taiga-ui-cdk-utils-dom.umd.min.js +1 -1
  41. package/bundles/taiga-ui-cdk-utils-dom.umd.min.js.map +1 -1
  42. package/bundles/taiga-ui-cdk-utils-focus.umd.js +42 -1
  43. package/bundles/taiga-ui-cdk-utils-focus.umd.js.map +1 -1
  44. package/bundles/taiga-ui-cdk-utils-focus.umd.min.js +1 -1
  45. package/bundles/taiga-ui-cdk-utils-focus.umd.min.js.map +1 -1
  46. package/bundles/taiga-ui-cdk-utils-format.umd.js +6 -2
  47. package/bundles/taiga-ui-cdk-utils-format.umd.js.map +1 -1
  48. package/bundles/taiga-ui-cdk-utils-format.umd.min.js +1 -1
  49. package/bundles/taiga-ui-cdk-utils-format.umd.min.js.map +1 -1
  50. package/bundles/taiga-ui-cdk-utils-math.umd.js +48 -0
  51. package/bundles/taiga-ui-cdk-utils-math.umd.js.map +1 -1
  52. package/bundles/taiga-ui-cdk-utils-math.umd.min.js +1 -1
  53. package/bundles/taiga-ui-cdk-utils-math.umd.min.js.map +1 -1
  54. package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.js +64 -2
  55. package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.js.map +1 -1
  56. package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.min.js +1 -1
  57. package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.min.js.map +1 -1
  58. package/bundles/taiga-ui-cdk-utils-os.umd.js +17 -1
  59. package/bundles/taiga-ui-cdk-utils-os.umd.js.map +1 -1
  60. package/bundles/taiga-ui-cdk-utils-os.umd.min.js +1 -1
  61. package/bundles/taiga-ui-cdk-utils-os.umd.min.js.map +1 -1
  62. package/bundles/taiga-ui-cdk-utils-svg.umd.js +5 -1
  63. package/bundles/taiga-ui-cdk-utils-svg.umd.js.map +1 -1
  64. package/bundles/taiga-ui-cdk-utils-svg.umd.min.js +1 -1
  65. package/bundles/taiga-ui-cdk-utils-svg.umd.min.js.map +1 -1
  66. package/components/alert-host/taiga-ui-cdk-components-alert-host.metadata.json +1 -1
  67. package/components/dialog-host/taiga-ui-cdk-components-dialog-host.metadata.json +1 -1
  68. package/components/dropdown-host/taiga-ui-cdk-components-dropdown-host.metadata.json +1 -1
  69. package/constants/empty.d.ts +1 -0
  70. package/constants/taiga-ui-cdk-constants.metadata.json +1 -1
  71. package/directives/hovered/hovered.directive.d.ts +5 -5
  72. package/directives/hovered/taiga-ui-cdk-directives-hovered.metadata.json +1 -1
  73. package/directives/media/taiga-ui-cdk-directives-media.metadata.json +1 -1
  74. package/esm2015/components/alert-host/alert-host.component.js +2 -2
  75. package/esm2015/components/dialog-host/dialog-host.component.js +1 -1
  76. package/esm2015/components/dropdown-host/dropdown-host.component.js +3 -10
  77. package/esm2015/constants/empty.js +9 -1
  78. package/esm2015/directives/hovered/hovered.directive.js +28 -13
  79. package/esm2015/directives/media/media.directive.js +3 -1
  80. package/esm2015/observables/drag-and-drop-from.js +6 -1
  81. package/esm2015/observables/focus-visible-observable.js +6 -1
  82. package/esm2015/observables/items-query-list-observable.js +4 -1
  83. package/esm2015/observables/mouse-drag-finish-from.js +4 -1
  84. package/esm2015/observables/must-be-present.js +6 -1
  85. package/esm2015/observables/pressed-observable.js +6 -1
  86. package/esm2015/observables/prevent-default.js +6 -1
  87. package/esm2015/observables/stop-propagation.js +6 -1
  88. package/esm2015/observables/typed-from-event.js +6 -1
  89. package/esm2015/observables/watch.js +6 -1
  90. package/esm2015/services/hovered.service.js +2 -1
  91. package/esm2015/tokens/is-firefox.js +2 -2
  92. package/esm2015/utils/browser/is-edge-older-than.js +6 -1
  93. package/esm2015/utils/browser/is-edge.js +6 -1
  94. package/esm2015/utils/browser/is-firefox.js +6 -1
  95. package/esm2015/utils/browser/is-ie.js +6 -1
  96. package/esm2015/utils/browser/is-safari.js +6 -1
  97. package/esm2015/utils/dom/can-scroll.js +6 -1
  98. package/esm2015/utils/dom/contains-or-after.js +6 -1
  99. package/esm2015/utils/dom/get-actual-target.js +4 -1
  100. package/esm2015/utils/dom/get-clipboard-data-text.js +4 -1
  101. package/esm2015/utils/dom/get-closest-element.js +3 -2
  102. package/esm2015/utils/dom/get-document-or-shadow-root.js +6 -1
  103. package/esm2015/utils/dom/get-element-obscurers.js +4 -1
  104. package/esm2015/utils/dom/get-element-offset.js +4 -1
  105. package/esm2015/utils/dom/get-scroll-parent.js +5 -2
  106. package/esm2015/utils/dom/index.js +2 -1
  107. package/esm2015/utils/dom/is-current-target.js +6 -1
  108. package/esm2015/utils/dom/is-inside-iframe.js +4 -1
  109. package/esm2015/utils/dom/is-node-in.js +4 -1
  110. package/esm2015/utils/dom/point-to-client-rect.js +11 -0
  111. package/esm2015/utils/focus/blur-native-focused.js +4 -1
  112. package/esm2015/utils/focus/get-closest-keyboard-focusable.js +7 -2
  113. package/esm2015/utils/focus/get-native-focused.js +4 -1
  114. package/esm2015/utils/focus/is-native-focused-in.js +4 -1
  115. package/esm2015/utils/focus/is-native-focused.js +4 -1
  116. package/esm2015/utils/focus/is-native-keyboard-focusable.js +4 -1
  117. package/esm2015/utils/focus/is-native-mouse-focusable.js +6 -1
  118. package/esm2015/utils/focus/move-focus.js +4 -1
  119. package/esm2015/utils/focus/set-native-focused.js +2 -1
  120. package/esm2015/utils/focus/set-native-mouse-focused.js +4 -1
  121. package/esm2015/utils/format/pad-start.js +3 -3
  122. package/esm2015/utils/format/px.js +4 -1
  123. package/esm2015/utils/math/clamp.js +4 -1
  124. package/esm2015/utils/math/in-range.js +4 -1
  125. package/esm2015/utils/math/normalize-to-int-number.js +4 -1
  126. package/esm2015/utils/math/quantize.js +4 -1
  127. package/esm2015/utils/math/round.js +16 -1
  128. package/esm2015/utils/math/sum.js +4 -1
  129. package/esm2015/utils/math/to-int.js +6 -1
  130. package/esm2015/utils/math/to-radians.js +4 -1
  131. package/esm2015/utils/miscellaneous/distance-between-touches.js +6 -1
  132. package/esm2015/utils/miscellaneous/ease-in-out-quad.js +6 -1
  133. package/esm2015/utils/miscellaneous/fallback-value.js +3 -2
  134. package/esm2015/utils/miscellaneous/flat-length.js +5 -2
  135. package/esm2015/utils/miscellaneous/get-original-array-from-query-list.js +4 -1
  136. package/esm2015/utils/miscellaneous/get-swipe-direction.js +6 -1
  137. package/esm2015/utils/miscellaneous/identity.js +2 -1
  138. package/esm2015/utils/miscellaneous/is-element-editable.js +6 -1
  139. package/esm2015/utils/miscellaneous/is-number.js +6 -1
  140. package/esm2015/utils/miscellaneous/is-present.js +6 -1
  141. package/esm2015/utils/miscellaneous/mark-control-as-touched-and-validate.js +6 -1
  142. package/esm2015/utils/miscellaneous/nullable-same.js +4 -1
  143. package/esm2015/utils/miscellaneous/uniq-by.js +6 -1
  144. package/esm2015/utils/os/is-apple-platform.js +5 -2
  145. package/esm2015/utils/os/is-apple.js +6 -1
  146. package/esm2015/utils/os/is-ios.js +6 -1
  147. package/esm2015/utils/svg/svg-linear-gradient-processor.js +5 -2
  148. package/esm5/components/alert-host/alert-host.component.js +2 -2
  149. package/esm5/components/dialog-host/dialog-host.component.js +1 -1
  150. package/esm5/components/dropdown-host/dropdown-host.component.js +3 -10
  151. package/esm5/constants/empty.js +9 -1
  152. package/esm5/directives/hovered/hovered.directive.js +29 -14
  153. package/esm5/directives/media/media.directive.js +3 -1
  154. package/esm5/observables/drag-and-drop-from.js +6 -1
  155. package/esm5/observables/focus-visible-observable.js +6 -1
  156. package/esm5/observables/items-query-list-observable.js +4 -1
  157. package/esm5/observables/mouse-drag-finish-from.js +4 -1
  158. package/esm5/observables/must-be-present.js +6 -1
  159. package/esm5/observables/pressed-observable.js +6 -1
  160. package/esm5/observables/prevent-default.js +6 -1
  161. package/esm5/observables/stop-propagation.js +6 -1
  162. package/esm5/observables/typed-from-event.js +6 -1
  163. package/esm5/observables/watch.js +6 -1
  164. package/esm5/services/hovered.service.js +2 -1
  165. package/esm5/tokens/is-firefox.js +2 -2
  166. package/esm5/utils/browser/is-edge-older-than.js +6 -1
  167. package/esm5/utils/browser/is-edge.js +6 -1
  168. package/esm5/utils/browser/is-firefox.js +6 -1
  169. package/esm5/utils/browser/is-ie.js +6 -1
  170. package/esm5/utils/browser/is-safari.js +6 -1
  171. package/esm5/utils/dom/can-scroll.js +6 -1
  172. package/esm5/utils/dom/contains-or-after.js +6 -1
  173. package/esm5/utils/dom/get-actual-target.js +4 -1
  174. package/esm5/utils/dom/get-clipboard-data-text.js +4 -1
  175. package/esm5/utils/dom/get-closest-element.js +3 -2
  176. package/esm5/utils/dom/get-document-or-shadow-root.js +6 -1
  177. package/esm5/utils/dom/get-element-obscurers.js +4 -1
  178. package/esm5/utils/dom/get-element-offset.js +4 -1
  179. package/esm5/utils/dom/get-scroll-parent.js +5 -2
  180. package/esm5/utils/dom/index.js +2 -1
  181. package/esm5/utils/dom/is-current-target.js +6 -1
  182. package/esm5/utils/dom/is-inside-iframe.js +4 -1
  183. package/esm5/utils/dom/is-node-in.js +4 -1
  184. package/esm5/utils/dom/point-to-client-rect.js +13 -0
  185. package/esm5/utils/focus/blur-native-focused.js +4 -1
  186. package/esm5/utils/focus/get-closest-keyboard-focusable.js +7 -2
  187. package/esm5/utils/focus/get-native-focused.js +4 -1
  188. package/esm5/utils/focus/is-native-focused-in.js +4 -1
  189. package/esm5/utils/focus/is-native-focused.js +4 -1
  190. package/esm5/utils/focus/is-native-keyboard-focusable.js +4 -1
  191. package/esm5/utils/focus/is-native-mouse-focusable.js +6 -1
  192. package/esm5/utils/focus/move-focus.js +4 -1
  193. package/esm5/utils/focus/set-native-focused.js +2 -1
  194. package/esm5/utils/focus/set-native-mouse-focused.js +4 -1
  195. package/esm5/utils/format/pad-start.js +3 -3
  196. package/esm5/utils/format/px.js +4 -1
  197. package/esm5/utils/math/clamp.js +4 -1
  198. package/esm5/utils/math/in-range.js +4 -1
  199. package/esm5/utils/math/normalize-to-int-number.js +4 -1
  200. package/esm5/utils/math/quantize.js +4 -1
  201. package/esm5/utils/math/round.js +16 -1
  202. package/esm5/utils/math/sum.js +4 -1
  203. package/esm5/utils/math/to-int.js +6 -1
  204. package/esm5/utils/math/to-radians.js +4 -1
  205. package/esm5/utils/miscellaneous/distance-between-touches.js +6 -1
  206. package/esm5/utils/miscellaneous/ease-in-out-quad.js +6 -1
  207. package/esm5/utils/miscellaneous/fallback-value.js +3 -2
  208. package/esm5/utils/miscellaneous/flat-length.js +5 -2
  209. package/esm5/utils/miscellaneous/get-original-array-from-query-list.js +4 -1
  210. package/esm5/utils/miscellaneous/get-swipe-direction.js +6 -1
  211. package/esm5/utils/miscellaneous/identity.js +2 -1
  212. package/esm5/utils/miscellaneous/is-element-editable.js +6 -1
  213. package/esm5/utils/miscellaneous/is-number.js +6 -1
  214. package/esm5/utils/miscellaneous/is-present.js +6 -1
  215. package/esm5/utils/miscellaneous/mark-control-as-touched-and-validate.js +6 -1
  216. package/esm5/utils/miscellaneous/nullable-same.js +4 -1
  217. package/esm5/utils/miscellaneous/uniq-by.js +6 -1
  218. package/esm5/utils/os/is-apple-platform.js +5 -2
  219. package/esm5/utils/os/is-apple.js +6 -1
  220. package/esm5/utils/os/is-ios.js +6 -1
  221. package/esm5/utils/svg/svg-linear-gradient-processor.js +5 -2
  222. package/fesm2015/taiga-ui-cdk-components-alert-host.js +1 -1
  223. package/fesm2015/taiga-ui-cdk-components-alert-host.js.map +1 -1
  224. package/fesm2015/taiga-ui-cdk-components-dialog-host.js +1 -1
  225. package/fesm2015/taiga-ui-cdk-components-dropdown-host.js +2 -9
  226. package/fesm2015/taiga-ui-cdk-components-dropdown-host.js.map +1 -1
  227. package/fesm2015/taiga-ui-cdk-constants.js +9 -1
  228. package/fesm2015/taiga-ui-cdk-constants.js.map +1 -1
  229. package/fesm2015/taiga-ui-cdk-directives-hovered.js +28 -13
  230. package/fesm2015/taiga-ui-cdk-directives-hovered.js.map +1 -1
  231. package/fesm2015/taiga-ui-cdk-directives-media.js +2 -0
  232. package/fesm2015/taiga-ui-cdk-directives-media.js.map +1 -1
  233. package/fesm2015/taiga-ui-cdk-observables.js +47 -1
  234. package/fesm2015/taiga-ui-cdk-observables.js.map +1 -1
  235. package/fesm2015/taiga-ui-cdk-services.js +1 -0
  236. package/fesm2015/taiga-ui-cdk-services.js.map +1 -1
  237. package/fesm2015/taiga-ui-cdk-tokens.js +1 -1
  238. package/fesm2015/taiga-ui-cdk-tokens.js.map +1 -1
  239. package/fesm2015/taiga-ui-cdk-utils-browser.js +26 -1
  240. package/fesm2015/taiga-ui-cdk-utils-browser.js.map +1 -1
  241. package/fesm2015/taiga-ui-cdk-utils-dom.js +56 -3
  242. package/fesm2015/taiga-ui-cdk-utils-dom.js.map +1 -1
  243. package/fesm2015/taiga-ui-cdk-utils-focus.js +34 -2
  244. package/fesm2015/taiga-ui-cdk-utils-focus.js.map +1 -1
  245. package/fesm2015/taiga-ui-cdk-utils-format.js +6 -3
  246. package/fesm2015/taiga-ui-cdk-utils-format.js.map +1 -1
  247. package/fesm2015/taiga-ui-cdk-utils-math.js +39 -1
  248. package/fesm2015/taiga-ui-cdk-utils-math.js.map +1 -1
  249. package/fesm2015/taiga-ui-cdk-utils-miscellaneous.js +54 -3
  250. package/fesm2015/taiga-ui-cdk-utils-miscellaneous.js.map +1 -1
  251. package/fesm2015/taiga-ui-cdk-utils-os.js +15 -2
  252. package/fesm2015/taiga-ui-cdk-utils-os.js.map +1 -1
  253. package/fesm2015/taiga-ui-cdk-utils-svg.js +5 -2
  254. package/fesm2015/taiga-ui-cdk-utils-svg.js.map +1 -1
  255. package/fesm5/taiga-ui-cdk-components-alert-host.js +1 -1
  256. package/fesm5/taiga-ui-cdk-components-alert-host.js.map +1 -1
  257. package/fesm5/taiga-ui-cdk-components-dialog-host.js +1 -1
  258. package/fesm5/taiga-ui-cdk-components-dropdown-host.js +2 -9
  259. package/fesm5/taiga-ui-cdk-components-dropdown-host.js.map +1 -1
  260. package/fesm5/taiga-ui-cdk-constants.js +9 -1
  261. package/fesm5/taiga-ui-cdk-constants.js.map +1 -1
  262. package/fesm5/taiga-ui-cdk-directives-hovered.js +29 -14
  263. package/fesm5/taiga-ui-cdk-directives-hovered.js.map +1 -1
  264. package/fesm5/taiga-ui-cdk-directives-media.js +2 -0
  265. package/fesm5/taiga-ui-cdk-directives-media.js.map +1 -1
  266. package/fesm5/taiga-ui-cdk-observables.js +47 -1
  267. package/fesm5/taiga-ui-cdk-observables.js.map +1 -1
  268. package/fesm5/taiga-ui-cdk-services.js +1 -0
  269. package/fesm5/taiga-ui-cdk-services.js.map +1 -1
  270. package/fesm5/taiga-ui-cdk-tokens.js +1 -1
  271. package/fesm5/taiga-ui-cdk-tokens.js.map +1 -1
  272. package/fesm5/taiga-ui-cdk-utils-browser.js +26 -1
  273. package/fesm5/taiga-ui-cdk-utils-browser.js.map +1 -1
  274. package/fesm5/taiga-ui-cdk-utils-dom.js +58 -3
  275. package/fesm5/taiga-ui-cdk-utils-dom.js.map +1 -1
  276. package/fesm5/taiga-ui-cdk-utils-focus.js +34 -2
  277. package/fesm5/taiga-ui-cdk-utils-focus.js.map +1 -1
  278. package/fesm5/taiga-ui-cdk-utils-format.js +6 -3
  279. package/fesm5/taiga-ui-cdk-utils-format.js.map +1 -1
  280. package/fesm5/taiga-ui-cdk-utils-math.js +39 -1
  281. package/fesm5/taiga-ui-cdk-utils-math.js.map +1 -1
  282. package/fesm5/taiga-ui-cdk-utils-miscellaneous.js +54 -3
  283. package/fesm5/taiga-ui-cdk-utils-miscellaneous.js.map +1 -1
  284. package/fesm5/taiga-ui-cdk-utils-os.js +15 -2
  285. package/fesm5/taiga-ui-cdk-utils-os.js.map +1 -1
  286. package/fesm5/taiga-ui-cdk-utils-svg.js +5 -2
  287. package/fesm5/taiga-ui-cdk-utils-svg.js.map +1 -1
  288. package/observables/drag-and-drop-from.d.ts +4 -0
  289. package/observables/focus-visible-observable.d.ts +4 -0
  290. package/observables/items-query-list-observable.d.ts +2 -0
  291. package/observables/mouse-drag-finish-from.d.ts +2 -0
  292. package/observables/must-be-present.d.ts +4 -0
  293. package/observables/pressed-observable.d.ts +4 -0
  294. package/observables/prevent-default.d.ts +4 -0
  295. package/observables/stop-propagation.d.ts +4 -0
  296. package/observables/taiga-ui-cdk-observables.metadata.json +1 -1
  297. package/observables/typed-from-event.d.ts +16 -0
  298. package/observables/watch.d.ts +4 -0
  299. package/package.json +1 -1
  300. package/schematics/ng-update/constants/deprecated-functions.d.ts +2 -0
  301. package/schematics/ng-update/constants/deprecated-functions.js +714 -0
  302. package/schematics/ng-update/constants/templates.d.ts +8 -0
  303. package/schematics/ng-update/constants/templates.js +75 -0
  304. package/schematics/ng-update/constants/types.d.ts +1 -2
  305. package/schematics/ng-update/index.js +7 -24
  306. package/schematics/ng-update/steps/migrate-date-time.js +3 -0
  307. package/schematics/ng-update/steps/migrate-progress.js +3 -0
  308. package/schematics/ng-update/steps/migrate-sliders/index.js +3 -0
  309. package/schematics/ng-update/steps/migrate-templates.js +21 -3
  310. package/schematics/ng-update/steps/miscellaneous.js +3 -0
  311. package/schematics/ng-update/steps/remove-module.js +3 -0
  312. package/schematics/ng-update/steps/rename-types.js +4 -3
  313. package/schematics/ng-update/steps/replace-const.d.ts +1 -1
  314. package/schematics/ng-update/steps/replace-const.js +5 -2
  315. package/schematics/ng-update/steps/replace-deep-import.js +3 -0
  316. package/schematics/ng-update/steps/replace-enums.js +4 -3
  317. package/schematics/ng-update/steps/replace-functions.js +15 -0
  318. package/schematics/ng-update/steps/replace-services.js +4 -4
  319. package/schematics/utils/colored-log.d.ts +8 -0
  320. package/schematics/utils/colored-log.js +15 -1
  321. package/schematics/utils/templates/ng-component-input-manipulations.d.ts +2 -1
  322. package/schematics/utils/templates/ng-component-input-manipulations.js +2 -1
  323. package/services/hovered.service.d.ts +1 -0
  324. package/services/taiga-ui-cdk-services.metadata.json +1 -1
  325. package/utils/browser/is-edge-older-than.d.ts +4 -0
  326. package/utils/browser/is-edge.d.ts +4 -0
  327. package/utils/browser/is-firefox.d.ts +4 -0
  328. package/utils/browser/is-ie.d.ts +4 -0
  329. package/utils/browser/is-safari.d.ts +4 -0
  330. package/utils/browser/taiga-ui-cdk-utils-browser.metadata.json +1 -1
  331. package/utils/dom/can-scroll.d.ts +4 -0
  332. package/utils/dom/contains-or-after.d.ts +4 -0
  333. package/utils/dom/get-actual-target.d.ts +2 -0
  334. package/utils/dom/get-clipboard-data-text.d.ts +2 -0
  335. package/utils/dom/get-closest-element.d.ts +1 -1
  336. package/utils/dom/get-document-or-shadow-root.d.ts +4 -0
  337. package/utils/dom/get-element-obscurers.d.ts +2 -0
  338. package/utils/dom/get-element-offset.d.ts +2 -0
  339. package/utils/dom/get-scroll-parent.d.ts +3 -1
  340. package/utils/dom/index.d.ts +1 -0
  341. package/utils/dom/is-current-target.d.ts +4 -0
  342. package/utils/dom/is-inside-iframe.d.ts +2 -0
  343. package/utils/dom/is-node-in.d.ts +2 -0
  344. package/utils/dom/point-to-client-rect.d.ts +1 -0
  345. package/utils/dom/taiga-ui-cdk-utils-dom.metadata.json +1 -1
  346. package/utils/focus/blur-native-focused.d.ts +2 -0
  347. package/utils/focus/get-closest-keyboard-focusable.d.ts +5 -1
  348. package/utils/focus/get-native-focused.d.ts +2 -0
  349. package/utils/focus/is-native-focused-in.d.ts +2 -0
  350. package/utils/focus/is-native-focused.d.ts +2 -0
  351. package/utils/focus/is-native-keyboard-focusable.d.ts +2 -0
  352. package/utils/focus/is-native-mouse-focusable.d.ts +4 -0
  353. package/utils/focus/move-focus.d.ts +2 -0
  354. package/utils/focus/set-native-mouse-focused.d.ts +2 -0
  355. package/utils/focus/taiga-ui-cdk-utils-focus.metadata.json +1 -1
  356. package/utils/format/pad-start.d.ts +1 -2
  357. package/utils/format/px.d.ts +2 -0
  358. package/utils/format/taiga-ui-cdk-utils-format.metadata.json +1 -1
  359. package/utils/math/clamp.d.ts +2 -0
  360. package/utils/math/in-range.d.ts +2 -0
  361. package/utils/math/normalize-to-int-number.d.ts +2 -0
  362. package/utils/math/quantize.d.ts +2 -0
  363. package/utils/math/round.d.ts +12 -0
  364. package/utils/math/sum.d.ts +2 -0
  365. package/utils/math/taiga-ui-cdk-utils-math.metadata.json +1 -1
  366. package/utils/math/to-int.d.ts +4 -0
  367. package/utils/math/to-radians.d.ts +2 -0
  368. package/utils/miscellaneous/distance-between-touches.d.ts +4 -0
  369. package/utils/miscellaneous/ease-in-out-quad.d.ts +4 -0
  370. package/utils/miscellaneous/fallback-value.d.ts +1 -1
  371. package/utils/miscellaneous/flat-length.d.ts +3 -1
  372. package/utils/miscellaneous/get-original-array-from-query-list.d.ts +2 -0
  373. package/utils/miscellaneous/get-swipe-direction.d.ts +4 -0
  374. package/utils/miscellaneous/is-element-editable.d.ts +4 -0
  375. package/utils/miscellaneous/is-number.d.ts +4 -0
  376. package/utils/miscellaneous/is-present.d.ts +4 -0
  377. package/utils/miscellaneous/mark-control-as-touched-and-validate.d.ts +4 -0
  378. package/utils/miscellaneous/nullable-same.d.ts +2 -0
  379. package/utils/miscellaneous/taiga-ui-cdk-utils-miscellaneous.metadata.json +1 -1
  380. package/utils/miscellaneous/uniq-by.d.ts +4 -0
  381. package/utils/os/is-apple-platform.d.ts +3 -1
  382. package/utils/os/is-apple.d.ts +4 -0
  383. package/utils/os/is-ios.d.ts +4 -0
  384. package/utils/os/taiga-ui-cdk-utils-os.metadata.json +1 -1
  385. package/utils/svg/svg-linear-gradient-processor.d.ts +3 -1
  386. package/utils/svg/taiga-ui-cdk-utils-svg.metadata.json +1 -1
@@ -1,8 +1,10 @@
1
+ import { Element } from 'parse5';
1
2
  export interface ReplacementAttributes {
2
3
  readonly from: {
3
4
  readonly attrName: string;
4
5
  readonly withTagNames?: string[];
5
6
  readonly withAttrsNames?: string[];
7
+ readonly filterFn?: (element: Element) => boolean;
6
8
  };
7
9
  readonly to: {
8
10
  readonly attrName: string;
@@ -15,6 +17,7 @@ export interface ReplacementTags {
15
17
  }
16
18
  export interface AttributeToDirective {
17
19
  readonly componentSelector: string | string[];
20
+ readonly filterFn?: (element: Element) => boolean;
18
21
  readonly inputProperty: string;
19
22
  readonly directive: string;
20
23
  readonly directiveModule: {
@@ -22,7 +25,12 @@ export interface AttributeToDirective {
22
25
  readonly moduleSpecifier: string;
23
26
  };
24
27
  }
28
+ export interface InputToRemove {
29
+ readonly inputName: string;
30
+ readonly tags: string[];
31
+ }
25
32
  export declare const ATTRS_TO_REPLACE: ReplacementAttributes[];
33
+ export declare const INPUTS_TO_REMOVE: InputToRemove[];
26
34
  export declare const TAGS_TO_REPLACE: ReplacementTags[];
27
35
  export declare const ATTR_TO_DIRECTIVE: AttributeToDirective[];
28
36
  export declare const TEMPLATE_COMMENTS: readonly [{
@@ -1,7 +1,28 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tui_interactive_selectors_1 = require("./tui-interactive-selectors");
4
+ const elements_1 = require("../../utils/templates/elements");
4
5
  exports.ATTRS_TO_REPLACE = [
6
+ {
7
+ from: {
8
+ attrName: 'icon',
9
+ withTagNames: ['tui-input-tag'],
10
+ filterFn: element => { var _a; return ((_a = element.attrs.find(attr => attr.name === 'iconalign')) === null || _a === void 0 ? void 0 : _a.value) === 'left'; },
11
+ },
12
+ to: {
13
+ attrName: 'iconLeft',
14
+ },
15
+ },
16
+ {
17
+ from: {
18
+ attrName: '[icon]',
19
+ withTagNames: ['tui-input-tag'],
20
+ filterFn: element => { var _a; return ((_a = element.attrs.find(attr => attr.name === 'iconalign')) === null || _a === void 0 ? void 0 : _a.value) === 'left'; },
21
+ },
22
+ to: {
23
+ attrName: '[iconLeft]',
24
+ },
25
+ },
5
26
  {
6
27
  from: { attrName: 'tuiResizableColumn', withAttrsNames: ['tuiResizableColumn'] },
7
28
  to: { attrName: 'tuiTh [resizable]="true"' },
@@ -58,6 +79,12 @@ exports.ATTRS_TO_REPLACE = [
58
79
  },
59
80
  },
60
81
  ];
82
+ exports.INPUTS_TO_REMOVE = [
83
+ {
84
+ inputName: 'iconAlign',
85
+ tags: ['tui-input', 'tui-primitive-textfield', 'tui-input-tag'],
86
+ },
87
+ ];
61
88
  exports.TAGS_TO_REPLACE = [
62
89
  {
63
90
  from: 'tui-group',
@@ -130,6 +157,54 @@ exports.ATTR_TO_DIRECTIVE = [
130
157
  moduleSpecifier: '@taiga-ui/core',
131
158
  },
132
159
  },
160
+ {
161
+ componentSelector: 'tui-input',
162
+ inputProperty: 'icon',
163
+ directive: 'tuiTextfieldIcon',
164
+ directiveModule: {
165
+ name: 'TuiTextfieldControllerModule',
166
+ moduleSpecifier: '@taiga-ui/core',
167
+ },
168
+ filterFn: element => { var _a; return ((_a = element.attrs.find(attr => attr.name === 'iconalign')) === null || _a === void 0 ? void 0 : _a.value) === 'right'; },
169
+ },
170
+ {
171
+ componentSelector: 'tui-input',
172
+ inputProperty: 'icon',
173
+ directive: 'tuiTextfieldIconLeft',
174
+ directiveModule: {
175
+ name: 'TuiTextfieldControllerModule',
176
+ moduleSpecifier: '@taiga-ui/core',
177
+ },
178
+ filterFn: element => {
179
+ var _a;
180
+ return !elements_1.hasElementAttribute(element, 'iconAlign') ||
181
+ ((_a = element.attrs.find(attr => attr.name === 'iconalign')) === null || _a === void 0 ? void 0 : _a.value) === 'left';
182
+ },
183
+ },
184
+ {
185
+ componentSelector: 'tui-primitive-textfield',
186
+ inputProperty: 'iconContent',
187
+ directive: 'tuiTextfieldIcon',
188
+ directiveModule: {
189
+ name: 'TuiTextfieldControllerModule',
190
+ moduleSpecifier: '@taiga-ui/core',
191
+ },
192
+ filterFn: element => {
193
+ var _a;
194
+ return !elements_1.hasElementAttribute(element, 'iconAlign') ||
195
+ ((_a = element.attrs.find(attr => attr.name === 'iconalign')) === null || _a === void 0 ? void 0 : _a.value) === 'right';
196
+ },
197
+ },
198
+ {
199
+ componentSelector: 'tui-primitive-textfield',
200
+ inputProperty: 'iconContent',
201
+ directive: 'tuiTextfieldIconLeft',
202
+ directiveModule: {
203
+ name: 'TuiTextfieldControllerModule',
204
+ moduleSpecifier: '@taiga-ui/core',
205
+ },
206
+ filterFn: element => { var _a; return ((_a = element.attrs.find(attr => attr.name === 'iconalign')) === null || _a === void 0 ? void 0 : _a.value) === 'left'; },
207
+ },
133
208
  {
134
209
  componentSelector: '*',
135
210
  inputProperty: 'scrollIntoView',
@@ -1,8 +1,7 @@
1
- interface TypeToRename {
1
+ export interface TypeToRename {
2
2
  readonly from: string;
3
3
  readonly to?: string;
4
4
  readonly moduleSpecifier?: string | string[];
5
5
  readonly preserveGenerics?: boolean;
6
6
  }
7
7
  export declare const TYPES_TO_RENAME: readonly TypeToRename[];
8
- export {};
@@ -19,47 +19,30 @@ const colored_log_1 = require("../utils/colored-log");
19
19
  const migrate_date_time_1 = require("./steps/migrate-date-time");
20
20
  function updateToV3(_) {
21
21
  return (tree, context) => tslib_1.__awaiter(this, void 0, void 0, function* () {
22
- console.info('\x1b[35m', `taiga packages will be updated to ${versions_1.TAIGA_VERSION}`);
22
+ const t0 = performance.now();
23
+ colored_log_1.titleLog(`\n\n${colored_log_1.START_SYMBOL} Your packages will be updated to @taiga-ui/*@${versions_1.TAIGA_VERSION}\n`);
23
24
  const fileSystem = getFileSystem(tree);
24
- colored_log_1.infoLog('replacing deep imports...');
25
25
  replace_deep_import_1.replaceDeepImports();
26
- colored_log_1.successLog('deep imports replaced');
27
- colored_log_1.infoLog('replacing enums imports...');
28
26
  replace_enums_1.replaceEnums();
29
- colored_log_1.successLog('enums replaced');
30
- colored_log_1.infoLog('renaming types...');
31
27
  rename_types_1.renameTypes();
32
- colored_log_1.successLog('types renamed');
33
- colored_log_1.infoLog('replacing consts...');
34
- replace_const_1.replaceConsts();
35
- colored_log_1.successLog('constants replaced');
36
- colored_log_1.infoLog('replacing services...');
28
+ replace_const_1.replaceConstants();
37
29
  replace_services_1.replaceServices();
38
- colored_log_1.successLog('services replaced');
39
30
  show_warnings_1.showWarnings(context);
40
- colored_log_1.infoLog('migrating templates...');
41
31
  migrate_templates_1.migrateTemplates(fileSystem);
42
- colored_log_1.successLog('templates migrated');
43
32
  fileSystem.commitEdits();
44
33
  ng_morph_1.saveActiveProject();
45
34
  const updatedFileSystem = getFileSystem(tree);
46
- colored_log_1.infoLog('migrating sliders...');
47
35
  migrate_sliders_1.migrateSliders(updatedFileSystem);
48
- colored_log_1.successLog('sliders migrated');
49
- colored_log_1.infoLog('migrating progress bars');
50
36
  migrate_progress_1.migrateProgress(updatedFileSystem);
51
- colored_log_1.successLog('progress bars migrated');
52
- colored_log_1.infoLog('removing modules...');
53
37
  remove_module_1.removeModules();
54
- colored_log_1.successLog('modules removed');
55
- colored_log_1.infoLog('migrating taiga date/time ...');
56
38
  migrate_date_time_1.dateTimeMigrations();
57
- colored_log_1.successLog('date/time migrated');
58
- colored_log_1.infoLog('miscellaneous migrating...');
59
39
  replace_functions_1.replaceFunctions();
60
40
  miscellaneous_1.miscellaneousMigrations();
61
- colored_log_1.successLog('miscellaneous migrated');
62
41
  ng_morph_1.saveActiveProject();
42
+ const t1 = performance.now();
43
+ const sum = t1 - t0;
44
+ const result = sum > 1000 ? `${(sum / 1000).toFixed(2)} sec.` : `${sum.toFixed(2)} ms.`;
45
+ colored_log_1.titleLog(`${colored_log_1.FINISH_SYMBOL} We migrated packages to @taiga-ui/*@${versions_1.TAIGA_VERSION} in ${result} \n`);
63
46
  });
64
47
  }
65
48
  exports.updateToV3 = updateToV3;
@@ -3,7 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const ng_morph_1 = require("ng-morph");
4
4
  const get_named_import_references_1 = require("../../utils/get-named-import-references");
5
5
  const insert_todo_1 = require("../../utils/insert-todo");
6
+ const colored_log_1 = require("../../utils/colored-log");
6
7
  function dateTimeMigrations() {
8
+ colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} migrating taiga date/time...`);
7
9
  migrateProperty({
8
10
  namedImport: 'TuiDay',
9
11
  moduleSpecifier: '@taiga-ui/cdk',
@@ -73,6 +75,7 @@ function dateTimeMigrations() {
73
75
  callback: node => insertTodoBeforeNode(node, message),
74
76
  });
75
77
  });
78
+ colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} date/time migrated \n`);
76
79
  }
77
80
  exports.dateTimeMigrations = dateTimeMigrations;
78
81
  function migrateProperty({ namedImport, moduleSpecifier, from, callback, }) {
@@ -4,9 +4,11 @@ const ng_morph_1 = require("ng-morph");
4
4
  const get_component_templates_1 = require("../../utils/templates/get-component-templates");
5
5
  const elements_1 = require("../../utils/templates/elements");
6
6
  const template_resource_1 = require("../../utils/templates/template-resource");
7
+ const colored_log_1 = require("../../utils/colored-log");
7
8
  exports.DEPRECATED_PROGRESS_PIPES_REG = /\s*\|\s*tuiProgressColorSegments(Async\s*\|\s*async)?/gi;
8
9
  const PROPERTY_FOR_DEPRECATED_PIPES = '[color]';
9
10
  function migrateProgress(fileSystem) {
11
+ colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} migrating progress bars...`);
10
12
  const templateResources = get_component_templates_1.getComponentTemplates('**/**');
11
13
  for (const templateResource of templateResources) {
12
14
  replaceProgressColorSegmentsPipe(templateResource, fileSystem);
@@ -14,6 +16,7 @@ function migrateProgress(fileSystem) {
14
16
  fileSystem.commitEdits();
15
17
  ng_morph_1.saveActiveProject();
16
18
  ng_morph_1.setActiveProject(ng_morph_1.createProject(fileSystem.tree, '/', '**/**'));
19
+ colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} progress bars migrated \n`);
17
20
  }
18
21
  exports.migrateProgress = migrateProgress;
19
22
  function replaceProgressColorSegmentsPipe(templateResource, fileSystem) {
@@ -2,8 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const migrate_input_slider_1 = require("./migrate-input-slider");
4
4
  const migrate_input_range_1 = require("./migrate-input-range");
5
+ const colored_log_1 = require("../../../utils/colored-log");
5
6
  function migrateSliders(fileSystem) {
7
+ colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} migrating sliders...`);
6
8
  migrate_input_slider_1.migrateInputSlider(fileSystem);
7
9
  migrate_input_range_1.migrateInputRange(fileSystem);
10
+ colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} sliders migrated \n`);
8
11
  }
9
12
  exports.migrateSliders = migrateSliders;
@@ -8,9 +8,11 @@ const template_resource_1 = require("../../utils/templates/template-resource");
8
8
  const ng_morph_1 = require("ng-morph");
9
9
  const ng_component_1 = require("../../utils/angular/ng-component");
10
10
  const add_unique_import_1 = require("../../utils/add-unique-import");
11
+ const colored_log_1 = require("../../utils/colored-log");
11
12
  const START_TAG_OFFSET = 1;
12
13
  const END_TAG_OFFSET = 2;
13
14
  function migrateTemplates(fileSystem) {
15
+ colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} migrating templates...`);
14
16
  const componentWithTemplatesPaths = get_component_templates_1.getComponentTemplates('**/**');
15
17
  const actions = [
16
18
  replaceTags,
@@ -21,6 +23,7 @@ function migrateTemplates(fileSystem) {
21
23
  addHTMLCommentTags,
22
24
  addEditorProviders,
23
25
  migrateTuiHideSelectedPipe,
26
+ removeInputs,
24
27
  ];
25
28
  componentWithTemplatesPaths.forEach(resource => {
26
29
  const path = fileSystem.resolve(template_resource_1.getPathFromTemplateResource(resource));
@@ -29,10 +32,11 @@ function migrateTemplates(fileSystem) {
29
32
  action({ resource, fileSystem, recorder });
30
33
  });
31
34
  });
35
+ colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} templates migrated \n`);
32
36
  }
33
37
  exports.migrateTemplates = migrateTemplates;
34
38
  function replaceAttrsByDirective({ resource, fileSystem, }) {
35
- templates_1.ATTR_TO_DIRECTIVE.forEach(({ componentSelector, directiveModule, directive, inputProperty }) => {
39
+ templates_1.ATTR_TO_DIRECTIVE.forEach(({ componentSelector, directiveModule, directive, inputProperty, filterFn }) => {
36
40
  ng_component_input_manipulations_1.replaceInputPropertyByDirective({
37
41
  componentSelector,
38
42
  directiveModule,
@@ -40,6 +44,7 @@ function replaceAttrsByDirective({ resource, fileSystem, }) {
40
44
  inputProperty,
41
45
  fileSystem,
42
46
  templateResource: resource,
47
+ filterFn,
43
48
  });
44
49
  });
45
50
  }
@@ -48,8 +53,8 @@ function replaceAttrs({ resource, recorder, fileSystem, }) {
48
53
  const templateOffset = template_resource_1.getTemplateOffset(resource);
49
54
  templates_1.ATTRS_TO_REPLACE.forEach(({ from, to }) => {
50
55
  const offsets = [
51
- ...elements_1.findAttributeOnElementWithTag(template, from.attrName, from.withTagNames || []),
52
- ...elements_1.findAttributeOnElementWithAttrs(template, from.attrName, from.withAttrsNames || []),
56
+ ...elements_1.findAttributeOnElementWithTag(template, from.attrName, from.withTagNames || [], from.filterFn),
57
+ ...elements_1.findAttributeOnElementWithAttrs(template, from.attrName, from.withAttrsNames || [], from.filterFn),
53
58
  ];
54
59
  offsets.forEach(offset => {
55
60
  recorder.remove(offset + templateOffset, from.attrName.length);
@@ -171,3 +176,16 @@ function migrateTuiHideSelectedPipe({ resource, fileSystem, recorder, }) {
171
176
  recorder.insertRight(valueOffset, newValue);
172
177
  });
173
178
  }
179
+ function removeInputs({ resource, fileSystem, recorder, }) {
180
+ const template = template_resource_1.getTemplateFromTemplateResource(resource, fileSystem);
181
+ const templateOffset = template_resource_1.getTemplateOffset(resource);
182
+ templates_1.INPUTS_TO_REMOVE.forEach(({ inputName, tags }) => {
183
+ const offsets = [
184
+ ...ng_component_input_manipulations_1.getInputPropertyOffsets(template, inputName, tags),
185
+ ...ng_component_input_manipulations_1.getInputPropertyOffsets(template, `[${inputName}]`, tags),
186
+ ];
187
+ offsets.forEach(([start, end]) => {
188
+ recorder.remove(start + templateOffset, end - start);
189
+ });
190
+ });
191
+ }
@@ -3,7 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const get_named_import_references_1 = require("../../utils/get-named-import-references");
4
4
  const ng_morph_1 = require("ng-morph");
5
5
  const insert_todo_1 = require("../../utils/insert-todo");
6
+ const colored_log_1 = require("../../utils/colored-log");
6
7
  function miscellaneousMigrations() {
8
+ colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} miscellaneous migrating...`);
7
9
  replaceEnumProperty({
8
10
  enumName: 'TuiCurrency',
9
11
  from: 'HongKong_dollar',
@@ -15,6 +17,7 @@ function miscellaneousMigrations() {
15
17
  to: 'HongKongDollar',
16
18
  });
17
19
  addWarningToMethod('TuiDirectiveStylesService', 'addStyle', 'addStyle method has been removed. Use components approach');
20
+ colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} miscellaneous migrated \n`);
18
21
  }
19
22
  exports.miscellaneousMigrations = miscellaneousMigrations;
20
23
  function addWarningToMethod(className, method, message) {
@@ -4,8 +4,11 @@ const ng_morph_1 = require("ng-morph");
4
4
  const get_named_import_references_1 = require("../../utils/get-named-import-references");
5
5
  const import_manipulations_1 = require("../../utils/import-manipulations");
6
6
  const modules_1 = require("../constants/modules");
7
+ const colored_log_1 = require("../../utils/colored-log");
7
8
  function removeModules() {
9
+ colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} removing modules...`);
8
10
  modules_1.REMOVED_MODULES.forEach(({ name, moduleSpecifier }) => removeModule(name, moduleSpecifier));
11
+ colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} modules removed \n`);
9
12
  }
10
13
  exports.removeModules = removeModules;
11
14
  function removeModule(name, moduleSpecifier) {
@@ -4,10 +4,11 @@ const ng_morph_1 = require("ng-morph");
4
4
  const get_named_import_references_1 = require("../../utils/get-named-import-references");
5
5
  const types_1 = require("../constants/types");
6
6
  const import_manipulations_1 = require("../../utils/import-manipulations");
7
+ const colored_log_1 = require("../../utils/colored-log");
7
8
  function renameTypes() {
8
- types_1.TYPES_TO_RENAME.forEach(({ from, to, moduleSpecifier, preserveGenerics }) => {
9
- renameType(from, to, moduleSpecifier, preserveGenerics);
10
- });
9
+ colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} renaming types...`);
10
+ types_1.TYPES_TO_RENAME.forEach(({ from, to, moduleSpecifier, preserveGenerics }) => renameType(from, to, moduleSpecifier, preserveGenerics));
11
+ colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} types renamed \n`);
11
12
  }
12
13
  exports.renameTypes = renameTypes;
13
14
  function renameType(from, to, moduleSpecifier, preserveGenerics = false) {
@@ -1,3 +1,3 @@
1
1
  import { ReplacementConst } from '../constants/consts';
2
- export declare function replaceConsts(): void;
2
+ export declare function replaceConstants(): void;
3
3
  export declare function replaceConst({ from, to }: ReplacementConst): void;
@@ -5,10 +5,13 @@ const ng_morph_1 = require("ng-morph");
5
5
  const import_manipulations_1 = require("../../utils/import-manipulations");
6
6
  const add_unique_import_1 = require("../../utils/add-unique-import");
7
7
  const consts_1 = require("../constants/consts");
8
- function replaceConsts() {
8
+ const colored_log_1 = require("../../utils/colored-log");
9
+ function replaceConstants() {
10
+ colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} replacing constants...`);
9
11
  consts_1.CONSTS_TO_REPLACE.forEach(constToReplace => replaceConst(constToReplace));
12
+ colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} constants replaced \n`);
10
13
  }
11
- exports.replaceConsts = replaceConsts;
14
+ exports.replaceConstants = replaceConstants;
12
15
  function replaceConst({ from, to }) {
13
16
  const references = get_named_import_references_1.getNamedImportReferences(from.name, from.moduleSpecifier);
14
17
  references.forEach(ref => {
@@ -1,12 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const ng_morph_1 = require("ng-morph");
4
+ const colored_log_1 = require("../../utils/colored-log");
4
5
  const DEEP_REGEX = /(@taiga-ui\/\w+)\/.*/;
5
6
  function replaceDeepImports() {
7
+ colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} replacing deep imports...`);
6
8
  const deepImports = ng_morph_1.getImports('**/**').filter(imp => DEEP_REGEX.test(imp.getModuleSpecifier().getLiteralValue()));
7
9
  ng_morph_1.editImports(deepImports, deepImport => {
8
10
  const specifier = deepImport.moduleSpecifier.replace(DEEP_REGEX, '$1');
9
11
  return { moduleSpecifier: specifier };
10
12
  });
13
+ colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} deep imports replaced \n`);
11
14
  }
12
15
  exports.replaceDeepImports = replaceDeepImports;
@@ -4,10 +4,11 @@ const ng_morph_1 = require("ng-morph");
4
4
  const get_named_import_references_1 = require("../../utils/get-named-import-references");
5
5
  const enums_1 = require("../constants/enums");
6
6
  const import_manipulations_1 = require("../../utils/import-manipulations");
7
+ const colored_log_1 = require("../../utils/colored-log");
7
8
  function replaceEnums() {
8
- enums_1.ENUMS_TO_REPLACE.forEach(({ name, replaceValues, keepAsType }) => {
9
- replaceEnumWithString(name, replaceValues, keepAsType);
10
- });
9
+ colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} replacing enums imports...`);
10
+ enums_1.ENUMS_TO_REPLACE.forEach(({ name, replaceValues, keepAsType }) => replaceEnumWithString(name, replaceValues, keepAsType));
11
+ colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} enums replaced \n`);
11
12
  }
12
13
  exports.replaceEnums = replaceEnums;
13
14
  function replaceEnumWithString(enumName, replaceValues, keepAsType = true) {
@@ -3,13 +3,28 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const get_named_import_references_1 = require("../../utils/get-named-import-references");
4
4
  const ng_morph_1 = require("ng-morph");
5
5
  const import_manipulations_1 = require("../../utils/import-manipulations");
6
+ const deprecated_functions_1 = require("../constants/deprecated-functions");
7
+ const colored_log_1 = require("../../utils/colored-log");
6
8
  function replaceFunctions() {
9
+ colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} functions replacing...`);
7
10
  replacePadStart(get_named_import_references_1.getNamedImportReferences('padStart', '@taiga-ui/cdk'));
8
11
  replaceFallbackValue(get_named_import_references_1.getNamedImportReferences('fallbackValue', '@taiga-ui/cdk'));
9
12
  replaceCustomEvent(get_named_import_references_1.getNamedImportReferences('tuiCustomEvent', '@taiga-ui/cdk'));
10
13
  replaceClosestElement(get_named_import_references_1.getNamedImportReferences('getClosestElement', '@taiga-ui/cdk'));
14
+ replaceDeprecatedFunction();
15
+ colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} functions replaced \n`);
11
16
  }
12
17
  exports.replaceFunctions = replaceFunctions;
18
+ function replaceDeprecatedFunction() {
19
+ deprecated_functions_1.DEPRECATED_FUNCTIONS.forEach(({ from, to, moduleSpecifier }) => {
20
+ get_named_import_references_1.getNamedImportReferences(from, moduleSpecifier).forEach(ref => {
21
+ const parent = ref.getParent();
22
+ if (ng_morph_1.Node.isImportSpecifier(parent) || ng_morph_1.Node.isCallExpression(parent)) {
23
+ parent === null || parent === void 0 ? void 0 : parent.replaceWithText(parent === null || parent === void 0 ? void 0 : parent.getFullText().trim().replace(from, to !== null && to !== void 0 ? to : from));
24
+ }
25
+ });
26
+ });
27
+ }
13
28
  function replacePadStart(references) {
14
29
  references.forEach(ref => {
15
30
  var _a;
@@ -7,13 +7,13 @@ const import_manipulations_1 = require("../../utils/import-manipulations");
7
7
  const add_unique_import_1 = require("../../utils/add-unique-import");
8
8
  const colored_log_1 = require("../../utils/colored-log");
9
9
  function replaceServices() {
10
- services_1.SERVICES_TO_REPLACE.forEach(service => {
11
- colored_log_1.infoLog(`replacing ${service.from.name}`);
12
- replaceService(service);
13
- });
10
+ colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} replacing services...`);
11
+ services_1.SERVICES_TO_REPLACE.forEach(service => replaceService(service));
12
+ colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} services replaced \n`);
14
13
  }
15
14
  exports.replaceServices = replaceServices;
16
15
  function replaceService({ from, to, replaceMethods }) {
16
+ colored_log_1.processLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.PROCESSING_SYMBOL}replacing ${from.name}...`);
17
17
  const references = get_named_import_references_1.getNamedImportReferences(from.name, from.moduleSpecifier);
18
18
  references.forEach(ref => {
19
19
  const parent = ref.getParent();
@@ -1,2 +1,10 @@
1
+ export declare function processLog(message: string): void;
1
2
  export declare function successLog(message: string): void;
2
3
  export declare function infoLog(message: string): void;
4
+ export declare function titleLog(message: string): void;
5
+ export declare const SMALL_TAB_SYMBOL = " ";
6
+ export declare const START_SYMBOL = "\uD83D\uDE80";
7
+ export declare const FINISH_SYMBOL = "\uD83C\uDFC6";
8
+ export declare const REPLACE_SYMBOL = "\u26A1\uFE0F";
9
+ export declare const PROCESSING_SYMBOL = "\u2611\uFE0F ";
10
+ export declare const SUCCESS_SYMBOL = "\u2705 ";
@@ -1,10 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ function processLog(message) {
4
+ console.info('\x1b[36m%s\x1b[0m', message);
5
+ }
6
+ exports.processLog = processLog;
3
7
  function successLog(message) {
4
- console.info('\x1B[32m%s\x1B[0m', message, '\u2713');
8
+ console.info('\x1B[32m%s\x1B[0m', message);
5
9
  }
6
10
  exports.successLog = successLog;
7
11
  function infoLog(message) {
8
12
  console.info('\x1B[34m%s\x1B[0m', message);
9
13
  }
10
14
  exports.infoLog = infoLog;
15
+ function titleLog(message) {
16
+ console.info('\x1b[35m', message);
17
+ }
18
+ exports.titleLog = titleLog;
19
+ exports.SMALL_TAB_SYMBOL = ` `; // @note: if you use \t then we have big gaps
20
+ exports.START_SYMBOL = `🚀`;
21
+ exports.FINISH_SYMBOL = `🏆`;
22
+ exports.REPLACE_SYMBOL = `⚡️`;
23
+ exports.PROCESSING_SYMBOL = `☑️ `;
24
+ exports.SUCCESS_SYMBOL = `✅ `;
@@ -51,7 +51,7 @@ export declare function getInputPropertyOffsets(html: string, attrName: string,
51
51
  * getInputPropertyValueOffsets(template, 'size', ['tui-card']) // [ [16, 18] ]
52
52
  */
53
53
  export declare function getInputPropertyValueOffsets(template: string, attrName: string, tags: string[]): [number, number][];
54
- export declare function replaceInputPropertyByDirective({ templateResource, fileSystem, componentSelector, inputProperty, directive, directiveModule, }: {
54
+ export declare function replaceInputPropertyByDirective({ templateResource, fileSystem, componentSelector, inputProperty, directive, directiveModule, filterFn, }: {
55
55
  templateResource: TemplateResource;
56
56
  fileSystem: DevkitFileSystem;
57
57
  componentSelector: string | string[];
@@ -61,6 +61,7 @@ export declare function replaceInputPropertyByDirective({ templateResource, file
61
61
  name: string;
62
62
  moduleSpecifier: string;
63
63
  };
64
+ filterFn?: (element: Element) => boolean;
64
65
  }): void;
65
66
  /**
66
67
  * After removing property from the tag (which uses multi lines inside template) it can leave redundant space.
@@ -102,13 +102,14 @@ function getInputPropertyValueOffsets(template, attrName, tags) {
102
102
  return [...stringProperties, ...propertyBindings];
103
103
  }
104
104
  exports.getInputPropertyValueOffsets = getInputPropertyValueOffsets;
105
- function replaceInputPropertyByDirective({ templateResource, fileSystem, componentSelector, inputProperty, directive, directiveModule, }) {
105
+ function replaceInputPropertyByDirective({ templateResource, fileSystem, componentSelector, inputProperty, directive, directiveModule, filterFn, }) {
106
106
  const wasModified = replaceInputProperty({
107
107
  templateResource,
108
108
  fileSystem,
109
109
  componentSelector,
110
110
  from: inputProperty,
111
111
  to: directive,
112
+ filterFn,
112
113
  });
113
114
  if (wasModified && directiveModule) {
114
115
  const [ngComponent] = ng_component_1.getNgComponents(templateResource.componentPath);
@@ -1,5 +1,6 @@
1
1
  import { NgZone } from '@angular/core';
2
2
  import { Observable } from 'rxjs';
3
+ /** @deprecated TODO remove in v3.0 */
3
4
  export declare class TuiHoveredService {
4
5
  private readonly ngZone;
5
6
  private readonly documentEvents$;