@office-iss/react-native-win32 0.81.2 → 0.82.0-preview.2
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 +3 -11
- package/CHANGELOG.json +118 -43
- package/CHANGELOG.md +45 -27
- package/IntegrationTests/IntegrationTestsApp.js +2 -2
- package/IntegrationTests/LayoutEventsTest.js +3 -3
- package/Libraries/ActionSheetIOS/ActionSheetIOS.js +7 -3
- package/Libraries/Alert/RCTAlertManager.android.js +4 -2
- package/Libraries/Animated/Animated.d.ts +2 -0
- package/Libraries/Animated/AnimatedEvent.js +1 -1
- package/Libraries/Animated/AnimatedExports.js.flow +1 -0
- package/Libraries/Animated/AnimatedImplementation.js +4 -2
- package/Libraries/Animated/AnimatedMock.js +1 -1
- package/Libraries/Animated/Easing.js +2 -0
- package/Libraries/Animated/NativeAnimatedAllowlist.js +1 -0
- package/Libraries/Animated/animations/Animation.js +19 -20
- package/Libraries/Animated/animations/TimingAnimation.js +2 -0
- package/Libraries/Animated/components/AnimatedScrollView.js +3 -2
- package/Libraries/Animated/components/AnimatedSectionList.js +1 -1
- package/Libraries/Animated/nodes/AnimatedColor.js +9 -9
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +4 -4
- package/Libraries/Animated/nodes/AnimatedNode.js +14 -7
- package/Libraries/Animated/nodes/AnimatedObject.js +7 -7
- package/Libraries/Animated/nodes/AnimatedProps.js +32 -32
- package/Libraries/Animated/nodes/AnimatedStyle.js +23 -21
- package/Libraries/Animated/nodes/AnimatedTransform.js +6 -6
- package/Libraries/Animated/nodes/AnimatedValue.js +18 -26
- package/Libraries/AppState/AppState.js +8 -4
- package/Libraries/BatchedBridge/BatchedBridge.js +1 -0
- package/Libraries/BatchedBridge/MessageQueue.js +5 -0
- package/Libraries/BatchedBridge/NativeModules.js +1 -1
- package/Libraries/Blob/BlobManager.js +1 -1
- package/Libraries/Blob/URLSearchParams.js +2 -0
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +2 -2
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +2 -2
- package/Libraries/Components/Button.js +1 -1
- package/Libraries/Components/Button.win32.js +1 -1
- package/Libraries/Components/Pressable/Pressable.js +10 -1
- package/Libraries/Components/Pressable/Pressable.win32.js +9 -0
- package/Libraries/Components/Pressable/useAndroidRippleForView.js +2 -2
- package/Libraries/Components/ScrollView/ScrollView.js +13 -4
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
- package/Libraries/Components/StatusBar/StatusBar.js +2 -2
- package/Libraries/Components/Switch/Switch.js +1 -1
- package/Libraries/Components/TextInput/TextInput.flow.js +12 -5
- package/Libraries/Components/TextInput/TextInput.flow.win32.js +12 -5
- package/Libraries/Components/TextInput/TextInput.js +14 -5
- package/Libraries/Components/TextInput/TextInput.win32.js +15 -7
- package/Libraries/Components/TextInput/TextInputState.js +1 -1
- package/Libraries/Components/TextInput/TextInputState.win32.js +1 -1
- package/Libraries/Components/TextInput/Win32TextInputNativeComponent.js +2 -3
- 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 +1 -1
- package/Libraries/Components/Touchable/TouchableWin32.js +1 -1
- package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +3 -3
- package/Libraries/Components/View/View.js +81 -167
- package/Libraries/Components/View/View.win32.js +3 -1
- package/Libraries/Core/Devtools/loadBundleFromServer.js +1 -1
- package/Libraries/Core/Devtools/loadBundleFromServer.win32.js +1 -1
- package/Libraries/Core/ExceptionsManager.js +4 -2
- package/Libraries/Core/ReactFiberErrorDialog.js +3 -3
- package/Libraries/Core/ReactNativeVersion.js +37 -10
- package/Libraries/Core/Timers/JSTimers.js +4 -1
- package/Libraries/Core/Timers/NativeTiming.js +1 -0
- package/Libraries/Core/Timers/immediateShim.js +2 -1
- package/Libraries/Core/Timers/queueMicrotask.js +1 -0
- package/Libraries/Core/setUpPerformance.js +3 -4
- package/Libraries/Debugging/DebuggingOverlayRegistry.js +5 -3
- package/Libraries/Image/Image.android.js +327 -111
- package/Libraries/Image/Image.ios.js +6 -1
- package/Libraries/Image/Image.win32.js +6 -1
- package/Libraries/Image/ImageSourceUtils.js +8 -2
- package/Libraries/Image/assetPaths.js +1 -1
- package/Libraries/Image/resolveAssetSource.js +1 -1
- package/Libraries/Image/resolveAssetSource.win32.js +6 -7
- package/Libraries/Interaction/InteractionManager.js +118 -167
- package/Libraries/Interaction/PanResponder.js +7 -52
- package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -0
- package/Libraries/Lists/FlatList.js +5 -6
- package/Libraries/LogBox/Data/LogBoxData.js +5 -2
- package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +2 -2
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.win32.js +1 -1
- package/Libraries/Modal/Modal.js +3 -3
- package/Libraries/NativeComponent/NativeComponentRegistry.js +1 -1
- package/Libraries/NativeComponent/ViewConfig.js +2 -2
- package/Libraries/Network/RCTNetworking.android.js +1 -1
- package/Libraries/Network/RCTNetworking.ios.js +1 -1
- package/Libraries/Network/RCTNetworking.win32.js +1 -1
- package/Libraries/Network/XMLHttpRequest.js +20 -5
- package/Libraries/Network/convertRequestBody.js +1 -1
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +10 -9
- package/Libraries/Pressability/HoverState.js +2 -0
- package/Libraries/Pressability/HoverState.win32.js +2 -0
- package/Libraries/Pressability/Pressability.js +1 -1
- package/Libraries/Pressability/Pressability.win32.js +1 -1
- package/Libraries/PushNotificationIOS/PushNotificationIOS.js +2 -2
- package/Libraries/ReactNative/AppRegistryImpl.js +4 -2
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +2 -0
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +3 -3
- package/Libraries/ReactNative/RendererImplementation.js +116 -116
- package/Libraries/ReactNative/UIManager.js +3 -3
- package/Libraries/ReactNative/renderApplication.js +1 -0
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +1 -1
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +38 -35
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +51 -22
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +54 -24
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +36 -33
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +5 -5
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +5 -5
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +3 -1
- package/Libraries/Share/Share.js +4 -0
- package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +2 -2
- package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +2 -2
- package/Libraries/StyleSheet/PlatformColorValueTypes.win32.js +4 -0
- package/Libraries/StyleSheet/StyleSheet.d.ts +7 -22
- package/Libraries/StyleSheet/StyleSheetExports.js +2 -8
- package/Libraries/StyleSheet/StyleSheetExports.js.flow +11 -18
- package/Libraries/StyleSheet/flattenStyle.js +2 -2
- package/Libraries/StyleSheet/processAspectRatio.js +2 -0
- package/Libraries/StyleSheet/processFilter.js +5 -5
- package/Libraries/StyleSheet/splitLayoutProps.js +2 -2
- package/Libraries/Text/Text.js +534 -234
- package/Libraries/Text/Text.win32.js +647 -274
- package/Libraries/Text/TextNativeComponent.js +2 -2
- package/Libraries/Text/TextNativeComponent.win32.js +2 -2
- package/Libraries/Utilities/Appearance.d.ts +3 -5
- package/Libraries/Utilities/Appearance.js +5 -17
- package/Libraries/Utilities/HMRClient.js +2 -1
- package/Libraries/Utilities/Platform.android.js +3 -3
- package/Libraries/Utilities/Platform.d.ts +1 -0
- package/Libraries/Utilities/Platform.ios.js +1 -1
- package/Libraries/Utilities/Platform.win32.js +3 -3
- package/Libraries/Utilities/PlatformTypes.js +1 -1
- package/Libraries/Utilities/ReactNativeTestTools.js +12 -0
- package/Libraries/Utilities/SceneTracker.js +1 -1
- package/Libraries/Utilities/codegenNativeCommands.js +1 -1
- package/Libraries/Utilities/codegenNativeComponent.js +1 -1
- package/Libraries/Utilities/createPerformanceLogger.js +32 -0
- package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +2 -0
- package/Libraries/Utilities/differ/pointsDiffer.js +1 -1
- package/Libraries/Utilities/useMergeRefs.js +1 -1
- package/Libraries/WebSocket/WebSocketInterceptor.js +2 -0
- package/Libraries/promiseRejectionTrackingOptions.js +17 -31
- package/Libraries/vendor/emitter/EventEmitter.js +1 -1
- package/flow/bom.js.flow +223 -1
- package/flow/prettier.js.flow +14 -0
- package/index.js +14 -2
- package/index.win32.js +16 -2
- package/jest/local-setup.js +2 -2
- package/jest/mock.js +1 -1
- package/jest/mockComponent.js +9 -9
- package/jest/mockNativeComponent.js +3 -2
- package/jest/mocks/Modal.js +1 -1
- package/jest/mocks/ScrollView.js +1 -1
- package/jest/mocks/ViewNativeComponent.js +1 -1
- package/jest/setup.js +23 -12
- package/overrides.json +23 -23
- package/package.json +28 -27
- package/saveAssetPlugin.js +2 -2
- package/src/private/animated/NativeAnimatedHelper.js +16 -5
- package/src/private/animated/NativeAnimatedHelper.win32.js +16 -5
- package/src/private/animated/createAnimatedPropsHook.js +11 -60
- package/src/private/animated/createAnimatedPropsMemoHook.js +8 -54
- package/src/private/components/virtualview/VirtualView.js +43 -12
- package/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.js +93 -0
- package/src/private/components/virtualview/VirtualViewNativeComponent.js +6 -0
- package/src/private/devsupport/devmenu/elementinspector/Inspector.js +2 -2
- package/src/private/devsupport/devmenu/elementinspector/ReactDevToolsOverlay.js +2 -2
- package/src/private/featureflags/ReactNativeFeatureFlags.js +85 -52
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +23 -4
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +15 -6
- package/src/private/renderer/errorhandling/ErrorHandlers.js +3 -3
- package/src/private/setup/{setUpPerformanceObserver.js → setUpPerformanceModern.js} +43 -18
- package/src/private/specs_DEPRECATED/modules/NativeTiming.js +1 -0
- package/src/private/types/HostInstance.js +4 -1
- package/src/private/webapis/dom/nodes/ReactNativeDocument.js +22 -2
- package/src/private/webapis/dom/nodes/ReactNativeElement.js +1 -1
- package/src/private/webapis/dom/nodes/ReadOnlyElement.js +5 -3
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +16 -13
- package/src/private/webapis/dom/nodes/internals/NodeInternals.js +45 -22
- package/src/private/webapis/dom/nodes/internals/ReactNativeDocumentInstanceHandle.js +1 -1
- package/src/private/webapis/dom/nodes/specs/NativeDOM.js +26 -192
- package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +15 -12
- package/src/private/webapis/dom/oldstylecollections/NodeList.js +14 -11
- package/src/private/webapis/geometry/DOMRectList.js +2 -2
- package/src/private/webapis/intersectionobserver/internals/IntersectionObserverManager.js +19 -74
- package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +0 -4
- package/src/private/webapis/mutationobserver/internals/MutationObserverManager.js +1 -1
- package/src/private/webapis/performance/EventTiming.js +40 -25
- package/src/private/webapis/performance/LongTasks.js +35 -2
- package/src/private/webapis/performance/Performance.js +347 -166
- package/src/private/webapis/performance/PerformanceEntry.js +40 -23
- package/src/private/webapis/performance/PerformanceObserver.js +37 -29
- package/src/private/webapis/performance/ReactNativeStartupTiming.js +3 -24
- package/src/private/webapis/performance/ResourceTiming.js +29 -18
- package/src/private/webapis/performance/UserTiming.js +92 -34
- package/src/private/webapis/performance/UserTimingExtensibility.js.flow +38 -0
- package/src/private/webapis/performance/internals/RawPerformanceEntry.js +3 -4
- package/src/private/webapis/performance/internals/Utilities.js +9 -0
- package/src/private/webapis/performance/specs/NativePerformance.js +23 -23
- package/src/private/webapis/structuredClone/structuredClone.js +10 -10
- package/src-win/Libraries/Components/Touchable/TouchableWin32.tsx +1 -1
- package/Libraries/Interaction/InteractionManagerStub.js +0 -184
- package/Libraries/Interaction/TaskQueue.js +0 -183
- package/Libraries/ReactNative/ReactNativeFeatureFlags.js +0 -31
|
@@ -47,7 +47,7 @@ function flatAnimatedNodes(
|
|
|
47
47
|
export default class AnimatedTransform extends AnimatedWithChildren {
|
|
48
48
|
// NOTE: For potentially historical reasons, some operations only operate on
|
|
49
49
|
// the first level of AnimatedNode instances. This optimizes that bevavior.
|
|
50
|
-
|
|
50
|
+
_nodes: $ReadOnlyArray<AnimatedNode>;
|
|
51
51
|
|
|
52
52
|
_transforms: $ReadOnlyArray<Transform<>>;
|
|
53
53
|
|
|
@@ -74,12 +74,12 @@ export default class AnimatedTransform extends AnimatedWithChildren {
|
|
|
74
74
|
config?: ?AnimatedNodeConfig,
|
|
75
75
|
) {
|
|
76
76
|
super(config);
|
|
77
|
-
this
|
|
77
|
+
this._nodes = nodes;
|
|
78
78
|
this._transforms = transforms;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
__makeNative(platformConfig: ?PlatformConfig) {
|
|
82
|
-
const nodes = this
|
|
82
|
+
const nodes = this._nodes;
|
|
83
83
|
for (let ii = 0, length = nodes.length; ii < length; ii++) {
|
|
84
84
|
const node = nodes[ii];
|
|
85
85
|
node.__makeNative(platformConfig);
|
|
@@ -112,7 +112,7 @@ export default class AnimatedTransform extends AnimatedWithChildren {
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
__attach(): void {
|
|
115
|
-
const nodes = this
|
|
115
|
+
const nodes = this._nodes;
|
|
116
116
|
for (let ii = 0, length = nodes.length; ii < length; ii++) {
|
|
117
117
|
const node = nodes[ii];
|
|
118
118
|
node.__addChild(this);
|
|
@@ -121,7 +121,7 @@ export default class AnimatedTransform extends AnimatedWithChildren {
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
__detach(): void {
|
|
124
|
-
const nodes = this
|
|
124
|
+
const nodes = this._nodes;
|
|
125
125
|
for (let ii = 0, length = nodes.length; ii < length; ii++) {
|
|
126
126
|
const node = nodes[ii];
|
|
127
127
|
node.__removeChild(this);
|
|
@@ -148,7 +148,7 @@ export default class AnimatedTransform extends AnimatedWithChildren {
|
|
|
148
148
|
transformsConfig.push({
|
|
149
149
|
type: 'static',
|
|
150
150
|
property: key,
|
|
151
|
-
/* $FlowFixMe[incompatible-
|
|
151
|
+
/* $FlowFixMe[incompatible-type] - `value` can be an array or an
|
|
152
152
|
object. This is not currently handled by `transformDataType`.
|
|
153
153
|
Migrating to `TransformObject` might solve this. */
|
|
154
154
|
value: NativeAnimatedHelper.transformDataType(value),
|
|
@@ -18,7 +18,6 @@ import type {AnimatedNodeConfig} from './AnimatedNode';
|
|
|
18
18
|
import type AnimatedTracking from './AnimatedTracking';
|
|
19
19
|
|
|
20
20
|
import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
|
|
21
|
-
import InteractionManager from '../../Interaction/InteractionManager';
|
|
22
21
|
import AnimatedInterpolation from './AnimatedInterpolation';
|
|
23
22
|
import AnimatedWithChildren from './AnimatedWithChildren';
|
|
24
23
|
|
|
@@ -85,8 +84,8 @@ function _executeAsAnimatedBatch(id: string, operation: () => void) {
|
|
|
85
84
|
* See https://reactnative.dev/docs/animatedvalue
|
|
86
85
|
*/
|
|
87
86
|
export default class AnimatedValue extends AnimatedWithChildren {
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
_listenerCount: number;
|
|
88
|
+
_updateSubscription: ?EventSubscription;
|
|
90
89
|
|
|
91
90
|
_value: number;
|
|
92
91
|
_startingValue: number;
|
|
@@ -100,8 +99,8 @@ export default class AnimatedValue extends AnimatedWithChildren {
|
|
|
100
99
|
throw new Error('AnimatedValue: Attempting to set value to undefined');
|
|
101
100
|
}
|
|
102
101
|
|
|
103
|
-
this
|
|
104
|
-
this
|
|
102
|
+
this._listenerCount = 0;
|
|
103
|
+
this._updateSubscription = null;
|
|
105
104
|
|
|
106
105
|
this._startingValue = this._value = value;
|
|
107
106
|
this._offset = 0;
|
|
@@ -127,38 +126,38 @@ export default class AnimatedValue extends AnimatedWithChildren {
|
|
|
127
126
|
|
|
128
127
|
__makeNative(platformConfig: ?PlatformConfig): void {
|
|
129
128
|
super.__makeNative(platformConfig);
|
|
130
|
-
if (this
|
|
131
|
-
this
|
|
129
|
+
if (this._listenerCount > 0) {
|
|
130
|
+
this.__ensureUpdateSubscriptionExists();
|
|
132
131
|
}
|
|
133
132
|
}
|
|
134
133
|
|
|
135
134
|
addListener(callback: (value: any) => mixed): string {
|
|
136
135
|
const id = super.addListener(callback);
|
|
137
|
-
this
|
|
136
|
+
this._listenerCount++;
|
|
138
137
|
if (this.__isNative) {
|
|
139
|
-
this
|
|
138
|
+
this.__ensureUpdateSubscriptionExists();
|
|
140
139
|
}
|
|
141
140
|
return id;
|
|
142
141
|
}
|
|
143
142
|
|
|
144
143
|
removeListener(id: string): void {
|
|
145
144
|
super.removeListener(id);
|
|
146
|
-
this
|
|
147
|
-
if (this.__isNative && this
|
|
148
|
-
this
|
|
145
|
+
this._listenerCount--;
|
|
146
|
+
if (this.__isNative && this._listenerCount === 0) {
|
|
147
|
+
this._updateSubscription?.remove();
|
|
149
148
|
}
|
|
150
149
|
}
|
|
151
150
|
|
|
152
151
|
removeAllListeners(): void {
|
|
153
152
|
super.removeAllListeners();
|
|
154
|
-
this
|
|
153
|
+
this._listenerCount = 0;
|
|
155
154
|
if (this.__isNative) {
|
|
156
|
-
this
|
|
155
|
+
this._updateSubscription?.remove();
|
|
157
156
|
}
|
|
158
157
|
}
|
|
159
158
|
|
|
160
|
-
|
|
161
|
-
if (this
|
|
159
|
+
__ensureUpdateSubscriptionExists(): void {
|
|
160
|
+
if (this._updateSubscription != null) {
|
|
162
161
|
return;
|
|
163
162
|
}
|
|
164
163
|
const nativeTag = this.__getNativeTag();
|
|
@@ -173,13 +172,13 @@ export default class AnimatedValue extends AnimatedWithChildren {
|
|
|
173
172
|
},
|
|
174
173
|
);
|
|
175
174
|
|
|
176
|
-
this
|
|
175
|
+
this._updateSubscription = {
|
|
177
176
|
remove: () => {
|
|
178
177
|
// Only this function assigns to `this.#updateSubscription`.
|
|
179
|
-
if (this
|
|
178
|
+
if (this._updateSubscription == null) {
|
|
180
179
|
return;
|
|
181
180
|
}
|
|
182
|
-
this
|
|
181
|
+
this._updateSubscription = null;
|
|
183
182
|
subscription.remove();
|
|
184
183
|
NativeAnimatedAPI.stopListeningToAnimatedNodeValue(nativeTag);
|
|
185
184
|
},
|
|
@@ -312,10 +311,6 @@ export default class AnimatedValue extends AnimatedWithChildren {
|
|
|
312
311
|
* See https://reactnative.dev/docs/animatedvalue#animate
|
|
313
312
|
*/
|
|
314
313
|
animate(animation: Animation, callback: ?EndCallback): void {
|
|
315
|
-
let handle = null;
|
|
316
|
-
if (animation.__isInteraction) {
|
|
317
|
-
handle = InteractionManager.createInteractionHandle();
|
|
318
|
-
}
|
|
319
314
|
const previousAnimation = this._animation;
|
|
320
315
|
this._animation && this._animation.stop();
|
|
321
316
|
this._animation = animation;
|
|
@@ -328,9 +323,6 @@ export default class AnimatedValue extends AnimatedWithChildren {
|
|
|
328
323
|
},
|
|
329
324
|
result => {
|
|
330
325
|
this._animation = null;
|
|
331
|
-
if (handle !== null) {
|
|
332
|
-
InteractionManager.clearInteractionHandle(handle);
|
|
333
|
-
}
|
|
334
326
|
callback && callback(result);
|
|
335
327
|
},
|
|
336
328
|
previousAnimation,
|
|
@@ -97,7 +97,7 @@ class AppStateImpl {
|
|
|
97
97
|
// It's possible that the state will have changed here & listeners need to be notified
|
|
98
98
|
if (!eventUpdated && this.currentState !== appStateData.app_state) {
|
|
99
99
|
this.currentState = appStateData.app_state;
|
|
100
|
-
// $FlowFixMe[incompatible-
|
|
100
|
+
// $FlowFixMe[incompatible-type]
|
|
101
101
|
emitter.emit('appStateDidChange', appStateData);
|
|
102
102
|
}
|
|
103
103
|
}, logError);
|
|
@@ -120,23 +120,27 @@ class AppStateImpl {
|
|
|
120
120
|
}
|
|
121
121
|
switch (type) {
|
|
122
122
|
case 'change':
|
|
123
|
-
// $
|
|
123
|
+
// $FlowFixMe[invalid-tuple-arity] Flow cannot refine handler based on the event type
|
|
124
124
|
const changeHandler: AppStateStatus => void = handler;
|
|
125
125
|
return emitter.addListener('appStateDidChange', appStateData => {
|
|
126
126
|
changeHandler(appStateData.app_state);
|
|
127
127
|
});
|
|
128
128
|
case 'memoryWarning':
|
|
129
|
-
// $
|
|
129
|
+
// $FlowFixMe[invalid-tuple-arity] Flow cannot refine handler based on the event type
|
|
130
130
|
const memoryWarningHandler: () => void = handler;
|
|
131
131
|
return emitter.addListener('memoryWarning', memoryWarningHandler);
|
|
132
132
|
case 'blur':
|
|
133
133
|
case 'focus':
|
|
134
|
-
// $
|
|
134
|
+
// $FlowFixMe[invalid-tuple-arity] Flow cannot refine handler based on the event type
|
|
135
135
|
const focusOrBlurHandler: () => void = handler;
|
|
136
136
|
return emitter.addListener('appStateFocusChange', hasFocus => {
|
|
137
|
+
/* $FlowFixMe[invalid-compare] Error discovered during Constant
|
|
138
|
+
* Condition roll out. See https://fburl.com/workplace/4oq3zi07. */
|
|
137
139
|
if (type === 'blur' && !hasFocus) {
|
|
138
140
|
focusOrBlurHandler();
|
|
139
141
|
}
|
|
142
|
+
/* $FlowFixMe[invalid-compare] Error discovered during Constant
|
|
143
|
+
* Condition roll out. See https://fburl.com/workplace/4oq3zi07. */
|
|
140
144
|
if (type === 'focus' && hasFocus) {
|
|
141
145
|
focusOrBlurHandler();
|
|
142
146
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @flow strict
|
|
8
8
|
* @format
|
|
9
|
+
* @deprecated
|
|
9
10
|
*/
|
|
10
11
|
|
|
11
12
|
'use strict';
|
|
@@ -162,6 +163,8 @@ class MessageQueue {
|
|
|
162
163
|
|
|
163
164
|
getCallableModule(name: string): {...} | null {
|
|
164
165
|
const getValue = this._lazyCallableModules[name];
|
|
166
|
+
/* $FlowFixMe[constant-condition] Error discovered during Constant
|
|
167
|
+
* Condition roll out. See https://fburl.com/workplace/1v97vimq. */
|
|
165
168
|
return getValue ? getValue() : null;
|
|
166
169
|
}
|
|
167
170
|
|
|
@@ -466,6 +469,8 @@ class MessageQueue {
|
|
|
466
469
|
const profileName = debug
|
|
467
470
|
? '<callback for ' + module + '.' + method + '>'
|
|
468
471
|
: cbID;
|
|
472
|
+
/* $FlowFixMe[constant-condition] Error discovered during Constant
|
|
473
|
+
* Condition roll out. See https://fburl.com/workplace/1v97vimq. */
|
|
469
474
|
if (callback && this.__spy) {
|
|
470
475
|
this.__spy({type: TO_JS, module: null, method: profileName, args});
|
|
471
476
|
}
|
|
@@ -173,7 +173,7 @@ function updateErrorWithErrorData(
|
|
|
173
173
|
): ExtendedError {
|
|
174
174
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for this
|
|
175
175
|
* parameters */
|
|
176
|
-
// $FlowFixMe[incompatible-
|
|
176
|
+
// $FlowFixMe[incompatible-type]
|
|
177
177
|
// $FlowFixMe[unsafe-object-assign]
|
|
178
178
|
return Object.assign(error, errorData || {});
|
|
179
179
|
}
|
|
@@ -86,7 +86,7 @@ class BlobManager {
|
|
|
86
86
|
});
|
|
87
87
|
const size = items.reduce((acc, curr) => {
|
|
88
88
|
if (curr.type === 'string') {
|
|
89
|
-
/* $FlowFixMe[incompatible-
|
|
89
|
+
/* $FlowFixMe[incompatible-type] Natural Inference rollout. See
|
|
90
90
|
* https://fburl.com/workplace/6291gfvu */
|
|
91
91
|
return acc + global.unescape(encodeURI(curr.data)).length;
|
|
92
92
|
} else {
|
|
@@ -18,6 +18,8 @@ export class URLSearchParams {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
constructor(params?: Record<string, string> | string | [string, string][]) {
|
|
21
|
+
/* $FlowFixMe[invalid-compare] Error discovered during Constant Condition
|
|
22
|
+
* roll out. See https://fburl.com/workplace/5whu3i34. */
|
|
21
23
|
if (params === null) {
|
|
22
24
|
return;
|
|
23
25
|
}
|
|
@@ -396,13 +396,13 @@ const AccessibilityInfo = {
|
|
|
396
396
|
*/
|
|
397
397
|
addEventListener<K: $Keys<AccessibilityEventDefinitions>>(
|
|
398
398
|
eventName: K,
|
|
399
|
-
// $
|
|
399
|
+
// $FlowFixMe[incompatible-type] - Flow bug with unions and generics (T128099423)
|
|
400
400
|
handler: (...AccessibilityEventDefinitions[K]) => void,
|
|
401
401
|
): EventSubscription {
|
|
402
402
|
const deviceEventName = EventNames.get(eventName);
|
|
403
403
|
return deviceEventName == null
|
|
404
404
|
? {remove(): void {}}
|
|
405
|
-
: // $FlowFixMe[incompatible-
|
|
405
|
+
: // $FlowFixMe[incompatible-type]
|
|
406
406
|
RCTDeviceEventEmitter.addListener(deviceEventName, handler);
|
|
407
407
|
},
|
|
408
408
|
|
|
@@ -420,13 +420,13 @@ const AccessibilityInfo = {
|
|
|
420
420
|
*/
|
|
421
421
|
addEventListener<K: $Keys<AccessibilityEventDefinitions>>(
|
|
422
422
|
eventName: K,
|
|
423
|
-
// $
|
|
423
|
+
// $FlowFixMe[incompatible-type] - Flow bug with unions and generics (T128099423)
|
|
424
424
|
handler: (...AccessibilityEventDefinitions[K]) => void,
|
|
425
425
|
): EventSubscription {
|
|
426
426
|
const deviceEventName = EventNames.get(eventName);
|
|
427
427
|
return deviceEventName == null
|
|
428
428
|
? {remove(): void {}}
|
|
429
|
-
: // $FlowFixMe[incompatible-
|
|
429
|
+
: // $FlowFixMe[incompatible-type]
|
|
430
430
|
RCTDeviceEventEmitter.addListener(deviceEventName, handler);
|
|
431
431
|
},
|
|
432
432
|
|
|
@@ -386,7 +386,7 @@ const Button: component(
|
|
|
386
386
|
touchSoundDisabled={touchSoundDisabled}
|
|
387
387
|
// $FlowFixMe[incompatible-exact]
|
|
388
388
|
// $FlowFixMe[prop-missing]
|
|
389
|
-
// $FlowFixMe[incompatible-type
|
|
389
|
+
// $FlowFixMe[incompatible-type]
|
|
390
390
|
ref={ref}>
|
|
391
391
|
<View style={buttonStyles}>
|
|
392
392
|
<Text style={textStyles} disabled={disabled}>
|
|
@@ -394,7 +394,7 @@ const Button: component(
|
|
|
394
394
|
touchSoundDisabled={touchSoundDisabled}
|
|
395
395
|
// $FlowFixMe[incompatible-exact]
|
|
396
396
|
// $FlowFixMe[prop-missing]
|
|
397
|
-
// $FlowFixMe[incompatible-type
|
|
397
|
+
// $FlowFixMe[incompatible-type]
|
|
398
398
|
ref={ref}>
|
|
399
399
|
<View style={buttonStyles}>
|
|
400
400
|
<Text style={textStyles} disabled={disabled}>
|
|
@@ -116,6 +116,12 @@ type PressableBaseProps = $ReadOnly<{
|
|
|
116
116
|
*/
|
|
117
117
|
onPressOut?: ?(event: GestureResponderEvent) => mixed,
|
|
118
118
|
|
|
119
|
+
/**
|
|
120
|
+
* Whether to prevent any other native components from becoming responder
|
|
121
|
+
* while this pressable is responder.
|
|
122
|
+
*/
|
|
123
|
+
blockNativeResponder?: ?boolean,
|
|
124
|
+
|
|
119
125
|
/**
|
|
120
126
|
* Either view styles or a function that receives a boolean reflecting whether
|
|
121
127
|
* the component is currently pressed and returns view styles.
|
|
@@ -183,6 +189,7 @@ function Pressable({
|
|
|
183
189
|
'aria-expanded': ariaExpanded,
|
|
184
190
|
'aria-label': ariaLabel,
|
|
185
191
|
'aria-selected': ariaSelected,
|
|
192
|
+
blockNativeResponder,
|
|
186
193
|
cancelable,
|
|
187
194
|
children,
|
|
188
195
|
delayHoverIn,
|
|
@@ -236,7 +243,7 @@ function Pressable({
|
|
|
236
243
|
};
|
|
237
244
|
|
|
238
245
|
const accessibilityLiveRegion =
|
|
239
|
-
ariaLive === 'off' ? 'none' : ariaLive ?? props.accessibilityLiveRegion;
|
|
246
|
+
ariaLive === 'off' ? 'none' : (ariaLive ?? props.accessibilityLiveRegion);
|
|
240
247
|
|
|
241
248
|
const accessibilityLabel = ariaLabel ?? props.accessibilityLabel;
|
|
242
249
|
const restPropsWithDefaults: React.ElementConfig<typeof View> = {
|
|
@@ -294,10 +301,12 @@ function Pressable({
|
|
|
294
301
|
onPressOut(event);
|
|
295
302
|
}
|
|
296
303
|
},
|
|
304
|
+
blockNativeResponder,
|
|
297
305
|
}),
|
|
298
306
|
[
|
|
299
307
|
android_disableSound,
|
|
300
308
|
android_rippleConfig,
|
|
309
|
+
blockNativeResponder,
|
|
301
310
|
cancelable,
|
|
302
311
|
delayHoverIn,
|
|
303
312
|
delayHoverOut,
|
|
@@ -122,6 +122,12 @@ type PressableBaseProps = $ReadOnly<{
|
|
|
122
122
|
*/
|
|
123
123
|
onPressOut?: ?(event: GestureResponderEvent) => mixed,
|
|
124
124
|
|
|
125
|
+
/**
|
|
126
|
+
* Whether to prevent any other native components from becoming responder
|
|
127
|
+
* while this pressable is responder.
|
|
128
|
+
*/
|
|
129
|
+
blockNativeResponder?: ?boolean,
|
|
130
|
+
|
|
125
131
|
/**
|
|
126
132
|
* Called after the element loses focus.
|
|
127
133
|
*/
|
|
@@ -231,6 +237,7 @@ function Pressable({
|
|
|
231
237
|
'aria-multiselectable': ariaMultiselectable, // Win32
|
|
232
238
|
'aria-required': ariaRequired, // Win32
|
|
233
239
|
'aria-selected': ariaSelected,
|
|
240
|
+
blockNativeResponder,
|
|
234
241
|
cancelable,
|
|
235
242
|
children,
|
|
236
243
|
delayHoverIn,
|
|
@@ -348,6 +355,7 @@ function Pressable({
|
|
|
348
355
|
onPressOut(event);
|
|
349
356
|
}
|
|
350
357
|
},
|
|
358
|
+
blockNativeResponder,
|
|
351
359
|
// [Windows
|
|
352
360
|
onKeyDown,
|
|
353
361
|
onKeyUp,
|
|
@@ -356,6 +364,7 @@ function Pressable({
|
|
|
356
364
|
[
|
|
357
365
|
android_disableSound,
|
|
358
366
|
android_rippleConfig,
|
|
367
|
+
blockNativeResponder,
|
|
359
368
|
cancelable,
|
|
360
369
|
delayHoverIn,
|
|
361
370
|
delayHoverOut,
|
|
@@ -71,9 +71,9 @@ export default function useAndroidRippleForView(
|
|
|
71
71
|
return {
|
|
72
72
|
viewProps:
|
|
73
73
|
foreground === true
|
|
74
|
-
? // $FlowFixMe[incompatible-
|
|
74
|
+
? // $FlowFixMe[incompatible-type]
|
|
75
75
|
{nativeForegroundAndroid: nativeRippleValue}
|
|
76
|
-
: // $FlowFixMe[incompatible-
|
|
76
|
+
: // $FlowFixMe[incompatible-type]
|
|
77
77
|
{nativeBackgroundAndroid: nativeRippleValue},
|
|
78
78
|
onPressIn(event: GestureResponderEvent): void {
|
|
79
79
|
const view = viewRef.current;
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
VScrollContentViewNativeComponent,
|
|
32
32
|
VScrollViewNativeComponent,
|
|
33
33
|
} from '../../../src/private/components/scrollview/VScrollViewNativeComponents';
|
|
34
|
+
import * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags';
|
|
34
35
|
import AnimatedImplementation from '../../Animated/AnimatedImplementation';
|
|
35
36
|
import FrameRateLogger from '../../Interaction/FrameRateLogger';
|
|
36
37
|
import {findNodeHandle} from '../../ReactNative/RendererProxy';
|
|
@@ -1169,6 +1170,7 @@ class ScrollView extends React.Component<ScrollViewProps, ScrollViewState> {
|
|
|
1169
1170
|
// they are callable from the ref.
|
|
1170
1171
|
|
|
1171
1172
|
// $FlowFixMe[prop-missing] - Known issue with appending custom methods.
|
|
1173
|
+
// $FlowFixMe[incompatible-type]
|
|
1172
1174
|
// $FlowFixMe[unsafe-object-assign]
|
|
1173
1175
|
const publicInstance: PublicScrollViewInstance = Object.assign(
|
|
1174
1176
|
nativeInstance,
|
|
@@ -1502,7 +1504,7 @@ class ScrollView extends React.Component<ScrollViewProps, ScrollViewState> {
|
|
|
1502
1504
|
keyboardNeverPersistTaps &&
|
|
1503
1505
|
this._keyboardIsDismissible() &&
|
|
1504
1506
|
e.target != null &&
|
|
1505
|
-
// $FlowFixMe[incompatible-type]
|
|
1507
|
+
// $FlowFixMe[incompatible-type] Error supressed during the migration of HostInstance to ReactNativeElement
|
|
1506
1508
|
!TextInputState.isTextInput(e.target)
|
|
1507
1509
|
) {
|
|
1508
1510
|
return true;
|
|
@@ -1751,8 +1753,11 @@ class ScrollView extends React.Component<ScrollViewProps, ScrollViewState> {
|
|
|
1751
1753
|
|
|
1752
1754
|
const baseStyle = horizontal ? styles.baseHorizontal : styles.baseVertical;
|
|
1753
1755
|
|
|
1754
|
-
const {
|
|
1755
|
-
|
|
1756
|
+
const {
|
|
1757
|
+
experimental_endDraggingSensitivityMultiplier,
|
|
1758
|
+
maintainVisibleContentPosition,
|
|
1759
|
+
...otherProps
|
|
1760
|
+
} = this.props;
|
|
1756
1761
|
const props = {
|
|
1757
1762
|
...otherProps,
|
|
1758
1763
|
alwaysBounceHorizontal,
|
|
@@ -1805,6 +1810,10 @@ class ScrollView extends React.Component<ScrollViewProps, ScrollViewState> {
|
|
|
1805
1810
|
this.props.snapToInterval != null ||
|
|
1806
1811
|
this.props.snapToOffsets != null,
|
|
1807
1812
|
}),
|
|
1813
|
+
maintainVisibleContentPosition:
|
|
1814
|
+
ReactNativeFeatureFlags.disableMaintainVisibleContentPosition()
|
|
1815
|
+
? undefined
|
|
1816
|
+
: this.props.maintainVisibleContentPosition,
|
|
1808
1817
|
};
|
|
1809
1818
|
|
|
1810
1819
|
const {decelerationRate} = this.props;
|
|
@@ -1834,7 +1843,7 @@ class ScrollView extends React.Component<ScrollViewProps, ScrollViewState> {
|
|
|
1834
1843
|
// Note: we should split props.style on the inner and outer props
|
|
1835
1844
|
// however, the ScrollView still needs the baseStyle to be scrollable
|
|
1836
1845
|
const {outer, inner} = splitLayoutProps(flattenStyle(props.style));
|
|
1837
|
-
// $FlowFixMe[incompatible-
|
|
1846
|
+
// $FlowFixMe[incompatible-type]
|
|
1838
1847
|
return cloneElement(
|
|
1839
1848
|
refreshControl,
|
|
1840
1849
|
{style: StyleSheet.compose(baseStyle, outer)},
|
|
@@ -78,7 +78,7 @@ const ScrollViewStickyHeader: component(
|
|
|
78
78
|
setIsFabric(isFabricPublicInstance(ref));
|
|
79
79
|
}, []);
|
|
80
80
|
const ref: React.RefSetter<React.ElementRef<typeof Animated.View>> =
|
|
81
|
-
// $FlowFixMe[
|
|
81
|
+
// $FlowFixMe[incompatible-type] - Instance is mutated to have `setNextHeaderY`.
|
|
82
82
|
useMergeRefs<Instance>(callbackRef, forwardedRef);
|
|
83
83
|
|
|
84
84
|
const offset = useMemo(
|
|
@@ -235,8 +235,8 @@ class StatusBar extends React.Component<StatusBarProps> {
|
|
|
235
235
|
static _defaultProps: any = createStackEntry({
|
|
236
236
|
backgroundColor:
|
|
237
237
|
Platform.OS === 'android'
|
|
238
|
-
? NativeStatusBarManagerAndroid.getConstants()
|
|
239
|
-
.DEFAULT_BACKGROUND_COLOR ?? 'black'
|
|
238
|
+
? (NativeStatusBarManagerAndroid.getConstants()
|
|
239
|
+
.DEFAULT_BACKGROUND_COLOR ?? 'black')
|
|
240
240
|
: 'black',
|
|
241
241
|
barStyle: 'default',
|
|
242
242
|
translucent: false,
|
|
@@ -215,7 +215,7 @@ const Switch: component(
|
|
|
215
215
|
native.value != null && native.value !== jsValue;
|
|
216
216
|
if (
|
|
217
217
|
shouldUpdateNativeSwitch &&
|
|
218
|
-
// $
|
|
218
|
+
// $FlowFixMe[method-unbinding]
|
|
219
219
|
nativeSwitchRef.current?.setNativeProps != null
|
|
220
220
|
) {
|
|
221
221
|
if (Platform.OS === 'android') {
|
|
@@ -18,6 +18,7 @@ import type {
|
|
|
18
18
|
} from '../../Types/CoreEventTypes';
|
|
19
19
|
import type {ViewProps} from '../View/ViewPropTypes';
|
|
20
20
|
|
|
21
|
+
import ReactNativeElement from '../../../src/private/webapis/dom/nodes/ReactNativeElement';
|
|
21
22
|
import {type ColorValue, type TextStyleProp} from '../../StyleSheet/StyleSheet';
|
|
22
23
|
import * as React from 'react';
|
|
23
24
|
|
|
@@ -1037,13 +1038,19 @@ export type TextInputProps = $ReadOnly<{
|
|
|
1037
1038
|
...TextInputBaseProps,
|
|
1038
1039
|
}>;
|
|
1039
1040
|
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1041
|
+
/**
|
|
1042
|
+
* TextInput monkey-patches the native element instance with these methods.
|
|
1043
|
+
* It isn't technically a class but this is the most elegant way to type it.
|
|
1044
|
+
*/
|
|
1045
|
+
declare class _TextInputInstance extends ReactNativeElement {
|
|
1046
|
+
clear(): void;
|
|
1047
|
+
isFocused(): boolean;
|
|
1048
|
+
getNativeRef(): ?ReactNativeElement;
|
|
1049
|
+
setSelection(start: number, end: number): void;
|
|
1045
1050
|
}
|
|
1046
1051
|
|
|
1052
|
+
export type TextInputInstance = _TextInputInstance;
|
|
1053
|
+
|
|
1047
1054
|
/**
|
|
1048
1055
|
* A foundational component for inputting text into the app via a
|
|
1049
1056
|
* keyboard. Props provide configurability for several features, such as
|
|
@@ -18,6 +18,7 @@ import type {
|
|
|
18
18
|
} from '../../Types/CoreEventTypes';
|
|
19
19
|
import type {ViewProps} from '../View/ViewPropTypes';
|
|
20
20
|
|
|
21
|
+
import ReactNativeElement from '../../../src/private/webapis/dom/nodes/ReactNativeElement';
|
|
21
22
|
import {type ColorValue, type TextStyleProp} from '../../StyleSheet/StyleSheet';
|
|
22
23
|
import * as React from 'react';
|
|
23
24
|
|
|
@@ -1071,13 +1072,19 @@ export type TextInputProps = $ReadOnly<{
|
|
|
1071
1072
|
...TextInputWindowsProps, // [Windows]
|
|
1072
1073
|
}>;
|
|
1073
1074
|
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1075
|
+
/**
|
|
1076
|
+
* TextInput monkey-patches the native element instance with these methods.
|
|
1077
|
+
* It isn't technically a class but this is the most elegant way to type it.
|
|
1078
|
+
*/
|
|
1079
|
+
declare class _TextInputInstance extends ReactNativeElement {
|
|
1080
|
+
clear(): void;
|
|
1081
|
+
isFocused(): boolean;
|
|
1082
|
+
getNativeRef(): ?ReactNativeElement;
|
|
1083
|
+
setSelection(start: number, end: number): void;
|
|
1079
1084
|
}
|
|
1080
1085
|
|
|
1086
|
+
export type TextInputInstance = _TextInputInstance;
|
|
1087
|
+
|
|
1081
1088
|
/**
|
|
1082
1089
|
* A foundational component for inputting text into the app via a
|
|
1083
1090
|
* keyboard. Props provide configurability for several features, such as
|
|
@@ -487,7 +487,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
|
|
|
487
487
|
[mostRecentEventCount, viewCommands],
|
|
488
488
|
);
|
|
489
489
|
|
|
490
|
-
// $FlowExpectedError[incompatible-
|
|
490
|
+
// $FlowExpectedError[incompatible-type]
|
|
491
491
|
const ref = useMergeRefs<HostInstance>(setLocalRef, props.forwardedRef);
|
|
492
492
|
|
|
493
493
|
const _onChange = (event: TextInputChangeEvent) => {
|
|
@@ -647,7 +647,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
|
|
|
647
647
|
if (typeof flattenedStyle?.fontWeight === 'number') {
|
|
648
648
|
overrides = overrides || ({}: {...TextStyleInternal});
|
|
649
649
|
overrides.fontWeight =
|
|
650
|
-
// $FlowFixMe[incompatible-
|
|
650
|
+
// $FlowFixMe[incompatible-type]
|
|
651
651
|
(flattenedStyle.fontWeight.toString(): TextStyleInternal['fontWeight']);
|
|
652
652
|
}
|
|
653
653
|
|
|
@@ -677,6 +677,9 @@ function InternalTextInput(props: TextInputProps): React.Node {
|
|
|
677
677
|
flattenedStyle.paddingVertical == null &&
|
|
678
678
|
flattenedStyle.paddingTop == null));
|
|
679
679
|
|
|
680
|
+
const _accessibilityElementsHidden =
|
|
681
|
+
props['aria-hidden'] ?? props.accessibilityElementsHidden;
|
|
682
|
+
|
|
680
683
|
textInput = (
|
|
681
684
|
<RCTTextInputView
|
|
682
685
|
// Figure out imperative + forward refs.
|
|
@@ -686,6 +689,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
|
|
|
686
689
|
acceptDragAndDropTypes={props.experimental_acceptDragAndDropTypes}
|
|
687
690
|
accessibilityLabel={_accessibilityLabel}
|
|
688
691
|
accessibilityState={_accessibilityState}
|
|
692
|
+
accessibilityElementsHidden={_accessibilityElementsHidden}
|
|
689
693
|
accessible={accessible}
|
|
690
694
|
submitBehavior={submitBehavior}
|
|
691
695
|
caretHidden={caretHidden}
|
|
@@ -714,6 +718,10 @@ function InternalTextInput(props: TextInputProps): React.Node {
|
|
|
714
718
|
const autoCapitalize = props.autoCapitalize || 'sentences';
|
|
715
719
|
const _accessibilityLabelledBy =
|
|
716
720
|
props?.['aria-labelledby'] ?? props?.accessibilityLabelledBy;
|
|
721
|
+
const _importantForAccessibility =
|
|
722
|
+
props['aria-hidden'] === true
|
|
723
|
+
? ('no-hide-descendants' as const)
|
|
724
|
+
: undefined;
|
|
717
725
|
const placeholder = props.placeholder ?? '';
|
|
718
726
|
let children = props.children;
|
|
719
727
|
const childCount = React.Children.count(children);
|
|
@@ -759,6 +767,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
|
|
|
759
767
|
children={children}
|
|
760
768
|
disableFullscreenUI={props.disableFullscreenUI}
|
|
761
769
|
focusable={tabIndex !== undefined ? !tabIndex : focusable}
|
|
770
|
+
importantForAccessibility={_importantForAccessibility}
|
|
762
771
|
mostRecentEventCount={mostRecentEventCount}
|
|
763
772
|
nativeID={id ?? props.nativeID}
|
|
764
773
|
numberOfLines={props.rows ?? props.numberOfLines}
|
|
@@ -768,7 +777,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
|
|
|
768
777
|
/* $FlowFixMe[prop-missing] the types for AndroidTextInput don't match
|
|
769
778
|
* up exactly with the props for TextInput. This will need to get fixed
|
|
770
779
|
*/
|
|
771
|
-
/* $FlowFixMe[incompatible-type
|
|
780
|
+
/* $FlowFixMe[incompatible-type] the types for AndroidTextInput
|
|
772
781
|
* don't match up exactly with the props for TextInput. This will need
|
|
773
782
|
* to get fixed */
|
|
774
783
|
onScroll={_onScroll}
|
|
@@ -920,8 +929,8 @@ const TextInput: component(
|
|
|
920
929
|
Platform.OS === 'android'
|
|
921
930
|
? // $FlowFixMe[invalid-computed-prop]
|
|
922
931
|
// $FlowFixMe[prop-missing]
|
|
923
|
-
autoCompleteWebToAutoCompleteAndroidMap[autoComplete] ??
|
|
924
|
-
autoComplete
|
|
932
|
+
(autoCompleteWebToAutoCompleteAndroidMap[autoComplete] ??
|
|
933
|
+
autoComplete)
|
|
925
934
|
: undefined
|
|
926
935
|
}
|
|
927
936
|
textContentType={
|