@taiga-ui/cdk 2.43.0 → 2.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (445) hide show
  1. package/abstract/dialog.service.d.ts +2 -2
  2. package/abstract/taiga-ui-cdk-abstract.metadata.json +1 -1
  3. package/bundles/taiga-ui-cdk-abstract.umd.js +1 -1
  4. package/bundles/taiga-ui-cdk-abstract.umd.js.map +1 -1
  5. package/bundles/taiga-ui-cdk-abstract.umd.min.js.map +1 -1
  6. package/bundles/taiga-ui-cdk-classes.umd.js +4 -2
  7. package/bundles/taiga-ui-cdk-classes.umd.js.map +1 -1
  8. package/bundles/taiga-ui-cdk-classes.umd.min.js +1 -1
  9. package/bundles/taiga-ui-cdk-classes.umd.min.js.map +1 -1
  10. package/bundles/taiga-ui-cdk-coercion.umd.js +3 -1
  11. package/bundles/taiga-ui-cdk-coercion.umd.js.map +1 -1
  12. package/bundles/taiga-ui-cdk-coercion.umd.min.js.map +1 -1
  13. package/bundles/taiga-ui-cdk-components-alert-host.umd.js.map +1 -1
  14. package/bundles/taiga-ui-cdk-components-alert-host.umd.min.js.map +1 -1
  15. package/bundles/taiga-ui-cdk-components-dialog-host.umd.js +4 -4
  16. package/bundles/taiga-ui-cdk-components-dialog-host.umd.js.map +1 -1
  17. package/bundles/taiga-ui-cdk-components-dialog-host.umd.min.js +2 -2
  18. package/bundles/taiga-ui-cdk-components-dialog-host.umd.min.js.map +1 -1
  19. package/bundles/taiga-ui-cdk-components-portal-host.umd.js +1 -1
  20. package/bundles/taiga-ui-cdk-components-portal-host.umd.js.map +1 -1
  21. package/bundles/taiga-ui-cdk-components-portal-host.umd.min.js.map +1 -1
  22. package/bundles/taiga-ui-cdk-constants.umd.js.map +1 -1
  23. package/bundles/taiga-ui-cdk-constants.umd.min.js.map +1 -1
  24. package/bundles/taiga-ui-cdk-date-time.umd.js +40 -12
  25. package/bundles/taiga-ui-cdk-date-time.umd.js.map +1 -1
  26. package/bundles/taiga-ui-cdk-date-time.umd.min.js +1 -1
  27. package/bundles/taiga-ui-cdk-date-time.umd.min.js.map +1 -1
  28. package/bundles/taiga-ui-cdk-decorators.umd.js +0 -2
  29. package/bundles/taiga-ui-cdk-decorators.umd.js.map +1 -1
  30. package/bundles/taiga-ui-cdk-decorators.umd.min.js.map +1 -1
  31. package/bundles/taiga-ui-cdk-directives-active-zone.umd.js.map +1 -1
  32. package/bundles/taiga-ui-cdk-directives-active-zone.umd.min.js.map +1 -1
  33. package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js +132 -50
  34. package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js.map +1 -1
  35. package/bundles/taiga-ui-cdk-directives-auto-focus.umd.min.js +2 -2
  36. package/bundles/taiga-ui-cdk-directives-auto-focus.umd.min.js.map +1 -1
  37. package/bundles/taiga-ui-cdk-directives-autofilled.umd.js +41 -22
  38. package/bundles/taiga-ui-cdk-directives-autofilled.umd.js.map +1 -1
  39. package/bundles/taiga-ui-cdk-directives-autofilled.umd.min.js +2 -2
  40. package/bundles/taiga-ui-cdk-directives-autofilled.umd.min.js.map +1 -1
  41. package/bundles/taiga-ui-cdk-directives-checked.umd.js.map +1 -1
  42. package/bundles/taiga-ui-cdk-directives-checked.umd.min.js.map +1 -1
  43. package/bundles/taiga-ui-cdk-directives-copy-processor.umd.js.map +1 -1
  44. package/bundles/taiga-ui-cdk-directives-copy-processor.umd.min.js.map +1 -1
  45. package/bundles/taiga-ui-cdk-directives-focus-trap.umd.js +3 -1
  46. package/bundles/taiga-ui-cdk-directives-focus-trap.umd.js.map +1 -1
  47. package/bundles/taiga-ui-cdk-directives-focus-trap.umd.min.js.map +1 -1
  48. package/bundles/taiga-ui-cdk-directives-for.umd.js.map +1 -1
  49. package/bundles/taiga-ui-cdk-directives-for.umd.min.js.map +1 -1
  50. package/bundles/taiga-ui-cdk-directives-high-dpi.umd.js.map +1 -1
  51. package/bundles/taiga-ui-cdk-directives-high-dpi.umd.min.js.map +1 -1
  52. package/bundles/taiga-ui-cdk-directives-item.umd.js +1 -1
  53. package/bundles/taiga-ui-cdk-directives-item.umd.js.map +1 -1
  54. package/bundles/taiga-ui-cdk-directives-item.umd.min.js.map +1 -1
  55. package/bundles/taiga-ui-cdk-directives-media.umd.js +1 -0
  56. package/bundles/taiga-ui-cdk-directives-media.umd.js.map +1 -1
  57. package/bundles/taiga-ui-cdk-directives-media.umd.min.js.map +1 -1
  58. package/bundles/taiga-ui-cdk-directives-overscroll.umd.js.map +1 -1
  59. package/bundles/taiga-ui-cdk-directives-overscroll.umd.min.js.map +1 -1
  60. package/bundles/taiga-ui-cdk-directives-portal.umd.js +281 -0
  61. package/bundles/taiga-ui-cdk-directives-portal.umd.js.map +1 -0
  62. package/bundles/taiga-ui-cdk-directives-portal.umd.min.js +16 -0
  63. package/bundles/taiga-ui-cdk-directives-portal.umd.min.js.map +1 -0
  64. package/bundles/taiga-ui-cdk-directives-repeat-times.umd.js.map +1 -1
  65. package/bundles/taiga-ui-cdk-directives-repeat-times.umd.min.js.map +1 -1
  66. package/bundles/taiga-ui-cdk-directives-validator.umd.js.map +1 -1
  67. package/bundles/taiga-ui-cdk-directives-validator.umd.min.js.map +1 -1
  68. package/bundles/taiga-ui-cdk-directives.umd.js +12 -4
  69. package/bundles/taiga-ui-cdk-directives.umd.js.map +1 -1
  70. package/bundles/taiga-ui-cdk-directives.umd.min.js +1 -1
  71. package/bundles/taiga-ui-cdk-observables.umd.js +1 -1
  72. package/bundles/taiga-ui-cdk-observables.umd.js.map +1 -1
  73. package/bundles/taiga-ui-cdk-observables.umd.min.js.map +1 -1
  74. package/bundles/taiga-ui-cdk-services.umd.js.map +1 -1
  75. package/bundles/taiga-ui-cdk-services.umd.min.js.map +1 -1
  76. package/bundles/taiga-ui-cdk-tokens.umd.js +5 -7
  77. package/bundles/taiga-ui-cdk-tokens.umd.js.map +1 -1
  78. package/bundles/taiga-ui-cdk-tokens.umd.min.js +1 -1
  79. package/bundles/taiga-ui-cdk-tokens.umd.min.js.map +1 -1
  80. package/bundles/taiga-ui-cdk-utils-browser.umd.js.map +1 -1
  81. package/bundles/taiga-ui-cdk-utils-browser.umd.min.js.map +1 -1
  82. package/bundles/taiga-ui-cdk-utils-focus.umd.js +2 -0
  83. package/bundles/taiga-ui-cdk-utils-focus.umd.js.map +1 -1
  84. package/bundles/taiga-ui-cdk-utils-focus.umd.min.js.map +1 -1
  85. package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.js.map +1 -1
  86. package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.min.js.map +1 -1
  87. package/bundles/taiga-ui-cdk-utils-os.umd.js +25 -0
  88. package/bundles/taiga-ui-cdk-utils-os.umd.js.map +1 -0
  89. package/bundles/taiga-ui-cdk-utils-os.umd.min.js +2 -0
  90. package/bundles/taiga-ui-cdk-utils-os.umd.min.js.map +1 -0
  91. package/bundles/taiga-ui-cdk-utils-svg.umd.js +259 -0
  92. package/bundles/taiga-ui-cdk-utils-svg.umd.js.map +1 -0
  93. package/bundles/taiga-ui-cdk-utils-svg.umd.min.js +16 -0
  94. package/bundles/taiga-ui-cdk-utils-svg.umd.min.js.map +1 -0
  95. package/bundles/taiga-ui-cdk-utils.umd.js +20 -4
  96. package/bundles/taiga-ui-cdk-utils.umd.js.map +1 -1
  97. package/bundles/taiga-ui-cdk-utils.umd.min.js +1 -1
  98. package/classes/assert.d.ts +1 -1
  99. package/classes/validation-error.d.ts +1 -1
  100. package/coercion/taiga-ui-cdk-coercion.metadata.json +1 -1
  101. package/components/alert-host/alert-host.component.d.ts +2 -2
  102. package/components/alert-host/taiga-ui-cdk-components-alert-host.metadata.json +1 -1
  103. package/components/dialog-host/dialog-host.component.d.ts +1 -1
  104. package/components/dialog-host/taiga-ui-cdk-components-dialog-host.metadata.json +1 -1
  105. package/components/portal-host/portal.service.d.ts +1 -1
  106. package/constants/always-false-handler.d.ts +1 -1
  107. package/constants/always-true-handler.d.ts +1 -1
  108. package/constants/empty.d.ts +1 -1
  109. package/constants/taiga-ui-cdk-constants.metadata.json +1 -1
  110. package/date-time/date-fillers.d.ts +0 -2
  111. package/date-time/day-range.d.ts +1 -2
  112. package/date-time/day.d.ts +4 -1
  113. package/date-time/month-range.d.ts +0 -1
  114. package/date-time/month.d.ts +1 -1
  115. package/date-time/taiga-ui-cdk-date-time.metadata.json +1 -1
  116. package/date-time/time.d.ts +7 -0
  117. package/date-time/year.d.ts +7 -0
  118. package/decorators/default-prop.d.ts +1 -3
  119. package/decorators/pure.d.ts +1 -1
  120. package/decorators/taiga-ui-cdk-decorators.metadata.json +1 -1
  121. package/directives/auto-focus/autofocus.directive.d.ts +4 -13
  122. package/directives/auto-focus/autofocus.options.d.ts +13 -0
  123. package/directives/auto-focus/handlers/abstract.handler.d.ts +11 -0
  124. package/directives/auto-focus/handlers/default.handler.d.ts +9 -0
  125. package/directives/auto-focus/handlers/ios.handler.d.ts +10 -0
  126. package/directives/auto-focus/index.d.ts +4 -0
  127. package/directives/auto-focus/taiga-ui-cdk-directives-auto-focus.metadata.json +1 -1
  128. package/directives/autofilled/autofilled-style.component.d.ts +2 -0
  129. package/directives/autofilled/autofilled.directive.d.ts +5 -4
  130. package/directives/autofilled/index.d.ts +1 -0
  131. package/directives/autofilled/taiga-ui-cdk-directives-autofilled.metadata.json +1 -1
  132. package/directives/focus-trap/taiga-ui-cdk-directives-focus-trap.metadata.json +1 -1
  133. package/directives/for/for.directive.d.ts +1 -1
  134. package/directives/high-dpi/high-dpi.directive.d.ts +1 -1
  135. package/directives/high-dpi/taiga-ui-cdk-directives-high-dpi.metadata.json +1 -1
  136. package/directives/index.d.ts +1 -0
  137. package/directives/item/item.directive.d.ts +1 -1
  138. package/directives/media/taiga-ui-cdk-directives-media.metadata.json +1 -1
  139. package/directives/portal/index.d.ts +2 -0
  140. package/directives/portal/package.json +13 -0
  141. package/directives/portal/portal.directive.d.ts +10 -0
  142. package/directives/portal/portal.module.d.ts +2 -0
  143. package/directives/portal/taiga-ui-cdk-directives-portal.d.ts +4 -0
  144. package/directives/portal/taiga-ui-cdk-directives-portal.metadata.json +1 -0
  145. package/directives/taiga-ui-cdk-directives.metadata.json +1 -1
  146. package/directives/validator/validator.directive.d.ts +1 -1
  147. package/esm2015/abstract/control.js +1 -1
  148. package/esm2015/abstract/controller.js +1 -1
  149. package/esm2015/abstract/dialog.service.js +1 -1
  150. package/esm2015/abstract/interactive.js +2 -2
  151. package/esm2015/abstract/multiple-control.js +1 -1
  152. package/esm2015/abstract/portal-service.js +1 -1
  153. package/esm2015/abstract/theme-switcher.js +1 -1
  154. package/esm2015/classes/assert.js +5 -3
  155. package/esm2015/classes/validation-error.js +1 -1
  156. package/esm2015/coercion/coerce-boolean-property.js +4 -2
  157. package/esm2015/components/alert-host/alert-host.component.js +1 -1
  158. package/esm2015/components/dialog-host/dialog-host.component.js +5 -5
  159. package/esm2015/components/portal-host/portal.service.js +2 -2
  160. package/esm2015/constants/always-false-handler.js +1 -1
  161. package/esm2015/constants/always-true-handler.js +1 -1
  162. package/esm2015/constants/empty.js +1 -1
  163. package/esm2015/constants/matcher.js +1 -1
  164. package/esm2015/date-time/date-fillers.js +1 -3
  165. package/esm2015/date-time/date-separator.js +1 -1
  166. package/esm2015/date-time/day-range.js +2 -2
  167. package/esm2015/date-time/day.js +12 -3
  168. package/esm2015/date-time/month-range.js +1 -2
  169. package/esm2015/date-time/month.js +5 -3
  170. package/esm2015/date-time/time.js +12 -1
  171. package/esm2015/date-time/year.js +13 -2
  172. package/esm2015/decorators/default-prop.js +1 -3
  173. package/esm2015/decorators/pure.js +1 -1
  174. package/esm2015/decorators/required-setter.js +1 -1
  175. package/esm2015/directives/active-zone/active-zone.directive.js +1 -1
  176. package/esm2015/directives/auto-focus/autofocus.directive.js +11 -87
  177. package/esm2015/directives/auto-focus/autofocus.options.js +27 -0
  178. package/esm2015/directives/auto-focus/handlers/abstract.handler.js +25 -0
  179. package/esm2015/directives/auto-focus/handlers/default.handler.js +39 -0
  180. package/esm2015/directives/auto-focus/handlers/ios.handler.js +70 -0
  181. package/esm2015/directives/auto-focus/index.js +5 -1
  182. package/esm2015/directives/autofilled/autofilled-style.component.js +13 -0
  183. package/esm2015/directives/autofilled/autofilled.directive.js +23 -37
  184. package/esm2015/directives/autofilled/autofilled.module.js +4 -2
  185. package/esm2015/directives/autofilled/index.js +2 -1
  186. package/esm2015/directives/checked/checked.directive.js +1 -1
  187. package/esm2015/directives/copy-processor/copy-processor.directive.js +1 -1
  188. package/esm2015/directives/focus-trap/focus-trap.directive.js +4 -2
  189. package/esm2015/directives/for/for.directive.js +1 -1
  190. package/esm2015/directives/high-dpi/high-dpi.directive.js +1 -1
  191. package/esm2015/directives/index.js +2 -1
  192. package/esm2015/directives/item/item.directive.js +2 -2
  193. package/esm2015/directives/media/media.directive.js +2 -1
  194. package/esm2015/directives/overscroll/overscroll.directive.js +1 -1
  195. package/esm2015/directives/portal/index.js +3 -0
  196. package/esm2015/directives/portal/portal.directive.js +36 -0
  197. package/esm2015/directives/portal/portal.module.js +13 -0
  198. package/esm2015/directives/portal/taiga-ui-cdk-directives-portal.js +5 -0
  199. package/esm2015/directives/repeat-times/repeat-times.directive.js +1 -1
  200. package/esm2015/directives/validator/validator.directive.js +1 -1
  201. package/esm2015/interfaces/alert-context.js +1 -0
  202. package/esm2015/interfaces/index.js +1 -1
  203. package/esm2015/observables/replay-control-value-changes.js +2 -2
  204. package/esm2015/services/destroy.service.js +1 -1
  205. package/esm2015/services/directive-styles.service.js +1 -1
  206. package/esm2015/services/parents-scroll.service.js +1 -1
  207. package/esm2015/tokens/index.js +2 -1
  208. package/esm2015/tokens/is-apple.js +5 -0
  209. package/esm2015/tokens/is-ios.js +4 -6
  210. package/esm2015/tokens/is-mobile.js +2 -2
  211. package/esm2015/utils/browser/index.js +2 -2
  212. package/esm2015/utils/browser/{is-IE.js → is-ie.js} +1 -1
  213. package/esm2015/utils/focus/blur-native-focused.js +1 -1
  214. package/esm2015/utils/focus/move-focus.js +1 -1
  215. package/esm2015/utils/focus/set-native-focused.js +3 -1
  216. package/esm2015/utils/focus/set-native-mouse-focused.js +1 -1
  217. package/esm2015/utils/index.js +3 -1
  218. package/esm2015/utils/miscellaneous/mark-control-as-touched-and-validate.js +1 -1
  219. package/esm2015/utils/os/index.js +3 -0
  220. package/esm2015/utils/os/is-apple.js +6 -0
  221. package/esm2015/utils/os/is-ios.js +7 -0
  222. package/esm2015/utils/os/taiga-ui-cdk-utils-os.js +5 -0
  223. package/esm2015/utils/svg/index.js +2 -0
  224. package/esm2015/utils/svg/svg-linear-gradient-processor.js +26 -0
  225. package/esm2015/utils/svg/taiga-ui-cdk-utils-svg.js +5 -0
  226. package/esm5/abstract/control.js +1 -1
  227. package/esm5/abstract/controller.js +1 -1
  228. package/esm5/abstract/dialog.service.js +1 -1
  229. package/esm5/abstract/interactive.js +2 -2
  230. package/esm5/abstract/multiple-control.js +1 -1
  231. package/esm5/abstract/portal-service.js +1 -1
  232. package/esm5/abstract/theme-switcher.js +1 -1
  233. package/esm5/classes/assert.js +5 -3
  234. package/esm5/classes/validation-error.js +1 -1
  235. package/esm5/coercion/coerce-boolean-property.js +4 -2
  236. package/esm5/components/alert-host/alert-host.component.js +1 -1
  237. package/esm5/components/dialog-host/dialog-host.component.js +5 -5
  238. package/esm5/components/portal-host/portal.service.js +2 -2
  239. package/esm5/constants/always-false-handler.js +1 -1
  240. package/esm5/constants/always-true-handler.js +1 -1
  241. package/esm5/constants/empty.js +1 -1
  242. package/esm5/constants/matcher.js +1 -1
  243. package/esm5/date-time/date-fillers.js +1 -3
  244. package/esm5/date-time/date-separator.js +2 -4
  245. package/esm5/date-time/day-range.js +2 -2
  246. package/esm5/date-time/day.js +12 -3
  247. package/esm5/date-time/month-range.js +1 -2
  248. package/esm5/date-time/month.js +5 -3
  249. package/esm5/date-time/time.js +12 -1
  250. package/esm5/date-time/year.js +13 -2
  251. package/esm5/decorators/default-prop.js +1 -3
  252. package/esm5/decorators/pure.js +1 -1
  253. package/esm5/decorators/required-setter.js +1 -1
  254. package/esm5/directives/active-zone/active-zone.directive.js +1 -1
  255. package/esm5/directives/auto-focus/autofocus.directive.js +11 -97
  256. package/esm5/directives/auto-focus/autofocus.options.js +27 -0
  257. package/esm5/directives/auto-focus/handlers/abstract.handler.js +34 -0
  258. package/esm5/directives/auto-focus/handlers/default.handler.js +43 -0
  259. package/esm5/directives/auto-focus/handlers/ios.handler.js +75 -0
  260. package/esm5/directives/auto-focus/index.js +5 -1
  261. package/esm5/directives/autofilled/autofilled-style.component.js +16 -0
  262. package/esm5/directives/autofilled/autofilled.directive.js +24 -21
  263. package/esm5/directives/autofilled/autofilled.module.js +4 -2
  264. package/esm5/directives/autofilled/index.js +2 -1
  265. package/esm5/directives/checked/checked.directive.js +1 -1
  266. package/esm5/directives/copy-processor/copy-processor.directive.js +1 -1
  267. package/esm5/directives/focus-trap/focus-trap.directive.js +4 -2
  268. package/esm5/directives/for/for.directive.js +1 -1
  269. package/esm5/directives/high-dpi/high-dpi.directive.js +1 -1
  270. package/esm5/directives/index.js +2 -1
  271. package/esm5/directives/item/item.directive.js +2 -2
  272. package/esm5/directives/media/media.directive.js +2 -1
  273. package/esm5/directives/overscroll/overscroll.directive.js +1 -1
  274. package/esm5/directives/portal/index.js +3 -0
  275. package/esm5/directives/portal/portal.directive.js +41 -0
  276. package/esm5/directives/portal/portal.module.js +16 -0
  277. package/esm5/directives/portal/taiga-ui-cdk-directives-portal.js +5 -0
  278. package/esm5/directives/repeat-times/repeat-times.directive.js +1 -1
  279. package/esm5/directives/validator/validator.directive.js +1 -1
  280. package/esm5/interfaces/alert-context.js +1 -0
  281. package/esm5/interfaces/index.js +1 -1
  282. package/esm5/observables/replay-control-value-changes.js +2 -2
  283. package/esm5/services/destroy.service.js +1 -1
  284. package/esm5/services/directive-styles.service.js +1 -1
  285. package/esm5/services/parents-scroll.service.js +1 -1
  286. package/esm5/tokens/index.js +2 -1
  287. package/esm5/tokens/is-apple.js +5 -0
  288. package/esm5/tokens/is-ios.js +4 -8
  289. package/esm5/tokens/is-mobile.js +2 -2
  290. package/esm5/utils/browser/index.js +2 -2
  291. package/esm5/utils/browser/{is-IE.js → is-ie.js} +1 -1
  292. package/esm5/utils/focus/blur-native-focused.js +1 -1
  293. package/esm5/utils/focus/move-focus.js +1 -1
  294. package/esm5/utils/focus/set-native-focused.js +3 -1
  295. package/esm5/utils/focus/set-native-mouse-focused.js +1 -1
  296. package/esm5/utils/index.js +3 -1
  297. package/esm5/utils/miscellaneous/mark-control-as-touched-and-validate.js +1 -1
  298. package/esm5/utils/os/index.js +3 -0
  299. package/esm5/utils/os/is-apple.js +6 -0
  300. package/esm5/utils/os/is-ios.js +7 -0
  301. package/esm5/utils/os/taiga-ui-cdk-utils-os.js +5 -0
  302. package/esm5/utils/svg/index.js +2 -0
  303. package/esm5/utils/svg/svg-linear-gradient-processor.js +29 -0
  304. package/esm5/utils/svg/taiga-ui-cdk-utils-svg.js +5 -0
  305. package/fesm2015/taiga-ui-cdk-abstract.js +1 -1
  306. package/fesm2015/taiga-ui-cdk-abstract.js.map +1 -1
  307. package/fesm2015/taiga-ui-cdk-classes.js +4 -2
  308. package/fesm2015/taiga-ui-cdk-classes.js.map +1 -1
  309. package/fesm2015/taiga-ui-cdk-coercion.js +3 -1
  310. package/fesm2015/taiga-ui-cdk-coercion.js.map +1 -1
  311. package/fesm2015/taiga-ui-cdk-components-alert-host.js.map +1 -1
  312. package/fesm2015/taiga-ui-cdk-components-dialog-host.js +4 -4
  313. package/fesm2015/taiga-ui-cdk-components-dialog-host.js.map +1 -1
  314. package/fesm2015/taiga-ui-cdk-components-portal-host.js +1 -1
  315. package/fesm2015/taiga-ui-cdk-components-portal-host.js.map +1 -1
  316. package/fesm2015/taiga-ui-cdk-constants.js.map +1 -1
  317. package/fesm2015/taiga-ui-cdk-date-time.js +39 -9
  318. package/fesm2015/taiga-ui-cdk-date-time.js.map +1 -1
  319. package/fesm2015/taiga-ui-cdk-decorators.js +0 -2
  320. package/fesm2015/taiga-ui-cdk-decorators.js.map +1 -1
  321. package/fesm2015/taiga-ui-cdk-directives-active-zone.js.map +1 -1
  322. package/fesm2015/taiga-ui-cdk-directives-auto-focus.js +113 -46
  323. package/fesm2015/taiga-ui-cdk-directives-auto-focus.js.map +1 -1
  324. package/fesm2015/taiga-ui-cdk-directives-autofilled.js +33 -37
  325. package/fesm2015/taiga-ui-cdk-directives-autofilled.js.map +1 -1
  326. package/fesm2015/taiga-ui-cdk-directives-checked.js.map +1 -1
  327. package/fesm2015/taiga-ui-cdk-directives-copy-processor.js.map +1 -1
  328. package/fesm2015/taiga-ui-cdk-directives-focus-trap.js +3 -1
  329. package/fesm2015/taiga-ui-cdk-directives-focus-trap.js.map +1 -1
  330. package/fesm2015/taiga-ui-cdk-directives-for.js.map +1 -1
  331. package/fesm2015/taiga-ui-cdk-directives-high-dpi.js.map +1 -1
  332. package/fesm2015/taiga-ui-cdk-directives-item.js +1 -1
  333. package/fesm2015/taiga-ui-cdk-directives-item.js.map +1 -1
  334. package/fesm2015/taiga-ui-cdk-directives-media.js +1 -0
  335. package/fesm2015/taiga-ui-cdk-directives-media.js.map +1 -1
  336. package/fesm2015/taiga-ui-cdk-directives-overscroll.js.map +1 -1
  337. package/fesm2015/taiga-ui-cdk-directives-portal.js +51 -0
  338. package/fesm2015/taiga-ui-cdk-directives-portal.js.map +1 -0
  339. package/fesm2015/taiga-ui-cdk-directives-repeat-times.js.map +1 -1
  340. package/fesm2015/taiga-ui-cdk-directives-validator.js.map +1 -1
  341. package/fesm2015/taiga-ui-cdk-directives.js +1 -0
  342. package/fesm2015/taiga-ui-cdk-directives.js.map +1 -1
  343. package/fesm2015/taiga-ui-cdk-observables.js +1 -1
  344. package/fesm2015/taiga-ui-cdk-observables.js.map +1 -1
  345. package/fesm2015/taiga-ui-cdk-services.js.map +1 -1
  346. package/fesm2015/taiga-ui-cdk-tokens.js +7 -8
  347. package/fesm2015/taiga-ui-cdk-tokens.js.map +1 -1
  348. package/fesm2015/taiga-ui-cdk-utils-browser.js.map +1 -1
  349. package/fesm2015/taiga-ui-cdk-utils-focus.js +2 -0
  350. package/fesm2015/taiga-ui-cdk-utils-focus.js.map +1 -1
  351. package/fesm2015/taiga-ui-cdk-utils-miscellaneous.js.map +1 -1
  352. package/fesm2015/taiga-ui-cdk-utils-os.js +18 -0
  353. package/fesm2015/taiga-ui-cdk-utils-os.js.map +1 -0
  354. package/fesm2015/taiga-ui-cdk-utils-svg.js +32 -0
  355. package/fesm2015/taiga-ui-cdk-utils-svg.js.map +1 -0
  356. package/fesm2015/taiga-ui-cdk-utils.js +2 -0
  357. package/fesm2015/taiga-ui-cdk-utils.js.map +1 -1
  358. package/fesm5/taiga-ui-cdk-abstract.js +1 -1
  359. package/fesm5/taiga-ui-cdk-abstract.js.map +1 -1
  360. package/fesm5/taiga-ui-cdk-classes.js +4 -2
  361. package/fesm5/taiga-ui-cdk-classes.js.map +1 -1
  362. package/fesm5/taiga-ui-cdk-coercion.js +3 -1
  363. package/fesm5/taiga-ui-cdk-coercion.js.map +1 -1
  364. package/fesm5/taiga-ui-cdk-components-alert-host.js.map +1 -1
  365. package/fesm5/taiga-ui-cdk-components-dialog-host.js +4 -4
  366. package/fesm5/taiga-ui-cdk-components-dialog-host.js.map +1 -1
  367. package/fesm5/taiga-ui-cdk-components-portal-host.js +1 -1
  368. package/fesm5/taiga-ui-cdk-components-portal-host.js.map +1 -1
  369. package/fesm5/taiga-ui-cdk-constants.js.map +1 -1
  370. package/fesm5/taiga-ui-cdk-date-time.js +40 -12
  371. package/fesm5/taiga-ui-cdk-date-time.js.map +1 -1
  372. package/fesm5/taiga-ui-cdk-decorators.js +0 -2
  373. package/fesm5/taiga-ui-cdk-decorators.js.map +1 -1
  374. package/fesm5/taiga-ui-cdk-directives-active-zone.js.map +1 -1
  375. package/fesm5/taiga-ui-cdk-directives-auto-focus.js +126 -51
  376. package/fesm5/taiga-ui-cdk-directives-auto-focus.js.map +1 -1
  377. package/fesm5/taiga-ui-cdk-directives-autofilled.js +38 -22
  378. package/fesm5/taiga-ui-cdk-directives-autofilled.js.map +1 -1
  379. package/fesm5/taiga-ui-cdk-directives-checked.js.map +1 -1
  380. package/fesm5/taiga-ui-cdk-directives-copy-processor.js.map +1 -1
  381. package/fesm5/taiga-ui-cdk-directives-focus-trap.js +3 -1
  382. package/fesm5/taiga-ui-cdk-directives-focus-trap.js.map +1 -1
  383. package/fesm5/taiga-ui-cdk-directives-for.js.map +1 -1
  384. package/fesm5/taiga-ui-cdk-directives-high-dpi.js.map +1 -1
  385. package/fesm5/taiga-ui-cdk-directives-item.js +1 -1
  386. package/fesm5/taiga-ui-cdk-directives-item.js.map +1 -1
  387. package/fesm5/taiga-ui-cdk-directives-media.js +1 -0
  388. package/fesm5/taiga-ui-cdk-directives-media.js.map +1 -1
  389. package/fesm5/taiga-ui-cdk-directives-overscroll.js.map +1 -1
  390. package/fesm5/taiga-ui-cdk-directives-portal.js +59 -0
  391. package/fesm5/taiga-ui-cdk-directives-portal.js.map +1 -0
  392. package/fesm5/taiga-ui-cdk-directives-repeat-times.js.map +1 -1
  393. package/fesm5/taiga-ui-cdk-directives-validator.js.map +1 -1
  394. package/fesm5/taiga-ui-cdk-directives.js +1 -0
  395. package/fesm5/taiga-ui-cdk-directives.js.map +1 -1
  396. package/fesm5/taiga-ui-cdk-observables.js +1 -1
  397. package/fesm5/taiga-ui-cdk-observables.js.map +1 -1
  398. package/fesm5/taiga-ui-cdk-services.js.map +1 -1
  399. package/fesm5/taiga-ui-cdk-tokens.js +7 -10
  400. package/fesm5/taiga-ui-cdk-tokens.js.map +1 -1
  401. package/fesm5/taiga-ui-cdk-utils-browser.js.map +1 -1
  402. package/fesm5/taiga-ui-cdk-utils-focus.js +2 -0
  403. package/fesm5/taiga-ui-cdk-utils-focus.js.map +1 -1
  404. package/fesm5/taiga-ui-cdk-utils-miscellaneous.js.map +1 -1
  405. package/fesm5/taiga-ui-cdk-utils-os.js +18 -0
  406. package/fesm5/taiga-ui-cdk-utils-os.js.map +1 -0
  407. package/fesm5/taiga-ui-cdk-utils-svg.js +36 -0
  408. package/fesm5/taiga-ui-cdk-utils-svg.js.map +1 -0
  409. package/fesm5/taiga-ui-cdk-utils.js +2 -0
  410. package/fesm5/taiga-ui-cdk-utils.js.map +1 -1
  411. package/interfaces/alert-context.d.ts +2 -0
  412. package/interfaces/index.d.ts +1 -0
  413. package/interfaces/taiga-ui-cdk-interfaces.metadata.json +1 -1
  414. package/observables/replay-control-value-changes.d.ts +1 -1
  415. package/package.json +1 -1
  416. package/schematics/ng-add/constants/modules.d.ts +1 -1
  417. package/schematics/ng-add/constants/modules.js +2 -2
  418. package/schematics/ng-add/index.js +2 -10
  419. package/schematics/ng-add/schema.d.ts +1 -1
  420. package/schematics/ng-add/schema.json +3 -3
  421. package/schematics/ng-add/steps/add-taiga-icons.js +2 -10
  422. package/schematics/ng-add/steps/add-taiga-modules.js +3 -11
  423. package/schematics/ng-add/steps/add-taiga-styles.js +2 -10
  424. package/schematics/ng-add/steps/wrap-with-tui-root.js +2 -10
  425. package/schematics/ng-update/index.js +2 -10
  426. package/tokens/index.d.ts +1 -0
  427. package/tokens/is-apple.d.ts +2 -0
  428. package/tokens/taiga-ui-cdk-tokens.metadata.json +1 -1
  429. package/utils/browser/index.d.ts +1 -1
  430. package/utils/browser/{is-IE.d.ts → is-ie.d.ts} +0 -0
  431. package/utils/browser/taiga-ui-cdk-utils-browser.metadata.json +1 -1
  432. package/utils/focus/set-native-focused.d.ts +2 -0
  433. package/utils/index.d.ts +2 -0
  434. package/utils/os/index.d.ts +2 -0
  435. package/utils/os/is-apple.d.ts +1 -0
  436. package/utils/os/is-ios.d.ts +1 -0
  437. package/utils/os/package.json +13 -0
  438. package/utils/os/taiga-ui-cdk-utils-os.d.ts +4 -0
  439. package/utils/os/taiga-ui-cdk-utils-os.metadata.json +1 -0
  440. package/utils/svg/index.d.ts +1 -0
  441. package/utils/svg/package.json +13 -0
  442. package/utils/svg/svg-linear-gradient-processor.d.ts +15 -0
  443. package/utils/svg/taiga-ui-cdk-utils-svg.d.ts +4 -0
  444. package/utils/svg/taiga-ui-cdk-utils-svg.metadata.json +1 -0
  445. package/utils/taiga-ui-cdk-utils.metadata.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-cdk-utils-browser.js","sources":["ng://@taiga-ui/cdk/utils/browser/is-edge.ts","ng://@taiga-ui/cdk/utils/browser/is-edge-older-than.ts","ng://@taiga-ui/cdk/utils/browser/is-firefox.ts","ng://@taiga-ui/cdk/utils/browser/is-IE.ts","ng://@taiga-ui/cdk/utils/browser/is-safari.ts","ng://@taiga-ui/cdk/utils/browser/taiga-ui-cdk-utils-browser.ts"],"sourcesContent":["export function isEdge(userAgent: string): boolean {\n return userAgent.toLowerCase().includes('edge');\n}\n","export function isEdgeOlderThan(version: number, userAgent: string): boolean {\n const EDGE = 'edge/';\n const currentVersion = parseInt(\n userAgent.slice(userAgent.toLowerCase().indexOf(EDGE) + EDGE.length),\n 10,\n );\n\n return currentVersion < version;\n}\n","export function isFirefox(userAgent: string): boolean {\n return userAgent.toLowerCase().includes('firefox');\n}\n","export function isIE(userAgent: string): boolean {\n return userAgent.toLowerCase().includes('trident');\n}\n","export function isSafari(element: Element): boolean {\n const documentRef = element.ownerDocument;\n const windowRef = documentRef && documentRef.defaultView;\n\n return !!windowRef && 'safari' in windowRef;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"SAAgB,MAAM,CAAC,SAAiB;IACpC,OAAO,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACpD;;SCFgB,eAAe,CAAC,OAAe,EAAE,SAAiB;IAC9D,IAAM,IAAI,GAAG,OAAO,CAAC;IACrB,IAAM,cAAc,GAAG,QAAQ,CAC3B,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,EACpE,EAAE,CACL,CAAC;IAEF,OAAO,cAAc,GAAG,OAAO,CAAC;AACpC;;SCRgB,SAAS,CAAC,SAAiB;IACvC,OAAO,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AACvD;;SCFgB,IAAI,CAAC,SAAiB;IAClC,OAAO,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AACvD;;SCFgB,QAAQ,CAAC,OAAgB;IACrC,IAAM,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;IAC1C,IAAM,SAAS,GAAG,WAAW,IAAI,WAAW,CAAC,WAAW,CAAC;IAEzD,OAAO,CAAC,CAAC,SAAS,IAAI,QAAQ,IAAI,SAAS,CAAC;AAChD;;ACLA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-cdk-utils-browser.js","sources":["ng://@taiga-ui/cdk/utils/browser/is-edge.ts","ng://@taiga-ui/cdk/utils/browser/is-edge-older-than.ts","ng://@taiga-ui/cdk/utils/browser/is-firefox.ts","ng://@taiga-ui/cdk/utils/browser/is-ie.ts","ng://@taiga-ui/cdk/utils/browser/is-safari.ts","ng://@taiga-ui/cdk/utils/browser/taiga-ui-cdk-utils-browser.ts"],"sourcesContent":["export function isEdge(userAgent: string): boolean {\n return userAgent.toLowerCase().includes('edge');\n}\n","export function isEdgeOlderThan(version: number, userAgent: string): boolean {\n const EDGE = 'edge/';\n const currentVersion = parseInt(\n userAgent.slice(userAgent.toLowerCase().indexOf(EDGE) + EDGE.length),\n 10,\n );\n\n return currentVersion < version;\n}\n","export function isFirefox(userAgent: string): boolean {\n return userAgent.toLowerCase().includes('firefox');\n}\n","export function isIE(userAgent: string): boolean {\n return userAgent.toLowerCase().includes('trident');\n}\n","export function isSafari(element: Element): boolean {\n const documentRef = element.ownerDocument;\n const windowRef = documentRef && documentRef.defaultView;\n\n return !!windowRef && 'safari' in windowRef;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"SAAgB,MAAM,CAAC,SAAiB;IACpC,OAAO,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACpD;;SCFgB,eAAe,CAAC,OAAe,EAAE,SAAiB;IAC9D,IAAM,IAAI,GAAG,OAAO,CAAC;IACrB,IAAM,cAAc,GAAG,QAAQ,CAC3B,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,EACpE,EAAE,CACL,CAAC;IAEF,OAAO,cAAc,GAAG,OAAO,CAAC;AACpC;;SCRgB,SAAS,CAAC,SAAiB;IACvC,OAAO,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AACvD;;SCFgB,IAAI,CAAC,SAAiB;IAClC,OAAO,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AACvD;;SCFgB,QAAQ,CAAC,OAAgB;IACrC,IAAM,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;IAC1C,IAAM,SAAS,GAAG,WAAW,IAAI,WAAW,CAAC,WAAW,CAAC;IAEzD,OAAO,CAAC,CAAC,SAAS,IAAI,QAAQ,IAAI,SAAS,CAAC;AAChD;;ACLA;;;;;;"}
