@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
@@ -1,5 +1,4 @@
1
1
  /**
2
- * @deprecated: use {@link tuiIsApplePlatform} instead
3
2
  * @description:
4
3
  * All Chrome / Chromium-based browsers will return MacIntel on macOS,
5
4
  * no matter what the hardware architecture is. See the source code here:
@@ -9,36 +8,24 @@
9
8
  * Documentation:
10
9
  * https://developer.mozilla.org/en-US/docs/Web/API/Navigator/platform
11
10
  */
12
- // eslint-disable-next-line @typescript-eslint/naming-convention
13
- function isApplePlatform(navigator) {
11
+ function tuiIsApplePlatform(navigator) {
14
12
  return navigator.platform.indexOf(`Mac`) === 0 || navigator.platform === `iPhone`;
15
13
  }
16
- const tuiIsApplePlatform = isApplePlatform;
17
14
 
18
15
  const IOS_REG_EXP = /ipad|iphone|ipod/;
19
- /**
20
- * @deprecated: use {@link tuiIsIos} instead
21
- */
22
- // eslint-disable-next-line @typescript-eslint/naming-convention
23
- function isIos(navigator) {
16
+ function tuiIsIos(navigator) {
24
17
  return (IOS_REG_EXP.test(navigator.userAgent.toLowerCase()) ||
25
- (isApplePlatform(navigator) && navigator.maxTouchPoints > 1));
18
+ (tuiIsApplePlatform(navigator) && navigator.maxTouchPoints > 1));
26
19
  }
27
- const tuiIsIos = isIos;
28
20
 
29
21
  const SAFARI_REG_EXP = /^((?!chrome|android).)*safari/i;
30
- /**
31
- * @deprecated: use {@link tuiIsApple} instead
32
- */
33
- // eslint-disable-next-line @typescript-eslint/naming-convention
34
- function isApple(navigator) {
35
- return isIos(navigator) || SAFARI_REG_EXP.test(navigator.userAgent.toLowerCase());
22
+ function tuiIsApple(navigator) {
23
+ return tuiIsIos(navigator) || SAFARI_REG_EXP.test(navigator.userAgent.toLowerCase());
36
24
  }
37
- const tuiIsApple = isApple;
38
25
 
39
26
  /**
40
27
  * Generated bundle index. Do not edit.
41
28
  */
42
29
 
43
- export { isApple, isApplePlatform, isIos, tuiIsApple, tuiIsApplePlatform, tuiIsIos };
30
+ export { tuiIsApple, tuiIsApplePlatform, tuiIsIos };
44
31
  //# sourceMappingURL=taiga-ui-cdk-utils-os.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-cdk-utils-os.js","sources":["../../../projects/cdk/utils/os/is-apple-platform.ts","../../../projects/cdk/utils/os/is-ios.ts","../../../projects/cdk/utils/os/is-apple.ts","../../../projects/cdk/utils/os/taiga-ui-cdk-utils-os.ts"],"sourcesContent":["/**\n * @deprecated: use {@link tuiIsApplePlatform} instead\n * @description:\n * All Chrome / Chromium-based browsers will return MacIntel on macOS,\n * no matter what the hardware architecture is. See the source code here:\n * https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/frame/navigator_id.cc;l=64;drc=703d3c472cf27470dad21a3f2c8972aca3732cd6\n * But maybe in future years, it will be changed to MacM1\n *\n * Documentation:\n * https://developer.mozilla.org/en-US/docs/Web/API/Navigator/platform\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function isApplePlatform(navigator: Navigator): boolean {\n return navigator.platform.indexOf(`Mac`) === 0 || navigator.platform === `iPhone`;\n}\n\nexport const tuiIsApplePlatform = isApplePlatform;\n","import {isApplePlatform} from './is-apple-platform';\n\nconst IOS_REG_EXP = /ipad|iphone|ipod/;\n\n/**\n * @deprecated: use {@link tuiIsIos} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function isIos(navigator: Navigator): boolean {\n return (\n IOS_REG_EXP.test(navigator.userAgent.toLowerCase()) ||\n (isApplePlatform(navigator) && navigator.maxTouchPoints > 1)\n );\n}\n\nexport const tuiIsIos = isIos;\n","import {isIos} from './is-ios';\n\nconst SAFARI_REG_EXP = /^((?!chrome|android).)*safari/i;\n\n/**\n * @deprecated: use {@link tuiIsApple} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function isApple(navigator: Navigator): boolean {\n return isIos(navigator) || SAFARI_REG_EXP.test(navigator.userAgent.toLowerCase());\n}\n\nexport const tuiIsApple = isApple;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;;;;;;;;;;AAUG;AACH;AACM,SAAU,eAAe,CAAC,SAAoB,EAAA;AAChD,IAAA,OAAO,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAK,GAAA,CAAA,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,QAAQ,KAAK,QAAQ,CAAC;AACtF,CAAC;AAEM,MAAM,kBAAkB,GAAG;;ACdlC,MAAM,WAAW,GAAG,kBAAkB,CAAC;AAEvC;;AAEG;AACH;AACM,SAAU,KAAK,CAAC,SAAoB,EAAA;IACtC,QACI,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;AACnD,SAAC,eAAe,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,cAAc,GAAG,CAAC,CAAC,EAC9D;AACN,CAAC;AAEM,MAAM,QAAQ,GAAG;;ACbxB,MAAM,cAAc,GAAG,gCAAgC,CAAC;AAExD;;AAEG;AACH;AACM,SAAU,OAAO,CAAC,SAAoB,EAAA;AACxC,IAAA,OAAO,KAAK,CAAC,SAAS,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,CAAC;AACtF,CAAC;AAEM,MAAM,UAAU,GAAG;;ACZ1B;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-cdk-utils-os.js","sources":["../../../projects/cdk/utils/os/is-apple-platform.ts","../../../projects/cdk/utils/os/is-ios.ts","../../../projects/cdk/utils/os/is-apple.ts","../../../projects/cdk/utils/os/taiga-ui-cdk-utils-os.ts"],"sourcesContent":["/**\n * @description:\n * All Chrome / Chromium-based browsers will return MacIntel on macOS,\n * no matter what the hardware architecture is. See the source code here:\n * https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/frame/navigator_id.cc;l=64;drc=703d3c472cf27470dad21a3f2c8972aca3732cd6\n * But maybe in future years, it will be changed to MacM1\n *\n * Documentation:\n * https://developer.mozilla.org/en-US/docs/Web/API/Navigator/platform\n */\nexport function tuiIsApplePlatform(navigator: Navigator): boolean {\n return navigator.platform.indexOf(`Mac`) === 0 || navigator.platform === `iPhone`;\n}\n","import {tuiIsApplePlatform} from './is-apple-platform';\n\nconst IOS_REG_EXP = /ipad|iphone|ipod/;\n\nexport function tuiIsIos(navigator: Navigator): boolean {\n return (\n IOS_REG_EXP.test(navigator.userAgent.toLowerCase()) ||\n (tuiIsApplePlatform(navigator) && navigator.maxTouchPoints > 1)\n );\n}\n","import {tuiIsIos} from './is-ios';\n\nconst SAFARI_REG_EXP = /^((?!chrome|android).)*safari/i;\n\nexport function tuiIsApple(navigator: Navigator): boolean {\n return tuiIsIos(navigator) || SAFARI_REG_EXP.test(navigator.userAgent.toLowerCase());\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;;;;;;;;;AASG;AACG,SAAU,kBAAkB,CAAC,SAAoB,EAAA;AACnD,IAAA,OAAO,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAK,GAAA,CAAA,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,QAAQ,KAAK,QAAQ,CAAC;AACtF;;ACVA,MAAM,WAAW,GAAG,kBAAkB,CAAC;AAEjC,SAAU,QAAQ,CAAC,SAAoB,EAAA;IACzC,QACI,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;AACnD,SAAC,kBAAkB,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,cAAc,GAAG,CAAC,CAAC,EACjE;AACN;;ACPA,MAAM,cAAc,GAAG,gCAAgC,CAAC;AAElD,SAAU,UAAU,CAAC,SAAoB,EAAA;AAC3C,IAAA,OAAO,QAAQ,CAAC,SAAS,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,CAAC;AACzF;;ACNA;;AAEG;;;;"}
@@ -1,5 +1,4 @@
1
1
  /**
2
- * @deprecated: use {@link tuiSvgLinearGradientProcessor} instead
3
2
  * @description:
4
3
  * Any ‘linearGradient’ attributes which are defined on the referenced
5
4
  * element which are not defined on this element are inherited by this element.
@@ -13,8 +12,7 @@
13
12
  * Documentation: https://www.w3.org/TR/SVG11/pservers.html
14
13
  *
15
14
  */
16
- // eslint-disable-next-line @typescript-eslint/naming-convention
17
- function svgLinearGradientProcessor(svg, salt) {
15
+ function tuiSvgLinearGradientProcessor(svg, salt) {
18
16
  const uniqueIds = extractLinearGradientIdsFromSvg(svg);
19
17
  return uniqueIds.reduce((processed, previousId) => processed.replace(new RegExp(previousId, `g`), `${previousId}_${salt || makeRandomSalt()}`), svg);
20
18
  }
@@ -25,11 +23,10 @@ function extractLinearGradientIdsFromSvg(svg) {
25
23
  const matchedIdsWithPrefix = svg.match(/url\(#(\w\w+)/g) || [];
26
24
  return [...new Set(matchedIdsWithPrefix)].map(matched => matched.slice(5));
27
25
  }
28
- const tuiSvgLinearGradientProcessor = svgLinearGradientProcessor;
29
26
 
30
27
  /**
31
28
  * Generated bundle index. Do not edit.
32
29
  */
33
30
 
34
- export { svgLinearGradientProcessor, tuiSvgLinearGradientProcessor };
31
+ export { tuiSvgLinearGradientProcessor };
35
32
  //# sourceMappingURL=taiga-ui-cdk-utils-svg.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-cdk-utils-svg.js","sources":["../../../projects/cdk/utils/svg/svg-linear-gradient-processor.ts","../../../projects/cdk/utils/svg/taiga-ui-cdk-utils-svg.ts"],"sourcesContent":["/**\n * @deprecated: use {@link tuiSvgLinearGradientProcessor} instead\n * @description:\n * Any ‘linearGradient’ attributes which are defined on the referenced\n * element which are not defined on this element are inherited by this element.\n * If this element has no defined gradient stops, and the referenced element does\n * (possibly due to its own ‘xlink:href’ attribute), then this element inherits\n * the gradient stop from the referenced element. Inheritance can be indirect\n * to an arbitrary level; thus, if the referenced element inherits attribute\n * or gradient stops due to its own ‘xlink:href’ attribute, then the current\n * element can inherit those attributes or gradient stops.\n *\n * Documentation: https://www.w3.org/TR/SVG11/pservers.html\n *\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function svgLinearGradientProcessor(svg: string, salt?: number | string): string {\n const uniqueIds = extractLinearGradientIdsFromSvg(svg);\n\n return uniqueIds.reduce(\n (processed, previousId) =>\n processed.replace(\n new RegExp(previousId, `g`),\n `${previousId}_${salt || makeRandomSalt()}`,\n ),\n svg,\n );\n}\n\nfunction makeRandomSalt(): number {\n return Math.floor(Math.random() * Date.now());\n}\n\nfunction extractLinearGradientIdsFromSvg(svg: string): string[] {\n const matchedIdsWithPrefix = svg.match(/url\\(#(\\w\\w+)/g) || [];\n\n return [...new Set(matchedIdsWithPrefix)].map(\n matched => matched.slice(5), // remove prefix `url(#`\n );\n}\n\nexport const tuiSvgLinearGradientProcessor = svgLinearGradientProcessor;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;AAcG;AACH;AACgB,SAAA,0BAA0B,CAAC,GAAW,EAAE,IAAsB,EAAA;AAC1E,IAAA,MAAM,SAAS,GAAG,+BAA+B,CAAC,GAAG,CAAC,CAAC;AAEvD,IAAA,OAAO,SAAS,CAAC,MAAM,CACnB,CAAC,SAAS,EAAE,UAAU,KAClB,SAAS,CAAC,OAAO,CACb,IAAI,MAAM,CAAC,UAAU,EAAE,CAAG,CAAA,CAAA,CAAC,EAC3B,CAAA,EAAG,UAAU,CAAI,CAAA,EAAA,IAAI,IAAI,cAAc,EAAE,CAAE,CAAA,CAC9C,EACL,GAAG,CACN,CAAC;AACN,CAAC;AAED,SAAS,cAAc,GAAA;AACnB,IAAA,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,+BAA+B,CAAC,GAAW,EAAA;IAChD,MAAM,oBAAoB,GAAG,GAAG,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;IAE/D,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,oBAAoB,CAAC,CAAC,CAAC,GAAG,CACzC,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAC9B,CAAC;AACN,CAAC;AAEM,MAAM,6BAA6B,GAAG;;ACzC7C;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-cdk-utils-svg.js","sources":["../../../projects/cdk/utils/svg/svg-linear-gradient-processor.ts","../../../projects/cdk/utils/svg/taiga-ui-cdk-utils-svg.ts"],"sourcesContent":["/**\n * @description:\n * Any ‘linearGradient’ attributes which are defined on the referenced\n * element which are not defined on this element are inherited by this element.\n * If this element has no defined gradient stops, and the referenced element does\n * (possibly due to its own ‘xlink:href’ attribute), then this element inherits\n * the gradient stop from the referenced element. Inheritance can be indirect\n * to an arbitrary level; thus, if the referenced element inherits attribute\n * or gradient stops due to its own ‘xlink:href’ attribute, then the current\n * element can inherit those attributes or gradient stops.\n *\n * Documentation: https://www.w3.org/TR/SVG11/pservers.html\n *\n */\nexport function tuiSvgLinearGradientProcessor(\n svg: string,\n salt?: number | string,\n): string {\n const uniqueIds = extractLinearGradientIdsFromSvg(svg);\n\n return uniqueIds.reduce(\n (processed, previousId) =>\n processed.replace(\n new RegExp(previousId, `g`),\n `${previousId}_${salt || makeRandomSalt()}`,\n ),\n svg,\n );\n}\n\nfunction makeRandomSalt(): number {\n return Math.floor(Math.random() * Date.now());\n}\n\nfunction extractLinearGradientIdsFromSvg(svg: string): string[] {\n const matchedIdsWithPrefix = svg.match(/url\\(#(\\w\\w+)/g) || [];\n\n return [...new Set(matchedIdsWithPrefix)].map(\n matched => matched.slice(5), // remove prefix `url(#`\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;AAaG;AACa,SAAA,6BAA6B,CACzC,GAAW,EACX,IAAsB,EAAA;AAEtB,IAAA,MAAM,SAAS,GAAG,+BAA+B,CAAC,GAAG,CAAC,CAAC;AAEvD,IAAA,OAAO,SAAS,CAAC,MAAM,CACnB,CAAC,SAAS,EAAE,UAAU,KAClB,SAAS,CAAC,OAAO,CACb,IAAI,MAAM,CAAC,UAAU,EAAE,CAAG,CAAA,CAAA,CAAC,EAC3B,CAAA,EAAG,UAAU,CAAI,CAAA,EAAA,IAAI,IAAI,cAAc,EAAE,CAAE,CAAA,CAC9C,EACL,GAAG,CACN,CAAC;AACN,CAAC;AAED,SAAS,cAAc,GAAA;AACnB,IAAA,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,+BAA+B,CAAC,GAAW,EAAA;IAChD,MAAM,oBAAoB,GAAG,GAAG,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;IAE/D,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,oBAAoB,CAAC,CAAC,CAAC,GAAG,CACzC,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAC9B,CAAC;AACN;;ACxCA;;AAEG;;;;"}
@@ -1,4 +1,5 @@
1
1
  export * from '@taiga-ui/cdk/utils/browser';
2
+ export * from '@taiga-ui/cdk/utils/color';
2
3
  export * from '@taiga-ui/cdk/utils/dom';
3
4
  export * from '@taiga-ui/cdk/utils/focus';
4
5
  export * from '@taiga-ui/cdk/utils/format';
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-cdk-utils.js","sources":["../../../projects/cdk/utils/taiga-ui-cdk-utils.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;AAEG"}
1
+ {"version":3,"file":"taiga-ui-cdk-utils.js","sources":["../../../projects/cdk/utils/taiga-ui-cdk-utils.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAAA;;AAEG"}
@@ -9,8 +9,4 @@ export declare class TuiDragState {
9
9
  readonly event: MouseEvent;
10
10
  constructor(stage: TuiDragStage, event: MouseEvent);
11
11
  }
12
- /**
13
- * @deprecated: use {@link tuiDragAndDropFrom} instead
14
- */
15
- export declare function dragAndDropFrom(element: Element): Observable<TuiDragState>;
16
- export declare const tuiDragAndDropFrom: typeof dragAndDropFrom;
12
+ export declare function tuiDragAndDropFrom(element: Element): Observable<TuiDragState>;
@@ -1,6 +1,2 @@
1
1
  import { Observable } from 'rxjs';
2
- /**
3
- * @deprecated: use {@link tuiFocusVisibleObservable} instead
4
- */
5
- export declare function focusVisibleObservable(element: Element): Observable<boolean>;
6
- export declare const tuiFocusVisibleObservable: typeof focusVisibleObservable;
2
+ export declare function tuiFocusVisibleObservable(element: Element): Observable<boolean>;
@@ -1,8 +1,6 @@
1
1
  import { QueryList } from '@angular/core';
2
2
  import { Observable } from 'rxjs';
3
3
  /**
4
- * @deprecated: use {@link tuiItemsQueryListObservable} instead
5
4
  * Converts changes observable of a QueryList to an Observable of arrays
6
5
  */
7
- export declare function itemsQueryListObservable<T>(queryList: QueryList<T>): Observable<readonly T[]>;
8
- export declare const tuiItemsQueryListObservable: typeof itemsQueryListObservable;
6
+ export declare function tuiItemsQueryListObservable<T>(queryList: QueryList<T>): Observable<readonly T[]>;
@@ -1,9 +1,7 @@
1
1
  import { TuiEventWith, TuiTypedEventTarget } from '@taiga-ui/cdk/types';
2
2
  import { Observable } from 'rxjs';
3
3
  /**
4
- * @deprecated: use {@link tuiMouseDragFinishFrom} instead
5
4
  * Letting go of the mouse after it was pressed
6
5
  * @param target
7
6
  */
8
- export declare function mouseDragFinishFrom<T extends TuiTypedEventTarget<TuiEventWith<DragEvent, T>>>(target: Exclude<T, null>): Observable<TuiEventWith<MouseEvent, T>>;
9
- export declare const tuiMouseDragFinishFrom: typeof mouseDragFinishFrom;
7
+ export declare function tuiMouseDragFinishFrom<T extends TuiTypedEventTarget<TuiEventWith<DragEvent, T>>>(target: Exclude<T, null>): Observable<TuiEventWith<MouseEvent, T>>;
@@ -1,6 +1,2 @@
1
1
  import { OperatorFunction } from 'rxjs';
2
- /**
3
- * @deprecated: use {@link tuiMustBePresent} instead
4
- */
5
- export declare function mustBePresent<T>(): OperatorFunction<T | undefined | null, T>;
6
- export declare const tuiMustBePresent: typeof mustBePresent;
2
+ export declare function tuiMustBePresent<T>(): OperatorFunction<T | undefined | null, T>;
@@ -2,8 +2,4 @@ import { Observable } from 'rxjs';
2
2
  export interface TuiPressedObservableOptions {
3
3
  onlyTrusted: boolean;
4
4
  }
5
- /**
6
- * @deprecated: use {@link tuiPressedObservable} instead
7
- */
8
- export declare function pressedObservable(element: Element, { onlyTrusted }?: TuiPressedObservableOptions): Observable<boolean>;
9
- export declare const tuiPressedObservable: typeof pressedObservable;
5
+ export declare function tuiPressedObservable(element: Element, { onlyTrusted }?: TuiPressedObservableOptions): Observable<boolean>;
@@ -1,6 +1,2 @@
1
1
  import { MonoTypeOperatorFunction } from 'rxjs';
2
- /**
3
- * @deprecated: use {@link tuiPreventDefault} instead
4
- */
5
- export declare function preventDefault<T extends Event>(): MonoTypeOperatorFunction<T>;
6
- export declare const tuiPreventDefault: typeof preventDefault;
2
+ export declare function tuiPreventDefault<T extends Event>(): MonoTypeOperatorFunction<T>;
@@ -1,6 +1,2 @@
1
1
  import { MonoTypeOperatorFunction } from 'rxjs';
2
- /**
3
- * @deprecated: use {@link tuiStopPropagation} instead
4
- */
5
- export declare function stopPropagation<T extends Event>(): MonoTypeOperatorFunction<T>;
6
- export declare const tuiStopPropagation: typeof stopPropagation;
2
+ export declare function tuiStopPropagation<T extends Event>(): MonoTypeOperatorFunction<T>;
@@ -1,23 +1,7 @@
1
1
  import { TuiEventWith, TuiTypedEventTarget } from '@taiga-ui/cdk/types';
2
2
  import { Observable } from 'rxjs';
3
- /**
4
- * @deprecated: use {@link tuiTypedFromEvent} instead
5
- */
6
- export declare function typedFromEvent<E extends keyof WindowEventMap>(target: Window, event: E, options?: AddEventListenerOptions): Observable<TuiEventWith<WindowEventMap[E], typeof target>>;
7
- /**
8
- * @deprecated: use {@link tuiTypedFromEvent} instead
9
- */
10
- export declare function typedFromEvent<E extends keyof DocumentEventMap>(target: Document, event: E, options?: AddEventListenerOptions): Observable<TuiEventWith<DocumentEventMap[E], typeof target>>;
11
- /**
12
- * @deprecated: use {@link tuiTypedFromEvent} instead
13
- */
14
- export declare function typedFromEvent<T extends Element, E extends keyof HTMLElementEventMap>(target: T, event: E, options?: AddEventListenerOptions): Observable<TuiEventWith<HTMLElementEventMap[E], typeof target>>;
15
- /**
16
- * @deprecated: use {@link tuiTypedFromEvent} instead
17
- */
18
- export declare function typedFromEvent<E extends Event, T extends TuiTypedEventTarget<TuiEventWith<E, T>>>(target: T, event: string, options?: AddEventListenerOptions): Observable<TuiEventWith<E, T>>;
19
- /**
20
- * @deprecated: use {@link tuiTypedFromEvent} instead
21
- */
22
- export declare function typedFromEvent<E extends Event>(target: TuiTypedEventTarget<E>, event: string, options?: AddEventListenerOptions): Observable<E>;
23
- export declare const tuiTypedFromEvent: typeof typedFromEvent;
3
+ export declare function tuiTypedFromEvent<E extends keyof WindowEventMap>(target: Window, event: E, options?: AddEventListenerOptions): Observable<TuiEventWith<WindowEventMap[E], typeof target>>;
4
+ export declare function tuiTypedFromEvent<E extends keyof DocumentEventMap>(target: Document, event: E, options?: AddEventListenerOptions): Observable<TuiEventWith<DocumentEventMap[E], typeof target>>;
5
+ export declare function tuiTypedFromEvent<T extends Element, E extends keyof HTMLElementEventMap>(target: T, event: E, options?: AddEventListenerOptions): Observable<TuiEventWith<HTMLElementEventMap[E], typeof target>>;
6
+ export declare function tuiTypedFromEvent<E extends Event, T extends TuiTypedEventTarget<TuiEventWith<E, T>>>(target: T, event: string, options?: AddEventListenerOptions): Observable<TuiEventWith<E, T>>;
7
+ export declare function tuiTypedFromEvent<E extends Event>(target: TuiTypedEventTarget<E>, event: string, options?: AddEventListenerOptions): Observable<E>;
@@ -1,7 +1,3 @@
1
1
  import { ChangeDetectorRef } from '@angular/core';
2
2
  import { MonoTypeOperatorFunction } from 'rxjs';
3
- /**
4
- * @deprecated: use {@link tuiWatch} instead
5
- */
6
- export declare function watch<T>(changeDetectorRef: ChangeDetectorRef): MonoTypeOperatorFunction<T>;
7
- export declare const tuiWatch: typeof watch;
3
+ export declare function tuiWatch<T>(changeDetectorRef: ChangeDetectorRef): MonoTypeOperatorFunction<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/cdk",
3
- "version": "3.0.0-rc.0",
3
+ "version": "3.0.0-rc.3",
4
4
  "description": "Base library for creating Angular components and applications using Taiga UI principles regarding of actual visual appearance",
5
5
  "keywords": [
6
6
  "angular",
@@ -19,7 +19,7 @@
19
19
  "@ng-web-apis/mutation-observer": "2.0.0",
20
20
  "@ng-web-apis/resize-observer": "2.0.0",
21
21
  "@tinkoff/ng-event-plugins": "3.0.0",
22
- "@tinkoff/ng-polymorpheus": "4.0.4",
22
+ "@tinkoff/ng-polymorpheus": "4.0.6",
23
23
  "ng-morph": "^2.0.0",
24
24
  "parse5": "^6.0.1",
25
25
  "tslib": "^2.0.0"
@@ -46,7 +46,11 @@
46
46
  "@taiga-ui/addon-tablebars",
47
47
  "@taiga-ui/addon-table",
48
48
  "@taiga-ui/addon-editor",
49
- "@taiga-ui/addon-mobile"
49
+ "@taiga-ui/addon-mobile",
50
+ "@taiga-ui/proprietary-banking",
51
+ "@taiga-ui/proprietary-core",
52
+ "@taiga-ui/proprietary-icons",
53
+ "@taiga-ui/proprietary-navigation"
50
54
  ]
51
55
  },
52
56
  "schematics": "./schematics/collection.json",
package/pipes/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from '@taiga-ui/cdk/pipes/filter';
2
+ export * from '@taiga-ui/cdk/pipes/keys';
2
3
  export * from '@taiga-ui/cdk/pipes/mapper';
@@ -0,0 +1,2 @@
1
+ export * from './keys.module';
2
+ export * from './keys.pipe';
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./keys.pipe";
3
+ export declare class TuiKeysPipeModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<TuiKeysPipeModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<TuiKeysPipeModule, [typeof i1.TuiKeysPipe], never, [typeof i1.TuiKeysPipe]>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<TuiKeysPipeModule>;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class TuiKeysPipe implements PipeTransform {
4
+ transform(object: Record<any, any>): string[];
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<TuiKeysPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<TuiKeysPipe, "tuiKeys">;
7
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "main": "../../bundles/taiga-ui-cdk-pipes-keys.umd.js",
3
+ "module": "../../fesm2015/taiga-ui-cdk-pipes-keys.js",
4
+ "es2015": "../../fesm2015/taiga-ui-cdk-pipes-keys.js",
5
+ "esm2015": "../../esm2015/pipes/keys/taiga-ui-cdk-pipes-keys.js",
6
+ "fesm2015": "../../fesm2015/taiga-ui-cdk-pipes-keys.js",
7
+ "typings": "taiga-ui-cdk-pipes-keys.d.ts",
8
+ "sideEffects": false,
9
+ "name": "@taiga-ui/cdk/pipes/keys"
10
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@taiga-ui/cdk/pipes/keys" />
5
+ export * from './index';
@@ -11,6 +11,12 @@
11
11
  "description": "Sets up the project after dependencies have been installed",
12
12
  "factory": "./ng-add/setup-project",
13
13
  "schema": "./ng-add/schema.json"
14
+ },
15
+ "updateToV3": {
16
+ "private": true,
17
+ "description": "Manually run migration to update Taiga to v3.x.x",
18
+ "factory": "./ng-update/index#updateToV3",
19
+ "schema": "./ng-update/schema.json"
14
20
  }
15
21
  }
16
22
  }
@@ -0,0 +1,2 @@
1
+ export declare const ALL_TS_FILES: string;
2
+ export declare const ALL_FILES: string;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ALL_FILES = exports.ALL_TS_FILES = void 0;
4
+ const EXCLUDE_DIRECTORIES = ['scripts', 'dist', 'node_modules'].join('|');
5
+ const EXCLUDE_FILE_PATTERNS = [
6
+ `*__name@dasherize__*`,
7
+ `*.d`, // typings
8
+ ].join('|');
9
+ const FILTERED_PATHS = `!(${EXCLUDE_DIRECTORIES})/**/!(${EXCLUDE_FILE_PATTERNS})`;
10
+ exports.ALL_TS_FILES = `${FILTERED_PATHS}.ts`;
11
+ exports.ALL_FILES = `${FILTERED_PATHS}.{html,ts,less}`;
@@ -0,0 +1 @@
1
+ export * from './file-globs';
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./file-globs"), exports);
@@ -1,3 +1,4 @@
1
- export declare const TAIGA_GLOBAL_STYLE = "node_modules/@taiga-ui/core/styles/taiga-ui-global.less";
1
+ export declare const TAIGA_GLOBAL_OLD_STYLE = "node_modules/@taiga-ui/core/styles/taiga-ui-global.less";
2
+ export declare const TAIGA_GLOBAL_NEW_STYLE = "node_modules/@taiga-ui/styles/taiga-ui-global.less";
2
3
  export declare const TAIGA_THEME_STYLE = "node_modules/@taiga-ui/core/styles/taiga-ui-theme.less";
3
4
  export declare const TAIGA_THEME_FONTS = "node_modules/@taiga-ui/core/styles/taiga-ui-fonts.less";
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TAIGA_THEME_FONTS = exports.TAIGA_THEME_STYLE = exports.TAIGA_GLOBAL_STYLE = void 0;
4
- exports.TAIGA_GLOBAL_STYLE = 'node_modules/@taiga-ui/core/styles/taiga-ui-global.less';
3
+ exports.TAIGA_THEME_FONTS = exports.TAIGA_THEME_STYLE = exports.TAIGA_GLOBAL_NEW_STYLE = exports.TAIGA_GLOBAL_OLD_STYLE = void 0;
4
+ exports.TAIGA_GLOBAL_OLD_STYLE = 'node_modules/@taiga-ui/core/styles/taiga-ui-global.less';
5
+ exports.TAIGA_GLOBAL_NEW_STYLE = 'node_modules/@taiga-ui/styles/taiga-ui-global.less';
5
6
  exports.TAIGA_THEME_STYLE = 'node_modules/@taiga-ui/core/styles/taiga-ui-theme.less';
6
7
  exports.TAIGA_THEME_FONTS = 'node_modules/@taiga-ui/core/styles/taiga-ui-fonts.less';
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DOMPURIFY_TYPES_VERSION = exports.DOMPURIFY_VERSION = exports.NG_DOMPURIFY_VERSION = exports.TAIGA_VERSION = void 0;
4
- const { version } = require('../../../package.json');
5
- exports.TAIGA_VERSION = `^${version}`;
4
+ const version_1 = require("../../../constants/version");
5
+ exports.TAIGA_VERSION = `^${version_1.TUI_VERSION}`;
6
6
  exports.NG_DOMPURIFY_VERSION = '3.0.0';
7
7
  exports.DOMPURIFY_VERSION = '2.2.9';
8
8
  exports.DOMPURIFY_TYPES_VERSION = '2.2.3';
@@ -24,6 +24,12 @@ function addDependencies(tree, options) {
24
24
  version: versions_1.TAIGA_VERSION,
25
25
  });
26
26
  });
