@taiga-ui/addon-mobile 2.59.1 → 3.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (509) hide show
  1. package/bundles/taiga-ui-addon-mobile-components-mobile-calendar-dialog.umd.js +69 -283
  2. package/bundles/taiga-ui-addon-mobile-components-mobile-calendar-dialog.umd.js.map +1 -1
  3. package/bundles/taiga-ui-addon-mobile-components-mobile-calendar.umd.js +534 -406
  4. package/bundles/taiga-ui-addon-mobile-components-mobile-calendar.umd.js.map +1 -1
  5. package/bundles/taiga-ui-addon-mobile-components-mobile-dialog.umd.js +402 -293
  6. package/bundles/taiga-ui-addon-mobile-components-mobile-dialog.umd.js.map +1 -1
  7. package/bundles/taiga-ui-addon-mobile-components-pull-to-refresh.umd.js +450 -337
  8. package/bundles/taiga-ui-addon-mobile-components-pull-to-refresh.umd.js.map +1 -1
  9. package/bundles/taiga-ui-addon-mobile-components-sheet.umd.js +875 -698
  10. package/bundles/taiga-ui-addon-mobile-components-sheet.umd.js.map +1 -1
  11. package/bundles/taiga-ui-addon-mobile-components-theme-android.umd.js +374 -266
  12. package/bundles/taiga-ui-addon-mobile-components-theme-android.umd.js.map +1 -1
  13. package/bundles/taiga-ui-addon-mobile-components-theme-ios.umd.js +374 -266
  14. package/bundles/taiga-ui-addon-mobile-components-theme-ios.umd.js.map +1 -1
  15. package/bundles/taiga-ui-addon-mobile-components.umd.js +17 -31
  16. package/bundles/taiga-ui-addon-mobile-components.umd.js.map +1 -1
  17. package/bundles/taiga-ui-addon-mobile-const.umd.js +9 -254
  18. package/bundles/taiga-ui-addon-mobile-const.umd.js.map +1 -1
  19. package/bundles/taiga-ui-addon-mobile-directives-elastic-sticky.umd.js +419 -308
  20. package/bundles/taiga-ui-addon-mobile-directives-elastic-sticky.umd.js.map +1 -1
  21. package/bundles/taiga-ui-addon-mobile-directives-mobile-tabs.umd.js +118 -325
  22. package/bundles/taiga-ui-addon-mobile-directives-mobile-tabs.umd.js.map +1 -1
  23. package/bundles/taiga-ui-addon-mobile-directives-ripple.umd.js +121 -338
  24. package/bundles/taiga-ui-addon-mobile-directives-ripple.umd.js.map +1 -1
  25. package/bundles/taiga-ui-addon-mobile-directives-sidebar.umd.js +434 -319
  26. package/bundles/taiga-ui-addon-mobile-directives-sidebar.umd.js.map +1 -1
  27. package/bundles/taiga-ui-addon-mobile-directives-touchable.umd.js +403 -287
  28. package/bundles/taiga-ui-addon-mobile-directives-touchable.umd.js.map +1 -1
  29. package/bundles/taiga-ui-addon-mobile-directives.umd.js +13 -23
  30. package/bundles/taiga-ui-addon-mobile-directives.umd.js.map +1 -1
  31. package/bundles/taiga-ui-addon-mobile-interfaces.umd.js +2 -2
  32. package/bundles/taiga-ui-addon-mobile-interfaces.umd.js.map +1 -1
  33. package/bundles/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.umd.js +405 -283
  34. package/bundles/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.umd.js.map +1 -1
  35. package/bundles/taiga-ui-addon-mobile-internal.umd.js +5 -7
  36. package/bundles/taiga-ui-addon-mobile-internal.umd.js.map +1 -1
  37. package/bundles/taiga-ui-addon-mobile-tokens.umd.js +7 -3
  38. package/bundles/taiga-ui-addon-mobile-tokens.umd.js.map +1 -1
  39. package/bundles/taiga-ui-addon-mobile-types.umd.js +2 -2
  40. package/bundles/taiga-ui-addon-mobile-types.umd.js.map +1 -1
  41. package/bundles/taiga-ui-addon-mobile-utils.umd.js +8 -10
  42. package/bundles/taiga-ui-addon-mobile-utils.umd.js.map +1 -1
  43. package/bundles/taiga-ui-addon-mobile.umd.js +24 -30
  44. package/bundles/taiga-ui-addon-mobile.umd.js.map +1 -1
  45. package/components/mobile-calendar/mobile-calendar.component.d.ts +21 -2
  46. package/components/mobile-calendar/mobile-calendar.module.d.ts +12 -0
  47. package/components/mobile-calendar/mobile-calendar.providers.d.ts +1 -2
  48. package/components/mobile-calendar/package.json +2 -5
  49. package/components/mobile-calendar/taiga-ui-addon-mobile-components-mobile-calendar.d.ts +1 -0
  50. package/components/mobile-calendar-dialog/mobile-calendar-dialog.component.d.ts +3 -0
  51. package/components/mobile-calendar-dialog/mobile-calendar-dialog.module.d.ts +6 -2
  52. package/components/mobile-calendar-dialog/package.json +2 -5
  53. package/components/mobile-calendar-dialog/taiga-ui-addon-mobile-components-mobile-calendar-dialog.d.ts +1 -0
  54. package/components/mobile-dialog/mobile-dialog.component.d.ts +3 -0
  55. package/components/mobile-dialog/mobile-dialog.module.d.ts +9 -0
  56. package/components/mobile-dialog/mobile-dialog.service.d.ts +4 -1
  57. package/components/mobile-dialog/package.json +2 -5
  58. package/components/mobile-dialog/taiga-ui-addon-mobile-components-mobile-dialog.d.ts +1 -0
  59. package/components/package.json +2 -5
  60. package/components/pull-to-refresh/loader-android/loader-android.component.d.ts +3 -0
  61. package/components/pull-to-refresh/loader-ios/loader-ios.component.d.ts +3 -0
  62. package/components/pull-to-refresh/package.json +2 -5
  63. package/components/pull-to-refresh/pull-to-refresh.component.d.ts +3 -0
  64. package/components/pull-to-refresh/pull-to-refresh.module.d.ts +10 -0
  65. package/components/pull-to-refresh/pull-to-refresh.providers.d.ts +1 -2
  66. package/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.d.ts +1 -0
  67. package/components/sheet/components/sheet/sheet.component.d.ts +5 -2
  68. package/components/sheet/components/sheet/sheet.providers.d.ts +1 -8
  69. package/components/sheet/components/sheet-bar/sheet-bar.component.d.ts +5 -2
  70. package/components/sheet/components/sheet-heading/sheet-heading.component.d.ts +3 -0
  71. package/components/sheet/components/sheets-host/sheets-host.component.d.ts +3 -0
  72. package/components/sheet/directives/sheet-close/sheet-close.directive.d.ts +3 -0
  73. package/components/sheet/directives/sheet-stop/sheet-stop.directive.d.ts +3 -0
  74. package/components/sheet/directives/sheet-top/sheet-top.directive.d.ts +5 -2
  75. package/components/sheet/directives/sheet-wrapper/sheet-wrapper.directive.d.ts +3 -0
  76. package/components/sheet/package.json +2 -5
  77. package/components/sheet/sheet-options.d.ts +1 -1
  78. package/components/sheet/sheet-tokens.d.ts +5 -0
  79. package/components/sheet/sheet.d.ts +4 -0
  80. package/components/sheet/sheet.directive.d.ts +3 -0
  81. package/components/sheet/sheet.module.d.ts +17 -0
  82. package/components/sheet/sheet.service.d.ts +3 -0
  83. package/components/sheet/taiga-ui-addon-mobile-components-sheet.d.ts +1 -0
  84. package/components/taiga-ui-addon-mobile-components.d.ts +1 -0
  85. package/components/theme-android/package.json +2 -5
  86. package/components/theme-android/taiga-ui-addon-mobile-components-theme-android.d.ts +1 -0
  87. package/components/theme-android/theme-android.component.d.ts +3 -0
  88. package/components/theme-android/theme-android.module.d.ts +5 -0
  89. package/components/theme-ios/package.json +2 -5
  90. package/components/theme-ios/taiga-ui-addon-mobile-components-theme-ios.d.ts +1 -0
  91. package/components/theme-ios/theme-ios.component.d.ts +3 -0
  92. package/components/theme-ios/theme-ios.module.d.ts +5 -0
  93. package/const/package.json +2 -5
  94. package/const/taiga-ui-addon-mobile-const.d.ts +1 -0
  95. package/directives/elastic-sticky/elastic-sticky.directive.d.ts +3 -0
  96. package/directives/elastic-sticky/elastic-sticky.module.d.ts +5 -0
  97. package/directives/elastic-sticky/elastic-sticky.service.d.ts +3 -0
  98. package/directives/elastic-sticky/package.json +2 -5
  99. package/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.d.ts +1 -0
  100. package/directives/mobile-tabs/mobile-tabs.component.d.ts +3 -0
  101. package/directives/mobile-tabs/mobile-tabs.directive.d.ts +3 -0
  102. package/directives/mobile-tabs/mobile-tabs.module.d.ts +6 -0
  103. package/directives/mobile-tabs/package.json +2 -5
  104. package/directives/mobile-tabs/taiga-ui-addon-mobile-directives-mobile-tabs.d.ts +1 -0
  105. package/directives/package.json +2 -5
  106. package/directives/ripple/package.json +2 -5
  107. package/directives/ripple/ripple-styles.component.d.ts +3 -0
  108. package/directives/ripple/ripple.directive.d.ts +3 -0
  109. package/directives/ripple/ripple.module.d.ts +6 -0
  110. package/directives/ripple/ripple.providers.d.ts +1 -3
  111. package/directives/ripple/taiga-ui-addon-mobile-directives-ripple.d.ts +1 -1
  112. package/directives/sidebar/package.json +2 -5
  113. package/directives/sidebar/sidebar.component.d.ts +3 -0
  114. package/directives/sidebar/sidebar.directive.d.ts +7 -4
  115. package/directives/sidebar/sidebar.module.d.ts +8 -0
  116. package/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.d.ts +1 -0
  117. package/directives/taiga-ui-addon-mobile-directives.d.ts +1 -0
  118. package/directives/touchable/package.json +2 -5
  119. package/directives/touchable/taiga-ui-addon-mobile-directives-touchable.d.ts +1 -0
  120. package/directives/touchable/touchable.directive.d.ts +6 -3
  121. package/directives/touchable/touchable.module.d.ts +5 -0
  122. package/esm2015/components/index.js +1 -1
  123. package/esm2015/components/mobile-calendar/index.js +1 -1
  124. package/esm2015/components/mobile-calendar/mobile-calendar.component.js +78 -59
  125. package/esm2015/components/mobile-calendar/mobile-calendar.const.js +1 -1
  126. package/esm2015/components/mobile-calendar/mobile-calendar.module.js +34 -13
  127. package/esm2015/components/mobile-calendar/mobile-calendar.providers.js +7 -9
  128. package/esm2015/components/mobile-calendar/mobile-calendar.strategy.js +1 -1
  129. package/esm2015/components/mobile-calendar/taiga-ui-addon-mobile-components-mobile-calendar.js +1 -1
  130. package/esm2015/components/mobile-calendar-dialog/index.js +1 -1
  131. package/esm2015/components/mobile-calendar-dialog/mobile-calendar-dialog.component.js +19 -17
  132. package/esm2015/components/mobile-calendar-dialog/mobile-calendar-dialog.module.js +27 -21
  133. package/esm2015/components/mobile-calendar-dialog/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js +1 -1
  134. package/esm2015/components/mobile-dialog/index.js +2 -1
  135. package/esm2015/components/mobile-dialog/mobile-dialog-options.js +2 -1
  136. package/esm2015/components/mobile-dialog/mobile-dialog.component.js +28 -23
  137. package/esm2015/components/mobile-dialog/mobile-dialog.module.js +17 -21
  138. package/esm2015/components/mobile-dialog/mobile-dialog.service.js +11 -12
  139. package/esm2015/components/mobile-dialog/taiga-ui-addon-mobile-components-mobile-dialog.js +1 -1
  140. package/esm2015/components/pull-to-refresh/index.js +1 -1
  141. package/esm2015/components/pull-to-refresh/loader-android/loader-android.component.js +21 -19
  142. package/esm2015/components/pull-to-refresh/loader-ios/loader-ios.component.js +19 -16
  143. package/esm2015/components/pull-to-refresh/pull-to-refresh.component.js +31 -24
  144. package/esm2015/components/pull-to-refresh/pull-to-refresh.module.js +21 -16
  145. package/esm2015/components/pull-to-refresh/pull-to-refresh.providers.js +15 -14
  146. package/esm2015/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.js +1 -1
  147. package/esm2015/components/sheet/components/sheet/sheet.component.js +66 -57
  148. package/esm2015/components/sheet/components/sheet/sheet.providers.js +17 -21
  149. package/esm2015/components/sheet/components/sheet-bar/sheet-bar.component.js +31 -28
  150. package/esm2015/components/sheet/components/sheet-heading/sheet-heading.component.js +29 -23
  151. package/esm2015/components/sheet/components/sheets-host/sheets-host.component.js +33 -24
  152. package/esm2015/components/sheet/directives/sheet-close/sheet-close.directive.js +38 -32
  153. package/esm2015/components/sheet/directives/sheet-stop/sheet-stop.directive.js +30 -25
  154. package/esm2015/components/sheet/directives/sheet-top/sheet-top.directive.js +38 -34
  155. package/esm2015/components/sheet/directives/sheet-wrapper/sheet-wrapper.directive.js +40 -39
  156. package/esm2015/components/sheet/index.js +2 -1
  157. package/esm2015/components/sheet/ios.hacks.js +7 -7
  158. package/esm2015/components/sheet/sheet-options.js +3 -4
  159. package/esm2015/components/sheet/sheet-tokens.js +5 -0
  160. package/esm2015/components/sheet/sheet.directive.js +30 -23
  161. package/esm2015/components/sheet/sheet.js +2 -1
  162. package/esm2015/components/sheet/sheet.module.js +55 -29
  163. package/esm2015/components/sheet/sheet.service.js +14 -16
  164. package/esm2015/components/sheet/taiga-ui-addon-mobile-components-sheet.js +1 -1
  165. package/esm2015/components/taiga-ui-addon-mobile-components.js +1 -1
  166. package/esm2015/components/theme-android/index.js +1 -1
  167. package/esm2015/components/theme-android/taiga-ui-addon-mobile-components-theme-android.js +1 -1
  168. package/esm2015/components/theme-android/theme-android.component.js +16 -15
  169. package/esm2015/components/theme-android/theme-android.module.js +14 -11
  170. package/esm2015/components/theme-ios/index.js +1 -1
  171. package/esm2015/components/theme-ios/taiga-ui-addon-mobile-components-theme-ios.js +1 -1
  172. package/esm2015/components/theme-ios/theme-ios.component.js +16 -15
  173. package/esm2015/components/theme-ios/theme-ios.module.js +14 -11
  174. package/esm2015/const/index.js +1 -1
  175. package/esm2015/const/mobile-alert-options.js +1 -1
  176. package/esm2015/const/taiga-ui-addon-mobile-const.js +1 -1
  177. package/esm2015/directives/elastic-sticky/elastic-sticky.directive.js +20 -19
  178. package/esm2015/directives/elastic-sticky/elastic-sticky.module.js +14 -11
  179. package/esm2015/directives/elastic-sticky/elastic-sticky.service.js +32 -29
  180. package/esm2015/directives/elastic-sticky/index.js +1 -1
  181. package/esm2015/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.js +1 -1
  182. package/esm2015/directives/index.js +1 -1
  183. package/esm2015/directives/mobile-tabs/index.js +1 -1
  184. package/esm2015/directives/mobile-tabs/mobile-tabs.component.js +14 -12
  185. package/esm2015/directives/mobile-tabs/mobile-tabs.directive.js +36 -28
  186. package/esm2015/directives/mobile-tabs/mobile-tabs.module.js +15 -12
  187. package/esm2015/directives/mobile-tabs/taiga-ui-addon-mobile-directives-mobile-tabs.js +1 -1
  188. package/esm2015/directives/ripple/index.js +1 -1
  189. package/esm2015/directives/ripple/ripple-styles.component.js +14 -12
  190. package/esm2015/directives/ripple/ripple.directive.js +40 -33
  191. package/esm2015/directives/ripple/ripple.module.js +15 -12
  192. package/esm2015/directives/ripple/ripple.providers.js +29 -33
  193. package/esm2015/directives/ripple/taiga-ui-addon-mobile-directives-ripple.js +1 -2
  194. package/esm2015/directives/sidebar/index.js +1 -1
  195. package/esm2015/directives/sidebar/sidebar.component.js +31 -27
  196. package/esm2015/directives/sidebar/sidebar.directive.js +39 -38
  197. package/esm2015/directives/sidebar/sidebar.module.js +16 -13
  198. package/esm2015/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.js +1 -1
  199. package/esm2015/directives/taiga-ui-addon-mobile-directives.js +1 -1
  200. package/esm2015/directives/touchable/index.js +1 -1
  201. package/esm2015/directives/touchable/taiga-ui-addon-mobile-directives-touchable.js +1 -1
  202. package/esm2015/directives/touchable/touchable.directive.js +39 -29
  203. package/esm2015/directives/touchable/touchable.module.js +14 -11
  204. package/esm2015/index.js +3 -2
  205. package/esm2015/interfaces/index.js +2 -1
  206. package/esm2015/interfaces/mobile-alert-data.js +2 -1
  207. package/esm2015/interfaces/taiga-ui-addon-mobile-interfaces.js +2 -1
  208. package/esm2015/internal/index.js +1 -1
  209. package/esm2015/internal/primitive-calendar-mobile/index.js +1 -1
  210. package/esm2015/internal/primitive-calendar-mobile/primitive-calendar-mobile.component.js +28 -24
  211. package/esm2015/internal/primitive-calendar-mobile/primitive-calendar-mobile.module.js +24 -13
  212. package/esm2015/internal/primitive-calendar-mobile/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js +1 -1
  213. package/esm2015/internal/taiga-ui-addon-mobile-internal.js +1 -1
  214. package/esm2015/taiga-ui-addon-mobile.js +1 -1
  215. package/esm2015/tokens/index.js +1 -1
  216. package/esm2015/tokens/loaded.js +1 -1
  217. package/esm2015/tokens/taiga-ui-addon-mobile-tokens.js +1 -1
  218. package/esm2015/types/index.js +2 -1
  219. package/esm2015/types/taiga-ui-addon-mobile-types.js +2 -1
  220. package/esm2015/types/touch-mode.js +2 -1
  221. package/esm2015/utils/find-touch-index.js +2 -7
  222. package/esm2015/utils/index.js +1 -1
  223. package/esm2015/utils/taiga-ui-addon-mobile-utils.js +1 -1
  224. package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js +45 -35
  225. package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js.map +1 -1
  226. package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar.js +117 -77
  227. package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar.js.map +1 -1
  228. package/fesm2015/taiga-ui-addon-mobile-components-mobile-dialog.js +54 -50
  229. package/fesm2015/taiga-ui-addon-mobile-components-mobile-dialog.js.map +1 -1
  230. package/fesm2015/taiga-ui-addon-mobile-components-pull-to-refresh.js +97 -80
  231. package/fesm2015/taiga-ui-addon-mobile-components-pull-to-refresh.js.map +1 -1
  232. package/fesm2015/taiga-ui-addon-mobile-components-sheet.js +437 -370
  233. package/fesm2015/taiga-ui-addon-mobile-components-sheet.js.map +1 -1
  234. package/fesm2015/taiga-ui-addon-mobile-components-theme-android.js +27 -21
  235. package/fesm2015/taiga-ui-addon-mobile-components-theme-android.js.map +1 -1
  236. package/fesm2015/taiga-ui-addon-mobile-components-theme-ios.js +27 -21
  237. package/fesm2015/taiga-ui-addon-mobile-components-theme-ios.js.map +1 -1
  238. package/fesm2015/taiga-ui-addon-mobile-components.js.map +1 -1
  239. package/fesm2015/taiga-ui-addon-mobile-const.js.map +1 -1
  240. package/fesm2015/taiga-ui-addon-mobile-directives-elastic-sticky.js +61 -52
  241. package/fesm2015/taiga-ui-addon-mobile-directives-elastic-sticky.js.map +1 -1
  242. package/fesm2015/taiga-ui-addon-mobile-directives-mobile-tabs.js +61 -45
  243. package/fesm2015/taiga-ui-addon-mobile-directives-mobile-tabs.js.map +1 -1
  244. package/fesm2015/taiga-ui-addon-mobile-directives-ripple.js +93 -82
  245. package/fesm2015/taiga-ui-addon-mobile-directives-ripple.js.map +1 -1
  246. package/fesm2015/taiga-ui-addon-mobile-directives-sidebar.js +79 -70
  247. package/fesm2015/taiga-ui-addon-mobile-directives-sidebar.js.map +1 -1
  248. package/fesm2015/taiga-ui-addon-mobile-directives-touchable.js +51 -36
  249. package/fesm2015/taiga-ui-addon-mobile-directives-touchable.js.map +1 -1
  250. package/fesm2015/taiga-ui-addon-mobile-directives.js.map +1 -1
  251. package/fesm2015/taiga-ui-addon-mobile-interfaces.js.map +1 -1
  252. package/fesm2015/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js +50 -33
  253. package/fesm2015/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js.map +1 -1
  254. package/fesm2015/taiga-ui-addon-mobile-internal.js.map +1 -1
  255. package/fesm2015/taiga-ui-addon-mobile-tokens.js.map +1 -1
  256. package/fesm2015/taiga-ui-addon-mobile-types.js.map +1 -1
  257. package/fesm2015/taiga-ui-addon-mobile-utils.js +2 -7
  258. package/fesm2015/taiga-ui-addon-mobile-utils.js.map +1 -1
  259. package/fesm2015/taiga-ui-addon-mobile.js +2 -1
  260. package/fesm2015/taiga-ui-addon-mobile.js.map +1 -1
  261. package/index.d.ts +0 -1
  262. package/interfaces/package.json +2 -5
  263. package/interfaces/taiga-ui-addon-mobile-interfaces.d.ts +1 -0
  264. package/internal/package.json +2 -5
  265. package/internal/primitive-calendar-mobile/package.json +2 -5
  266. package/internal/primitive-calendar-mobile/primitive-calendar-mobile.component.d.ts +3 -1
  267. package/internal/primitive-calendar-mobile/primitive-calendar-mobile.module.d.ts +8 -0
  268. package/internal/primitive-calendar-mobile/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.d.ts +1 -0
  269. package/internal/taiga-ui-addon-mobile-internal.d.ts +1 -0
  270. package/package.json +12 -15
  271. package/taiga-ui-addon-mobile.d.ts +1 -0
  272. package/tokens/package.json +2 -5
  273. package/tokens/taiga-ui-addon-mobile-tokens.d.ts +1 -0
  274. package/types/package.json +2 -5
  275. package/types/taiga-ui-addon-mobile-types.d.ts +1 -0
  276. package/types/touch-mode.d.ts +1 -1
  277. package/utils/find-touch-index.d.ts +1 -5
  278. package/utils/package.json +2 -5
  279. package/utils/taiga-ui-addon-mobile-utils.d.ts +1 -0
  280. package/bundles/taiga-ui-addon-mobile-components-mobile-calendar-dialog.umd.min.js +0 -2
  281. package/bundles/taiga-ui-addon-mobile-components-mobile-calendar-dialog.umd.min.js.map +0 -1
  282. package/bundles/taiga-ui-addon-mobile-components-mobile-calendar.umd.min.js +0 -2
  283. package/bundles/taiga-ui-addon-mobile-components-mobile-calendar.umd.min.js.map +0 -1
  284. package/bundles/taiga-ui-addon-mobile-components-mobile-dialog.umd.min.js +0 -2
  285. package/bundles/taiga-ui-addon-mobile-components-mobile-dialog.umd.min.js.map +0 -1
  286. package/bundles/taiga-ui-addon-mobile-components-pull-to-refresh.umd.min.js +0 -2
  287. package/bundles/taiga-ui-addon-mobile-components-pull-to-refresh.umd.min.js.map +0 -1
  288. package/bundles/taiga-ui-addon-mobile-components-sheet.umd.min.js +0 -2
  289. package/bundles/taiga-ui-addon-mobile-components-sheet.umd.min.js.map +0 -1
  290. package/bundles/taiga-ui-addon-mobile-components-theme-android.umd.min.js +0 -2
  291. package/bundles/taiga-ui-addon-mobile-components-theme-android.umd.min.js.map +0 -1
  292. package/bundles/taiga-ui-addon-mobile-components-theme-ios.umd.min.js +0 -2
  293. package/bundles/taiga-ui-addon-mobile-components-theme-ios.umd.min.js.map +0 -1
  294. package/bundles/taiga-ui-addon-mobile-components.umd.min.js +0 -2
  295. package/bundles/taiga-ui-addon-mobile-components.umd.min.js.map +0 -1
  296. package/bundles/taiga-ui-addon-mobile-const.umd.min.js +0 -2
  297. package/bundles/taiga-ui-addon-mobile-const.umd.min.js.map +0 -1
  298. package/bundles/taiga-ui-addon-mobile-directives-elastic-sticky.umd.min.js +0 -2
  299. package/bundles/taiga-ui-addon-mobile-directives-elastic-sticky.umd.min.js.map +0 -1
  300. package/bundles/taiga-ui-addon-mobile-directives-mobile-tabs.umd.min.js +0 -2
  301. package/bundles/taiga-ui-addon-mobile-directives-mobile-tabs.umd.min.js.map +0 -1
  302. package/bundles/taiga-ui-addon-mobile-directives-ripple.umd.min.js +0 -2
  303. package/bundles/taiga-ui-addon-mobile-directives-ripple.umd.min.js.map +0 -1
  304. package/bundles/taiga-ui-addon-mobile-directives-sidebar.umd.min.js +0 -2
  305. package/bundles/taiga-ui-addon-mobile-directives-sidebar.umd.min.js.map +0 -1
  306. package/bundles/taiga-ui-addon-mobile-directives-touchable.umd.min.js +0 -2
  307. package/bundles/taiga-ui-addon-mobile-directives-touchable.umd.min.js.map +0 -1
  308. package/bundles/taiga-ui-addon-mobile-directives.umd.min.js +0 -2
  309. package/bundles/taiga-ui-addon-mobile-directives.umd.min.js.map +0 -1
  310. package/bundles/taiga-ui-addon-mobile-enums.umd.js +0 -20
  311. package/bundles/taiga-ui-addon-mobile-enums.umd.js.map +0 -1
  312. package/bundles/taiga-ui-addon-mobile-enums.umd.min.js +0 -2
  313. package/bundles/taiga-ui-addon-mobile-enums.umd.min.js.map +0 -1
  314. package/bundles/taiga-ui-addon-mobile-interfaces.umd.min.js +0 -2
  315. package/bundles/taiga-ui-addon-mobile-interfaces.umd.min.js.map +0 -1
  316. package/bundles/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.umd.min.js +0 -2
  317. package/bundles/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.umd.min.js.map +0 -1
  318. package/bundles/taiga-ui-addon-mobile-internal.umd.min.js +0 -2
  319. package/bundles/taiga-ui-addon-mobile-internal.umd.min.js.map +0 -1
  320. package/bundles/taiga-ui-addon-mobile-tokens.umd.min.js +0 -2
  321. package/bundles/taiga-ui-addon-mobile-tokens.umd.min.js.map +0 -1
  322. package/bundles/taiga-ui-addon-mobile-types.umd.min.js +0 -2
  323. package/bundles/taiga-ui-addon-mobile-types.umd.min.js.map +0 -1
  324. package/bundles/taiga-ui-addon-mobile-utils.umd.min.js +0 -2
  325. package/bundles/taiga-ui-addon-mobile-utils.umd.min.js.map +0 -1
  326. package/bundles/taiga-ui-addon-mobile.umd.min.js +0 -2
  327. package/bundles/taiga-ui-addon-mobile.umd.min.js.map +0 -1
  328. package/components/mobile-calendar/taiga-ui-addon-mobile-components-mobile-calendar.metadata.json +0 -1
  329. package/components/mobile-calendar-dialog/taiga-ui-addon-mobile-components-mobile-calendar-dialog.metadata.json +0 -1
  330. package/components/mobile-dialog/taiga-ui-addon-mobile-components-mobile-dialog.metadata.json +0 -1
  331. package/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.metadata.json +0 -1
  332. package/components/sheet/taiga-ui-addon-mobile-components-sheet.metadata.json +0 -1
  333. package/components/taiga-ui-addon-mobile-components.metadata.json +0 -1
  334. package/components/theme-android/taiga-ui-addon-mobile-components-theme-android.metadata.json +0 -1
  335. package/components/theme-ios/taiga-ui-addon-mobile-components-theme-ios.metadata.json +0 -1
  336. package/const/taiga-ui-addon-mobile-const.metadata.json +0 -1
  337. package/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.metadata.json +0 -1
  338. package/directives/mobile-tabs/taiga-ui-addon-mobile-directives-mobile-tabs.metadata.json +0 -1
  339. package/directives/ripple/taiga-ui-addon-mobile-directives-ripple.metadata.json +0 -1
  340. package/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.metadata.json +0 -1
  341. package/directives/taiga-ui-addon-mobile-directives.metadata.json +0 -1
  342. package/directives/touchable/taiga-ui-addon-mobile-directives-touchable.metadata.json +0 -1
  343. package/enums/index.d.ts +0 -1
  344. package/enums/package.json +0 -13
  345. package/enums/taiga-ui-addon-mobile-enums.d.ts +0 -4
  346. package/enums/taiga-ui-addon-mobile-enums.metadata.json +0 -1
  347. package/enums/touch-mode.d.ts +0 -8
  348. package/esm2015/enums/index.js +0 -2
  349. package/esm2015/enums/taiga-ui-addon-mobile-enums.js +0 -5
  350. package/esm2015/enums/touch-mode.js +0 -10
  351. package/esm5/components/index.js +0 -8
  352. package/esm5/components/mobile-calendar/index.js +0 -6
  353. package/esm5/components/mobile-calendar/mobile-calendar.component.js +0 -295
  354. package/esm5/components/mobile-calendar/mobile-calendar.const.js +0 -25
  355. package/esm5/components/mobile-calendar/mobile-calendar.module.js +0 -34
  356. package/esm5/components/mobile-calendar/mobile-calendar.providers.js +0 -31
  357. package/esm5/components/mobile-calendar/mobile-calendar.strategy.js +0 -134
  358. package/esm5/components/mobile-calendar/taiga-ui-addon-mobile-components-mobile-calendar.js +0 -5
  359. package/esm5/components/mobile-calendar-dialog/index.js +0 -3
  360. package/esm5/components/mobile-calendar-dialog/mobile-calendar-dialog.component.js +0 -57
  361. package/esm5/components/mobile-calendar-dialog/mobile-calendar-dialog.module.js +0 -28
  362. package/esm5/components/mobile-calendar-dialog/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js +0 -5
  363. package/esm5/components/mobile-dialog/index.js +0 -4
  364. package/esm5/components/mobile-dialog/mobile-dialog-options.js +0 -1
  365. package/esm5/components/mobile-dialog/mobile-dialog.component.js +0 -34
  366. package/esm5/components/mobile-dialog/mobile-dialog.module.js +0 -31
  367. package/esm5/components/mobile-dialog/mobile-dialog.service.js +0 -34
  368. package/esm5/components/mobile-dialog/taiga-ui-addon-mobile-components-mobile-dialog.js +0 -5
  369. package/esm5/components/pull-to-refresh/index.js +0 -6
  370. package/esm5/components/pull-to-refresh/loader-android/loader-android.component.js +0 -43
  371. package/esm5/components/pull-to-refresh/loader-ios/loader-ios.component.js +0 -41
  372. package/esm5/components/pull-to-refresh/pull-to-refresh.component.js +0 -56
  373. package/esm5/components/pull-to-refresh/pull-to-refresh.module.js +0 -26
  374. package/esm5/components/pull-to-refresh/pull-to-refresh.providers.js +0 -32
  375. package/esm5/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.js +0 -5
  376. package/esm5/components/sheet/components/sheet/sheet.component.js +0 -150
  377. package/esm5/components/sheet/components/sheet/sheet.providers.js +0 -42
  378. package/esm5/components/sheet/components/sheet-bar/sheet-bar.component.js +0 -43
  379. package/esm5/components/sheet/components/sheet-heading/sheet-heading.component.js +0 -40
  380. package/esm5/components/sheet/components/sheets-host/sheets-host.component.js +0 -40
  381. package/esm5/components/sheet/directives/sheet-close/sheet-close.directive.js +0 -56
  382. package/esm5/components/sheet/directives/sheet-stop/sheet-stop.directive.js +0 -46
  383. package/esm5/components/sheet/directives/sheet-top/sheet-top.directive.js +0 -56
  384. package/esm5/components/sheet/directives/sheet-wrapper/sheet-wrapper.directive.js +0 -93
  385. package/esm5/components/sheet/index.js +0 -15
  386. package/esm5/components/sheet/ios.hacks.js +0 -42
  387. package/esm5/components/sheet/sheet-options.js +0 -16
  388. package/esm5/components/sheet/sheet.directive.js +0 -58
  389. package/esm5/components/sheet/sheet.js +0 -1
  390. package/esm5/components/sheet/sheet.module.js +0 -52
  391. package/esm5/components/sheet/sheet.service.js +0 -42
  392. package/esm5/components/sheet/taiga-ui-addon-mobile-components-sheet.js +0 -5
  393. package/esm5/components/taiga-ui-addon-mobile-components.js +0 -5
  394. package/esm5/components/theme-android/index.js +0 -3
  395. package/esm5/components/theme-android/taiga-ui-addon-mobile-components-theme-android.js +0 -5
  396. package/esm5/components/theme-android/theme-android.component.js +0 -22
  397. package/esm5/components/theme-android/theme-android.module.js +0 -16
  398. package/esm5/components/theme-ios/index.js +0 -3
  399. package/esm5/components/theme-ios/taiga-ui-addon-mobile-components-theme-ios.js +0 -5
  400. package/esm5/components/theme-ios/theme-ios.component.js +0 -22
  401. package/esm5/components/theme-ios/theme-ios.module.js +0 -16
  402. package/esm5/const/index.js +0 -2
  403. package/esm5/const/mobile-alert-options.js +0 -8
  404. package/esm5/const/taiga-ui-addon-mobile-const.js +0 -5
  405. package/esm5/directives/elastic-sticky/elastic-sticky.directive.js +0 -26
  406. package/esm5/directives/elastic-sticky/elastic-sticky.module.js +0 -16
  407. package/esm5/directives/elastic-sticky/elastic-sticky.service.js +0 -58
  408. package/esm5/directives/elastic-sticky/index.js +0 -4
  409. package/esm5/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.js +0 -5
  410. package/esm5/directives/index.js +0 -6
  411. package/esm5/directives/mobile-tabs/index.js +0 -4
  412. package/esm5/directives/mobile-tabs/mobile-tabs.component.js +0 -16
  413. package/esm5/directives/mobile-tabs/mobile-tabs.directive.js +0 -51
  414. package/esm5/directives/mobile-tabs/mobile-tabs.module.js +0 -18
  415. package/esm5/directives/mobile-tabs/taiga-ui-addon-mobile-directives-mobile-tabs.js +0 -5
  416. package/esm5/directives/ripple/index.js +0 -4
  417. package/esm5/directives/ripple/ripple-styles.component.js +0 -16
  418. package/esm5/directives/ripple/ripple.directive.js +0 -63
  419. package/esm5/directives/ripple/ripple.module.js +0 -18
  420. package/esm5/directives/ripple/ripple.providers.js +0 -54
  421. package/esm5/directives/ripple/taiga-ui-addon-mobile-directives-ripple.js +0 -6
  422. package/esm5/directives/sidebar/index.js +0 -4
  423. package/esm5/directives/sidebar/sidebar.component.js +0 -75
  424. package/esm5/directives/sidebar/sidebar.directive.js +0 -78
  425. package/esm5/directives/sidebar/sidebar.module.js +0 -21
  426. package/esm5/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.js +0 -5
  427. package/esm5/directives/taiga-ui-addon-mobile-directives.js +0 -5
  428. package/esm5/directives/touchable/index.js +0 -3
  429. package/esm5/directives/touchable/taiga-ui-addon-mobile-directives-touchable.js +0 -5
  430. package/esm5/directives/touchable/touchable.directive.js +0 -90
  431. package/esm5/directives/touchable/touchable.module.js +0 -16
  432. package/esm5/enums/index.js +0 -2
  433. package/esm5/enums/taiga-ui-addon-mobile-enums.js +0 -5
  434. package/esm5/enums/touch-mode.js +0 -10
  435. package/esm5/index.js +0 -7
  436. package/esm5/interfaces/index.js +0 -1
  437. package/esm5/interfaces/mobile-alert-data.js +0 -1
  438. package/esm5/interfaces/taiga-ui-addon-mobile-interfaces.js +0 -4
  439. package/esm5/internal/index.js +0 -2
  440. package/esm5/internal/primitive-calendar-mobile/index.js +0 -3
  441. package/esm5/internal/primitive-calendar-mobile/primitive-calendar-mobile.component.js +0 -37
  442. package/esm5/internal/primitive-calendar-mobile/primitive-calendar-mobile.module.js +0 -28
  443. package/esm5/internal/primitive-calendar-mobile/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js +0 -5
  444. package/esm5/internal/taiga-ui-addon-mobile-internal.js +0 -5
  445. package/esm5/taiga-ui-addon-mobile.js +0 -5
  446. package/esm5/tokens/index.js +0 -2
  447. package/esm5/tokens/loaded.js +0 -6
  448. package/esm5/tokens/taiga-ui-addon-mobile-tokens.js +0 -5
  449. package/esm5/types/index.js +0 -1
  450. package/esm5/types/taiga-ui-addon-mobile-types.js +0 -4
  451. package/esm5/types/touch-mode.js +0 -1
  452. package/esm5/utils/find-touch-index.js +0 -15
  453. package/esm5/utils/index.js +0 -2
  454. package/esm5/utils/taiga-ui-addon-mobile-utils.js +0 -5
  455. package/fesm2015/taiga-ui-addon-mobile-enums.js +0 -16
  456. package/fesm2015/taiga-ui-addon-mobile-enums.js.map +0 -1
  457. package/fesm5/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js +0 -87
  458. package/fesm5/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js.map +0 -1
  459. package/fesm5/taiga-ui-addon-mobile-components-mobile-calendar.js +0 -502
  460. package/fesm5/taiga-ui-addon-mobile-components-mobile-calendar.js.map +0 -1
  461. package/fesm5/taiga-ui-addon-mobile-components-mobile-dialog.js +0 -91
  462. package/fesm5/taiga-ui-addon-mobile-components-mobile-dialog.js.map +0 -1
  463. package/fesm5/taiga-ui-addon-mobile-components-pull-to-refresh.js +0 -185
  464. package/fesm5/taiga-ui-addon-mobile-components-pull-to-refresh.js.map +0 -1
  465. package/fesm5/taiga-ui-addon-mobile-components-sheet.js +0 -680
  466. package/fesm5/taiga-ui-addon-mobile-components-sheet.js.map +0 -1
  467. package/fesm5/taiga-ui-addon-mobile-components-theme-android.js +0 -40
  468. package/fesm5/taiga-ui-addon-mobile-components-theme-android.js.map +0 -1
  469. package/fesm5/taiga-ui-addon-mobile-components-theme-ios.js +0 -40
  470. package/fesm5/taiga-ui-addon-mobile-components-theme-ios.js.map +0 -1
  471. package/fesm5/taiga-ui-addon-mobile-components.js +0 -12
  472. package/fesm5/taiga-ui-addon-mobile-components.js.map +0 -1
  473. package/fesm5/taiga-ui-addon-mobile-const.js +0 -15
  474. package/fesm5/taiga-ui-addon-mobile-const.js.map +0 -1
  475. package/fesm5/taiga-ui-addon-mobile-directives-elastic-sticky.js +0 -97
  476. package/fesm5/taiga-ui-addon-mobile-directives-elastic-sticky.js.map +0 -1
  477. package/fesm5/taiga-ui-addon-mobile-directives-mobile-tabs.js +0 -82
  478. package/fesm5/taiga-ui-addon-mobile-directives-mobile-tabs.js.map +0 -1
  479. package/fesm5/taiga-ui-addon-mobile-directives-ripple.js +0 -143
  480. package/fesm5/taiga-ui-addon-mobile-directives-ripple.js.map +0 -1
  481. package/fesm5/taiga-ui-addon-mobile-directives-sidebar.js +0 -168
  482. package/fesm5/taiga-ui-addon-mobile-directives-sidebar.js.map +0 -1
  483. package/fesm5/taiga-ui-addon-mobile-directives-touchable.js +0 -108
  484. package/fesm5/taiga-ui-addon-mobile-directives-touchable.js.map +0 -1
  485. package/fesm5/taiga-ui-addon-mobile-directives.js +0 -10
  486. package/fesm5/taiga-ui-addon-mobile-directives.js.map +0 -1
  487. package/fesm5/taiga-ui-addon-mobile-enums.js +0 -16
  488. package/fesm5/taiga-ui-addon-mobile-enums.js.map +0 -1
  489. package/fesm5/taiga-ui-addon-mobile-interfaces.js +0 -4
  490. package/fesm5/taiga-ui-addon-mobile-interfaces.js.map +0 -1
  491. package/fesm5/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js +0 -65
  492. package/fesm5/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js.map +0 -1
  493. package/fesm5/taiga-ui-addon-mobile-internal.js +0 -6
  494. package/fesm5/taiga-ui-addon-mobile-internal.js.map +0 -1
  495. package/fesm5/taiga-ui-addon-mobile-tokens.js +0 -13
  496. package/fesm5/taiga-ui-addon-mobile-tokens.js.map +0 -1
  497. package/fesm5/taiga-ui-addon-mobile-types.js +0 -4
  498. package/fesm5/taiga-ui-addon-mobile-types.js.map +0 -1
  499. package/fesm5/taiga-ui-addon-mobile-utils.js +0 -21
  500. package/fesm5/taiga-ui-addon-mobile-utils.js.map +0 -1
  501. package/fesm5/taiga-ui-addon-mobile.js +0 -11
  502. package/fesm5/taiga-ui-addon-mobile.js.map +0 -1
  503. package/interfaces/taiga-ui-addon-mobile-interfaces.metadata.json +0 -1
  504. package/internal/primitive-calendar-mobile/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.metadata.json +0 -1
  505. package/internal/taiga-ui-addon-mobile-internal.metadata.json +0 -1
  506. package/taiga-ui-addon-mobile.metadata.json +0 -1
  507. package/tokens/taiga-ui-addon-mobile-tokens.metadata.json +0 -1
  508. package/types/taiga-ui-addon-mobile-types.metadata.json +0 -1
  509. package/utils/taiga-ui-addon-mobile-utils.metadata.json +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-directives-elastic-sticky.js","sources":["ng://@taiga-ui/addon-mobile/directives/elastic-sticky/elastic-sticky.service.ts","ng://@taiga-ui/addon-mobile/directives/elastic-sticky/elastic-sticky.directive.ts","ng://@taiga-ui/addon-mobile/directives/elastic-sticky/elastic-sticky.module.ts","ng://@taiga-ui/addon-mobile/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.ts"],"sourcesContent":["import {ElementRef, Inject, Injectable, NgZone, Optional} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {\n getElementOffset,\n TuiDestroyService,\n tuiZoneOptimized,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {SCROLL_REF_SELECTOR, TUI_SCROLL_REF} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\nimport {\n distinctUntilChanged,\n map,\n skip,\n startWith,\n switchMap,\n take,\n takeUntil,\n} from 'rxjs/operators';\n\n// @dynamic\n@Injectable()\nexport class TuiElasticStickyService extends Observable<number> {\n constructor(\n @Optional()\n @Inject(TUI_SCROLL_REF)\n scrollRef: ElementRef<HTMLElement> | null,\n @Inject(ElementRef) {nativeElement}: ElementRef<HTMLElement>,\n @Inject(NgZone) ngZone: NgZone,\n @Inject(WINDOW) windowRef: Window,\n @Inject(TuiDestroyService) destroy$: TuiDestroyService,\n ) {\n super(subscriber =>\n ngZone.onStable\n .pipe(\n take(1),\n switchMap(() => {\n const closest = nativeElement.closest(SCROLL_REF_SELECTOR);\n const host = scrollRef?.nativeElement ?? closest;\n const {offsetHeight} = nativeElement;\n const offsetTop = this.getInitialOffset(\n host || windowRef,\n nativeElement,\n );\n\n return typedFromEvent(host || windowRef, `scroll`).pipe(\n map(() =>\n Math.max(\n 1 -\n Math.max(\n Math.round(\n host\n ? host.scrollTop\n : windowRef.pageYOffset,\n ) - offsetTop,\n 0,\n ) /\n offsetHeight,\n 0,\n ),\n ),\n );\n }),\n startWith(1),\n distinctUntilChanged(),\n skip(1),\n tuiZoneOptimized(ngZone),\n takeUntil(destroy$),\n )\n .subscribe(subscriber),\n );\n }\n\n private getInitialOffset(host: Element | Window, element: HTMLElement): number {\n // TODO: iframe warning\n return host instanceof Element\n ? getElementOffset(host, element).offsetTop\n : element.getBoundingClientRect().top;\n }\n}\n","import {Directive, Inject, Output} from '@angular/core';\nimport {TuiDestroyService} from '@taiga-ui/cdk';\nimport {Observable} from 'rxjs';\n\nimport {TuiElasticStickyService} from './elastic-sticky.service';\n\n@Directive({\n selector: `[tuiElasticSticky]`,\n exportAs: `tuiElasticSticky`,\n providers: [TuiElasticStickyService, TuiDestroyService],\n})\nexport class TuiElasticStickyDirective {\n @Output()\n readonly tuiElasticSticky: Observable<number>;\n\n constructor(\n @Inject(TuiElasticStickyService) elasticStickyService: TuiElasticStickyService,\n ) {\n this.tuiElasticSticky = elasticStickyService;\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiElasticStickyDirective} from './elastic-sticky.directive';\n\n@NgModule({\n declarations: [TuiElasticStickyDirective],\n exports: [TuiElasticStickyDirective],\n})\nexport class TuiElasticStickyModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAoBA;IAEa,uBAAuB,GAApC,MAAa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DkB,UAAU,uBAFpB,QAAQ,YACR,MAAM,SAAC,cAAc;YAEe,UAAU,uBAA9C,MAAM,SAAC,UAAU;YACM,MAAM,uBAA7B,MAAM,SAAC,MAAM;YACa,MAAM,uBAAhC,MAAM,SAAC,MAAM;YACuB,iBAAiB,uBAArD,MAAM,SAAC,iBAAiB;;AARpB,uBAAuB;IADnC,UAAU,EAAE;IAGJ,WAAA,QAAQ,EAAE,CAAA;IACV,WAAA,MAAM,CAAC,cAAc,CAAC,CAAA;IAEtB,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,MAAM,CAAC,MAAM,CAAC,CAAA;IACd,WAAA,MAAM,CAAC,MAAM,CAAC,CAAA;IACd,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;GARrB,uBAAuB,CAyDnC;;ICpEY,yBAAyB,GAAtC,MAAa,yBAAyB;IAIlC,YACqC,oBAA6C;QAE9E,IAAI,CAAC,gBAAgB,GAAG,oBAAoB,CAAC;KAChD;EACJ;;YAJ8D,uBAAuB,uBAA7E,MAAM,SAAC,uBAAuB;;AAHnC;IADC,MAAM,EAAE;mEACqC;AAFrC,yBAAyB;IALrC,SAAS,CAAC;QACP,QAAQ,EAAE,oBAAoB;QAC9B,QAAQ,EAAE,kBAAkB;QAC5B,SAAS,EAAE,CAAC,uBAAuB,EAAE,iBAAiB,CAAC;KAC1D,CAAC;IAMO,WAAA,MAAM,CAAC,uBAAuB,CAAC,CAAA;GAL3B,yBAAyB,CASrC;;ICZY,sBAAsB,GAAnC,MAAa,sBAAsB;EAAG;AAAzB,sBAAsB;IAJlC,QAAQ,CAAC;QACN,YAAY,EAAE,CAAC,yBAAyB,CAAC;QACzC,OAAO,EAAE,CAAC,yBAAyB,CAAC;KACvC,CAAC;GACW,sBAAsB,CAAG;;ACRtC;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-directives-elastic-sticky.js","sources":["../../../projects/addon-mobile/directives/elastic-sticky/elastic-sticky.service.ts","../../../projects/addon-mobile/directives/elastic-sticky/elastic-sticky.directive.ts","../../../projects/addon-mobile/directives/elastic-sticky/elastic-sticky.module.ts","../../../projects/addon-mobile/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.ts"],"sourcesContent":["import {ElementRef, Inject, Injectable, NgZone, Optional} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {\n TuiDestroyService,\n tuiGetElementOffset,\n tuiTypedFromEvent,\n tuiZoneOptimized,\n} from '@taiga-ui/cdk';\nimport {SCROLL_REF_SELECTOR, TUI_SCROLL_REF} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\nimport {\n distinctUntilChanged,\n map,\n skip,\n startWith,\n switchMap,\n take,\n takeUntil,\n} from 'rxjs/operators';\n\n@Injectable()\nexport class TuiElasticStickyService extends Observable<number> {\n constructor(\n @Optional()\n @Inject(TUI_SCROLL_REF)\n scrollRef: ElementRef<HTMLElement> | null,\n @Inject(ElementRef) {nativeElement}: ElementRef<HTMLElement>,\n @Inject(NgZone) ngZone: NgZone,\n @Inject(WINDOW) windowRef: Window,\n @Inject(TuiDestroyService) destroy$: TuiDestroyService,\n ) {\n super(subscriber =>\n ngZone.onStable\n .pipe(\n take(1),\n switchMap(() => {\n const closest = nativeElement.closest(SCROLL_REF_SELECTOR);\n const host = scrollRef?.nativeElement || closest;\n const {offsetHeight} = nativeElement;\n const offsetTop = this.getInitialOffset(\n host || windowRef,\n nativeElement,\n );\n\n return tuiTypedFromEvent(host || windowRef, `scroll`).pipe(\n map(() =>\n Math.max(\n 1 -\n Math.max(\n Math.round(\n host\n ? host.scrollTop\n : windowRef.pageYOffset,\n ) - offsetTop,\n 0,\n ) /\n offsetHeight,\n 0,\n ),\n ),\n );\n }),\n startWith(1),\n distinctUntilChanged(),\n skip(1),\n tuiZoneOptimized(ngZone),\n takeUntil(destroy$),\n )\n .subscribe(subscriber),\n );\n }\n\n private getInitialOffset(host: Element | Window, element: HTMLElement): number {\n return `nodeType` in host\n ? tuiGetElementOffset(host, element).offsetTop\n : element.getBoundingClientRect().top;\n }\n}\n","import {Directive, Inject, Output} from '@angular/core';\nimport {TuiDestroyService} from '@taiga-ui/cdk';\nimport {Observable} from 'rxjs';\n\nimport {TuiElasticStickyService} from './elastic-sticky.service';\n\n@Directive({\n selector: `[tuiElasticSticky]`,\n exportAs: `tuiElasticSticky`,\n providers: [TuiElasticStickyService, TuiDestroyService],\n})\nexport class TuiElasticStickyDirective {\n @Output()\n readonly tuiElasticSticky: Observable<number>;\n\n constructor(\n @Inject(TuiElasticStickyService) elasticStickyService: TuiElasticStickyService,\n ) {\n this.tuiElasticSticky = elasticStickyService;\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiElasticStickyDirective} from './elastic-sticky.directive';\n\n@NgModule({\n declarations: [TuiElasticStickyDirective],\n exports: [TuiElasticStickyDirective],\n})\nexport class TuiElasticStickyModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAqBM,MAAO,uBAAwB,SAAQ,UAAkB,CAAA;IAC3D,WAGI,CAAA,SAAyC,EACrB,EAAC,aAAa,EAA0B,EAC5C,MAAc,EACd,SAAiB,EACN,QAA2B,EAAA;AAEtD,QAAA,KAAK,CAAC,UAAU,IACZ,MAAM,CAAC,QAAQ;aACV,IAAI,CACD,IAAI,CAAC,CAAC,CAAC,EACP,SAAS,CAAC,MAAK;YACX,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC3D,YAAA,MAAM,IAAI,GAAG,CAAA,SAAS,KAAT,IAAA,IAAA,SAAS,KAAT,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,SAAS,CAAE,aAAa,KAAI,OAAO,CAAC;AACjD,YAAA,MAAM,EAAC,YAAY,EAAC,GAAG,aAAa,CAAC;AACrC,YAAA,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CACnC,IAAI,IAAI,SAAS,EACjB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oHAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;qHAAtB,sBAAsB,EAAA,YAAA,EAAA,CAHhB,yBAAyB,CAAA,EAAA,OAAA,EAAA,CAC9B,yBAAyB,CAAA,EAAA,CAAA,CAAA;qHAE1B,sBAAsB,EAAA,CAAA,CAAA;4FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAJlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,yBAAyB,CAAC;oBACzC,OAAO,EAAE,CAAC,yBAAyB,CAAC;AACvC,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
