react-native-windows 0.79.5 → 0.80.0-preview.10
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/.flowconfig +12 -3
- package/Directory.Build.props +11 -2
- package/Folly/TEMP_UntilFollyUpdate/json/json.cpp +1 -1
- package/Libraries/Alert/Alert.d.ts +4 -1
- package/Libraries/Alert/Alert.js +3 -0
- package/Libraries/Alert/Alert.windows.js +3 -0
- package/Libraries/Alert/RCTAlertManager.js +17 -0
- package/Libraries/Animated/Animated.js.flow +1 -3
- package/Libraries/Animated/AnimatedEvent.js +4 -3
- package/Libraries/Animated/AnimatedExports.js +2 -2
- package/Libraries/Animated/AnimatedExports.js.flow +140 -0
- package/Libraries/Animated/AnimatedImplementation.js +2 -123
- package/Libraries/Animated/Easing.js +13 -15
- package/Libraries/Animated/animations/Animation.js +8 -4
- package/Libraries/Animated/components/AnimatedFlatList.js +7 -6
- package/Libraries/Animated/components/AnimatedScrollView.js +48 -42
- package/Libraries/Animated/components/AnimatedSectionList.js +11 -7
- package/Libraries/Animated/createAnimatedComponent.js +105 -57
- package/Libraries/Animated/nodes/AnimatedNode.js +4 -3
- package/Libraries/Animated/nodes/AnimatedProps.js +46 -26
- package/Libraries/Animated/nodes/AnimatedValue.js +16 -7
- package/Libraries/Animated/nodes/AnimatedValueXY.js +3 -1
- package/Libraries/AppState/AppState.js +7 -2
- package/Libraries/BatchedBridge/MessageQueue.js +2 -2
- package/Libraries/BatchedBridge/NativeModules.js +2 -0
- package/Libraries/Blob/BlobManager.js +1 -0
- package/Libraries/Blob/FileReader.js +219 -8
- package/Libraries/Blob/URL.js +37 -12
- package/Libraries/Blob/URLSearchParams.js +106 -31
- package/Libraries/Blob/URLSearchParams.js.flow +12 -7
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +1 -1
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +1 -1
- package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.js +17 -0
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +1 -0
- package/Libraries/Components/Button.d.ts +3 -0
- package/Libraries/Components/Button.js +1 -1
- package/Libraries/Components/Button.windows.js +27 -1
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -3
- package/Libraries/{NewAppScreen/components/Colors.js → Components/DrawerAndroid/DrawerLayoutAndroid.ios.js} +6 -10
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +6 -66
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js.flow +18 -0
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidFallback.js +71 -0
- package/Libraries/Components/Flyout/Flyout.js +11 -0
- package/Libraries/Components/Keyboard/Keyboard.js +5 -3
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +6 -3
- package/Libraries/Components/Keyboard/KeyboardExt.js.map +1 -1
- package/Libraries/Components/Popup/Popup.js +11 -0
- package/Libraries/Components/Pressable/Pressable.js +20 -4
- package/Libraries/Components/Pressable/Pressable.windows.js +20 -4
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +25 -3
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidTypes.js +29 -20
- package/Libraries/Components/RefreshControl/RefreshControl.js +1 -1
- package/Libraries/Components/RefreshControl/RefreshControl.windows.js +1 -1
- package/Libraries/Components/ScrollView/ScrollView.d.ts +3 -3
- package/Libraries/Components/ScrollView/ScrollView.js +132 -122
- package/Libraries/Components/ScrollView/ScrollView.windows.js +131 -122
- package/Libraries/Components/StaticRenderer.js +1 -1
- package/Libraries/Components/Switch/Switch.d.ts +3 -0
- package/Libraries/Components/Switch/Switch.js +8 -4
- package/Libraries/Components/Switch/Switch.windows.js +17 -4
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +2 -1
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +2 -4
- package/Libraries/Components/TextInput/TextInput.d.ts +70 -33
- package/Libraries/Components/TextInput/TextInput.flow.js +100 -51
- package/Libraries/Components/TextInput/TextInput.flow.windows.js +1246 -0
- package/Libraries/Components/TextInput/TextInput.js +88 -1027
- package/Libraries/Components/TextInput/TextInput.windows.js +104 -1092
- package/Libraries/Components/TextInput/TextInputState.js +1 -1
- package/Libraries/Components/TextInput/TextInputState.windows.js +1 -1
- package/Libraries/Components/TextInput/WindowsTextInputNativeComponent.js +2 -1
- package/Libraries/{Modal/ModalInjection.js → Components/ToastAndroid/ToastAndroid.ios.js} +3 -5
- package/Libraries/Components/ToastAndroid/ToastAndroid.js +4 -32
- package/Libraries/Components/ToastAndroid/ToastAndroid.js.flow +109 -0
- package/Libraries/Components/ToastAndroid/ToastAndroidFallback.js +45 -0
- package/Libraries/Components/Touchable/Touchable.js +5 -5
- package/Libraries/Components/Touchable/Touchable.windows.js +5 -5
- package/Libraries/Components/Touchable/TouchableBounce.js +14 -7
- package/Libraries/Components/Touchable/TouchableBounce.windows.js +14 -7
- package/Libraries/Components/Touchable/TouchableHighlight.js +10 -7
- package/Libraries/Components/Touchable/TouchableHighlight.windows.js +10 -7
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +6 -6
- package/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js +6 -6
- package/Libraries/Components/Touchable/TouchableOpacity.js +13 -6
- package/Libraries/Components/Touchable/TouchableOpacity.windows.js +13 -6
- package/Libraries/Components/View/View.js +18 -21
- package/Libraries/Components/View/View.windows.js +39 -41
- package/Libraries/Components/View/ViewAccessibility.d.ts +8 -0
- package/Libraries/Components/View/ViewAccessibility.js +25 -1
- package/Libraries/Components/View/ViewAccessibility.windows.js +9 -1
- package/Libraries/Components/View/ViewPropTypes.js +49 -3
- package/Libraries/Components/View/ViewPropTypes.windows.js +50 -2
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/setUpReactDevTools.js +5 -5
- package/Libraries/Debugging/DebuggingOverlayRegistry.js +3 -3
- package/Libraries/EventEmitter/NativeEventEmitter.js +9 -4
- package/Libraries/Image/AssetSourceResolver.js +17 -4
- package/Libraries/Image/AssetSourceResolver.windows.js +17 -4
- package/Libraries/Image/Image.d.ts +26 -10
- package/Libraries/Image/Image.js +17 -0
- package/Libraries/Image/Image.js.flow +5 -5
- package/Libraries/Image/Image.windows.js +13 -1
- package/Libraries/Image/ImageBackground.js +2 -0
- package/Libraries/Image/ImageInjection.js +1 -1
- package/Libraries/Image/ImageProps.js +22 -17
- package/Libraries/Image/ImageSource.js +3 -1
- package/Libraries/Image/ImageSourceUtils.js +4 -2
- package/Libraries/Image/ImageTypes.flow.js +1 -1
- package/Libraries/Interaction/InteractionManager.d.ts +13 -0
- package/Libraries/Interaction/InteractionManager.js +1 -1
- package/Libraries/Interaction/PanResponder.js +3 -3
- package/Libraries/Interaction/TaskQueue.js +1 -0
- package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -2
- package/Libraries/Linking/Linking.js +1 -1
- package/Libraries/Lists/FlatList.d.ts +2 -2
- package/Libraries/Lists/FlatList.js +8 -11
- package/Libraries/Lists/SectionList.js +39 -42
- package/Libraries/Lists/SectionListModern.js +25 -34
- package/Libraries/Lists/VirtualizedList.js +1 -0
- package/Libraries/Lists/VirtualizedSectionList.js +1 -0
- package/Libraries/LogBox/Data/LogBoxData.js +1 -1
- package/Libraries/LogBox/LogBoxNotificationContainer.js +1 -1
- package/Libraries/Modal/Modal.js +33 -7
- package/Libraries/Modal/Modal.windows.js +33 -10
- package/Libraries/NativeComponent/BaseViewConfig.android.js +2 -0
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +2 -0
- package/Libraries/NativeComponent/BaseViewConfig.js +17 -0
- package/Libraries/NativeComponent/BaseViewConfig.windows.js +3 -0
- package/Libraries/NativeComponent/PlatformBaseViewConfig.js +2 -2
- package/Libraries/NativeModules/specs/NativeDevMenu.js +2 -2
- package/Libraries/Network/RCTNetworking.android.js +1 -1
- package/Libraries/Network/RCTNetworking.ios.js +1 -1
- package/Libraries/Network/RCTNetworking.js +17 -0
- package/Libraries/Network/RCTNetworking.js.flow +1 -1
- package/Libraries/Network/RCTNetworking.windows.js +1 -1
- package/Libraries/Network/XMLHttpRequest.js +781 -10
- package/Libraries/Performance/Systrace.js +7 -7
- package/Libraries/Pressability/Pressability.js +1 -1
- package/Libraries/Pressability/Pressability.windows.js +1 -1
- package/Libraries/ReactNative/AppContainer-dev.js +5 -4
- package/Libraries/ReactNative/AppRegistry.flow.js +49 -0
- package/Libraries/ReactNative/AppRegistry.js +2 -322
- package/Libraries/ReactNative/AppRegistry.js.flow +23 -0
- package/Libraries/ReactNative/AppRegistryImpl.js +316 -0
- package/Libraries/ReactNative/FabricUIManager.js +10 -0
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +2 -4
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +1 -4
- package/Libraries/ReactNative/RendererImplementation.js +10 -5
- package/Libraries/ReactNative/getNativeComponentAttributes.js +1 -0
- package/Libraries/ReactNative/renderApplication.js +9 -0
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +3 -3
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js.flow +51 -0
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +4840 -4748
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +4947 -4829
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3998 -3888
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +5005 -4948
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +2744 -2652
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +5020 -4933
- package/Libraries/Renderer/shims/ReactNativeTypes.js +3 -3
- package/Libraries/Settings/Settings.ios.js +1 -0
- package/Libraries/Settings/Settings.js +13 -19
- package/Libraries/Settings/SettingsFallback.js +33 -0
- package/Libraries/StyleSheet/PlatformColorValueTypes.js +15 -0
- package/Libraries/StyleSheet/PlatformColorValueTypesIOS.js +6 -0
- package/Libraries/StyleSheet/Rect.js +1 -0
- package/Libraries/StyleSheet/StyleSheet.js +31 -200
- package/Libraries/StyleSheet/StyleSheet.js.flow +188 -0
- package/Libraries/StyleSheet/StyleSheetExports.js +210 -0
- package/Libraries/StyleSheet/StyleSheetExports.js.flow +112 -0
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -1
- package/Libraries/StyleSheet/StyleSheetTypes.js +130 -52
- package/Libraries/StyleSheet/flattenStyle.js +14 -4
- package/Libraries/StyleSheet/private/_TransformStyle.js +49 -21
- package/Libraries/StyleSheet/processBackgroundImage.js +670 -214
- package/Libraries/Text/Text.d.ts +2 -5
- package/Libraries/Text/Text.js +3 -3
- package/Libraries/Text/Text.windows.js +3 -3
- package/Libraries/Text/TextNativeComponent.js +0 -4
- package/Libraries/Text/TextProps.js +5 -33
- package/Libraries/Text/TextProps.windows.js +5 -32
- package/Libraries/Types/CodegenTypesNamespace.d.ts +45 -0
- package/Libraries/{Blob/__mocks__/BlobModule.js → Types/CodegenTypesNamespace.js} +4 -6
- package/Libraries/Types/CoreEventTypes.d.ts +6 -1
- package/Libraries/Types/CoreEventTypes.js +1 -1
- package/Libraries/Types/CoreEventTypes.windows.js +1 -1
- package/Libraries/Utilities/Appearance.js +2 -0
- package/Libraries/Utilities/BackHandler.js +17 -0
- package/Libraries/Utilities/DeviceInfo.js +2 -0
- package/Libraries/Utilities/Dimensions.js +1 -1
- package/Libraries/Utilities/Platform.js +17 -0
- package/Libraries/Utilities/PlatformTypes.js +11 -3
- package/Libraries/Utilities/ReactNativeTestTools.js +2 -2
- package/Libraries/Utilities/codegenNativeCommands.d.ts +18 -0
- package/Libraries/Utilities/codegenNativeComponent.d.ts +26 -0
- package/Libraries/WebSocket/WebSocket.js +313 -8
- package/Libraries/vendor/core/ErrorUtils.js +28 -2
- package/Libraries/vendor/emitter/EventEmitter.js +6 -2
- package/Microsoft.ReactNative/CompositionSwitcher.idl +3 -0
- package/Microsoft.ReactNative/Fabric/AbiComponentDescriptor.cpp +0 -6
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +248 -6
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +55 -160
- package/Microsoft.ReactNative/Fabric/Composition/CompositionTextRangeProvider.cpp +30 -9
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +36 -0
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +36 -33
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +22 -0
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +3 -0
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +46 -0
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.h +4 -1
- package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.cpp +11 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextDrawing.cpp +37 -5
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +177 -25
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +4 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputEventEmitter.cpp +29 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputEventEmitter.h +2 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +17 -34
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +225 -0
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +23 -0
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +9 -3
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.h +2 -0
- package/Microsoft.ReactNative/Fabric/ImageManager.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewEventEmitter.cpp +16 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewEventEmitter.h +1 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewProps.cpp +9 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewProps.h +1 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewTraitsInitializer.h +4 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorUtils.cpp +64 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorUtils.h +11 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/WindowsTextLayoutManager.cpp +36 -96
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/WindowsTextLayoutManager.h +1 -1
- package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.cpp +29 -0
- package/Microsoft.ReactNative/Modules/SampleTurboModule.cpp +4 -0
- package/Microsoft.ReactNative/Modules/SampleTurboModule.h +3 -0
- package/Microsoft.ReactNative/TurboModulesProvider.h +1 -1
- package/Microsoft.ReactNative/Utils/ThemeUtils.cpp +49 -0
- package/Microsoft.ReactNative/Utils/ThemeUtils.h +31 -0
- package/Microsoft.ReactNative.Cxx/JSI/JsiApiContext.h +1 -1
- package/Microsoft.ReactNative.Cxx/JSI/LongLivedJsiValue.h +1 -1
- package/PropertySheets/Generated/PackageVersion.g.props +4 -4
- package/PropertySheets/JSEngine.props +1 -1
- package/PropertySheets/React.Cpp.props +4 -0
- package/PropertySheets/Warnings.props +45 -0
- package/README.md +6 -2
- package/ReactCommon/ReactCommon.vcxproj +9 -4
- package/ReactCommon/ReactCommon.vcxproj.filters +6 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/CxxNativeModule.cpp +253 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.cpp +5 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp +4 -8
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/TraceSection.h +184 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp +22 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.h +2 -4
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModuleWithJSIBindings.cpp +27 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp +3 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityPrimitives.h +1 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityProps.cpp +308 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/DynamicEventPayload.cpp +42 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/css/CSSTokenizer.h +7 -51
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +10 -5
- package/Scripts/creaternwapp.cmd +9 -3
- package/Scripts/rnw-dependencies.ps1 +16 -3
- package/Shared/Shared.vcxitems +3 -2
- package/Shared/Shared.vcxitems.filters +2 -1
- package/codegen/NativeAnimatedModuleSpec.g.h +2 -0
- package/codegen/NativeAnimatedTurboModuleSpec.g.h +2 -0
- package/codegen/NativePerformanceSpec.g.h +14 -0
- package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +151 -127
- package/codegen/NativeSampleTurboModuleSpec.g.h +14 -8
- package/codegen/react/components/rnwcore/EventEmitters.cpp +48 -48
- package/codegen/rnwcoreJSI-generated.cpp +159 -129
- package/codegen/rnwcoreJSI.h +534 -408
- package/index.js +51 -331
- package/index.windows.js +70 -352
- package/interface.js +0 -4
- package/jest/resolver.js +31 -0
- package/jest/setup.js +6 -2
- package/package.json +29 -28
- package/src/private/animated/NativeAnimatedHelper.js +21 -8
- package/src/private/animated/createAnimatedPropsHook.js +11 -16
- package/src/private/animated/createAnimatedPropsMemoHook.js +1 -2
- package/src/private/components/{SafeAreaView_INTERNAL_DO_NOT_USE.js → safeareaview/SafeAreaView_INTERNAL_DO_NOT_USE.js} +6 -6
- package/src/private/components/{HScrollViewNativeComponents.js → scrollview/HScrollViewNativeComponents.js} +8 -8
- package/src/private/components/scrollview/VScrollViewNativeComponents.js +25 -0
- package/src/private/{devmenu → devsupport/devmenu}/DevMenu.js +1 -1
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/BorderBox.js +3 -3
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/BoxInspector.js +6 -5
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/ElementBox.js +8 -6
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/ElementProperties.js +11 -10
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/Inspector.js +14 -12
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/InspectorOverlay.js +5 -4
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/InspectorPanel.js +9 -8
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/NetworkOverlay.js +10 -9
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/ReactDevToolsOverlay.js +7 -7
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/StyleInspector.js +7 -6
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/XHRInterceptor.js +2 -2
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/getInspectorDataForViewAtPoint.js +4 -4
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/resolveBoxStyle.js +1 -1
- package/src/private/{inspector → devsupport/devmenu/perfmonitor}/PerformanceOverlay.js +6 -5
- package/src/private/{specs_DEPRECATED/modules → devsupport/devmenu/specs}/NativeDevMenu.js +2 -2
- package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.android.js +1 -1
- package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.ios.js +1 -1
- package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.windows.js +1 -1
- package/src/private/{debugging → devsupport/rndevtools}/setUpFuseboxReactDevToolsDispatcher.js +1 -1
- package/src/private/{fusebox → devsupport/rndevtools}/specs/NativeReactDevToolsRuntimeSettingsModule.js +2 -2
- package/src/private/{specs_DEPRECATED/modules → devsupport/rndevtools/specs}/NativeReactDevToolsSettingsManager.js +2 -2
- package/src/private/featureflags/ReactNativeFeatureFlags.js +82 -80
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +12 -1
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +17 -13
- package/src/private/renderer/errorhandling/ErrorHandlers.js +2 -2
- package/src/private/specs_DEPRECATED/modules/NativeAnimatedModule.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeAnimatedTurboModule.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeSampleTurboModule.js +3 -0
- package/src/private/styles/composeStyles.js +12 -5
- package/src/private/types/HostComponent.js +1 -1
- package/src/private/types/HostInstance.js +67 -1
- package/src/private/webapis/dom/nodes/ReactNativeElement.js +2 -5
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +5 -18
- package/src/private/webapis/dom/nodes/internals/NodeInternals.js +6 -0
- package/src/private/webapis/performance/Performance.js +1 -3
- package/src/private/webapis/performance/PerformanceEntry.js +6 -1
- package/src/private/webapis/performance/internals/RawPerformanceEntry.js +3 -0
- package/src/private/webapis/performance/specs/NativePerformance.js +10 -1
- package/src/types/globals.d.ts +42 -0
- package/stubs/double-conversion/double-conversion.h +3 -1
- package/templates/cpp-app/template.config.js +2 -1
- package/templates/cpp-app/windows/MyApp/MyApp.vcxproj +4 -0
- package/templates/cpp-lib/example/metro.config.js +1 -1
- package/templates/cpp-lib/windows/MyLib/MyLib.vcxproj +4 -0
- package/templates/old/generateWrapper.js +1 -1
- package/templates/old/uwp-cpp-app/template.config.js +1 -1
- package/types/index.d.ts +6 -3
- package/types/public/ReactNativeTypes.d.ts +2 -2
- package/Libraries/BatchedBridge/__mocks__/MessageQueueTestConfig.js +0 -38
- package/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js +0 -22
- package/Libraries/Blob/FileReader_new.js +0 -231
- package/Libraries/Blob/FileReader_old.js +0 -186
- package/Libraries/Blob/__mocks__/FileReaderModule.js +0 -20
- package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +0 -32
- package/Libraries/Core/__mocks__/ErrorUtils.js +0 -33
- package/Libraries/Core/__mocks__/NativeExceptionsManager.js +0 -19
- package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +0 -49
- package/Libraries/Events/CustomEvent.js +0 -32
- package/Libraries/Events/EventPolyfill.js +0 -239
- package/Libraries/Lists/__flowtests__/FlatList-flowtest.js +0 -118
- package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +0 -134
- package/Libraries/Network/XMLHttpRequest_new.js +0 -794
- package/Libraries/Network/XMLHttpRequest_old.js +0 -701
- package/Libraries/NewAppScreen/components/DebugInstructions.js +0 -41
- package/Libraries/NewAppScreen/components/DebugInstructions.windows.js +0 -30
- package/Libraries/NewAppScreen/components/Header.js +0 -77
- package/Libraries/NewAppScreen/components/HermesBadge.js +0 -53
- package/Libraries/NewAppScreen/components/LearnMoreLinks.js +0 -148
- package/Libraries/NewAppScreen/components/ReloadInstructions.js +0 -39
- package/Libraries/NewAppScreen/components/ReloadInstructions.windows.js +0 -31
- package/Libraries/NewAppScreen/components/logo.png +0 -0
- package/Libraries/NewAppScreen/index.js +0 -25
- package/Libraries/StyleSheet/__flowtests__/StyleSheet-flowtest.js +0 -58
- package/Libraries/Utilities/__mocks__/BackHandler.js +0 -45
- package/Libraries/Utilities/__mocks__/GlobalPerformanceLogger.js +0 -16
- package/Libraries/Utilities/__mocks__/PixelRatio.js +0 -25
- package/Libraries/WebSocket/WebSocketEvent.js +0 -30
- package/Libraries/WebSocket/WebSocket_new.js +0 -325
- package/Libraries/WebSocket/WebSocket_old.js +0 -297
- package/Libraries/WebSocket/__mocks__/event-target-shim.js +0 -27
- package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +0 -30
- package/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js +0 -81
- package/jest/__tests__/setup-test.js +0 -18
- package/src/private/components/VScrollViewNativeComponents.js +0 -25
- package/src/private/utilities/ensureInstance.js +0 -21
- package/src/private/webapis/performance/specs/__mocks__/NativePerformanceMock.js +0 -267
- package/types/modules/LaunchScreen.d.ts +0 -18
- /package/src/private/{devmenu → devsupport/devmenu}/DevMenu.d.ts +0 -0
- /package/src/private/{debugging → devsupport/rndevtools}/FuseboxSessionObserver.js +0 -0
|
@@ -20,18 +20,17 @@ import type {
|
|
|
20
20
|
} from '../../Types/CoreEventTypes';
|
|
21
21
|
import type {EventSubscription} from '../../vendor/emitter/EventEmitter';
|
|
22
22
|
import type {KeyboardEvent, KeyboardMetrics} from '../Keyboard/Keyboard';
|
|
23
|
-
import typeof View from '../View/View';
|
|
24
23
|
import type {ViewProps} from '../View/ViewPropTypes';
|
|
25
24
|
import type {ScrollViewStickyHeaderProps} from './ScrollViewStickyHeader';
|
|
26
25
|
|
|
27
26
|
import {
|
|
28
27
|
HScrollContentViewNativeComponent,
|
|
29
28
|
HScrollViewNativeComponent,
|
|
30
|
-
} from '../../../src/private/components/HScrollViewNativeComponents';
|
|
29
|
+
} from '../../../src/private/components/scrollview/HScrollViewNativeComponents';
|
|
31
30
|
import {
|
|
32
31
|
VScrollContentViewNativeComponent,
|
|
33
32
|
VScrollViewNativeComponent,
|
|
34
|
-
} from '../../../src/private/components/VScrollViewNativeComponents';
|
|
33
|
+
} from '../../../src/private/components/scrollview/VScrollViewNativeComponents';
|
|
35
34
|
import AnimatedImplementation from '../../Animated/AnimatedImplementation';
|
|
36
35
|
import FrameRateLogger from '../../Interaction/FrameRateLogger';
|
|
37
36
|
import {findNodeHandle} from '../../ReactNative/RendererProxy';
|
|
@@ -44,6 +43,7 @@ import dismissKeyboard from '../../Utilities/dismissKeyboard';
|
|
|
44
43
|
import Platform from '../../Utilities/Platform';
|
|
45
44
|
import Keyboard from '../Keyboard/Keyboard';
|
|
46
45
|
import TextInputState from '../TextInput/TextInputState';
|
|
46
|
+
import View from '../View/View';
|
|
47
47
|
import processDecelerationRate from './processDecelerationRate';
|
|
48
48
|
import Commands from './ScrollViewCommands';
|
|
49
49
|
import ScrollViewContext, {HORIZONTAL, VERTICAL} from './ScrollViewContext';
|
|
@@ -134,19 +134,33 @@ export interface ScrollViewScrollToOptions {
|
|
|
134
134
|
|
|
135
135
|
// Public methods for ScrollView
|
|
136
136
|
export interface ScrollViewImperativeMethods {
|
|
137
|
-
+getScrollResponder:
|
|
138
|
-
+getScrollableNode:
|
|
139
|
-
+getInnerViewNode:
|
|
140
|
-
+getInnerViewRef:
|
|
141
|
-
+getNativeScrollRef:
|
|
142
|
-
+scrollTo:
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
137
|
+
+getScrollResponder: () => ScrollResponderType;
|
|
138
|
+
+getScrollableNode: () => ?number;
|
|
139
|
+
+getInnerViewNode: () => ?number;
|
|
140
|
+
+getInnerViewRef: () => InnerViewInstance | null;
|
|
141
|
+
+getNativeScrollRef: () => HostInstance | null;
|
|
142
|
+
+scrollTo: (
|
|
143
|
+
options?: ScrollViewScrollToOptions | number,
|
|
144
|
+
deprecatedX?: number,
|
|
145
|
+
deprecatedAnimated?: boolean,
|
|
146
|
+
) => void;
|
|
147
|
+
+scrollToEnd: (options?: ?ScrollViewScrollToOptions) => void;
|
|
148
|
+
+flashScrollIndicators: () => void;
|
|
149
|
+
+scrollResponderZoomTo: (
|
|
150
|
+
rect: {
|
|
151
|
+
x: number,
|
|
152
|
+
y: number,
|
|
153
|
+
width: number,
|
|
154
|
+
height: number,
|
|
155
|
+
animated?: boolean,
|
|
156
|
+
},
|
|
157
|
+
animated?: boolean, // deprecated, put this inside the rect argument instead
|
|
158
|
+
) => void;
|
|
159
|
+
+scrollResponderScrollNativeHandleToKeyboard: (
|
|
160
|
+
nodeHandle: number | HostInstance,
|
|
161
|
+
additionalOffset?: number,
|
|
162
|
+
preventNegativeScrollOffset?: boolean,
|
|
163
|
+
) => void;
|
|
150
164
|
}
|
|
151
165
|
|
|
152
166
|
export type DecelerationRateType = 'fast' | 'normal' | number;
|
|
@@ -156,7 +170,7 @@ export interface PublicScrollViewInstance
|
|
|
156
170
|
extends HostInstance,
|
|
157
171
|
ScrollViewImperativeMethods {}
|
|
158
172
|
|
|
159
|
-
type InnerViewInstance = React.ElementRef<View>;
|
|
173
|
+
type InnerViewInstance = React.ElementRef<typeof View>;
|
|
160
174
|
|
|
161
175
|
export type ScrollViewPropsIOS = $ReadOnly<{
|
|
162
176
|
/**
|
|
@@ -303,7 +317,7 @@ export type ScrollViewPropsIOS = $ReadOnly<{
|
|
|
303
317
|
/**
|
|
304
318
|
* This property specifies how the safe area insets are used to modify the
|
|
305
319
|
* content area of the scroll view. The default value of this property is
|
|
306
|
-
* "never".
|
|
320
|
+
* "never".
|
|
307
321
|
* @platform ios
|
|
308
322
|
*/
|
|
309
323
|
contentInsetAdjustmentBehavior?: ?(
|
|
@@ -376,11 +390,7 @@ type StickyHeaderComponentType = component(
|
|
|
376
390
|
...ScrollViewStickyHeaderProps
|
|
377
391
|
);
|
|
378
392
|
|
|
379
|
-
|
|
380
|
-
...ViewProps,
|
|
381
|
-
...ScrollViewPropsIOS,
|
|
382
|
-
...ScrollViewPropsAndroid,
|
|
383
|
-
|
|
393
|
+
type ScrollViewBaseProps = $ReadOnly<{
|
|
384
394
|
/**
|
|
385
395
|
* These styles will be applied to the scroll view content container which
|
|
386
396
|
* wraps all of the child views. Example:
|
|
@@ -643,7 +653,7 @@ export type ScrollViewProps = $ReadOnly<{
|
|
|
643
653
|
*/
|
|
644
654
|
/* $FlowFixMe[unclear-type] - how to handle generic type without existential
|
|
645
655
|
* operator? */
|
|
646
|
-
refreshControl?: ?React.
|
|
656
|
+
refreshControl?: ?React.MixedElement,
|
|
647
657
|
children?: React.Node,
|
|
648
658
|
/**
|
|
649
659
|
* A ref to the inner View element of the ScrollView. This should be used
|
|
@@ -658,7 +668,14 @@ export type ScrollViewProps = $ReadOnly<{
|
|
|
658
668
|
scrollViewRef?: React.RefSetter<PublicScrollViewInstance>,
|
|
659
669
|
}>;
|
|
660
670
|
|
|
661
|
-
type
|
|
671
|
+
export type ScrollViewProps = $ReadOnly<{
|
|
672
|
+
...ViewProps,
|
|
673
|
+
...ScrollViewPropsIOS,
|
|
674
|
+
...ScrollViewPropsAndroid,
|
|
675
|
+
...ScrollViewBaseProps,
|
|
676
|
+
}>;
|
|
677
|
+
|
|
678
|
+
type ScrollViewState = {
|
|
662
679
|
layoutHeight: ?number,
|
|
663
680
|
};
|
|
664
681
|
|
|
@@ -703,7 +720,7 @@ export type ScrollViewComponentStatics = $ReadOnly<{
|
|
|
703
720
|
* multiple columns, infinite scroll loading, or any number of other features it
|
|
704
721
|
* supports out of the box.
|
|
705
722
|
*/
|
|
706
|
-
class ScrollView extends React.Component<ScrollViewProps,
|
|
723
|
+
class ScrollView extends React.Component<ScrollViewProps, ScrollViewState> {
|
|
707
724
|
static Context: typeof ScrollViewContext = ScrollViewContext;
|
|
708
725
|
|
|
709
726
|
constructor(props: ScrollViewProps) {
|
|
@@ -745,7 +762,7 @@ class ScrollView extends React.Component<ScrollViewProps, State> {
|
|
|
745
762
|
_subscriptionKeyboardDidShow: ?EventSubscription = null;
|
|
746
763
|
_subscriptionKeyboardDidHide: ?EventSubscription = null;
|
|
747
764
|
|
|
748
|
-
state:
|
|
765
|
+
state: ScrollViewState = {
|
|
749
766
|
layoutHeight: null,
|
|
750
767
|
};
|
|
751
768
|
|
|
@@ -823,26 +840,28 @@ class ScrollView extends React.Component<ScrollViewProps, State> {
|
|
|
823
840
|
* implement this method so that they can be composed while providing access
|
|
824
841
|
* to the underlying scroll responder's methods.
|
|
825
842
|
*/
|
|
826
|
-
getScrollResponder:
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
843
|
+
getScrollResponder: ScrollViewImperativeMethods['getScrollResponder'] =
|
|
844
|
+
() => {
|
|
845
|
+
// $FlowFixMe[unclear-type]
|
|
846
|
+
return ((this: any): ScrollResponderType);
|
|
847
|
+
};
|
|
830
848
|
|
|
831
|
-
getScrollableNode:
|
|
832
|
-
return findNodeHandle(this.getNativeScrollRef());
|
|
849
|
+
getScrollableNode: ScrollViewImperativeMethods['getScrollableNode'] = () => {
|
|
850
|
+
return findNodeHandle<$FlowFixMe>(this.getNativeScrollRef());
|
|
833
851
|
};
|
|
834
852
|
|
|
835
|
-
getInnerViewNode:
|
|
836
|
-
return findNodeHandle(this._innerView.nativeInstance);
|
|
853
|
+
getInnerViewNode: ScrollViewImperativeMethods['getInnerViewNode'] = () => {
|
|
854
|
+
return findNodeHandle<$FlowFixMe>(this._innerView.nativeInstance);
|
|
837
855
|
};
|
|
838
856
|
|
|
839
|
-
getInnerViewRef:
|
|
857
|
+
getInnerViewRef: ScrollViewImperativeMethods['getInnerViewRef'] = () => {
|
|
840
858
|
return this._innerView.nativeInstance;
|
|
841
859
|
};
|
|
842
860
|
|
|
843
|
-
getNativeScrollRef:
|
|
844
|
-
|
|
845
|
-
|
|
861
|
+
getNativeScrollRef: ScrollViewImperativeMethods['getNativeScrollRef'] =
|
|
862
|
+
() => {
|
|
863
|
+
return this._scrollView.nativeInstance;
|
|
864
|
+
};
|
|
846
865
|
|
|
847
866
|
/**
|
|
848
867
|
* Scrolls to a given x, y offset, either immediately or with a smooth animation.
|
|
@@ -855,11 +874,11 @@ class ScrollView extends React.Component<ScrollViewProps, State> {
|
|
|
855
874
|
* the function also accepts separate arguments as an alternative to the options object.
|
|
856
875
|
* This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED.
|
|
857
876
|
*/
|
|
858
|
-
scrollTo: (
|
|
859
|
-
options
|
|
860
|
-
deprecatedX
|
|
861
|
-
deprecatedAnimated
|
|
862
|
-
) =>
|
|
877
|
+
scrollTo: ScrollViewImperativeMethods['scrollTo'] = (
|
|
878
|
+
options,
|
|
879
|
+
deprecatedX,
|
|
880
|
+
deprecatedAnimated,
|
|
881
|
+
) => {
|
|
863
882
|
let x, y, animated;
|
|
864
883
|
if (typeof options === 'number') {
|
|
865
884
|
console.warn(
|
|
@@ -889,7 +908,7 @@ class ScrollView extends React.Component<ScrollViewProps, State> {
|
|
|
889
908
|
* `scrollToEnd({animated: false})` for immediate scrolling.
|
|
890
909
|
* If no options are passed, `animated` defaults to true.
|
|
891
910
|
*/
|
|
892
|
-
scrollToEnd:
|
|
911
|
+
scrollToEnd: ScrollViewImperativeMethods['scrollToEnd'] = options => {
|
|
893
912
|
// Default to true
|
|
894
913
|
const animated = (options && options.animated) !== false;
|
|
895
914
|
const component = this.getNativeScrollRef();
|
|
@@ -904,13 +923,14 @@ class ScrollView extends React.Component<ScrollViewProps, State> {
|
|
|
904
923
|
*
|
|
905
924
|
* @platform ios
|
|
906
925
|
*/
|
|
907
|
-
flashScrollIndicators:
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
926
|
+
flashScrollIndicators: ScrollViewImperativeMethods['flashScrollIndicators'] =
|
|
927
|
+
() => {
|
|
928
|
+
const component = this.getNativeScrollRef();
|
|
929
|
+
if (component == null) {
|
|
930
|
+
return;
|
|
931
|
+
}
|
|
932
|
+
Commands.flashScrollIndicators(component);
|
|
933
|
+
};
|
|
914
934
|
|
|
915
935
|
/**
|
|
916
936
|
* This method should be used as the callback to onFocus in a TextInputs'
|
|
@@ -922,39 +942,36 @@ class ScrollView extends React.Component<ScrollViewProps, State> {
|
|
|
922
942
|
* @param {bool} preventNegativeScrolling Whether to allow pulling the content
|
|
923
943
|
* down to make it meet the keyboard's top. Default is false.
|
|
924
944
|
*/
|
|
925
|
-
scrollResponderScrollNativeHandleToKeyboard:
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
if (this._innerView.nativeInstance == null) {
|
|
938
|
-
return;
|
|
939
|
-
}
|
|
945
|
+
scrollResponderScrollNativeHandleToKeyboard: ScrollViewImperativeMethods['scrollResponderScrollNativeHandleToKeyboard'] =
|
|
946
|
+
(
|
|
947
|
+
nodeHandle: number | HostInstance,
|
|
948
|
+
additionalOffset?: number,
|
|
949
|
+
preventNegativeScrollOffset?: boolean,
|
|
950
|
+
) => {
|
|
951
|
+
this._additionalScrollOffset = additionalOffset || 0;
|
|
952
|
+
this._preventNegativeScrollOffset = !!preventNegativeScrollOffset;
|
|
953
|
+
|
|
954
|
+
if (this._innerView.nativeInstance == null) {
|
|
955
|
+
return;
|
|
956
|
+
}
|
|
940
957
|
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
+
if (typeof nodeHandle === 'number') {
|
|
959
|
+
UIManager.measureLayout(
|
|
960
|
+
nodeHandle,
|
|
961
|
+
nullthrows(findNodeHandle<$FlowFixMe>(this)),
|
|
962
|
+
// $FlowFixMe[method-unbinding] added when improving typing for this parameters
|
|
963
|
+
this._textInputFocusError,
|
|
964
|
+
this._inputMeasureAndScrollToKeyboard,
|
|
965
|
+
);
|
|
966
|
+
} else {
|
|
967
|
+
nodeHandle.measureLayout(
|
|
968
|
+
this._innerView.nativeInstance,
|
|
969
|
+
this._inputMeasureAndScrollToKeyboard,
|
|
970
|
+
// $FlowFixMe[method-unbinding] added when improving typing for this parameters
|
|
971
|
+
this._textInputFocusError,
|
|
972
|
+
);
|
|
973
|
+
}
|
|
974
|
+
};
|
|
958
975
|
|
|
959
976
|
/**
|
|
960
977
|
* A helper function to zoom to a specific rect in the scrollview. The argument has the shape
|
|
@@ -962,41 +979,33 @@ class ScrollView extends React.Component<ScrollViewProps, State> {
|
|
|
962
979
|
*
|
|
963
980
|
* @platform ios
|
|
964
981
|
*/
|
|
965
|
-
scrollResponderZoomTo:
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
animated
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
if ('animated' in rect) {
|
|
986
|
-
this._animated = rect.animated;
|
|
987
|
-
delete rect.animated;
|
|
988
|
-
} else if (typeof animated !== 'undefined') {
|
|
989
|
-
console.warn(
|
|
990
|
-
'`scrollResponderZoomTo` `animated` argument is deprecated. Use `options.animated` instead',
|
|
991
|
-
);
|
|
992
|
-
}
|
|
982
|
+
scrollResponderZoomTo: ScrollViewImperativeMethods['scrollResponderZoomTo'] =
|
|
983
|
+
(
|
|
984
|
+
rect: {
|
|
985
|
+
x: number,
|
|
986
|
+
y: number,
|
|
987
|
+
width: number,
|
|
988
|
+
height: number,
|
|
989
|
+
animated?: boolean,
|
|
990
|
+
},
|
|
991
|
+
animated?: boolean, // deprecated, put this inside the rect argument instead
|
|
992
|
+
) => {
|
|
993
|
+
invariant(Platform.OS === 'ios', 'zoomToRect is not implemented');
|
|
994
|
+
if ('animated' in rect) {
|
|
995
|
+
this._animated = rect.animated;
|
|
996
|
+
delete rect.animated;
|
|
997
|
+
} else if (typeof animated !== 'undefined') {
|
|
998
|
+
console.warn(
|
|
999
|
+
'`scrollResponderZoomTo` `animated` argument is deprecated. Use `options.animated` instead',
|
|
1000
|
+
);
|
|
1001
|
+
}
|
|
993
1002
|
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1003
|
+
const component = this.getNativeScrollRef();
|
|
1004
|
+
if (component == null) {
|
|
1005
|
+
return;
|
|
1006
|
+
}
|
|
1007
|
+
Commands.zoomToRect(component, rect, animated !== false);
|
|
1008
|
+
};
|
|
1000
1009
|
|
|
1001
1010
|
_textInputFocusError() {
|
|
1002
1011
|
console.warn('Error measuring text field.');
|
|
@@ -1156,6 +1165,7 @@ class ScrollView extends React.Component<ScrollViewProps, State> {
|
|
|
1156
1165
|
// they are callable from the ref.
|
|
1157
1166
|
|
|
1158
1167
|
// $FlowFixMe[prop-missing] - Known issue with appending custom methods.
|
|
1168
|
+
// $FlowFixMe[unsafe-object-assign]
|
|
1159
1169
|
const publicInstance: PublicScrollViewInstance = Object.assign(
|
|
1160
1170
|
nativeInstance,
|
|
1161
1171
|
{
|
|
@@ -1901,7 +1911,7 @@ function createRefForwarder<TNativeInstance, TPublicInstance>(
|
|
|
1901
1911
|
// NOTE: This wrapper component is necessary because `ScrollView` is a class
|
|
1902
1912
|
// component and we need to map `ref` to a differently named prop. This can be
|
|
1903
1913
|
// removed when `ScrollView` is a functional component.
|
|
1904
|
-
const
|
|
1914
|
+
const ScrollViewWrapper: component(
|
|
1905
1915
|
ref?: React.RefSetter<PublicScrollViewInstance>,
|
|
1906
1916
|
...props: ScrollViewProps
|
|
1907
1917
|
) = React.forwardRef(function Wrapper(
|
|
@@ -1914,9 +1924,9 @@ const Wrapper: component(
|
|
|
1914
1924
|
<ScrollView {...props} scrollViewRef={ref} />
|
|
1915
1925
|
);
|
|
1916
1926
|
});
|
|
1917
|
-
|
|
1927
|
+
ScrollViewWrapper.displayName = 'ScrollView';
|
|
1918
1928
|
// $FlowExpectedError[prop-missing]
|
|
1919
|
-
|
|
1929
|
+
ScrollViewWrapper.Context = ScrollViewContext;
|
|
1920
1930
|
|
|
1921
|
-
export default ((
|
|
1931
|
+
export default ((ScrollViewWrapper: $FlowFixMe): typeof ScrollViewWrapper &
|
|
1922
1932
|
ScrollViewComponentStatics);
|