@taiga-ui/cdk 4.0.0-rc.1 → 4.0.0-rc.10

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 (316) hide show
  1. package/classes/control.d.ts +1 -1
  2. package/classes/index.d.ts +0 -1
  3. package/constants/used-icons.d.ts +1 -1
  4. package/constants/version.d.ts +1 -1
  5. package/constants/version.js +1 -1
  6. package/directives/auto-focus/autofocus.options.d.ts +1 -1
  7. package/directives/for/for.directive.d.ts +3 -3
  8. package/directives/platform/platform.directive.d.ts +1 -1
  9. package/directives/value-changes/value-changes.directive.d.ts +3 -3
  10. package/esm2022/classes/control.mjs +2 -2
  11. package/esm2022/classes/index.mjs +1 -2
  12. package/esm2022/constants/used-icons.mjs +14 -6
  13. package/esm2022/constants/version.mjs +2 -2
  14. package/esm2022/directives/active-zone/active-zone.directive.mjs +2 -2
  15. package/esm2022/directives/auto-focus/autofocus.options.mjs +3 -3
  16. package/esm2022/directives/auto-focus/handlers/ios.handler.mjs +3 -3
  17. package/esm2022/directives/click-outside/click-outside.directive.mjs +2 -2
  18. package/esm2022/directives/copy-processor/copy-processor.directive.mjs +3 -3
  19. package/esm2022/directives/droppable/droppable.directive.mjs +3 -3
  20. package/esm2022/directives/for/for.directive.mjs +6 -6
  21. package/esm2022/directives/high-dpi/high-dpi.directive.mjs +3 -3
  22. package/esm2022/directives/hovered/hovered.service.mjs +2 -2
  23. package/esm2022/directives/obscured/obscured.directive.mjs +2 -2
  24. package/esm2022/directives/obscured/obscured.service.mjs +4 -4
  25. package/esm2022/directives/pan/pan.service.mjs +2 -2
  26. package/esm2022/directives/platform/platform.directive.mjs +6 -6
  27. package/esm2022/directives/swipe/swipe.service.mjs +2 -2
  28. package/esm2022/directives/value-changes/value-changes.directive.mjs +6 -6
  29. package/esm2022/directives/zoom/zoom.service.mjs +4 -4
  30. package/esm2022/observables/control-value.mjs +2 -2
  31. package/esm2022/observables/drag-and-drop-from.mjs +2 -2
  32. package/esm2022/observables/events.mjs +3 -3
  33. package/esm2022/observables/if-map.mjs +2 -2
  34. package/esm2022/observables/must-be-present.mjs +2 -2
  35. package/esm2022/observables/zone.mjs +4 -4
  36. package/esm2022/pipes/filter/filter.pipe.mjs +2 -2
  37. package/esm2022/services/index.mjs +2 -2
  38. package/esm2022/services/popover.service.mjs +3 -3
  39. package/esm2022/services/scroll.service.mjs +5 -5
  40. package/esm2022/services/theme-color.service.mjs +30 -0
  41. package/esm2022/tokens/active-element.mjs +5 -5
  42. package/esm2022/tokens/environment.mjs +15 -7
  43. package/esm2022/tokens/removed-element.mjs +4 -4
  44. package/esm2022/tokens/window-size.mjs +3 -3
  45. package/esm2022/utils/color/get-gradient-data.mjs +6 -0
  46. package/esm2022/utils/color/hex-to-rgb.mjs +2 -2
  47. package/esm2022/utils/color/index.mjs +3 -1
  48. package/esm2022/utils/color/parse-color.mjs +3 -3
  49. package/esm2022/utils/color/parse-gradient.mjs +70 -0
  50. package/esm2022/utils/color/rgb-to-hex.mjs +2 -2
  51. package/esm2022/utils/dom/get-element-obscurers.mjs +2 -2
  52. package/esm2022/utils/dom/get-element-point.mjs +6 -0
  53. package/esm2022/utils/dom/index.mjs +2 -1
  54. package/esm2022/utils/focus/focused-in.mjs +7 -0
  55. package/esm2022/utils/focus/index.mjs +2 -1
  56. package/esm2022/utils/miscellaneous/mark-control-as-touched-and-validate.mjs +3 -3
  57. package/esm2022/utils/miscellaneous/with-styles.mjs +2 -2
  58. package/fesm2022/taiga-ui-cdk-classes.mjs +2 -16
  59. package/fesm2022/taiga-ui-cdk-classes.mjs.map +1 -1
  60. package/fesm2022/taiga-ui-cdk-constants.mjs +14 -6
  61. package/fesm2022/taiga-ui-cdk-constants.mjs.map +1 -1
  62. package/fesm2022/taiga-ui-cdk-directives-active-zone.mjs +1 -1
  63. package/fesm2022/taiga-ui-cdk-directives-active-zone.mjs.map +1 -1
  64. package/fesm2022/taiga-ui-cdk-directives-auto-focus.mjs +4 -4
  65. package/fesm2022/taiga-ui-cdk-directives-auto-focus.mjs.map +1 -1
  66. package/fesm2022/taiga-ui-cdk-directives-click-outside.mjs +1 -1
  67. package/fesm2022/taiga-ui-cdk-directives-click-outside.mjs.map +1 -1
  68. package/fesm2022/taiga-ui-cdk-directives-copy-processor.mjs +2 -2
  69. package/fesm2022/taiga-ui-cdk-directives-copy-processor.mjs.map +1 -1
  70. package/fesm2022/taiga-ui-cdk-directives-droppable.mjs +2 -2
  71. package/fesm2022/taiga-ui-cdk-directives-droppable.mjs.map +1 -1
  72. package/fesm2022/taiga-ui-cdk-directives-for.mjs +5 -5
  73. package/fesm2022/taiga-ui-cdk-directives-for.mjs.map +1 -1
  74. package/fesm2022/taiga-ui-cdk-directives-high-dpi.mjs +2 -2
  75. package/fesm2022/taiga-ui-cdk-directives-high-dpi.mjs.map +1 -1
  76. package/fesm2022/taiga-ui-cdk-directives-hovered.mjs +1 -1
  77. package/fesm2022/taiga-ui-cdk-directives-hovered.mjs.map +1 -1
  78. package/fesm2022/taiga-ui-cdk-directives-obscured.mjs +4 -4
  79. package/fesm2022/taiga-ui-cdk-directives-obscured.mjs.map +1 -1
  80. package/fesm2022/taiga-ui-cdk-directives-pan.mjs +1 -1
  81. package/fesm2022/taiga-ui-cdk-directives-pan.mjs.map +1 -1
  82. package/fesm2022/taiga-ui-cdk-directives-platform.mjs +5 -5
  83. package/fesm2022/taiga-ui-cdk-directives-platform.mjs.map +1 -1
  84. package/fesm2022/taiga-ui-cdk-directives-swipe.mjs +1 -1
  85. package/fesm2022/taiga-ui-cdk-directives-swipe.mjs.map +1 -1
  86. package/fesm2022/taiga-ui-cdk-directives-value-changes.mjs +5 -5
  87. package/fesm2022/taiga-ui-cdk-directives-value-changes.mjs.map +1 -1
  88. package/fesm2022/taiga-ui-cdk-directives-zoom.mjs +3 -3
  89. package/fesm2022/taiga-ui-cdk-directives-zoom.mjs.map +1 -1
  90. package/fesm2022/taiga-ui-cdk-observables.mjs +9 -9
  91. package/fesm2022/taiga-ui-cdk-observables.mjs.map +1 -1
  92. package/fesm2022/taiga-ui-cdk-pipes-filter.mjs +1 -1
  93. package/fesm2022/taiga-ui-cdk-pipes-filter.mjs.map +1 -1
  94. package/fesm2022/taiga-ui-cdk-services.mjs +25 -28
  95. package/fesm2022/taiga-ui-cdk-services.mjs.map +1 -1
  96. package/fesm2022/taiga-ui-cdk-tokens.mjs +22 -15
  97. package/fesm2022/taiga-ui-cdk-tokens.mjs.map +1 -1
  98. package/fesm2022/taiga-ui-cdk-utils-color.mjs +80 -5
  99. package/fesm2022/taiga-ui-cdk-utils-color.mjs.map +1 -1
  100. package/fesm2022/taiga-ui-cdk-utils-dom.mjs +7 -2
  101. package/fesm2022/taiga-ui-cdk-utils-dom.mjs.map +1 -1
  102. package/fesm2022/taiga-ui-cdk-utils-focus.mjs +8 -2
  103. package/fesm2022/taiga-ui-cdk-utils-focus.mjs.map +1 -1
  104. package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs +3 -3
  105. package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs.map +1 -1
  106. package/package.json +7 -8
  107. package/schematics/migration.json +3 -3
  108. package/schematics/ng-add/constants/modules.d.ts +0 -1
  109. package/schematics/ng-add/constants/modules.js +1 -11
  110. package/schematics/ng-add/constants/versions.d.ts +0 -1
  111. package/schematics/ng-add/constants/versions.js +1 -2
  112. package/schematics/ng-add/index.js +1 -7
  113. package/schematics/ng-add/schema.d.ts +0 -1
  114. package/schematics/ng-add/schema.json +0 -27
  115. package/schematics/ng-add/steps/add-taiga-icons.js +1 -1
  116. package/schematics/ng-add/steps/add-taiga-modules.js +7 -22
  117. package/schematics/ng-update/interfaces/html-comment.d.ts +3 -2
  118. package/schematics/ng-update/interfaces/replacement-attribute-value.d.ts +6 -2
  119. package/schematics/ng-update/interfaces/replacement-identifier.d.ts +4 -10
  120. package/schematics/ng-update/interfaces/replacement-type.d.ts +5 -0
  121. package/schematics/ng-update/steps/icons/replace-imports.js +5 -5
  122. package/schematics/ng-update/steps/index.d.ts +1 -0
  123. package/schematics/ng-update/steps/index.js +1 -0
  124. package/schematics/ng-update/steps/remove-module.js +2 -2
  125. package/schematics/ng-update/steps/rename-types.js +11 -7
  126. package/schematics/ng-update/steps/replace-deep-import.js +2 -2
  127. package/schematics/ng-update/steps/replace-enums.js +2 -2
  128. package/schematics/ng-update/steps/replace-identifier.js +31 -9
  129. package/schematics/ng-update/steps/replace-package-name.d.ts +5 -0
  130. package/schematics/ng-update/steps/replace-package-name.js +18 -0
  131. package/schematics/ng-update/steps/replace-services.js +5 -5
  132. package/schematics/ng-update/steps/show-warnings.js +4 -4
  133. package/schematics/ng-update/utils/replace-text.js +1 -1
  134. package/schematics/ng-update/utils/templates/replace-attr-values.js +41 -12
  135. package/schematics/ng-update/utils/templates/replace-attrs.js +1 -1
  136. package/schematics/ng-update/utils/templates/template-comments.js +11 -3
  137. package/schematics/ng-update/v4/index.js +20 -7
  138. package/schematics/ng-update/v4/migrate-css-vars/palette.d.ts +11 -2
  139. package/schematics/ng-update/v4/migrate-css-vars/palette.js +18 -8
  140. package/schematics/ng-update/v4/migrate-css-vars/rename-css-vars.js +10 -2
  141. package/schematics/ng-update/v4/migrate-icons/index.js +9 -7
  142. package/schematics/ng-update/v4/migrate-icons/rename-icons.js +15 -7
  143. package/schematics/ng-update/v4/migrate-icons/rename-proprietary-icons.d.ts +3 -0
  144. package/schematics/ng-update/v4/migrate-icons/rename-proprietary-icons.js +79 -0
  145. package/schematics/ng-update/v4/steps/constants/attr-to-directive-replace.js +5 -4
  146. package/schematics/ng-update/v4/steps/constants/attr-with-values-to-replace.js +51 -2
  147. package/schematics/ng-update/v4/steps/constants/attrs-to-replace.js +114 -27
  148. package/schematics/ng-update/v4/steps/constants/enums.js +31 -0
  149. package/schematics/ng-update/v4/steps/constants/html-comments.js +19 -0
  150. package/schematics/ng-update/v4/steps/constants/identifiers-to-replace.js +1388 -288
  151. package/schematics/ng-update/v4/steps/constants/index.d.ts +1 -0
  152. package/schematics/ng-update/v4/steps/constants/index.js +1 -0
  153. package/schematics/ng-update/v4/steps/constants/inputs-to-remove.js +2 -1
  154. package/schematics/ng-update/v4/steps/constants/migration-warnings.js +25 -0
  155. package/schematics/ng-update/v4/steps/constants/modules-to-remove.js +32 -0
  156. package/schematics/ng-update/v4/steps/constants/modules-to-replace.d.ts +13 -0
  157. package/schematics/ng-update/v4/steps/constants/modules-to-replace.js +16 -0
  158. package/schematics/ng-update/v4/steps/constants/services.d.ts +2 -0
  159. package/schematics/ng-update/v4/steps/constants/services.js +15 -0
  160. package/schematics/ng-update/v4/steps/constants/tags-to-replace.js +17 -4
  161. package/schematics/ng-update/v4/steps/constants/types.d.ts +2 -0
  162. package/schematics/ng-update/v4/steps/constants/types.js +49 -0
  163. package/schematics/ng-update/v4/steps/index.d.ts +7 -0
  164. package/schematics/ng-update/v4/steps/index.js +7 -0
  165. package/schematics/ng-update/v4/steps/migrate-alert-service.d.ts +2 -0
  166. package/schematics/ng-update/v4/steps/migrate-alert-service.js +110 -0
  167. package/schematics/ng-update/v4/steps/migrate-all-country-iso-codes.js +1 -1
  168. package/schematics/ng-update/v4/steps/migrate-destroy-service.js +7 -4
  169. package/schematics/ng-update/v4/steps/migrate-legacy-mask.js +2 -2
  170. package/schematics/ng-update/v4/steps/migrate-month-context.d.ts +2 -0
  171. package/schematics/ng-update/v4/steps/migrate-month-context.js +39 -0
  172. package/schematics/ng-update/v4/steps/migrate-number-format-settings.d.ts +2 -0
  173. package/schematics/ng-update/v4/steps/migrate-number-format-settings.js +64 -0
  174. package/schematics/ng-update/v4/steps/migrate-option-providers.js +6 -3
  175. package/schematics/ng-update/v4/steps/migrate-proprietary.js +3 -3
  176. package/schematics/ng-update/v4/steps/migrate-root.d.ts +3 -0
  177. package/schematics/ng-update/v4/steps/migrate-root.js +61 -0
  178. package/schematics/ng-update/v4/steps/migrate-templates.js +11 -1
  179. package/schematics/ng-update/v4/steps/styles/index.js +38 -0
  180. package/schematics/ng-update/v4/steps/styles/migrate-less-scss-constants.d.ts +1 -0
  181. package/schematics/ng-update/v4/steps/styles/migrate-less-scss-constants.js +13 -0
  182. package/schematics/ng-update/v4/steps/styles/migrate-scrollbar-behavior.d.ts +1 -0
  183. package/schematics/ng-update/v4/steps/styles/migrate-scrollbar-behavior.js +10 -0
  184. package/schematics/ng-update/v4/steps/styles/migrate-shadow-mixins.d.ts +1 -0
  185. package/schematics/ng-update/v4/steps/styles/migrate-shadow-mixins.js +23 -0
  186. package/schematics/ng-update/v4/steps/styles/migrate-space-mixins.d.ts +1 -0
  187. package/schematics/ng-update/v4/steps/styles/migrate-space-mixins.js +20 -0
  188. package/schematics/ng-update/v4/steps/styles/migrate-text-mixins.d.ts +1 -0
  189. package/schematics/ng-update/v4/steps/styles/migrate-text-mixins.js +54 -0
  190. package/schematics/ng-update/v4/steps/templates/index.d.ts +6 -0
  191. package/schematics/ng-update/v4/steps/templates/index.js +6 -0
  192. package/schematics/ng-update/v4/steps/templates/migrate-avatar.js +34 -11
  193. package/schematics/ng-update/{v3/steps/migrate-polymorpheus.d.ts → v4/steps/templates/migrate-axes.d.ts} +2 -2
  194. package/schematics/ng-update/v4/steps/templates/migrate-axes.js +26 -0
  195. package/schematics/ng-update/v4/steps/templates/migrate-badge.js +17 -8
  196. package/schematics/ng-update/v4/steps/templates/migrate-badged-content.js +1 -1
  197. package/schematics/ng-update/{v3/steps/migrate-textfield-controller.d.ts → v4/steps/templates/migrate-blocked.d.ts} +2 -2
  198. package/schematics/ng-update/v4/steps/templates/migrate-blocked.js +35 -0
  199. package/schematics/ng-update/v4/steps/templates/migrate-button-appearance.d.ts +8 -0
  200. package/schematics/ng-update/v4/steps/templates/migrate-button-appearance.js +41 -0
  201. package/schematics/ng-update/v4/steps/templates/migrate-expandable.js +3 -2
  202. package/schematics/ng-update/v4/steps/templates/migrate-focusable.js +7 -4
  203. package/schematics/ng-update/v4/steps/templates/migrate-label.d.ts +8 -0
  204. package/schematics/ng-update/v4/steps/templates/migrate-label.js +39 -0
  205. package/schematics/ng-update/v4/steps/templates/migrate-labeled.js +6 -10
  206. package/schematics/ng-update/v4/steps/templates/migrate-mobile-tabs.d.ts +8 -0
  207. package/schematics/ng-update/v4/steps/templates/migrate-mobile-tabs.js +45 -0
  208. package/schematics/ng-update/v4/steps/templates/migrate-money.js +1 -1
  209. package/schematics/ng-update/v4/steps/templates/migrate-notification.d.ts +8 -0
  210. package/schematics/ng-update/v4/steps/templates/migrate-notification.js +64 -0
  211. package/schematics/ng-update/v4/steps/templates/migrate-number-precision.d.ts +8 -0
  212. package/schematics/ng-update/v4/steps/templates/migrate-number-precision.js +36 -0
  213. package/schematics/ng-update/v4/steps/templates/migrate-overscroll.d.ts +8 -0
  214. package/schematics/ng-update/v4/steps/templates/migrate-overscroll.js +27 -0
  215. package/schematics/ng-update/v4/steps/templates/migrate-thumbnail-card.js +2 -1
  216. package/schematics/ng-update/v4/steps/templates/toggles/common.d.ts +1 -1
  217. package/schematics/ng-update/v4/steps/templates/toggles/common.js +4 -3
  218. package/schematics/ng-update/v4/steps/templates/toggles/migrate-checkbox.js +36 -0
  219. package/schematics/ng-update/{v3/steps/migrate-templates.d.ts → v4/steps/update-packages.d.ts} +1 -1
  220. package/schematics/ng-update/v4/steps/update-packages.js +44 -0
  221. package/schematics/ng-update/v4/steps/utils/remove-attrs.js +1 -1
  222. package/schematics/ng-update/v4/steps/utils/replace-modules-with-providers.d.ts +3 -0
  223. package/schematics/ng-update/v4/steps/utils/replace-modules-with-providers.js +51 -0
  224. package/schematics/ng-update/v4/steps/utils/replace-substrings.js +1 -1
  225. package/schematics/ng-update/v4/tests/migrate-destroy-service/utils.js +1 -0
  226. package/schematics/utils/add-unique-import.js +1 -1
  227. package/schematics/utils/angular-json-manipulations.js +4 -4
  228. package/schematics/utils/get-named-import-references.js +8 -6
  229. package/schematics/utils/get-standalone-bootstrap-function.js +2 -2
  230. package/schematics/utils/import-manipulations.js +1 -1
  231. package/schematics/utils/push-to-array-property.js +1 -1
  232. package/schematics/utils/templates/elements.d.ts +5 -0
  233. package/schematics/utils/templates/elements.js +27 -13
  234. package/schematics/utils/templates/get-component-templates.js +1 -1
  235. package/schematics/utils/templates/inputs.js +2 -1
  236. package/schematics/utils/templates/ng-component-input-manipulations.js +5 -5
  237. package/services/index.d.ts +1 -1
  238. package/services/theme-color.service.d.ts +16 -0
  239. package/tokens/environment.d.ts +1 -0
  240. package/utils/color/get-gradient-data.d.ts +1 -0
  241. package/utils/color/index.d.ts +2 -0
  242. package/utils/color/parse-gradient.d.ts +10 -0
  243. package/utils/dom/get-element-point.d.ts +2 -0
  244. package/utils/dom/index.d.ts +1 -0
  245. package/utils/focus/focused-in.d.ts +2 -0
  246. package/utils/focus/index.d.ts +1 -0
  247. package/classes/controller.d.ts +0 -9
  248. package/esm2022/classes/controller.mjs +0 -18
  249. package/esm2022/services/static-request.service.mjs +0 -33
  250. package/schematics/ng-update/v3/constants/breakpoints.d.ts +0 -82
  251. package/schematics/ng-update/v3/constants/breakpoints.js +0 -34
  252. package/schematics/ng-update/v3/constants/constants.d.ts +0 -2
  253. package/schematics/ng-update/v3/constants/constants.js +0 -466
  254. package/schematics/ng-update/v3/constants/deprecated-functions.d.ts +0 -2
  255. package/schematics/ng-update/v3/constants/deprecated-functions.js +0 -680
  256. package/schematics/ng-update/v3/constants/enums.d.ts +0 -2
  257. package/schematics/ng-update/v3/constants/enums.js +0 -284
  258. package/schematics/ng-update/v3/constants/modules.d.ts +0 -2
  259. package/schematics/ng-update/v3/constants/modules.js +0 -9
  260. package/schematics/ng-update/v3/constants/services.d.ts +0 -2
  261. package/schematics/ng-update/v3/constants/services.js +0 -53
  262. package/schematics/ng-update/v3/constants/templates.d.ts +0 -57
  263. package/schematics/ng-update/v3/constants/templates.js +0 -744
  264. package/schematics/ng-update/v3/constants/tui-interactive-selectors.d.ts +0 -1
  265. package/schematics/ng-update/v3/constants/tui-interactive-selectors.js +0 -55
  266. package/schematics/ng-update/v3/constants/types.d.ts +0 -2
  267. package/schematics/ng-update/v3/constants/types.js +0 -156
  268. package/schematics/ng-update/v3/constants/warnings.d.ts +0 -2
  269. package/schematics/ng-update/v3/constants/warnings.js +0 -111
  270. package/schematics/ng-update/v3/index.d.ts +0 -3
  271. package/schematics/ng-update/v3/index.js +0 -105
  272. package/schematics/ng-update/v3/schema.json +0 -13
  273. package/schematics/ng-update/v3/steps/migrate-date-time.d.ts +0 -2
  274. package/schematics/ng-update/v3/steps/migrate-date-time.js +0 -207
  275. package/schematics/ng-update/v3/steps/migrate-polymorpheus.js +0 -78
  276. package/schematics/ng-update/v3/steps/migrate-progress.d.ts +0 -8
  277. package/schematics/ng-update/v3/steps/migrate-progress.js +0 -49
  278. package/schematics/ng-update/v3/steps/migrate-sliders/index.d.ts +0 -3
  279. package/schematics/ng-update/v3/steps/migrate-sliders/index.js +0 -19
  280. package/schematics/ng-update/v3/steps/migrate-sliders/migrate-input-range.d.ts +0 -3
  281. package/schematics/ng-update/v3/steps/migrate-sliders/migrate-input-range.js +0 -103
  282. package/schematics/ng-update/v3/steps/migrate-sliders/migrate-input-slider.d.ts +0 -3
  283. package/schematics/ng-update/v3/steps/migrate-sliders/migrate-input-slider.js +0 -90
  284. package/schematics/ng-update/v3/steps/migrate-taiga-proprietary-icons.d.ts +0 -3
  285. package/schematics/ng-update/v3/steps/migrate-taiga-proprietary-icons.js +0 -70
  286. package/schematics/ng-update/v3/steps/migrate-templates.js +0 -216
  287. package/schematics/ng-update/v3/steps/migrate-textfield-controller.js +0 -98
  288. package/schematics/ng-update/v3/steps/miscellaneous.d.ts +0 -2
  289. package/schematics/ng-update/v3/steps/miscellaneous.js +0 -81
  290. package/schematics/ng-update/v3/steps/replace-functions.d.ts +0 -2
  291. package/schematics/ng-update/v3/steps/replace-functions.js +0 -138
  292. package/schematics/ng-update/v3/steps/replace-styles.d.ts +0 -3
  293. package/schematics/ng-update/v3/steps/replace-styles.js +0 -33
  294. package/schematics/ng-update/v3-30/constants/constants.d.ts +0 -2
  295. package/schematics/ng-update/v3-30/constants/constants.js +0 -8
  296. package/schematics/ng-update/v3-30/constants/icons.d.ts +0 -4
  297. package/schematics/ng-update/v3-30/constants/icons.js +0 -993
  298. package/schematics/ng-update/v3-30/index.d.ts +0 -3
  299. package/schematics/ng-update/v3-30/index.js +0 -33
  300. package/schematics/ng-update/v3-35/constants/constants.d.ts +0 -2
  301. package/schematics/ng-update/v3-35/constants/constants.js +0 -8
  302. package/schematics/ng-update/v3-35/constants/icons.d.ts +0 -4
  303. package/schematics/ng-update/v3-35/constants/icons.js +0 -2537
  304. package/schematics/ng-update/v3-35/index.d.ts +0 -3
  305. package/schematics/ng-update/v3-35/index.js +0 -33
  306. package/schematics/ng-update/v3-36/index.d.ts +0 -3
  307. package/schematics/ng-update/v3-36/index.js +0 -33
  308. package/schematics/ng-update/v3-40/index.d.ts +0 -3
  309. package/schematics/ng-update/v3-40/index.js +0 -62
  310. package/schematics/ng-update/v3-5/index.d.ts +0 -3
  311. package/schematics/ng-update/v3-5/index.js +0 -20
  312. package/schematics/ng-update/v3-5/steps/migrate-expand-templates.d.ts +0 -3
  313. package/schematics/ng-update/v3-5/steps/migrate-expand-templates.js +0 -44
  314. package/schematics/ng-update/v4/steps/migrate-styles.js +0 -20
  315. package/services/static-request.service.d.ts +0 -8
  316. /package/schematics/ng-update/v4/steps/{migrate-styles.d.ts → styles/index.d.ts} +0 -0
