react-native 0.63.3 → 0.63.5
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/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +1 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Utilities/MatrixMath.js +0 -4
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/RCTAlertController.h +14 -0
- package/React/CoreModules/RCTAlertController.m +36 -0
- package/React/CoreModules/RCTAlertManager.mm +6 -25
- package/React/CoreModules/RCTWebSocketModule.mm +3 -1
- package/React/Views/RCTConvert+Transform.m +12 -4
- package/ReactAndroid/gradle.properties +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableNativeMap.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/MatrixMathHelper.java +0 -4
- package/ReactAndroid/src/main/java/com/facebook/react/viewmanagers/AndroidDropdownPickerManagerDelegate.java +12 -9
- package/ReactAndroid/src/main/java/com/facebook/react/views/picker/ReactDropdownPickerManager.java +6 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/picker/ReactPicker.java +3 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java +31 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollViewManager.java +12 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java +31 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java +12 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +2 -2
- package/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/BUCK +9 -9
- package/ReactAndroid/src/main/third-party/java/okhttp/BUCK +4 -4
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/android/com/facebook/react/react-native/0.63.5/react-native-0.63.5-javadoc.jar +0 -0
- package/android/com/facebook/react/react-native/0.63.5/react-native-0.63.5-javadoc.jar.md5 +1 -0
- package/android/com/facebook/react/react-native/0.63.5/react-native-0.63.5-javadoc.jar.sha1 +1 -0
- package/android/com/facebook/react/react-native/{0.63.3/react-native-0.63.3-sources.jar → 0.63.5/react-native-0.63.5-sources.jar} +0 -0
- package/android/com/facebook/react/react-native/0.63.5/react-native-0.63.5-sources.jar.md5 +1 -0
- package/android/com/facebook/react/react-native/0.63.5/react-native-0.63.5-sources.jar.sha1 +1 -0
- package/android/com/facebook/react/react-native/{0.63.3/react-native-0.63.3.aar → 0.63.5/react-native-0.63.5.aar} +0 -0
- package/android/com/facebook/react/react-native/0.63.5/react-native-0.63.5.aar.md5 +1 -0
- package/android/com/facebook/react/react-native/0.63.5/react-native-0.63.5.aar.sha1 +1 -0
- package/android/com/facebook/react/react-native/{0.63.3/react-native-0.63.3.pom → 0.63.5/react-native-0.63.5.pom} +4 -4
- package/android/com/facebook/react/react-native/0.63.5/react-native-0.63.5.pom.md5 +1 -0
- package/android/com/facebook/react/react-native/0.63.5/react-native-0.63.5.pom.sha1 +1 -0
- package/android/com/facebook/react/react-native/maven-metadata.xml +3 -3
- package/android/com/facebook/react/react-native/maven-metadata.xml.md5 +1 -1
- package/android/com/facebook/react/react-native/maven-metadata.xml.sha1 +1 -1
- package/package.json +2 -2
- package/react.gradle +23 -0
- package/template/package.json +1 -1
- package/android/com/facebook/react/react-native/0.63.3/react-native-0.63.3-javadoc.jar +0 -0
- package/android/com/facebook/react/react-native/0.63.3/react-native-0.63.3-javadoc.jar.md5 +0 -1
- package/android/com/facebook/react/react-native/0.63.3/react-native-0.63.3-javadoc.jar.sha1 +0 -1
- package/android/com/facebook/react/react-native/0.63.3/react-native-0.63.3-sources.jar.md5 +0 -1
- package/android/com/facebook/react/react-native/0.63.3/react-native-0.63.3-sources.jar.sha1 +0 -1
- package/android/com/facebook/react/react-native/0.63.3/react-native-0.63.3.aar.md5 +0 -1
- package/android/com/facebook/react/react-native/0.63.3/react-native-0.63.3.aar.sha1 +0 -1
- package/android/com/facebook/react/react-native/0.63.3/react-native-0.63.3.pom.md5 +0 -1
- package/android/com/facebook/react/react-native/0.63.3/react-native-0.63.3.pom.sha1 +0 -1
|
@@ -651,10 +651,6 @@ const MatrixMath = {
|
|
|
651
651
|
skew[0] = MatrixMath.v3Dot(row[0], row[1]);
|
|
652
652
|
row[1] = MatrixMath.v3Combine(row[1], row[0], 1.0, -skew[0]);
|
|
653
653
|
|
|
654
|
-
// Compute XY shear factor and make 2nd row orthogonal to 1st.
|
|
655
|
-
skew[0] = MatrixMath.v3Dot(row[0], row[1]);
|
|
656
|
-
row[1] = MatrixMath.v3Combine(row[1], row[0], 1.0, -skew[0]);
|
|
657
|
-
|
|
658
654
|
// Now, compute Y scale and normalize 2nd row.
|
|
659
655
|
scale[1] = MatrixMath.v3Length(row[1]);
|
|
660
656
|
row[1] = MatrixMath.v3Normalize(row[1], scale[1]);
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#import <UIKit/UIKit.h>
|
|
9
|
+
|
|
10
|
+
@interface RCTAlertController : UIAlertController
|
|
11
|
+
|
|
12
|
+
- (void)show:(BOOL)animated completion:(void (^)(void))completion;
|
|
13
|
+
|
|
14
|
+
@end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#import <React/RCTUtils.h>
|
|
9
|
+
|
|
10
|
+
#import "RCTAlertController.h"
|
|
11
|
+
|
|
12
|
+
@interface RCTAlertController ()
|
|
13
|
+
|
|
14
|
+
@property (nonatomic, strong) UIWindow *alertWindow;
|
|
15
|
+
|
|
16
|
+
@end
|
|
17
|
+
|
|
18
|
+
@implementation RCTAlertController
|
|
19
|
+
|
|
20
|
+
- (UIWindow *)alertWindow
|
|
21
|
+
{
|
|
22
|
+
if (_alertWindow == nil) {
|
|
23
|
+
_alertWindow = [[UIWindow alloc] initWithFrame:RCTSharedApplication().keyWindow.bounds];
|
|
24
|
+
_alertWindow.rootViewController = [UIViewController new];
|
|
25
|
+
_alertWindow.windowLevel = UIWindowLevelAlert + 1;
|
|
26
|
+
}
|
|
27
|
+
return _alertWindow;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
- (void)show:(BOOL)animated completion:(void (^)(void))completion
|
|
31
|
+
{
|
|
32
|
+
[self.alertWindow makeKeyAndVisible];
|
|
33
|
+
[self.alertWindow.rootViewController presentViewController:self animated:animated completion:completion];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@end
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
#import <React/RCTUtils.h>
|
|
16
16
|
|
|
17
17
|
#import "CoreModulesPlugins.h"
|
|
18
|
+
#import "RCTAlertController.h"
|
|
18
19
|
|
|
19
20
|
@implementation RCTConvert (UIAlertViewStyle)
|
|
20
21
|
|
|
@@ -99,29 +100,9 @@ RCT_EXPORT_METHOD(alertWithArgs : (JS::NativeAlertManager::Args &)args callback
|
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
102
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
@"title" : args.title() ?: [NSNull null],
|
|
106
|
-
@"message" : args.message() ?: [NSNull null],
|
|
107
|
-
@"buttons" : RCTConvertOptionalVecToArray(
|
|
108
|
-
args.buttons(),
|
|
109
|
-
^id(id<NSObject> element) {
|
|
110
|
-
return element;
|
|
111
|
-
})
|
|
112
|
-
?: [NSNull null],
|
|
113
|
-
@"type" : args.type() ?: [NSNull null],
|
|
114
|
-
@"defaultValue" : args.defaultValue() ?: [NSNull null],
|
|
115
|
-
@"cancelButtonKey" : args.cancelButtonKey() ?: [NSNull null],
|
|
116
|
-
@"destructiveButtonKey" : args.destructiveButtonKey() ?: [NSNull null],
|
|
117
|
-
@"keyboardType" : args.keyboardType() ?: [NSNull null],
|
|
118
|
-
});
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title
|
|
123
|
-
message:nil
|
|
124
|
-
preferredStyle:UIAlertControllerStyleAlert];
|
|
103
|
+
RCTAlertController *alertController = [RCTAlertController alertControllerWithTitle:title
|
|
104
|
+
message:nil
|
|
105
|
+
preferredStyle:UIAlertControllerStyleAlert];
|
|
125
106
|
switch (type) {
|
|
126
107
|
case RCTAlertViewStylePlainTextInput: {
|
|
127
108
|
[alertController addTextFieldWithConfigurationHandler:^(UITextField *textField) {
|
|
@@ -170,7 +151,7 @@ RCT_EXPORT_METHOD(alertWithArgs : (JS::NativeAlertManager::Args &)args callback
|
|
|
170
151
|
} else if ([buttonKey isEqualToString:destructiveButtonKey]) {
|
|
171
152
|
buttonStyle = UIAlertActionStyleDestructive;
|
|
172
153
|
}
|
|
173
|
-
__weak
|
|
154
|
+
__weak RCTAlertController *weakAlertController = alertController;
|
|
174
155
|
[alertController
|
|
175
156
|
addAction:[UIAlertAction
|
|
176
157
|
actionWithTitle:buttonTitle
|
|
@@ -202,7 +183,7 @@ RCT_EXPORT_METHOD(alertWithArgs : (JS::NativeAlertManager::Args &)args callback
|
|
|
202
183
|
[_alertControllers addObject:alertController];
|
|
203
184
|
|
|
204
185
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
205
|
-
[
|
|
186
|
+
[alertController show:YES completion:nil];
|
|
206
187
|
});
|
|
207
188
|
}
|
|
208
189
|
|
|
@@ -166,7 +166,9 @@ RCT_EXPORT_METHOD(close : (double)code reason : (NSString *)reason socketID : (d
|
|
|
166
166
|
NSNumber *socketID = [webSocket reactTag];
|
|
167
167
|
_contentHandlers[socketID] = nil;
|
|
168
168
|
_sockets[socketID] = nil;
|
|
169
|
-
|
|
169
|
+
NSDictionary *body =
|
|
170
|
+
@{@"message" : error.localizedDescription ?: @"Undefined, error is nil", @"id" : socketID ?: @(-1)};
|
|
171
|
+
[self sendEventWithName:@"websocketFailed" body:body];
|
|
170
172
|
}
|
|
171
173
|
|
|
172
174
|
- (void)webSocket:(RCTSRWebSocket *)webSocket
|
|
@@ -65,6 +65,7 @@ static const NSUInteger kMatrixArrayLength = 4 * 4;
|
|
|
65
65
|
|
|
66
66
|
CGFloat zeroScaleThreshold = FLT_EPSILON;
|
|
67
67
|
|
|
68
|
+
CATransform3D next;
|
|
68
69
|
for (NSDictionary *transformConfig in (NSArray<NSDictionary *> *)json) {
|
|
69
70
|
if (transformConfig.count != 1) {
|
|
70
71
|
RCTLogConvertError(json, @"a CATransform3D. You must specify exactly one property per transform object.");
|
|
@@ -74,10 +75,13 @@ static const NSUInteger kMatrixArrayLength = 4 * 4;
|
|
|
74
75
|
id value = transformConfig[property];
|
|
75
76
|
|
|
76
77
|
if ([property isEqualToString:@"matrix"]) {
|
|
77
|
-
|
|
78
|
+
next = [self CATransform3DFromMatrix:value];
|
|
79
|
+
transform = CATransform3DConcat(next, transform);
|
|
78
80
|
|
|
79
81
|
} else if ([property isEqualToString:@"perspective"]) {
|
|
80
|
-
|
|
82
|
+
next = CATransform3DIdentity;
|
|
83
|
+
next.m34 = -1 / [value floatValue];
|
|
84
|
+
transform = CATransform3DConcat(next, transform);
|
|
81
85
|
|
|
82
86
|
} else if ([property isEqualToString:@"rotateX"]) {
|
|
83
87
|
CGFloat rotate = [self convertToRadians:value];
|
|
@@ -123,11 +127,15 @@ static const NSUInteger kMatrixArrayLength = 4 * 4;
|
|
|
123
127
|
|
|
124
128
|
} else if ([property isEqualToString:@"skewX"]) {
|
|
125
129
|
CGFloat skew = [self convertToRadians:value];
|
|
126
|
-
|
|
130
|
+
next = CATransform3DIdentity;
|
|
131
|
+
next.m21 = tanf(skew);
|
|
132
|
+
transform = CATransform3DConcat(next, transform);
|
|
127
133
|
|
|
128
134
|
} else if ([property isEqualToString:@"skewY"]) {
|
|
129
135
|
CGFloat skew = [self convertToRadians:value];
|
|
130
|
-
|
|
136
|
+
next = CATransform3DIdentity;
|
|
137
|
+
next.m12 = tanf(skew);
|
|
138
|
+
transform = CATransform3DConcat(next, transform);
|
|
131
139
|
|
|
132
140
|
} else {
|
|
133
141
|
RCTLogError(@"Unsupported transform type for a CATransform3D: %@.", property);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
VERSION_NAME=0.63.
|
|
1
|
+
VERSION_NAME=0.63.5
|
|
2
2
|
GROUP=com.facebook.react
|
|
3
3
|
|
|
4
4
|
POM_NAME=ReactNative
|
|
@@ -13,8 +13,8 @@ FEST_ASSERT_CORE_VERSION=2.0M10
|
|
|
13
13
|
|
|
14
14
|
ANDROIDX_TEST_VERSION=1.1.0
|
|
15
15
|
FRESCO_VERSION=2.0.0
|
|
16
|
-
OKHTTP_VERSION=3.12.
|
|
17
|
-
SO_LOADER_VERSION=0.
|
|
16
|
+
OKHTTP_VERSION=3.12.12
|
|
17
|
+
SO_LOADER_VERSION=0.9.0
|
|
18
18
|
|
|
19
19
|
BOOST_VERSION=1_63_0
|
|
20
20
|
DOUBLE_CONVERSION_VERSION=1.1.6
|
|
@@ -705,6 +705,7 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
|
|
|
705
705
|
return;
|
|
706
706
|
}
|
|
707
707
|
mDeviceRotation = rotation;
|
|
708
|
+
DisplayMetricsHolder.initDisplayMetrics(getContext().getApplicationContext());
|
|
708
709
|
emitOrientationChanged(rotation);
|
|
709
710
|
}
|
|
710
711
|
|
|
@@ -120,7 +120,7 @@ public class ReadableNativeMap extends NativeMap implements ReadableMap {
|
|
|
120
120
|
if (hasKey(name)) {
|
|
121
121
|
return getLocalMap().get(name);
|
|
122
122
|
}
|
|
123
|
-
|
|
123
|
+
return null;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
private @Nullable <T> T getNullableValue(String name, Class<T> type) {
|
|
@@ -169,10 +169,6 @@ public class MatrixMathHelper {
|
|
|
169
169
|
skew[0] = v3Dot(row[0], row[1]);
|
|
170
170
|
row[1] = v3Combine(row[1], row[0], 1.0, -skew[0]);
|
|
171
171
|
|
|
172
|
-
// Compute XY shear factor and make 2nd row orthogonal to 1st.
|
|
173
|
-
skew[0] = v3Dot(row[0], row[1]);
|
|
174
|
-
row[1] = v3Combine(row[1], row[0], 1.0, -skew[0]);
|
|
175
|
-
|
|
176
172
|
// Now, compute Y scale and normalize 2nd row.
|
|
177
173
|
scale[1] = v3Length(row[1]);
|
|
178
174
|
row[1] = v3Normalize(row[1], scale[1]);
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GeneratePropsJavaDelegate.js
|
|
8
|
-
*/
|
|
9
|
-
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
|
|
5
|
+
* directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @generated by codegen project: GeneratePropsJavaDelegate.js
|
|
8
|
+
*/
|
|
10
9
|
package com.facebook.react.viewmanagers;
|
|
11
10
|
|
|
12
11
|
import android.view.View;
|
|
@@ -16,10 +15,14 @@ import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
|
|
16
15
|
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
|
17
16
|
import com.facebook.react.uimanager.LayoutShadowNode;
|
|
18
17
|
|
|
19
|
-
public class AndroidDropdownPickerManagerDelegate<
|
|
18
|
+
public class AndroidDropdownPickerManagerDelegate<
|
|
19
|
+
T extends View,
|
|
20
|
+
U extends BaseViewManagerInterface<T> & AndroidDropdownPickerManagerInterface<T>>
|
|
21
|
+
extends BaseViewManagerDelegate<T, U> {
|
|
20
22
|
public AndroidDropdownPickerManagerDelegate(U viewManager) {
|
|
21
23
|
super(viewManager);
|
|
22
24
|
}
|
|
25
|
+
|
|
23
26
|
@Override
|
|
24
27
|
public void setProperty(T view, String propName, @Nullable Object value) {
|
|
25
28
|
switch (propName) {
|
package/ReactAndroid/src/main/java/com/facebook/react/views/picker/ReactDropdownPickerManager.java
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
package com.facebook.react.views.picker;
|
|
9
9
|
|
|
10
10
|
import android.widget.Spinner;
|
|
11
|
+
import androidx.annotation.NonNull;
|
|
11
12
|
import com.facebook.react.module.annotations.ReactModule;
|
|
12
13
|
import com.facebook.react.uimanager.ThemedReactContext;
|
|
13
14
|
import com.facebook.react.uimanager.ViewManagerDelegate;
|
|
@@ -41,4 +42,9 @@ public class ReactDropdownPickerManager extends ReactPickerManager
|
|
|
41
42
|
protected ViewManagerDelegate<ReactPicker> getDelegate() {
|
|
42
43
|
return mDelegate;
|
|
43
44
|
}
|
|
45
|
+
|
|
46
|
+
@Override
|
|
47
|
+
public void setBackgroundColor(@NonNull ReactPicker view, int backgroundColor) {
|
|
48
|
+
view.setStagedBackgroundColor(backgroundColor);
|
|
49
|
+
}
|
|
44
50
|
}
|
|
@@ -8,12 +8,14 @@
|
|
|
8
8
|
package com.facebook.react.views.picker;
|
|
9
9
|
|
|
10
10
|
import android.content.Context;
|
|
11
|
+
import android.content.res.ColorStateList;
|
|
11
12
|
import android.util.AttributeSet;
|
|
12
13
|
import android.view.View;
|
|
13
14
|
import android.widget.AdapterView;
|
|
14
15
|
import android.widget.Spinner;
|
|
15
16
|
import androidx.annotation.Nullable;
|
|
16
17
|
import androidx.appcompat.widget.AppCompatSpinner;
|
|
18
|
+
import androidx.core.view.ViewCompat;
|
|
17
19
|
import com.facebook.react.common.annotations.VisibleForTesting;
|
|
18
20
|
import java.util.List;
|
|
19
21
|
|
|
@@ -173,6 +175,7 @@ public class ReactPicker extends AppCompatSpinner {
|
|
|
173
175
|
&& adapter != null
|
|
174
176
|
&& mStagedPrimaryTextColor != adapter.getPrimaryTextColor()) {
|
|
175
177
|
adapter.setPrimaryTextColor(mStagedPrimaryTextColor);
|
|
178
|
+
ViewCompat.setBackgroundTintList(this, ColorStateList.valueOf(mStagedPrimaryTextColor));
|
|
176
179
|
mStagedPrimaryTextColor = null;
|
|
177
180
|
}
|
|
178
181
|
|
package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java
CHANGED
|
@@ -50,6 +50,8 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
50
50
|
private static final String CONTENT_OFFSET_LEFT = "contentOffsetLeft";
|
|
51
51
|
private static final String CONTENT_OFFSET_TOP = "contentOffsetTop";
|
|
52
52
|
|
|
53
|
+
private static final int UNSET_CONTENT_OFFSET = -1;
|
|
54
|
+
|
|
53
55
|
private final OnScrollDispatchHelper mOnScrollDispatchHelper = new OnScrollDispatchHelper();
|
|
54
56
|
private final @Nullable OverScroller mScroller;
|
|
55
57
|
private final VelocityHelper mVelocityHelper = new VelocityHelper();
|
|
@@ -76,6 +78,8 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
76
78
|
private boolean mSnapToEnd = true;
|
|
77
79
|
private ReactViewBackgroundManager mReactBackgroundManager;
|
|
78
80
|
private boolean mPagedArrowScrolling = false;
|
|
81
|
+
private int pendingContentOffsetX = UNSET_CONTENT_OFFSET;
|
|
82
|
+
private int pendingContentOffsetY = UNSET_CONTENT_OFFSET;
|
|
79
83
|
private @Nullable StateWrapper mStateWrapper;
|
|
80
84
|
|
|
81
85
|
private final Rect mTempRect = new Rect();
|
|
@@ -224,7 +228,13 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
224
228
|
@Override
|
|
225
229
|
protected void onLayout(boolean changed, int l, int t, int r, int b) {
|
|
226
230
|
// Call with the present values in order to re-layout if necessary
|
|
227
|
-
|
|
231
|
+
// If a "pending" value has been set, we restore that value.
|
|
232
|
+
// That value gets cleared by reactScrollTo.
|
|
233
|
+
int scrollToX =
|
|
234
|
+
pendingContentOffsetX != UNSET_CONTENT_OFFSET ? pendingContentOffsetX : getScrollX();
|
|
235
|
+
int scrollToY =
|
|
236
|
+
pendingContentOffsetY != UNSET_CONTENT_OFFSET ? pendingContentOffsetY : getScrollY();
|
|
237
|
+
reactScrollTo(scrollToX, scrollToY);
|
|
228
238
|
}
|
|
229
239
|
|
|
230
240
|
/**
|
|
@@ -906,6 +916,7 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
906
916
|
public void reactSmoothScrollTo(int x, int y) {
|
|
907
917
|
smoothScrollTo(x, y);
|
|
908
918
|
updateStateOnScroll(x, y);
|
|
919
|
+
setPendingContentOffsets(x, y);
|
|
909
920
|
}
|
|
910
921
|
|
|
911
922
|
/**
|
|
@@ -917,6 +928,25 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
917
928
|
public void reactScrollTo(int x, int y) {
|
|
918
929
|
scrollTo(x, y);
|
|
919
930
|
updateStateOnScroll(x, y);
|
|
931
|
+
setPendingContentOffsets(x, y);
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* If contentOffset is set before the View has been laid out, store the values and set them when
|
|
936
|
+
* `onLayout` is called.
|
|
937
|
+
*
|
|
938
|
+
* @param x
|
|
939
|
+
* @param y
|
|
940
|
+
*/
|
|
941
|
+
private void setPendingContentOffsets(int x, int y) {
|
|
942
|
+
View child = getChildAt(0);
|
|
943
|
+
if (child != null && child.getWidth() != 0 && child.getHeight() != 0) {
|
|
944
|
+
pendingContentOffsetX = UNSET_CONTENT_OFFSET;
|
|
945
|
+
pendingContentOffsetY = UNSET_CONTENT_OFFSET;
|
|
946
|
+
} else {
|
|
947
|
+
pendingContentOffsetX = x;
|
|
948
|
+
pendingContentOffsetY = y;
|
|
949
|
+
}
|
|
920
950
|
}
|
|
921
951
|
|
|
922
952
|
public void updateState(@Nullable StateWrapper stateWrapper) {
|
|
@@ -12,6 +12,7 @@ import android.util.DisplayMetrics;
|
|
|
12
12
|
import androidx.annotation.Nullable;
|
|
13
13
|
import androidx.core.view.ViewCompat;
|
|
14
14
|
import com.facebook.react.bridge.ReadableArray;
|
|
15
|
+
import com.facebook.react.bridge.ReadableMap;
|
|
15
16
|
import com.facebook.react.module.annotations.ReactModule;
|
|
16
17
|
import com.facebook.react.uimanager.DisplayMetricsHolder;
|
|
17
18
|
import com.facebook.react.uimanager.PixelUtil;
|
|
@@ -299,4 +300,15 @@ public class ReactHorizontalScrollViewManager extends ViewGroupManager<ReactHori
|
|
|
299
300
|
view.setFadingEdgeLength(0);
|
|
300
301
|
}
|
|
301
302
|
}
|
|
303
|
+
|
|
304
|
+
@ReactProp(name = "contentOffset")
|
|
305
|
+
public void setContentOffset(ReactHorizontalScrollView view, ReadableMap value) {
|
|
306
|
+
if (value != null) {
|
|
307
|
+
double x = value.hasKey("x") ? value.getDouble("x") : 0;
|
|
308
|
+
double y = value.hasKey("y") ? value.getDouble("y") : 0;
|
|
309
|
+
view.reactScrollTo((int) PixelUtil.toPixelFromDIP(x), (int) PixelUtil.toPixelFromDIP(y));
|
|
310
|
+
} else {
|
|
311
|
+
view.reactScrollTo(0, 0);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
302
314
|
}
|
|
@@ -55,6 +55,8 @@ public class ReactScrollView extends ScrollView
|
|
|
55
55
|
private static final String CONTENT_OFFSET_LEFT = "contentOffsetLeft";
|
|
56
56
|
private static final String CONTENT_OFFSET_TOP = "contentOffsetTop";
|
|
57
57
|
|
|
58
|
+
private static final int UNSET_CONTENT_OFFSET = -1;
|
|
59
|
+
|
|
58
60
|
private final OnScrollDispatchHelper mOnScrollDispatchHelper = new OnScrollDispatchHelper();
|
|
59
61
|
private final @Nullable OverScroller mScroller;
|
|
60
62
|
private final VelocityHelper mVelocityHelper = new VelocityHelper();
|
|
@@ -81,6 +83,8 @@ public class ReactScrollView extends ScrollView
|
|
|
81
83
|
private boolean mSnapToEnd = true;
|
|
82
84
|
private View mContentView;
|
|
83
85
|
private ReactViewBackgroundManager mReactBackgroundManager;
|
|
86
|
+
private int pendingContentOffsetX = UNSET_CONTENT_OFFSET;
|
|
87
|
+
private int pendingContentOffsetY = UNSET_CONTENT_OFFSET;
|
|
84
88
|
private @Nullable StateWrapper mStateWrapper;
|
|
85
89
|
|
|
86
90
|
public ReactScrollView(ReactContext context) {
|
|
@@ -200,7 +204,13 @@ public class ReactScrollView extends ScrollView
|
|
|
200
204
|
@Override
|
|
201
205
|
protected void onLayout(boolean changed, int l, int t, int r, int b) {
|
|
202
206
|
// Call with the present values in order to re-layout if necessary
|
|
203
|
-
|
|
207
|
+
// If a "pending" value has been set, we restore that value.
|
|
208
|
+
// That value gets cleared by reactScrollTo.
|
|
209
|
+
int scrollToX =
|
|
210
|
+
pendingContentOffsetX != UNSET_CONTENT_OFFSET ? pendingContentOffsetX : getScrollX();
|
|
211
|
+
int scrollToY =
|
|
212
|
+
pendingContentOffsetY != UNSET_CONTENT_OFFSET ? pendingContentOffsetY : getScrollY();
|
|
213
|
+
reactScrollTo(scrollToX, scrollToY);
|
|
204
214
|
}
|
|
205
215
|
|
|
206
216
|
@Override
|
|
@@ -777,6 +787,7 @@ public class ReactScrollView extends ScrollView
|
|
|
777
787
|
public void reactSmoothScrollTo(int x, int y) {
|
|
778
788
|
smoothScrollTo(x, y);
|
|
779
789
|
updateStateOnScroll(x, y);
|
|
790
|
+
setPendingContentOffsets(x, y);
|
|
780
791
|
}
|
|
781
792
|
|
|
782
793
|
/**
|
|
@@ -788,6 +799,25 @@ public class ReactScrollView extends ScrollView
|
|
|
788
799
|
public void reactScrollTo(int x, int y) {
|
|
789
800
|
scrollTo(x, y);
|
|
790
801
|
updateStateOnScroll(x, y);
|
|
802
|
+
setPendingContentOffsets(x, y);
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
/**
|
|
806
|
+
* If contentOffset is set before the View has been laid out, store the values and set them when
|
|
807
|
+
* `onLayout` is called.
|
|
808
|
+
*
|
|
809
|
+
* @param x
|
|
810
|
+
* @param y
|
|
811
|
+
*/
|
|
812
|
+
private void setPendingContentOffsets(int x, int y) {
|
|
813
|
+
View child = getChildAt(0);
|
|
814
|
+
if (child != null && child.getWidth() != 0 && child.getHeight() != 0) {
|
|
815
|
+
pendingContentOffsetX = UNSET_CONTENT_OFFSET;
|
|
816
|
+
pendingContentOffsetY = UNSET_CONTENT_OFFSET;
|
|
817
|
+
} else {
|
|
818
|
+
pendingContentOffsetX = x;
|
|
819
|
+
pendingContentOffsetY = y;
|
|
820
|
+
}
|
|
791
821
|
}
|
|
792
822
|
|
|
793
823
|
/**
|
package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java
CHANGED
|
@@ -13,6 +13,7 @@ import android.view.View;
|
|
|
13
13
|
import androidx.annotation.Nullable;
|
|
14
14
|
import androidx.core.view.ViewCompat;
|
|
15
15
|
import com.facebook.react.bridge.ReadableArray;
|
|
16
|
+
import com.facebook.react.bridge.ReadableMap;
|
|
16
17
|
import com.facebook.react.bridge.RetryableMountingLayerException;
|
|
17
18
|
import com.facebook.react.common.MapBuilder;
|
|
18
19
|
import com.facebook.react.module.annotations.ReactModule;
|
|
@@ -304,6 +305,17 @@ public class ReactScrollViewManager extends ViewGroupManager<ReactScrollView>
|
|
|
304
305
|
}
|
|
305
306
|
}
|
|
306
307
|
|
|
308
|
+
@ReactProp(name = "contentOffset")
|
|
309
|
+
public void setContentOffset(ReactScrollView view, ReadableMap value) {
|
|
310
|
+
if (value != null) {
|
|
311
|
+
double x = value.hasKey("x") ? value.getDouble("x") : 0;
|
|
312
|
+
double y = value.hasKey("y") ? value.getDouble("y") : 0;
|
|
313
|
+
view.reactScrollTo((int) PixelUtil.toPixelFromDIP(x), (int) PixelUtil.toPixelFromDIP(y));
|
|
314
|
+
} else {
|
|
315
|
+
view.reactScrollTo(0, 0);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
307
319
|
@Override
|
|
308
320
|
public Object updateState(
|
|
309
321
|
ReactScrollView view, ReactStylesDiffMap props, @Nullable StateWrapper stateWrapper) {
|
|
@@ -383,8 +383,6 @@ public class ReactEditText extends AppCompatEditText {
|
|
|
383
383
|
@Override
|
|
384
384
|
public void setInputType(int type) {
|
|
385
385
|
Typeface tf = super.getTypeface();
|
|
386
|
-
// Input type password defaults to monospace font, so we need to re-apply the font
|
|
387
|
-
super.setTypeface(tf);
|
|
388
386
|
|
|
389
387
|
int inputType = type;
|
|
390
388
|
|
|
@@ -401,6 +399,8 @@ public class ReactEditText extends AppCompatEditText {
|
|
|
401
399
|
|
|
402
400
|
super.setInputType(inputType);
|
|
403
401
|
mStagedInputType = inputType;
|
|
402
|
+
// Input type password defaults to monospace font, so we need to re-apply the font
|
|
403
|
+
super.setTypeface(tf);
|
|
404
404
|
|
|
405
405
|
/**
|
|
406
406
|
* If set forces multiline on input, because of a restriction on Android source that enables
|
|
@@ -10,9 +10,9 @@ fb_native.android_library(
|
|
|
10
10
|
visibility = ["PUBLIC"],
|
|
11
11
|
)
|
|
12
12
|
|
|
13
|
-
fb_native.
|
|
13
|
+
fb_native.prebuilt_jar(
|
|
14
14
|
name = "annotation-binary",
|
|
15
|
-
|
|
15
|
+
binary_jar = ":annotation-binary.jar",
|
|
16
16
|
)
|
|
17
17
|
|
|
18
18
|
fb_native.prebuilt_jar(
|
|
@@ -26,19 +26,19 @@ fb_native.android_prebuilt_aar(
|
|
|
26
26
|
)
|
|
27
27
|
|
|
28
28
|
fb_native.remote_file(
|
|
29
|
-
name = "annotation-binary
|
|
30
|
-
sha1 = "
|
|
31
|
-
url = "mvn:com.facebook.soloader:annotation:
|
|
29
|
+
name = "annotation-binary.jar",
|
|
30
|
+
sha1 = "dc58463712cb3e5f03d8ee5ac9743b9ced9afa77",
|
|
31
|
+
url = "mvn:com.facebook.soloader:annotation:jar:0.9.0",
|
|
32
32
|
)
|
|
33
33
|
|
|
34
34
|
fb_native.remote_file(
|
|
35
35
|
name = "nativeloader-binary.jar",
|
|
36
|
-
sha1 = "
|
|
37
|
-
url = "mvn:com.facebook.soloader:nativeloader:jar:0.
|
|
36
|
+
sha1 = "677c7fbfcc847d7eb6082048d07b10afd4cff898",
|
|
37
|
+
url = "mvn:com.facebook.soloader:nativeloader:jar:0.9.0",
|
|
38
38
|
)
|
|
39
39
|
|
|
40
40
|
fb_native.remote_file(
|
|
41
41
|
name = "soloader-binary-aar",
|
|
42
|
-
sha1 = "
|
|
43
|
-
url = "mvn:com.facebook.soloader:soloader:aar:0.
|
|
42
|
+
sha1 = "6e138af1dd29ceabf5bace2d24dc4333f304d104",
|
|
43
|
+
url = "mvn:com.facebook.soloader:soloader:aar:0.9.0",
|
|
44
44
|
)
|
|
@@ -9,8 +9,8 @@ rn_prebuilt_jar(
|
|
|
9
9
|
|
|
10
10
|
fb_native.remote_file(
|
|
11
11
|
name = "okhttp3-binary.jar",
|
|
12
|
-
sha1 = "
|
|
13
|
-
url = "mvn:com.squareup.okhttp3:okhttp:jar:3.12.
|
|
12
|
+
sha1 = "d3e1ce1d2b3119adf270b2d00d947beb03fe3321",
|
|
13
|
+
url = "mvn:com.squareup.okhttp3:okhttp:jar:3.12.12",
|
|
14
14
|
)
|
|
15
15
|
|
|
16
16
|
rn_prebuilt_jar(
|
|
@@ -21,6 +21,6 @@ rn_prebuilt_jar(
|
|
|
21
21
|
|
|
22
22
|
fb_native.remote_file(
|
|
23
23
|
name = "okhttp3-urlconnection-binary.jar",
|
|
24
|
-
sha1 = "
|
|
25
|
-
url = "mvn:com.squareup.okhttp3:okhttp-urlconnection:jar:3.12.
|
|
24
|
+
sha1 = "3cfbe11fb8c48d30600a70f90b3283fc858aea72",
|
|
25
|
+
url = "mvn:com.squareup.okhttp3:okhttp-urlconnection:jar:3.12.12",
|
|
26
26
|
)
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d6a74868ea599fe5f2599244f726de7a
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
dd13be1be798e27b1bf779fe830e017d6a308c2e
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d6df682546cc87c6b5357fdb0a48eb33
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
84c51119ed1c0cf7727323a8665f9728035a6844
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1d3e342b606173c01781c7559a12efb5
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
856e6591642eecaa4b6cefc20cb49f9ffa583190
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<modelVersion>4.0.0</modelVersion>
|
|
5
5
|
<groupId>com.facebook.react</groupId>
|
|
6
6
|
<artifactId>react-native</artifactId>
|
|
7
|
-
<version>0.63.
|
|
7
|
+
<version>0.63.5</version>
|
|
8
8
|
<packaging>aar</packaging>
|
|
9
9
|
<name>ReactNative</name>
|
|
10
10
|
<description>A framework for building native apps with React</description>
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
<dependency>
|
|
74
74
|
<groupId>com.facebook.soloader</groupId>
|
|
75
75
|
<artifactId>soloader</artifactId>
|
|
76
|
-
<version>0.
|
|
76
|
+
<version>0.9.0</version>
|
|
77
77
|
<scope>compile</scope>
|
|
78
78
|
</dependency>
|
|
79
79
|
<dependency>
|
|
@@ -85,13 +85,13 @@
|
|
|
85
85
|
<dependency>
|
|
86
86
|
<groupId>com.squareup.okhttp3</groupId>
|
|
87
87
|
<artifactId>okhttp</artifactId>
|
|
88
|
-
<version>3.12.
|
|
88
|
+
<version>3.12.12</version>
|
|
89
89
|
<scope>compile</scope>
|
|
90
90
|
</dependency>
|
|
91
91
|
<dependency>
|
|
92
92
|
<groupId>com.squareup.okhttp3</groupId>
|
|
93
93
|
<artifactId>okhttp-urlconnection</artifactId>
|
|
94
|
-
<version>3.12.
|
|
94
|
+
<version>3.12.12</version>
|
|
95
95
|
<scope>compile</scope>
|
|
96
96
|
</dependency>
|
|
97
97
|
<dependency>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1d2a2cc6095a1df2b76803f3af3210b1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
9c4e09fbb5ab0f1acdbc0787f857e1fd15a3ca65
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
<groupId>com.facebook.react</groupId>
|
|
4
4
|
<artifactId>react-native</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<release>0.63.
|
|
6
|
+
<release>0.63.5</release>
|
|
7
7
|
<versions>
|
|
8
|
-
<version>0.63.
|
|
8
|
+
<version>0.63.5</version>
|
|
9
9
|
</versions>
|
|
10
|
-
<lastUpdated>
|
|
10
|
+
<lastUpdated>20221107004318</lastUpdated>
|
|
11
11
|
</versioning>
|
|
12
12
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
8784460c8277d0a469cc850c36dab947
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1c177a301d8130b756b03534e55d54719a8580fe
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.63.
|
|
3
|
+
"version": "0.63.5",
|
|
4
4
|
"bin": "./cli.js",
|
|
5
5
|
"description": "A framework for building native apps using React",
|
|
6
6
|
"license": "MIT",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"clang-format": "^1.2.4",
|
|
124
124
|
"connect": "^3.6.5",
|
|
125
125
|
"coveralls": "^3.0.2",
|
|
126
|
-
"detox": "
|
|
126
|
+
"detox": "16.7.2",
|
|
127
127
|
"eslint": "5.1.0",
|
|
128
128
|
"eslint-config-fb-strict": "^24.9.0",
|
|
129
129
|
"eslint-config-fbjs": "2.1.0",
|
package/react.gradle
CHANGED
|
@@ -302,6 +302,11 @@ afterEvaluate {
|
|
|
302
302
|
enabled(currentBundleTask.enabled)
|
|
303
303
|
}
|
|
304
304
|
|
|
305
|
+
// mergeResources task runs before the bundle file is copied to the intermediate asset directory from Android plugin 4.1+.
|
|
306
|
+
// This ensures to copy the bundle file before mergeResources task starts
|
|
307
|
+
def mergeResourcesTask = tasks.findByName("merge${targetName}Resources")
|
|
308
|
+
mergeResourcesTask.dependsOn(currentAssetsCopyTask)
|
|
309
|
+
|
|
305
310
|
packageTask.dependsOn(currentAssetsCopyTask)
|
|
306
311
|
if (buildPreBundleTask != null) {
|
|
307
312
|
buildPreBundleTask.dependsOn(currentAssetsCopyTask)
|
|
@@ -349,3 +354,21 @@ afterEvaluate {
|
|
|
349
354
|
}
|
|
350
355
|
}
|
|
351
356
|
}
|
|
357
|
+
|
|
358
|
+
// Patch needed for https://github.com/facebook/react-native/issues/35210
|
|
359
|
+
// This is a patch to short-circuit the "+" dependencies inside the
|
|
360
|
+
// users' app/build.gradle file and the various .gradle files of libraries.
|
|
361
|
+
// As using plain "+" dependencies causes Gradle to always download the latest,
|
|
362
|
+
// this logic forces Gradle to use latest release in the minor series.
|
|
363
|
+
project.rootProject.allprojects {
|
|
364
|
+
// This extra afterEvaluate is needed due to how AGP 3.x is resolving
|
|
365
|
+
// Gradle configurations.
|
|
366
|
+
afterEvaluate {
|
|
367
|
+
configurations.all {
|
|
368
|
+
resolutionStrategy {
|
|
369
|
+
force "com.facebook.react:react-native:0.63.+"
|
|
370
|
+
force "com.facebook.react:hermes-engine:0.63.+"
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
package/template/package.json
CHANGED
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
5b731c933609168bfeeaddabd26abac2
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
74bb446b2827ebe14a9362ec986692002d09d831
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1e51a66c674970f493f8445fe0d2c248
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
596a01837a6b53b36b3a6fc81c3b1f91b754b31a
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
8a4fba261bbf3628671aeded320545ed
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
7ef7d35f33970cd41528e0a9e50e8c2dc58554a3
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
84e55363915526db3048dc33f38e41df
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
d8e4b8a55682a0783445b14c47e8105b8fb4635c
|