@nativescript-community/gesturehandler 2.0.0 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (382) hide show
  1. package/.pnpm-debug.log +1 -0
  2. package/CHANGELOG.md +78 -138
  3. package/README.md +132 -12
  4. package/{packages/gesturehandler/blueprint.md → blueprint.md} +0 -0
  5. package/gesturehandler.android.d.ts +180 -0
  6. package/{.history/src/gesturehandler/gesturehandler.android_20220328163618.ts → gesturehandler.android.js} +209 -229
  7. package/gesturehandler.android.js.map +1 -0
  8. package/gesturehandler.common.d.ts +96 -0
  9. package/{.history/src/gesturehandler.common_20210512114125.ts → gesturehandler.common.js} +69 -156
  10. package/gesturehandler.common.js.map +1 -0
  11. package/{src/gesturehandler/gesturehandler.d.ts → gesturehandler.d.ts} +0 -0
  12. package/gesturehandler.ios.d.ts +56 -0
  13. package/{.history/src/gesturehandler.ios_20210422150701.ts → gesturehandler.ios.js} +71 -100
  14. package/gesturehandler.ios.js.map +1 -0
  15. package/gestures_override.d.ts +29 -0
  16. package/{.history/src/gesturehandler/gestures_override_20220328170818.ts → gestures_override.js} +84 -222
  17. package/gestures_override.js.map +1 -0
  18. package/package.json +51 -60
  19. package/{packages/gesturehandler/platforms → platforms}/android/AndroidManifest.xml +0 -0
  20. package/{packages/gesturehandler/platforms → platforms}/android/include.gradle +0 -0
  21. package/{packages/gesturehandler/platforms → platforms}/android/java/com/nativescript/gesturehandler/GestureHandlerInteractionController.java +0 -0
  22. package/{packages/gesturehandler/platforms → platforms}/android/java/com/nativescript/gesturehandler/PageLayout.java +0 -0
  23. package/{packages/gesturehandler/platforms → platforms}/android/java/com/nativescript/gesturehandler/RootViewGestureHandler.java +0 -0
  24. package/{packages/gesturehandler/platforms → platforms}/android/java/com/swmansion/gesturehandler/BaseGestureHandlerInteractionController.java +0 -0
  25. package/{packages/gesturehandler/platforms → platforms}/android/java/com/swmansion/gesturehandler/FlingGestureHandler.java +0 -0
  26. package/{packages/gesturehandler/platforms → platforms}/android/java/com/swmansion/gesturehandler/GestureHandler.java +0 -0
  27. package/{packages/gesturehandler/platforms → platforms}/android/java/com/swmansion/gesturehandler/GestureHandlerInteractionController.java +0 -0
  28. package/{packages/gesturehandler/platforms → platforms}/android/java/com/swmansion/gesturehandler/GestureHandlerOrchestrator.java +0 -0
  29. package/{packages/gesturehandler/platforms → platforms}/android/java/com/swmansion/gesturehandler/GestureHandlerRegistry.java +0 -0
  30. package/{packages/gesturehandler/platforms → platforms}/android/java/com/swmansion/gesturehandler/GestureHandlerRegistryImpl.java +0 -0
  31. package/{packages/gesturehandler/platforms → platforms}/android/java/com/swmansion/gesturehandler/GestureUtils.java +0 -0
  32. package/{packages/gesturehandler/platforms → platforms}/android/java/com/swmansion/gesturehandler/LongPressGestureHandler.java +0 -0
  33. package/{packages/gesturehandler/platforms → platforms}/android/java/com/swmansion/gesturehandler/NativeViewGestureHandler.java +0 -0
  34. package/{packages/gesturehandler/platforms → platforms}/android/java/com/swmansion/gesturehandler/OnTouchEventListener.java +0 -0
  35. package/{packages/gesturehandler/platforms → platforms}/android/java/com/swmansion/gesturehandler/PanGestureHandler.java +0 -0
  36. package/{packages/gesturehandler/platforms → platforms}/android/java/com/swmansion/gesturehandler/PinchGestureHandler.java +0 -0
  37. package/{packages/gesturehandler/platforms → platforms}/android/java/com/swmansion/gesturehandler/PointerEvents.java +0 -0
  38. package/{packages/gesturehandler/platforms → platforms}/android/java/com/swmansion/gesturehandler/PointerEventsConfig.java +0 -0
  39. package/{packages/gesturehandler/platforms → platforms}/android/java/com/swmansion/gesturehandler/PointerEventsSpec.java +0 -0
  40. package/{packages/gesturehandler/platforms → platforms}/android/java/com/swmansion/gesturehandler/RotationGestureDetector.java +0 -0
  41. package/{packages/gesturehandler/platforms → platforms}/android/java/com/swmansion/gesturehandler/RotationGestureHandler.java +0 -0
  42. package/{packages/gesturehandler/platforms → platforms}/android/java/com/swmansion/gesturehandler/ScaleGestureDetector.java +0 -0
  43. package/{packages/gesturehandler/platforms → platforms}/android/java/com/swmansion/gesturehandler/TapGestureHandler.java +0 -0
  44. package/{packages/gesturehandler/platforms → platforms}/android/java/com/swmansion/gesturehandler/ViewConfigurationHelper.java +0 -0
  45. package/{packages/gesturehandler/platforms → platforms}/android/native-api-usage.json +0 -0
  46. package/{packages/gesturehandler/platforms → platforms}/android/res/values/config.xml +0 -0
  47. package/{packages/gesturehandler/platforms → platforms}/ios/src/FlingHandler.h +0 -0
  48. package/{packages/gesturehandler/platforms → platforms}/ios/src/FlingHandler.m +0 -0
  49. package/{packages/gesturehandler/platforms → platforms}/ios/src/ForceTouchHandler.h +0 -0
  50. package/{packages/gesturehandler/platforms → platforms}/ios/src/ForceTouchHandler.m +0 -0
  51. package/{packages/gesturehandler/platforms → platforms}/ios/src/GestureHandler.h +0 -0
  52. package/{packages/gesturehandler/platforms → platforms}/ios/src/GestureHandler.m +0 -0
  53. package/{packages/gesturehandler/platforms → platforms}/ios/src/GestureHandlerDirection.h +0 -0
  54. package/{packages/gesturehandler/platforms → platforms}/ios/src/GestureHandlerEvents.h +0 -0
  55. package/{packages/gesturehandler/platforms → platforms}/ios/src/GestureHandlerEvents.m +0 -0
  56. package/{packages/gesturehandler/platforms → platforms}/ios/src/GestureHandlerHeader.h +0 -0
  57. package/{packages/gesturehandler/platforms → platforms}/ios/src/GestureHandlerManager.h +0 -0
  58. package/{packages/gesturehandler/platforms → platforms}/ios/src/GestureHandlerManager.m +0 -0
  59. package/{packages/gesturehandler/platforms → platforms}/ios/src/GestureHandlerRegistry.h +0 -0
  60. package/{packages/gesturehandler/platforms → platforms}/ios/src/GestureHandlerRegistry.m +0 -0
  61. package/{packages/gesturehandler/platforms → platforms}/ios/src/GestureHandlerState.h +0 -0
  62. package/{packages/gesturehandler/platforms → platforms}/ios/src/LongPressHandler.h +0 -0
  63. package/{packages/gesturehandler/platforms → platforms}/ios/src/LongPressHandler.m +0 -0
  64. package/{packages/gesturehandler/platforms → platforms}/ios/src/NativeViewHandler.h +0 -0
  65. package/{packages/gesturehandler/platforms → platforms}/ios/src/NativeViewHandler.m +0 -0
  66. package/{packages/gesturehandler/platforms → platforms}/ios/src/PanHandler.h +0 -0
  67. package/{packages/gesturehandler/platforms → platforms}/ios/src/PanHandler.m +0 -0
  68. package/{packages/gesturehandler/platforms → platforms}/ios/src/PinchHandler.h +0 -0
  69. package/{packages/gesturehandler/platforms → platforms}/ios/src/PinchHandler.m +0 -0
  70. package/{packages/gesturehandler/platforms → platforms}/ios/src/RootViewGestureRecognizer.h +0 -0
  71. package/{packages/gesturehandler/platforms → platforms}/ios/src/RootViewGestureRecognizer.m +0 -0
  72. package/{packages/gesturehandler/platforms → platforms}/ios/src/RotationHandler.h +0 -0
  73. package/{packages/gesturehandler/platforms → platforms}/ios/src/RotationHandler.m +0 -0
  74. package/{packages/gesturehandler/platforms → platforms}/ios/src/TapHandler.h +0 -0
  75. package/{packages/gesturehandler/platforms → platforms}/ios/src/TapHandler.m +0 -0
  76. package/{packages/gesturehandler/platforms → platforms}/ios/src/module.modulemap +0 -0
  77. package/react/index.d.ts +20 -0
  78. package/react/index.js +9 -0
  79. package/react/index.js.map +1 -0
  80. package/references.d.ts +3 -3
  81. package/svelte/index.d.ts +11 -0
  82. package/svelte/index.js +26 -0
  83. package/svelte/index.js.map +1 -0
  84. package/tsconfig.json +8 -4
  85. package/{src/gesturehandler/typings → typings}/android.d.ts +0 -0
  86. package/{src/gesturehandler/typings → typings}/extensions.android.d.ts +0 -0
  87. package/{src/gesturehandler/typings → typings}/ios.d.ts +0 -0
  88. package/vue/index.d.ts +4 -0
  89. package/{.history/src/gesturehandler/vue/index_20220328163021.ts → vue/index.js} +1 -1
  90. package/vue/index.js.map +1 -0
  91. package/.classpath +0 -12
  92. package/.eslintrc.js +0 -3
  93. package/.gitattributes +0 -17
  94. package/.github/FUNDING.yml +0 -1
  95. package/.github/issue_template.md +0 -28
  96. package/.gitmodules +0 -6
  97. package/.gradle/7.3/checksums/checksums.lock +0 -0
  98. package/.gradle/7.3/dependencies-accessors/dependencies-accessors.lock +0 -0
  99. package/.gradle/7.3/dependencies-accessors/gc.properties +0 -0
  100. package/.gradle/7.3/fileChanges/last-build.bin +0 -0
  101. package/.gradle/7.3/fileHashes/fileHashes.lock +0 -0
  102. package/.gradle/7.3/gc.properties +0 -0
  103. package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  104. package/.gradle/buildOutputCleanup/cache.properties +0 -2
  105. package/.gradle/checksums/checksums.lock +0 -0
  106. package/.gradle/checksums/md5-checksums.bin +0 -0
  107. package/.gradle/checksums/sha1-checksums.bin +0 -0
  108. package/.gradle/vcs-1/gc.properties +0 -0
  109. package/.history/build_20201106173734.gradle +0 -22
  110. package/.history/build_20220218093019.gradle +0 -22
  111. package/.history/build_20220218093024.gradle +0 -22
  112. package/.history/build_20220218093151.gradle +0 -22
  113. package/.history/build_20220218093200.gradle +0 -22
  114. package/.history/build_20220218093224.gradle +0 -22
  115. package/.history/build_20220218093249.gradle +0 -22
  116. package/.history/build_20220218093334.gradle +0 -22
  117. package/.history/build_20220218093339.gradle +0 -22
  118. package/.history/build_20220218093341.gradle +0 -22
  119. package/.history/build_20220218093411.gradle +0 -22
  120. package/.history/build_20220218093413.gradle +0 -22
  121. package/.history/build_20220218093416.gradle +0 -22
  122. package/.history/build_20220218093421.gradle +0 -23
  123. package/.history/build_20220218093423.gradle +0 -22
  124. package/.history/build_20220218100008.gradle +0 -22
  125. package/.history/demo-snippets/package_20211119094134.json +0 -7
  126. package/.history/demo-snippets/package_20220328153105.json +0 -7
  127. package/.history/demo-snippets/package_20220328153251.json +0 -7
  128. package/.history/demo-snippets/package_20220328153410.json +0 -7
  129. package/.history/demo-snippets/vue/Basic_20210917174642.vue +0 -46
  130. package/.history/demo-snippets/vue/Basic_20220328154031.vue +0 -44
  131. package/.history/demo-snippets/vue/Basic_20220328154730.vue +0 -46
  132. package/.history/demo-snippets/vue/Basic_20220328154741.vue +0 -46
  133. package/.history/demo-snippets/vue/Basic_20220328154807.vue +0 -47
  134. package/.history/demo-snippets/vue/Basic_20220328154838.vue +0 -51
  135. package/.history/demo-snippets/vue/Basic_20220328154839.vue +0 -51
  136. package/.history/demo-snippets/vue/Basic_20220328154901.vue +0 -52
  137. package/.history/demo-snippets/vue/Basic_20220328154925.vue +0 -52
  138. package/.history/demo-snippets/vue/Basic_20220328162644.vue +0 -52
  139. package/.history/demo-snippets/vue/Basic_20220328162656.vue +0 -48
  140. package/.history/demo-snippets/vue/Basic_20220328162658.vue +0 -48
  141. package/.history/demo-snippets/vue/Basic_20220328162731.vue +0 -48
  142. package/.history/demo-snippets/vue/ModalView_20220328154527.vue +0 -0
  143. package/.history/demo-snippets/vue/ModalView_20220328154555.vue +0 -15
  144. package/.history/demo-snippets/vue/ModalView_20220328162755.vue +0 -15
  145. package/.history/demo-snippets/vue/ModalView_20220328162915.vue +0 -17
  146. package/.history/demo-snippets/vue/install_20211117134051.ts +0 -14
  147. package/.history/demo-snippets/vue/install_20220328153411.ts +0 -10
  148. package/.history/demo-snippets/vue/install_20220328154031.ts +0 -9
  149. package/.history/demo-snippets/vue/install_20220328162915.ts +0 -10
  150. package/.history/demo-vue/.npmrc_20220328151942 +0 -1
  151. package/.history/demo-vue/.npmrc_20220329084955 +0 -2
  152. package/.history/demo-vue/package_20220328151942.json +0 -60
  153. package/.history/demo-vue/package_20220328153206.json +0 -60
  154. package/.history/demo-vue/package_20220328153218.json +0 -59
  155. package/.history/demo-vue/package_20220328153326.json +0 -60
  156. package/.history/demo-vue/package_20220328153411.json +0 -60
  157. package/.history/demo_vue/app/App_20201115162303.vue +0 -118
  158. package/.history/demo_vue/app/App_20220328150238.vue +0 -118
  159. package/.history/demo_vue/app/App_20220328150240.vue +0 -116
  160. package/.history/demo_vue/app/App_20220328150241.vue +0 -115
  161. package/.history/demo_vue/package_20210511163846.json +0 -30
  162. package/.history/demo_vue/package_20220328145031.json +0 -30
  163. package/.history/demo_vue/package_20220328150155.json +0 -30
  164. package/.history/demo_vue/package_20220328151156.json +0 -29
  165. package/.history/demo_vue/tsconfig_20200909142713.json +0 -30
  166. package/.history/demo_vue/tsconfig_20220328151126.json +0 -28
  167. package/.history/demo_vue/tsconfig_20220328151129.json +0 -27
  168. package/.history/demo_vue/webpack.config_20200909141619.js +0 -370
  169. package/.history/demo_vue/webpack.config_20220328145113.js +0 -6
  170. package/.history/demo_vue/webpack.config_20220328145115.js +0 -5
  171. package/.history/lerna_20220104212014.json +0 -21
  172. package/.history/lerna_20220328152313.json +0 -21
  173. package/.history/package_20220311095923.json +0 -74
  174. package/.history/package_20220328152312.json +0 -74
  175. package/.history/packages/gesturehandler/blueprint_20220306151807.md +0 -221
  176. package/.history/packages/gesturehandler/blueprint_20220328164413.md +0 -74
  177. package/.history/packages/gesturehandler/package_20220325110528.json +0 -39
  178. package/.history/packages/gesturehandler/package_20220328152653.json +0 -52
  179. package/.history/packages/gesturehandler/package_20220328152719.json +0 -52
  180. package/.history/packages/gesturehandler/package_20220328153446.json +0 -52
  181. package/.history/packages/gesturehandler/package_20220328164418.json +0 -52
  182. package/.history/packages/gesturehandler/package_20220328164722.json +0 -52
  183. package/.history/packages/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandler_20210517182228.java +0 -544
  184. package/.history/packages/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandler_20220331104607.java +0 -540
  185. package/.history/packages/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/LongPressGestureHandler_20210512101356.java +0 -81
  186. package/.history/packages/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/LongPressGestureHandler_20220331111050.java +0 -81
  187. package/.history/packages/gesturehandler/tsconfig_20220328152950.json +0 -13
  188. package/.history/packages/gesturehandler/tsconfig_20220328153011.json +0 -13
  189. package/.history/plugin/platforms/android/include_20220125161223.gradle +0 -10
  190. package/.history/plugin/platforms/android/include_20220217110818.gradle +0 -19
  191. package/.history/plugin/platforms/android/include_20220217112410.gradle +0 -18
  192. package/.history/plugin/platforms/android/include_20220217153211.gradle +0 -19
  193. package/.history/plugin/platforms/android/include_20220218092908.gradle +0 -19
  194. package/.history/plugin/platforms/android/java/com/nativescript/gesturehandler/GestureLayout_20220217101202.java +0 -189
  195. package/.history/plugin/platforms/android/java/com/nativescript/gesturehandler/GestureLayout_20220217101931.java +0 -185
  196. package/.history/plugin/platforms/ios/src/GestureHandler_20201106183454.h +0 -98
  197. package/.history/plugin/platforms/ios/src/GestureHandler_20201111112216.m +0 -365
  198. package/.history/plugin/platforms/ios/src/GestureHandler_20220104160100.m +0 -369
  199. package/.history/plugin/platforms/ios/src/GestureHandler_20220104172158.h +0 -101
  200. package/.history/src/gesturehandler/gesturehandler.android_20220328144612.ts +0 -610
  201. package/.history/src/gesturehandler/gesturehandler.android_20220328154126.ts +0 -609
  202. package/.history/src/gesturehandler/gesturehandler.android_20220328154143.ts +0 -609
  203. package/.history/src/gesturehandler/gesturehandler.android_20220328154730.ts +0 -610
  204. package/.history/src/gesturehandler/gesturehandler.android_20220328160735.ts +0 -610
  205. package/.history/src/gesturehandler/gesturehandler.android_20220328161307.ts +0 -612
  206. package/.history/src/gesturehandler/gesturehandler.android_20220328161410.ts +0 -613
  207. package/.history/src/gesturehandler/gesturehandler.android_20220328161742.ts +0 -612
  208. package/.history/src/gesturehandler/gesturehandler.android_20220328162317.ts +0 -613
  209. package/.history/src/gesturehandler/gesturehandler.android_20220328162541.ts +0 -613
  210. package/.history/src/gesturehandler/gesturehandler.android_20220328162915.ts +0 -611
  211. package/.history/src/gesturehandler/gesturehandler.android_20220328163707.ts +0 -610
  212. package/.history/src/gesturehandler/gesturehandler.common_20220328144620.ts +0 -325
  213. package/.history/src/gesturehandler/gesturehandler.common_20220328153656.ts +0 -325
  214. package/.history/src/gesturehandler/gestures_override_20210512114352.ts +0 -523
  215. package/.history/src/gesturehandler/gestures_override_20220328155041.ts +0 -523
  216. package/.history/src/gesturehandler/gestures_override_20220328155424.ts +0 -525
  217. package/.history/src/gesturehandler/gestures_override_20220328160121.ts +0 -527
  218. package/.history/src/gesturehandler/gestures_override_20220328160132.ts +0 -527
  219. package/.history/src/gesturehandler/gestures_override_20220328160220.ts +0 -528
  220. package/.history/src/gesturehandler/gestures_override_20220328160416.ts +0 -529
  221. package/.history/src/gesturehandler/gestures_override_20220328160731.ts +0 -535
  222. package/.history/src/gesturehandler/gestures_override_20220328160808.ts +0 -536
  223. package/.history/src/gesturehandler/gestures_override_20220328160834.ts +0 -536
  224. package/.history/src/gesturehandler/gestures_override_20220328160909.ts +0 -536
  225. package/.history/src/gesturehandler/gestures_override_20220328160931.ts +0 -536
  226. package/.history/src/gesturehandler/gestures_override_20220328161052.ts +0 -536
  227. package/.history/src/gesturehandler/gestures_override_20220328161319.ts +0 -536
  228. package/.history/src/gesturehandler/gestures_override_20220328161759.ts +0 -534
  229. package/.history/src/gesturehandler/gestures_override_20220328162317.ts +0 -535
  230. package/.history/src/gesturehandler/gestures_override_20220328162503.ts +0 -535
  231. package/.history/src/gesturehandler/gestures_override_20220328170816.ts +0 -533
  232. package/.history/src/gesturehandler/vue/index_20201021164506.ts +0 -12
  233. package/.history/src/gesturehandler.android_20220325103749.ts +0 -574
  234. package/.history/src/gesturehandler.android_20220325110406.ts +0 -574
  235. package/.history/src/gesturehandler.android_20220328144613.ts +0 -610
  236. package/.history/src/gesturehandler.common_20220328144621.ts +0 -325
  237. package/.history/src/gesturehandler.d_20210422150412.ts +0 -154
  238. package/.history/src/gesturehandler.d_20220328144718.ts +0 -156
  239. package/.history/src/gesturehandler.ios_20220328144653.ts +0 -296
  240. package/.history/src/references.d_20200412093513.ts +0 -3
  241. package/.history/src/references.d_20220328144701.ts +0 -3
  242. package/.history/tsconfig_20220306153539.json +0 -9
  243. package/.history/tsconfig_20220328152313.json +0 -9
  244. package/.prettierignore +0 -4
  245. package/.prettierrc +0 -6
  246. package/.prettierrc.js +0 -7
  247. package/.settings/org.eclipse.buildship.core.prefs +0 -13
  248. package/.vscode/settings.json +0 -19
  249. package/CONTRIBUTING.md +0 -19
  250. package/build.gradle +0 -22
  251. package/config.json +0 -7
  252. package/demo-snippets/node_modules/.package-lock.json +0 -20
  253. package/demo-snippets/package.json +0 -7
  254. package/demo-snippets/vue/Basic.vue +0 -48
  255. package/demo-snippets/vue/ModalView.vue +0 -17
  256. package/demo-snippets/vue/install.ts +0 -10
  257. package/demo-vue/App_Resources/Android/app.gradle +0 -20
  258. package/demo-vue/App_Resources/Android/src/main/AndroidManifest.xml +0 -42
  259. package/demo-vue/App_Resources/Android/src/main/res/drawable/ic_launcher_foreground.xml +0 -15
  260. package/demo-vue/App_Resources/Android/src/main/res/drawable-hdpi/background.png +0 -0
  261. package/demo-vue/App_Resources/Android/src/main/res/drawable-hdpi/logo.png +0 -0
  262. package/demo-vue/App_Resources/Android/src/main/res/drawable-ldpi/background.png +0 -0
  263. package/demo-vue/App_Resources/Android/src/main/res/drawable-ldpi/logo.png +0 -0
  264. package/demo-vue/App_Resources/Android/src/main/res/drawable-mdpi/background.png +0 -0
  265. package/demo-vue/App_Resources/Android/src/main/res/drawable-mdpi/logo.png +0 -0
  266. package/demo-vue/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml +0 -8
  267. package/demo-vue/App_Resources/Android/src/main/res/drawable-xhdpi/background.png +0 -0
  268. package/demo-vue/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png +0 -0
  269. package/demo-vue/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png +0 -0
  270. package/demo-vue/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png +0 -0
  271. package/demo-vue/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png +0 -0
  272. package/demo-vue/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png +0 -0
  273. package/demo-vue/App_Resources/Android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +0 -5
  274. package/demo-vue/App_Resources/Android/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  275. package/demo-vue/App_Resources/Android/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  276. package/demo-vue/App_Resources/Android/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  277. package/demo-vue/App_Resources/Android/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  278. package/demo-vue/App_Resources/Android/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  279. package/demo-vue/App_Resources/Android/src/main/res/values/colors.xml +0 -7
  280. package/demo-vue/App_Resources/Android/src/main/res/values/ic_launcher_background.xml +0 -4
  281. package/demo-vue/App_Resources/Android/src/main/res/values/styles.xml +0 -42
  282. package/demo-vue/App_Resources/Android/src/main/res/values-v21/colors.xml +0 -4
  283. package/demo-vue/App_Resources/Android/src/main/res/values-v21/styles.xml +0 -28
  284. package/demo-vue/App_Resources/Android/src/main/res/values-v29/styles.xml +0 -12
  285. package/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -122
  286. package/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png +0 -0
  287. package/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png +0 -0
  288. package/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png +0 -0
  289. package/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png +0 -0
  290. package/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png +0 -0
  291. package/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png +0 -0
  292. package/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png +0 -0
  293. package/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png +0 -0
  294. package/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png +0 -0
  295. package/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png +0 -0
  296. package/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png +0 -0
  297. package/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png +0 -0
  298. package/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png +0 -0
  299. package/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png +0 -0
  300. package/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png +0 -0
  301. package/demo-vue/App_Resources/iOS/Assets.xcassets/Contents.json +0 -6
  302. package/demo-vue/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json +0 -23
  303. package/demo-vue/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png +0 -0
  304. package/demo-vue/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png +0 -0
  305. package/demo-vue/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png +0 -0
  306. package/demo-vue/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json +0 -23
  307. package/demo-vue/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png +0 -0
  308. package/demo-vue/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png +0 -0
  309. package/demo-vue/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png +0 -0
  310. package/demo-vue/App_Resources/iOS/Info.plist +0 -47
  311. package/demo-vue/App_Resources/iOS/LaunchScreen.storyboard +0 -53
  312. package/demo-vue/App_Resources/iOS/build.xcconfig +0 -6
  313. package/demo-vue/app/app.scss +0 -11
  314. package/demo-vue/app/app.ts +0 -9
  315. package/demo-vue/app/components/Menu.vue +0 -54
  316. package/demo-vue/nativescript.config.ts +0 -11
  317. package/demo-vue/package.json +0 -60
  318. package/demo-vue/tsconfig.json +0 -25
  319. package/demo-vue/types/references.d.ts +0 -1
  320. package/demo-vue/types/shims.vue.d.ts +0 -4
  321. package/demo-vue/webpack.config.js +0 -42
  322. package/images/demo.gif +0 -0
  323. package/lerna.json +0 -21
  324. package/packages/gesturehandler/CHANGELOG.md +0 -609
  325. package/packages/gesturehandler/README.md +0 -176
  326. package/packages/gesturehandler/package.json +0 -52
  327. package/packages/gesturehandler/tsconfig.json +0 -13
  328. package/src/gesturehandler/gesturehandler.android.ts +0 -610
  329. package/src/gesturehandler/gesturehandler.common.ts +0 -325
  330. package/src/gesturehandler/gesturehandler.ios.ts +0 -296
  331. package/src/gesturehandler/gestures_override.ts +0 -532
  332. package/src/gesturehandler/references.d.ts +0 -3
  333. package/src/gesturehandler/vue/index.ts +0 -7
  334. package/src-native/.vscode/settings.json +0 -3
  335. package/src-native/android/.settings/org.eclipse.buildship.core.prefs +0 -13
  336. package/src-native/android/.vscode/settings.json +0 -3
  337. package/src-native/android/README.md +0 -14
  338. package/src-native/android/build.gradle +0 -25
  339. package/src-native/android/build.sh +0 -36
  340. package/src-native/android/gesturehandler/.classpath +0 -6
  341. package/src-native/android/gesturehandler/.settings/org.eclipse.buildship.core.prefs +0 -2
  342. package/src-native/android/gesturehandler/build.gradle +0 -84
  343. package/src-native/android/gesturehandler/gradle/wrapper/gradle-wrapper.jar +0 -0
  344. package/src-native/android/gesturehandler/gradle/wrapper/gradle-wrapper.properties +0 -6
  345. package/src-native/android/gesturehandler/gradlew +0 -160
  346. package/src-native/android/gesturehandler/gradlew.bat +0 -90
  347. package/src-native/android/gesturehandler/local.properties +0 -9
  348. package/src-native/android/gesturehandler/proguard-rules.pro +0 -17
  349. package/src-native/android/gesturehandler/src/main/AndroidManifest.xml +0 -9
  350. package/src-native/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  351. package/src-native/android/gradle/wrapper/gradle-wrapper.properties +0 -6
  352. package/src-native/android/gradle.properties +0 -23
  353. package/src-native/android/gradlew +0 -160
  354. package/src-native/android/gradlew.bat +0 -90
  355. package/src-native/android/settings.gradle +0 -1
  356. package/src-native/ios/GestureHandler.xcodeproj/project.pbxproj +0 -662
  357. package/src-native/ios/GestureHandler.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  358. package/src-native/ios/GestureHandler.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  359. package/src-native/ios/GestureHandler.xcodeproj/xcshareddata/xcschemes/GestureHandler.xcscheme +0 -76
  360. package/src-native/ios/GestureHandler.xcodeproj/xcshareddata/xcschemes/GestureHandlerApp.xcscheme +0 -87
  361. package/src-native/ios/GestureHandler.xcodeproj/xcshareddata/xcschemes/GestureHandlerLib.xcscheme +0 -76
  362. package/src-native/ios/GestureHandler.xcodeproj/xcshareddata/xcschemes/test.xcscheme +0 -76
  363. package/src-native/ios/GestureHandler.xcodeproj/xcshareddata/xcschemes/universal.xcscheme +0 -76
  364. package/src-native/ios/build.sh +0 -10
  365. package/tools/.eslintrc.js +0 -252
  366. package/tools/builddoc.mjs +0 -54
  367. package/tools/common/.eslintrc.js +0 -3
  368. package/tools/common/.prettierignore +0 -4
  369. package/tools/common/.prettierrc.js +0 -7
  370. package/tools/common/references.d.ts +0 -3
  371. package/tools/package.json +0 -116
  372. package/tools/readme/blueprint.json +0 -10
  373. package/tools/readme/demos-and-development.md +0 -35
  374. package/tools/readme/edit-warning.md +0 -20
  375. package/tools/readme/questions.md +0 -3
  376. package/tools/readme.js +0 -54
  377. package/tools/sync.js +0 -102
  378. package/tools/tsconfig.doc.json +0 -10
  379. package/tools/tsconfig.eslint.json +0 -4
  380. package/tools/tsconfig.json +0 -38
  381. package/tools/typedoc.js +0 -17
  382. package/tools/update.js +0 -32
