@office-iss/react-native-win32 0.72.7 → 0.73.0-preview.1
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 +15 -4
- package/CHANGELOG.json +523 -94
- package/CHANGELOG.md +209 -52
- package/IntegrationTests/PromiseTest.js +1 -0
- package/IntegrationTests/websocket_integration_test_server.js +1 -1
- package/Libraries/Animated/Animated.js +1 -1
- package/Libraries/Animated/AnimatedImplementation.js +1 -1
- package/Libraries/Animated/NativeAnimatedHelper.js +14 -10
- package/Libraries/Animated/NativeAnimatedHelper.win32.js +16 -12
- package/Libraries/Animated/NativeAnimatedModule.js +6 -2
- package/Libraries/Animated/NativeAnimatedTurboModule.js +7 -4
- package/Libraries/Animated/animations/Animation.js +57 -3
- package/Libraries/Animated/animations/DecayAnimation.js +9 -0
- package/Libraries/Animated/animations/SpringAnimation.js +8 -0
- package/Libraries/Animated/animations/TimingAnimation.js +8 -0
- package/Libraries/Animated/components/AnimatedFlatList.js +2 -1
- package/Libraries/Animated/components/AnimatedScrollView.js +2 -0
- package/Libraries/Animated/components/AnimatedSectionList.js +2 -1
- package/Libraries/Animated/createAnimatedComponent.js +1 -0
- package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
- package/Libraries/Animated/nodes/AnimatedObject.js +146 -0
- package/Libraries/Animated/nodes/AnimatedProps.js +19 -7
- package/Libraries/Animated/nodes/AnimatedStyle.js +29 -55
- package/Libraries/Animated/nodes/AnimatedValueXY.js +3 -17
- package/Libraries/Animated/shouldUseTurboAnimatedModule.js +17 -0
- package/Libraries/Animated/useAnimatedProps.js +9 -10
- package/Libraries/AppState/AppState.d.ts +1 -1
- package/Libraries/AppState/NativeAppState.js +8 -4
- package/Libraries/BatchedBridge/MessageQueue.js +45 -36
- package/Libraries/Blob/Blob.js +6 -2
- package/Libraries/Blob/BlobManager.js +9 -10
- package/Libraries/Blob/BlobRegistry.js +14 -9
- package/Libraries/Blob/File.js +1 -1
- package/Libraries/Blob/FileReader.js +1 -2
- package/Libraries/Components/Button/ButtonWin32.Props.d.ts +1 -1
- package/Libraries/Components/Button/ButtonWin32.Props.js.map +1 -1
- package/Libraries/Components/Button/ButtonWin32.d.ts +1 -1
- package/Libraries/Components/Button/ButtonWin32.js +1 -4
- package/Libraries/Components/Button/ButtonWin32.js.map +1 -1
- package/Libraries/Components/Clipboard/Clipboard.d.ts +4 -4
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +3 -1
- package/Libraries/Components/EnterString.win32.d.ts +1 -1
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +26 -6
- package/Libraries/Components/Pressable/Pressable.js +3 -2
- package/Libraries/Components/Pressable/Pressable.win32.js +4 -3
- package/Libraries/Components/Pressable/useAndroidRippleForView.js +1 -1
- package/Libraries/Components/SafeAreaView/SafeAreaView.js +7 -7
- package/Libraries/Components/SafeAreaView/SafeAreaView.win32.js +7 -8
- package/Libraries/Components/ScrollView/ScrollView.js +3 -1
- package/Libraries/Components/ScrollView/ScrollView.win32.js +3 -1
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +39 -46
- package/Libraries/Components/Switch/Switch.js +1 -0
- package/Libraries/Components/Text/TextWin32.d.ts +1 -1
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
- package/Libraries/Components/TextInput/TextInput.d.ts +49 -7
- package/Libraries/Components/TextInput/TextInput.flow.js +43 -10
- package/Libraries/Components/TextInput/TextInput.js +62 -10
- package/Libraries/Components/TextInput/TextInput.win32.js +953 -206
- package/Libraries/Components/TextInput/Win32TextInputNativeComponent.js +23 -0
- package/Libraries/Components/ToastAndroid/{ToastAndroid.ios.js → ToastAndroid.js} +9 -1
- package/Libraries/Components/ToastAndroid/ToastAndroid.win32.js +9 -1
- package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js +2 -2
- package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js.map +1 -1
- package/Libraries/Components/Touchable/TouchableBounce.js +1 -1
- package/Libraries/Components/Touchable/TouchableHighlight.js +1 -1
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +1 -1
- package/Libraries/Components/Touchable/TouchableOpacity.js +4 -1
- package/Libraries/Components/Touchable/TouchableWin32.d.ts +1 -1
- package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +1 -0
- package/Libraries/Components/TraceUpdateOverlay/TraceUpdateOverlay.js +16 -6
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +9 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.js +1 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +1 -0
- package/Libraries/Components/View/View.js +46 -32
- package/Libraries/Components/View/View.win32.js +37 -6
- package/Libraries/Components/View/ViewAccessibility.d.ts +8 -2
- package/Libraries/Components/View/ViewNativeComponent.js +1 -0
- package/Libraries/Components/View/ViewPropTypes.js +18 -3
- package/Libraries/Components/View/ViewPropTypes.win32.js +30 -4
- package/Libraries/Components/View/ViewWin32.js +3 -2
- package/Libraries/Core/Devtools/loadBundleFromServer.js +152 -0
- package/Libraries/Core/Devtools/symbolicateStackTrace.js +2 -1
- package/Libraries/Core/ExceptionsManager.js +16 -7
- package/Libraries/Core/ExtendedError.js +12 -0
- package/Libraries/Core/ReactNativeVersion.js +3 -3
- package/Libraries/Core/ReactNativeVersionCheck.js +0 -2
- package/Libraries/Core/ReactNativeVersionCheck.win32.js +0 -2
- package/Libraries/Core/__mocks__/NativeExceptionsManager.js +20 -0
- package/Libraries/Core/setUpDeveloperTools.js +5 -1
- package/Libraries/Core/setUpIntersectionObserver.js +16 -0
- package/Libraries/{Components/ProgressBarAndroid/ProgressBarAndroid.ios.js → Core/setUpMutationObserver.js} +6 -2
- package/Libraries/Core/setUpPerformance.js +6 -13
- package/Libraries/Core/setUpPerformanceObserver.js +16 -0
- package/Libraries/Core/setUpRegeneratorRuntime.js +4 -2
- package/Libraries/DOM/Nodes/ReactNativeElement.js +135 -18
- package/Libraries/DOM/Nodes/ReadOnlyCharacterData.js +72 -0
- package/Libraries/DOM/Nodes/ReadOnlyElement.js +209 -21
- package/Libraries/DOM/Nodes/ReadOnlyNode.js +206 -17
- package/Libraries/DOM/Nodes/ReadOnlyText.js +30 -0
- package/Libraries/DOM/Nodes/Utilities/Traversal.js +54 -0
- package/Libraries/EventEmitter/NativeEventEmitter.d.ts +0 -6
- package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +15 -4
- package/Libraries/Image/Image.android.js +8 -2
- package/Libraries/Image/Image.d.ts +1 -1
- package/Libraries/Image/Image.ios.js +4 -1
- package/Libraries/Image/Image.win32.js +6 -3
- package/Libraries/Image/ImageBackground.js +3 -0
- package/Libraries/Image/resolveAssetSource.win32.js +1 -1
- package/Libraries/Inspector/DevtoolsOverlay.js +6 -3
- package/Libraries/Inspector/NetworkOverlay.js +2 -2
- package/Libraries/Interaction/JSEventLoopWatchdog.js +1 -5
- package/Libraries/Interaction/PanResponder.js +1 -4
- package/Libraries/IntersectionObserver/IntersectionObserver.js +252 -0
- package/Libraries/IntersectionObserver/IntersectionObserverEntry.js +140 -0
- package/Libraries/IntersectionObserver/IntersectionObserverManager.js +221 -0
- package/Libraries/IntersectionObserver/NativeIntersectionObserver.js +41 -0
- package/Libraries/IntersectionObserver/__mocks__/NativeIntersectionObserver.js +162 -0
- package/Libraries/LayoutAnimation/LayoutAnimation.js +1 -1
- package/Libraries/Lists/FlatList.d.ts +2 -1
- package/Libraries/Lists/FlatList.js +15 -5
- package/Libraries/Lists/SectionList.js +4 -0
- package/Libraries/LogBox/Data/LogBoxLog.js +4 -1
- package/Libraries/LogBox/Data/LogBoxSymbolication.js +5 -2
- package/Libraries/LogBox/Data/parseLogBoxLog.js +57 -20
- package/Libraries/LogBox/UI/AnsiHighlight.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +24 -31
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +1 -1
- package/Libraries/LogBox/UI/LogBoxMessage.js +4 -7
- package/Libraries/MutationObserver/MutationObserver.js +184 -0
- package/Libraries/MutationObserver/MutationObserverManager.js +218 -0
- package/Libraries/MutationObserver/MutationRecord.js +82 -0
- package/Libraries/MutationObserver/NativeMutationObserver.js +58 -0
- package/Libraries/MutationObserver/__mocks__/NativeMutationObserver.js +327 -0
- package/Libraries/NativeComponent/BaseViewConfig.android.js +18 -3
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +33 -0
- package/Libraries/NativeComponent/BaseViewConfig.win32.js +33 -0
- package/Libraries/NativeComponent/NativeComponentRegistry.js +3 -5
- package/Libraries/NativeModules/specs/NativeSourceCode.js +6 -6
- package/Libraries/Network/RCTNetworking.android.js +2 -1
- package/Libraries/Network/XMLHttpRequest.js +1 -1
- package/Libraries/NewAppScreen/components/DebugInstructions.js +4 -4
- package/Libraries/NewAppScreen/components/LearnMoreLinks.js +9 -2
- package/Libraries/Performance/QuickPerformanceLogger.js +1 -1
- package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +1 -0
- package/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +1 -0
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +3 -1
- package/Libraries/Pressability/Pressability.js +28 -3
- package/Libraries/Pressability/Pressability.win32.js +30 -5
- package/Libraries/ReactNative/AppContainer.js +2 -3
- package/Libraries/ReactNative/AppRegistry.d.ts +0 -5
- package/Libraries/ReactNative/AppRegistry.js +66 -53
- package/Libraries/ReactNative/BridgelessUIManager.js +38 -9
- package/Libraries/ReactNative/FabricUIManager.js +143 -34
- package/Libraries/ReactNative/I18nManager.js +5 -11
- package/Libraries/ReactNative/NativeI18nManager.js +7 -5
- package/Libraries/ReactNative/PaperUIManager.win32.js +2 -2
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +151 -0
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +81 -0
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload.js +492 -0
- package/Libraries/ReactNative/ReactFabricPublicInstance/warnForStyleProps.js +32 -0
- package/Libraries/ReactNative/ReactNativeFeatureFlags.js +19 -3
- package/Libraries/ReactNative/UIManager.js +8 -0
- package/Libraries/ReactNative/__mocks__/FabricUIManager.js +648 -0
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +38 -2
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +27 -27
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +3 -3
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3 -3
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +27 -27
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3 -3
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +3 -3
- package/Libraries/Renderer/shims/ReactFabric.js +5 -6
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +2 -3
- package/Libraries/Renderer/shims/ReactNative.js +2 -3
- package/Libraries/Renderer/shims/ReactNativeTypes.js +35 -17
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +3 -3
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +2 -3
- package/Libraries/Settings/{Settings.android.js → Settings.js} +4 -4
- package/Libraries/Share/Share.d.ts +3 -9
- package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +9 -4
- package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +28 -13
- package/Libraries/StyleSheet/PlatformColorValueTypes.win32.js +14 -4
- package/Libraries/StyleSheet/PlatformColorValueTypesIOS.ios.js +1 -1
- package/Libraries/StyleSheet/PlatformColorValueTypesWin32.d.ts +1 -1
- package/Libraries/StyleSheet/StyleSheet.d.ts +10 -1
- package/Libraries/StyleSheet/StyleSheet.js +3 -0
- package/Libraries/StyleSheet/StyleSheet.win32.js +3 -0
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +31 -17
- package/Libraries/StyleSheet/StyleSheetTypes.js +90 -6
- package/Libraries/StyleSheet/flattenStyle.js +4 -0
- package/Libraries/StyleSheet/private/_TransformStyle.js +16 -2
- package/Libraries/StyleSheet/processColor.js +1 -2
- package/Libraries/StyleSheet/processTransformOrigin.js +136 -0
- package/Libraries/StyleSheet/splitLayoutProps.js +1 -0
- package/Libraries/Text/Text.d.ts +5 -5
- package/Libraries/Text/Text.js +17 -10
- package/Libraries/Text/Text.win32.js +354 -0
- package/Libraries/Text/TextProps.win32.js +281 -0
- package/Libraries/TurboModule/TurboModuleRegistry.js +47 -7
- package/Libraries/TurboModule/samples/NativeSampleTurboModule.js +6 -0
- package/Libraries/Types/CoreEventTypes.d.ts +5 -2
- package/Libraries/Utilities/GlobalPerformanceLogger.js +2 -12
- package/Libraries/Utilities/NativeDeviceInfo.js +8 -9
- package/Libraries/Utilities/NativePlatformConstantsAndroid.js +23 -18
- package/Libraries/Utilities/NativePlatformConstantsIOS.js +16 -13
- package/Libraries/Utilities/NativePlatformConstantsWin.js +13 -10
- package/Libraries/Utilities/PerformanceLoggerContext.js +1 -1
- package/Libraries/Utilities/Platform.android.js +12 -8
- package/Libraries/Utilities/Platform.d.ts +1 -0
- package/Libraries/Utilities/Platform.flow.js +84 -0
- package/Libraries/Utilities/Platform.flow.win32.js +111 -0
- package/Libraries/Utilities/Platform.ios.js +12 -8
- package/Libraries/Utilities/Platform.win32.js +12 -8
- package/Libraries/Utilities/PolyfillFunctions.js +1 -1
- package/Libraries/Utilities/ReactNativeTestTools.js +1 -2
- package/Libraries/Utilities/SceneTracker.js +1 -1
- package/Libraries/Utilities/createPerformanceLogger.js +63 -32
- package/Libraries/Utilities/useColorScheme.js +7 -8
- package/Libraries/WebPerformance/MemoryInfo.js +1 -1
- package/Libraries/WebPerformance/NativePerformance.js +3 -8
- package/Libraries/WebPerformance/NativePerformanceObserver.js +4 -0
- package/Libraries/WebPerformance/Performance.js +42 -15
- package/Libraries/WebPerformance/PerformanceEntry.js +14 -6
- package/Libraries/WebPerformance/PerformanceEventTiming.js +18 -1
- package/Libraries/WebPerformance/ReactNativeStartupTiming.js +40 -14
- package/Libraries/WebPerformance/__mocks__/NativePerformance.js +4 -2
- package/Libraries/WebPerformance/__mocks__/NativePerformanceObserver.js +21 -3
- package/Libraries/promiseRejectionTrackingOptions.js +1 -3
- package/Libraries/vendor/emitter/EventEmitter.js +17 -17
- package/flow/global.js +1 -3
- package/flow/jest.js +5 -1
- package/{Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.ios.js → jest/ReactNativeInternalFeatureFlagsMock.js} +2 -1
- package/jest/__tests__/setup-test.js +18 -0
- package/jest/mockModal.js +6 -4
- package/jest/setup.js +61 -30
- package/jest.config.js +1 -1
- package/just-task.js +1 -0
- package/overrides.json +51 -46
- package/package.json +35 -33
- package/src/Libraries/Components/Button/ButtonWin32.Props.ts +1 -1
- package/src/Libraries/Components/Button/ButtonWin32.tsx +0 -2
- package/src/Libraries/Components/Touchable/Tests/TouchableWin32Test.tsx +2 -2
- package/src/Libraries/Components/Touchable/TouchableWin32.tsx +1 -1
- package/src/Libraries/Components/View/ViewAccessibility.d.ts +8 -2
- package/src/Libraries/StyleSheet/PlatformColorValueTypesWin32.d.ts +1 -1
- package/types/experimental.d.ts +44 -0
- package/types/index.d.ts +2 -1
- package/types/modules/Devtools.d.ts +1 -0
- package/types/modules/globals.d.ts +16 -1
- package/IntegrationTests/BUCK +0 -32
- package/IntegrationTests/PropertiesUpdateTest.js +0 -29
- package/IntegrationTests/RCTRootViewIntegrationTestApp.js +0 -86
- package/IntegrationTests/ReactContentSizeUpdateTest.js +0 -89
- package/IntegrationTests/SizeFlexibilityUpdateTest.js +0 -106
- package/Libraries/Components/TextInput/TextInput.Types.win32.d.ts +0 -51
- package/Libraries/Components/TextInput/TextInput.Types.win32.js +0 -3
- package/Libraries/Components/TextInput/TextInput.Types.win32.js.map +0 -1
- package/Libraries/Utilities/AcessibilityMapping.js +0 -154
- package/Libraries/Utilities/AcessibilityMapping.win32.js +0 -156
- package/Libraries/Utilities/NativeDevSplitBundleLoader.js +0 -19
- package/Libraries/Utilities/useColorScheme.win32.js +0 -26
- package/flow/use-sync-external-store.js +0 -20
- package/flow-typed/npm/base64-js_v1.x.x.js +0 -12
- package/flow-typed/npm/glob_v7.x.x.js +0 -79
- package/flow-typed/npm/pretty-format_v26.x.x.js +0 -49
- package/flow-typed/npm/promise_v8.x.x.js +0 -30
- package/flow-typed/npm/react-dom_v17.x.x.js +0 -139
- package/flow-typed/npm/react-test-renderer_v16.x.x.js +0 -79
- package/flow-typed/npm/stacktrace-parser_v0.1.x.js +0 -17
- package/flow-typed/npm/yargs_v17.x.x.js +0 -341
- package/src/Libraries/Components/TextInput/TextInput.Types.win32.ts +0 -68
- /package/Libraries/{Renderer/public → ReactNative/ReactFabricPublicInstance}/ReactFabricPublicInstanceUtils.js +0 -0
package/IntegrationTests/BUCK
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
load("@fbsource//tools/build_defs:js_library_glob.bzl", "js_library_glob")
|
|
2
|
-
load("@fbsource//tools/build_defs/oss:metro_defs.bzl", "rn_library")
|
|
3
|
-
|
|
4
|
-
# This file was generated by running
|
|
5
|
-
# js1 build buckfiles
|
|
6
|
-
|
|
7
|
-
rn_library(
|
|
8
|
-
name = "IntegrationTests",
|
|
9
|
-
srcs = js_library_glob(
|
|
10
|
-
[
|
|
11
|
-
"**/*",
|
|
12
|
-
],
|
|
13
|
-
excludes = [
|
|
14
|
-
"**/__*__/**",
|
|
15
|
-
"**/*.command",
|
|
16
|
-
"**/*.md",
|
|
17
|
-
"websocket_integration_test_server.js",
|
|
18
|
-
],
|
|
19
|
-
),
|
|
20
|
-
labels = [
|
|
21
|
-
"pfh:ReactNative_CommonInfrastructurePlaceholder",
|
|
22
|
-
],
|
|
23
|
-
skip_processors = True,
|
|
24
|
-
visibility = ["PUBLIC"],
|
|
25
|
-
deps = [
|
|
26
|
-
"//xplat/js:node_modules__invariant",
|
|
27
|
-
"//xplat/js:node_modules__nullthrows",
|
|
28
|
-
"//xplat/js/RKJSModules/vendor/react:react",
|
|
29
|
-
"//xplat/js/react-native-github:react-native",
|
|
30
|
-
"//xplat/js/react-native-github/packages/assets:assets",
|
|
31
|
-
],
|
|
32
|
-
)
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and 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
|
-
* @format
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
'use strict';
|
|
11
|
-
|
|
12
|
-
const React = require('react');
|
|
13
|
-
const ReactNative = require('react-native');
|
|
14
|
-
const {View} = ReactNative;
|
|
15
|
-
|
|
16
|
-
const {TestModule} = ReactNative.NativeModules;
|
|
17
|
-
|
|
18
|
-
class PropertiesUpdateTest extends React.Component {
|
|
19
|
-
render() {
|
|
20
|
-
if (this.props.markTestPassed) {
|
|
21
|
-
TestModule.markTestPassed(true);
|
|
22
|
-
}
|
|
23
|
-
return <View />;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
PropertiesUpdateTest.displayName = 'PropertiesUpdateTest';
|
|
28
|
-
|
|
29
|
-
module.exports = PropertiesUpdateTest;
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and 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
|
-
* @format
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
'use strict';
|
|
11
|
-
|
|
12
|
-
const React = require('react');
|
|
13
|
-
const ReactNative = require('react-native');
|
|
14
|
-
|
|
15
|
-
const {AppRegistry, ScrollView, StyleSheet, Text, TouchableOpacity, View} =
|
|
16
|
-
ReactNative;
|
|
17
|
-
|
|
18
|
-
/* Keep this list in sync with RCTRootViewIntegrationTests.m */
|
|
19
|
-
const TESTS = [
|
|
20
|
-
require('./PropertiesUpdateTest'),
|
|
21
|
-
require('./ReactContentSizeUpdateTest'),
|
|
22
|
-
require('./SizeFlexibilityUpdateTest'),
|
|
23
|
-
];
|
|
24
|
-
|
|
25
|
-
TESTS.forEach(test =>
|
|
26
|
-
AppRegistry.registerComponent(test.displayName, () => test),
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
class RCTRootViewIntegrationTestApp extends React.Component {
|
|
30
|
-
state = {
|
|
31
|
-
test: null,
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
render() {
|
|
35
|
-
if (this.state.test) {
|
|
36
|
-
return (
|
|
37
|
-
<ScrollView>
|
|
38
|
-
<this.state.test />
|
|
39
|
-
</ScrollView>
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
return (
|
|
43
|
-
<View style={styles.container}>
|
|
44
|
-
<Text style={styles.row}>
|
|
45
|
-
Click on a test to run it in this shell for easier debugging and
|
|
46
|
-
development. Run all tests in the testing environment with cmd+U in
|
|
47
|
-
Xcode.
|
|
48
|
-
</Text>
|
|
49
|
-
<View style={styles.separator} />
|
|
50
|
-
<ScrollView>
|
|
51
|
-
{TESTS.map(test => [
|
|
52
|
-
<TouchableOpacity
|
|
53
|
-
onPress={() => this.setState({test})}
|
|
54
|
-
style={styles.row}>
|
|
55
|
-
<Text style={styles.testName}>{test.displayName}</Text>
|
|
56
|
-
</TouchableOpacity>,
|
|
57
|
-
<View style={styles.separator} />,
|
|
58
|
-
])}
|
|
59
|
-
</ScrollView>
|
|
60
|
-
</View>
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const styles = StyleSheet.create({
|
|
66
|
-
container: {
|
|
67
|
-
backgroundColor: 'white',
|
|
68
|
-
marginTop: 40,
|
|
69
|
-
margin: 15,
|
|
70
|
-
},
|
|
71
|
-
row: {
|
|
72
|
-
padding: 10,
|
|
73
|
-
},
|
|
74
|
-
testName: {
|
|
75
|
-
fontWeight: '500',
|
|
76
|
-
},
|
|
77
|
-
separator: {
|
|
78
|
-
height: 1,
|
|
79
|
-
backgroundColor: '#bbbbbb',
|
|
80
|
-
},
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
AppRegistry.registerComponent(
|
|
84
|
-
'RCTRootViewIntegrationTestApp',
|
|
85
|
-
() => RCTRootViewIntegrationTestApp,
|
|
86
|
-
);
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and 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
|
-
* @format
|
|
8
|
-
* @flow strict-local
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
const RCTNativeAppEventEmitter = require('react-native/Libraries/EventEmitter/RCTNativeAppEventEmitter');
|
|
12
|
-
const React = require('react');
|
|
13
|
-
const ReactNative = require('react-native');
|
|
14
|
-
|
|
15
|
-
const {View} = ReactNative;
|
|
16
|
-
|
|
17
|
-
const {TestModule} = ReactNative.NativeModules;
|
|
18
|
-
import {type EventSubscription} from 'react-native/Libraries/vendor/emitter/EventEmitter';
|
|
19
|
-
|
|
20
|
-
const reactViewWidth = 101;
|
|
21
|
-
const reactViewHeight = 102;
|
|
22
|
-
const newReactViewWidth = 201;
|
|
23
|
-
const newReactViewHeight = 202;
|
|
24
|
-
|
|
25
|
-
type Props = {||};
|
|
26
|
-
|
|
27
|
-
type State = {|
|
|
28
|
-
height: number,
|
|
29
|
-
width: number,
|
|
30
|
-
|};
|
|
31
|
-
|
|
32
|
-
class ReactContentSizeUpdateTest extends React.Component<Props, State> {
|
|
33
|
-
_timeoutID: ?TimeoutID = null;
|
|
34
|
-
_subscription: ?EventSubscription = null;
|
|
35
|
-
|
|
36
|
-
state: State = {
|
|
37
|
-
height: reactViewHeight,
|
|
38
|
-
width: reactViewWidth,
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
UNSAFE_componentWillMount() {
|
|
42
|
-
this._subscription = RCTNativeAppEventEmitter.addListener(
|
|
43
|
-
'rootViewDidChangeIntrinsicSize',
|
|
44
|
-
this.rootViewDidChangeIntrinsicSize,
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
componentDidMount() {
|
|
49
|
-
this._timeoutID = setTimeout(() => {
|
|
50
|
-
this.updateViewSize();
|
|
51
|
-
}, 1000);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
componentWillUnmount() {
|
|
55
|
-
if (this._timeoutID != null) {
|
|
56
|
-
clearTimeout(this._timeoutID);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
if (this._subscription != null) {
|
|
60
|
-
this._subscription.remove();
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
updateViewSize() {
|
|
65
|
-
this.setState({
|
|
66
|
-
height: newReactViewHeight,
|
|
67
|
-
width: newReactViewWidth,
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
rootViewDidChangeIntrinsicSize: (intrinsicSize: State) => void = (
|
|
72
|
-
intrinsicSize: State,
|
|
73
|
-
) => {
|
|
74
|
-
if (
|
|
75
|
-
intrinsicSize.height === newReactViewHeight &&
|
|
76
|
-
intrinsicSize.width === newReactViewWidth
|
|
77
|
-
) {
|
|
78
|
-
TestModule.markTestPassed(true);
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
render(): React.Node {
|
|
83
|
-
return (
|
|
84
|
-
<View style={{height: this.state.height, width: this.state.width}} />
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
module.exports = ReactContentSizeUpdateTest;
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and 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
|
-
* @format
|
|
8
|
-
* @flow strict-local
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
const RCTNativeAppEventEmitter = require('react-native/Libraries/EventEmitter/RCTNativeAppEventEmitter');
|
|
12
|
-
const React = require('react');
|
|
13
|
-
const ReactNative = require('react-native');
|
|
14
|
-
const {View} = ReactNative;
|
|
15
|
-
|
|
16
|
-
const {TestModule} = ReactNative.NativeModules;
|
|
17
|
-
import {type EventSubscription} from 'react-native/Libraries/vendor/emitter/EventEmitter';
|
|
18
|
-
|
|
19
|
-
const reactViewWidth = 111;
|
|
20
|
-
const reactViewHeight = 222;
|
|
21
|
-
|
|
22
|
-
let finalState = false;
|
|
23
|
-
|
|
24
|
-
type Props = $ReadOnly<{|
|
|
25
|
-
width: boolean,
|
|
26
|
-
height: boolean,
|
|
27
|
-
both: boolean,
|
|
28
|
-
none: boolean,
|
|
29
|
-
|}>;
|
|
30
|
-
|
|
31
|
-
class SizeFlexibilityUpdateTest extends React.Component<Props> {
|
|
32
|
-
_subscription: ?EventSubscription = null;
|
|
33
|
-
|
|
34
|
-
UNSAFE_componentWillMount() {
|
|
35
|
-
this._subscription = RCTNativeAppEventEmitter.addListener(
|
|
36
|
-
'rootViewDidChangeIntrinsicSize',
|
|
37
|
-
this.rootViewDidChangeIntrinsicSize,
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
componentWillUnmount() {
|
|
42
|
-
if (this._subscription != null) {
|
|
43
|
-
this._subscription.remove();
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
markPassed: () => void = () => {
|
|
48
|
-
TestModule.markTestPassed(true);
|
|
49
|
-
finalState = true;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
rootViewDidChangeIntrinsicSize: (intrinsicSize: {
|
|
53
|
-
height: number,
|
|
54
|
-
width: number,
|
|
55
|
-
...
|
|
56
|
-
}) => void = (intrinsicSize: {width: number, height: number, ...}) => {
|
|
57
|
-
if (finalState) {
|
|
58
|
-
// If a test reaches its final state, it is not expected to do anything more
|
|
59
|
-
TestModule.markTestPassed(false);
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
if (this.props.both) {
|
|
64
|
-
if (
|
|
65
|
-
intrinsicSize.width === reactViewWidth &&
|
|
66
|
-
intrinsicSize.height === reactViewHeight
|
|
67
|
-
) {
|
|
68
|
-
this.markPassed();
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
if (this.props.height) {
|
|
73
|
-
if (
|
|
74
|
-
intrinsicSize.width !== reactViewWidth &&
|
|
75
|
-
intrinsicSize.height === reactViewHeight
|
|
76
|
-
) {
|
|
77
|
-
this.markPassed();
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
if (this.props.width) {
|
|
82
|
-
if (
|
|
83
|
-
intrinsicSize.width === reactViewWidth &&
|
|
84
|
-
intrinsicSize.height !== reactViewHeight
|
|
85
|
-
) {
|
|
86
|
-
this.markPassed();
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
if (this.props.none) {
|
|
91
|
-
if (
|
|
92
|
-
intrinsicSize.width !== reactViewWidth &&
|
|
93
|
-
intrinsicSize.height !== reactViewHeight
|
|
94
|
-
) {
|
|
95
|
-
this.markPassed();
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
render(): React.Node {
|
|
102
|
-
return <View style={{height: reactViewHeight, width: reactViewWidth}} />;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
module.exports = SizeFlexibilityUpdateTest;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { NativeSyntheticEvent, TextInputFocusEventData } from 'react-native';
|
|
2
|
-
interface IChangePayload {
|
|
3
|
-
eventCount: number;
|
|
4
|
-
target: number;
|
|
5
|
-
text: string;
|
|
6
|
-
}
|
|
7
|
-
export type IChangeEvent = NativeSyntheticEvent<Readonly<IChangePayload>>;
|
|
8
|
-
interface IRange {
|
|
9
|
-
start: number;
|
|
10
|
-
end: number;
|
|
11
|
-
}
|
|
12
|
-
interface ITextInputPayload {
|
|
13
|
-
eventCount: number;
|
|
14
|
-
previousText: string;
|
|
15
|
-
range: Readonly<IRange>;
|
|
16
|
-
target: number;
|
|
17
|
-
text: number;
|
|
18
|
-
}
|
|
19
|
-
export type ITextInputevent = NativeSyntheticEvent<Readonly<ITextInputPayload>>;
|
|
20
|
-
interface IContentSize {
|
|
21
|
-
width: number;
|
|
22
|
-
height: number;
|
|
23
|
-
}
|
|
24
|
-
interface IContentSizeChangePayload {
|
|
25
|
-
target: number;
|
|
26
|
-
contentSize: Readonly<IContentSize>;
|
|
27
|
-
}
|
|
28
|
-
export type IContentSizeChangeEvent = NativeSyntheticEvent<Readonly<IContentSizeChangePayload>>;
|
|
29
|
-
export type IBlurEvent = NativeSyntheticEvent<Readonly<TextInputFocusEventData>>;
|
|
30
|
-
export type IFocusEvent = NativeSyntheticEvent<Readonly<TextInputFocusEventData>>;
|
|
31
|
-
export interface ISelection extends IRange {
|
|
32
|
-
}
|
|
33
|
-
interface ISelectionPayload {
|
|
34
|
-
selection: ISelection;
|
|
35
|
-
target: number;
|
|
36
|
-
}
|
|
37
|
-
export type ISelectionChangeEvent = NativeSyntheticEvent<Readonly<ISelectionPayload>>;
|
|
38
|
-
interface IKeyPressPayload {
|
|
39
|
-
key: string;
|
|
40
|
-
target?: number;
|
|
41
|
-
eventCount?: number;
|
|
42
|
-
}
|
|
43
|
-
export type IKeyPressEvent = NativeSyntheticEvent<Readonly<IKeyPressPayload>>;
|
|
44
|
-
interface IEditingPayload {
|
|
45
|
-
eventCount: number;
|
|
46
|
-
text: string;
|
|
47
|
-
target: number;
|
|
48
|
-
}
|
|
49
|
-
export type IEditingEvent = NativeSyntheticEvent<Readonly<IEditingPayload>>;
|
|
50
|
-
export type IPasswordRules = string;
|
|
51
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.Types.win32.js","sourceRoot":"","sources":["../../../src/Libraries/Components/TextInput/TextInput.Types.win32.ts"],"names":[],"mappings":"","sourcesContent":["import { NativeSyntheticEvent, TextInputFocusEventData } from 'react-native';\n\n// TODO: How do we keep in sync with synthetic events\n\ninterface IChangePayload {\n eventCount: number;\n target: number;\n text: string;\n}\nexport type IChangeEvent = NativeSyntheticEvent<Readonly<IChangePayload>>;\n\ninterface IRange {\n start: number;\n end: number;\n}\ninterface ITextInputPayload {\n eventCount: number;\n previousText: string;\n range: Readonly<IRange>;\n target: number;\n text: number;\n}\nexport type ITextInputevent = NativeSyntheticEvent<Readonly<ITextInputPayload>>;\n\ninterface IContentSize {\n width: number;\n height: number;\n}\ninterface IContentSizeChangePayload {\n target: number;\n contentSize: Readonly<IContentSize>;\n}\nexport type IContentSizeChangeEvent = NativeSyntheticEvent<Readonly<IContentSizeChangePayload>>;\n\n// TODO: Why doesn't this guy work\n// interface ITargetPayload {\n// target: number;\n// }\n\n// type ITargetEvent = NativeSyntheticEvent<Readonly<ITargetPayload>>;\n\nexport type IBlurEvent = NativeSyntheticEvent<Readonly<TextInputFocusEventData>>;\nexport type IFocusEvent = NativeSyntheticEvent<Readonly<TextInputFocusEventData>>;\n\nexport interface ISelection extends IRange { }\ninterface ISelectionPayload {\n selection: ISelection;\n target: number;\n}\nexport type ISelectionChangeEvent = NativeSyntheticEvent<Readonly<ISelectionPayload>>;\n\n// TODO: Why is this one diffferent?\ninterface IKeyPressPayload {\n key: string;\n target?: number;\n eventCount?: number;\n}\nexport type IKeyPressEvent = NativeSyntheticEvent<Readonly<IKeyPressPayload>>;\n\ninterface IEditingPayload {\n eventCount: number;\n text: string;\n target: number;\n}\nexport type IEditingEvent = NativeSyntheticEvent<Readonly<IEditingPayload>>;\n\n// TODO: Why do I need this one\nexport type IPasswordRules = string;\n"]}
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and 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
|
-
* @flow strict-local
|
|
8
|
-
* @format
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
'use strict';
|
|
12
|
-
|
|
13
|
-
import type {
|
|
14
|
-
AccessibilityRole,
|
|
15
|
-
Role,
|
|
16
|
-
} from '../Components/View/ViewAccessibility';
|
|
17
|
-
|
|
18
|
-
// Map role values to AccessibilityRole values
|
|
19
|
-
export function getAccessibilityRoleFromRole(role: Role): ?AccessibilityRole {
|
|
20
|
-
switch (role) {
|
|
21
|
-
case 'alert':
|
|
22
|
-
return 'alert';
|
|
23
|
-
case 'alertdialog':
|
|
24
|
-
return undefined;
|
|
25
|
-
case 'application':
|
|
26
|
-
return undefined;
|
|
27
|
-
case 'article':
|
|
28
|
-
return undefined;
|
|
29
|
-
case 'banner':
|
|
30
|
-
return undefined;
|
|
31
|
-
case 'button':
|
|
32
|
-
return 'button';
|
|
33
|
-
case 'cell':
|
|
34
|
-
return undefined;
|
|
35
|
-
case 'checkbox':
|
|
36
|
-
return 'checkbox';
|
|
37
|
-
case 'columnheader':
|
|
38
|
-
return undefined;
|
|
39
|
-
case 'combobox':
|
|
40
|
-
return 'combobox';
|
|
41
|
-
case 'complementary':
|
|
42
|
-
return undefined;
|
|
43
|
-
case 'contentinfo':
|
|
44
|
-
return undefined;
|
|
45
|
-
case 'definition':
|
|
46
|
-
return undefined;
|
|
47
|
-
case 'dialog':
|
|
48
|
-
return undefined;
|
|
49
|
-
case 'directory':
|
|
50
|
-
return undefined;
|
|
51
|
-
case 'document':
|
|
52
|
-
return undefined;
|
|
53
|
-
case 'feed':
|
|
54
|
-
return undefined;
|
|
55
|
-
case 'figure':
|
|
56
|
-
return undefined;
|
|
57
|
-
case 'form':
|
|
58
|
-
return undefined;
|
|
59
|
-
case 'grid':
|
|
60
|
-
return 'grid';
|
|
61
|
-
case 'group':
|
|
62
|
-
return undefined;
|
|
63
|
-
case 'heading':
|
|
64
|
-
return 'header';
|
|
65
|
-
case 'img':
|
|
66
|
-
return 'image';
|
|
67
|
-
case 'link':
|
|
68
|
-
return 'link';
|
|
69
|
-
case 'list':
|
|
70
|
-
return 'list';
|
|
71
|
-
case 'listitem':
|
|
72
|
-
return undefined;
|
|
73
|
-
case 'log':
|
|
74
|
-
return undefined;
|
|
75
|
-
case 'main':
|
|
76
|
-
return undefined;
|
|
77
|
-
case 'marquee':
|
|
78
|
-
return undefined;
|
|
79
|
-
case 'math':
|
|
80
|
-
return undefined;
|
|
81
|
-
case 'menu':
|
|
82
|
-
return 'menu';
|
|
83
|
-
case 'menubar':
|
|
84
|
-
return 'menubar';
|
|
85
|
-
case 'menuitem':
|
|
86
|
-
return 'menuitem';
|
|
87
|
-
case 'meter':
|
|
88
|
-
return undefined;
|
|
89
|
-
case 'navigation':
|
|
90
|
-
return undefined;
|
|
91
|
-
case 'none':
|
|
92
|
-
return 'none';
|
|
93
|
-
case 'note':
|
|
94
|
-
return undefined;
|
|
95
|
-
case 'option':
|
|
96
|
-
return undefined;
|
|
97
|
-
case 'presentation':
|
|
98
|
-
return 'none';
|
|
99
|
-
case 'progressbar':
|
|
100
|
-
return 'progressbar';
|
|
101
|
-
case 'radio':
|
|
102
|
-
return 'radio';
|
|
103
|
-
case 'radiogroup':
|
|
104
|
-
return 'radiogroup';
|
|
105
|
-
case 'region':
|
|
106
|
-
return undefined;
|
|
107
|
-
case 'row':
|
|
108
|
-
return undefined;
|
|
109
|
-
case 'rowgroup':
|
|
110
|
-
return undefined;
|
|
111
|
-
case 'rowheader':
|
|
112
|
-
return undefined;
|
|
113
|
-
case 'scrollbar':
|
|
114
|
-
return 'scrollbar';
|
|
115
|
-
case 'searchbox':
|
|
116
|
-
return 'search';
|
|
117
|
-
case 'separator':
|
|
118
|
-
return undefined;
|
|
119
|
-
case 'slider':
|
|
120
|
-
return 'adjustable';
|
|
121
|
-
case 'spinbutton':
|
|
122
|
-
return 'spinbutton';
|
|
123
|
-
case 'status':
|
|
124
|
-
return undefined;
|
|
125
|
-
case 'summary':
|
|
126
|
-
return 'summary';
|
|
127
|
-
case 'switch':
|
|
128
|
-
return 'switch';
|
|
129
|
-
case 'tab':
|
|
130
|
-
return 'tab';
|
|
131
|
-
case 'table':
|
|
132
|
-
return undefined;
|
|
133
|
-
case 'tablist':
|
|
134
|
-
return 'tablist';
|
|
135
|
-
case 'tabpanel':
|
|
136
|
-
return undefined;
|
|
137
|
-
case 'term':
|
|
138
|
-
return undefined;
|
|
139
|
-
case 'timer':
|
|
140
|
-
return 'timer';
|
|
141
|
-
case 'toolbar':
|
|
142
|
-
return 'toolbar';
|
|
143
|
-
case 'tooltip':
|
|
144
|
-
return undefined;
|
|
145
|
-
case 'tree':
|
|
146
|
-
return undefined;
|
|
147
|
-
case 'treegrid':
|
|
148
|
-
return undefined;
|
|
149
|
-
case 'treeitem':
|
|
150
|
-
return undefined;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
return undefined;
|
|
154
|
-
}
|