@@ -1,20 +1,23 @@
1
- import { __decorate, __param } from 'tslib';
2
- import { Component, ViewEncapsulation, Inject, HostBinding, Directive, NgModule } from '@angular/core';
1
+ import * as i0 from '@angular/core';
2
+ import { Component, ViewEncapsulation, Directive, Inject, HostBinding, NgModule } from '@angular/core';
3
+ import * as i1 from '@taiga-ui/cdk';
3
4
  import { TUI_IS_IOS, TUI_IS_ANDROID, TuiDirectiveStylesService } from '@taiga-ui/cdk';
4
5
  import { TUI_TAB_MARGIN } from '@taiga-ui/kit';
5
6
 
6
- let TuiMobileTabsComponent = class TuiMobileTabsComponent {
7
- };
8
- TuiMobileTabsComponent = __decorate([
9
- Component({
10
- template: ``,
11
- encapsulation: ViewEncapsulation.None,
12
- styles: ["[tuiMobileTabs] tui-tabs[data-platform=android],tui-tabs[tuiMobileTabs][data-platform=android]{height:auto}[tuiMobileTabs] tui-tabs[data-platform=android] tui-underline,tui-tabs[tuiMobileTabs][data-platform=android] tui-underline{box-shadow:inset 0 -.1875rem var(--tui-link)}[tuiMobileTabs] tui-tabs[data-platform=android] [tuiTab],tui-tabs[tuiMobileTabs][data-platform=android] [tuiTab]{transition-property:opacity;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;height:3rem;flex:1;flex-shrink:0;justify-content:center;text-transform:uppercase;color:var(--tui-base-09);opacity:.5;font-size:.875rem;font-weight:500;letter-spacing:-.008125rem;font-family:-apple-system,BlinkMacSystemFont,Roboto,'Helvetica Neue',sans-serif}[tuiMobileTabs] tui-tabs[data-platform=android] [tuiTab]:hover,tui-tabs[tuiMobileTabs][data-platform=android] [tuiTab]:hover{box-shadow:none}[tuiMobileTabs] tui-tabs[data-platform=android] [tuiTab]._active,tui-tabs[tuiMobileTabs][data-platform=android] [tuiTab]._active{opacity:1;color:var(--tui-base-09)}[tuiMobileTabs] tui-tabs[data-platform=ios],tui-tabs[tuiMobileTabs][data-platform=ios]{height:auto;border:2px solid transparent;border-radius:.5625rem;background:var(--tui-link);box-shadow:none}[tuiMobileTabs] tui-tabs[data-platform=ios] tui-underline,tui-tabs[tuiMobileTabs][data-platform=ios] tui-underline{border-radius:.4375rem;background:var(--tui-base-01);box-shadow:0 .1875rem .0625rem rgba(0,0,0,.04),0 .1875rem .5rem rgba(0,0,0,.12)}[tuiMobileTabs] tui-tabs[data-platform=ios] [tuiTab],tui-tabs[tuiMobileTabs][data-platform=ios] [tuiTab]{height:1.75rem;flex:1;flex-shrink:0;justify-content:center;color:var(--tui-base-01);opacity:1;font-size:.8125rem;font-weight:500;letter-spacing:-.005rem;font-family:-apple-system,BlinkMacSystemFont,Roboto,'Helvetica Neue',sans-serif}[tuiMobileTabs] tui-tabs[data-platform=ios] [tuiTab]:hover,tui-tabs[tuiMobileTabs][data-platform=ios] [tuiTab]:hover{box-shadow:none}[tuiMobileTabs] tui-tabs[data-platform=ios] [tuiTab]._active,tui-tabs[tuiMobileTabs][data-platform=ios] [tuiTab]._active{font-size:.875rem;font-weight:600;color:var(--tui-link)}"]
13
- })
14
- ], TuiMobileTabsComponent);
7
+ class TuiMobileTabsComponent {
8
+ }
9
+ TuiMobileTabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiMobileTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10
+ TuiMobileTabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiMobileTabsComponent, selector: "ng-component", ngImport: i0, template: ``, isInline: true, styles: ["tui-tabs[tuiMobileTabs][data-platform=android],[tuiMobileTabs] tui-tabs[data-platform=android]{height:auto}tui-tabs[tuiMobileTabs][data-platform=android] tui-underline,[tuiMobileTabs] tui-tabs[data-platform=android] tui-underline{box-shadow:inset 0 -.1875rem var(--tui-link)}tui-tabs[tuiMobileTabs][data-platform=android] [tuiTab],[tuiMobileTabs] tui-tabs[data-platform=android] [tuiTab]{transition-property:opacity;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;height:3rem;flex:1;flex-shrink:0;justify-content:center;text-transform:uppercase;color:var(--tui-base-09);opacity:.5;font-size:.875rem;font-weight:500;letter-spacing:-.008125rem;font-family:-apple-system,BlinkMacSystemFont,Roboto,\"Helvetica Neue\",sans-serif}tui-tabs[tuiMobileTabs][data-platform=android] [tuiTab]:hover,[tuiMobileTabs] tui-tabs[data-platform=android] [tuiTab]:hover{box-shadow:none}tui-tabs[tuiMobileTabs][data-platform=android] [tuiTab]._active,[tuiMobileTabs] tui-tabs[data-platform=android] [tuiTab]._active{opacity:1;color:var(--tui-base-09)}tui-tabs[tuiMobileTabs][data-platform=ios],[tuiMobileTabs] tui-tabs[data-platform=ios]{height:auto;border:2px solid transparent;border-radius:.5625rem;background:var(--tui-link);box-shadow:none}tui-tabs[tuiMobileTabs][data-platform=ios] tui-underline,[tuiMobileTabs] tui-tabs[data-platform=ios] tui-underline{border-radius:.4375rem;background:var(--tui-base-01);box-shadow:0 .1875rem .0625rem rgba(0,0,0,.04),0 .1875rem .5rem rgba(0,0,0,.12)}tui-tabs[tuiMobileTabs][data-platform=ios] [tuiTab],[tuiMobileTabs] tui-tabs[data-platform=ios] [tuiTab]{height:1.75rem;flex:1;flex-shrink:0;justify-content:center;color:var(--tui-base-01);opacity:1;font-size:.8125rem;font-weight:500;letter-spacing:-.005rem;font-family:-apple-system,BlinkMacSystemFont,Roboto,\"Helvetica Neue\",sans-serif}tui-tabs[tuiMobileTabs][data-platform=ios] [tuiTab]:hover,[tuiMobileTabs] tui-tabs[data-platform=ios] [tuiTab]:hover{box-shadow:none}tui-tabs[tuiMobileTabs][data-platform=ios] [tuiTab]._active,[tuiMobileTabs] tui-tabs[data-platform=ios] [tuiTab]._active{font-size:.875rem;font-weight:600;color:var(--tui-link)}\n"], encapsulation: i0.ViewEncapsulation.None });
11
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiMobileTabsComponent, decorators: [{
12
+ type: Component,
13
+ args: [{
14
+ template: ``,
15
+ styleUrls: [`mobile-tabs.style.less`],
16
+ encapsulation: ViewEncapsulation.None,
17
+ }]
18
+ }] });
15
19
 