@@ -1,13 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "rootDir": "../../src/gesturehandler",
5
- "outDir": "./",
6
- "paths": {
7
- "tns-core-modules": ["./node_modules/@nativescript/core"],
8
- "tns-core-modules/*": ["./node_modules/@nativescript/core/*"]
9
- }
10
- },
11
- "include": ["../../src/gesturehandler/**/*", "../../references.d.ts", "../../src/references.d.ts"],
12
- "exclude": ["../../src/gesturehandler/angular/**"]
13
- }
@@ -1,10 +0,0 @@
1
- dependencies {
2
- implementation(name:'widgets-release', ext:'aar')
3
- implementation "androidx.annotation:annotation:1.1.0"
4
- }
5
- repositories {
6
- mavenCentral()
7
- flatDir {
8
- dirs '../../../node_modules/@nativescript/core/platforms/android'
9
- }
10
- }
@@ -1,19 +0,0 @@
1
- import groovy.json.JsonSlurper
2
- dependencies {
3
- implementation(name:'widgets-release', ext:'aar')
4
- implementation "androidx.annotation:annotation:1.1.0"
5
- }
6
- repositories {
7
- def widgetsDir = '../../../node_modules/@nativescript/core/platforms/android'
8
- def appPackageJsonFile = file("../../../package.json")
9
- if (appPackageJsonFile.exists()) {
10
- def appPackageJson = new JsonSlurper().parseText(appPackageJsonFile.text)
11
- if (appPackageJson.dependencies['@akylas/nativescript'] != null) {
12
- widgetsDir = '../../../node_modules/@akylas/nativescript/platforms/android'
13
- }
14
- }
15
- println "\t + widgetsDir: $widgetsDir"
16
- flatDir {
17
- dirs "$widgetsDir"
18
- }
19
- }
@@ -1,18 +0,0 @@
1
- import groovy.json.JsonSlurper
2
- dependencies {
3
- implementation(name:'widgets-release', ext:'aar')
4
- implementation "androidx.annotation:annotation:1.1.0"
5
- }
6
- repositories {
7
- def widgetsDir = '../../../node_modules/@nativescript/core/platforms/android'
8
- def appPackageJsonFile = file("../../../package.json")
9
- if (appPackageJsonFile.exists()) {
10
- def appPackageJson = new JsonSlurper().parseText(appPackageJsonFile.text)
11
- if (appPackageJson.dependencies['@akylas/nativescript'] != null) {
12
- widgetsDir = '../../../node_modules/@akylas/nativescript/platforms/android'
13
- }
14
- }
15
- flatDir {
16
- dirs "$widgetsDir"
17
- }
18
- }
@@ -1,19 +0,0 @@
1
- import groovy.json.JsonSlurper
2
- dependencies {
3
- implementation(name:'widgets-release', ext:'aar')
4
- implementation "androidx.annotation:annotation:1.1.0"
5
- }
6
- repositories {
7
- def appDir = "$rootDir/../../.."
8
- def widgetsDir = "$appDir/node_modules/@nativescript/core/platforms/android"
9
- def appPackageJsonFile = file("$appDir/package.json")
10
- if (appPackageJsonFile.exists()) {
11
- def appPackageJson = new JsonSlurper().parseText(appPackageJsonFile.text)
12
- if (appPackageJson.dependencies['@akylas/nativescript'] != null) {
13
- widgetsDir = "$appDir/node_modules/@akylas/nativescript/platforms/android"
14
- }
15
- }
16
- flatDir {
17
- dirs "$widgetsDir"
18
- }
19
- }
@@ -1,19 +0,0 @@
1
- import groovy.json.JsonSlurper
2
- dependencies {
3
- implementation(name:'widgets-release', ext:'aar')
4
- implementation "androidx.annotation:annotation:1.1.0"
5
- }
6
- repositories {
7
- def appDir = "$rootDir/../../.."
8
- def widgetsDir = "$appDir/node_modules/@nativescript/core/platforms/android"
9
- def appPackageJsonFile = file("$appDir/package.json")
10
- if (appPackageJsonFile.exists()) {
11
- def appPackageJson = new JsonSlurper().parseText(appPackageJsonFile.text)
12
- if (appPackageJson.dependencies['@akylas/nativescript'] != null) {
13
- widgetsDir = "$appDir/node_modules/@akylas/nativescript/platforms/android"
14
- }
15
- }
16
- flatDir {
17
- dirs "$widgetsDir"
18
- }
19
- }
@@ -1,189 +0,0 @@
1
- package com.nativescript.gesturehandler;
2
-
3
- import android.content.Context;
4
- import android.view.MotionEvent;
5
- import android.view.View;
6
- import android.view.ViewGroup;
7
- import android.util.Log;
8
-
9
- import org.nativescript.widgets.ItemSpec;
10
- import org.nativescript.widgets.GridUnitType;
11
-
12
- import com.swmansion.gesturehandler.GestureHandlerOrchestrator;
13
- import com.swmansion.gesturehandler.GestureHandlerRegistryImpl;
14
- import com.swmansion.gesturehandler.PointerEventsConfig;
15
- import com.swmansion.gesturehandler.GestureHandler;
16
- import com.swmansion.gesturehandler.ViewConfigurationHelper;
17
-
18
- import java.util.ArrayList;
19
-
20
- public class PageLayout extends org.nativescript.widgets.GridLayout {
21
- public PageLayout(Context context, int rootGestureTag) {
22
- super(context);
23
- mRootGestureTag = rootGestureTag;
24
- addRow(new ItemSpec(1, GridUnitType.auto));
25
- addRow(new ItemSpec(1, GridUnitType.star));
26
- }
27
-
28
- private int mRootGestureTag;
29
- private GestureHandlerOrchestrator mOrchestrator;
30
- private GestureHandlerRegistryImpl mRegistry;
31
- private ViewConfigurationHelper configurationHelper;
32
- RootViewGestureHandler rootGestureHandler;
33
-
34
- private boolean mShouldIntercept = false;
35
- private boolean mPassingTouch = false;
36
- private boolean mDispatchToOrchestra = true;
37
- private boolean mShouldAddRootGesture = true;
38
-
39
- public void setShouldIntercept(boolean value) {
40
- if (GestureHandler.debug) {
41
- Log.d("JS", "PageLayout setShouldIntercept " + value);
42
- }
43
- this.mShouldIntercept = value;
44
- }
45
-
46
- public void setPassingTouch(boolean value) {
47
- this.mPassingTouch = value;
48
- }
49
- public void setShouldAddRootGesture(boolean value) {
50
- this.mShouldAddRootGesture = value;
51
- }
52
-
53
- public int getRootGestureTag() {
54
- return mRootGestureTag;
55
- }
56
-
57
- public void setDispatchToOrchestra(boolean value) {
58
- if (GestureHandler.debug) {
59
- Log.d("JS", "PageLayout setDispatchToOrchestra " + value);
60
- }
61
- this.mDispatchToOrchestra = value;
62
- }
63
-
64
- public GestureHandlerRegistryImpl registry() {
65
- return this.mRegistry;
66
- }
67
- // requestDisallowInterceptTouchEvent(disallowIntercept) {
68
- // console.log('requestDisallowInterceptTouchEvent');
69
- // if (this.mGestureRootHelper != null) {
70
- // this.mGestureRootHelper.requestDisallowInterceptTouchEvent(disallowIntercept);
71
- // }
72
- // super.requestDisallowInterceptTouchEvent(disallowIntercept);
73
- // }
74
-
75
- // dispatchTouchEvent(ev) {
76
- // if (this.mGestureRootHelper != null && this.mGestureRootHelper.dispatchTouchEvent(ev)) {
77
- // return true;
78
- // }
79
- // return super.dispatchTouchEvent(ev);
80
- // }
81
- public void tryCancelAllHandlers() {
82
- if (GestureHandler.debug) {
83
- Log.d("JS", "PageLayout tryCancelAllHandlers ");
84
- }
85
- ArrayList<GestureHandler> handlers = this.mRegistry.getAllHandlers();
86
- if (handlers != null) {
87
- for(int i = 0; i < handlers.size(); i++) {
88
- GestureHandler handler = handlers.get(i);
89
- if (handler != this.rootGestureHandler) {
90
- handler.cancel();
91
- }
92
- }
93
- }
94
- // In order to cancel handlers we activate handler that is hooked to the root view
95
- // if (this.rootGestureHandler != null && this.rootGestureHandler.getState() == com.swmansion.gesturehandler.GestureHandler.STATE_BEGAN) {
96
- // // Try activate main JS handler
97
- // this.rootGestureHandler.activate();
98
- // this.rootGestureHandler.end();
99
- // }
100
- }
101
-
102
- public void requestDisallowInterceptTouchEvent(boolean disallowIntercept) {
103
- if (GestureHandler.debug) {
104
- Log.d("JS", "PageLayout requestDisallowInterceptTouchEvent " + disallowIntercept + " " + this.mPassingTouch);
105
- }
106
- // If this method gets called it means that some native view is attempting to grab lock for
107
- // touch event delivery. In that case we cancel all gesture recognizers
108
- if (this.mOrchestrator != null && !this.mPassingTouch) {
109
- // if we are in the process of delivering touch events via GH orchestrator, we don't want to
110
- // treat it as a native gesture capturing the lock
111
- this.tryCancelAllHandlers();
112
- }
113
- super.requestDisallowInterceptTouchEvent(disallowIntercept);
114
- }
115
-
116
- public boolean dispatchTouchEventToOrchestrator(MotionEvent ev) {
117
- if (this.mOrchestrator != null) {
118
- this.mPassingTouch = true;
119
- this.mOrchestrator.onTouchEvent(ev);
120
- this.mPassingTouch = false;
121
- }
122
- if (GestureHandler.debug) {
123
- Log.d("JS", "PageLayout dispatchTouchEventToOrchestrator " + this.mShouldIntercept);
124
- }
125
- return this.mShouldIntercept;
126
- }
127
-
128
- public boolean dispatchTouchEvent(MotionEvent ev) {
129
- if (GestureHandler.debug) {
130
- Log.d("JS", "PageLayout dispatchTouchEvent " + this.mDispatchToOrchestra);
131
- }
132
- if (this.mDispatchToOrchestra && this.dispatchTouchEventToOrchestrator(ev)) {
133
- return true;
134
- }
135
- final boolean handled = super.dispatchTouchEvent(ev);
136
- if (GestureHandler.debug) {
137
- Log.d("JS", "PageLayout dispatchTouchEvent to children " + handled);
138
- }
139
- // we need to always return true or gestures wont work on layouts because they don't handle touch so dispatchTouchEvent returns false
140
- return true;
141
- }
142
-
143
- // onInterceptTouchEvent(ev: android.view.MotionEvent) {
144
- // return this.mShouldIntercept;
145
- // }
146
-
147
- // onTouchEvent(ev: android.view.MotionEvent) {
148
- // console.log('onTouchEvent', ev);
149
- // this.mOrchestrator.onTouchEvent(ev);
150
- // return super.onTouchEvent(ev);
151
- // }
152
-
153
- /**
154
- * This method is used to enable root view to start processing touch events through the gesture
155
- * handler library logic. Unless this method is called (which happens as a result of instantiating
156
- * new gesture handler from JS) the root view component will just proxy all touch related methods
157
- * to its superclass. Thus in the "disabled" state all touch related events will fallback to
158
- * default behavior.
159
- */
160
- public void initialize() {
161
- this.mRegistry = new com.swmansion.gesturehandler.GestureHandlerRegistryImpl();
162
- this.configurationHelper = new com.swmansion.gesturehandler.ViewConfigurationHelper() {
163
- public PointerEventsConfig getPointerEventsConfigForView(View view) {
164
- return view.isEnabled() ? com.swmansion.gesturehandler.PointerEventsConfig.AUTO : com.swmansion.gesturehandler.PointerEventsConfig.NONE;
165
- }
166
-
167
- public boolean isViewClippingChildren(ViewGroup parent) {
168
- return false;
169
- }
170
-
171
- public View getChildInDrawingOrderAtIndex(ViewGroup parent, int index) {
172
- return parent.getChildAt(index);
173
- }
174
- };
175
- this.mOrchestrator = new com.swmansion.gesturehandler.GestureHandlerOrchestrator(this, this.mRegistry, this.configurationHelper);
176
- this.mOrchestrator.setMinimumAlphaForTraversal(0.01f);
177
-
178
- this.rootGestureHandler = new RootViewGestureHandler();
179
- this.rootGestureHandler.setTag(mRootGestureTag);
180
- this.mRegistry.registerHandler(this.rootGestureHandler);
181
- this.mRegistry.attachHandlerToView(mRootGestureTag, this);
182
- }
183
-
184
- public void tearDown() {
185
- this.configurationHelper = null;
186
- this.mOrchestrator = null;
187
- this.mRegistry = null;
188
- }
189
- }
@@ -1,185 +0,0 @@
1
- package com.nativescript.gesturehandler;
2
-
3
- import android.content.Context;
4
- import android.view.MotionEvent;
5
- import android.view.View;
6
- import android.view.ViewGroup;
7
- import android.widget.FrameLayout;
8
- import android.util.Log;
9
-
10
- import com.swmansion.gesturehandler.GestureHandlerOrchestrator;
11
- import com.swmansion.gesturehandler.GestureHandlerRegistryImpl;
12
- import com.swmansion.gesturehandler.PointerEventsConfig;
13
- import com.swmansion.gesturehandler.GestureHandler;
14
- import com.swmansion.gesturehandler.ViewConfigurationHelper;
15
-
16
- import java.util.ArrayList;
17
-
18
- public class GestureLayout extends FrameLayout {
19
- public GestureLayout(Context context, int rootGestureTag) {
20
- super(context);
21
- mRootGestureTag = rootGestureTag;
22
- }
23
-
24
- private int mRootGestureTag;
25
- private GestureHandlerOrchestrator mOrchestrator;
26
- private GestureHandlerRegistryImpl mRegistry;
27
- private ViewConfigurationHelper configurationHelper;
28
- RootViewGestureHandler rootGestureHandler;
29
-
30
- private boolean mShouldIntercept = false;
31
- private boolean mPassingTouch = false;
32
- private boolean mDispatchToOrchestra = true;
33
- private boolean mShouldAddRootGesture = true;
34
-
35
- public void setShouldIntercept(boolean value) {
36
- if (GestureHandler.debug) {
37
- Log.d("JS", "PageLayout setShouldIntercept " + value);
38
- }
39
- this.mShouldIntercept = value;
40
- }
41
-
42
- public void setPassingTouch(boolean value) {
43
- this.mPassingTouch = value;
44
- }
45
- public void setShouldAddRootGesture(boolean value) {
46
- this.mShouldAddRootGesture = value;
47
- }
48
-
49
- public int getRootGestureTag() {
50
- return mRootGestureTag;
51
- }
52
-
53
- public void setDispatchToOrchestra(boolean value) {
54
- if (GestureHandler.debug) {
55
- Log.d("JS", "PageLayout setDispatchToOrchestra " + value);
56
- }
57
- this.mDispatchToOrchestra = value;
58
- }
59
-
60
- public GestureHandlerRegistryImpl registry() {
61
- return this.mRegistry;
62
- }
63
- // requestDisallowInterceptTouchEvent(disallowIntercept) {
64
- // console.log('requestDisallowInterceptTouchEvent');
65
- // if (this.mGestureRootHelper != null) {
66
- // this.mGestureRootHelper.requestDisallowInterceptTouchEvent(disallowIntercept);
67
- // }
68
- // super.requestDisallowInterceptTouchEvent(disallowIntercept);
69
- // }
70
-
71
- // dispatchTouchEvent(ev) {
72
- // if (this.mGestureRootHelper != null && this.mGestureRootHelper.dispatchTouchEvent(ev)) {
73
- // return true;
74
- // }
75
- // return super.dispatchTouchEvent(ev);
76
- // }
77
- public void tryCancelAllHandlers() {
78
- if (GestureHandler.debug) {
79
- Log.d("JS", "PageLayout tryCancelAllHandlers ");
80
- }
81
- ArrayList<GestureHandler> handlers = this.mRegistry.getAllHandlers();
82
- if (handlers != null) {
83
- for(int i = 0; i < handlers.size(); i++) {
84
- GestureHandler handler = handlers.get(i);
85
- if (handler != this.rootGestureHandler) {
86
- handler.cancel();
87
- }
88
- }
89
- }
90
- // In order to cancel handlers we activate handler that is hooked to the root view
91
- // if (this.rootGestureHandler != null && this.rootGestureHandler.getState() == com.swmansion.gesturehandler.GestureHandler.STATE_BEGAN) {
92
- // // Try activate main JS handler
93
- // this.rootGestureHandler.activate();
94
- // this.rootGestureHandler.end();
95
- // }
96
- }
97
-
98
- public void requestDisallowInterceptTouchEvent(boolean disallowIntercept) {
99
- if (GestureHandler.debug) {
100
- Log.d("JS", "PageLayout requestDisallowInterceptTouchEvent " + disallowIntercept + " " + this.mPassingTouch);
101
- }
102
- // If this method gets called it means that some native view is attempting to grab lock for
103
- // touch event delivery. In that case we cancel all gesture recognizers
104
- if (this.mOrchestrator != null && !this.mPassingTouch) {
105
- // if we are in the process of delivering touch events via GH orchestrator, we don't want to
106
- // treat it as a native gesture capturing the lock
107
- this.tryCancelAllHandlers();
108
- }
109
- super.requestDisallowInterceptTouchEvent(disallowIntercept);
110
- }
111
-
112
- public boolean dispatchTouchEventToOrchestrator(MotionEvent ev) {
113
- if (this.mOrchestrator != null) {
114
- this.mPassingTouch = true;
115
- this.mOrchestrator.onTouchEvent(ev);
116
- this.mPassingTouch = false;
117
- }
118
- if (GestureHandler.debug) {
119
- Log.d("JS", "PageLayout dispatchTouchEventToOrchestrator " + this.mShouldIntercept);
120
- }
121
- return this.mShouldIntercept;
122
- }
123
-
124
- public boolean dispatchTouchEvent(MotionEvent ev) {
125
- if (GestureHandler.debug) {
126
- Log.d("JS", "PageLayout dispatchTouchEvent " + this.mDispatchToOrchestra);
127
- }
128
- if (this.mDispatchToOrchestra && this.dispatchTouchEventToOrchestrator(ev)) {
129
- return true;
130
- }
131
- final boolean handled = super.dispatchTouchEvent(ev);
132
- if (GestureHandler.debug) {
133
- Log.d("JS", "PageLayout dispatchTouchEvent to children " + handled);
134
- }
135
- // we need to always return true or gestures wont work on layouts because they don't handle touch so dispatchTouchEvent returns false
136
- return true;
137
- }
138
-
139
- // onInterceptTouchEvent(ev: android.view.MotionEvent) {
140
- // return this.mShouldIntercept;
141
- // }
142
-
143
- // onTouchEvent(ev: android.view.MotionEvent) {
144
- // console.log('onTouchEvent', ev);
145
- // this.mOrchestrator.onTouchEvent(ev);
146
- // return super.onTouchEvent(ev);
147
- // }
148
-
149
- /**
150
- * This method is used to enable root view to start processing touch events through the gesture
151
- * handler library logic. Unless this method is called (which happens as a result of instantiating
152
- * new gesture handler from JS) the root view component will just proxy all touch related methods
153
- * to its superclass. Thus in the "disabled" state all touch related events will fallback to
154
- * default behavior.
155
- */
156
- public void initialize() {
157
- this.mRegistry = new com.swmansion.gesturehandler.GestureHandlerRegistryImpl();
158
- this.configurationHelper = new com.swmansion.gesturehandler.ViewConfigurationHelper() {
159
- public PointerEventsConfig getPointerEventsConfigForView(View view) {
160
- return view.isEnabled() ? com.swmansion.gesturehandler.PointerEventsConfig.AUTO : com.swmansion.gesturehandler.PointerEventsConfig.NONE;
161
- }
162
-
163
- public boolean isViewClippingChildren(ViewGroup parent) {
164
- return false;
165
- }
166
-
167
- public View getChildInDrawingOrderAtIndex(ViewGroup parent, int index) {
168
- return parent.getChildAt(index);
169
- }
170
- };
171
- this.mOrchestrator = new com.swmansion.gesturehandler.GestureHandlerOrchestrator(this, this.mRegistry, this.configurationHelper);
172
- this.mOrchestrator.setMinimumAlphaForTraversal(0.01f);
173
-
174
- this.rootGestureHandler = new RootViewGestureHandler();
175
- this.rootGestureHandler.setTag(mRootGestureTag);
176
- this.mRegistry.registerHandler(this.rootGestureHandler);
177
- this.mRegistry.attachHandlerToView(mRootGestureTag, this);
178
- }
179
-
180
- public void tearDown() {
181
- this.configurationHelper = null;
182
- this.mOrchestrator = null;
183
- this.mRegistry = null;
184
- }
185
- }
@@ -1,98 +0,0 @@
1
- //
2
- // GestureHandler.h
3
- // GestureHandler
4
- //
5
- // Created by Martin Guillon on 6/5/19.
6
- // Copyright © 2019 Stefan Dragnev. All rights reserved.
7
- //
8
-
9
- #import "GestureHandlerState.h"
10
- #import "GestureHandlerDirection.h"
11
- #import "GestureHandlerEvents.h"
12
-
13
- #import <Foundation/Foundation.h>
14
- #import <UIKit/UIKit.h>
15
-
16
- #define VEC_LEN_SQ(pt) (pt.x * pt.x + pt.y * pt.y)
17
- #define TEST_MIN_IF_NOT_NAN(value, limit) \
18
- (!isnan(limit) && ((limit < 0 && value <= limit) || (limit >= 0 && value >= limit)))
19
-
20
- #define TEST_MAX_IF_NOT_NAN(value, max) \
21
- (!isnan(max) && ((max < 0 && value < max) || (max >= 0 && value > max)))
22
-
23
- #define APPLY_PROP(recognizer, config, type, prop, propName) do { \
24
- id value = config[propName]; \
25
- if (value != nil) recognizer.prop = [value type]; \
26
- } while(0)
27
-
28
- #define APPLY_FLOAT_PROP(prop) do { APPLY_PROP(recognizer, config, floatValue, prop, @#prop); } while(0)
29
- #define APPLY_INT_PROP(prop) do { APPLY_PROP(recognizer, config, integerValue, prop, @#prop); } while(0)
30
- #define APPLY_NAMED_INT_PROP(prop, propName) do { APPLY_PROP(recognizer, config, integerValue, prop, propName); } while(0)
31
-
32
- //@protocol GestureHandlerEventEmitter
33
- //
34
- //- (void)sendTouchEvent:(nonnull GestureHandlerEvent *)event;
35
- //
36
- //- (void)sendStateChangeEvent:(nonnull GestureHandlerStateChange *)event;
37
- //
38
- //@end
39
-
40
-
41
- @protocol RootViewGestureRecognizerDelegate <UIGestureRecognizerDelegate>
42
-
43
- @required
44
- - (BOOL)gestureRecognizer:(nullable UIGestureRecognizer *)gestureRecognizer
45
- didActivateInRootView:(nullable UIView *)rootView;
46
-
47
- @end
48
-
49
-
50
- @class GestureHandler;
51
- @protocol GestureHandlerDelegate <NSObject>
52
-
53
- @optional
54
- - (BOOL)gestureHandler:(nullable GestureHandler *)gestureHandler shouldActivateForEvent:(nullable NSDictionary *)data;
55
-
56
- @required
57
- - (void)gestureHandler:(nullable GestureHandler *)gestureHandler
58
- didChangeState:(GestureHandlerState)state prevState:(GestureHandlerState)state extraData:(nullable NSDictionary *)data view:(nullable UIView *)view;
59
-
60
- @required
61
- - (void)gestureHandler:(nullable GestureHandler *)gestureHandler
62
- touchEventOnView:(nullable UIView *)view state:(GestureHandlerState)state extraData:(nullable NSDictionary *)data;
63
-
64
- @end
65
-
66
- @interface GestureHandler : NSObject <UIGestureRecognizerDelegate> {
67
-
68
- @protected UIGestureRecognizer *_recognizer;
69
- @protected GestureHandlerState _lastState;
70
-
71
- }
72
-
73
- + (nullable GestureHandler *)findGestureHandlerByRecognizer:(nonnull UIGestureRecognizer *)recognizer;
74
-
75
- - (nonnull instancetype)initWithTag:(nonnull NSNumber *)tag;
76
-
77
- @property (nonatomic, readonly, nonnull) NSNumber *tag;
78
- //@property (nonatomic, weak, nullable) id<GestureHandlerEventEmitter> emitter;
79
- @property (nonatomic, readonly, nullable) UIGestureRecognizer *recognizer;
80
- @property (nonatomic) BOOL enabled;
81
- @property(nonatomic) BOOL shouldCancelWhenOutside;
82
- @property (nullable, nonatomic, weak) id<GestureHandlerDelegate> delegate;
83
-
84
- - (void)bindToView:(nonnull UIView *)view;
85
- - (void)unbindFromView;
86
- - (void)configure:(nullable NSDictionary *)config NS_REQUIRES_SUPER;
87
- - (void)handleGesture:(nonnull id)recognizer;
88
- - (BOOL)containsPointInView;
89
- - (GestureHandlerState)state;
90
- - (nullable NSMutableDictionary *)eventExtraData:(nonnull id)recognizer;
91
-
92
- - (void)reset;
93
- - (void)sendEventsInState:(GestureHandlerState)state
94
- forView:(nonnull UIView *)view
95
- withExtraData:(nullable NSDictionary*)extraData;
96
-
97
- @end
98
-