react-native-navigation 7.38.6 → 7.39.0-snapshot.1317

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.
@@ -114,9 +114,6 @@ android {
114
114
  reactNative71 {
115
115
  dimension "RNN.reactNativeVersion"
116
116
  buildConfigField("int", "REACT_NATVE_VERSION_MINOR", "71")
117
- kotlinOptions {
118
- jvmTarget = JavaVersion.VERSION_17
119
- }
120
117
  }
121
118
  }
122
119
 
@@ -134,6 +134,7 @@ public class NavigationActivity extends AppCompatActivity implements DefaultHard
134
134
 
135
135
  @Override
136
136
  public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
137
+ super.onRequestPermissionsResult(requestCode, permissions, grantResults);
137
138
  NavigationApplication.instance.onRequestPermissionsResult(requestCode, permissions, grantResults);
138
139
  if (mPermissionListener != null && mPermissionListener.onRequestPermissionsResult(requestCode, permissions, grantResults)) {
139
140
  mPermissionListener = null;
@@ -3,10 +3,12 @@
3
3
  #import "ElementHorizontalTransition.h"
4
4
  #import "ElementVerticalTransition.h"
5
5
  #import "HorizontalTranslationTransition.h"
6
+ #import "HorizontalScaleTransition.h"
6
7
  #import "RNNElementFinder.h"
7
8
  #import "Transition.h"
8
9
  #import "VerticalRotationTransition.h"
9
10
  #import "VerticalTranslationTransition.h"
11
+ #import "VerticalScaleTransition.h"
10
12
 
11
13
  @implementation ElementAnimator {
12
14
  UIView *_containerView;
@@ -60,6 +62,18 @@
60
62
  transitionDetails:transitionOptions.rotationY]];
61
63
  }
62
64
 
65
+ if (transitionOptions.scaleX.hasAnimation) {
66
+ [animations addObject:[[HorizontalScaleTransition alloc]
67
+ initWithView:self.view
68
+ transitionDetails:transitionOptions.scaleX]];
69
+ }
70
+
71
+ if (transitionOptions.scaleY.hasAnimation) {
72
+ [animations addObject:[[VerticalScaleTransition alloc]
73
+ initWithView:self.view
74
+ transitionDetails:transitionOptions.scaleY]];
75
+ }
76
+
63
77
  return animations;
64
78
  }
65
79
 
@@ -0,0 +1,6 @@
1
+ #import "FloatTransition.h"
2
+ #import <Foundation/Foundation.h>
3
+
4
+ @interface HorizontalScaleTransition : FloatTransition
5
+
6
+ @end
@@ -0,0 +1,21 @@
1
+ #import "HorizontalScaleTransition.h"
2
+
3
+ @implementation HorizontalScaleTransition
4
+
5
+ - (CATransform3D)animateWithProgress:(CGFloat)p {
6
+ CGFloat scaleX = [RNNInterpolator fromFloat:self.from
7
+ toFloat:self.to
8
+ precent:p
9
+ interpolator:self.interpolator];
10
+ return CATransform3DMakeScale(scaleX, 1, 1);
11
+ }
12
+
13
+ - (CGFloat)calculateFrom:(Double *)from {
14
+ return from.hasValue ? from.get : 1;
15
+ }
16
+
17
+ - (CGFloat)calculateTo:(Double *)to {
18
+ return to.hasValue ? to.get : 1;
19
+ }
20
+
21
+ @end
@@ -8,6 +8,8 @@
8
8
  self.alpha = [[TransitionDetailsOptions alloc] initWithDict:dict[@"alpha"]];
9
9
  self.x = [[TransitionDetailsOptions alloc] initWithDict:dict[@"x"]];
10
10
  self.y = [[TransitionDetailsOptions alloc] initWithDict:dict[@"y"]];