16
- // @dynamic
17
- let TuiMobileTabsDirective = class TuiMobileTabsDirective {
20
+ class TuiMobileTabsDirective {
18
21
  constructor(isIos, isAndroid, directiveStyles) {
19
22
  this.isIos = isIos;
20
23
  this.isAndroid = isAndroid;
@@ -29,39 +32,52 @@ let TuiMobileTabsDirective = class TuiMobileTabsDirective {
29
32
  }
30
33
  return null;
31
34
  }
32
- };
33
- TuiMobileTabsDirective.ctorParameters = () => [
34
- { type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_IOS,] }] },
35
- { type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_ANDROID,] }] },
36
- { type: TuiDirectiveStylesService, decorators: [{ type: Inject, args: [TuiDirectiveStylesService,] }] }
37
- ];
38
- __decorate([
39
- HostBinding(`attr.data-platform`)
40
- ], TuiMobileTabsDirective.prototype, "platform", null);
41
- TuiMobileTabsDirective = __decorate([
42
- Directive({
43
- selector: `[tuiMobileTabs]`,
44
- providers: [
45
- {
46
- provide: TUI_TAB_MARGIN,
47
- useValue: 0,
48
- },
49
- ],
50
- }),
51
- __param(0, Inject(TUI_IS_IOS)),
52
- __param(1, Inject(TUI_IS_ANDROID)),
53
- __param(2, Inject(TuiDirectiveStylesService))
54
- ], TuiMobileTabsDirective);
35
+ }
36
+ TuiMobileTabsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiMobileTabsDirective, deps: [{ token: TUI_IS_IOS }, { token: TUI_IS_ANDROID }, { token: TuiDirectiveStylesService }], target: i0.ɵɵFactoryTarget.Directive });
37
+ TuiMobileTabsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiMobileTabsDirective, selector: "[tuiMobileTabs]", host: { properties: { "attr.data-platform": "this.platform" } }, providers: [
38
+ {
39
+ provide: TUI_TAB_MARGIN,
40
+ useValue: 0,
41
+ },
42
+ ], ngImport: i0 });
43
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiMobileTabsDirective, decorators: [{
44
+ type: Directive,
45
+ args: [{
46
+ selector: `[tuiMobileTabs]`,
47
+ providers: [
48
+ {
49
+ provide: TUI_TAB_MARGIN,
50
+ useValue: 0,
51
+ },
52
+ ],
53
+ }]
54
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
55
+ type: Inject,
56
+ args: [TUI_IS_IOS]
57
+ }] }, { type: undefined, decorators: [{
58
+ type: Inject,
59
+ args: [TUI_IS_ANDROID]
60
+ }] }, { type: i1.TuiDirectiveStylesService, decorators: [{
61
+ type: Inject,
62
+ args: [TuiDirectiveStylesService]
63
+ }] }]; }, propDecorators: { platform: [{
64
+ type: HostBinding,
65
+ args: [`attr.data-platform`]
66
+ }] } });
55
67
 
