@nativescript-community/ui-drawer 0.0.29 → 0.0.33
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.
- package/CHANGELOG.md +38 -0
- package/README.md +149 -90
- package/angular/bundles/nativescript-community-ui-drawer-angular.umd.js +54 -31
- package/angular/esm2015/index.js +1 -1
- package/angular/esm2015/module.js +11 -10
- package/angular/esm2015/nativescript-community-ui-drawer-angular.js +1 -1
- package/angular/fesm2015/nativescript-community-ui-drawer-angular.js +34 -32
- package/angular/module.d.ts +15 -14
- package/angular/package.json +3 -3
- package/index.js +15 -10
- package/package.json +11 -3
- package/vue/index.js +1 -1
- package/angular/bundles/nativescript-community-ui-drawer-angular.umd.min.js +0 -2
- package/pnpm-global/5/node_modules/.modules.yaml +0 -24
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/CHANGELOG.md +0 -467
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/LICENSE +0 -201
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/README.md +0 -56
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.android.d.ts +0 -155
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.android.js +0 -535
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.common.d.ts +0 -93
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.common.js +0 -222
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.d.ts +0 -149
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.ios.d.ts +0 -53
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.ios.js +0 -253
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gestures_override.d.ts +0 -27
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gestures_override.js +0 -263
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/package.json +0 -39
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/AndroidManifest.xml +0 -2
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/include.gradle +0 -9
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/nativescript/gesturehandler/GestureHandlerInteractionController.java +0 -79
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/nativescript/gesturehandler/PageLayout.java +0 -169
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/nativescript/gesturehandler/RootViewGestureHandler.java +0 -45
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/BaseGestureHandlerInteractionController.java +0 -19
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/FlingGestureHandler.java +0 -125
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandler.java +0 -541
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerInteractionController.java +0 -11
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerOrchestrator.java +0 -569
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerRegistry.java +0 -10
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerRegistryImpl.java +0 -97
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureUtils.java +0 -51
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/LongPressGestureHandler.java +0 -77
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/NativeViewGestureHandler.java +0 -141
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/OnTouchEventListener.java +0 -11
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PanGestureHandler.java +0 -320
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PinchGestureHandler.java +0 -138
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PointerEvents.java +0 -25
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PointerEventsConfig.java +0 -25
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PointerEventsSpec.java +0 -25
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/RotationGestureDetector.java +0 -171
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/RotationGestureHandler.java +0 -96
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/ScaleGestureDetector.java +0 -597
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/TapGestureHandler.java +0 -176
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/ViewConfigurationHelper.java +0 -12
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/res/values/config.xml +0 -13
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/FlingHandler.h +0 -6
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/FlingHandler.m +0 -131
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/ForceTouchHandler.h +0 -4
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/ForceTouchHandler.m +0 -170
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandler.h +0 -98
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandler.m +0 -365
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerDirection.h +0 -8
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerEvents.h +0 -30
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerEvents.m +0 -122
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerHeader.h +0 -23
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerManager.h +0 -25
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerManager.m +0 -169
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerRegistry.h +0 -18
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerRegistry.m +0 -49
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerState.h +0 -10
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/LongPressHandler.h +0 -12
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/LongPressHandler.m +0 -100
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/NativeViewHandler.h +0 -15
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/NativeViewHandler.m +0 -163
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PanHandler.h +0 -14
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PanHandler.m +0 -242
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PinchHandler.h +0 -12
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PinchHandler.m +0 -36
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RootViewGestureRecognizer.h +0 -17
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RootViewGestureRecognizer.m +0 -93
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RotationHandler.h +0 -12
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RotationHandler.m +0 -36
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/TapHandler.h +0 -13
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/TapHandler.m +0 -228
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/module.modulemap +0 -5
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/pnpm-lock.yaml +0 -10
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/references.d.ts +0 -3
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/typings/android.d.ts +0 -456
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/typings/extensions.android.d.ts +0 -16
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/typings/ios.d.ts +0 -266
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/CHANGELOG.md +0 -94
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/LICENSE +0 -201
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/README.md +0 -17
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/observable.d.ts +0 -17
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/observable.js +0 -37
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/observablearray.d.ts +0 -10
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/observablearray.js +0 -224
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/package.json +0 -31
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/CHANGELOG.md +0 -94
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/LICENSE +0 -201
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/README.md +0 -17
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/observable.d.ts +0 -17
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/observable.js +0 -37
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/observablearray.d.ts +0 -10
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/observablearray.js +0 -224
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/package.json +0 -31
- package/pnpm-global/5/node_modules/.pnpm/lock.yaml +0 -19
- package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/CHANGELOG.md +0 -94
- package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/LICENSE +0 -201
- package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/README.md +0 -17
- package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/observable.d.ts +0 -17
- package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/observable.js +0 -37
- package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/observablearray.d.ts +0 -10
- package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/observablearray.js +0 -224
- package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/package.json +0 -31
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/CHANGELOG.md +0 -467
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/LICENSE +0 -201
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/README.md +0 -56
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.android.d.ts +0 -155
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.android.js +0 -535
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.common.d.ts +0 -93
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.common.js +0 -222
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.d.ts +0 -149
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.ios.d.ts +0 -53
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.ios.js +0 -253
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gestures_override.d.ts +0 -27
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gestures_override.js +0 -263
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/package.json +0 -39
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/AndroidManifest.xml +0 -2
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/include.gradle +0 -9
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/nativescript/gesturehandler/GestureHandlerInteractionController.java +0 -79
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/nativescript/gesturehandler/PageLayout.java +0 -169
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/nativescript/gesturehandler/RootViewGestureHandler.java +0 -45
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/BaseGestureHandlerInteractionController.java +0 -19
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/FlingGestureHandler.java +0 -125
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandler.java +0 -541
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerInteractionController.java +0 -11
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerOrchestrator.java +0 -569
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerRegistry.java +0 -10
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerRegistryImpl.java +0 -97
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureUtils.java +0 -51
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/LongPressGestureHandler.java +0 -77
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/NativeViewGestureHandler.java +0 -141
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/OnTouchEventListener.java +0 -11
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PanGestureHandler.java +0 -320
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PinchGestureHandler.java +0 -138
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PointerEvents.java +0 -25
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PointerEventsConfig.java +0 -25
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PointerEventsSpec.java +0 -25
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/RotationGestureDetector.java +0 -171
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/RotationGestureHandler.java +0 -96
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/ScaleGestureDetector.java +0 -597
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/TapGestureHandler.java +0 -176
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/ViewConfigurationHelper.java +0 -12
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/res/values/config.xml +0 -13
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/FlingHandler.h +0 -6
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/FlingHandler.m +0 -131
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/ForceTouchHandler.h +0 -4
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/ForceTouchHandler.m +0 -170
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandler.h +0 -98
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandler.m +0 -365
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerDirection.h +0 -8
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerEvents.h +0 -30
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerEvents.m +0 -122
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerHeader.h +0 -23
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerManager.h +0 -25
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerManager.m +0 -169
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerRegistry.h +0 -18
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerRegistry.m +0 -49
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerState.h +0 -10
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/LongPressHandler.h +0 -12
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/LongPressHandler.m +0 -100
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/NativeViewHandler.h +0 -15
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/NativeViewHandler.m +0 -163
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PanHandler.h +0 -14
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PanHandler.m +0 -242
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PinchHandler.h +0 -12
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PinchHandler.m +0 -36
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RootViewGestureRecognizer.h +0 -17
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RootViewGestureRecognizer.m +0 -93
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RotationHandler.h +0 -12
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RotationHandler.m +0 -36
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/TapHandler.h +0 -13
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/TapHandler.m +0 -228
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/module.modulemap +0 -5
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/pnpm-lock.yaml +0 -10
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/references.d.ts +0 -3
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/typings/android.d.ts +0 -456
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/typings/extensions.android.d.ts +0 -16
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/typings/ios.d.ts +0 -266
- package/pnpm-global/5/pnpm-lock.yaml +0 -19
- package/pnpm-lock.yaml +0 -16
- package/react/index.d.ts +0 -20
- package/react/index.js +0 -8
@@ -1,242 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// PanHandler.m
|
3
|
-
// GestureHandler
|
4
|
-
//
|
5
|
-
// Created by Krzysztof Magiera on 12/10/2017.
|
6
|
-
// Copyright © 2017 Software Mansion. All rights reserved.
|
7
|
-
//
|
8
|
-
|
9
|
-
#import "PanHandler.h"
|
10
|
-
|
11
|
-
#import <UIKit/UIGestureRecognizerSubclass.h>
|
12
|
-
|
13
|
-
@interface BetterPanGestureRecognizer : UIPanGestureRecognizer
|
14
|
-
|
15
|
-
@property (nonatomic) CGFloat minDistSq;
|
16
|
-
@property (nonatomic) CGFloat minVelocityX;
|
17
|
-
@property (nonatomic) CGFloat minVelocityY;
|
18
|
-
@property (nonatomic) CGFloat minVelocitySq;
|
19
|
-
@property (nonatomic) CGFloat activeOffsetXStart;
|
20
|
-
@property (nonatomic) CGFloat activeOffsetXEnd;
|
21
|
-
@property (nonatomic) CGFloat failOffsetXStart;
|
22
|
-
@property (nonatomic) CGFloat failOffsetXEnd;
|
23
|
-
@property (nonatomic) CGFloat activeOffsetYStart;
|
24
|
-
@property (nonatomic) CGFloat activeOffsetYEnd;
|
25
|
-
@property (nonatomic) CGFloat failOffsetYStart;
|
26
|
-
@property (nonatomic) CGFloat failOffsetYEnd;
|
27
|
-
|
28
|
-
|
29
|
-
- (id)initWithGestureHandler:(GestureHandler*)gestureHandler;
|
30
|
-
|
31
|
-
@end
|
32
|
-
|
33
|
-
|
34
|
-
@implementation BetterPanGestureRecognizer {
|
35
|
-
__weak GestureHandler *_gestureHandler;
|
36
|
-
NSUInteger _realMinimumNumberOfTouches;
|
37
|
-
BOOL _hasCustomActivationCriteria;
|
38
|
-
}
|
39
|
-
|
40
|
-
- (id)initWithGestureHandler:(GestureHandler*)gestureHandler
|
41
|
-
{
|
42
|
-
if ((self = [super initWithTarget:gestureHandler action:@selector(handleGesture:)])) {
|
43
|
-
_gestureHandler = gestureHandler;
|
44
|
-
_minDistSq = NAN;
|
45
|
-
_minVelocityX = NAN;
|
46
|
-
_minVelocityY = NAN;
|
47
|
-
_minVelocitySq = NAN;
|
48
|
-
_activeOffsetXStart = NAN;
|
49
|
-
_activeOffsetXEnd = NAN;
|
50
|
-
_failOffsetXStart = NAN;
|
51
|
-
_failOffsetXEnd = NAN;
|
52
|
-
_activeOffsetYStart = NAN;
|
53
|
-
_activeOffsetYEnd = NAN;
|
54
|
-
_failOffsetYStart = NAN;
|
55
|
-
_failOffsetYEnd = NAN;
|
56
|
-
_hasCustomActivationCriteria = NO;
|
57
|
-
#if !TARGET_OS_TV
|
58
|
-
_realMinimumNumberOfTouches = self.minimumNumberOfTouches;
|
59
|
-
#endif
|
60
|
-
}
|
61
|
-
return self;
|
62
|
-
}
|
63
|
-
|
64
|
-
- (void)setMinimumNumberOfTouches:(NSUInteger)minimumNumberOfTouches
|
65
|
-
{
|
66
|
-
_realMinimumNumberOfTouches = minimumNumberOfTouches;
|
67
|
-
}
|
68
|
-
|
69
|
-
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
70
|
-
{
|
71
|
-
#if !TARGET_OS_TV
|
72
|
-
if (_hasCustomActivationCriteria) {
|
73
|
-
// We use "minimumNumberOfTouches" property to prevent pan handler from recognizing
|
74
|
-
// the gesture too early before we are sure that all criteria (e.g. minimum distance
|
75
|
-
// etc. are met)
|
76
|
-
super.minimumNumberOfTouches = 20;
|
77
|
-
} else {
|
78
|
-
super.minimumNumberOfTouches = _realMinimumNumberOfTouches;
|
79
|
-
}
|
80
|
-
#endif
|
81
|
-
[super touchesBegan:touches withEvent:event];
|
82
|
-
}
|
83
|
-
|
84
|
-
- (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
85
|
-
{
|
86
|
-
[super touchesMoved:touches withEvent:event];
|
87
|
-
if (self.state == UIGestureRecognizerStatePossible && [self shouldFailUnderCustomCriteria]) {
|
88
|
-
self.state = UIGestureRecognizerStateFailed;
|
89
|
-
[self reset];
|
90
|
-
return;
|
91
|
-
}
|
92
|
-
if ((self.state == UIGestureRecognizerStatePossible || self.state == UIGestureRecognizerStateChanged)) {
|
93
|
-
if (_gestureHandler.shouldCancelWhenOutside && ![_gestureHandler containsPointInView]) {
|
94
|
-
// If the previous recognizer state is UIGestureRecognizerStateChanged
|
95
|
-
// then UIGestureRecognizer's sate machine will only transition to
|
96
|
-
// UIGestureRecognizerStateCancelled even if you set the state to
|
97
|
-
// UIGestureRecognizerStateFailed here. Making the behavior explicit.
|
98
|
-
self.state = (self.state == UIGestureRecognizerStatePossible)
|
99
|
-
? UIGestureRecognizerStateFailed
|
100
|
-
: UIGestureRecognizerStateCancelled;
|
101
|
-
[self reset];
|
102
|
-
return;
|
103
|
-
}
|
104
|
-
}
|
105
|
-
if (_hasCustomActivationCriteria && self.state == UIGestureRecognizerStatePossible && [self shouldActivateUnderCustomCriteria]) {
|
106
|
-
#if !TARGET_OS_TV
|
107
|
-
super.minimumNumberOfTouches = _realMinimumNumberOfTouches;
|
108
|
-
if ([self numberOfTouches] >= _realMinimumNumberOfTouches) {
|
109
|
-
self.state = UIGestureRecognizerStateBegan;
|
110
|
-
[self setTranslation:CGPointMake(0, 0) inView:self.view];
|
111
|
-
}
|
112
|
-
#endif
|
113
|
-
}
|
114
|
-
}
|
115
|
-
|
116
|
-
- (void)reset
|
117
|
-
{
|
118
|
-
self.enabled = YES;
|
119
|
-
[super reset];
|
120
|
-
}
|
121
|
-
|
122
|
-
- (void)updateHasCustomActivationCriteria
|
123
|
-
{
|
124
|
-
_hasCustomActivationCriteria = !isnan(_minDistSq)
|
125
|
-
|| !isnan(_minVelocityX) || !isnan(_minVelocityY) || !isnan(_minVelocitySq)
|
126
|
-
|| !isnan(_activeOffsetXStart) || !isnan(_activeOffsetXEnd)
|
127
|
-
|| !isnan(_activeOffsetYStart) || !isnan(_activeOffsetYEnd);
|
128
|
-
}
|
129
|
-
|
130
|
-
- (BOOL)shouldFailUnderCustomCriteria
|
131
|
-
{
|
132
|
-
CGPoint trans = [self translationInView:self.view];
|
133
|
-
if (!isnan(_failOffsetXStart) && trans.x < _failOffsetXStart) {
|
134
|
-
return YES;
|
135
|
-
}
|
136
|
-
if (!isnan(_failOffsetXEnd) && trans.x > _failOffsetXEnd) {
|
137
|
-
return YES;
|
138
|
-
}
|
139
|
-
if (!isnan(_failOffsetYStart) && trans.y < _failOffsetYStart) {
|
140
|
-
return YES;
|
141
|
-
}
|
142
|
-
if (!isnan(_failOffsetYEnd) && trans.y > _failOffsetYEnd) {
|
143
|
-
return YES;
|
144
|
-
}
|
145
|
-
return NO;
|
146
|
-
}
|
147
|
-
|
148
|
-
- (BOOL)shouldActivateUnderCustomCriteria
|
149
|
-
{
|
150
|
-
CGPoint trans = [self translationInView:self.view];
|
151
|
-
if (!isnan(_activeOffsetXStart) && trans.x < _activeOffsetXStart) {
|
152
|
-
return YES;
|
153
|
-
}
|
154
|
-
if (!isnan(_activeOffsetXEnd) && trans.x > _activeOffsetXEnd) {
|
155
|
-
return YES;
|
156
|
-
}
|
157
|
-
if (!isnan(_activeOffsetYStart) && trans.y < _activeOffsetYStart) {
|
158
|
-
return YES;
|
159
|
-
}
|
160
|
-
if (!isnan(_activeOffsetYEnd) && trans.y > _activeOffsetYEnd) {
|
161
|
-
return YES;
|
162
|
-
}
|
163
|
-
|
164
|
-
if (TEST_MIN_IF_NOT_NAN(VEC_LEN_SQ(trans), _minDistSq)) {
|
165
|
-
return YES;
|
166
|
-
}
|
167
|
-
|
168
|
-
CGPoint velocity = [self velocityInView:self.view];
|
169
|
-
if (TEST_MIN_IF_NOT_NAN(velocity.x, _minVelocityX)) {
|
170
|
-
return YES;
|
171
|
-
}
|
172
|
-
if (TEST_MIN_IF_NOT_NAN(velocity.y, _minVelocityY)) {
|
173
|
-
return YES;
|
174
|
-
}
|
175
|
-
if (TEST_MIN_IF_NOT_NAN(VEC_LEN_SQ(velocity), _minVelocitySq)) {
|
176
|
-
return YES;
|
177
|
-
}
|
178
|
-
|
179
|
-
return NO;
|
180
|
-
}
|
181
|
-
|
182
|
-
@end
|
183
|
-
|
184
|
-
@implementation PanGestureHandler
|
185
|
-
|
186
|
-
- (instancetype)initWithTag:(NSNumber *)tag
|
187
|
-
{
|
188
|
-
if ((self = [super initWithTag:tag])) {
|
189
|
-
_recognizer = [[BetterPanGestureRecognizer alloc] initWithGestureHandler:self];
|
190
|
-
}
|
191
|
-
return self;
|
192
|
-
}
|
193
|
-
|
194
|
-
- (void)configure:(NSDictionary *)config
|
195
|
-
{
|
196
|
-
[super configure:config];
|
197
|
-
BetterPanGestureRecognizer *recognizer = (BetterPanGestureRecognizer *)_recognizer;
|
198
|
-
|
199
|
-
APPLY_FLOAT_PROP(minVelocityX);
|
200
|
-
APPLY_FLOAT_PROP(minVelocityY);
|
201
|
-
APPLY_FLOAT_PROP(activeOffsetXStart);
|
202
|
-
APPLY_FLOAT_PROP(activeOffsetXEnd);
|
203
|
-
APPLY_FLOAT_PROP(failOffsetXStart);
|
204
|
-
APPLY_FLOAT_PROP(failOffsetXEnd);
|
205
|
-
APPLY_FLOAT_PROP(activeOffsetYStart);
|
206
|
-
APPLY_FLOAT_PROP(activeOffsetYEnd);
|
207
|
-
APPLY_FLOAT_PROP(failOffsetYStart);
|
208
|
-
APPLY_FLOAT_PROP(failOffsetYEnd);
|
209
|
-
|
210
|
-
#if !TARGET_OS_TV
|
211
|
-
APPLY_NAMED_INT_PROP(minimumNumberOfTouches, @"minPointers");
|
212
|
-
APPLY_NAMED_INT_PROP(maximumNumberOfTouches, @"maxPointers");
|
213
|
-
#endif
|
214
|
-
|
215
|
-
id prop = config[@"minDist"];
|
216
|
-
if (prop != nil) {
|
217
|
-
CGFloat dist = [prop floatValue];
|
218
|
-
recognizer.minDistSq = dist * dist;
|
219
|
-
}
|
220
|
-
|
221
|
-
prop = config[@"minVelocity"];
|
222
|
-
if (prop != nil) {
|
223
|
-
CGFloat velocity = [prop floatValue];
|
224
|
-
recognizer.minVelocitySq = velocity * velocity;
|
225
|
-
}
|
226
|
-
[recognizer updateHasCustomActivationCriteria];
|
227
|
-
}
|
228
|
-
|
229
|
-
- (NSMutableDictionary *)eventExtraData:(UIPanGestureRecognizer *)recognizer
|
230
|
-
{
|
231
|
-
CGPoint translation = [recognizer translationInView:recognizer.view];
|
232
|
-
CGPoint velocity = [recognizer velocityInView:recognizer.view.window];
|
233
|
-
NSMutableDictionary* result = [super eventExtraData:recognizer];
|
234
|
-
[result setObject:@(translation.x) forKey:@"translationX"];
|
235
|
-
[result setObject:@(translation.y) forKey:@"translationY"];
|
236
|
-
[result setObject:SAFE_VELOCITY(velocity.x) forKey:@"velocityX"];
|
237
|
-
[result setObject:SAFE_VELOCITY(velocity.y) forKey:@"velocityY"];
|
238
|
-
return result;
|
239
|
-
}
|
240
|
-
|
241
|
-
@end
|
242
|
-
|
@@ -1,12 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// RNPinchHandler.h
|
3
|
-
// GestureHandler
|
4
|
-
//
|
5
|
-
// Created by Krzysztof Magiera on 12/10/2017.
|
6
|
-
// Copyright © 2017 Software Mansion. All rights reserved.
|
7
|
-
//
|
8
|
-
|
9
|
-
#import "GestureHandler.h"
|
10
|
-
|
11
|
-
@interface PinchGestureHandler : GestureHandler
|
12
|
-
@end
|
@@ -1,36 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// PinchHandler.m
|
3
|
-
// GestureHandler
|
4
|
-
//
|
5
|
-
// Created by Krzysztof Magiera on 12/10/2017.
|
6
|
-
// Copyright © 2017 Software Mansion. All rights reserved.
|
7
|
-
//
|
8
|
-
|
9
|
-
#import "PinchHandler.h"
|
10
|
-
|
11
|
-
@implementation PinchGestureHandler
|
12
|
-
|
13
|
-
- (instancetype)initWithTag:(NSNumber *)tag
|
14
|
-
{
|
15
|
-
if ((self = [super initWithTag:tag])) {
|
16
|
-
#if !TARGET_OS_TV
|
17
|
-
_recognizer = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(handleGesture:)];
|
18
|
-
#endif
|
19
|
-
}
|
20
|
-
return self;
|
21
|
-
}
|
22
|
-
|
23
|
-
#if !TARGET_OS_TV
|
24
|
-
- (NSMutableDictionary *)eventExtraData:(UIPinchGestureRecognizer *)recognizer
|
25
|
-
{
|
26
|
-
NSMutableDictionary* result = [super eventExtraData:recognizer];
|
27
|
-
[result setObject:@(recognizer.scale) forKey:@"scale"];
|
28
|
-
[result setObject:SAFE_VELOCITY(recognizer.velocity) forKey:@"velocity"];
|
29
|
-
[result setObject:[result objectForKey:@"x"] forKey:@"focalX"];
|
30
|
-
[result setObject:[result objectForKey:@"y"] forKey:@"focalY"];
|
31
|
-
return result;
|
32
|
-
}
|
33
|
-
#endif
|
34
|
-
|
35
|
-
@end
|
36
|
-
|
@@ -1,17 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// RootViewGestureRecognizer.h
|
3
|
-
// GestureHandler
|
4
|
-
//
|
5
|
-
// Created by Krzysztof Magiera on 12/10/2017.
|
6
|
-
// Copyright © 2017 Software Mansion. All rights reserved.
|
7
|
-
//
|
8
|
-
|
9
|
-
#import "GestureHandler.h"
|
10
|
-
|
11
|
-
@interface RootViewGestureRecognizer : UIGestureRecognizer
|
12
|
-
|
13
|
-
@property (nullable, nonatomic, weak) id<RootViewGestureRecognizerDelegate> delegate;
|
14
|
-
|
15
|
-
- (void)blockOtherRecognizers;
|
16
|
-
|
17
|
-
@end
|
@@ -1,93 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// RNRootViewGestureRecognizer.m
|
3
|
-
// RNGestureHandler
|
4
|
-
//
|
5
|
-
// Created by Krzysztof Magiera on 12/10/2017.
|
6
|
-
// Copyright © 2017 Software Mansion. All rights reserved.
|
7
|
-
//
|
8
|
-
|
9
|
-
#import "RootViewGestureRecognizer.h"
|
10
|
-
|
11
|
-
#import <UIKit/UIGestureRecognizerSubclass.h>
|
12
|
-
|
13
|
-
|
14
|
-
@implementation RootViewGestureRecognizer
|
15
|
-
{
|
16
|
-
BOOL _active;
|
17
|
-
}
|
18
|
-
|
19
|
-
@dynamic delegate;
|
20
|
-
|
21
|
-
- (instancetype)init
|
22
|
-
{
|
23
|
-
if (self = [super init]) {
|
24
|
-
self.delaysTouchesEnded = NO;
|
25
|
-
self.delaysTouchesBegan = NO;
|
26
|
-
}
|
27
|
-
return self;
|
28
|
-
}
|
29
|
-
|
30
|
-
- (BOOL)shouldBeRequiredToFailByGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
|
31
|
-
{
|
32
|
-
// This method is used to implement "enabled" feature for gesture handlers. We enforce gesture
|
33
|
-
// recognizers that are connected with "disabled" handlers to wait for the root gesture
|
34
|
-
// recognizer to fail and this way we block them from acting.
|
35
|
-
GestureHandler *otherHandler = [GestureHandler
|
36
|
-
findGestureHandlerByRecognizer:otherGestureRecognizer];
|
37
|
-
if (otherHandler != nil && otherHandler.enabled == NO) {
|
38
|
-
return YES;
|
39
|
-
}
|
40
|
-
return NO;
|
41
|
-
}
|
42
|
-
|
43
|
-
- (BOOL)canPreventGestureRecognizer:(UIGestureRecognizer *)preventedGestureRecognizer
|
44
|
-
{
|
45
|
-
return false;
|
46
|
-
// return ![preventedGestureRecognizer isKindOfClass:[RCTTouchHandler class]];
|
47
|
-
}
|
48
|
-
|
49
|
-
- (BOOL)canBePreventedByGestureRecognizer:(UIGestureRecognizer *)preventingGestureRecognizer
|
50
|
-
{
|
51
|
-
// When this method is called it means that one of handlers has activated, in this case we want
|
52
|
-
// to send an info to JS so that it cancells all JS responders
|
53
|
-
[self.delegate gestureRecognizer:preventingGestureRecognizer didActivateInRootView:self.view];
|
54
|
-
return [super canBePreventedByGestureRecognizer:preventingGestureRecognizer];
|
55
|
-
}
|
56
|
-
|
57
|
-
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
58
|
-
{
|
59
|
-
_active = YES;
|
60
|
-
self.state = UIGestureRecognizerStatePossible;
|
61
|
-
}
|
62
|
-
|
63
|
-
- (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
64
|
-
{
|
65
|
-
self.state = UIGestureRecognizerStatePossible;
|
66
|
-
}
|
67
|
-
|
68
|
-
- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
69
|
-
{
|
70
|
-
if (self.state == UIGestureRecognizerStateBegan || self.state == UIGestureRecognizerStateChanged) {
|
71
|
-
self.state = UIGestureRecognizerStateEnded;
|
72
|
-
} else {
|
73
|
-
self.state = UIGestureRecognizerStateFailed;
|
74
|
-
}
|
75
|
-
[self reset];
|
76
|
-
_active = NO;
|
77
|
-
}
|
78
|
-
|
79
|
-
- (void)touchesCancelled:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
80
|
-
{
|
81
|
-
self.state = UIGestureRecognizerStateCancelled;
|
82
|
-
[self reset];
|
83
|
-
_active = NO;
|
84
|
-
}
|
85
|
-
|
86
|
-
- (void)blockOtherRecognizers
|
87
|
-
{
|
88
|
-
if (_active) {
|
89
|
-
self.state = UIGestureRecognizerStateBegan;
|
90
|
-
}
|
91
|
-
}
|
92
|
-
|
93
|
-
@end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// RotationHandler.h
|
3
|
-
// GestureHandler
|
4
|
-
//
|
5
|
-
// Created by Krzysztof Magiera on 12/10/2017.
|
6
|
-
// Copyright © 2017 Software Mansion. All rights reserved.
|
7
|
-
//
|
8
|
-
|
9
|
-
#import "GestureHandler.h"
|
10
|
-
|
11
|
-
@interface RotationGestureHandler : GestureHandler
|
12
|
-
@end
|
@@ -1,36 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// RotationHandler.m
|
3
|
-
// GestureHandler
|
4
|
-
//
|
5
|
-
// Created by Krzysztof Magiera on 12/10/2017.
|
6
|
-
// Copyright © 2017 Software Mansion. All rights reserved.
|
7
|
-
//
|
8
|
-
|
9
|
-
#import "RotationHandler.h"
|
10
|
-
|
11
|
-
@implementation RotationGestureHandler
|
12
|
-
|
13
|
-
- (instancetype)initWithTag:(NSNumber *)tag
|
14
|
-
{
|
15
|
-
if ((self = [super initWithTag:tag])) {
|
16
|
-
#if !TARGET_OS_TV
|
17
|
-
_recognizer = [[UIRotationGestureRecognizer alloc] initWithTarget:self action:@selector(handleGesture:)];
|
18
|
-
#endif
|
19
|
-
}
|
20
|
-
return self;
|
21
|
-
}
|
22
|
-
|
23
|
-
#if !TARGET_OS_TV
|
24
|
-
- (NSMutableDictionary *)eventExtraData:(UIRotationGestureRecognizer *)recognizer
|
25
|
-
{
|
26
|
-
NSMutableDictionary* result = [super eventExtraData:recognizer];
|
27
|
-
[result setObject:@(recognizer.velocity) forKey:@"velocity"];
|
28
|
-
[result setObject:@(recognizer.rotation) forKey:@"rotation"];
|
29
|
-
[result setObject:[result objectForKey:@"x"] forKey:@"anchorX"];
|
30
|
-
[result setObject:[result objectForKey:@"y"] forKey:@"anchorY"];
|
31
|
-
return result;
|
32
|
-
}
|
33
|
-
#endif
|
34
|
-
|
35
|
-
@end
|
36
|
-
|
@@ -1,13 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// TapHandler.h
|
3
|
-
// GestureHandler
|
4
|
-
//
|
5
|
-
// Created by Krzysztof Magiera on 12/10/2017.
|
6
|
-
// Copyright © 2017 Software Mansion. All rights reserved.
|
7
|
-
//
|
8
|
-
|
9
|
-
#import "GestureHandler.h"
|
10
|
-
|
11
|
-
@interface TapGestureHandler : GestureHandler
|
12
|
-
-(void)resetStored;
|
13
|
-
@end
|
@@ -1,228 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// TapHandler.m
|
3
|
-
// GestureHandler
|
4
|
-
//
|
5
|
-
// Created by Krzysztof Magiera on 12/10/2017.
|
6
|
-
// Copyright © 2017 Software Mansion. All rights reserved.
|
7
|
-
//
|
8
|
-
|
9
|
-
#import "TapHandler.h"
|
10
|
-
|
11
|
-
#import <UIKit/UIGestureRecognizerSubclass.h>
|
12
|
-
|
13
|
-
|
14
|
-
// BetterTapGestureRecognizer extends UIGestureRecognizer instead of UITapGestureRecognizer
|
15
|
-
// because the latter does not allow for parameters like maxDelay, maxDuration, minPointers,
|
16
|
-
// maxDelta to be configured. Using our custom implementation of tap recognizer we are able
|
17
|
-
// to support these.
|
18
|
-
|
19
|
-
@interface BetterTapGestureRecognizer : UIGestureRecognizer
|
20
|
-
|
21
|
-
@property (nonatomic) NSUInteger numberOfTaps;
|
22
|
-
@property (nonatomic) NSTimeInterval maxDelay;
|
23
|
-
@property (nonatomic) NSTimeInterval maxDuration;
|
24
|
-
@property (nonatomic) CGFloat maxDistSq;
|
25
|
-
@property (nonatomic) CGFloat maxDeltaX;
|
26
|
-
@property (nonatomic) CGFloat maxDeltaY;
|
27
|
-
@property (nonatomic) NSInteger minPointers;
|
28
|
-
|
29
|
-
- (id)initWithGestureHandler:(GestureHandler*)gestureHandler;
|
30
|
-
|
31
|
-
@end
|
32
|
-
|
33
|
-
@implementation BetterTapGestureRecognizer {
|
34
|
-
__weak TapGestureHandler *_gestureHandler;
|
35
|
-
NSUInteger _tapsSoFar;
|
36
|
-
CGPoint _initPosition;
|
37
|
-
NSInteger _maxNumberOfTouches;
|
38
|
-
}
|
39
|
-
|
40
|
-
- (id)initWithGestureHandler:(GestureHandler*)gestureHandler
|
41
|
-
{
|
42
|
-
if ((self = [super initWithTarget:gestureHandler action:@selector(handleGesture:)])) {
|
43
|
-
_gestureHandler = gestureHandler;
|
44
|
-
_tapsSoFar = 0;
|
45
|
-
_numberOfTaps = 1;
|
46
|
-
_minPointers = 1;
|
47
|
-
_maxDelay = 0.2;
|
48
|
-
_maxDuration = NAN;
|
49
|
-
_maxDeltaX = NAN;
|
50
|
-
_maxDeltaY = NAN;
|
51
|
-
_maxDistSq = NAN;
|
52
|
-
_gestureHandler.shouldCancelWhenOutside = YES;
|
53
|
-
}
|
54
|
-
return self;
|
55
|
-
}
|
56
|
-
|
57
|
-
- (void)triggerAction
|
58
|
-
{
|
59
|
-
[_gestureHandler handleGesture:self];
|
60
|
-
}
|
61
|
-
|
62
|
-
- (void)cancel
|
63
|
-
{
|
64
|
-
self.enabled = NO;
|
65
|
-
}
|
66
|
-
|
67
|
-
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
68
|
-
{
|
69
|
-
[_gestureHandler resetStored];
|
70
|
-
[super touchesBegan:touches withEvent:event];
|
71
|
-
if (_tapsSoFar == 0) {
|
72
|
-
_initPosition = [self locationInView:self.view];
|
73
|
-
}
|
74
|
-
_tapsSoFar++;
|
75
|
-
if (_tapsSoFar) {
|
76
|
-
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(cancel) object:nil];
|
77
|
-
}
|
78
|
-
NSInteger numberOfTouches = [touches count];
|
79
|
-
if (numberOfTouches > _maxNumberOfTouches) {
|
80
|
-
_maxNumberOfTouches = numberOfTouches;
|
81
|
-
}
|
82
|
-
if (!isnan(_maxDuration)) {
|
83
|
-
[self performSelector:@selector(cancel) withObject:nil afterDelay:_maxDuration];
|
84
|
-
}
|
85
|
-
self.state = UIGestureRecognizerStatePossible;
|
86
|
-
[self triggerAction];
|
87
|
-
}
|
88
|
-
|
89
|
-
- (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
90
|
-
{
|
91
|
-
[super touchesMoved:touches withEvent:event];
|
92
|
-
NSInteger numberOfTouches = [touches count];
|
93
|
-
if (numberOfTouches > _maxNumberOfTouches) {
|
94
|
-
_maxNumberOfTouches = numberOfTouches;
|
95
|
-
}
|
96
|
-
|
97
|
-
if (self.state != UIGestureRecognizerStatePossible) {
|
98
|
-
return;
|
99
|
-
}
|
100
|
-
|
101
|
-
if ([self shouldFailUnderCustomCriteria]) {
|
102
|
-
self.state = UIGestureRecognizerStateFailed;
|
103
|
-
[self triggerAction];
|
104
|
-
[self reset];
|
105
|
-
return;
|
106
|
-
}
|
107
|
-
|
108
|
-
self.state = UIGestureRecognizerStatePossible;
|
109
|
-
[self triggerAction];
|
110
|
-
}
|
111
|
-
|
112
|
-
- (CGPoint)translationInView {
|
113
|
-
CGPoint currentPosition = [self locationInView:self.view];
|
114
|
-
return CGPointMake(currentPosition.x - _initPosition.x, currentPosition.y - _initPosition.y);
|
115
|
-
}
|
116
|
-
|
117
|
-
- (BOOL)shouldFailUnderCustomCriteria
|
118
|
-
{
|
119
|
-
if (_gestureHandler.shouldCancelWhenOutside) {
|
120
|
-
if (![_gestureHandler containsPointInView]) {
|
121
|
-
return YES;
|
122
|
-
}
|
123
|
-
}
|
124
|
-
|
125
|
-
CGPoint trans = [self translationInView];
|
126
|
-
if (TEST_MAX_IF_NOT_NAN(fabs(trans.x), _maxDeltaX)) {
|
127
|
-
return YES;
|
128
|
-
}
|
129
|
-
if (TEST_MAX_IF_NOT_NAN(fabs(trans.y), _maxDeltaY)) {
|
130
|
-
return YES;
|
131
|
-
}
|
132
|
-
if (TEST_MAX_IF_NOT_NAN(fabs(trans.y * trans.y + trans.x + trans.x), _maxDistSq)) {
|
133
|
-
return YES;
|
134
|
-
}
|
135
|
-
return NO;
|
136
|
-
}
|
137
|
-
|
138
|
-
- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
139
|
-
{
|
140
|
-
[super touchesEnded:touches withEvent:event];
|
141
|
-
if (_numberOfTaps == _tapsSoFar && _maxNumberOfTouches >= _minPointers) {
|
142
|
-
self.state = UIGestureRecognizerStateEnded;
|
143
|
-
[self reset];
|
144
|
-
} else {
|
145
|
-
[self performSelector:@selector(cancel) withObject:nil afterDelay:_maxDelay];
|
146
|
-
}
|
147
|
-
}
|
148
|
-
|
149
|
-
- (void)touchesCancelled:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
150
|
-
{
|
151
|
-
[super touchesCancelled:touches withEvent:event];
|
152
|
-
self.state = UIGestureRecognizerStateCancelled;
|
153
|
-
[self reset];
|
154
|
-
}
|
155
|
-
|
156
|
-
- (void)reset
|
157
|
-
{
|
158
|
-
if (self.state == UIGestureRecognizerStateFailed) {
|
159
|
-
[self triggerAction];
|
160
|
-
}
|
161
|
-
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(cancel) object:nil];
|
162
|
-
_tapsSoFar = 0;
|
163
|
-
_maxNumberOfTouches = 0;
|
164
|
-
self.enabled = YES;
|
165
|
-
[super reset];
|
166
|
-
}
|
167
|
-
|
168
|
-
@end
|
169
|
-
|
170
|
-
@implementation TapGestureHandler {
|
171
|
-
__weak NSMutableDictionary *_lastExtraEventData;
|
172
|
-
}
|
173
|
-
|
174
|
-
|
175
|
-
- (instancetype)initWithTag:(NSNumber *)tag
|
176
|
-
{
|
177
|
-
if ((self = [super initWithTag:tag])) {
|
178
|
-
_recognizer = [[BetterTapGestureRecognizer alloc] initWithGestureHandler:self];
|
179
|
-
}
|
180
|
-
return self;
|
181
|
-
}
|
182
|
-
|
183
|
-
- (void)configure:(NSDictionary *)config
|
184
|
-
{
|
185
|
-
[super configure:config];
|
186
|
-
BetterTapGestureRecognizer *recognizer = (BetterTapGestureRecognizer *)_recognizer;
|
187
|
-
|
188
|
-
APPLY_INT_PROP(numberOfTaps);
|
189
|
-
APPLY_INT_PROP(minPointers);
|
190
|
-
APPLY_FLOAT_PROP(maxDeltaX);
|
191
|
-
APPLY_FLOAT_PROP(maxDeltaY);
|
192
|
-
|
193
|
-
id prop = config[@"maxDelayMs"];
|
194
|
-
if (prop != nil) {
|
195
|
-
recognizer.maxDelay = [prop floatValue] / 1000.0;
|
196
|
-
}
|
197
|
-
|
198
|
-
prop = config[@"maxDurationMs"];
|
199
|
-
if (prop != nil) {
|
200
|
-
recognizer.maxDuration = [prop floatValue] / 1000.0;
|
201
|
-
}
|
202
|
-
|
203
|
-
prop = config[@"maxDist"];
|
204
|
-
if (prop != nil) {
|
205
|
-
CGFloat dist = [prop floatValue];
|
206
|
-
recognizer.maxDistSq = dist * dist;
|
207
|
-
}
|
208
|
-
}
|
209
|
-
|
210
|
-
- (void)resetStored
|
211
|
-
{
|
212
|
-
_lastExtraEventData = NULL;
|
213
|
-
}
|
214
|
-
- (NSMutableDictionary *)eventExtraData:(UIGestureRecognizer *)recognizer
|
215
|
-
{
|
216
|
-
if (recognizer.numberOfTouches == 0 && _lastExtraEventData != NULL) {
|
217
|
-
return _lastExtraEventData;
|
218
|
-
}
|
219
|
-
NSMutableDictionary *result = [super eventExtraData:recognizer];
|
220
|
-
if (recognizer.numberOfTouches != 0)
|
221
|
-
{
|
222
|
-
_lastExtraEventData = result;
|
223
|
-
}
|
224
|
-
return result;
|
225
|
-
}
|
226
|
-
|
227
|
-
@end
|
228
|
-
|