@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
|
@@ -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,16 +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
|
-
|
|
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;
|
|
147
164
|
}
|
|
148
165
|
|
|
149
166
|
export type DecelerationRateType = 'fast' | 'normal' | number;
|
|
@@ -153,7 +170,7 @@ export interface PublicScrollViewInstance
|
|
|
153
170
|
extends HostInstance,
|
|
154
171
|
ScrollViewImperativeMethods {}
|
|
155
172
|
|
|
156
|
-
type InnerViewInstance = React.ElementRef<View>;
|
|
173
|
+
type InnerViewInstance = React.ElementRef<typeof View>;
|
|
157
174
|
|
|
158
175
|
export type ScrollViewPropsIOS = $ReadOnly<{
|
|
159
176
|
/**
|
|
@@ -373,11 +390,7 @@ type StickyHeaderComponentType = component(
|
|
|
373
390
|
...ScrollViewStickyHeaderProps
|
|
374
391
|
);
|
|
375
392
|
|
|
376
|
-
|
|
377
|
-
...ViewProps,
|
|
378
|
-
...ScrollViewPropsIOS,
|
|
379
|
-
...ScrollViewPropsAndroid,
|
|
380
|
-
|
|
393
|
+
type ScrollViewBaseProps = $ReadOnly<{
|
|
381
394
|
/**
|
|
382
395
|
* These styles will be applied to the scroll view content container which
|
|
383
396
|
* wraps all of the child views. Example:
|
|
@@ -640,7 +653,7 @@ export type ScrollViewProps = $ReadOnly<{
|
|
|
640
653
|
*/
|
|
641
654
|
/* $FlowFixMe[unclear-type] - how to handle generic type without existential
|
|
642
655
|
* operator? */
|
|
643
|
-
refreshControl?: ?React.
|
|
656
|
+
refreshControl?: ?React.MixedElement,
|
|
644
657
|
children?: React.Node,
|
|
645
658
|
/**
|
|
646
659
|
* A ref to the inner View element of the ScrollView. This should be used
|
|
@@ -655,7 +668,14 @@ export type ScrollViewProps = $ReadOnly<{
|
|
|
655
668
|
scrollViewRef?: React.RefSetter<PublicScrollViewInstance>,
|
|
656
669
|
}>;
|
|
657
670
|
|
|
658
|
-
type
|
|
671
|
+
export type ScrollViewProps = $ReadOnly<{
|
|
672
|
+
...ViewProps,
|
|
673
|
+
...ScrollViewPropsIOS,
|
|
674
|
+
...ScrollViewPropsAndroid,
|
|
675
|
+
...ScrollViewBaseProps,
|
|
676
|
+
}>;
|
|
677
|
+
|
|
678
|
+
type ScrollViewState = {
|
|
659
679
|
layoutHeight: ?number,
|
|
660
680
|
};
|
|
661
681
|
|
|
@@ -700,7 +720,7 @@ export type ScrollViewComponentStatics = $ReadOnly<{
|
|
|
700
720
|
* multiple columns, infinite scroll loading, or any number of other features it
|
|
701
721
|
* supports out of the box.
|
|
702
722
|
*/
|
|
703
|
-
class ScrollView extends React.Component<ScrollViewProps,
|
|
723
|
+
class ScrollView extends React.Component<ScrollViewProps, ScrollViewState> {
|
|
704
724
|
static Context: typeof ScrollViewContext = ScrollViewContext;
|
|
705
725
|
|
|
706
726
|
constructor(props: ScrollViewProps) {
|
|
@@ -742,7 +762,7 @@ class ScrollView extends React.Component<ScrollViewProps, State> {
|
|
|
742
762
|
_subscriptionKeyboardDidShow: ?EventSubscription = null;
|
|
743
763
|
_subscriptionKeyboardDidHide: ?EventSubscription = null;
|
|
744
764
|
|
|
745
|
-
state:
|
|
765
|
+
state: ScrollViewState = {
|
|
746
766
|
layoutHeight: null,
|
|
747
767
|
};
|
|
748
768
|
|
|
@@ -820,26 +840,28 @@ class ScrollView extends React.Component<ScrollViewProps, State> {
|
|
|
820
840
|
* implement this method so that they can be composed while providing access
|
|
821
841
|
* to the underlying scroll responder's methods.
|
|
822
842
|
*/
|
|
823
|
-
getScrollResponder:
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
843
|
+
getScrollResponder: ScrollViewImperativeMethods['getScrollResponder'] =
|
|
844
|
+
() => {
|
|
845
|
+
// $FlowFixMe[unclear-type]
|
|
846
|
+
return ((this: any): ScrollResponderType);
|
|
847
|
+
};
|
|
827
848
|
|
|
828
|
-
getScrollableNode:
|
|
849
|
+
getScrollableNode: ScrollViewImperativeMethods['getScrollableNode'] = () => {
|
|
829
850
|
return findNodeHandle<$FlowFixMe>(this.getNativeScrollRef());
|
|
830
851
|
};
|
|
831
852
|
|
|
832
|
-
getInnerViewNode:
|
|
853
|
+
getInnerViewNode: ScrollViewImperativeMethods['getInnerViewNode'] = () => {
|
|
833
854
|
return findNodeHandle<$FlowFixMe>(this._innerView.nativeInstance);
|
|
834
855
|
};
|
|
835
856
|
|
|
836
|
-
getInnerViewRef:
|
|
857
|
+
getInnerViewRef: ScrollViewImperativeMethods['getInnerViewRef'] = () => {
|
|
837
858
|
return this._innerView.nativeInstance;
|
|
838
859
|
};
|
|
839
860
|
|
|
840
|
-
getNativeScrollRef:
|
|
841
|
-
|
|
842
|
-
|
|
861
|
+
getNativeScrollRef: ScrollViewImperativeMethods['getNativeScrollRef'] =
|
|
862
|
+
() => {
|
|
863
|
+
return this._scrollView.nativeInstance;
|
|
864
|
+
};
|
|
843
865
|
|
|
844
866
|
/**
|
|
845
867
|
* Scrolls to a given x, y offset, either immediately or with a smooth animation.
|
|
@@ -852,11 +874,11 @@ class ScrollView extends React.Component<ScrollViewProps, State> {
|
|
|
852
874
|
* the function also accepts separate arguments as an alternative to the options object.
|
|
853
875
|
* This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED.
|
|
854
876
|
*/
|
|
855
|
-
scrollTo: (
|
|
856
|
-
options
|
|
857
|
-
deprecatedX
|
|
858
|
-
deprecatedAnimated
|
|
859
|
-
) =>
|
|
877
|
+
scrollTo: ScrollViewImperativeMethods['scrollTo'] = (
|
|
878
|
+
options,
|
|
879
|
+
deprecatedX,
|
|
880
|
+
deprecatedAnimated,
|
|
881
|
+
) => {
|
|
860
882
|
let x, y, animated;
|
|
861
883
|
if (typeof options === 'number') {
|
|
862
884
|
console.warn(
|
|
@@ -886,7 +908,7 @@ class ScrollView extends React.Component<ScrollViewProps, State> {
|
|
|
886
908
|
* `scrollToEnd({animated: false})` for immediate scrolling.
|
|
887
909
|
* If no options are passed, `animated` defaults to true.
|
|
888
910
|
*/
|
|
889
|
-
scrollToEnd:
|
|
911
|
+
scrollToEnd: ScrollViewImperativeMethods['scrollToEnd'] = options => {
|
|
890
912
|
// Default to true
|
|
891
913
|
const animated = (options && options.animated) !== false;
|
|
892
914
|
const component = this.getNativeScrollRef();
|
|
@@ -901,13 +923,14 @@ class ScrollView extends React.Component<ScrollViewProps, State> {
|
|
|
901
923
|
*
|
|
902
924
|
* @platform ios
|
|
903
925
|
*/
|
|
904
|
-
flashScrollIndicators:
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
926
|
+
flashScrollIndicators: ScrollViewImperativeMethods['flashScrollIndicators'] =
|
|
927
|
+
() => {
|
|
928
|
+
const component = this.getNativeScrollRef();
|
|
929
|
+
if (component == null) {
|
|
930
|
+
return;
|
|
931
|
+
}
|
|
932
|
+
Commands.flashScrollIndicators(component);
|
|
933
|
+
};
|
|
911
934
|
|
|
912
935
|
/**
|
|
913
936
|
* This method should be used as the callback to onFocus in a TextInputs'
|
|
@@ -919,39 +942,36 @@ class ScrollView extends React.Component<ScrollViewProps, State> {
|
|
|
919
942
|
* @param {bool} preventNegativeScrolling Whether to allow pulling the content
|
|
920
943
|
* down to make it meet the keyboard's top. Default is false.
|
|
921
944
|
*/
|
|
922
|
-
scrollResponderScrollNativeHandleToKeyboard:
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
if (this._innerView.nativeInstance == null) {
|
|
935
|
-
return;
|
|
936
|
-
}
|
|
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
|
+
}
|
|
937
957
|
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
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
|
+
};
|
|
955
975
|
|
|
956
976
|
/**
|
|
957
977
|
* A helper function to zoom to a specific rect in the scrollview. The argument has the shape
|
|
@@ -959,41 +979,33 @@ class ScrollView extends React.Component<ScrollViewProps, State> {
|
|
|
959
979
|
*
|
|
960
980
|
* @platform ios
|
|
961
981
|
*/
|
|
962
|
-
scrollResponderZoomTo:
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
animated
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
if ('animated' in rect) {
|
|
983
|
-
this._animated = rect.animated;
|
|
984
|
-
delete rect.animated;
|
|
985
|
-
} else if (typeof animated !== 'undefined') {
|
|
986
|
-
console.warn(
|
|
987
|
-
'`scrollResponderZoomTo` `animated` argument is deprecated. Use `options.animated` instead',
|
|
988
|
-
);
|
|
989
|
-
}
|
|
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
|
+
}
|
|
990
1002
|
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
1003
|
+
const component = this.getNativeScrollRef();
|
|
1004
|
+
if (component == null) {
|
|
1005
|
+
return;
|
|
1006
|
+
}
|
|
1007
|
+
Commands.zoomToRect(component, rect, animated !== false);
|
|
1008
|
+
};
|
|
997
1009
|
|
|
998
1010
|
_textInputFocusError() {
|
|
999
1011
|
console.warn('Error measuring text field.');
|
|
@@ -1898,7 +1910,7 @@ function createRefForwarder<TNativeInstance, TPublicInstance>(
|
|
|
1898
1910
|
// NOTE: This wrapper component is necessary because `ScrollView` is a class
|
|
1899
1911
|
// component and we need to map `ref` to a differently named prop. This can be
|
|
1900
1912
|
// removed when `ScrollView` is a functional component.
|
|
1901
|
-
const
|
|
1913
|
+
const ScrollViewWrapper: component(
|
|
1902
1914
|
ref?: React.RefSetter<PublicScrollViewInstance>,
|
|
1903
1915
|
...props: ScrollViewProps
|
|
1904
1916
|
) = React.forwardRef(function Wrapper(
|
|
@@ -1911,9 +1923,9 @@ const Wrapper: component(
|
|
|
1911
1923
|
<ScrollView {...props} scrollViewRef={ref} />
|
|
1912
1924
|
);
|
|
1913
1925
|
});
|
|
1914
|
-
|
|
1926
|
+
ScrollViewWrapper.displayName = 'ScrollView';
|
|
1915
1927
|
// $FlowExpectedError[prop-missing]
|
|
1916
|
-
|
|
1928
|
+
ScrollViewWrapper.Context = ScrollViewContext;
|
|
1917
1929
|
|
|
1918
|
-
export default ((
|
|
1930
|
+
export default ((ScrollViewWrapper: $FlowFixMe): typeof ScrollViewWrapper &
|
|
1919
1931
|
ScrollViewComponentStatics);
|
|
@@ -22,6 +22,7 @@ import SwitchNativeComponent, {
|
|
|
22
22
|
Commands as SwitchCommands,
|
|
23
23
|
} from './SwitchNativeComponent';
|
|
24
24
|
import * as React from 'react';
|
|
25
|
+
import {useLayoutEffect, useRef, useState} from 'react';
|
|
25
26
|
|
|
26
27
|
export type SwitchPropsIOS = {
|
|
27
28
|
/**
|
|
@@ -179,13 +180,16 @@ const Switch: component(
|
|
|
179
180
|
const trackColorForFalse = trackColor?.false;
|
|
180
181
|
const trackColorForTrue = trackColor?.true;
|
|
181
182
|
|
|
182
|
-
const nativeSwitchRef =
|
|
183
|
+
const nativeSwitchRef = useRef<React.ElementRef<
|
|
183
184
|
typeof SwitchNativeComponent | typeof AndroidSwitchNativeComponent,
|
|
184
185
|
> | null>(null);
|
|
185
186
|
|
|
186
187
|
const ref = useMergeRefs(nativeSwitchRef, forwardedRef);
|
|
187
188
|
|
|
188
|
-
|
|
189
|
+
// We wrap the native state in an object to force the layout-effect
|
|
190
|
+
// below to re-run whenever we get an update from native, even if it's
|
|
191
|
+
// not different from the previous native state.
|
|
192
|
+
const [native, setNative] = useState({value: (null: ?boolean)});
|
|
189
193
|
|
|
190
194
|
const handleChange = (event: SwitchChangeEvent) => {
|
|
191
195
|
// $FlowFixMe[unused-promise]
|
|
@@ -195,7 +199,7 @@ const Switch: component(
|
|
|
195
199
|
setNative({value: event.nativeEvent.value});
|
|
196
200
|
};
|
|
197
201
|
|
|
198
|
-
|
|
202
|
+
useLayoutEffect(() => {
|
|
199
203
|
// This is necessary in case native updates the switch and JS decides
|
|
200
204
|
// that the update should be ignored and we should stick with the value
|
|
201
205
|
// that we have in JS.
|
|
@@ -70,7 +70,7 @@ export type SubmitBehavior = 'submit' | 'blurAndSubmit' | 'newline';
|
|
|
70
70
|
export type NativeProps = $ReadOnly<{
|
|
71
71
|
// This allows us to inherit everything from ViewProps except for style (see below)
|
|
72
72
|
// This must be commented for Fabric codegen to work.
|
|
73
|
-
|
|
73
|
+
...Omit<ViewProps, 'style'>,
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* Android props after this
|
|
@@ -658,6 +658,7 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig = {
|
|
|
658
658
|
},
|
|
659
659
|
},
|
|
660
660
|
validAttributes: {
|
|
661
|
+
acceptDragAndDropTypes: true,
|
|
661
662
|
maxFontSizeMultiplier: true,
|
|
662
663
|
adjustsFontSizeToFit: true,
|
|
663
664
|
minimumFontScale: true,
|
|
@@ -12,10 +12,7 @@ import type {PartialViewConfig} from '../../Renderer/shims/ReactNativeTypes';
|
|
|
12
12
|
|
|
13
13
|
import {ConditionallyIgnoredEventHandlers} from '../../NativeComponent/ViewConfigIgnore';
|
|
14
14
|
|
|
15
|
-
type PartialViewConfigWithoutName =
|
|
16
|
-
PartialViewConfig,
|
|
17
|
-
{uiViewClassName: string},
|
|
18
|
-
>;
|
|
15
|
+
type PartialViewConfigWithoutName = Omit<PartialViewConfig, 'uiViewClassName'>;
|
|
19
16
|
|
|
20
17
|
const RCTTextInputViewConfig = {
|
|
21
18
|
bubblingEventTypes: {
|
|
@@ -93,6 +90,7 @@ const RCTTextInputViewConfig = {
|
|
|
93
90
|
},
|
|
94
91
|
},
|
|
95
92
|
validAttributes: {
|
|
93
|
+
acceptDragAndDropTypes: true,
|
|
96
94
|
dynamicTypeRamp: true,
|
|
97
95
|
fontSize: true,
|
|
98
96
|
fontWeight: true,
|
|
@@ -23,13 +23,17 @@ import {
|
|
|
23
23
|
} from '../../StyleSheet/StyleSheet';
|
|
24
24
|
import * as React from 'react';
|
|
25
25
|
|
|
26
|
+
/**
|
|
27
|
+
* @see TextInputProps.onChange
|
|
28
|
+
*/
|
|
26
29
|
type TextInputChangeEventData = $ReadOnly<{
|
|
27
30
|
eventCount: number,
|
|
28
31
|
target: number,
|
|
29
32
|
text: string,
|
|
30
33
|
}>;
|
|
31
34
|
|
|
32
|
-
type TextInputChangeEvent =
|
|
35
|
+
export type TextInputChangeEvent =
|
|
36
|
+
NativeSyntheticEvent<TextInputChangeEventData>;
|
|
33
37
|
|
|
34
38
|
export type TextInputEvent = NativeSyntheticEvent<
|
|
35
39
|
$ReadOnly<{
|
|
@@ -52,19 +56,30 @@ type TextInputContentSizeChangeEventData = $ReadOnly<{
|
|
|
52
56
|
}>,
|
|
53
57
|
}>;
|
|
54
58
|
|
|
59
|
+
/**
|
|
60
|
+
* @see TextInputProps.onContentSizeChange
|
|
61
|
+
*/
|
|
55
62
|
export type TextInputContentSizeChangeEvent =
|
|
56
63
|
NativeSyntheticEvent<TextInputContentSizeChangeEventData>;
|
|
57
64
|
|
|
58
65
|
type TargetEvent = $ReadOnly<{
|
|
59
66
|
target: number,
|
|
67
|
+
...
|
|
60
68
|
}>;
|
|
61
69
|
|
|
62
70
|
type TextInputFocusEventData = TargetEvent;
|
|
63
71
|
|
|
72
|
+
/**
|
|
73
|
+
* @see TextInputProps.onBlur
|
|
74
|
+
*/
|
|
64
75
|
export type TextInputBlurEvent = NativeSyntheticEvent<TextInputFocusEventData>;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @see TextInputProps.onFocus
|
|
79
|
+
*/
|
|
65
80
|
export type TextInputFocusEvent = NativeSyntheticEvent<TextInputFocusEventData>;
|
|
66
81
|
|
|
67
|
-
type Selection = $ReadOnly<{
|
|
82
|
+
export type Selection = $ReadOnly<{
|
|
68
83
|
start: number,
|
|
69
84
|
end: number,
|
|
70
85
|
}>;
|
|
@@ -72,8 +87,12 @@ type Selection = $ReadOnly<{
|
|
|
72
87
|
type TextInputSelectionChangeEventData = $ReadOnly<{
|
|
73
88
|
...TargetEvent,
|
|
74
89
|
selection: Selection,
|
|
90
|
+
...
|
|
75
91
|
}>;
|
|
76
92
|
|
|
93
|
+
/**
|
|
94
|
+
* @see TextInputProps.onSelectionChange
|
|
95
|
+
*/
|
|
77
96
|
export type TextInputSelectionChangeEvent =
|
|
78
97
|
NativeSyntheticEvent<TextInputSelectionChangeEventData>;
|
|
79
98
|
|
|
@@ -82,8 +101,12 @@ type TextInputKeyPressEventData = $ReadOnly<{
|
|
|
82
101
|
key: string,
|
|
83
102
|
target?: ?number,
|
|
84
103
|
eventCount: number,
|
|
104
|
+
...
|
|
85
105
|
}>;
|
|
86
106
|
|
|
107
|
+
/**
|
|
108
|
+
* @see TextInputProps.onKeyPress
|
|
109
|
+
*/
|
|
87
110
|
export type TextInputKeyPressEvent =
|
|
88
111
|
NativeSyntheticEvent<TextInputKeyPressEventData>;
|
|
89
112
|
|
|
@@ -91,6 +114,7 @@ type TextInputEndEditingEventData = $ReadOnly<{
|
|
|
91
114
|
...TargetEvent,
|
|
92
115
|
eventCount: number,
|
|
93
116
|
text: string,
|
|
117
|
+
...
|
|
94
118
|
}>;
|
|
95
119
|
|
|
96
120
|
/**
|
|
@@ -103,6 +127,7 @@ type TextInputSubmitEditingEventData = $ReadOnly<{
|
|
|
103
127
|
...TargetEvent,
|
|
104
128
|
eventCount: number,
|
|
105
129
|
text: string,
|
|
130
|
+
...
|
|
106
131
|
}>;
|
|
107
132
|
|
|
108
133
|
/**
|
|
@@ -488,10 +513,26 @@ export type TextInputAndroidProps = $ReadOnly<{
|
|
|
488
513
|
underlineColorAndroid?: ?ColorValue,
|
|
489
514
|
}>;
|
|
490
515
|
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
516
|
+
type TextInputBaseProps = $ReadOnly<{
|
|
517
|
+
/**
|
|
518
|
+
* When provided, the text input will only accept drag and drop events for the specified
|
|
519
|
+
* types. If null or not provided, the text input will accept all types of drag and drop events.
|
|
520
|
+
* An empty array will accept no drag and drop events.
|
|
521
|
+
* Defaults to null.
|
|
522
|
+
*
|
|
523
|
+
* On Android, types must correspond to MIME types from ClipData:
|
|
524
|
+
* https://developer.android.com/reference/android/content/ClipData
|
|
525
|
+
* (e.g. "text/plain" or "image/*")
|
|
526
|
+
*
|
|
527
|
+
* On iOS, types must correspond to UTIs:
|
|
528
|
+
* https://developer.apple.com/documentation/uniformtypeidentifiers
|
|
529
|
+
* (e.g. "public.plain-text" or "public.image")
|
|
530
|
+
*
|
|
531
|
+
* *NOTE*: This prop is experimental and its API may change in the future. Use at your own risk.
|
|
532
|
+
*
|
|
533
|
+
* @see https://developer.android.com/reference/android/content/ClipData for more information on MIME types
|
|
534
|
+
*/
|
|
535
|
+
experimental_acceptDragAndDropTypes?: ?$ReadOnlyArray<string>,
|
|
495
536
|
|
|
496
537
|
/**
|
|
497
538
|
* Can tell `TextInput` to automatically capitalize certain characters.
|
|
@@ -776,33 +817,12 @@ export type TextInputProps = $ReadOnly<{
|
|
|
776
817
|
*/
|
|
777
818
|
onChange?: ?(e: TextInputChangeEvent) => mixed,
|
|
778
819
|
|
|
779
|
-
/**
|
|
780
|
-
* DANGER: this API is not stable and will change in the future.
|
|
781
|
-
*
|
|
782
|
-
* Callback will be called on the main thread and may result in dropped frames.
|
|
783
|
-
* Callback that is called when the text input's text changes.
|
|
784
|
-
*
|
|
785
|
-
* @platform ios
|
|
786
|
-
*/
|
|
787
|
-
unstable_onChangeSync?: ?(e: TextInputChangeEvent) => mixed,
|
|
788
|
-
|
|
789
820
|
/**
|
|
790
821
|
* Callback that is called when the text input's text changes.
|
|
791
822
|
* Changed text is passed as an argument to the callback handler.
|
|
792
823
|
*/
|
|
793
824
|
onChangeText?: ?(text: string) => mixed,
|
|
794
825
|
|
|
795
|
-
/**
|
|
796
|
-
* DANGER: this API is not stable and will change in the future.
|
|
797
|
-
*
|
|
798
|
-
* Callback will be called on the main thread and may result in dropped frames.
|
|
799
|
-
* Callback that is called when the text input's text changes.
|
|
800
|
-
* Changed text is passed as an argument to the callback handler.
|
|
801
|
-
*
|
|
802
|
-
* @platform ios
|
|
803
|
-
*/
|
|
804
|
-
unstable_onChangeTextSync?: ?(text: string) => mixed,
|
|
805
|
-
|
|
806
826
|
/**
|
|
807
827
|
* Callback that is called when the text input's content size changes.
|
|
808
828
|
* This will be called with
|
|
@@ -831,21 +851,6 @@ export type TextInputProps = $ReadOnly<{
|
|
|
831
851
|
*/
|
|
832
852
|
onKeyPress?: ?(e: TextInputKeyPressEvent) => mixed,
|
|
833
853
|
|
|
834
|
-
/**
|
|
835
|
-
* DANGER: this API is not stable and will change in the future.
|
|
836
|
-
*
|
|
837
|
-
* Callback will be called on the main thread and may result in dropped frames.
|
|
838
|
-
*
|
|
839
|
-
* Callback that is called when a key is pressed.
|
|
840
|
-
* This will be called with `{ nativeEvent: { key: keyValue } }`
|
|
841
|
-
* where `keyValue` is `'Enter'` or `'Backspace'` for respective keys and
|
|
842
|
-
* the typed-in character otherwise including `' '` for space.
|
|
843
|
-
* Fires before `onChange` callbacks.
|
|
844
|
-
*
|
|
845
|
-
* @platform ios
|
|
846
|
-
*/
|
|
847
|
-
unstable_onKeyPressSync?: ?(e: TextInputKeyPressEvent) => mixed,
|
|
848
|
-
|
|
849
854
|
/**
|
|
850
855
|
* Called when a single tap gesture is detected.
|
|
851
856
|
*/
|
|
@@ -1020,6 +1025,18 @@ export type TextInputProps = $ReadOnly<{
|
|
|
1020
1025
|
* unwanted edits without flicker.
|
|
1021
1026
|
*/
|
|
1022
1027
|
value?: ?Stringish,
|
|
1028
|
+
|
|
1029
|
+
/**
|
|
1030
|
+
* Align the input text to the left, center, or right sides of the input field.
|
|
1031
|
+
*/
|
|
1032
|
+
textAlign?: ?('left' | 'center' | 'right'),
|
|
1033
|
+
}>;
|
|
1034
|
+
|
|
1035
|
+
export type TextInputProps = $ReadOnly<{
|
|
1036
|
+
...Omit<ViewProps, 'style'>,
|
|
1037
|
+
...TextInputIOSProps,
|
|
1038
|
+
...TextInputAndroidProps,
|
|
1039
|
+
...TextInputBaseProps,
|
|
1023
1040
|
}>;
|
|
1024
1041
|
|
|
1025
1042
|
export interface TextInputInstance extends HostInstance {
|