react-native 0.0.0-20220102-2009-e22b760e5 → 0.0.0-20220106-2009-252b2a63c
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/Core/ReactNativeVersion.js +1 -1
- package/Libraries/ReactNative/getNativeComponentAttributes.js +1 -7
- package/React/Base/RCTVersion.m +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java +1 -5
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +11 -3
- package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/ReactDrawerLayoutManager.java +13 -6
- package/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageManager.java +18 -11
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostManager.java +11 -4
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java +7 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/slider/ReactSliderManager.java +10 -3
- package/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/SwipeRefreshLayoutManager.java +10 -3
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextViewManager.java +10 -3
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java +51 -37
- package/ReactAndroid/src/main/jni/react/jni/WritableNativeArray.cpp +7 -0
- package/ReactAndroid/src/main/jni/react/jni/WritableNativeArray.h +2 -0
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/react/renderer/.clang-tidy +12 -0
- package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.cpp +6 -5
- package/ReactCommon/react/renderer/animations/tests/LayoutAnimationTest.cpp +2 -1
- package/ReactCommon/react/renderer/attributedstring/AttributedStringBox.cpp +1 -1
- package/ReactCommon/react/renderer/attributedstring/AttributedStringBox.h +1 -1
- package/ReactCommon/react/renderer/componentregistry/ComponentDescriptorProviderRegistry.cpp +2 -1
- package/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarMeasurementsManager.cpp +1 -1
- package/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarMeasurementsManager.h +1 -1
- package/ReactCommon/react/renderer/components/text/BaseTextProps.cpp +4 -4
- package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.cpp +3 -1
- package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputState.cpp +0 -1
- package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputState.cpp +1 -1
- package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputState.h +3 -1
- package/ReactCommon/react/renderer/core/EventDispatcher.cpp +1 -1
- package/ReactCommon/react/renderer/core/EventDispatcher.h +1 -1
- package/ReactCommon/react/renderer/core/LayoutableShadowNode.cpp +1 -1
- package/ReactCommon/react/renderer/core/LayoutableShadowNode.h +1 -1
- package/ReactCommon/react/renderer/core/ShadowNode.cpp +4 -4
- package/ReactCommon/react/renderer/core/ShadowNode.h +2 -2
- package/ReactCommon/react/renderer/debug/DebugStringConvertible.cpp +2 -2
- package/ReactCommon/react/renderer/graphics/platform/cxx/react/renderer/graphics/Color.cpp +1 -1
- package/ReactCommon/react/renderer/graphics/platform/cxx/react/renderer/graphics/Color.h +1 -1
- package/ReactCommon/react/renderer/mounting/MountingCoordinator.cpp +1 -1
- package/ReactCommon/react/renderer/mounting/ShadowTree.cpp +5 -5
- package/ReactCommon/react/renderer/mounting/ShadowTreeRegistry.cpp +2 -2
- package/ReactCommon/react/renderer/mounting/ShadowTreeRegistry.h +2 -2
- package/ReactCommon/react/renderer/mounting/ShadowViewMutation.cpp +8 -8
- package/ReactCommon/react/renderer/mounting/TelemetryController.cpp +5 -4
- package/ReactCommon/react/renderer/mounting/TelemetryController.h +6 -3
- package/ReactCommon/react/renderer/mounting/tests/MountingTest.cpp +1 -1
- package/ReactCommon/react/renderer/mounting/tests/StackingContextTest.cpp +2 -2
- package/ReactCommon/react/renderer/templateprocessor/UITemplateProcessor.cpp +2 -2
- package/ReactCommon/react/renderer/templateprocessor/UITemplateProcessor.h +2 -2
- package/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.cpp +11 -11
- package/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.h +8 -8
- package/android/com/facebook/react/react-native/{0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.aar → 0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.aar} +0 -0
- package/android/com/facebook/react/react-native/0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.aar.md5 +1 -0
- package/android/com/facebook/react/react-native/0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.aar.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.aar.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.aar.sha512 +1 -0
- package/android/com/facebook/react/react-native/{0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.module → 0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.module} +16 -16
- package/android/com/facebook/react/react-native/0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.module.md5 +1 -0
- package/android/com/facebook/react/react-native/0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.module.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.module.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.module.sha512 +1 -0
- package/android/com/facebook/react/react-native/{0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.pom → 0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.pom} +1 -1
- package/android/com/facebook/react/react-native/0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.pom.md5 +1 -0
- package/android/com/facebook/react/react-native/0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.pom.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.pom.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.pom.sha512 +1 -0
- package/android/com/facebook/react/react-native/maven-metadata.xml +4 -4
- 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/android/com/facebook/react/react-native/maven-metadata.xml.sha256 +1 -1
- package/android/com/facebook/react/react-native/maven-metadata.xml.sha512 +1 -1
- package/package.json +1 -1
- package/template/android/build.gradle +2 -2
- package/template/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/template/package.json +1 -1
- package/android/com/facebook/react/react-native/0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.aar.md5 +0 -1
- package/android/com/facebook/react/react-native/0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.aar.sha1 +0 -1
- package/android/com/facebook/react/react-native/0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.aar.sha256 +0 -1
- package/android/com/facebook/react/react-native/0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.aar.sha512 +0 -1
- package/android/com/facebook/react/react-native/0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.module.md5 +0 -1
- package/android/com/facebook/react/react-native/0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.module.sha1 +0 -1
- package/android/com/facebook/react/react-native/0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.module.sha256 +0 -1
- package/android/com/facebook/react/react-native/0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.module.sha512 +0 -1
- package/android/com/facebook/react/react-native/0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.pom.md5 +0 -1
- package/android/com/facebook/react/react-native/0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.pom.sha1 +0 -1
- package/android/com/facebook/react/react-native/0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.pom.sha256 +0 -1
- package/android/com/facebook/react/react-native/0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.pom.sha512 +0 -1
|
@@ -94,17 +94,11 @@ function getNativeComponentAttributes(uiViewClassName: string): any {
|
|
|
94
94
|
directEventTypes,
|
|
95
95
|
});
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
attachDefaultEventTypes(viewConfig);
|
|
99
|
-
hasAttachedDefaultEventTypes = true;
|
|
100
|
-
}
|
|
97
|
+
attachDefaultEventTypes(viewConfig);
|
|
101
98
|
|
|
102
99
|
return viewConfig;
|
|
103
100
|
}
|
|
104
101
|
|
|
105
|
-
// TODO: Figure out how this makes sense. We're using a global boolean to only
|
|
106
|
-
// initialize this on the first eagerly initialized native component.
|
|
107
|
-
let hasAttachedDefaultEventTypes = false;
|
|
108
102
|
function attachDefaultEventTypes(viewConfig: any) {
|
|
109
103
|
// This is supported on UIManager platforms (ex: Android),
|
|
110
104
|
// as lazy view managers are not implemented for all platforms.
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
|
|
|
24
24
|
RCTVersionMajor: @(0),
|
|
25
25
|
RCTVersionMinor: @(0),
|
|
26
26
|
RCTVersionPatch: @(0),
|
|
27
|
-
RCTVersionPrerelease: @"
|
|
27
|
+
RCTVersionPrerelease: @"20220106-2009-252b2a63c",
|
|
28
28
|
};
|
|
29
29
|
});
|
|
30
30
|
return __rnVersion;
|
package/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java
CHANGED
|
@@ -99,11 +99,7 @@ public final class BridgeDevSupportManager extends DevSupportManagerBase {
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
addCustomDevOption(
|
|
102
|
-
mIsSamplingProfilerEnabled
|
|
103
|
-
? applicationContext.getString(
|
|
104
|
-
com.facebook.react.R.string.catalyst_sample_profiler_disable)
|
|
105
|
-
: applicationContext.getString(
|
|
106
|
-
com.facebook.react.R.string.catalyst_sample_profiler_enable),
|
|
102
|
+
mIsSamplingProfilerEnabled ? "Disable Sampling Profiler" : "Enable Sampling Profiler",
|
|
107
103
|
new DevOptionHandler() {
|
|
108
104
|
@Override
|
|
109
105
|
public void onOptionSelected() {
|
|
@@ -429,9 +429,17 @@ public abstract class BaseViewManager<T extends View, C extends LayoutShadowNode
|
|
|
429
429
|
|
|
430
430
|
@Override
|
|
431
431
|
public @Nullable Map<String, Object> getExportedCustomDirectEventTypeConstants() {
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
432
|
+
@Nullable
|
|
433
|
+
Map<String, Object> baseEventTypeConstants = super.getExportedCustomDirectEventTypeConstants();
|
|
434
|
+
Map<String, Object> eventTypeConstants =
|
|
435
|
+
baseEventTypeConstants == null ? new HashMap<String, Object>() : baseEventTypeConstants;
|
|
436
|
+
eventTypeConstants.putAll(
|
|
437
|
+
MapBuilder.<String, Object>builder()
|
|
438
|
+
.put(
|
|
439
|
+
"topAccessibilityAction",
|
|
440
|
+
MapBuilder.of("registrationName", "onAccessibilityAction"))
|
|
441
|
+
.build());
|
|
442
|
+
return eventTypeConstants;
|
|
435
443
|
}
|
|
436
444
|
|
|
437
445
|
@Override
|
package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/ReactDrawerLayoutManager.java
CHANGED
|
@@ -31,6 +31,7 @@ import com.facebook.react.views.drawer.events.DrawerClosedEvent;
|
|
|
31
31
|
import com.facebook.react.views.drawer.events.DrawerOpenedEvent;
|
|
32
32
|
import com.facebook.react.views.drawer.events.DrawerSlideEvent;
|
|
33
33
|
import com.facebook.react.views.drawer.events.DrawerStateChangedEvent;
|
|
34
|
+
import java.util.HashMap;
|
|
34
35
|
import java.util.Map;
|
|
35
36
|
|
|
36
37
|
/** View Manager for {@link ReactDrawerLayout} components. */
|
|
@@ -210,12 +211,18 @@ public class ReactDrawerLayoutManager extends ViewGroupManager<ReactDrawerLayout
|
|
|
210
211
|
|
|
211
212
|
@Override
|
|
212
213
|
public @Nullable Map getExportedCustomDirectEventTypeConstants() {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
214
|
+
@Nullable
|
|
215
|
+
Map<String, Object> baseEventTypeConstants = super.getExportedCustomDirectEventTypeConstants();
|
|
216
|
+
Map<String, Object> eventTypeConstants =
|
|
217
|
+
baseEventTypeConstants == null ? new HashMap<String, Object>() : baseEventTypeConstants;
|
|
218
|
+
eventTypeConstants.putAll(
|
|
219
|
+
MapBuilder.of(
|
|
220
|
+
DrawerSlideEvent.EVENT_NAME, MapBuilder.of("registrationName", "onDrawerSlide"),
|
|
221
|
+
DrawerOpenedEvent.EVENT_NAME, MapBuilder.of("registrationName", "onDrawerOpen"),
|
|
222
|
+
DrawerClosedEvent.EVENT_NAME, MapBuilder.of("registrationName", "onDrawerClose"),
|
|
223
|
+
DrawerStateChangedEvent.EVENT_NAME,
|
|
224
|
+
MapBuilder.of("registrationName", "onDrawerStateChanged")));
|
|
225
|
+
return eventTypeConstants;
|
|
219
226
|
}
|
|
220
227
|
|
|
221
228
|
/**
|
|
@@ -24,6 +24,7 @@ import com.facebook.react.uimanager.ViewProps;
|
|
|
24
24
|
import com.facebook.react.uimanager.annotations.ReactProp;
|
|
25
25
|
import com.facebook.react.uimanager.annotations.ReactPropGroup;
|
|
26
26
|
import com.facebook.yoga.YogaConstants;
|
|
27
|
+
import java.util.HashMap;
|
|
27
28
|
import java.util.Map;
|
|
28
29
|
|
|
29
30
|
@ReactModule(name = ReactImageManager.REACT_CLASS)
|
|
@@ -245,17 +246,23 @@ public class ReactImageManager extends SimpleViewManager<ReactImageView> {
|
|
|
245
246
|
|
|
246
247
|
@Override
|
|
247
248
|
public @Nullable Map getExportedCustomDirectEventTypeConstants() {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
249
|
+
@Nullable
|
|
250
|
+
Map<String, Object> baseEventTypeConstants = super.getExportedCustomDirectEventTypeConstants();
|
|
251
|
+
Map<String, Object> eventTypeConstants =
|
|
252
|
+
baseEventTypeConstants == null ? new HashMap<String, Object>() : baseEventTypeConstants;
|
|
253
|
+
eventTypeConstants.putAll(
|
|
254
|
+
MapBuilder.of(
|
|
255
|
+
ImageLoadEvent.eventNameForType(ImageLoadEvent.ON_LOAD_START),
|
|
256
|
+
MapBuilder.of("registrationName", "onLoadStart"),
|
|
257
|
+
ImageLoadEvent.eventNameForType(ImageLoadEvent.ON_PROGRESS),
|
|
258
|
+
MapBuilder.of("registrationName", "onProgress"),
|
|
259
|
+
ImageLoadEvent.eventNameForType(ImageLoadEvent.ON_LOAD),
|
|
260
|
+
MapBuilder.of("registrationName", "onLoad"),
|
|
261
|
+
ImageLoadEvent.eventNameForType(ImageLoadEvent.ON_ERROR),
|
|
262
|
+
MapBuilder.of("registrationName", "onError"),
|
|
263
|
+
ImageLoadEvent.eventNameForType(ImageLoadEvent.ON_LOAD_END),
|
|
264
|
+
MapBuilder.of("registrationName", "onLoadEnd")));
|
|
265
|
+
return eventTypeConstants;
|
|
259
266
|
}
|
|
260
267
|
|
|
261
268
|
@Override
|
package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostManager.java
CHANGED
|
@@ -24,6 +24,7 @@ import com.facebook.react.uimanager.annotations.ReactProp;
|
|
|
24
24
|
import com.facebook.react.uimanager.events.EventDispatcher;
|
|
25
25
|
import com.facebook.react.viewmanagers.ModalHostViewManagerDelegate;
|
|
26
26
|
import com.facebook.react.viewmanagers.ModalHostViewManagerInterface;
|
|
27
|
+
import java.util.HashMap;
|
|
27
28
|
import java.util.Map;
|
|
28
29
|
|
|
29
30
|
/** View manager for {@link ReactModalHostView} components. */
|
|
@@ -137,10 +138,16 @@ public class ReactModalHostManager extends ViewGroupManager<ReactModalHostView>
|
|
|
137
138
|
|
|
138
139
|
@Override
|
|
139
140
|
public Map<String, Object> getExportedCustomDirectEventTypeConstants() {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
141
|
+
@Nullable
|
|
142
|
+
Map<String, Object> baseEventTypeConstants = super.getExportedCustomDirectEventTypeConstants();
|
|
143
|
+
Map<String, Object> eventTypeConstants =
|
|
144
|
+
baseEventTypeConstants == null ? new HashMap<String, Object>() : baseEventTypeConstants;
|
|
145
|
+
eventTypeConstants.putAll(
|
|
146
|
+
MapBuilder.<String, Object>builder()
|
|
147
|
+
.put(RequestCloseEvent.EVENT_NAME, MapBuilder.of("registrationName", "onRequestClose"))
|
|
148
|
+
.put(ShowEvent.EVENT_NAME, MapBuilder.of("registrationName", "onShow"))
|
|
149
|
+
.build());
|
|
150
|
+
return eventTypeConstants;
|
|
144
151
|
}
|
|
145
152
|
|
|
146
153
|
@Override
|
package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java
CHANGED
|
@@ -30,6 +30,7 @@ import com.facebook.react.uimanager.annotations.ReactProp;
|
|
|
30
30
|
import com.facebook.react.uimanager.annotations.ReactPropGroup;
|
|
31
31
|
import com.facebook.yoga.YogaConstants;
|
|
32
32
|
import java.util.ArrayList;
|
|
33
|
+
import java.util.HashMap;
|
|
33
34
|
import java.util.List;
|
|
34
35
|
import java.util.Map;
|
|
35
36
|
|
|
@@ -335,7 +336,12 @@ public class ReactScrollViewManager extends ViewGroupManager<ReactScrollView>
|
|
|
335
336
|
|
|
336
337
|
@Override
|
|
337
338
|
public @Nullable Map<String, Object> getExportedCustomDirectEventTypeConstants() {
|
|
338
|
-
|
|
339
|
+
@Nullable
|
|
340
|
+
Map<String, Object> baseEventTypeConstants = super.getExportedCustomDirectEventTypeConstants();
|
|
341
|
+
Map<String, Object> eventTypeConstants =
|
|
342
|
+
baseEventTypeConstants == null ? new HashMap<String, Object>() : baseEventTypeConstants;
|
|
343
|
+
eventTypeConstants.putAll(createExportedCustomDirectEventTypeConstants());
|
|
344
|
+
return eventTypeConstants;
|
|
339
345
|
}
|
|
340
346
|
|
|
341
347
|
public static Map<String, Object> createExportedCustomDirectEventTypeConstants() {
|
|
@@ -37,6 +37,7 @@ import com.facebook.yoga.YogaMeasureFunction;
|
|
|
37
37
|
import com.facebook.yoga.YogaMeasureMode;
|
|
38
38
|
import com.facebook.yoga.YogaMeasureOutput;
|
|
39
39
|
import com.facebook.yoga.YogaNode;
|
|
40
|
+
import java.util.HashMap;
|
|
40
41
|
import java.util.Map;
|
|
41
42
|
|
|
42
43
|
/**
|
|
@@ -246,9 +247,15 @@ public class ReactSliderManager extends SimpleViewManager<ReactSlider>
|
|
|
246
247
|
|
|
247
248
|
@Override
|
|
248
249
|
public Map getExportedCustomDirectEventTypeConstants() {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
250
|
+
@Nullable
|
|
251
|
+
Map<String, Object> baseEventTypeConstants = super.getExportedCustomDirectEventTypeConstants();
|
|
252
|
+
Map<String, Object> eventTypeConstants =
|
|
253
|
+
baseEventTypeConstants == null ? new HashMap<String, Object>() : baseEventTypeConstants;
|
|
254
|
+
eventTypeConstants.putAll(
|
|
255
|
+
MapBuilder.of(
|
|
256
|
+
ReactSlidingCompleteEvent.EVENT_NAME,
|
|
257
|
+
MapBuilder.of("registrationName", "onSlidingComplete")));
|
|
258
|
+
return eventTypeConstants;
|
|
252
259
|
}
|
|
253
260
|
|
|
254
261
|
@Override
|
|
@@ -29,6 +29,7 @@ import com.facebook.react.uimanager.annotations.ReactProp;
|
|
|
29
29
|
import com.facebook.react.uimanager.events.EventDispatcher;
|
|
30
30
|
import com.facebook.react.viewmanagers.AndroidSwipeRefreshLayoutManagerDelegate;
|
|
31
31
|
import com.facebook.react.viewmanagers.AndroidSwipeRefreshLayoutManagerInterface;
|
|
32
|
+
import java.util.HashMap;
|
|
32
33
|
import java.util.Map;
|
|
33
34
|
|
|
34
35
|
/**
|
|
@@ -175,9 +176,15 @@ public class SwipeRefreshLayoutManager extends ViewGroupManager<ReactSwipeRefres
|
|
|
175
176
|
|
|
176
177
|
@Override
|
|
177
178
|
public Map<String, Object> getExportedCustomDirectEventTypeConstants() {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
179
|
+
@Nullable
|
|
180
|
+
Map<String, Object> baseEventTypeConstants = super.getExportedCustomDirectEventTypeConstants();
|
|
181
|
+
Map<String, Object> eventTypeConstants =
|
|
182
|
+
baseEventTypeConstants == null ? new HashMap<String, Object>() : baseEventTypeConstants;
|
|
183
|
+
eventTypeConstants.putAll(
|
|
184
|
+
MapBuilder.<String, Object>builder()
|
|
185
|
+
.put("topRefresh", MapBuilder.of("registrationName", "onRefresh"))
|
|
186
|
+
.build());
|
|
187
|
+
return eventTypeConstants;
|
|
181
188
|
}
|
|
182
189
|
|
|
183
190
|
@Override
|
|
@@ -22,6 +22,7 @@ import com.facebook.react.uimanager.ReactStylesDiffMap;
|
|
|
22
22
|
import com.facebook.react.uimanager.StateWrapper;
|
|
23
23
|
import com.facebook.react.uimanager.ThemedReactContext;
|
|
24
24
|
import com.facebook.yoga.YogaMeasureMode;
|
|
25
|
+
import java.util.HashMap;
|
|
25
26
|
import java.util.Map;
|
|
26
27
|
|
|
27
28
|
/**
|
|
@@ -152,9 +153,15 @@ public class ReactTextViewManager
|
|
|
152
153
|
|
|
153
154
|
@Override
|
|
154
155
|
public @Nullable Map getExportedCustomDirectEventTypeConstants() {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
@Nullable
|
|
157
|
+
Map<String, Object> baseEventTypeConstants = super.getExportedCustomDirectEventTypeConstants();
|
|
158
|
+
Map<String, Object> eventTypeConstants =
|
|
159
|
+
baseEventTypeConstants == null ? new HashMap<String, Object>() : baseEventTypeConstants;
|
|
160
|
+
eventTypeConstants.putAll(
|
|
161
|
+
MapBuilder.of(
|
|
162
|
+
"topTextLayout", MapBuilder.of("registrationName", "onTextLayout"),
|
|
163
|
+
"topInlineViewLayout", MapBuilder.of("registrationName", "onInlineViewLayout")));
|
|
164
|
+
return eventTypeConstants;
|
|
158
165
|
}
|
|
159
166
|
|
|
160
167
|
@Override
|
package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java
CHANGED
|
@@ -202,48 +202,62 @@ public class ReactTextInputManager extends BaseViewManager<ReactEditText, Layout
|
|
|
202
202
|
@Nullable
|
|
203
203
|
@Override
|
|
204
204
|
public Map<String, Object> getExportedCustomBubblingEventTypeConstants() {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
"
|
|
220
|
-
MapBuilder.of(
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
"
|
|
225
|
-
MapBuilder.of(
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
"
|
|
230
|
-
MapBuilder.of(
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
"
|
|
235
|
-
MapBuilder.of(
|
|
236
|
-
|
|
205
|
+
@Nullable
|
|
206
|
+
Map<String, Object> baseEventTypeConstants =
|
|
207
|
+
super.getExportedCustomBubblingEventTypeConstants();
|
|
208
|
+
Map<String, Object> eventTypeConstants =
|
|
209
|
+
baseEventTypeConstants == null ? new HashMap<String, Object>() : baseEventTypeConstants;
|
|
210
|
+
eventTypeConstants.putAll(
|
|
211
|
+
MapBuilder.<String, Object>builder()
|
|
212
|
+
.put(
|
|
213
|
+
"topSubmitEditing",
|
|
214
|
+
MapBuilder.of(
|
|
215
|
+
"phasedRegistrationNames",
|
|
216
|
+
MapBuilder.of(
|
|
217
|
+
"bubbled", "onSubmitEditing", "captured", "onSubmitEditingCapture")))
|
|
218
|
+
.put(
|
|
219
|
+
"topEndEditing",
|
|
220
|
+
MapBuilder.of(
|
|
221
|
+
"phasedRegistrationNames",
|
|
222
|
+
MapBuilder.of("bubbled", "onEndEditing", "captured", "onEndEditingCapture")))
|
|
223
|
+
.put(
|
|
224
|
+
"topTextInput",
|
|
225
|
+
MapBuilder.of(
|
|
226
|
+
"phasedRegistrationNames",
|
|
227
|
+
MapBuilder.of("bubbled", "onTextInput", "captured", "onTextInputCapture")))
|
|
228
|
+
.put(
|
|
229
|
+
"topFocus",
|
|
230
|
+
MapBuilder.of(
|
|
231
|
+
"phasedRegistrationNames",
|
|
232
|
+
MapBuilder.of("bubbled", "onFocus", "captured", "onFocusCapture")))
|
|
233
|
+
.put(
|
|
234
|
+
"topBlur",
|
|
235
|
+
MapBuilder.of(
|
|
236
|
+
"phasedRegistrationNames",
|
|
237
|
+
MapBuilder.of("bubbled", "onBlur", "captured", "onBlurCapture")))
|
|
238
|
+
.put(
|
|
239
|
+
"topKeyPress",
|
|
240
|
+
MapBuilder.of(
|
|
241
|
+
"phasedRegistrationNames",
|
|
242
|
+
MapBuilder.of("bubbled", "onKeyPress", "captured", "onKeyPressCapture")))
|
|
243
|
+
.build());
|
|
244
|
+
return eventTypeConstants;
|
|
237
245
|
}
|
|
238
246
|
|
|
239
247
|
@Nullable
|
|
240
248
|
@Override
|
|
241
249
|
public Map<String, Object> getExportedCustomDirectEventTypeConstants() {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
250
|
+
@Nullable
|
|
251
|
+
Map<String, Object> baseEventTypeConstants = super.getExportedCustomDirectEventTypeConstants();
|
|
252
|
+
Map<String, Object> eventTypeConstants =
|
|
253
|
+
baseEventTypeConstants == null ? new HashMap<String, Object>() : baseEventTypeConstants;
|
|
254
|
+
eventTypeConstants.putAll(
|
|
255
|
+
MapBuilder.<String, Object>builder()
|
|
256
|
+
.put(
|
|
257
|
+
ScrollEventType.getJSEventName(ScrollEventType.SCROLL),
|
|
258
|
+
MapBuilder.of("registrationName", "onScroll"))
|
|
259
|
+
.build());
|
|
260
|
+
return eventTypeConstants;
|
|
247
261
|
}
|
|
248
262
|
|
|
249
263
|
@Override
|
|
@@ -17,6 +17,13 @@ namespace react {
|
|
|
17
17
|
WritableNativeArray::WritableNativeArray()
|
|
18
18
|
: HybridBase(folly::dynamic::array()) {}
|
|
19
19
|
|
|
20
|
+
WritableNativeArray::WritableNativeArray(folly::dynamic &&val)
|
|
21
|
+
: HybridBase(std::move(val)) {
|
|
22
|
+
if (!array_.isArray()) {
|
|
23
|
+
throw std::runtime_error("WritableNativeArray value must be an array.");
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
20
27
|
local_ref<WritableNativeArray::jhybriddata> WritableNativeArray::initHybrid(
|
|
21
28
|
alias_ref<jclass>) {
|
|
22
29
|
return makeCxxInstance();
|
|
@@ -18,7 +18,7 @@ constexpr struct {
|
|
|
18
18
|
int32_t Major = 0;
|
|
19
19
|
int32_t Minor = 0;
|
|
20
20
|
int32_t Patch = 0;
|
|
21
|
-
std::string_view Prerelease = "
|
|
21
|
+
std::string_view Prerelease = "20220106-2009-252b2a63c";
|
|
22
22
|
} ReactNativeVersion;
|
|
23
23
|
|
|
24
24
|
} // namespace facebook::react
|
|
@@ -28,5 +28,17 @@ modernize-use-equals-delete,
|
|
|
28
28
|
modernize-use-override,
|
|
29
29
|
modernize-use-using,
|
|
30
30
|
modernize-use-transparent-functors,
|
|
31
|
+
performance-faster-string-find,
|
|
32
|
+
performance-for-range-copy,
|
|
33
|
+
performance-implicit-conversion-in-loop,
|
|
34
|
+
performance-inefficient-algorithm,
|
|
35
|
+
performance-inefficient-string-concatenation,
|
|
36
|
+
performance-inefficient-vector-operation,
|
|
37
|
+
performance-move-const-arg,
|
|
38
|
+
performance-move-constructor-init,
|
|
39
|
+
performance-noexcept-move-constructor,
|
|
40
|
+
performance-type-promotion-in-math-fn,
|
|
41
|
+
performance-unnecessary-copy-initialization,
|
|
42
|
+
performance-unnecessary-value-param,
|
|
31
43
|
'
|
|
32
44
|
...
|
|
@@ -1075,7 +1075,7 @@ void LayoutAnimationKeyFrameManager::setLayoutAnimationStatusDelegate(
|
|
|
1075
1075
|
|
|
1076
1076
|
void LayoutAnimationKeyFrameManager::setClockNow(
|
|
1077
1077
|
std::function<uint64_t()> now) {
|
|
1078
|
-
now_ = now;
|
|
1078
|
+
now_ = std::move(now);
|
|
1079
1079
|
}
|
|
1080
1080
|
|
|
1081
1081
|
void LayoutAnimationKeyFrameManager::enableSkipInvalidatedKeyFrames() {
|
|
@@ -1309,7 +1309,7 @@ void LayoutAnimationKeyFrameManager::
|
|
|
1309
1309
|
|
|
1310
1310
|
// First, collect all final mutations that could impact this immediate
|
|
1311
1311
|
// mutation.
|
|
1312
|
-
std::vector<ShadowViewMutation *> candidateMutations{};
|
|
1312
|
+
std::vector<ShadowViewMutation const *> candidateMutations{};
|
|
1313
1313
|
|
|
1314
1314
|
for (auto inflightAnimationIt =
|
|
1315
1315
|
inflightAnimations_.rbegin() + (skipLastAnimation ? 1 : 0);
|
|
@@ -1323,7 +1323,7 @@ void LayoutAnimationKeyFrameManager::
|
|
|
1323
1323
|
continue;
|
|
1324
1324
|
}
|
|
1325
1325
|
|
|
1326
|
-
for (auto &animatedKeyFrame : inflightAnimation.keyFrames) {
|
|
1326
|
+
for (auto const &animatedKeyFrame : inflightAnimation.keyFrames) {
|
|
1327
1327
|
if (animatedKeyFrame.invalidated) {
|
|
1328
1328
|
continue;
|
|
1329
1329
|
}
|
|
@@ -1334,7 +1334,8 @@ void LayoutAnimationKeyFrameManager::
|
|
|
1334
1334
|
continue;
|
|
1335
1335
|
}
|
|
1336
1336
|
|
|
1337
|
-
for (auto &delayedMutation :
|
|
1337
|
+
for (auto const &delayedMutation :
|
|
1338
|
+
animatedKeyFrame.finalMutationsForKeyFrame) {
|
|
1338
1339
|
if (delayedMutation.type != ShadowViewMutation::Type::Remove) {
|
|
1339
1340
|
continue;
|
|
1340
1341
|
}
|
|
@@ -1372,7 +1373,7 @@ void LayoutAnimationKeyFrameManager::
|
|
|
1372
1373
|
candidateMutations.begin(),
|
|
1373
1374
|
candidateMutations.end(),
|
|
1374
1375
|
[&changed, &mutation, &adjustedDelta, &isRemoveMutation](
|
|
1375
|
-
ShadowViewMutation *candidateMutation) {
|
|
1376
|
+
ShadowViewMutation const *candidateMutation) {
|
|
1376
1377
|
bool indexConflicts =
|
|
1377
1378
|
(candidateMutation->index < mutation.index ||
|
|
1378
1379
|
(isRemoveMutation &&
|
|
@@ -64,7 +64,8 @@ static void testShadowNodeTreeLifeCycleLayoutAnimations(
|
|
|
64
64
|
PropsParserContext parserContext{-1, *contextContainer};
|
|
65
65
|
|
|
66
66
|
// Create a RuntimeExecutor
|
|
67
|
-
RuntimeExecutor runtimeExecutor =
|
|
67
|
+
RuntimeExecutor runtimeExecutor =
|
|
68
|
+
[](std::function<void(jsi::Runtime &)> const &) {};
|
|
68
69
|
|
|
69
70
|
// Create component descriptor registry for animation driver
|
|
70
71
|
auto providerRegistry =
|
|
@@ -54,7 +54,7 @@ std::shared_ptr<void> AttributedStringBox::getOpaquePointer() const {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
AttributedStringBox &AttributedStringBox::operator=(
|
|
57
|
-
AttributedStringBox &&other) {
|
|
57
|
+
AttributedStringBox &&other) noexcept {
|
|
58
58
|
if (this != &other) {
|
|
59
59
|
mode_ = other.mode_;
|
|
60
60
|
value_ = std::move(other.value_);
|
|
@@ -43,7 +43,7 @@ class AttributedStringBox final {
|
|
|
43
43
|
AttributedStringBox(AttributedStringBox const &other) = default;
|
|
44
44
|
AttributedStringBox(AttributedStringBox &&other) noexcept;
|
|
45
45
|
AttributedStringBox &operator=(AttributedStringBox const &other) = default;
|
|
46
|
-
AttributedStringBox &operator=(AttributedStringBox &&other);
|
|
46
|
+
AttributedStringBox &operator=(AttributedStringBox &&other) noexcept;
|
|
47
47
|
|
|
48
48
|
/*
|
|
49
49
|
* Getters.
|
package/ReactCommon/react/renderer/componentregistry/ComponentDescriptorProviderRegistry.cpp
CHANGED
|
@@ -46,7 +46,8 @@ void ComponentDescriptorProviderRegistry::setComponentDescriptorProviderRequest(
|
|
|
46
46
|
ComponentDescriptorProviderRequest componentDescriptorProviderRequest)
|
|
47
47
|
const {
|
|
48
48
|
std::shared_lock<butter::shared_mutex> lock(mutex_);
|
|
49
|
-
componentDescriptorProviderRequest_ =
|
|
49
|
+
componentDescriptorProviderRequest_ =
|
|
50
|
+
std::move(componentDescriptorProviderRequest);
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
void ComponentDescriptorProviderRegistry::request(
|
|
@@ -18,7 +18,7 @@ namespace react {
|
|
|
18
18
|
|
|
19
19
|
Size AndroidProgressBarMeasurementsManager::measure(
|
|
20
20
|
SurfaceId surfaceId,
|
|
21
|
-
AndroidProgressBarProps props,
|
|
21
|
+
AndroidProgressBarProps const &props,
|
|
22
22
|
LayoutConstraints layoutConstraints) const {
|
|
23
23
|
{
|
|
24
24
|
std::lock_guard<std::mutex> lock(mutex_);
|
|
@@ -16,10 +16,10 @@ namespace facebook {
|
|
|
16
16
|
namespace react {
|
|
17
17
|
|
|
18
18
|
static TextAttributes convertRawProp(
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
19
|
+
PropsParserContext const &context,
|
|
20
|
+
RawProps const &rawProps,
|
|
21
|
+
TextAttributes const &sourceTextAttributes,
|
|
22
|
+
TextAttributes const &defaultTextAttributes) {
|
|
23
23
|
auto textAttributes = TextAttributes{};
|
|
24
24
|
|
|
25
25
|
// Color
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
#include <react/renderer/core/LayoutContext.h>
|
|
18
18
|
#include <react/renderer/core/conversions.h>
|
|
19
19
|
|
|
20
|
+
#include <utility>
|
|
21
|
+
|
|
20
22
|
using namespace facebook::jni;
|
|
21
23
|
|
|
22
24
|
namespace facebook {
|
|
@@ -91,7 +93,7 @@ AttributedString AndroidTextInputShadowNode::getPlaceholderAttributedString()
|
|
|
91
93
|
void AndroidTextInputShadowNode::setTextLayoutManager(
|
|
92
94
|
SharedTextLayoutManager textLayoutManager) {
|
|
93
95
|
ensureUnsealed();
|
|
94
|
-
textLayoutManager_ = textLayoutManager;
|
|
96
|
+
textLayoutManager_ = std::move(textLayoutManager);
|
|
95
97
|
}
|
|
96
98
|
|
|
97
99
|
AttributedString AndroidTextInputShadowNode::getMostRecentAttributedString()
|
|
@@ -27,7 +27,6 @@ AndroidTextInputState::AndroidTextInputState(
|
|
|
27
27
|
float defaultThemePaddingTop,
|
|
28
28
|
float defaultThemePaddingBottom)
|
|
29
29
|
: mostRecentEventCount(mostRecentEventCount),
|
|
30
|
-
cachedAttributedStringId(0),
|
|
31
30
|
attributedString(std::move(attributedString)),
|
|
32
31
|
reactTreeAttributedString(std::move(reactTreeAttributedString)),
|
|
33
32
|
paragraphAttributes(std::move(paragraphAttributes)),
|
|
@@ -57,7 +57,9 @@ class TextInputState final {
|
|
|
57
57
|
size_t mostRecentEventCount{0};
|
|
58
58
|
|
|
59
59
|
#ifdef ANDROID
|
|
60
|
-
TextInputState(
|
|
60
|
+
TextInputState(
|
|
61
|
+
TextInputState const &previousState,
|
|
62
|
+
folly::dynamic const &data);
|
|
61
63
|
|
|
62
64
|
folly::dynamic getDynamic() const;
|
|
63
65
|
|
|
@@ -17,7 +17,7 @@ namespace facebook {
|
|
|
17
17
|
namespace react {
|
|
18
18
|
|
|
19
19
|
EventDispatcher::EventDispatcher(
|
|
20
|
-
EventQueueProcessor eventProcessor,
|
|
20
|
+
EventQueueProcessor const &eventProcessor,
|
|
21
21
|
EventBeat::Factory const &synchonousEventBeatFactory,
|
|
22
22
|
EventBeat::Factory const &asynchonousEventBeatFactory,
|
|
23
23
|
EventBeat::SharedOwnerBox const &ownerBox)
|