27
+ if (options.addGlobalStyles) {
28
+ ng_morph_1.addPackageJsonDependency(tree, {
29
+ name: `@taiga-ui/styles`,
30
+ version: versions_1.TAIGA_VERSION,
31
+ });
32
+ }
27
33
  if (options.addSanitizer) {
28
34
  ng_morph_1.addPackageJsonDependency(tree, {
29
35
  name: '@tinkoff/ng-dompurify',
@@ -1,7 +1,15 @@
1
1
  export interface Schema {
2
2
  readonly project: string;
3
3
  readonly addons: ReadonlyArray<string>;
4
+ readonly addGlobalStyles: boolean;
4
5
  readonly addAlertModule: boolean;
5
6
  readonly addDialogsModule: boolean;
6
7
  readonly addSanitizer: boolean;
8
+ /**
9
+ * @example
10
+ * ```console
11
+ * schematics ./dist/cdk:updateToV3 --allow-private --skip-deep-imports --dry-run false
12
+ * ```
13
+ */
14
+ 'skip-deep-imports'?: boolean;
7
15
  }
@@ -11,6 +11,15 @@
11
11
  "$source": "projectName"
12
12
  }
13
13
  },
14
+ "addGlobalStyles": {
15
+ "description": "Setting up global styles",
16
+ "type": "boolean",
17
+ "default": false,
18
+ "x-prompt": {
19
+ "message": "Do you want to use global Taiga UI classes, such as 'tui-space', 'tui-skeleton', etc?",
20
+ "type": "confirmation"
21
+ }
22
+ },
14
23
  "addDialogsModule": {
15
24
  "description": "Setting up dialog module",
16
25
  "type": "boolean",
@@ -19,9 +19,11 @@ exports.addTaigaIcons = addTaigaIcons;
19
19
  function addTaigaAssetsToAngularJson(options) {
20
20
  return workspace_1.updateWorkspace(workspace => {
21
21
  const project = get_project_1.getProject(options, workspace);
22
- const targetOptions = get_project_target_options_1.getProjectTargetOptions(project, 'build');
23
- const assets = targetOptions.assets;
24
- targetOptions.assets = assets ? [...assets, ICON_ASSETS] : [ICON_ASSETS];
22
+ if (project) {
23
+ const targetOptions = get_project_target_options_1.getProjectTargetOptions(project, 'build');
24
+ const assets = targetOptions.assets;
25
+ targetOptions.assets = assets ? [...assets, ICON_ASSETS] : [ICON_ASSETS];
26
+ }
25
27
  });
26
28
  }
27
29
  exports.addTaigaAssetsToAngularJson = addTaigaAssetsToAngularJson;
@@ -12,6 +12,10 @@ function addTaigaModules(options) {
12
12
  return (tree, context) => tslib_1.__awaiter(this, void 0, void 0, function* () {
13
13
  const workspace = yield workspace_1.getWorkspace(tree);
14
14
  const project = get_project_1.getProject(options, workspace);
15
+ if (!project) {
16
+ context.logger.warn('[WARNING]: Target project not found in current workspace');
17
+ return;
18
+ }
15
19
  const buildOptions = get_project_target_options_1.getProjectTargetOptions(project, 'build');
16
20
  ng_morph_1.setActiveProject(ng_morph_1.createProject(tree, '/', ['**/*.ts', '**/*.json']));
17
21
  const mainModule = ng_morph_1.getMainModule(buildOptions.main);
@@ -5,9 +5,12 @@ const tslib_1 = require("tslib");
5
5
  const add_styles_1 = require("../../utils/add-styles");
6
6
  const taiga_styles_1 = require("../../constants/taiga-styles");
7
7
  function addTaigaStyles(options) {
8
- return (_) => tslib_1.__awaiter(this, void 0, void 0, function* () {
9
- const taigaStyles = [taiga_styles_1.TAIGA_THEME_STYLE, taiga_styles_1.TAIGA_THEME_FONTS];
10
- return add_styles_1.addStylesToAngularJson(options, taigaStyles);
8
+ return (_, context) => tslib_1.__awaiter(this, void 0, void 0, function* () {
9
+ const taigaLocalStyles = [taiga_styles_1.TAIGA_THEME_STYLE, taiga_styles_1.TAIGA_THEME_FONTS];
10
+ const taigaStyles = options.addGlobalStyles
11
+ ? [...taigaLocalStyles, taiga_styles_1.TAIGA_GLOBAL_NEW_STYLE]
12
+ : taigaLocalStyles;
13
+ return add_styles_1.addStylesToAngularJson(options, context, taigaStyles);
11
14
  });
12
15
  }
13
16
  exports.addTaigaStyles = addTaigaStyles;
@@ -10,6 +10,9 @@ function wrapWithTuiRootComponent(options) {
10
10
  return (tree, context) => tslib_1.__awaiter(this, void 0, void 0, function* () {
11
11
  const workspace = yield workspace_1.getWorkspace(tree);
12
12
  const project = get_project_1.getProject(options, workspace);
13
+ if (!project) {
14
+ return;
15
+ }
13
16
  const buildOptions = get_project_target_options_1.getProjectTargetOptions(project, 'build');
14
17
  const appTemplatePath = getAppTemplatePath(tree, buildOptions.main);
15
18
  if (!appTemplatePath) {
@@ -0,0 +1,82 @@
1
+ export declare const DEPRECATED_BREAKPOINTS: readonly [{
2
+ readonly from: "@media-retina";
3
+ readonly to: "@tui-media-retina";
4
+ }, {
5
+ readonly from: "@media-retina-mobile";
6
+ readonly to: "@tui-media-retina-mobile";
7
+ }, {
8
+ readonly from: "@media-retina-tablet";
9
+ readonly to: "@tui-media-retina-tablet";
10
+ }, {
11
+ readonly from: "@media-retina-desktop";
12
+ readonly to: "@tui-media-retina-desktop";
13
+ }, {
14
+ readonly from: "@mobile-m";
15
+ readonly to: "@tui-mobile";
16
+ }, {
17
+ readonly from: "@mobile-m-min";
18
+ readonly to: "@tui-mobile-min";
19
+ }, {
20
+ readonly from: "@mobile-m-interval";
21
+ readonly to: "@tui-mobile-interval";
22
+ }, {
23
+ readonly from: "@tablet-lg";
24
+ readonly to: "@tui-tablet";
25
+ }, {
26
+ readonly from: "@tablet-lg-min";
27
+ readonly to: "@tui-tablet-min";
28
+ }, {
29
+ readonly from: "@tablet-lg-interval";
30
+ readonly to: "@tui-tablet-interval";
31
+ }, {
32
+ readonly from: "@desktop-s";
33
+ readonly to: "@tui-desktop";
34
+ }, {
35
+ readonly from: "@desktop-s-min";
36
+ readonly to: "@tui-desktop-min";
37
+ }, {
38
+ readonly from: "@desktop-s-interval";
39
+ readonly to: "@tui-desktop-interval";
40
+ }, {
41
+ readonly from: "@desktop-m-min";
42
+ readonly to: "@tui-desktop-lg-min";
43
+ }, {
44
+ readonly from: "@mobile";
45
+ readonly to: "@tui-mobile";
46
+ }, {
47
+ readonly from: "@mobile-min";
48
+ readonly to: "@tui-mobile-min";
49
+ }, {
50
+ readonly from: "@mobile-interval";
51
+ readonly to: "@tui-mobile-interval";
52
+ }, {
53
+ readonly from: "@tablet-s";
54
+ readonly to: "@tui-mobile";
55
+ }, {
56
+ readonly from: "@tablet-s-min";
57
+ readonly to: "@tui-mobile-min";
58
+ }, {
59
+ readonly from: "@tablet-s-interval";
60
+ readonly to: "@tui-mobile-interval";
61
+ }, {
62
+ readonly from: "@tablet";
63
+ readonly to: "@tui-tablet";
64
+ }, {
65
+ readonly from: "@tablet-min";
66
+ readonly to: "@tui-tablet-min";
67
+ }, {
68
+ readonly from: "@tablet-interval";
69
+ readonly to: "@tui-tablet-interval";
70
+ }, {
71
+ readonly from: "@desktop";
72
+ readonly to: "@tui-desktop";
73
+ }, {
74
+ readonly from: "@desktop-min";
75
+ readonly to: "@tui-desktop-min";
76
+ }, {
77
+ readonly from: "@desktop-interval";
78
+ readonly to: "@tui-desktop-interval";
79
+ }, {
80
+ readonly from: "@desktop-lg-min";
81
+ readonly to: "@tui-desktop-lg-min";
82
+ }];
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DEPRECATED_BREAKPOINTS = void 0;
4
+ exports.DEPRECATED_BREAKPOINTS = [
5
+ // all previously actual breakpoints
6
+ { from: `@media-retina`, to: `@tui-media-retina` },
7
+ { from: `@media-retina-mobile`, to: `@tui-media-retina-mobile` },
8
+ { from: `@media-retina-tablet`, to: `@tui-media-retina-tablet` },
9
+ { from: `@media-retina-desktop`, to: `@tui-media-retina-desktop` },
10
+ { from: `@mobile-m`, to: `@tui-mobile` },
11
+ { from: `@mobile-m-min`, to: `@tui-mobile-min` },
12
+ { from: `@mobile-m-interval`, to: `@tui-mobile-interval` },
13
+ { from: `@tablet-lg`, to: `@tui-tablet` },
14
+ { from: `@tablet-lg-min`, to: `@tui-tablet-min` },
15
+ { from: `@tablet-lg-interval`, to: `@tui-tablet-interval` },
16
+ { from: `@desktop-s`, to: `@tui-desktop` },
17
+ { from: `@desktop-s-min`, to: `@tui-desktop-min` },
18
+ { from: `@desktop-s-interval`, to: `@tui-desktop-interval` },
19
+ { from: `@desktop-m-min`, to: `@tui-desktop-lg-min` },
20
+ // legacy breakpoints
21
+ { from: `@mobile`, to: `@tui-mobile` },
22
+ { from: `@mobile-min`, to: `@tui-mobile-min` },
23
+ { from: `@mobile-interval`, to: `@tui-mobile-interval` },
24
+ { from: `@tablet-s`, to: `@tui-mobile` },
25
+ { from: `@tablet-s-min`, to: `@tui-mobile-min` },
26
+ { from: `@tablet-s-interval`, to: `@tui-mobile-interval` },
27
+ { from: `@tablet`, to: `@tui-tablet` },
28
+ { from: `@tablet-min`, to: `@tui-tablet-min` },
29
+ { from: `@tablet-interval`, to: `@tui-tablet-interval` },
30
+ { from: `@desktop`, to: `@tui-desktop` },
31
+ { from: `@desktop-min`, to: `@tui-desktop-min` },
32
+ { from: `@desktop-interval`, to: `@tui-desktop-interval` },
33
+ { from: `@desktop-lg-min`, to: `@tui-desktop-lg-min` },
34
+ ];
@@ -1,7 +1,7 @@
1
1
  export interface ReplacementConst {
2
2
  readonly from: {
3
3
  readonly name: string;
4
- readonly moduleSpecifier?: string;
4
+ readonly moduleSpecifier?: string | string[];
5
5
  };
6
6
  readonly to: {
7
7
  readonly name: string;