@@ -17,6 +17,8 @@ function getNativeFocused(documentRef) {
17
17
  }
18
18
 
19
19
  /**
20
+ * @deprecated: use native element.focus()
21
+ * TODO: remove in v3.0
20
22
  * Focuses or blurs and element
21
23
  *
22
24
  * @param element native element
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-cdk-utils-focus.js","sources":["ng://@taiga-ui/cdk/utils/focus/get-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/set-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/blur-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/is-native-keyboard-focusable.ts","ng://@taiga-ui/cdk/utils/focus/is-native-mouse-focusable.ts","ng://@taiga-ui/cdk/utils/focus/get-closest-keyboard-focusable.ts","ng://@taiga-ui/cdk/utils/focus/is-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/is-native-focused-in.ts","ng://@taiga-ui/cdk/utils/focus/move-focus.ts","ng://@taiga-ui/cdk/utils/focus/set-native-mouse-focused.ts","ng://@taiga-ui/cdk/utils/focus/taiga-ui-cdk-utils-focus.ts"],"sourcesContent":["/**\n * Returns current active element, including shadow dom\n *\n * @return element or null\n */\nexport function getNativeFocused(documentRef: Document): Element | null {\n if (!documentRef.activeElement || !documentRef.activeElement.shadowRoot) {\n return documentRef.activeElement;\n }\n\n let element = documentRef.activeElement.shadowRoot.activeElement;\n\n while (element && element.shadowRoot) {\n element = element.shadowRoot.activeElement;\n }\n\n return element;\n}\n","/**\n * Focuses or blurs and element\n *\n * @param element native element\n * @param focused boolean focused state\n * @param preventScroll optional flag to prevent native scroll to the element\n */\nexport function setNativeFocused(\n element: HTMLOrSVGElement,\n focused: boolean = true,\n preventScroll: boolean = false,\n) {\n if (focused) {\n element.focus({preventScroll});\n } else {\n element.blur();\n }\n}\n","import {getNativeFocused} from './get-native-focused';\nimport {setNativeFocused} from './set-native-focused';\n\n/**\n * Finds and blurs current active element, including shadow DOM\n */\nexport function blurNativeFocused(documentRef: Document) {\n const activeElement = getNativeFocused(documentRef);\n\n // TODO: iframe warning\n if (activeElement instanceof HTMLElement) {\n setNativeFocused(activeElement, false);\n }\n}\n","/**\n * Checks for signs that element can be focused with keyboard. tabIndex above 0 is ignored to\n * only target natural focus order. Not checking the possibility of an element to\n * be focused, for example element can have display: none applied to it or any other\n * circumstances could prevent actual focus.\n */\nexport function isNativeKeyboardFocusable(element: Element): boolean {\n if (element.hasAttribute('disabled') || element.getAttribute('tabIndex') === '-1') {\n return false;\n }\n\n // TODO: iframe warning\n if (\n (element instanceof HTMLElement && element.isContentEditable) ||\n element.getAttribute('tabIndex') === '0'\n ) {\n return true;\n }\n\n switch (element.tagName) {\n case 'BUTTON':\n case 'SELECT':\n case 'TEXTAREA':\n return true;\n case 'VIDEO':\n case 'AUDIO':\n return element.hasAttribute('controls');\n case 'INPUT':\n return element.getAttribute('type') !== 'hidden';\n case 'A':\n case 'LINK':\n return element.hasAttribute('href');\n default:\n return false;\n }\n}\n","import {isNativeKeyboardFocusable} from './is-native-keyboard-focusable';\n\nexport function isNativeMouseFocusable(element: Element): boolean {\n return (\n !element.hasAttribute('disabled') &&\n (element.getAttribute('tabIndex') === '-1' || isNativeKeyboardFocusable(element))\n );\n}\n","import {svgNodeFilter} from '@taiga-ui/cdk/constants';\n\nimport {isNativeKeyboardFocusable} from './is-native-keyboard-focusable';\nimport {isNativeMouseFocusable} from './is-native-mouse-focusable';\n\n/**\n * Finds the closest element that can be focused with a keyboard or mouse in theory\n *\n * @param initial current HTML element\n * @param prev should it look backwards instead (find item that will be focused with Shift + Tab)\n * @param root top Node limiting the search area\n * @param keyboard determine if only keyboard focus is of interest\n *\n */\nexport function getClosestFocusable(\n initial: HTMLElement,\n prev: boolean = false,\n root: Node,\n keyboard: boolean = true,\n): HTMLElement | null {\n if (!root.ownerDocument) {\n return null;\n }\n\n const check = keyboard ? isNativeKeyboardFocusable : isNativeMouseFocusable;\n\n // Deprecated but ony this overload works in IE\n // Filter must be a function in IE, other modern browsers are compliant to this format\n const treeWalker = root.ownerDocument.createTreeWalker(\n root,\n NodeFilter.SHOW_ELEMENT,\n svgNodeFilter,\n false,\n );\n\n treeWalker.currentNode = initial;\n\n while (prev ? treeWalker.previousNode() : treeWalker.nextNode()) {\n // TODO: iframe warning\n if (treeWalker.currentNode instanceof HTMLElement) {\n initial = treeWalker.currentNode;\n }\n\n if (check(initial)) {\n return initial;\n }\n }\n\n return null;\n}\n\n/** @deprecated use getClosestFocusable */\nexport const getClosestKeyboardFocusable = getClosestFocusable;\n","import {getNativeFocused} from './get-native-focused';\n\n/**\n * Checks if element is focused.\n *\n * Could return true even after blur since element remains focused if you switch away from a browser tab.\n *\n * @param node or null (as a common return value of DOM nodes walking)\n * @return true if focused\n */\nexport function isNativeFocused(node: Node | null): boolean {\n return (\n !!node && !!node.ownerDocument && getNativeFocused(node.ownerDocument) === node\n );\n}\n","import {getNativeFocused} from './get-native-focused';\n\n/**\n * Checks if focused element is within given element.\n *\n * @param node\n * @return true if focused node is contained within element\n */\nexport function isNativeFocusedIn(node: Node): boolean {\n // !node.contains - check for IE11\n if (!node.ownerDocument || !node.contains) {\n return false;\n }\n\n const nativeFocused = getNativeFocused(node.ownerDocument);\n\n return nativeFocused !== null && node.contains(nativeFocused);\n}\n","import {isNativeFocused} from './is-native-focused';\nimport {setNativeFocused} from './set-native-focused';\n\n/**\n * Utility method for moving focus in a list of elements\n *\n * @param currentIndex currently focused index\n * @param elements array of focusable elements\n * @param step a step to move focus by, typically -1 or 1\n */\nexport function moveFocus(\n currentIndex: number,\n elements: readonly HTMLElement[],\n step: number,\n) {\n currentIndex += step;\n\n while (currentIndex >= 0 && currentIndex < elements.length) {\n setNativeFocused(elements[currentIndex]);\n\n if (isNativeFocused(elements[currentIndex])) {\n return;\n }\n\n currentIndex += step;\n }\n}\n","import {setNativeFocused} from './set-native-focused';\n\n/**\n * Focuses or blurs element with mouse action imitation (to spoof {@link TuiFocusVisibleService})\n *\n * @param element\n * @param focused desired focused state\n * @param preventScroll optionally prevent native browser scroll after focus\n */\nexport function setNativeMouseFocused(\n element: HTMLOrSVGElement & Element,\n focused: boolean = true,\n preventScroll: boolean = false,\n) {\n if (!element.ownerDocument) {\n return;\n }\n\n if (typeof Event === 'function') {\n element.dispatchEvent(new Event('mousedown', {bubbles: true, cancelable: true}));\n } else {\n const event = element.ownerDocument.createEvent('Event');\n\n event.initEvent('mousedown', true, true);\n element.dispatchEvent(event);\n }\n\n setNativeFocused(element, focused, preventScroll);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;;;;SAKgB,gBAAgB,CAAC,WA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EAAC,CAAC,CAAC,CAAC;KACpF;SAAM;QACH,IAAM,OAAK,GAAG,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAEzD,OAAK,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QACzC,OAAO,CAAC,aAAa,CAAC,OAAK,CAAC,CAAC;KAChC;IAED,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;AACtD;;AC5BA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-cdk-utils-focus.js","sources":["ng://@taiga-ui/cdk/utils/focus/get-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/set-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/blur-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/is-native-keyboard-focusable.ts","ng://@taiga-ui/cdk/utils/focus/is-native-mouse-focusable.ts","ng://@taiga-ui/cdk/utils/focus/get-closest-keyboard-focusable.ts","ng://@taiga-ui/cdk/utils/focus/is-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/is-native-focused-in.ts","ng://@taiga-ui/cdk/utils/focus/move-focus.ts","ng://@taiga-ui/cdk/utils/focus/set-native-mouse-focused.ts","ng://@taiga-ui/cdk/utils/focus/taiga-ui-cdk-utils-focus.ts"],"sourcesContent":["/**\n * Returns current active element, including shadow dom\n *\n * @return element or null\n */\nexport function getNativeFocused(documentRef: Document): Element | null {\n if (!documentRef.activeElement || !documentRef.activeElement.shadowRoot) {\n return documentRef.activeElement;\n }\n\n let element = documentRef.activeElement.shadowRoot.activeElement;\n\n while (element && element.shadowRoot) {\n element = element.shadowRoot.activeElement;\n }\n\n return element;\n}\n","/**\n * @deprecated: use native element.focus()\n * TODO: remove in v3.0\n * Focuses or blurs and element\n *\n * @param element native element\n * @param focused boolean focused state\n * @param preventScroll optional flag to prevent native scroll to the element\n */\nexport function setNativeFocused(\n element: HTMLOrSVGElement,\n focused: boolean = true,\n preventScroll: boolean = false,\n): void {\n if (focused) {\n element.focus({preventScroll});\n } else {\n element.blur();\n }\n}\n","import {getNativeFocused} from './get-native-focused';\nimport {setNativeFocused} from './set-native-focused';\n\n/**\n * Finds and blurs current active element, including shadow DOM\n */\nexport function blurNativeFocused(documentRef: Document): void {\n const activeElement = getNativeFocused(documentRef);\n\n // TODO: iframe warning\n if (activeElement instanceof HTMLElement) {\n setNativeFocused(activeElement, false);\n }\n}\n","/**\n * Checks for signs that element can be focused with keyboard. tabIndex above 0 is ignored to\n * only target natural focus order. Not checking the possibility of an element to\n * be focused, for example element can have display: none applied to it or any other\n * circumstances could prevent actual focus.\n */\nexport function isNativeKeyboardFocusable(element: Element): boolean {\n if (element.hasAttribute('disabled') || element.getAttribute('tabIndex') === '-1') {\n return false;\n }\n\n // TODO: iframe warning\n if (\n (element instanceof HTMLElement && element.isContentEditable) ||\n element.getAttribute('tabIndex') === '0'\n ) {\n return true;\n }\n\n switch (element.tagName) {\n case 'BUTTON':\n case 'SELECT':\n case 'TEXTAREA':\n return true;\n case 'VIDEO':\n case 'AUDIO':\n return element.hasAttribute('controls');\n case 'INPUT':\n return element.getAttribute('type') !== 'hidden';\n case 'A':\n case 'LINK':\n return element.hasAttribute('href');\n default:\n return false;\n }\n}\n","import {isNativeKeyboardFocusable} from './is-native-keyboard-focusable';\n\nexport function isNativeMouseFocusable(element: Element): boolean {\n return (\n !element.hasAttribute('disabled') &&\n (element.getAttribute('tabIndex') === '-1' || isNativeKeyboardFocusable(element))\n );\n}\n","import {svgNodeFilter} from '@taiga-ui/cdk/constants';\n\nimport {isNativeKeyboardFocusable} from './is-native-keyboard-focusable';\nimport {isNativeMouseFocusable} from './is-native-mouse-focusable';\n\n/**\n * Finds the closest element that can be focused with a keyboard or mouse in theory\n *\n * @param initial current HTML element\n * @param prev should it look backwards instead (find item that will be focused with Shift + Tab)\n * @param root top Node limiting the search area\n * @param keyboard determine if only keyboard focus is of interest\n *\n */\nexport function getClosestFocusable(\n initial: HTMLElement,\n prev: boolean = false,\n root: Node,\n keyboard: boolean = true,\n): HTMLElement | null {\n if (!root.ownerDocument) {\n return null;\n }\n\n const check = keyboard ? isNativeKeyboardFocusable : isNativeMouseFocusable;\n\n // Deprecated but ony this overload works in IE\n // Filter must be a function in IE, other modern browsers are compliant to this format\n const treeWalker = root.ownerDocument.createTreeWalker(\n root,\n NodeFilter.SHOW_ELEMENT,\n svgNodeFilter,\n false,\n );\n\n treeWalker.currentNode = initial;\n\n while (prev ? treeWalker.previousNode() : treeWalker.nextNode()) {\n // TODO: iframe warning\n if (treeWalker.currentNode instanceof HTMLElement) {\n initial = treeWalker.currentNode;\n }\n\n if (check(initial)) {\n return initial;\n }\n }\n\n return null;\n}\n\n/** @deprecated use getClosestFocusable */\nexport const getClosestKeyboardFocusable = getClosestFocusable;\n","import {getNativeFocused} from './get-native-focused';\n\n/**\n * Checks if element is focused.\n *\n * Could return true even after blur since element remains focused if you switch away from a browser tab.\n *\n * @param node or null (as a common return value of DOM nodes walking)\n * @return true if focused\n */\nexport function isNativeFocused(node: Node | null): boolean {\n return (\n !!node && !!node.ownerDocument && getNativeFocused(node.ownerDocument) === node\n );\n}\n","import {getNativeFocused} from './get-native-focused';\n\n/**\n * Checks if focused element is within given element.\n *\n * @param node\n * @return true if focused node is contained within element\n */\nexport function isNativeFocusedIn(node: Node): boolean {\n // !node.contains - check for IE11\n if (!node.ownerDocument || !node.contains) {\n return false;\n }\n\n const nativeFocused = getNativeFocused(node.ownerDocument);\n\n return nativeFocused !== null && node.contains(nativeFocused);\n}\n","import {isNativeFocused} from './is-native-focused';\nimport {setNativeFocused} from './set-native-focused';\n\n/**\n * Utility method for moving focus in a list of elements\n *\n * @param currentIndex currently focused index\n * @param elements array of focusable elements\n * @param step a step to move focus by, typically -1 or 1\n */\nexport function moveFocus(\n currentIndex: number,\n elements: readonly HTMLElement[],\n step: number,\n): void {\n currentIndex += step;\n\n while (currentIndex >= 0 && currentIndex < elements.length) {\n setNativeFocused(elements[currentIndex]);\n\n if (isNativeFocused(elements[currentIndex])) {\n return;\n }\n\n currentIndex += step;\n }\n}\n","import {setNativeFocused} from './set-native-focused';\n\n/**\n * Focuses or blurs element with mouse action imitation (to spoof {@link TuiFocusVisibleService})\n *\n * @param element\n * @param focused desired focused state\n * @param preventScroll optionally prevent native browser scroll after focus\n */\nexport function setNativeMouseFocused(\n element: HTMLOrSVGElement & Element,\n focused: boolean = true,\n preventScroll: boolean = false,\n): void {\n if (!element.ownerDocument) {\n return;\n }\n\n if (typeof Event === 'function') {\n element.dispatchEvent(new Event('mousedown', {bubbles: true, cancelable: true}));\n } else {\n const event = element.ownerDocument.createEvent('Event');\n\n event.initEvent('mousedown', true, true);\n element.dispatchEvent(event);\n }\n\n setNativeFocused(element, focused, preventScroll);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;;;;SAKgB,gBAAgB,CAAC,WAAqB;IAClD,IAAI,CAAC,WAAW,CAAC,aAAa,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,UAAU,EAAE;QACrE,OAAO,WAAW,CAAC,aAAa,CAAC;KACpC;IAED,IAAI,OAAO,GAAG,WAAW,CAAC,aAAa,CAAC,UAAU,CAAC,aAAa,CAAC;IAEjE,OAAO,OAAO,IAAI,OAAO,CAAC,UAAU,EAAE;QAClC,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC;KAC9C;IAED,OAAO,OAAO,CAAC;AACnB;;ACjBA;;;;;;;;;SASgB,gBAAgB,CAC5B,OAAyB,EACzB,OAAuB,EACvB,aAA8B;IAD9B,wBAAA,EAAA,cAAuB;IACvB,8BAAA,EAAA,qBAA8B;IAE9B,IAAI,OAAO,EAAE;QACT,OAAO,CAAC,KAAK,CAAC,EAAC,aAAa,eAAA,EAAC,CAAC,CAAC;KAClC;SAAM;QACH,OAAO,CAAC,IAAI,EAAE,CAAC;KAClB;AACL;;AChBA;;;SAGgB,iBAAiB,CAAC,W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,OAAO,YAAY,IAAI,CAAC,IAAI,YAAY,GAAG,QAAQ,CAAC,MAAM,EAAE;QACxD,gBAAgB,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC;QAEzC,IAAI,eAAe,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,EAAE;YACzC,OAAO;SACV;QAED,YAAY,IAAI,IAAI,CAAC;KACxB;AACL;;ACxBA;;;;;;;SAOgB,qBAAqB,CACjC,OAAmC,EACnC,OAAuB,EACvB,aAA8B;IAD9B,wBAAA,EAAA,cAAuB;IACvB,8BAAA,EAAA,qBAA8B;IAE9B,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE;QACxB,OAAO;KACV;IAED,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE;QAC7B,OAAO,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,WAAW,EAAE,EAAC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC;KACpF;SAAM;QACH,IAAM,OAAK,GAAG,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAEzD,OAAK,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QACzC,OAAO,CAAC,aAAa,CAAC,OAAK,CAAC,CAAC;KAChC;IAED,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;AACtD;;AC5BA;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-cdk-utils-miscellaneous.js","sources":["ng://@taiga-ui/cdk/utils/miscellaneous/distance-between-touches.ts","ng://@taiga-ui/cdk/utils/miscellaneous/ease-in-out-quad.ts","ng://@taiga-ui/cdk/utils/miscellaneous/is-present.ts","ng://@taiga-ui/cdk/utils/miscellaneous/fallback-value.ts","ng://@taiga-ui/cdk/utils/miscellaneous/flat-length.ts","ng://@taiga-ui/cdk/utils/miscellaneous/get-original-array-from-query-list.ts","ng://@taiga-ui/cdk/utils/miscellaneous/get-swipe-direction.ts","ng://@taiga-ui/cdk/utils/miscellaneous/identity.ts","ng://@taiga-ui/cdk/utils/miscellaneous/is-element-editable.ts","ng://@taiga-ui/cdk/utils/miscellaneous/is-number.ts","ng://@taiga-ui/cdk/utils/miscellaneous/mark-control-as-touched-and-validate.ts","ng://@taiga-ui/cdk/utils/miscellaneous/nullable-same.ts","ng://@taiga-ui/cdk/utils/miscellaneous/uniq-by.ts","ng://@taiga-ui/cdk/utils/miscellaneous/taiga-ui-cdk-utils-miscellaneous.ts"],"sourcesContent":["export function distanceBetweenTouches({touches}: TouchEvent): number {\n return Math.hypot(\n touches[0].clientX - touches[1].clientX,\n touches[0].clientY - touches[1].clientY,\n );\n}\n","import {tuiAssert} from '@taiga-ui/cdk/classes';\n\nexport function easeInOutQuad(t: number): number {\n tuiAssert.assert(\n 0 <= t && t <= 1,\n 'Input must be between 0 and 1 inclusive but received ',\n t,\n );\n\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n}\n","export function isPresent<T>(value?: T | null): value is T {\n return value !== null && value !== undefined;\n}\n","import {isPresent} from './is-present';\n\n/**\n * If the value is null or undefined, returns default value\n * @param value\n * @param fallback alternative fallback\n * @deprecated use nullish coalescing operator\n */\nexport function fallbackValue<T>(value: T | null | undefined, fallback: T): T {\n return isPresent(value) ? value : fallback;\n}\n","/**\n * Flattens two dimensional array and calculates resulting length\n *\n * @param array twi dimensional array\n */\nexport function flatLength(array: ReadonlyArray<readonly unknown[]>): number {\n return array.reduce((count, section) => count + section.length, 0);\n}\n","import {QueryList} from '@angular/core';\n\n/**\n * Extracts original array from {@link QueryList} rather than\n * creating a copy like {@link QueryList.toArray} does.\n * @param queryList\n * @returns original array from {@link QueryList}.\n */\nexport function getOriginalArrayFromQueryList<T>(queryList: QueryList<T>): readonly T[] {\n let array: readonly T[] = [];\n\n queryList.find((_item, _index, originalArray) => {\n array = originalArray;\n\n return true;\n });\n\n return array;\n}\n","import {TuiSwipeDirection} from '@taiga-ui/cdk/interfaces';\n\nexport function getSwipeDirection(deltaX: number, deltaY: number): TuiSwipeDirection {\n if (Math.abs(deltaY) > Math.abs(deltaX)) {\n return deltaY > 0 ? 'top' : 'bottom';\n } else {\n return deltaX > 0 ? 'left' : 'right';\n }\n}\n","/**\n * @deprecated: use identity from rxjs\n */\nexport function identity<T>(item: T): T {\n return item;\n}\n","export function isElementEditable(element: HTMLElement): boolean {\n // TODO: iframe warning\n return (\n (element instanceof HTMLInputElement && !element.readOnly) ||\n (element instanceof HTMLTextAreaElement && !element.readOnly) ||\n element.isContentEditable\n );\n}\n","export function isNumber(value: unknown): value is number {\n return typeof value === 'number';\n}\n","import {AbstractControl, FormArray, FormGroup} from '@angular/forms';\n\nexport function markControlAsTouchedAndValidate(control: AbstractControl) {\n if (control instanceof FormArray) {\n control.controls.forEach(nestedControl => {\n markControlAsTouchedAndValidate(nestedControl);\n });\n }\n\n if (control instanceof FormGroup) {\n Object.values(control.controls).forEach(nestedControl => {\n markControlAsTouchedAndValidate(nestedControl);\n });\n }\n\n control.markAsTouched();\n control.updateValueAndValidity();\n}\n","import {TuiIdentityMatcher} from '@taiga-ui/cdk/types';\n\n/**\n * Checks identity for nullable elements.\n *\n * @param a element a\n * @param b element b\n * @param handler called if both elements are not null\n * @return true if either both are null or they pass identity handler\n */\nexport function nullableSame<T>(\n a: T | null,\n b: T | null,\n handler: TuiIdentityMatcher<T>,\n): boolean {\n if (a === null) {\n return b === null;\n }\n\n if (b === null) {\n return false;\n }\n\n return handler(a, b);\n}\n","export function uniqBy<T extends object>(\n array: readonly T[],\n key: keyof T,\n): readonly T[] {\n return Array.from(\n array\n .reduce(\n (map, item) => (map.has(item[key]) ? map : map.set(item[key], item)),\n new Map<T[keyof T], T>(),\n )\n .values(),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;SAAgB,sBAAsB,CAAC,EAAqB;QAApB,oBAAO;IAC3C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CAAC,CAAC,CAAC;AACzB;;SCxBgB,MAAM,CAClB,KAAmB,EACnB,GAAY;IAEZ,OAAO,KAAK,CAAC,IAAI,CACb,KAAK;SACA,MAAM,CACH,UAAC,GAAG,EAAE,IAAI,IAAK,QAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,IAAC,EACpE,IAAI,GAAG,EAAiB,CAC3B;SACA,MAAM,EAAE,CAChB,CAAC;AACN;;ACZA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-cdk-utils-miscellaneous.js","sources":["ng://@taiga-ui/cdk/utils/miscellaneous/distance-between-touches.ts","ng://@taiga-ui/cdk/utils/miscellaneous/ease-in-out-quad.ts","ng://@taiga-ui/cdk/utils/miscellaneous/is-present.ts","ng://@taiga-ui/cdk/utils/miscellaneous/fallback-value.ts","ng://@taiga-ui/cdk/utils/miscellaneous/flat-length.ts","ng://@taiga-ui/cdk/utils/miscellaneous/get-original-array-from-query-list.ts","ng://@taiga-ui/cdk/utils/miscellaneous/get-swipe-direction.ts","ng://@taiga-ui/cdk/utils/miscellaneous/identity.ts","ng://@taiga-ui/cdk/utils/miscellaneous/is-element-editable.ts","ng://@taiga-ui/cdk/utils/miscellaneous/is-number.ts","ng://@taiga-ui/cdk/utils/miscellaneous/mark-control-as-touched-and-validate.ts","ng://@taiga-ui/cdk/utils/miscellaneous/nullable-same.ts","ng://@taiga-ui/cdk/utils/miscellaneous/uniq-by.ts","ng://@taiga-ui/cdk/utils/miscellaneous/taiga-ui-cdk-utils-miscellaneous.ts"],"sourcesContent":["export function distanceBetweenTouches({touches}: TouchEvent): number {\n return Math.hypot(\n touches[0].clientX - touches[1].clientX,\n touches[0].clientY - touches[1].clientY,\n );\n}\n","import {tuiAssert} from '@taiga-ui/cdk/classes';\n\nexport function easeInOutQuad(t: number): number {\n tuiAssert.assert(\n 0 <= t && t <= 1,\n 'Input must be between 0 and 1 inclusive but received ',\n t,\n );\n\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n}\n","export function isPresent<T>(value?: T | null): value is T {\n return value !== null && value !== undefined;\n}\n","import {isPresent} from './is-present';\n\n/**\n * If the value is null or undefined, returns default value\n * @param value\n * @param fallback alternative fallback\n * @deprecated use nullish coalescing operator\n */\nexport function fallbackValue<T>(value: T | null | undefined, fallback: T): T {\n return isPresent(value) ? value : fallback;\n}\n","/**\n * Flattens two dimensional array and calculates resulting length\n *\n * @param array twi dimensional array\n */\nexport function flatLength(array: ReadonlyArray<readonly unknown[]>): number {\n return array.reduce((count, section) => count + section.length, 0);\n}\n","import {QueryList} from '@angular/core';\n\n/**\n * Extracts original array from {@link QueryList} rather than\n * creating a copy like {@link QueryList.toArray} does.\n * @param queryList\n * @returns original array from {@link QueryList}.\n */\nexport function getOriginalArrayFromQueryList<T>(queryList: QueryList<T>): readonly T[] {\n let array: readonly T[] = [];\n\n queryList.find((_item, _index, originalArray) => {\n array = originalArray;\n\n return true;\n });\n\n return array;\n}\n","import {TuiSwipeDirection} from '@taiga-ui/cdk/interfaces';\n\nexport function getSwipeDirection(deltaX: number, deltaY: number): TuiSwipeDirection {\n if (Math.abs(deltaY) > Math.abs(deltaX)) {\n return deltaY > 0 ? 'top' : 'bottom';\n } else {\n return deltaX > 0 ? 'left' : 'right';\n }\n}\n","/**\n * @deprecated: use identity from rxjs\n */\nexport function identity<T>(item: T): T {\n return item;\n}\n","export function isElementEditable(element: HTMLElement): boolean {\n // TODO: iframe warning\n return (\n (element instanceof HTMLInputElement && !element.readOnly) ||\n (element instanceof HTMLTextAreaElement && !element.readOnly) ||\n element.isContentEditable\n );\n}\n","export function isNumber(value: unknown): value is number {\n return typeof value === 'number';\n}\n","import {AbstractControl, FormArray, FormGroup} from '@angular/forms';\n\nexport function markControlAsTouchedAndValidate(control: AbstractControl): void {\n if (control instanceof FormArray) {\n control.controls.forEach(nestedControl => {\n markControlAsTouchedAndValidate(nestedControl);\n });\n }\n\n if (control instanceof FormGroup) {\n Object.values(control.controls).forEach(nestedControl => {\n markControlAsTouchedAndValidate(nestedControl);\n });\n }\n\n control.markAsTouched();\n control.updateValueAndValidity();\n}\n","import {TuiIdentityMatcher} from '@taiga-ui/cdk/types';\n\n/**\n * Checks identity for nullable elements.\n *\n * @param a element a\n * @param b element b\n * @param handler called if both elements are not null\n * @return true if either both are null or they pass identity handler\n */\nexport function nullableSame<T>(\n a: T | null,\n b: T | null,\n handler: TuiIdentityMatcher<T>,\n): boolean {\n if (a === null) {\n return b === null;\n }\n\n if (b === null) {\n return false;\n }\n\n return handler(a, b);\n}\n","export function uniqBy<T extends object>(\n array: readonly T[],\n key: keyof T,\n): readonly T[] {\n return Array.from(\n array\n .reduce(\n (map, item) => (map.has(item[key]) ? map : map.set(item[key], item)),\n new Map<T[keyof T], T>(),\n )\n .values(),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;SAAgB,sBAAsB,CAAC,EAAqB;QAApB,oBAAO;IAC3C,OAAO,IAAI,CAAC,KAAK,CACb,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,EACvC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAC1C,CAAC;AACN;;SCHgB,aAAa,CAAC,CAAS;IACnC,SAAS,CAAC,MAAM,CACZ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAChB,uDAAuD,EACvD,CAAC,CACJ,CAAC;IAEF,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACtD;;SCVgB,SAAS,CAAI,KAAgB;IACzC,OA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C;AACrC;;SCAgB,+BAA+B,CAAC,OAAwB;IACpE,IAAI,OAAO,YAAY,SAAS,EAAE;QAC9B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAA,aAAa;YAClC,+BAA+B,CAAC,aAAa,CAAC,CAAC;SAClD,CAAC,CAAC;KACN;IAED,IAAI,OAAO,YAAY,SAAS,EAAE;QAC9B,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,UAAA,aAAa;YACjD,+BAA+B,CAAC,aAAa,CAAC,CAAC;SAClD,CAAC,CAAC;KACN;IAED,OAAO,CAAC,aAAa,EAAE,CAAC;IACxB,OAAO,CAAC,sBAAsB,EAAE,CAAC;AACrC;;ACfA;;;;;;;;SAQgB,YAAY,CACxB,CAAW,EACX,CAAW,EACX,OAA8B;IAE9B,IAAI,CAAC,KAAK,IAAI,EAAE;QACZ,OAAO,CAAC,KAAK,IAAI,CAAC;KACrB;IAED,IAAI,CAAC,KAAK,IAAI,EAAE;QACZ,OAAO,KAAK,CAAC;KAChB;IAED,OAAO,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACzB;;SCxBgB,MAAM,CAClB,KAAmB,EACnB,GAAY;IAEZ,OAAO,KAAK,CAAC,IAAI,CACb,KAAK;SACA,MAAM,CACH,UAAC,GAAG,EAAE,IAAI,IAAK,QAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,IAAC,EACpE,IAAI,GAAG,EAAiB,CAC3B;SACA,MAAM,EAAE,CAChB,CAAC;AACN;;ACZA;;;;;;"}
@@ -0,0 +1,18 @@
1
+ var IOS_REG_EXP = /ipad|iphone|ipod/;
2
+ function isIos(navigator) {
3
+ var userAgentValue = navigator.userAgent.toLowerCase();
4
+ return (IOS_REG_EXP.test(userAgentValue) ||
5
+ (userAgentValue.includes('apple') && navigator.maxTouchPoints > 1));
6
+ }
7
+
8
+ var SAFARI_REG_EXP = /^((?!chrome|android).)*safari/i;
9
+ function isApple(navigator) {
10
+ return isIos(navigator) || SAFARI_REG_EXP.test(navigator.userAgent.toLowerCase());
11
+ }
12
+
13
+ /**
14
+ * Generated bundle index. Do not edit.
15
+ */
16
+
17
+ export { isApple, isIos };
18
+ //# sourceMappingURL=taiga-ui-cdk-utils-os.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taiga-ui-cdk-utils-os.js","sources":["ng://@taiga-ui/cdk/utils/os/is-ios.ts","ng://@taiga-ui/cdk/utils/os/is-apple.ts","ng://@taiga-ui/cdk/utils/os/taiga-ui-cdk-utils-os.ts"],"sourcesContent":["const IOS_REG_EXP = /ipad|iphone|ipod/;\n\nexport function isIos(navigator: Navigator): boolean {\n const userAgentValue = navigator.userAgent.toLowerCase();\n\n return (\n IOS_REG_EXP.test(userAgentValue) ||\n (userAgentValue.includes('apple') && navigator.maxTouchPoints > 1)\n );\n}\n","import {isIos} from './is-ios';\n\nconst SAFARI_REG_EXP = /^((?!chrome|android).)*safari/i;\n\nexport function isApple(navigator: Navigator): boolean {\n return isIos(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,IAAM,WAAW,GAAG,kBAAkB,CAAC;SAEvB,KAAK,CAAC,SAAoB;IACtC,IAAM,cAAc,GAAG,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;IAEzD,QACI,WAAW,CAAC,IAAI,CAAC,cAAc,CAAC;SAC/B,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,SAAS,CAAC,cAAc,GAAG,CAAC,CAAC,EACpE;AACN;;ACPA,IAAM,cAAc,GAAG,gCAAgC,CAAC;SAExC,OAAO,CAAC,SAAoB;IACxC,OAAO,KAAK,CAAC,SAAS,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,CAAC;AACtF;;ACNA;;;;;;"}
@@ -0,0 +1,36 @@
1
+ import { __spread } from 'tslib';
2
+
3
+ /**
4
+ * @note(splincode):
5
+ * Any ‘linearGradient’ attributes which are defined on the referenced
6
+ * element which are not defined on this element are inherited by this element.
7
+ * If this element has no defined gradient stops, and the referenced element does
8
+ * (possibly due to its own ‘xlink:href’ attribute), then this element inherits
9
+ * the gradient stop from the referenced element. Inheritance can be indirect
10
+ * to an arbitrary level; thus, if the referenced element inherits attribute
11
+ * or gradient stops due to its own ‘xlink:href’ attribute, then the current
12
+ * element can inherit those attributes or gradient stops.
13
+ *
14
+ * Documentation: https://www.w3.org/TR/SVG11/pservers.html
15
+ *
16
+ */
17
+ function svgLinearGradientProcessor(svg, salt) {
18
+ var uniqueIds = extractLinearGradientIdsFromSvg(svg);
19
+ return uniqueIds.reduce(function (processed, previousId) {
20
+ return processed.replace(new RegExp(previousId, 'g'), previousId + "_" + (salt || makeRandomSalt()));
21
+ }, svg);
22
+ }
23
+ function makeRandomSalt() {
24
+ return Math.floor(Math.random() * Date.now());
25
+ }
26
+ function extractLinearGradientIdsFromSvg(svg) {
27
+ var matchedIdsWithPrefix = svg.match(/url\(#(\w\w+)/g) || [];
28
+ return __spread(new Set(matchedIdsWithPrefix)).map(function (matched) { return matched.slice(5); });
29
+ }
30
+
31
+ /**
32
+ * Generated bundle index. Do not edit.
33
+ */
34
+
35
+ export { svgLinearGradientProcessor };
36
+ //# sourceMappingURL=taiga-ui-cdk-utils-svg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taiga-ui-cdk-utils-svg.js","sources":["ng://@taiga-ui/cdk/utils/svg/svg-linear-gradient-processor.ts","ng://@taiga-ui/cdk/utils/svg/taiga-ui-cdk-utils-svg.ts"],"sourcesContent":["/**\n * @note(splincode):\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 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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;SAcgB,0BAA0B,CAAC,GAAW,EAAE,IAAsB;IAC1E,IAAM,SAAS,GAAG,+BAA+B,CAAC,GAAG,CAAC,CAAC;IAEvD,OAAO,SAAS,CAAC,MAAM,CACnB,UAAC,SAAS,EAAE,UAAU;QAClB,OAAA,SAAS,CAAC,OAAO,CACb,IAAI,MAAM,CAAC,UAAU,EAAE,GAAG,CAAC,EACxB,UAAU,UAAI,IAAI,IAAI,cAAc,EAAE,CAAE,CAC9C;KAAA,EACL,GAAG,CACN,CAAC;AACN,CAAC;AAED,SAAS,cAAc;IACnB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,+BAA+B,CAAC,GAAW;IAChD,IAAM,oBAAoB,GAAG,GAAG,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;IAE/D,OAAO,SAAI,IAAI,GAAG,CAAC,oBAAoB,CAAC,EAAE,GAAG,CACzC,UAAA,OAAO,IAAI,OAAA,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,GAAA,CAC9B,CAAC;AACN;;ACrCA;;;;;;"}
@@ -4,6 +4,8 @@ export * from '@taiga-ui/cdk/utils/focus';
4
4
  export * from '@taiga-ui/cdk/utils/format';
5
5
  export * from '@taiga-ui/cdk/utils/math';
6
6
  export * from '@taiga-ui/cdk/utils/miscellaneous';
7
+ export * from '@taiga-ui/cdk/utils/os';
8
+ export * from '@taiga-ui/cdk/utils/svg';
7
9
 
8
10
  /**
9
11
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-cdk-utils.js","sources":["ng://@taiga-ui/cdk/utils/taiga-ui-cdk-utils.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;;"}
1
+ {"version":3,"file":"taiga-ui-cdk-utils.js","sources":["ng://@taiga-ui/cdk/utils/taiga-ui-cdk-utils.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;"}
@@ -0,0 +1,2 @@
1
+ import { TuiBaseDialogContext } from './base-dialog-context';
2
+ export declare type TuiAlertContext<T, G = void> = TuiBaseDialogContext<G> & T;
@@ -1,3 +1,4 @@
1
+ export * from './alert-context';
1
2
  export * from './aria-dialog-context';
2
3
  export * from './base-dialog';
3
4
  export * from './base-dialog-context';
@@ -1 +1 @@
1
- {"__symbolic":"module","version":4,"metadata":{"TuiAriaDialogContext":{"__symbolic":"interface"},"TuiBaseDialog":{"__symbolic":"interface"},"TuiBaseDialogContext":{"__symbolic":"interface"},"TuiContextWithImplicit":{"__symbolic":"interface"},"TuiControlValueTransformer":{"__symbolic":"interface"},"TuiDayLike":{"__symbolic":"interface"},"TuiNativeFocusableElement":{"__symbolic":"interface"},"TuiFocusableElementAccessor":{"__symbolic":"interface"},"TuiMonthLike":{"__symbolic":"interface"},"TuiSwipe":{"__symbolic":"interface"},"TuiSwipeDirection":{"__symbolic":"interface"},"TuiSwipeOptions":{"__symbolic":"interface"},"TuiTimeLike":{"__symbolic":"interface"},"TuiYearLike":{"__symbolic":"interface"},"TuiZoom":{"__symbolic":"interface"},"TuiZoomOptions":{"__symbolic":"interface"}},"origins":{"TuiAriaDialogContext":"./aria-dialog-context","TuiBaseDialog":"./base-dialog","TuiBaseDialogContext":"./base-dialog-context","TuiContextWithImplicit":"./context-with-implicit","TuiControlValueTransformer":"./control-value-transformer","TuiDayLike":"./day-like","TuiNativeFocusableElement":"./focusable-element-accessor","TuiFocusableElementAccessor":"./focusable-element-accessor","TuiMonthLike":"./month-like","TuiSwipe":"./swipe","TuiSwipeDirection":"./swipe","TuiSwipeOptions":"./swipe","TuiTimeLike":"./time-like","TuiYearLike":"./year-like","TuiZoom":"./zoom","TuiZoomOptions":"./zoom"},"importAs":"@taiga-ui/cdk/interfaces"}
1
+ {"__symbolic":"module","version":4,"metadata":{"TuiAlertContext":{"__symbolic":"interface"},"TuiAriaDialogContext":{"__symbolic":"interface"},"TuiBaseDialog":{"__symbolic":"interface"},"TuiBaseDialogContext":{"__symbolic":"interface"},"TuiContextWithImplicit":{"__symbolic":"interface"},"TuiControlValueTransformer":{"__symbolic":"interface"},"TuiDayLike":{"__symbolic":"interface"},"TuiNativeFocusableElement":{"__symbolic":"interface"},"TuiFocusableElementAccessor":{"__symbolic":"interface"},"TuiMonthLike":{"__symbolic":"interface"},"TuiSwipe":{"__symbolic":"interface"},"TuiSwipeDirection":{"__symbolic":"interface"},"TuiSwipeOptions":{"__symbolic":"interface"},"TuiTimeLike":{"__symbolic":"interface"},"TuiYearLike":{"__symbolic":"interface"},"TuiZoom":{"__symbolic":"interface"},"TuiZoomOptions":{"__symbolic":"interface"}},"origins":{"TuiAlertContext":"./alert-context","TuiAriaDialogContext":"./aria-dialog-context","TuiBaseDialog":"./base-dialog","TuiBaseDialogContext":"./base-dialog-context","TuiContextWithImplicit":"./context-with-implicit","TuiControlValueTransformer":"./control-value-transformer","TuiDayLike":"./day-like","TuiNativeFocusableElement":"./focusable-element-accessor","TuiFocusableElementAccessor":"./focusable-element-accessor","TuiMonthLike":"./month-like","TuiSwipe":"./swipe","TuiSwipeDirection":"./swipe","TuiSwipeOptions":"./swipe","TuiTimeLike":"./time-like","TuiYearLike":"./year-like","TuiZoom":"./zoom","TuiZoomOptions":"./zoom"},"importAs":"@taiga-ui/cdk/interfaces"}
@@ -2,6 +2,6 @@ import { AbstractControl, AbstractControlDirective } from '@angular/forms';
2
2
  import { Observable } from 'rxjs';
3
3
  /**
4
4
  * Turns AbstractControl/Abstract-control-directive valueChanges into ReplaySubject(1)
5
- * TODO: rename function in 3.0. The name should be shorter.
5
+ * TODO: 3.0 name should be shorter.
6
6
  */
7
7
  export declare function tuiReplayedValueChangesFrom<T>(control: AbstractControl | AbstractControlDirective): Observable<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/cdk",
3
- "version": "2.43.0",
3
+ "version": "2.46.0",
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",
@@ -4,5 +4,5 @@ export interface ImportingModule {
4
4
  }
5
5
  export declare const MAIN_MODULES: ReadonlyArray<ImportingModule>;
6
6
  export declare const DIALOG_MODULES: ReadonlyArray<ImportingModule>;
7
- export declare const NOTIFICATION_MODULES: ReadonlyArray<ImportingModule>;
7
+ export declare const ALERT_MODULES: ReadonlyArray<ImportingModule>;
8
8
  export declare const SANITIZER_MODULES: ReadonlyArray<ImportingModule>;
@@ -16,9 +16,9 @@ exports.DIALOG_MODULES = [
16
16
  packageName: '@taiga-ui/core',
17
17
  },
18
18
  ];
19
- exports.NOTIFICATION_MODULES = [
19
+ exports.ALERT_MODULES = [
20
20
  {
21
- name: 'TuiNotificationsModule',
21
+ name: 'TuiAlertModule',
22
22
  packageName: '@taiga-ui/core',
23
23
  },
24
24
  ];
@@ -1,20 +1,12 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
12
4
  const tasks_1 = require("@angular-devkit/schematics/tasks");
13
5
  const ng_morph_1 = require("ng-morph");
14
6
  const packages_1 = require("./constants/packages");
15
7
  const versions_1 = require("./constants/versions");
16
8
  function ngAdd(options) {
17
- return (tree, context) => __awaiter(this, void 0, void 0, function* () {
9
+ return (tree, context) => tslib_1.__awaiter(this, void 0, void 0, function* () {
18
10
  context.logger.info(`The main packages will be installed - ${packages_1.MAIN_PACKAGES}`);
19
11
  addDependencies(tree, options);
20
12
  context.addTask(new tasks_1.NodePackageInstallTask(), [
@@ -1,7 +1,7 @@
1
1
  export interface Schema {
2
2
  readonly project: string;
3
3
  readonly addons: ReadonlyArray<string>;
4
- readonly addNotificationsModule: boolean;
4
+ readonly addAlertModule: boolean;
5
5
  readonly addDialogsModule: boolean;
6
6
  readonly addSanitizer: boolean;
7
7
  }
@@ -29,12 +29,12 @@
29
29
  "type": "confirmation"
30
30
  }
31
31
  },
32
- "addNotificationsModule": {
33
- "description": "Setting up notifications module",
32
+ "addAlertModule": {
33
+ "description": "Setting up alerts module",
34
34
  "type": "boolean",
35
35
  "default": true,
36
36
  "x-prompt": {
37
- "message": "Do you want to use Taiga UI notifications?",
37
+ "message": "Do you want to use Taiga UI alerts?",
38
38
  "type": "confirmation"
39
39
  }
40
40
  },
@@ -1,14 +1,6 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
12
4
  const workspace_1 = require("@schematics/angular/utility/workspace");
13
5
  const workspace_2 = require("@schematics/angular/utility/workspace");
14
6
  const get_project_1 = require("../../utils/get-project");
@@ -19,7 +11,7 @@ const ICON_ASSETS = {
19
11
  output: 'assets/taiga-ui/icons',
20
12
  };
21
13
  function addTaigaIcons(options) {
22
- return (tree) => __awaiter(this, void 0, void 0, function* () {
14
+ return (tree) => tslib_1.__awaiter(this, void 0, void 0, function* () {
23
15
  const workspace = yield workspace_2.getWorkspace(tree);
24
16
  const project = get_project_1.getProject(options, workspace);
25
17
  return addTaigaStylesToAngularJson(workspace, project);
@@ -1,14 +1,6 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
12
4
  const workspace_1 = require("@schematics/angular/utility/workspace");
13
5
  const ng_morph_1 = require("ng-morph");
14
6
  const get_project_1 = require("../../utils/get-project");
@@ -16,7 +8,7 @@ const get_project_target_options_1 = require("../../utils/get-project-target-opt
16
8
  const modules_1 = require("../constants/modules");
17
9
  const add_unique_import_1 = require("../../utils/add-unique-import");
18
10
  function addTaigaModules(options) {
19
- return (tree, context) => __awaiter(this, void 0, void 0, function* () {
11
+ return (tree, context) => tslib_1.__awaiter(this, void 0, void 0, function* () {
20
12
  const workspace = yield workspace_1.getWorkspace(tree);
21
13
  const project = get_project_1.getProject(options, workspace);
22
14
  const buildOptions = get_project_target_options_1.getProjectTargetOptions(project, 'build');
@@ -32,7 +24,7 @@ function addTuiModules(mainModule, options, context) {
32
24
  const modules = [
33
25
  ...modules_1.MAIN_MODULES,
34
26
  ...(options.addDialogsModule ? modules_1.DIALOG_MODULES : []),
35
- ...(options.addNotificationsModule ? modules_1.NOTIFICATION_MODULES : []),
27
+ ...(options.addAlertModule ? modules_1.ALERT_MODULES : []),
36
28
  ];
37
29
  const mainModulePath = mainModule.getSourceFile().getFilePath();
38
30
  modules.forEach(module => {
@@ -1,14 +1,6 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
12
4
  const workspace_1 = require("@schematics/angular/utility/workspace");
13
5
  const workspace_2 = require("@schematics/angular/utility/workspace");
14
6
  const get_project_1 = require("../../utils/get-project");
@@ -16,7 +8,7 @@ const get_project_target_options_1 = require("../../utils/get-project-target-opt
16
8
  const TAIGA_GLOBAL_STYLE = 'node_modules/@taiga-ui/core/styles/taiga-ui-global.less';
17
9
  const TAIGA_THEME_STYLE = 'node_modules/@taiga-ui/core/styles/taiga-ui-theme.less';
18
10
  function addTaigaStyles(options) {
19
- return (tree) => __awaiter(this, void 0, void 0, function* () {
11
+ return (tree) => tslib_1.__awaiter(this, void 0, void 0, function* () {
20
12
  const workspace = yield workspace_2.getWorkspace(tree);
21
13
  const project = get_project_1.getProject(options, workspace);
22
14
  return addTaigaStylesToAngularJson(workspace, project);
@@ -1,20 +1,12 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
12
4
  const workspace_1 = require("@schematics/angular/utility/workspace");
13
5
  const ng_morph_1 = require("ng-morph");
14
6
  const get_project_1 = require("../../utils/get-project");
15
7
  const get_project_target_options_1 = require("../../utils/get-project-target-options");
16
8
  function wrapWithTuiRootComponent(options) {
17
- return (tree, context) => __awaiter(this, void 0, void 0, function* () {
9
+ return (tree, context) => tslib_1.__awaiter(this, void 0, void 0, function* () {
18
10
  const workspace = yield workspace_1.getWorkspace(tree);
19
11
  const project = get_project_1.getProject(options, workspace);
20
12
  const buildOptions = get_project_target_options_1.getProjectTargetOptions(project, 'build');
@@ -1,14 +1,6 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
12
4
  const ng_morph_1 = require("ng-morph");
13
5
  const versions_1 = require("../ng-add/constants/versions");
14
6
  const replace_enums_1 = require("./steps/replace-enums");
@@ -16,7 +8,7 @@ const rename_types_1 = require("./steps/rename-types");
16
8
  const replace_const_1 = require("./steps/replace-const");
17
9
  const replace_deep_import_1 = require("./steps/replace-deep-import");
18
10
  function updateToV3(_) {
19
- return (tree, context) => __awaiter(this, void 0, void 0, function* () {
11
+ return (tree, context) => tslib_1.__awaiter(this, void 0, void 0, function* () {
20
12
  context.logger.info(`taiga packages will be updated to ${versions_1.TAIGA_VERSION}`);
21
13
  ng_morph_1.setActiveProject(ng_morph_1.createProject(tree, '/', '**/**'));
22
14
  replace_deep_import_1.replaceDeepImports();
package/tokens/index.d.ts CHANGED
@@ -4,6 +4,7 @@ export * from './default-renderer';
4
4
  export * from './dialogs';
5
5
  export * from './focusable-item-accessor';
6
6
  export * from './is-android';
7
+ export * from './is-apple';
7
8
  export * from './is-cypress';
8
9
  export * from './is-ios';
9
10
  export * from './is-mobile';
@@ -0,0 +1,2 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ export declare const TUI_IS_APPLE: InjectionToken<boolean>;
@@ -1 +1 @@
1
- {"__symbolic":"module","version":4,"metadata":{"TUI_ACTIVE_ELEMENT":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":22,"character":38},"arguments":["Active element on the document for ActiveZone",{"__symbolic":"error","message":"Lambda not supported","line":25,"character":17,"module":"./active-element"}]},"TUI_ALERTS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":4,"character":30},"arguments":["A stream of alerts",{"__symbolic":"error","message":"Lambda not supported","line":7,"character":13,"module":"./alerts"}]},"TUI_DEFAULT_RENDERER":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":40},"arguments":["A Renderer2 for global services",{"__symbolic":"error","message":"Lambda not supported","line":7,"character":17,"module":"./default-renderer"}]},"TUI_DIALOGS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":4,"character":31},"arguments":["A stream of dialogs",{"__symbolic":"error","message":"Lambda not supported","line":7,"character":13,"module":"./dialogs"}]},"TUI_FOCUSABLE_ITEM_ACCESSOR":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":4,"character":8},"arguments":["A component that can be focused"]},"TUI_IS_ANDROID":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":5,"character":34},"arguments":["Mobile browser that is not iOS (technically includes Windows Phone, Blackberry etc.)",{"__symbolic":"error","message":"Lambda not supported","line":8,"character":17,"module":"./is-android"}]},"WindowWithCypress":{"__symbolic":"interface"},"TUI_IS_CYPRESS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":10,"character":34},"arguments":["Detect if app is running under Cypress",{"__symbolic":"error","message":"Lambda not supported","line":13,"character":17,"module":"./is-cypress"}]},"TUI_IS_IOS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":5,"character":30},"arguments":["iOS browser detection",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":13,"module":"./is-ios"}]},"TUI_IS_MOBILE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":9,"character":33},"arguments":["Mobile browser detection",{"__symbolic":"error","message":"Lambda not supported","line":10,"character":13,"module":"./is-mobile"}]},"TUI_REMOVED_ELEMENT":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":5,"character":39},"arguments":["Element currently being removed by AnimationEngine",{"__symbolic":"error","message":"Lambda not supported","line":8,"character":17,"module":"./removed-element"}]},"TUI_SANITIZER":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":33},"arguments":["A custom Sanitizer to sanitize source before inlining"]},"TUI_SWIPE_OPTIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":37},"arguments":["Swipe options",{"__symbolic":"error","message":"Lambda not supported","line":4,"character":13,"module":"./swipe-options"}]},"TUI_TAKE_ONLY_TRUSTED_EVENTS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":9,"character":8},"arguments":["This token need for override behavior the `pressedObservable` function",{"__symbolic":"error","message":"Lambda not supported","line":12,"character":21,"module":"./take-only-trusted-events"}]},"TUI_TOUCH_SUPPORTED":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":39},"arguments":["Touch support detection",{"__symbolic":"error","message":"Lambda not supported","line":4,"character":13,"module":"./touch-supported"}]},"TUI_WINDOW_HEIGHT":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":6,"character":37},"arguments":["Window height accounting for disappearing address bar",{"__symbolic":"error","message":"Lambda not supported","line":9,"character":17,"module":"./window-height"}]},"TUI_ZOOM_OPTIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":36},"arguments":["Zoom options",{"__symbolic":"error","message":"Lambda not supported","line":4,"character":13,"module":"./zoom-options"}]}},"origins":{"TUI_ACTIVE_ELEMENT":"./active-element","TUI_ALERTS":"./alerts","TUI_DEFAULT_RENDERER":"./default-renderer","TUI_DIALOGS":"./dialogs","TUI_FOCUSABLE_ITEM_ACCESSOR":"./focusable-item-accessor","TUI_IS_ANDROID":"./is-android","WindowWithCypress":"./is-cypress","TUI_IS_CYPRESS":"./is-cypress","TUI_IS_IOS":"./is-ios","TUI_IS_MOBILE":"./is-mobile","TUI_REMOVED_ELEMENT":"./removed-element","TUI_SANITIZER":"./sanitizer","TUI_SWIPE_OPTIONS":"./swipe-options","TUI_TAKE_ONLY_TRUSTED_EVENTS":"./take-only-trusted-events","TUI_TOUCH_SUPPORTED":"./touch-supported","TUI_WINDOW_HEIGHT":"./window-height","TUI_ZOOM_OPTIONS":"./zoom-options"},"importAs":"@taiga-ui/cdk/tokens"}
1
+ {"__symbolic":"module","version":4,"metadata":{"TUI_ACTIVE_ELEMENT":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":22,"character":38},"arguments":["Active element on the document for ActiveZone",{"__symbolic":"error","message":"Lambda not supported","line":25,"character":17,"module":"./active-element"}]},"TUI_ALERTS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":4,"character":30},"arguments":["A stream of alerts",{"__symbolic":"error","message":"Lambda not supported","line":7,"character":13,"module":"./alerts"}]},"TUI_DEFAULT_RENDERER":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":40},"arguments":["A Renderer2 for global services",{"__symbolic":"error","message":"Lambda not supported","line":7,"character":17,"module":"./default-renderer"}]},"TUI_DIALOGS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":4,"character":31},"arguments":["A stream of dialogs",{"__symbolic":"error","message":"Lambda not supported","line":7,"character":13,"module":"./dialogs"}]},"TUI_FOCUSABLE_ITEM_ACCESSOR":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":4,"character":8},"arguments":["A component that can be focused"]},"TUI_IS_ANDROID":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":5,"character":34},"arguments":["Mobile browser that is not iOS (technically includes Windows Phone, Blackberry etc.)",{"__symbolic":"error","message":"Lambda not supported","line":8,"character":17,"module":"./is-android"}]},"TUI_IS_APPLE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":4,"character":32},"arguments":["Apple(safari/webkit) detection",{"__symbolic":"error","message":"Lambda not supported","line":6,"character":14,"module":"./is-apple"}]},"WindowWithCypress":{"__symbolic":"interface"},"TUI_IS_CYPRESS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":10,"character":34},"arguments":["Detect if app is running under Cypress",{"__symbolic":"error","message":"Lambda not supported","line":13,"character":17,"module":"./is-cypress"}]},"TUI_IS_IOS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":4,"character":30},"arguments":["iOS browser detection",{"__symbolic":"error","message":"Lambda not supported","line":5,"character":13,"module":"./is-ios"}]},"TUI_IS_MOBILE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":9,"character":33},"arguments":["Mobile browser detection",{"__symbolic":"error","message":"Lambda not supported","line":10,"character":13,"module":"./is-mobile"}]},"TUI_REMOVED_ELEMENT":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":5,"character":39},"arguments":["Element currently being removed by AnimationEngine",{"__symbolic":"error","message":"Lambda not supported","line":8,"character":17,"module":"./removed-element"}]},"TUI_SANITIZER":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":33},"arguments":["A custom Sanitizer to sanitize source before inlining"]},"TUI_SWIPE_OPTIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":37},"arguments":["Swipe options",{"__symbolic":"error","message":"Lambda not supported","line":4,"character":13,"module":"./swipe-options"}]},"TUI_TAKE_ONLY_TRUSTED_EVENTS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":9,"character":8},"arguments":["This token need for override behavior the `pressedObservable` function",{"__symbolic":"error","message":"Lambda not supported","line":12,"character":21,"module":"./take-only-trusted-events"}]},"TUI_TOUCH_SUPPORTED":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":39},"arguments":["Touch support detection",{"__symbolic":"error","message":"Lambda not supported","line":4,"character":13,"module":"./touch-supported"}]},"TUI_WINDOW_HEIGHT":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":6,"character":37},"arguments":["Window height accounting for disappearing address bar",{"__symbolic":"error","message":"Lambda not supported","line":9,"character":17,"module":"./window-height"}]},"TUI_ZOOM_OPTIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":36},"arguments":["Zoom options",{"__symbolic":"error","message":"Lambda not supported","line":4,"character":13,"module":"./zoom-options"}]}},"origins":{"TUI_ACTIVE_ELEMENT":"./active-element","TUI_ALERTS":"./alerts","TUI_DEFAULT_RENDERER":"./default-renderer","TUI_DIALOGS":"./dialogs","TUI_FOCUSABLE_ITEM_ACCESSOR":"./focusable-item-accessor","TUI_IS_ANDROID":"./is-android","TUI_IS_APPLE":"./is-apple","WindowWithCypress":"./is-cypress","TUI_IS_CYPRESS":"./is-cypress","TUI_IS_IOS":"./is-ios","TUI_IS_MOBILE":"./is-mobile","TUI_REMOVED_ELEMENT":"./removed-element","TUI_SANITIZER":"./sanitizer","TUI_SWIPE_OPTIONS":"./swipe-options","TUI_TAKE_ONLY_TRUSTED_EVENTS":"./take-only-trusted-events","TUI_TOUCH_SUPPORTED":"./touch-supported","TUI_WINDOW_HEIGHT":"./window-height","TUI_ZOOM_OPTIONS":"./zoom-options"},"importAs":"@taiga-ui/cdk/tokens"}
@@ -1,5 +1,5 @@
1
1
  export * from './is-edge';
2
2
  export * from './is-edge-older-than';
3
3
  export * from './is-firefox';
4
- export * from './is-IE';
4
+ export * from './is-ie';
5
5
  export * from './is-safari';
File without changes
@@ -1 +1 @@
1
- {"__symbolic":"module","version":4,"metadata":{"isEdge":{"__symbolic":"function","parameters":["userAgent"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"userAgent"},"member":"toLowerCase"}},"member":"includes"},"arguments":["edge"]}},"isEdgeOlderThan":{"__symbolic":"function"},"isFirefox":{"__symbolic":"function","parameters":["userAgent"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"userAgent"},"member":"toLowerCase"}},"member":"includes"},"arguments":["firefox"]}},"isIE":{"__symbolic":"function","parameters":["userAgent"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"userAgent"},"member":"toLowerCase"}},"member":"includes"},"arguments":["trident"]}},"isSafari":{"__symbolic":"function"}},"origins":{"isEdge":"./is-edge","isEdgeOlderThan":"./is-edge-older-than","isFirefox":"./is-firefox","isIE":"./is-IE","isSafari":"./is-safari"},"importAs":"@taiga-ui/cdk/utils/browser"}
1
+ {"__symbolic":"module","version":4,"metadata":{"isEdge":{"__symbolic":"function","parameters":["userAgent"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"userAgent"},"member":"toLowerCase"}},"member":"includes"},"arguments":["edge"]}},"isEdgeOlderThan":{"__symbolic":"function"},"isFirefox":{"__symbolic":"function","parameters":["userAgent"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"userAgent"},"member":"toLowerCase"}},"member":"includes"},"arguments":["firefox"]}},"isIE":{"__symbolic":"function","parameters":["userAgent"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"userAgent"},"member":"toLowerCase"}},"member":"includes"},"arguments":["trident"]}},"isSafari":{"__symbolic":"function"}},"origins":{"isEdge":"./is-edge","isEdgeOlderThan":"./is-edge-older-than","isFirefox":"./is-firefox","isIE":"./is-ie","isSafari":"./is-safari"},"importAs":"@taiga-ui/cdk/utils/browser"}
@@ -1,4 +1,6 @@
1
1
  /**
2
+ * @deprecated: use native element.focus()
3
+ * TODO: remove in v3.0
2
4
  * Focuses or blurs and element
3
5
  *
4
6
  * @param element native element
package/utils/index.d.ts CHANGED
@@ -4,3 +4,5 @@ export * from '@taiga-ui/cdk/utils/focus';
4
4
  export * from '@taiga-ui/cdk/utils/format';
5
5
  export * from '@taiga-ui/cdk/utils/math';
6
6
  export * from '@taiga-ui/cdk/utils/miscellaneous';
7
+ export * from '@taiga-ui/cdk/utils/os';
8
+ export * from '@taiga-ui/cdk/utils/svg';
@@ -0,0 +1,2 @@
1
+ export * from './is-apple';
2
+ export * from './is-ios';
@@ -0,0 +1 @@
1
+ export declare function isApple(navigator: Navigator): boolean;
@@ -0,0 +1 @@
1
+ export declare function isIos(navigator: Navigator): boolean;
@@ -0,0 +1,13 @@
1
+ {
2
+ "main": "../../bundles/taiga-ui-cdk-utils-os.umd.js",
3
+ "module": "../../fesm5/taiga-ui-cdk-utils-os.js",
4
+ "es2015": "../../fesm2015/taiga-ui-cdk-utils-os.js",
5
+ "esm5": "../../esm5/utils/os/taiga-ui-cdk-utils-os.js",
6
+ "esm2015": "../../esm2015/utils/os/taiga-ui-cdk-utils-os.js",
7
+ "fesm5": "../../fesm5/taiga-ui-cdk-utils-os.js",
8
+ "fesm2015": "../../fesm2015/taiga-ui-cdk-utils-os.js",
9
+ "typings": "taiga-ui-cdk-utils-os.d.ts",
10
+ "metadata": "taiga-ui-cdk-utils-os.metadata.json",
11
+ "sideEffects": false,
12
+ "name": "@taiga-ui/cdk/utils/os"
13
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
@@ -0,0 +1 @@
1
+ {"__symbolic":"module","version":4,"metadata":{"isApple":{"__symbolic":"function","parameters":["navigator"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isIos"},"arguments":[{"__symbolic":"reference","name":"navigator"}]},"right":{"__symbolic":"error","message":"Reference to a local symbol","line":2,"character":6,"context":{"name":"SAFARI_REG_EXP"},"module":"./is-apple"}}},"isIos":{"__symbolic":"function"}},"origins":{"isApple":"./is-apple","isIos":"./is-ios"},"importAs":"@taiga-ui/cdk/utils/os"}