11
+ self.scaleX = [[TransitionDetailsOptions alloc] initWithDict:dict[@"scaleX"]];
12
+ self.scaleY = [[TransitionDetailsOptions alloc] initWithDict:dict[@"scaleY"]];
11
13
  self.translationX = [[TransitionDetailsOptions alloc] initWithDict:dict[@"translationX"]];
12
14
  self.translationY = [[TransitionDetailsOptions alloc] initWithDict:dict[@"translationY"]];
13
15
  self.rotationX = [[TransitionDetailsOptions alloc] initWithDict:dict[@"rotationX"]];
@@ -23,6 +25,8 @@
23
25
  [self.alpha mergeOptions:options.alpha];
24
26
  [self.x mergeOptions:options.x];
25
27
  [self.y mergeOptions:options.y];
28
+ [self.scaleX mergeOptions:options.scaleX];
29
+ [self.scaleY mergeOptions:options.scaleY];
26
30
  [self.translationX mergeOptions:options.translationX];
27
31
  [self.translationY mergeOptions:options.translationY];
28
32
  [self.rotationX mergeOptions:options.rotationX];
@@ -36,12 +40,14 @@
36
40
 
37
41
  - (BOOL)hasAnimation {
38
42
  return self.x.hasAnimation || self.y.hasAnimation || self.alpha.hasAnimation ||
43
+ self.scaleX.hasAnimation || self.scaleY.hasAnimation ||
39
44
  self.translationX.hasAnimation || self.translationY.hasAnimation ||
40
45
  self.rotationX.hasAnimation || self.rotationY.hasAnimation;
41
46
  }
42
47
 
43
48
  - (BOOL)hasValue {
44
49
  return self.x.hasAnimation || self.y.hasAnimation || self.alpha.hasAnimation ||
50
+ self.scaleX.hasAnimation || self.scaleY.hasAnimation ||
45
51
  self.translationX.hasAnimation || self.translationY.hasAnimation ||
46
52
  self.rotationX.hasAnimation || self.rotationY.hasAnimation ||
47
53
  self.waitForRender.hasValue || self.enable.hasValue;
@@ -61,6 +67,14 @@
61
67
  maxDuration = [_y.duration withDefault:0];
62
68
  }
63
69
 
70
+ if ([_scaleX.duration withDefault:0] > maxDuration) {
71
+ maxDuration = [_scaleX.duration withDefault:0];
72
+ }
73
+
74
+ if ([_scaleY.duration withDefault:0] > maxDuration) {
75
+ maxDuration = [_scaleY.duration withDefault:0];
76
+ }
77
+
64
78
  if ([_translationX.duration withDefault:0] > maxDuration) {
65
79
  maxDuration = [_translationX.duration withDefault:0];
66
80
  }
@@ -0,0 +1,6 @@
1
+ #import "FloatTransition.h"
2
+ #import <Foundation/Foundation.h>
3
+
4
+ @interface VerticalScaleTransition : FloatTransition
5
+
6
+ @end
@@ -0,0 +1,21 @@
1
+ #import "VerticalScaleTransition.h"
2
+
3
+ @implementation VerticalScaleTransition
4
+
5
+ - (CATransform3D)animateWithProgress:(CGFloat)p {
6
+ CGFloat scaleY = [RNNInterpolator fromFloat:self.from
7
+ toFloat:self.to
8
+ precent:p
9
+ interpolator:self.interpolator];
10
+ return CATransform3DMakeScale(1, scaleY, 1);
11
+ }
12
+
13
+ - (CGFloat)calculateFrom:(Double *)from {
14
+ return from.hasValue ? from.get : 1;
15
+ }
16
+
17
+ - (CGFloat)calculateTo:(Double *)to {
18
+ return to.hasValue ? to.get : 1;
19
+ }
20
+
21
+ @end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-navigation",
3
- "version": "7.38.6",
3
+ "version": "7.39.0-snapshot.1317",
4
4
  "description": "React Native Navigation - truly native navigation for iOS and Android",
5
5
  "license": "MIT",
6
6
  "nativePackage": true,