56
- let TuiMobileTabsModule = class TuiMobileTabsModule {
57
- };
58
- TuiMobileTabsModule = __decorate([
59
- NgModule({
60
- declarations: [TuiMobileTabsDirective, TuiMobileTabsComponent],
61
- exports: [TuiMobileTabsDirective, TuiMobileTabsComponent],
62
- entryComponents: [TuiMobileTabsComponent],
63
- })
64
- ], TuiMobileTabsModule);
68
+ class TuiMobileTabsModule {
69
+ }
70
+ TuiMobileTabsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiMobileTabsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
71
+ TuiMobileTabsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiMobileTabsModule, declarations: [TuiMobileTabsDirective, TuiMobileTabsComponent], exports: [TuiMobileTabsDirective, TuiMobileTabsComponent] });
72
+ TuiMobileTabsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiMobileTabsModule });
73
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiMobileTabsModule, decorators: [{
74
+ type: NgModule,
75
+ args: [{
76
+ declarations: [TuiMobileTabsDirective, TuiMobileTabsComponent],
77
+ exports: [TuiMobileTabsDirective, TuiMobileTabsComponent],
78
+ entryComponents: [TuiMobileTabsComponent],
79
+ }]
80
+ }] });
65
81
 
66
82
  /**
67
83
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-directives-mobile-tabs.js","sources":["ng://@taiga-ui/addon-mobile/directives/mobile-tabs/mobile-tabs.component.ts","ng://@taiga-ui/addon-mobile/directives/mobile-tabs/mobile-tabs.directive.ts","ng://@taiga-ui/addon-mobile/directives/mobile-tabs/mobile-tabs.module.ts","ng://@taiga-ui/addon-mobile/directives/mobile-tabs/taiga-ui-addon-mobile-directives-mobile-tabs.ts"],"sourcesContent":["import {Component, ViewEncapsulation} from '@angular/core';\n\n@Component({\n template: ``,\n styleUrls: [`mobile-tabs.style.less`],\n encapsulation: ViewEncapsulation.None,\n})\nexport class TuiMobileTabsComponent {}\n","import {Directive, HostBinding, Inject} from '@angular/core';\nimport {TUI_IS_ANDROID, TUI_IS_IOS, TuiDirectiveStylesService} from '@taiga-ui/cdk';\nimport {TUI_TAB_MARGIN} from '@taiga-ui/kit';\n\nimport {TuiMobileTabsComponent} from './mobile-tabs.component';\n\n// @dynamic\n@Directive({\n selector: `[tuiMobileTabs]`,\n providers: [\n {\n provide: TUI_TAB_MARGIN,\n useValue: 0,\n },\n ],\n})\nexport class TuiMobileTabsDirective {\n constructor(\n @Inject(TUI_IS_IOS) private readonly isIos: boolean,\n @Inject(TUI_IS_ANDROID) private readonly isAndroid: boolean,\n @Inject(TuiDirectiveStylesService) directiveStyles: TuiDirectiveStylesService,\n ) {\n directiveStyles.addComponent(TuiMobileTabsComponent);\n }\n\n @HostBinding(`attr.data-platform`)\n get platform(): 'ios' | 'android' | null {\n if (this.isIos) {\n return `ios`;\n }\n\n if (this.isAndroid) {\n return `android`;\n }\n\n return null;\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiMobileTabsComponent} from './mobile-tabs.component';\nimport {TuiMobileTabsDirective} from './mobile-tabs.directive';\n\n@NgModule({\n declarations: [TuiMobileTabsDirective, TuiMobileTabsComponent],\n exports: [TuiMobileTabsDirective, TuiMobileTabsComponent],\n entryComponents: [TuiMobileTabsComponent],\n})\nexport class TuiMobileTabsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;IAOa,sBAAsB,GAAnC,MAAa,sBAAsB;EAAG;AAAzB,sBAAsB;IALlC,SAAS,CAAC;QACP,QAAQ,EAAE,EAAE;QAEZ,aAAa,EAAE,iBAAiB,CAAC,IAAI;;KACxC,CAAC;GACW,sBAAsB,CAAG;;ACDtC;IAUa,sBAAsB,GAAnC,MAAa,sBAAsB;IAC/B,YACyC,KAAc,EACV,SAAkB,EACxB,eAA0C;QAFxC,UAAK,GAAL,KAAK,CAAS;QACV,cAAS,GAAT,SAAS,CAAS;QAG3D,eAAe,CAAC,YAAY,CAAC,sBAAsB,CAAC,CAAC;KACxD;IAGD,IAAI,QAAQ;QACR,IAAI,IAAI,CAAC,KAAK,EAAE;YACZ,OAAO,KAAK,CAAC;SAChB;QAED,IAAI,IAAI,CAAC,SAAS,EAAE;YAChB,OAAO,SAAS,CAAC;SACpB;QAED,OAAO,IAAI,CAAC;KACf;EACJ;;0CAnBQ,MAAM,SAAC,UAAU;0CACjB,MAAM,SAAC,cAAc;YAC8B,yBAAyB,uBAA5E,MAAM,SAAC,yBAAyB;;AAMrC;IADC,WAAW,CAAC,oBAAoB,CAAC;sDAWjC;AApBQ,sBAAsB;IATlC,SAAS,CAAC;QACP,QAAQ,EAAE,iBAAiB;QAC3B,SAAS,EAAE;YACP;gBACI,OAAO,EAAE,cAAc;gBACvB,QAAQ,EAAE,CAAC;aACd;SACJ;KACJ,CAAC;IAGO,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,MAAM,CAAC,cAAc,CAAC,CAAA;IACtB,WAAA,MAAM,CAAC,yBAAyB,CAAC,CAAA;GAJ7B,sBAAsB,CAqBlC;;IC3BY,mBAAmB,GAAhC,MAAa,mBAAmB;EAAG;AAAtB,mBAAmB;IAL/B,QAAQ,CAAC;QACN,YAAY,EAAE,CAAC,sBAAsB,EAAE,sBAAsB,CAAC;QAC9D,OAAO,EAAE,CAAC,sBAAsB,EAAE,sBAAsB,CAAC;QACzD,eAAe,EAAE,CAAC,sBAAsB,CAAC;KAC5C,CAAC;GACW,mBAAmB,CAAG;;ACVnC;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-directives-mobile-tabs.js","sources":["../../../projects/addon-mobile/directives/mobile-tabs/mobile-tabs.component.ts","../../../projects/addon-mobile/directives/mobile-tabs/mobile-tabs.directive.ts","../../../projects/addon-mobile/directives/mobile-tabs/mobile-tabs.module.ts","../../../projects/addon-mobile/directives/mobile-tabs/taiga-ui-addon-mobile-directives-mobile-tabs.ts"],"sourcesContent":["import {Component, ViewEncapsulation} from '@angular/core';\n\n@Component({\n template: ``,\n styleUrls: [`mobile-tabs.style.less`],\n encapsulation: ViewEncapsulation.None,\n})\nexport class TuiMobileTabsComponent {}\n","import {Directive, HostBinding, Inject} from '@angular/core';\nimport {TUI_IS_ANDROID, TUI_IS_IOS, TuiDirectiveStylesService} from '@taiga-ui/cdk';\nimport {TUI_TAB_MARGIN} from '@taiga-ui/kit';\n\nimport {TuiMobileTabsComponent} from './mobile-tabs.component';\n\n@Directive({\n selector: `[tuiMobileTabs]`,\n providers: [\n {\n provide: TUI_TAB_MARGIN,\n useValue: 0,\n },\n ],\n})\nexport class TuiMobileTabsDirective {\n constructor(\n @Inject(TUI_IS_IOS) private readonly isIos: boolean,\n @Inject(TUI_IS_ANDROID) private readonly isAndroid: boolean,\n @Inject(TuiDirectiveStylesService) directiveStyles: TuiDirectiveStylesService,\n ) {\n directiveStyles.addComponent(TuiMobileTabsComponent);\n }\n\n @HostBinding(`attr.data-platform`)\n get platform(): 'ios' | 'android' | null {\n if (this.isIos) {\n return `ios`;\n }\n\n if (this.isAndroid) {\n return `android`;\n }\n\n return null;\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiMobileTabsComponent} from './mobile-tabs.component';\nimport {TuiMobileTabsDirective} from './mobile-tabs.directive';\n\n@NgModule({\n declarations: [TuiMobileTabsDirective, TuiMobileTabsComponent],\n exports: [TuiMobileTabsDirective, TuiMobileTabsComponent],\n entryComponents: [TuiMobileTabsComponent],\n})\nexport class TuiMobileTabsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAOa,sBAAsB,CAAA;;oHAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,sBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IA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AAmB,EAAA,UAAA,EAAA,CAAA;kBAL/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,CAAC,sBAAsB,EAAE,sBAAsB,CAAC;AAC9D,oBAAA,OAAO,EAAE,CAAC,sBAAsB,EAAE,sBAAsB,CAAC;oBACzD,eAAe,EAAE,CAAC,sBAAsB,CAAC;AAC5C,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
@@ -1,7 +1,9 @@
1
- import { __decorate, __param } from 'tslib';
2
- import { InjectionToken, ElementRef, Renderer2, Component, ViewEncapsulation, Inject, Input, Directive, NgModule } from '@angular/core';
3
- import { TuiDestroyService, TUI_TOUCH_SUPPORTED, TUI_IS_IOS, typedFromEvent, isPresent, TuiDirectiveStylesService } from '@taiga-ui/cdk';
4
- import { EMPTY, race, timer, Observable } from 'rxjs';
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, ElementRef, Renderer2, Component, ViewEncapsulation, Directive, Inject, Input, NgModule } from '@angular/core';
3
+ import * as i1 from '@taiga-ui/cdk';
4
+ import { TuiDestroyService, TUI_TOUCH_SUPPORTED, TUI_IS_IOS, tuiTypedFromEvent, tuiIsPresent, TuiDirectiveStylesService } from '@taiga-ui/cdk';
5
+ import * as i2 from 'rxjs';
6
+ import { EMPTY, race, timer } from 'rxjs';
5
7
  import { map, filter, takeUntil, mergeMap, mapTo, take, tap, switchMap, switchMapTo } from 'rxjs/operators';
6
8
 
7
9
  const RIPPLE_ON = `tuiRippleOn`;
@@ -13,66 +15,65 @@ const TUI_RIPPLE_PROVIDERS = [
13
15
  {
14
16
  provide: TUI_RIPPLE_START,
15
17
  deps: [TUI_TOUCH_SUPPORTED, TUI_IS_IOS, ElementRef, Renderer2],
16
- useFactory: rippleStartFactory,
17
- },
18
- {
19
- provide: TUI_RIPPLE_END,
20
- deps: [TUI_TOUCH_SUPPORTED, TUI_IS_IOS, ElementRef, TuiDestroyService],
21
- useFactory: rippleEndFactory,
22
- },
23
- ];
24
- // eslint-disable-next-line @typescript-eslint/naming-convention
25
- function rippleStartFactory(touchSupported, isIOS, { nativeElement }, renderer) {
26
- return isIOS || !touchSupported
27
- ? EMPTY
28
- : typedFromEvent(nativeElement, `touchstart`).pipe(map(({ touches }) => {
29
- const { clientX, clientY } = touches[touches.length - 1];
30
- const { width, height, top, left } = nativeElement.getBoundingClientRect();
31
- const radius = Math.sqrt(width * width + height * height);
32
- const dimension = radius * 2;
33
- const x = clientX - left - radius;
34
- const y = clientY - top - radius;
35
- const ripple = renderer.createElement(`div`);
36
- renderer.addClass(ripple, `tui-ripple`);
37
- renderer.setAttribute(ripple, `style`, `
18
+ useFactory: (touchSupported, isIOS, { nativeElement }, renderer) => {
19
+ return isIOS || !touchSupported
20
+ ? EMPTY
21
+ : tuiTypedFromEvent(nativeElement, `touchstart`).pipe(map(({ touches }) => {
22
+ const { clientX, clientY } = touches[touches.length - 1];
23
+ const { width, height, top, left } = nativeElement.getBoundingClientRect();
24
+ const radius = Math.sqrt(width * width + height * height);
25
+ const dimension = radius * 2;
26
+ const x = clientX - left - radius;
27
+ const y = clientY - top - radius;
28
+ const ripple = renderer.createElement(`div`);
29
+ renderer.addClass(ripple, `tui-ripple`);
30
+ renderer.setAttribute(ripple, `style`, `
38
31
  width: ${dimension}px;
39
32
  height: ${dimension}px;
40
33
  left: ${x}px;
41
34
  top: ${y}px;
42
35
  animation-name: ${RIPPLE_ON};
43
36
  `);
44
- return ripple;
45
- }));
46
- }
47
- // eslint-disable-next-line @typescript-eslint/naming-convention
48
- function rippleEndFactory(touchSupported, isIOS, { nativeElement }, destroy$) {
49
- return isIOS || !touchSupported
50
- ? EMPTY
51
- : typedFromEvent(nativeElement, `animationend`).pipe(filter(({ animationName }) => animationName === RIPPLE_OFF), map(({ target }) => target), filter(isPresent), takeUntil(destroy$));
52
- }
37
+ return ripple;
38
+ }));
39
+ },
40
+ },
41
+ {
42
+ provide: TUI_RIPPLE_END,
43
+ deps: [TUI_TOUCH_SUPPORTED, TUI_IS_IOS, ElementRef, TuiDestroyService],
44
+ useFactory: (touchSupported, isIOS, { nativeElement }, destroy$) => {
45
+ return isIOS || !touchSupported
46
+ ? EMPTY
47
+ : tuiTypedFromEvent(nativeElement, `animationend`).pipe(filter(({ animationName }) => animationName === RIPPLE_OFF), map(({ target }) => target), filter(tuiIsPresent), takeUntil(destroy$));
48
+ },
49
+ },
50
+ ];
53
51
 
54
- let TuiRippleStylesComponent = class TuiRippleStylesComponent {
55
- };
56
- TuiRippleStylesComponent = __decorate([
57
- Component({
58
- template: ``,
59
- encapsulation: ViewEncapsulation.None,
60
- styles: ["@-webkit-keyframes tuiRippleOn{from{transform:scale(0);opacity:.12}to{transform:none;opacity:.12}}@keyframes tuiRippleOn{from{transform:scale(0);opacity:.12}to{transform:none;opacity:.12}}@-webkit-keyframes tuiRippleOff{from{transform:none;opacity:.12}to{transform:none;opacity:0}}@keyframes tuiRippleOff{from{transform:none;opacity:.12}to{transform:none;opacity:0}}[tuiRipple]{position:relative;overflow:hidden}.tui-ripple{position:absolute;z-index:100;border-radius:100%;background:currentColor;transform:scale(0);-webkit-animation-duration:450ms;animation-duration:450ms;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;pointer-events:none}"]
61
- })
62
- ], TuiRippleStylesComponent);
52
+ class TuiRippleStylesComponent {
53
+ }
54
+ TuiRippleStylesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiRippleStylesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
55
+ TuiRippleStylesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiRippleStylesComponent, selector: "ng-component", ngImport: i0, template: ``, isInline: true, styles: ["@-webkit-keyframes tuiRippleOn{0%{transform:scale(0);opacity:.12}to{transform:none;opacity:.12}}@keyframes tuiRippleOn{0%{transform:scale(0);opacity:.12}to{transform:none;opacity:.12}}@-webkit-keyframes tuiRippleOff{0%{transform:none;opacity:.12}to{transform:none;opacity:0}}@keyframes tuiRippleOff{0%{transform:none;opacity:.12}to{transform:none;opacity:0}}*[tuiRipple]{position:relative;overflow:hidden}.tui-ripple{position:absolute;z-index:100;border-radius:100%;background:currentColor;transform:scale(0);-webkit-animation-duration:.45s;animation-duration:.45s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;pointer-events:none}\n"], encapsulation: i0.ViewEncapsulation.None });
56
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiRippleStylesComponent, decorators: [{
57
+ type: Component,
58
+ args: [{
59
+ template: ``,
60
+ styleUrls: [`./ripple.style.less`],
61
+ encapsulation: ViewEncapsulation.None,
62
+ }]
63
+ }] });
63
64
 
64
65
  const TOUCH_MOVE_DELAY = 100;
65
- let TuiRippleDirective = class TuiRippleDirective {
66
+ class TuiRippleDirective {
66
67
  constructor({ nativeElement }, directiveStyles, renderer, destroy$, start$, end$) {
67
68
  directiveStyles.addComponent(TuiRippleStylesComponent);
68
- const touchEnd$ = typedFromEvent(nativeElement, `touchend`);
69
- const touchMove$ = typedFromEvent(nativeElement, `touchmove`);
69
+ const touchEnd$ = tuiTypedFromEvent(nativeElement, `touchend`);
70
+ const touchMove$ = tuiTypedFromEvent(nativeElement, `touchmove`);
70
71
  end$.subscribe(element => {
71
72
  renderer.removeChild(nativeElement, element);
72
73
  });
73
74
  start$
74
75
  .pipe(mergeMap(ripple => {
75
- const animationEndOn$ = typedFromEvent(ripple, `animationend`);
76
+ const animationEndOn$ = tuiTypedFromEvent(ripple, `animationend`);
76
77
  return race(timer(TOUCH_MOVE_DELAY).pipe(mapTo(false)), touchEnd$.pipe(mapTo(true))).pipe(take(1),
77
78
  // eslint-disable-next-line rxjs/no-unsafe-takeuntil
78
79
  takeUntil(touchMove$), tap(() => {
@@ -86,44 +87,54 @@ let TuiRippleDirective = class TuiRippleDirective {
86
87
  renderer.setStyle(element, `animationName`, RIPPLE_OFF);
87
88
  });
88
89
  }
89
- };
90
- TuiRippleDirective.ctorParameters = () => [
91
- { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
92
- { type: TuiDirectiveStylesService, decorators: [{ type: Inject, args: [TuiDirectiveStylesService,] }] },
93
- { type: Renderer2, decorators: [{ type: Inject, args: [Renderer2,] }] },
94
- { type: TuiDestroyService, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
95
- { type: Observable, decorators: [{ type: Inject, args: [TUI_RIPPLE_START,] }] },
96
- { type: Observable, decorators: [{ type: Inject, args: [TUI_RIPPLE_END,] }] }
97
- ];
98
- __decorate([
99
- Input()
100
- ], TuiRippleDirective.prototype, "tuiRipple", void 0);
101
- TuiRippleDirective = __decorate([
102
- Directive({
103
- selector: `[tuiRipple]`,
104
- providers: TUI_RIPPLE_PROVIDERS,
105
- }),
106
- __param(0, Inject(ElementRef)),
107
- __param(1, Inject(TuiDirectiveStylesService)),
108
- __param(2, Inject(Renderer2)),
109
- __param(3, Inject(TuiDestroyService)),
110
- __param(4, Inject(TUI_RIPPLE_START)),
111
- __param(5, Inject(TUI_RIPPLE_END))
112
- ], TuiRippleDirective);
90
+ }
91
+ TuiRippleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiRippleDirective, deps: [{ token: ElementRef }, { token: TuiDirectiveStylesService }, { token: Renderer2 }, { token: TuiDestroyService }, { token: TUI_RIPPLE_START }, { token: TUI_RIPPLE_END }], target: i0.ɵɵFactoryTarget.Directive });
92
+ TuiRippleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiRippleDirective, selector: "[tuiRipple]", inputs: { tuiRipple: "tuiRipple" }, providers: TUI_RIPPLE_PROVIDERS, ngImport: i0 });
93
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiRippleDirective, decorators: [{
94
+ type: Directive,
95
+ args: [{
96
+ selector: `[tuiRipple]`,
97
+ providers: TUI_RIPPLE_PROVIDERS,
98
+ }]
99
+ }], ctorParameters: function () { return [{ type: i0.ElementRef, decorators: [{
100
+ type: Inject,
101
+ args: [ElementRef]
102
+ }] }, { type: i1.TuiDirectiveStylesService, decorators: [{
103
+ type: Inject,
104
+ args: [TuiDirectiveStylesService]
105
+ }] }, { type: i0.Renderer2, decorators: [{
106
+ type: Inject,
107
+ args: [Renderer2]
108
+ }] }, { type: i1.TuiDestroyService, decorators: [{
109
+ type: Inject,
110
+ args: [TuiDestroyService]
111
+ }] }, { type: i2.Observable, decorators: [{
112
+ type: Inject,
113
+ args: [TUI_RIPPLE_START]
114
+ }] }, { type: i2.Observable, decorators: [{
115
+ type: Inject,
116
+ args: [TUI_RIPPLE_END]
117
+ }] }]; }, propDecorators: { tuiRipple: [{
118
+ type: Input
119
+ }] } });
113
120
 
114
- let TuiRippleModule = class TuiRippleModule {
115
- };
116
- TuiRippleModule = __decorate([
117
- NgModule({
118
- declarations: [TuiRippleDirective, TuiRippleStylesComponent],
119
- exports: [TuiRippleDirective],
120
- entryComponents: [TuiRippleStylesComponent],
121
- })
122
- ], TuiRippleModule);
121
+ class TuiRippleModule {
122
+ }
123
+ TuiRippleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiRippleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
124
+ TuiRippleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiRippleModule, declarations: [TuiRippleDirective, TuiRippleStylesComponent], exports: [TuiRippleDirective] });
125
+ TuiRippleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiRippleModule });
126
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiRippleModule, decorators: [{
127
+ type: NgModule,
128
+ args: [{
129
+ declarations: [TuiRippleDirective, TuiRippleStylesComponent],
130
+ exports: [TuiRippleDirective],
131
+ entryComponents: [TuiRippleStylesComponent],
132
+ }]
133
+ }] });
123
134
 
124
135
  /**
125
136
  * Generated bundle index. Do not edit.
126
137
  */