@@ -17,26 +17,34 @@ const CHANGED_ICONS = [
17
17
  { from: 'tuiIconDragLarge', to: ' @tui.grip-vertical' },
18
18
  { from: 'tuiIconGrid', to: '@tui.layout-grid' },
19
19
  { from: 'tuiIconGridLarge', to: '@tui.layout-grid' },
20
+ { from: 'tuiIconTool', to: '@tui.wrench' },
21
+ { from: 'tuiIconUnlock', to: '@tui.lock-open' },
22
+ { from: 'tuiIconMessageCircle', to: '@tui.message-circle' },
23
+ { from: 'tuiIconSliders', to: '@tui.sliders-vertical' },
24
+ { from: 'tuiIconPlusSquare', to: '@tui.square-plus' },
25
+ { from: 'tuiIconAlertTriangle', to: '@tui.triangle-alert' },
26
+ { from: 'tuiIconUploadCloud', to: '@tui.cloud-upload' },
27
+ { from: 'tuiIconDownloadCloud', to: '@tui.cloud-download' },
20
28
  ];
21
29
  function renameIcons(pattern = constants_1.ALL_FILES) {
22
30
  const sourceFiles = (0, ng_morph_1.getSourceFiles)(pattern);
23
- sourceFiles.forEach(file => {
31
+ sourceFiles.forEach((file) => {
24
32
  let text = file.getFullText();
25
33
  CHANGED_ICONS.map(({ from, to }) => ({
26
- from: new RegExp(`\\b${from}\\b`, 'g'),
34
+ from: new RegExp(`["'\`]${from}["'\`]`, 'g'),
27
35
  to,
28
36
  })).forEach(({ from, to }) => {
29
- text = text.replaceAll(from, to);
37
+ text = text.replaceAll(from, `"${to}"`);
30
38
  });
31
- const regex = /\btuiIcon(?!Button\b)[A-Z][a-zA-Z0-9]*\b/g;
32
- text = text.replaceAll(regex, match => convertString(match));
39
+ const regex = /['"`]tuiIcon(?!Button\b)[A-Z][a-zA-Z0-9]*\b/g;
40
+ text = text.replaceAll(regex, (match) => convertString(match));
33
41
  file.replaceWithText(text);
34
42
  });
35
43
  }
36
44
  exports.renameIcons = renameIcons;
37
45
  function convertString(input) {
38
46
  let result = input
39
- .replace(/^tuiIcon/, '')
47
+ .replace(/["'`]tuiIcon/, '')
40
48
  .replace(/Large$/, '')
41
49
  .replaceAll(/([A-Z0-9])/g, '-$1')
42
50
  .toLowerCase();
@@ -45,5 +53,5 @@ function convertString(input) {
45
53
  result = result.replace('-circle', '');
46
54
  result = `circle${result}`;
47
55
  }
48
- return `@tui.${result.startsWith('-') ? result.slice(1) : result}`;
56
+ return `${input.slice(0, 1)}@tui.${result.startsWith('-') ? result.slice(1) : result}`;
49
57
  }
@@ -0,0 +1,3 @@
1
+ /// <reference lib="es2021" />
2
+ import type { SchematicContext } from '@angular-devkit/schematics';
3
+ export declare function renameProprietaryIcons({ logger }: SchematicContext, pattern?: import("ng-morph").Pattern): void;
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.renameProprietaryIcons = void 0;
4
+ const ng_morph_1 = require("ng-morph");
5
+ const constants_1 = require("../../../constants");
6
+ function renameProprietaryIcons({ logger }, pattern = constants_1.ALL_FILES) {
7
+ const sourceFiles = (0, ng_morph_1.getSourceFiles)(pattern);
8
+ sourceFiles.forEach((file) => {
9
+ let text = file.getFullText();
10
+ const regex = /['"`]tuiIcon(?!Button\b)[A-Z][a-zA-Z0-9]*\b/g;
11
+ text = text.replaceAll(regex, (icon) => {
12
+ if (icon.match(/['"`]tuiIcon(?!Tds)\w*/)) {
13
+ logger.warn(`[WARNING] in ${file.getSourceFile().getFilePath()}: Invalid icon name ${icon}. Please select an icon from the proprietary pack.`);
14
+ return icon;
15
+ }
16
+ return convertString(icon);
17
+ });
18
+ const invalidIcons = [...new Set(text.match(/\b(tuiIcon(?!Tds|Button)\w*)\b/g))];
19
+ if (invalidIcons.length) {
20
+ const message = `TODO (Taiga UI migration): invalid icons ${invalidIcons.join(', ')}. Please select an icon from the proprietary pack`;
21
+ const todo = file.getFilePath().endsWith('html')
22
+ ? `<!-- ${message} -->`
23
+ : `// ${message}`;
24
+ text = `${todo}\n${text}`;
25
+ }
26
+ file.replaceWithText(text);
27
+ });
28
+ }
29
+ exports.renameProprietaryIcons = renameProprietaryIcons;
30
+ function convertString(input) {
31
+ const result = input
32
+ .replace(/['"`]tuiIconTds/, '')
33
+ .replace(/SmallPragmatic$/, '')
34
+ .replace(/MediumPragmatic$/, '')
35
+ .replace(/Small$/, '')
36
+ .replace(/Medium$/, '')
37
+ .replace(/Flags$/, '')
38
+ .replace(/Service$/, '')
39
+ .replace(/Logo$/, '')
40
+ .replace(/LogoSiteheader$/, '')
41
+ .replace(/LogoSquare$/, '')
42
+ .replaceAll(/([A-Z0-9])/g, '-$1')
43
+ .toLowerCase();
44
+ const pack = extractPackName(input);
45
+ const subfolder = extractSubfolder(input);
46
+ return `${input.slice(0, 1)}@tui.${pack}${subfolder ? `.${subfolder}` : ''}.${result.startsWith('-') ? result.slice(1) : result}`;
47
+ }
48
+ function extractPackName(input) {
49
+ if (input.endsWith('Pragmatic')) {
50
+ return 'pragmatic';
51
+ }
52
+ if (input.endsWith('Service')) {
53
+ return 'service';
54
+ }
55
+ if (input.endsWith('Logo') ||
56
+ input.endsWith('LogoSquare') ||
57
+ input.endsWith('LogoSiteheader')) {
58
+ return 'logo';
59
+ }
60
+ if (input.endsWith('Flags')) {
61
+ return 'flags';
62
+ }
63
+ return 'fancy';
64
+ }
65
+ function extractSubfolder(input) {
66
+ if (input.includes('Medium')) {
67
+ return 'medium';
68
+ }
69
+ if (input.includes('Small')) {
70
+ return 'small';
71
+ }
72
+ if (input.includes('LogoSquare')) {
73
+ return 'square';
74
+ }
75
+ if (input.includes('LogoSiteheader')) {
76
+ return 'siteheader';
77
+ }
78
+ return null;
79
+ }
@@ -41,7 +41,7 @@ exports.ATTRS_TO_DIRECTIVE_REPLACE = [
41
41
  },
42
42
  {
43
43
  componentSelector: ['a', 'button'],
44
- filterFn: el => (0, elements_1.hasElementAttribute)(el, 'tuiLink'),
44
+ filterFn: (el) => (0, elements_1.hasElementAttribute)(el, 'tuiLink'),
45
45
  inputProperty: 'iconRotated',
46
46
  directive: 'tuiChevron',
47
47
  directiveModule: {
@@ -50,13 +50,14 @@ exports.ATTRS_TO_DIRECTIVE_REPLACE = [
50
50
  },
51
51
  },
52
52
  {
53
- componentSelector: ['button'],
53
+ componentSelector: ['button', 'a'],
54
54
  inputProperty: 'showLoader',
55
55
  directive: 'loading',
56
56
  directiveModule: {
57
- name: 'TuiButtonLoadingComponent',
57
+ name: 'TuiButtonLoading',
58
58
  moduleSpecifier: '@taiga-ui/kit',
59
59
  },
60
- filterFn: el => (0, elements_1.hasElementAttribute)(el, 'tuiButton'),
60
+ filterFn: (el) => (0, elements_1.hasElementAttribute)(el, 'tuiButton') ||
61
+ (0, elements_1.hasElementAttribute)(el, 'tuiIconButton'),
61
62
  },
62
63
  ];
@@ -2,12 +2,61 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ATTR_WITH_VALUES_TO_REPLACE = void 0;
4
4
  const elements_1 = require("../../../../utils/templates/elements");
5
+ const hasPseudo = [
6
+ 'button',
7
+ 'a',
8
+ 'tui-checkbox',
9
+ 'tui-checkbox-block',
10
+ 'tui-radio',
11
+ 'tui-radio-block',
12
+ 'tui-radio-labeled',
13
+ 'tui-checkbox-labeled',
14
+ ];
5
15
  exports.ATTR_WITH_VALUES_TO_REPLACE = [
6
16
  {
7
17
  attrNames: ['shape'],
8
18
  newAttrName: '[style.border-radius.%]',
9
- values: [{ from: 'rounded', to: '100' }],
19
+ valueReplacer: [{ from: 'rounded', to: '100' }],
10
20
  withTagNames: ['button'],
11
- filterFn: el => (0, elements_1.hasElementAttribute)(el, 'tuiButton'),
21
+ filterFn: (el) => (0, elements_1.hasElementAttribute)(el, 'tuiButton') ||
22
+ (0, elements_1.hasElementAttribute)(el, 'tuiIconButton'),
23
+ },
24
+ {
25
+ attrNames: ['tuiMode'],
26
+ newAttrName: 'tuiTheme',
27
+ valueReplacer: [
28
+ { from: 'onDark', to: 'dark' },
29
+ { from: 'onLight', to: 'light' },
30
+ ],
31
+ },
32
+ {
33
+ attrNames: ['[pseudoActive]'],
34
+ newAttrName: '[tuiAppearanceState]',
35
+ withTagNames: hasPseudo,
36
+ valueReplacer: (condition) => `${condition} ? 'active' : null`,
37
+ },
38
+ {
39
+ attrNames: ['[pseudoFocus]'],
40
+ newAttrName: '[tuiAppearanceState]',
41
+ withTagNames: hasPseudo,
42
+ valueReplacer: (condition) => `${condition} ? 'focus' : null`,
43
+ },
44
+ {
45
+ attrNames: ['[pseudoHover]'],
46
+ newAttrName: '[tuiAppearanceState]',
47
+ withTagNames: hasPseudo,
48
+ valueReplacer: (condition) => `${condition} ? 'hover' : null`,
49
+ },
50
+ {
51
+ attrNames: ['[pseudoInvalid]'],
52
+ newAttrName: '[tuiAppearanceState]',
53
+ withTagNames: hasPseudo,
54
+ valueReplacer: (condition) => `${condition} ? 'invalid' : null`,
55
+ },
56
+ {
57
+ attrNames: ['[pseudoDisabled]'],
58
+ newAttrName: '[tuiAppearanceState]',
59
+ withTagNames: ['tui-radio-block', 'tui-radio-labeled', 'tui-radio'],
60
+ valueReplacer: (condition) => `${condition} ? 'disabled' : null`,
12
61
  },
13
62
  ];
@@ -2,20 +2,35 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ATTRS_TO_REPLACE = void 0;
4
4
  const elements_1 = require("../../../../utils/templates/elements");
5
+ const inputs_1 = require("../../../../utils/templates/inputs");
5
6
  exports.ATTRS_TO_REPLACE = [
6
7
  {
7
8
  from: {
8
9
  attrName: 'brandLogo',
9
10
  withTagNames: ['tui-card', 'tui-thumbnail-card'],
10
11
  },
11
- to: { attrName: 'iconLeft' },
12
+ to: { attrName: 'iconStart' },
13
+ },
14
+ {
15
+ from: {
16
+ attrName: 'src',
17
+ withTagNames: ['tui-svg'],
18
+ },
19
+ to: { attrName: 'icon' },
20
+ },
21
+ {
22
+ from: {
23
+ attrName: '[src]',
24
+ withTagNames: ['tui-svg'],
25
+ },
26
+ to: { attrName: '[icon]' },
12
27
  },
13
28
  {
14
29
  from: {
15
30
  attrName: '[brandLogo]',
16
31
  withTagNames: ['tui-card', 'tui-thumbnail-card'],
17
32
  },
18
- to: { attrName: '[iconLeft]' },
33
+ to: { attrName: '[iconStart]' },
19
34
  },
20
35
  {
21
36
  from: {
@@ -34,17 +49,24 @@ exports.ATTRS_TO_REPLACE = [
34
49
  {
35
50
  from: {
36
51
  attrName: 'item',
37
- withTagNames: ['tui-radio'],
52
+ withTagNames: ['tui-radio', 'tui-radio-labeled', 'tui-radio-block'],
38
53
  },
39
54
  to: { attrName: 'value' },
40
55
  },
41
56
  {
42
57
  from: {
43
58
  attrName: '[item]',
44
- withTagNames: ['tui-radio'],
59
+ withTagNames: ['tui-radio', 'tui-radio-labeled', 'tui-radio-block'],
45
60
  },
46
61
  to: { attrName: '[value]' },
47
62
  },
63
+ {
64
+ from: {
65
+ attrName: '(removed)',
66
+ withTagNames: ['tui-file'],
67
+ },
68
+ to: { attrName: '(remove)' },
69
+ },
48
70
  {
49
71
  from: {
50
72
  attrName: '[rounded]',
@@ -59,20 +81,6 @@ exports.ATTRS_TO_REPLACE = [
59
81
  },
60
82
  to: { attrName: '(waResizeObserver)' },
61
83
  },
62
- {
63
- from: {
64
- attrName: 'item',
65
- withTagNames: ['tui-radio-labeled'],
66
- },
67
- to: { attrName: 'value' },
68
- },
69
- {
70
- from: {
71
- attrName: '[item]',
72
- withTagNames: ['tui-radio-labeled'],
73
- },
74
- to: { attrName: '[value]' },
75
- },
76
84
  // Hosted dropdown
77
85
  {
78
86
  from: {
@@ -156,6 +164,14 @@ exports.ATTRS_TO_REPLACE = [
156
164
  },
157
165
  to: { attrName: 'appearance' },
158
166
  },
167
+ {
168
+ from: {
169
+ attrName: '[mode]',
170
+ withTagNames: ['tui-marker-icon'],
171
+ withAttrsNames: ['tuiMarkerIcon'],
172
+ },
173
+ to: { attrName: '[appearance]' },
174
+ },
159
175
  {
160
176
  from: {
161
177
  attrName: 'tuiAction',
@@ -167,36 +183,84 @@ exports.ATTRS_TO_REPLACE = [
167
183
  {
168
184
  from: {
169
185
  attrName: 'icon',
170
- withAttrsNames: ['tuiButton'],
186
+ withAttrsNames: ['tuiButton', 'tuiIconButton'],
171
187
  },
172
- to: { attrName: 'iconLeft' },
188
+ to: { attrName: 'iconStart' },
173
189
  },
174
190
  {
175
191
  from: {
176
192
  attrName: '[icon]',
177
- withAttrsNames: ['tuiButton'],
193
+ withAttrsNames: ['tuiButton', 'tuiIconButton'],
194
+ },
195
+ to: { attrName: '[iconStart]' },
196
+ },
197
+ {
198
+ from: {
199
+ attrName: 'iconLeft',
200
+ withAttrsNames: ['tuiButton', 'tuiIconButton'],
201
+ },
202
+ to: { attrName: 'iconStart' },
203
+ },
204
+ {
205
+ from: {
206
+ attrName: '[iconLeft]',
207
+ withAttrsNames: ['tuiButton', 'tuiIconButton'],
178
208
  },
179
- to: { attrName: '[iconLeft]' },
209
+ to: { attrName: '[iconStart]' },
210
+ },
211
+ {
212
+ from: {
213
+ attrName: 'iconRight',
214
+ withAttrsNames: ['tuiButton', 'tuiIconButton'],
215
+ },
216
+ to: { attrName: 'iconEnd' },
217
+ },
218
+ {
219
+ from: {
220
+ attrName: '[iconRight]',
221
+ withAttrsNames: ['tuiButton', 'tuiIconButton'],
222
+ },
223
+ to: { attrName: '[iconEnd]' },
180
224
  },
181
225
  {
182
226
  from: {
183
227
  attrName: 'icon',
184
228
  withAttrsNames: ['tuiLink'],
185
- filterFn: element => {
229
+ filterFn: (element) => {
230
+ var _a;
231
+ return !(0, elements_1.hasElementAttribute)(element, 'iconAlign') ||
232
+ ((_a = (0, inputs_1.findAttr)(element.attrs, 'iconAlign')) === null || _a === void 0 ? void 0 : _a.value) === 'right';
233
+ },
234
+ },
235
+ to: { attrName: 'iconEnd' },
236
+ },
237
+ {
238
+ from: {
239
+ attrName: '[icon]',
240
+ withAttrsNames: ['tuiLink'],
241
+ filterFn: (element) => {
186
242
  var _a;
187
243
  return !(0, elements_1.hasElementAttribute)(element, 'iconAlign') ||
188
- ((_a = element.attrs.find(attr => attr.name === 'iconalign')) === null || _a === void 0 ? void 0 : _a.value) === 'right';
244
+ ((_a = (0, inputs_1.findAttr)(element.attrs, 'iconAlign')) === null || _a === void 0 ? void 0 : _a.value) === 'right';
189
245
  },
190
246
  },
191
- to: { attrName: 'iconRight' },
247
+ to: { attrName: '[iconEnd]' },
192
248
  },
193
249
  {
194
250
  from: {
195
251
  attrName: 'icon',
196
252
  withAttrsNames: ['tuiLink'],
197
- filterFn: element => { var _a; return ((_a = element.attrs.find(attr => attr.name === 'iconalign')) === null || _a === void 0 ? void 0 : _a.value) === 'left'; },
253
+ filterFn: (element) => { var _a; return ((_a = (0, inputs_1.findAttr)(element.attrs, 'iconAlign')) === null || _a === void 0 ? void 0 : _a.value) === 'left'; },
198
254
  },
199
- to: { attrName: 'iconLeft' },
255
+ to: { attrName: 'iconStart' },
256
+ },
257
+ {
258
+ from: {
259
+ attrName: '[icon]',
260
+ withAttrsNames: ['tuiLink'],
261
+ filterFn: (element) => { var _a; return ((_a = (0, inputs_1.findAttr)(element.attrs, 'iconAlign')) === null || _a === void 0 ? void 0 : _a.value) === 'left'; },
262
+ },
263
+ to: { attrName: '[iconStart]' },
200
264
  },
201
265
  {
202
266
  from: {
@@ -205,4 +269,27 @@ exports.ATTRS_TO_REPLACE = [
205
269
  },
206
270
  to: { attrName: '' },
207
271
  },
272
+ {
273
+ from: {
274
+ attrName: 'tuiTextfield',
275
+ withTagNames: ['input', 'textarea'],
276
+ },
277
+ to: { attrName: 'tuiTextfieldLegacy' },
278
+ },
279
+ {
280
+ from: {
281
+ attrName: 'status',
282
+ withTagNames: ['tui-notification'],
283
+ withAttrsNames: ['tuiNotification'],
284
+ },
285
+ to: { attrName: 'appearance' },
286
+ },
287
+ {
288
+ from: {
289
+ attrName: '[status]',
290
+ withTagNames: ['tui-notification'],
291
+ withAttrsNames: ['tuiNotification'],
292
+ },
293
+ to: { attrName: '[appearance]' },
294
+ },
208
295
  ];
@@ -12,6 +12,37 @@ exports.ENUMS_TO_REPLACE = [
12
12
  },
13
13
  keepAsType: true,
14
14
  },
15
+ {
16
+ name: 'TuiNotification',
17
+ replaceValues: {
18
+ Error: 'error',
19
+ Info: 'info',
20
+ Success: 'success',
21
+ Warning: 'warning',
22
+ },
23
+ keepAsType: false,
24
+ },
25
+ {
26
+ name: 'TuiCard',
27
+ replaceValues: {
28
+ TinkoffAirlines: 't-airlines',
29
+ TinkoffAirlinesCredit: 't-airlines-credit',
30
+ TinkoffBlack: 't-black',
31
+ TinkoffBusiness: 't-business',
32
+ TinkoffJunior: 't-junior',
33
+ TinkoffPlatinum: 't-platinum',
34
+ },
35
+ keepAsType: true,
36
+ },
37
+ {
38
+ name: 'TuiTimelineStatus',
39
+ replaceValues: {
40
+ Completed: 'completed',
41
+ Declined: 'declined',
42
+ Normal: 'normal',
43
+ },
44
+ keepAsType: false,
45
+ },
15
46
  {
16
47
  name: 'TuiCountryIsoCode',
17
48
  replaceValues: {
@@ -37,4 +37,23 @@ exports.HTML_COMMENTS = [
37
37
  withAttrs: ['[shape]'],
38
38
  comment: '[shape] input has been removed. Please use border-radius css property for rounding borders https://taiga-ui.dev/components/button',
39
39
  },
40
+ {
41
+ tag: '*',
42
+ withAttrs: ['tuiMode'],
43
+ comment: 'TuiMode has been removed. Please use tuiTheme attribute to set theme https://taiga-ui.dev/directives/theme',
44
+ },
45
+ {
46
+ tag: 'tui-theme-night',
47
+ withAttrs: [],
48
+ comment: 'TuiThemeNight has been removed. Please use tuiTheme attribute to set theme https://taiga-ui.dev/directives/theme',
49
+ },
50
+ {
51
+ tag: 'tui-input-files',
52
+ withAttrs: [],
53
+ comment: 'Native input inside is now required and the wrapper has changed from <tui-input-files to <label tuiInputFiles, control moved to native input. See interactive example https://taiga-ui.dev/components/input-files',
54
+ },
55
+ {
56
+ pattern: /\|\s?tuiFormatNumber\s?:/g,
57
+ comment: 'tuiFormatNumber pipe API has been changed. Learn how to migrate decimalLimit, decimal, zeroPadding: https://github.com/taiga-family/taiga-ui/issues/8335#migration',
58
+ },
40
59
  ];