@office-iss/react-native-win32 0.0.0-canary.291 → 0.0.0-canary.293
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 +1 -1
- package/CHANGELOG.json +43 -1
- package/CHANGELOG.md +22 -4
- package/Libraries/Alert/RCTAlertManager.js +17 -0
- package/Libraries/Animated/AnimatedEvent.js +4 -3
- package/Libraries/Animated/AnimatedExports.js.flow +2 -0
- package/Libraries/Animated/AnimatedImplementation.js +2 -2
- package/Libraries/Animated/components/AnimatedScrollView.js +48 -43
- package/Libraries/Animated/nodes/AnimatedValue.js +2 -1
- package/Libraries/BatchedBridge/MessageQueue.js +2 -2
- package/Libraries/Blob/FileReader.js +219 -8
- package/Libraries/Blob/URL.js +13 -1
- package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.js +17 -0
- package/Libraries/Components/Button.js +1 -1
- package/Libraries/Components/Button.win32.js +1 -1
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -3
- package/Libraries/{Utilities/__mocks__/GlobalPerformanceLogger.js → Components/DrawerAndroid/DrawerLayoutAndroid.ios.js} +3 -4
- 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/Keyboard/Keyboard.js +4 -2
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +6 -3
- package/Libraries/Components/Pressable/Pressable.js +6 -1
- package/Libraries/Components/Pressable/Pressable.win32.js +6 -1
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +12 -2
- package/Libraries/Components/RefreshControl/RefreshControl.js +1 -1
- package/Libraries/Components/ScrollView/ScrollView.d.ts +1 -1
- package/Libraries/Components/ScrollView/ScrollView.js +128 -116
- package/Libraries/Components/StaticRenderer.js +1 -1
- package/Libraries/Components/Switch/Switch.js +7 -3
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +2 -1
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +2 -4
- package/Libraries/Components/TextInput/TextInput.flow.js +59 -42
- package/Libraries/Components/TextInput/TextInput.flow.win32.js +1208 -0
- package/Libraries/Components/TextInput/TextInput.js +67 -1005
- package/Libraries/Components/TextInput/TextInput.win32.js +69 -1037
- package/Libraries/{Blob/__mocks__/BlobModule.js → Components/ToastAndroid/ToastAndroid.ios.js} +3 -6
- package/Libraries/Components/ToastAndroid/ToastAndroid.js +4 -32
- package/Libraries/Components/ToastAndroid/ToastAndroid.js.flow +109 -0
- package/Libraries/Components/ToastAndroid/ToastAndroid.win32.js +4 -32
- package/Libraries/Components/ToastAndroid/ToastAndroidFallback.js +45 -0
- package/Libraries/Components/Touchable/Touchable.js +5 -5
- package/Libraries/Components/Touchable/Touchable.win32.js +5 -5
- package/Libraries/Components/Touchable/TouchableBounce.js +12 -6
- package/Libraries/Components/Touchable/TouchableHighlight.js +9 -6
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +4 -4
- package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +4 -4
- package/Libraries/Components/Touchable/TouchableOpacity.js +11 -5
- package/Libraries/Components/View/View.js +18 -21
- package/Libraries/Components/View/View.win32.js +21 -24
- package/Libraries/Components/View/ViewAccessibility.js +7 -0
- package/Libraries/Components/View/ViewAccessibility.win32.js +7 -0
- package/Libraries/Components/View/ViewPropTypes.js +1 -1
- package/Libraries/Components/View/ViewPropTypes.win32.js +1 -1
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/setUpReactDevTools.js +5 -5
- package/Libraries/EventEmitter/NativeEventEmitter.js +4 -1
- package/Libraries/Image/Image.js +17 -0
- package/Libraries/Image/Image.js.flow +2 -2
- package/Libraries/Image/ImageInjection.js +1 -1
- package/Libraries/Image/ImageProps.js +5 -5
- package/Libraries/Image/ImageSource.js +3 -1
- package/Libraries/Image/ImageSourceUtils.js +4 -2
- package/Libraries/Image/ImageTypes.flow.js +1 -1
- package/Libraries/Lists/FlatList.d.ts +2 -2
- package/Libraries/Lists/FlatList.js +1 -1
- package/Libraries/Lists/SectionList.js +1 -1
- package/Libraries/Lists/SectionListModern.js +3 -3
- package/Libraries/LogBox/Data/LogBoxData.js +1 -1
- package/Libraries/LogBox/LogBoxNotificationContainer.js +1 -1
- package/Libraries/Modal/Modal.js +3 -3
- package/Libraries/NativeComponent/BaseViewConfig.js +17 -0
- package/Libraries/NativeComponent/PlatformBaseViewConfig.js +2 -2
- package/Libraries/NativeModules/specs/NativeDevMenu.js +2 -2
- package/Libraries/Network/RCTNetworking.js +17 -0
- package/Libraries/Network/XMLHttpRequest.js +781 -10
- package/Libraries/NewAppScreen/components/DebugInstructions.js +1 -1
- package/Libraries/NewAppScreen/components/Header.js +1 -1
- package/Libraries/NewAppScreen/components/HermesBadge.js +1 -1
- package/Libraries/NewAppScreen/components/LearnMoreLinks.js +3 -3
- package/Libraries/NewAppScreen/components/ReloadInstructions.js +1 -1
- package/Libraries/Performance/Systrace.js +7 -7
- package/Libraries/ReactNative/AppContainer-dev.js +3 -2
- package/Libraries/ReactNative/RendererImplementation.js +6 -5
- package/Libraries/ReactNative/renderApplication.js +9 -0
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +2 -2
- 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/ReactFabric.js +3 -1
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +3 -1
- package/Libraries/Renderer/shims/ReactNative.js +3 -1
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +3 -1
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +3 -1
- package/Libraries/Settings/Settings.js +13 -19
- package/Libraries/Settings/Settings.win32.js +19 -20
- package/Libraries/Settings/SettingsFallback.js +33 -0
- package/Libraries/StyleSheet/PlatformColorValueTypes.js +15 -0
- package/Libraries/StyleSheet/Rect.js +1 -0
- package/Libraries/StyleSheet/StyleSheet.js.flow +3 -3
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -1
- package/Libraries/StyleSheet/StyleSheetTypes.js +75 -33
- package/Libraries/StyleSheet/flattenStyle.js +7 -1
- package/Libraries/StyleSheet/processBackgroundImage.js +670 -214
- package/Libraries/Text/Text.js +3 -3
- package/Libraries/Text/Text.win32.js +3 -3
- package/Libraries/Text/TextNativeComponent.js +0 -4
- package/Libraries/Text/TextNativeComponent.win32.js +0 -4
- package/Libraries/Text/TextProps.js +1 -1
- package/Libraries/Text/TextProps.win32.js +1 -1
- package/Libraries/Utilities/Appearance.js +2 -0
- package/Libraries/Utilities/BackHandler.js +17 -0
- package/Libraries/Utilities/Platform.js +17 -0
- package/Libraries/Utilities/PlatformTypes.js +2 -0
- package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
- package/Libraries/WebSocket/WebSocket.js +313 -8
- package/flow/global.js +0 -2
- package/index.js +1 -288
- package/index.win32.js +8 -297
- package/overrides.json +29 -23
- package/package.json +16 -16
- package/src/private/animated/NativeAnimatedHelper.js +1 -1
- package/src/private/animated/NativeAnimatedHelper.win32.js +1 -1
- package/src/private/animated/createAnimatedPropsHook.js +2 -27
- 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 +2 -2
- 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.win32.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 +37 -43
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +8 -8
- package/src/private/renderer/errorhandling/ErrorHandlers.js +2 -2
- package/src/private/specs_DEPRECATED/modules/NativeSampleTurboModule.js +3 -0
- package/src/private/types/HostComponent.js +1 -1
- package/src/private/types/HostInstance.js +12 -4
- package/src/private/webapis/performance/Performance.js +1 -3
- package/types/index.d.ts +1 -1
- 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/StyleSheet/__flowtests__/StyleSheet-flowtest.js +0 -58
- package/Libraries/Utilities/__mocks__/BackHandler.js +0 -45
- 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/webapis/performance/specs/__mocks__/NativePerformanceMock.js +0 -267
- package/src/types/third_party/event-target-shim.d.ts +0 -392
- /package/src/private/{devmenu → devsupport/devmenu}/DevMenu.d.ts +0 -0
- /package/src/private/{debugging → devsupport/rndevtools}/FuseboxSessionObserver.js +0 -0
|
@@ -5,73 +5,13 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
* @format
|
|
8
|
-
* @flow
|
|
8
|
+
* @flow
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
// NOTE: This file supports backwards compatibility of subpath (deep) imports
|
|
12
|
+
// from 'react-native' with platform-specific extensions. It can be deleted
|
|
13
|
+
// once we remove the "./*" mapping from package.json "exports".
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
import type {
|
|
15
|
-
MeasureInWindowOnSuccessCallback,
|
|
16
|
-
MeasureLayoutOnSuccessCallback,
|
|
17
|
-
MeasureOnSuccessCallback,
|
|
18
|
-
} from '../../../src/private/types/HostInstance';
|
|
19
|
-
import type {
|
|
20
|
-
DrawerLayoutAndroidMethods,
|
|
21
|
-
DrawerLayoutAndroidProps,
|
|
22
|
-
DrawerLayoutAndroidState,
|
|
23
|
-
} from './DrawerLayoutAndroidTypes';
|
|
15
|
+
import DrawerLayoutAndroid from './DrawerLayoutAndroid';
|
|
24
16
|
|
|
25
|
-
|
|
26
|
-
import * as React from 'react';
|
|
27
|
-
|
|
28
|
-
export type {
|
|
29
|
-
DrawerLayoutAndroidProps,
|
|
30
|
-
DrawerSlideEvent,
|
|
31
|
-
} from './DrawerLayoutAndroidTypes';
|
|
32
|
-
|
|
33
|
-
export default class DrawerLayoutAndroid
|
|
34
|
-
extends React.Component<DrawerLayoutAndroidProps, DrawerLayoutAndroidState>
|
|
35
|
-
implements DrawerLayoutAndroidMethods
|
|
36
|
-
{
|
|
37
|
-
render(): React.Node {
|
|
38
|
-
return <UnimplementedView {...this.props} />;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
openDrawer(): void {
|
|
42
|
-
throw new Error('DrawerLayoutAndroid is only available on Android');
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
closeDrawer(): void {
|
|
46
|
-
throw new Error('DrawerLayoutAndroid is only available on Android');
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
blur(): void {
|
|
50
|
-
throw new Error('DrawerLayoutAndroid is only available on Android');
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
focus(): void {
|
|
54
|
-
throw new Error('DrawerLayoutAndroid is only available on Android');
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
measure(callback: MeasureOnSuccessCallback): void {
|
|
58
|
-
throw new Error('DrawerLayoutAndroid is only available on Android');
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
measureInWindow(callback: MeasureInWindowOnSuccessCallback): void {
|
|
62
|
-
throw new Error('DrawerLayoutAndroid is only available on Android');
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
measureLayout(
|
|
66
|
-
relativeToNativeNode: number,
|
|
67
|
-
onSuccess: MeasureLayoutOnSuccessCallback,
|
|
68
|
-
onFail?: () => void,
|
|
69
|
-
): void {
|
|
70
|
-
throw new Error('DrawerLayoutAndroid is only available on Android');
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// $FlowFixMe[unclear-type]
|
|
74
|
-
setNativeProps(nativeProps: Object): void {
|
|
75
|
-
throw new Error('DrawerLayoutAndroid is only available on Android');
|
|
76
|
-
}
|
|
77
|
-
}
|
|
17
|
+
export default DrawerLayoutAndroid;
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
import DrawerLayoutAndroid from './DrawerLayoutAndroidFallback';
|
|
12
|
+
|
|
13
|
+
export type {
|
|
14
|
+
DrawerLayoutAndroidProps,
|
|
15
|
+
DrawerSlideEvent,
|
|
16
|
+
} from './DrawerLayoutAndroidTypes';
|
|
17
|
+
|
|
18
|
+
export default DrawerLayoutAndroid;
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
import type {
|
|
14
|
+
MeasureInWindowOnSuccessCallback,
|
|
15
|
+
MeasureLayoutOnSuccessCallback,
|
|
16
|
+
MeasureOnSuccessCallback,
|
|
17
|
+
} from '../../../src/private/types/HostInstance';
|
|
18
|
+
import type {
|
|
19
|
+
DrawerLayoutAndroidMethods,
|
|
20
|
+
DrawerLayoutAndroidProps,
|
|
21
|
+
DrawerLayoutAndroidState,
|
|
22
|
+
} from './DrawerLayoutAndroidTypes';
|
|
23
|
+
|
|
24
|
+
import UnimplementedView from '../UnimplementedViews/UnimplementedView';
|
|
25
|
+
import * as React from 'react';
|
|
26
|
+
|
|
27
|
+
export default class DrawerLayoutAndroid
|
|
28
|
+
extends React.Component<DrawerLayoutAndroidProps, DrawerLayoutAndroidState>
|
|
29
|
+
implements DrawerLayoutAndroidMethods
|
|
30
|
+
{
|
|
31
|
+
render(): React.Node {
|
|
32
|
+
return <UnimplementedView {...this.props} />;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
openDrawer(): void {
|
|
36
|
+
throw new Error('DrawerLayoutAndroid is only available on Android');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
closeDrawer(): void {
|
|
40
|
+
throw new Error('DrawerLayoutAndroid is only available on Android');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
blur(): void {
|
|
44
|
+
throw new Error('DrawerLayoutAndroid is only available on Android');
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
focus(): void {
|
|
48
|
+
throw new Error('DrawerLayoutAndroid is only available on Android');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
measure(callback: MeasureOnSuccessCallback): void {
|
|
52
|
+
throw new Error('DrawerLayoutAndroid is only available on Android');
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
measureInWindow(callback: MeasureInWindowOnSuccessCallback): void {
|
|
56
|
+
throw new Error('DrawerLayoutAndroid is only available on Android');
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
measureLayout(
|
|
60
|
+
relativeToNativeNode: number,
|
|
61
|
+
onSuccess: MeasureLayoutOnSuccessCallback,
|
|
62
|
+
onFail?: () => void,
|
|
63
|
+
): void {
|
|
64
|
+
throw new Error('DrawerLayoutAndroid is only available on Android');
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// $FlowFixMe[unclear-type]
|
|
68
|
+
setNativeProps(nativeProps: Object): void {
|
|
69
|
+
throw new Error('DrawerLayoutAndroid is only available on Android');
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -103,7 +103,7 @@ type KeyboardEventDefinitions = {
|
|
|
103
103
|
*```
|
|
104
104
|
*/
|
|
105
105
|
|
|
106
|
-
class
|
|
106
|
+
class KeyboardImpl {
|
|
107
107
|
_currentlyShowing: ?KeyboardEvent;
|
|
108
108
|
|
|
109
109
|
_emitter: NativeEventEmitter<KeyboardEventDefinitions> =
|
|
@@ -202,4 +202,6 @@ class Keyboard {
|
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
|
|
205
|
+
const Keyboard: KeyboardImpl = new KeyboardImpl();
|
|
206
|
+
|
|
207
|
+
export default Keyboard;
|
|
@@ -51,7 +51,7 @@ export type KeyboardAvoidingViewProps = $ReadOnly<{
|
|
|
51
51
|
keyboardVerticalOffset?: number,
|
|
52
52
|
}>;
|
|
53
53
|
|
|
54
|
-
type
|
|
54
|
+
type KeyboardAvoidingViewState = {
|
|
55
55
|
bottom: number,
|
|
56
56
|
};
|
|
57
57
|
|
|
@@ -61,7 +61,7 @@ type State = {
|
|
|
61
61
|
*/
|
|
62
62
|
class KeyboardAvoidingView extends React.Component<
|
|
63
63
|
KeyboardAvoidingViewProps,
|
|
64
|
-
|
|
64
|
+
KeyboardAvoidingViewState,
|
|
65
65
|
> {
|
|
66
66
|
_frame: ?ViewLayout = null;
|
|
67
67
|
_keyboardEvent: ?KeyboardEvent = null;
|
|
@@ -178,7 +178,10 @@ class KeyboardAvoidingView extends React.Component<
|
|
|
178
178
|
}
|
|
179
179
|
};
|
|
180
180
|
|
|
181
|
-
componentDidUpdate(
|
|
181
|
+
componentDidUpdate(
|
|
182
|
+
_: KeyboardAvoidingViewProps,
|
|
183
|
+
prevState: KeyboardAvoidingViewState,
|
|
184
|
+
): void {
|
|
182
185
|
const enabled = this.props.enabled ?? true;
|
|
183
186
|
if (enabled && this._bottom !== prevState.bottom) {
|
|
184
187
|
this.setState({bottom: this._bottom});
|
|
@@ -28,6 +28,8 @@ import {useMemo, useRef, useState} from 'react';
|
|
|
28
28
|
|
|
29
29
|
type ViewStyleProp = React.ElementConfig<typeof View>['style'];
|
|
30
30
|
|
|
31
|
+
export type {PressableAndroidRippleConfig};
|
|
32
|
+
|
|
31
33
|
export type PressableStateCallbackType = $ReadOnly<{
|
|
32
34
|
pressed: boolean,
|
|
33
35
|
}>;
|
|
@@ -150,7 +152,10 @@ type PressableBaseProps = $ReadOnly<{
|
|
|
150
152
|
}>;
|
|
151
153
|
|
|
152
154
|
export type PressableProps = $ReadOnly<{
|
|
153
|
-
|
|
155
|
+
// Pressability may override `onMouseEnter` and `onMouseLeave` to
|
|
156
|
+
// implement `onHoverIn` and `onHoverOut` in a platform-agnostic way.
|
|
157
|
+
// Hover events should be used instead of mouse events.
|
|
158
|
+
...Omit<ViewProps, 'onMouseEnter' | 'onMouseLeave'>,
|
|
154
159
|
...PressableBaseProps,
|
|
155
160
|
}>;
|
|
156
161
|
|
|
@@ -34,6 +34,8 @@ import View from '../View/View';
|
|
|
34
34
|
|
|
35
35
|
type ViewStyleProp = React.ElementConfig<typeof View>['style'];
|
|
36
36
|
|
|
37
|
+
export type {PressableAndroidRippleConfig};
|
|
38
|
+
|
|
37
39
|
export type PressableStateCallbackType = $ReadOnly<{
|
|
38
40
|
pressed: boolean,
|
|
39
41
|
}>;
|
|
@@ -196,7 +198,10 @@ type PressableBaseProps = $ReadOnly<{
|
|
|
196
198
|
}>;
|
|
197
199
|
|
|
198
200
|
export type PressableProps = $ReadOnly<{
|
|
199
|
-
|
|
201
|
+
// Pressability may override `onMouseEnter` and `onMouseLeave` to
|
|
202
|
+
// implement `onHoverIn` and `onHoverOut` in a platform-agnostic way.
|
|
203
|
+
// Hover events should be used instead of mouse events.
|
|
204
|
+
...Omit<ViewProps, 'onMouseEnter' | 'onMouseLeave'>,
|
|
200
205
|
...PressableBaseProps,
|
|
201
206
|
}>;
|
|
202
207
|
|
|
@@ -13,12 +13,22 @@
|
|
|
13
13
|
import typeof ProgressBarAndroidNativeComponentType from './ProgressBarAndroidNativeComponent';
|
|
14
14
|
import type {ProgressBarAndroidProps} from './ProgressBarAndroidTypes';
|
|
15
15
|
|
|
16
|
+
import Platform from '../../Utilities/Platform';
|
|
17
|
+
|
|
16
18
|
export type {ProgressBarAndroidProps};
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
.default as $FlowFixMe as component(
|
|
20
|
+
let ProgressBarAndroid: component(
|
|
20
21
|
ref?: React.RefSetter<
|
|
21
22
|
React.ElementRef<ProgressBarAndroidNativeComponentType>,
|
|
22
23
|
>,
|
|
23
24
|
...props: ProgressBarAndroidProps
|
|
24
25
|
);
|
|
26
|
+
|
|
27
|
+
if (Platform.OS === 'android') {
|
|
28
|
+
ProgressBarAndroid = require('./ProgressBarAndroid').default;
|
|
29
|
+
} else {
|
|
30
|
+
ProgressBarAndroid = require('../UnimplementedViews/UnimplementedView')
|
|
31
|
+
.default as $FlowFixMe;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default ProgressBarAndroid;
|
|
@@ -17,7 +17,7 @@ import AndroidSwipeRefreshLayoutNativeComponent, {
|
|
|
17
17
|
import PullToRefreshViewNativeComponent, {
|
|
18
18
|
Commands as PullToRefreshCommands,
|
|
19
19
|
} from './PullToRefreshViewNativeComponent';
|
|
20
|
-
import React from 'react';
|
|
20
|
+
import * as React from 'react';
|
|
21
21
|
|
|
22
22
|
const Platform = require('../../Utilities/Platform').default;
|
|
23
23
|
|
|
@@ -869,7 +869,7 @@ export class ScrollView extends ScrollViewBase {
|
|
|
869
869
|
* This function sends props straight to native. They will not participate in
|
|
870
870
|
* future diff process - this means that if you do not include them in the
|
|
871
871
|
* next render, they will remain active (see [Direct
|
|
872
|
-
* Manipulation](https://reactnative.dev/docs/direct-manipulation)).
|
|
872
|
+
* Manipulation](https://reactnative.dev/docs/the-new-architecture/direct-manipulation-new-architecture)).
|
|
873
873
|
*/
|
|
874
874
|
setNativeProps(nativeProps: object): void;
|
|
875
875
|
}
|