127
138
 
128
- export { RIPPLE_OFF, RIPPLE_ON, TUI_RIPPLE_END, TUI_RIPPLE_PROVIDERS, TUI_RIPPLE_START, TuiRippleDirective, TuiRippleModule, rippleEndFactory, rippleStartFactory, TuiRippleStylesComponent as ɵa };
139
+ export { RIPPLE_OFF, RIPPLE_ON, TUI_RIPPLE_END, TUI_RIPPLE_PROVIDERS, TUI_RIPPLE_START, TuiRippleDirective, TuiRippleModule };
129
140
  //# sourceMappingURL=taiga-ui-addon-mobile-directives-ripple.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-directives-ripple.js","sources":["ng://@taiga-ui/addon-mobile/directives/ripple/ripple.providers.ts","ng://@taiga-ui/addon-mobile/directives/ripple/ripple-styles.component.ts","ng://@taiga-ui/addon-mobile/directives/ripple/ripple.directive.ts","ng://@taiga-ui/addon-mobile/directives/ripple/ripple.module.ts","ng://@taiga-ui/addon-mobile/directives/ripple/taiga-ui-addon-mobile-directives-ripple.ts"],"sourcesContent":["import {ElementRef, InjectionToken, Provider, Renderer2} from '@angular/core';\nimport {\n isPresent,\n TUI_IS_IOS,\n TUI_TOUCH_SUPPORTED,\n TuiDestroyService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {EMPTY, Observable} from 'rxjs';\nimport {filter, map, takeUntil} from 'rxjs/operators';\n\nexport const RIPPLE_ON = `tuiRippleOn`;\nexport const RIPPLE_OFF = `tuiRippleOff`;\nexport const TUI_RIPPLE_START = new InjectionToken<Observable<HTMLElement>>(\n `Stream of ripple elements to add`,\n);\nexport const TUI_RIPPLE_END = new InjectionToken<Observable<HTMLElement>>(\n `Stream of ripple elements to remove`,\n);\nexport const TUI_RIPPLE_PROVIDERS: Provider[] = [\n TuiDestroyService,\n {\n provide: TUI_RIPPLE_START,\n deps: [TUI_TOUCH_SUPPORTED, TUI_IS_IOS, ElementRef, Renderer2],\n useFactory: rippleStartFactory,\n },\n {\n provide: TUI_RIPPLE_END,\n deps: [TUI_TOUCH_SUPPORTED, TUI_IS_IOS, ElementRef, TuiDestroyService],\n useFactory: rippleEndFactory,\n },\n];\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function rippleStartFactory(\n touchSupported: boolean,\n isIOS: boolean,\n {nativeElement}: ElementRef<HTMLElement>,\n renderer: Renderer2,\n): Observable<HTMLElement> {\n return isIOS || !touchSupported\n ? EMPTY\n : typedFromEvent(nativeElement, `touchstart`).pipe(\n map(({touches}) => {\n const {clientX, clientY} = touches[touches.length - 1];\n const {width, height, top, left} =\n nativeElement.getBoundingClientRect();\n const radius = Math.sqrt(width * width + height * height);\n const dimension = radius * 2;\n const x = clientX - left - radius;\n const y = clientY - top - radius;\n const ripple = renderer.createElement(`div`);\n\n renderer.addClass(ripple, `tui-ripple`);\n renderer.setAttribute(\n ripple,\n `style`,\n `\n width: ${dimension}px;\n height: ${dimension}px;\n left: ${x}px;\n top: ${y}px;\n animation-name: ${RIPPLE_ON};\n `,\n );\n\n return ripple;\n }),\n );\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function rippleEndFactory(\n touchSupported: boolean,\n isIOS: boolean,\n {nativeElement}: ElementRef<HTMLElement>,\n destroy$: Observable<void>,\n): Observable<EventTarget> {\n return isIOS || !touchSupported\n ? EMPTY\n : typedFromEvent(nativeElement, `animationend`).pipe(\n filter(({animationName}) => animationName === RIPPLE_OFF),\n map(({target}) => target),\n filter(isPresent),\n takeUntil(destroy$),\n );\n}\n","import {Component, ViewEncapsulation} from '@angular/core';\n\n@Component({\n template: ``,\n styleUrls: [`./ripple.style.less`],\n encapsulation: ViewEncapsulation.None,\n})\nexport class TuiRippleStylesComponent {}\n","import {Directive, ElementRef, Inject, Input, Renderer2} from '@angular/core';\nimport {\n TuiDestroyService,\n TuiDirectiveStylesService,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {Observable, race, timer} from 'rxjs';\nimport {\n mapTo,\n mergeMap,\n switchMap,\n switchMapTo,\n take,\n takeUntil,\n tap,\n} from 'rxjs/operators';\n\nimport {\n RIPPLE_OFF,\n TUI_RIPPLE_END,\n TUI_RIPPLE_PROVIDERS,\n TUI_RIPPLE_START,\n} from './ripple.providers';\nimport {TuiRippleStylesComponent} from './ripple-styles.component';\n\nconst TOUCH_MOVE_DELAY = 100;\n\n@Directive({\n selector: `[tuiRipple]`,\n providers: TUI_RIPPLE_PROVIDERS,\n})\nexport class TuiRippleDirective {\n @Input()\n tuiRipple?: string;\n\n constructor(\n @Inject(ElementRef) {nativeElement}: ElementRef<HTMLElement>,\n @Inject(TuiDirectiveStylesService) directiveStyles: TuiDirectiveStylesService,\n @Inject(Renderer2) renderer: Renderer2,\n @Inject(TuiDestroyService) destroy$: TuiDestroyService,\n @Inject(TUI_RIPPLE_START) start$: Observable<HTMLElement>,\n @Inject(TUI_RIPPLE_END) end$: Observable<EventTarget>,\n ) {\n directiveStyles.addComponent(TuiRippleStylesComponent);\n\n const touchEnd$ = typedFromEvent(nativeElement, `touchend`);\n const touchMove$ = typedFromEvent(nativeElement, `touchmove`);\n\n end$.subscribe(element => {\n renderer.removeChild(nativeElement, element);\n });\n start$\n .pipe(\n mergeMap(ripple => {\n const animationEndOn$ = typedFromEvent(ripple, `animationend`);\n\n return race(\n timer(TOUCH_MOVE_DELAY).pipe(mapTo(false)),\n touchEnd$.pipe(mapTo(true)),\n ).pipe(\n take(1),\n // eslint-disable-next-line rxjs/no-unsafe-takeuntil\n takeUntil(touchMove$),\n tap(() => {\n renderer.setStyle(\n ripple,\n `background`,\n this.tuiRipple || null,\n );\n renderer.appendChild(nativeElement, ripple);\n }),\n switchMap(isTap =>\n isTap\n ? animationEndOn$\n : race<unknown>(\n touchEnd$.pipe(switchMapTo(animationEndOn$)),\n animationEndOn$.pipe(switchMapTo(touchEnd$)),\n ),\n ),\n mapTo(ripple),\n );\n }),\n takeUntil(destroy$),\n )\n .subscribe(element => {\n renderer.setStyle(element, `animationName`, RIPPLE_OFF);\n });\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiRippleDirective} from './ripple.directive';\nimport {TuiRippleStylesComponent} from './ripple-styles.component';\n\n@NgModule({\n declarations: [TuiRippleDirective, TuiRippleStylesComponent],\n exports: [TuiRippleDirective],\n entryComponents: [TuiRippleStylesComponent],\n})\nexport class TuiRippleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {TuiRippleStylesComponent as ɵa} from './ripple-styles.component';"],"names":[],"mappings":";;;;;;MAWa,SAAS,GAAG,cAAc;MAC1B,UAAU,GAAG,eAAe;MAC5B,gBAAgB,GAAG,IAAI,cAAc,CAC9C,kCAAkC,EACpC;MACW,cAAc,GAAG,IAAI,cAAc,CAC5C,qCAAqC,EACvC;MACW,oBAAoB,GAAe;IAC5C,iBAAiB;IACjB;QACI,OAAO,EAAE,gBAAgB;QACzB,IAAI,EAAE,CAAC,mBAAmB,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC;QAC9D,UAAU,EAAE,kBAAkB;KACjC;IACD;QACI,OAAO,EAAE,cAAc;QACvB,IAAI,EAAE,CAAC,mBAAmB,EAAE,UAAU,EAAE,UAAU,EAAE,iBAAiB,CAAC;QACtE,UAAU,EAAE,gBAAgB;KAC/B;EACH;AAEF;SACgB,kBAAkB,CAC9B,cAAuB,EACvB,KAAc,EACd,EAAC,aAAa,EAA0B,EACxC,QAAmB;IAEnB,OAAO,KAAK,IAAI,CAAC,cAAc;UACzB,KAAK;UACL,cAAc,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC,IAAI,CAC5C,GAAG,CAAC,CAAC,EAAC,OAAO,EAAC;YACV,MAAM,EAAC,OAAO,EAAE,OAAO,EAAC,GAAG,OAAO,CAAC,OAAO,CAAC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-mobile/directives/ripple/ripple.providers.ts","../../../projects/addon-mobile/directives/ripple/ripple-styles.component.ts","../../../projects/addon-mobile/directives/ripple/ripple.directive.ts","../../../projects/addon-mobile/directives/ripple/ripple.module.ts","../../../projects/addon-mobile/directives/ripple/taiga-ui-addon-mobile-directives-ripple.ts"],"sourcesContent":["import {ElementRef, InjectionToken, Provider, Renderer2} from '@angular/core';\nimport {\n TUI_IS_IOS,\n TUI_TOUCH_SUPPORTED,\n TuiDestroyService,\n tuiIsPresent,\n tuiTypedFromEvent,\n} from '@taiga-ui/cdk';\nimport {EMPTY, Observable} from 'rxjs';\nimport {filter, map, takeUntil} from 'rxjs/operators';\n\nexport const RIPPLE_ON = `tuiRippleOn`;\nexport const RIPPLE_OFF = `tuiRippleOff`;\nexport const TUI_RIPPLE_START = new InjectionToken<Observable<HTMLElement>>(\n `Stream of ripple elements to add`,\n);\nexport const TUI_RIPPLE_END = new InjectionToken<Observable<HTMLElement>>(\n `Stream of ripple elements to remove`,\n);\nexport const TUI_RIPPLE_PROVIDERS: Provider[] = [\n TuiDestroyService,\n {\n provide: TUI_RIPPLE_START,\n deps: [TUI_TOUCH_SUPPORTED, TUI_IS_IOS, ElementRef, Renderer2],\n useFactory: (\n touchSupported: boolean,\n isIOS: boolean,\n {nativeElement}: ElementRef<HTMLElement>,\n renderer: Renderer2,\n ): Observable<HTMLElement> => {\n return isIOS || !touchSupported\n ? EMPTY\n : tuiTypedFromEvent(nativeElement, `touchstart`).pipe(\n map(({touches}) => {\n const {clientX, clientY} = touches[touches.length - 1];\n const {width, height, top, left} =\n nativeElement.getBoundingClientRect();\n const radius = Math.sqrt(width * width + height * height);\n const dimension = radius * 2;\n const x = clientX - left - radius;\n const y = clientY - top - radius;\n const ripple = renderer.createElement(`div`);\n\n renderer.addClass(ripple, `tui-ripple`);\n renderer.setAttribute(\n ripple,\n `style`,\n `\n width: ${dimension}px;\n height: ${dimension}px;\n left: ${x}px;\n top: ${y}px;\n animation-name: ${RIPPLE_ON};\n `,\n );\n\n return ripple;\n }),\n );\n },\n },\n {\n provide: TUI_RIPPLE_END,\n deps: [TUI_TOUCH_SUPPORTED, TUI_IS_IOS, ElementRef, TuiDestroyService],\n useFactory: (\n touchSupported: boolean,\n isIOS: boolean,\n {nativeElement}: ElementRef<HTMLElement>,\n destroy$: Observable<void>,\n ): Observable<EventTarget> => {\n return isIOS || !touchSupported\n ? EMPTY\n : tuiTypedFromEvent(nativeElement, `animationend`).pipe(\n filter(({animationName}) => animationName === RIPPLE_OFF),\n map(({target}) => target),\n filter(tuiIsPresent),\n takeUntil(destroy$),\n );\n },\n },\n];\n","import {Component, ViewEncapsulation} from '@angular/core';\n\n@Component({\n template: ``,\n styleUrls: [`./ripple.style.less`],\n encapsulation: ViewEncapsulation.None,\n})\nexport class TuiRippleStylesComponent {}\n","import {Directive, ElementRef, Inject, Input, Renderer2} from '@angular/core';\nimport {\n TuiDestroyService,\n TuiDirectiveStylesService,\n tuiTypedFromEvent,\n} from '@taiga-ui/cdk';\nimport {Observable, race, timer} from 'rxjs';\nimport {\n mapTo,\n mergeMap,\n switchMap,\n switchMapTo,\n take,\n takeUntil,\n tap,\n} from 'rxjs/operators';\n\nimport {\n RIPPLE_OFF,\n TUI_RIPPLE_END,\n TUI_RIPPLE_PROVIDERS,\n TUI_RIPPLE_START,\n} from './ripple.providers';\nimport {TuiRippleStylesComponent} from './ripple-styles.component';\n\nconst TOUCH_MOVE_DELAY = 100;\n\n@Directive({\n selector: `[tuiRipple]`,\n providers: TUI_RIPPLE_PROVIDERS,\n})\nexport class TuiRippleDirective {\n @Input()\n tuiRipple?: string;\n\n constructor(\n @Inject(ElementRef) {nativeElement}: ElementRef<HTMLElement>,\n @Inject(TuiDirectiveStylesService) directiveStyles: TuiDirectiveStylesService,\n @Inject(Renderer2) renderer: Renderer2,\n @Inject(TuiDestroyService) destroy$: TuiDestroyService,\n @Inject(TUI_RIPPLE_START) start$: Observable<HTMLElement>,\n @Inject(TUI_RIPPLE_END) end$: Observable<EventTarget>,\n ) {\n directiveStyles.addComponent(TuiRippleStylesComponent);\n\n const touchEnd$ = tuiTypedFromEvent(nativeElement, `touchend`);\n const touchMove$ = tuiTypedFromEvent(nativeElement, `touchmove`);\n\n end$.subscribe(element => {\n renderer.removeChild(nativeElement, element);\n });\n start$\n .pipe(\n mergeMap(ripple => {\n const animationEndOn$ = tuiTypedFromEvent(ripple, `animationend`);\n\n return race(\n timer(TOUCH_MOVE_DELAY).pipe(mapTo(false)),\n touchEnd$.pipe(mapTo(true)),\n ).pipe(\n take(1),\n // eslint-disable-next-line rxjs/no-unsafe-takeuntil\n takeUntil(touchMove$),\n tap(() => {\n renderer.setStyle(\n ripple,\n `background`,\n this.tuiRipple || null,\n );\n renderer.appendChild(nativeElement, ripple);\n }),\n switchMap(isTap =>\n isTap\n ? animationEndOn$\n : race<unknown>(\n touchEnd$.pipe(switchMapTo(animationEndOn$)),\n animationEndOn$.pipe(switchMapTo(touchEnd$)),\n ),\n ),\n mapTo(ripple),\n );\n }),\n takeUntil(destroy$),\n )\n .subscribe(element => {\n renderer.setStyle(element, `animationName`, RIPPLE_OFF);\n });\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiRippleDirective} from './ripple.directive';\nimport {TuiRippleStylesComponent} from './ripple-styles.component';\n\n@NgModule({\n declarations: [TuiRippleDirective, TuiRippleStylesComponent],\n exports: [TuiRippleDirective],\n entryComponents: [TuiRippleStylesComponent],\n})\nexport class TuiRippleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAWO,MAAM,SAAS,GAAG,cAAc;AAChC,MAAM,UAAU,GAAG,eAAe;MAC5B,gBAAgB,GAAG,IAAI,cAAc,CAC9C,CAAkC,gCAAA,CAAA,EACpC;MACW,cAAc,GAAG,IAAI,cAAc,CAC5C,CAAqC,mCAAA,CAAA,EACvC;AACW,MAAA,oBAAoB,GAAe;IAC5C,iBAAiB;AACjB,IAAA;AACI,QAA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