@office-iss/react-native-win32 0.79.1 → 0.80.0

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.
Files changed (294) hide show
  1. package/.flowconfig +10 -3
  2. package/CHANGELOG.json +117 -24
  3. package/CHANGELOG.md +49 -14
  4. package/IntegrationTests/ImageCachePolicyTest.js +1 -1
  5. package/IntegrationTests/LayoutEventsTest.js +1 -4
  6. package/Libraries/Alert/Alert.d.ts +4 -1
  7. package/Libraries/Alert/Alert.js +3 -0
  8. package/Libraries/Alert/RCTAlertManager.js +17 -0
  9. package/Libraries/Animated/Animated.js.flow +1 -3
  10. package/Libraries/Animated/AnimatedEvent.js +4 -3
  11. package/Libraries/Animated/AnimatedExports.js +2 -2
  12. package/Libraries/Animated/AnimatedExports.js.flow +140 -0
  13. package/Libraries/Animated/AnimatedImplementation.js +2 -123
  14. package/Libraries/Animated/Easing.js +13 -15
  15. package/Libraries/Animated/animations/Animation.js +8 -4
  16. package/Libraries/Animated/components/AnimatedFlatList.js +7 -6
  17. package/Libraries/Animated/components/AnimatedScrollView.js +48 -42
  18. package/Libraries/Animated/components/AnimatedSectionList.js +11 -7
  19. package/Libraries/Animated/createAnimatedComponent.js +105 -57
  20. package/Libraries/Animated/nodes/AnimatedNode.js +4 -3
  21. package/Libraries/Animated/nodes/AnimatedProps.js +46 -26
  22. package/Libraries/Animated/nodes/AnimatedValue.js +16 -7
  23. package/Libraries/Animated/nodes/AnimatedValueXY.js +3 -1
  24. package/Libraries/AppState/AppState.js +7 -2
  25. package/Libraries/BatchedBridge/MessageQueue.js +2 -2
  26. package/Libraries/BatchedBridge/NativeModules.js +2 -0
  27. package/Libraries/Blob/BlobManager.js +1 -0
  28. package/Libraries/Blob/FileReader.js +219 -8
  29. package/Libraries/Blob/URL.js +37 -12
  30. package/Libraries/Blob/URLSearchParams.js +106 -31
  31. package/Libraries/Blob/URLSearchParams.js.flow +12 -7
  32. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +1 -1
  33. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +1 -1
  34. package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.js +17 -0
  35. package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +1 -0
  36. package/Libraries/Components/Button.js +1 -1
  37. package/Libraries/Components/Button.win32.js +1 -1
  38. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -3
  39. package/Libraries/{NewAppScreen/components/Colors.js → Components/DrawerAndroid/DrawerLayoutAndroid.ios.js} +6 -10
  40. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +6 -66
  41. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js.flow +18 -0
  42. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidFallback.js +71 -0
  43. package/Libraries/Components/Keyboard/Keyboard.js +5 -3
  44. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +6 -3
  45. package/Libraries/Components/Pressable/Pressable.js +20 -4
  46. package/Libraries/Components/Pressable/Pressable.win32.js +20 -4
  47. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +25 -3
  48. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidTypes.js +29 -20
  49. package/Libraries/Components/RefreshControl/RefreshControl.js +1 -1
  50. package/Libraries/Components/ScrollView/ScrollView.d.ts +3 -3
  51. package/Libraries/Components/ScrollView/ScrollView.js +132 -122
  52. package/Libraries/Components/StaticRenderer.js +1 -1
  53. package/Libraries/Components/Switch/Switch.d.ts +3 -0
  54. package/Libraries/Components/Switch/Switch.js +8 -4
  55. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +2 -1
  56. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +2 -4
  57. package/Libraries/Components/TextInput/Tests/TextInputTest.d.ts +2 -1
  58. package/Libraries/Components/TextInput/Tests/TextInputTest.js.map +1 -1
  59. package/Libraries/Components/TextInput/TextInput.d.ts +70 -33
  60. package/Libraries/Components/TextInput/TextInput.flow.js +100 -51
  61. package/Libraries/Components/TextInput/TextInput.flow.win32.js +1208 -0
  62. package/Libraries/Components/TextInput/TextInput.js +88 -1027
  63. package/Libraries/Components/TextInput/TextInput.win32.js +89 -1059
  64. package/Libraries/Components/TextInput/TextInputState.js +1 -1
  65. package/Libraries/Components/TextInput/TextInputState.win32.js +1 -1
  66. package/Libraries/{Modal/ModalInjection.js → Components/ToastAndroid/ToastAndroid.ios.js} +3 -5
  67. package/Libraries/Components/ToastAndroid/ToastAndroid.js +4 -32
  68. package/Libraries/Components/ToastAndroid/ToastAndroid.js.flow +109 -0
  69. package/Libraries/Components/ToastAndroid/ToastAndroid.win32.js +4 -32
  70. package/Libraries/Components/ToastAndroid/ToastAndroidFallback.js +45 -0
  71. package/Libraries/Components/Touchable/Tests/TouchableWin32Test.d.ts +2 -1
  72. package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js.map +1 -1
  73. package/Libraries/Components/Touchable/Touchable.js +5 -5
  74. package/Libraries/Components/Touchable/Touchable.win32.js +5 -5
  75. package/Libraries/Components/Touchable/TouchableBounce.js +14 -7
  76. package/Libraries/Components/Touchable/TouchableHighlight.js +10 -7
  77. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +6 -6
  78. package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +6 -6
  79. package/Libraries/Components/Touchable/TouchableOpacity.js +13 -6
  80. package/Libraries/Components/View/View.js +18 -21
  81. package/Libraries/Components/View/View.win32.js +21 -24
  82. package/Libraries/Components/View/ViewAccessibility.js +25 -1
  83. package/Libraries/Components/View/ViewAccessibility.win32.js +9 -1
  84. package/Libraries/Components/View/ViewPropTypes.js +49 -3
  85. package/Libraries/Components/View/ViewPropTypes.win32.js +49 -3
  86. package/Libraries/Core/ReactNativeVersion.js +1 -1
  87. package/Libraries/Core/setUpReactDevTools.js +5 -5
  88. package/Libraries/Debugging/DebuggingOverlayRegistry.js +3 -3
  89. package/Libraries/EventEmitter/NativeEventEmitter.js +9 -4
  90. package/Libraries/Image/AssetSourceResolver.js +17 -4
  91. package/Libraries/Image/Image.d.ts +26 -10
  92. package/Libraries/Image/Image.js +17 -0
  93. package/Libraries/Image/Image.js.flow +5 -5
  94. package/Libraries/Image/ImageBackground.js +2 -0
  95. package/Libraries/Image/ImageInjection.js +1 -1
  96. package/Libraries/Image/ImageProps.js +22 -17
  97. package/Libraries/Image/ImageSource.js +3 -1
  98. package/Libraries/Image/ImageSourceUtils.js +4 -2
  99. package/Libraries/Image/ImageTypes.flow.js +1 -1
  100. package/Libraries/Image/Tests/ImageWin32Test.d.ts +2 -1
  101. package/Libraries/Image/Tests/ImageWin32Test.js.map +1 -1
  102. package/Libraries/Interaction/InteractionManager.d.ts +13 -0
  103. package/Libraries/Interaction/InteractionManager.js +1 -1
  104. package/Libraries/Interaction/PanResponder.js +3 -3
  105. package/Libraries/Interaction/TaskQueue.js +1 -0
  106. package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -2
  107. package/Libraries/Linking/Linking.js +1 -1
  108. package/Libraries/Lists/FlatList.d.ts +2 -2
  109. package/Libraries/Lists/FlatList.js +8 -11
  110. package/Libraries/Lists/SectionList.js +39 -42
  111. package/Libraries/Lists/SectionListModern.js +25 -34
  112. package/Libraries/Lists/VirtualizedList.js +1 -0
  113. package/Libraries/Lists/VirtualizedSectionList.js +1 -0
  114. package/Libraries/LogBox/Data/LogBoxData.js +1 -1
  115. package/Libraries/LogBox/LogBoxNotificationContainer.js +1 -1
  116. package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.win32.js +140 -0
  117. package/Libraries/Modal/Modal.js +33 -7
  118. package/Libraries/NativeComponent/BaseViewConfig.android.js +2 -0
  119. package/Libraries/NativeComponent/BaseViewConfig.ios.js +2 -0
  120. package/Libraries/NativeComponent/BaseViewConfig.js +17 -0
  121. package/Libraries/NativeComponent/BaseViewConfig.win32.js +1 -0
  122. package/Libraries/NativeComponent/PlatformBaseViewConfig.js +2 -2
  123. package/Libraries/NativeModules/specs/NativeDevMenu.js +2 -2
  124. package/Libraries/Network/RCTNetworking.android.js +1 -1
  125. package/Libraries/Network/RCTNetworking.ios.js +1 -1
  126. package/Libraries/Network/RCTNetworking.js +17 -0
  127. package/Libraries/Network/RCTNetworking.js.flow +1 -1
  128. package/Libraries/Network/RCTNetworking.win32.js +1 -1
  129. package/Libraries/Network/XMLHttpRequest.js +781 -10
  130. package/Libraries/Performance/Systrace.js +7 -7
  131. package/Libraries/Pressability/Pressability.js +1 -1
  132. package/Libraries/Pressability/Pressability.win32.js +1 -1
  133. package/Libraries/ReactNative/AppContainer-dev.js +5 -4
  134. package/Libraries/ReactNative/AppRegistry.flow.js +49 -0
  135. package/Libraries/ReactNative/AppRegistry.js +2 -322
  136. package/Libraries/ReactNative/AppRegistry.js.flow +23 -0
  137. package/Libraries/ReactNative/AppRegistryImpl.js +316 -0
  138. package/Libraries/ReactNative/FabricUIManager.js +10 -0
  139. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +2 -4
  140. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +1 -4
  141. package/Libraries/ReactNative/RendererImplementation.js +10 -5
  142. package/Libraries/ReactNative/getNativeComponentAttributes.js +1 -0
  143. package/Libraries/ReactNative/renderApplication.js +9 -0
  144. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +3 -3
  145. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js.flow +51 -0
  146. package/Libraries/Renderer/implementations/ReactFabric-dev.js +4840 -4748
  147. package/Libraries/Renderer/implementations/ReactFabric-prod.js +4947 -4829
  148. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3998 -3888
  149. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +5005 -4948
  150. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +2744 -2652
  151. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +5020 -4933
  152. package/Libraries/Renderer/shims/ReactNativeTypes.js +3 -3
  153. package/Libraries/Settings/Settings.ios.js +1 -0
  154. package/Libraries/Settings/Settings.js +13 -19
  155. package/Libraries/Settings/Settings.win32.js +19 -20
  156. package/Libraries/Settings/SettingsFallback.js +33 -0
  157. package/Libraries/StyleSheet/PlatformColorValueTypes.js +15 -0
  158. package/Libraries/StyleSheet/PlatformColorValueTypesIOS.js +6 -0
  159. package/Libraries/StyleSheet/Rect.js +1 -0
  160. package/Libraries/StyleSheet/StyleSheet.js +31 -200
  161. package/Libraries/StyleSheet/StyleSheet.js.flow +188 -0
  162. package/Libraries/StyleSheet/{StyleSheet.win32.js → StyleSheetExports.js} +2 -151
  163. package/Libraries/StyleSheet/StyleSheetExports.js.flow +112 -0
  164. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -1
  165. package/Libraries/StyleSheet/StyleSheetTypes.js +130 -52
  166. package/Libraries/StyleSheet/flattenStyle.js +14 -4
  167. package/Libraries/StyleSheet/private/_TransformStyle.js +49 -21
  168. package/Libraries/StyleSheet/processBackgroundImage.js +670 -214
  169. package/Libraries/Text/Text.d.ts +2 -5
  170. package/Libraries/Text/Text.js +3 -3
  171. package/Libraries/Text/Text.win32.js +3 -3
  172. package/Libraries/Text/TextNativeComponent.js +0 -4
  173. package/Libraries/Text/TextNativeComponent.win32.js +0 -4
  174. package/Libraries/Text/TextProps.js +5 -33
  175. package/Libraries/Text/TextProps.win32.js +5 -30
  176. package/Libraries/Types/CodegenTypesNamespace.d.ts +45 -0
  177. package/Libraries/{Blob/__mocks__/BlobModule.js → Types/CodegenTypesNamespace.js} +4 -6
  178. package/Libraries/Types/CoreEventTypes.d.ts +6 -1
  179. package/Libraries/Types/CoreEventTypes.js +1 -1
  180. package/Libraries/Types/CoreEventTypes.win32.js +1 -1
  181. package/Libraries/Utilities/Appearance.js +2 -0
  182. package/Libraries/Utilities/BackHandler.js +17 -0
  183. package/Libraries/Utilities/DeviceInfo.js +2 -0
  184. package/Libraries/Utilities/Dimensions.js +1 -1
  185. package/Libraries/Utilities/Dimensions.win32.js +1 -1
  186. package/Libraries/Utilities/Platform.js +17 -0
  187. package/Libraries/Utilities/PlatformTypes.js +11 -3
  188. package/Libraries/Utilities/ReactNativeTestTools.js +2 -2
  189. package/Libraries/Utilities/codegenNativeCommands.d.ts +18 -0
  190. package/Libraries/Utilities/codegenNativeComponent.d.ts +26 -0
  191. package/Libraries/WebSocket/WebSocket.js +313 -8
  192. package/Libraries/vendor/core/ErrorUtils.js +28 -2
  193. package/Libraries/vendor/emitter/EventEmitter.js +6 -2
  194. package/flow/global.js +1 -0
  195. package/index.js +51 -331
  196. package/index.win32.js +71 -352
  197. package/interface.js +0 -4
  198. package/jest/resolver.js +31 -0
  199. package/overrides.json +45 -47
  200. package/package.json +25 -25
  201. package/src/private/animated/NativeAnimatedHelper.js +21 -8
  202. package/src/private/animated/NativeAnimatedHelper.win32.js +21 -8
  203. package/src/private/animated/createAnimatedPropsHook.js +11 -16
  204. package/src/private/animated/createAnimatedPropsMemoHook.js +1 -2
  205. package/src/private/components/{SafeAreaView_INTERNAL_DO_NOT_USE.js → safeareaview/SafeAreaView_INTERNAL_DO_NOT_USE.js} +6 -6
  206. package/src/private/components/{HScrollViewNativeComponents.js → scrollview/HScrollViewNativeComponents.js} +8 -8
  207. package/src/private/components/scrollview/VScrollViewNativeComponents.js +25 -0
  208. package/src/private/{devmenu → devsupport/devmenu}/DevMenu.js +1 -1
  209. package/src/private/{inspector → devsupport/devmenu/elementinspector}/BorderBox.js +3 -3
  210. package/src/private/{inspector → devsupport/devmenu/elementinspector}/BoxInspector.js +6 -5
  211. package/src/private/{inspector → devsupport/devmenu/elementinspector}/ElementBox.js +8 -6
  212. package/src/private/{inspector → devsupport/devmenu/elementinspector}/ElementProperties.js +11 -10
  213. package/src/private/{inspector → devsupport/devmenu/elementinspector}/Inspector.js +14 -12
  214. package/src/private/{inspector → devsupport/devmenu/elementinspector}/InspectorOverlay.js +5 -4
  215. package/src/private/{inspector → devsupport/devmenu/elementinspector}/InspectorPanel.js +9 -8
  216. package/src/private/{inspector → devsupport/devmenu/elementinspector}/NetworkOverlay.js +10 -9
  217. package/src/private/{inspector → devsupport/devmenu/elementinspector}/ReactDevToolsOverlay.js +7 -7
  218. package/src/private/{inspector → devsupport/devmenu/elementinspector}/StyleInspector.js +7 -6
  219. package/src/private/{inspector → devsupport/devmenu/elementinspector}/XHRInterceptor.js +2 -2
  220. package/src/private/{inspector → devsupport/devmenu/elementinspector}/getInspectorDataForViewAtPoint.js +4 -4
  221. package/src/private/{inspector → devsupport/devmenu/elementinspector}/resolveBoxStyle.js +1 -1
  222. package/src/private/{inspector → devsupport/devmenu/perfmonitor}/PerformanceOverlay.js +6 -5
  223. package/src/private/{specs_DEPRECATED/modules → devsupport/devmenu/specs}/NativeDevMenu.js +2 -2
  224. package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.android.js +1 -1
  225. package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.ios.js +1 -1
  226. package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.win32.js +1 -1
  227. package/src/private/{debugging → devsupport/rndevtools}/setUpFuseboxReactDevToolsDispatcher.js +1 -1
  228. package/src/private/{fusebox → devsupport/rndevtools}/specs/NativeReactDevToolsRuntimeSettingsModule.js +2 -2
  229. package/src/private/{specs_DEPRECATED/modules → devsupport/rndevtools/specs}/NativeReactDevToolsSettingsManager.js +2 -2
  230. package/src/private/featureflags/ReactNativeFeatureFlags.js +82 -80
  231. package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +9 -1
  232. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +17 -13
  233. package/src/private/renderer/errorhandling/ErrorHandlers.js +2 -2
  234. package/src/private/specs_DEPRECATED/modules/NativeAnimatedModule.js +1 -1
  235. package/src/private/specs_DEPRECATED/modules/NativeAnimatedTurboModule.js +1 -1
  236. package/src/private/specs_DEPRECATED/modules/NativeSampleTurboModule.js +3 -0
  237. package/src/private/styles/composeStyles.js +12 -5
  238. package/src/private/types/HostComponent.js +1 -1
  239. package/src/private/types/HostInstance.js +67 -1
  240. package/src/private/webapis/dom/nodes/ReactNativeElement.js +2 -5
  241. package/src/private/webapis/dom/nodes/ReadOnlyNode.js +5 -18
  242. package/src/private/webapis/dom/nodes/internals/NodeInternals.js +6 -0
  243. package/src/private/webapis/performance/Performance.js +1 -3
  244. package/src/private/webapis/performance/PerformanceEntry.js +6 -1
  245. package/src/private/webapis/performance/internals/RawPerformanceEntry.js +3 -0
  246. package/src/private/webapis/performance/specs/NativePerformance.js +10 -1
  247. package/src/types/globals.d.ts +42 -0
  248. package/src-win/Libraries/Components/TextInput/Tests/TextInputTest.tsx +7 -7
  249. package/src-win/Libraries/Components/Touchable/Tests/TouchableWin32Test.tsx +3 -3
  250. package/src-win/Libraries/Image/Tests/ImageWin32Test.tsx +1 -1
  251. package/src-win/Libraries/Text/Text.d.ts +2 -5
  252. package/types/index.d.ts +6 -3
  253. package/types/public/ReactNativeTypes.d.ts +2 -2
  254. package/Libraries/BatchedBridge/__mocks__/MessageQueueTestConfig.js +0 -38
  255. package/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js +0 -22
  256. package/Libraries/Blob/FileReader_new.js +0 -231
  257. package/Libraries/Blob/FileReader_old.js +0 -186
  258. package/Libraries/Blob/__mocks__/FileReaderModule.js +0 -20
  259. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +0 -32
  260. package/Libraries/Core/__mocks__/ErrorUtils.js +0 -33
  261. package/Libraries/Core/__mocks__/NativeExceptionsManager.js +0 -19
  262. package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +0 -49
  263. package/Libraries/Events/CustomEvent.js +0 -32
  264. package/Libraries/Events/EventPolyfill.js +0 -239
  265. package/Libraries/Lists/__flowtests__/FlatList-flowtest.js +0 -118
  266. package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +0 -134
  267. package/Libraries/Network/XMLHttpRequest_new.js +0 -794
  268. package/Libraries/Network/XMLHttpRequest_old.js +0 -701
  269. package/Libraries/NewAppScreen/components/DebugInstructions.js +0 -41
  270. package/Libraries/NewAppScreen/components/Header.js +0 -77
  271. package/Libraries/NewAppScreen/components/HermesBadge.js +0 -53
  272. package/Libraries/NewAppScreen/components/LearnMoreLinks.js +0 -148
  273. package/Libraries/NewAppScreen/components/ReloadInstructions.js +0 -39
  274. package/Libraries/NewAppScreen/components/logo.png +0 -0
  275. package/Libraries/NewAppScreen/index.js +0 -25
  276. package/Libraries/StyleSheet/__flowtests__/StyleSheet-flowtest.js +0 -58
  277. package/Libraries/Utilities/DeviceInfo.win32.js +0 -19
  278. package/Libraries/Utilities/__mocks__/BackHandler.js +0 -45
  279. package/Libraries/Utilities/__mocks__/GlobalPerformanceLogger.js +0 -16
  280. package/Libraries/Utilities/__mocks__/PixelRatio.js +0 -25
  281. package/Libraries/WebSocket/WebSocketEvent.js +0 -30
  282. package/Libraries/WebSocket/WebSocket_new.js +0 -325
  283. package/Libraries/WebSocket/WebSocket_old.js +0 -297
  284. package/Libraries/WebSocket/__mocks__/event-target-shim.js +0 -27
  285. package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +0 -30
  286. package/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js +0 -81
  287. package/flow/jest.js +0 -1287
  288. package/jest/__tests__/setup-test.js +0 -18
  289. package/src/private/components/VScrollViewNativeComponents.js +0 -25
  290. package/src/private/utilities/ensureInstance.js +0 -21
  291. package/src/private/webapis/performance/specs/__mocks__/NativePerformanceMock.js +0 -267
  292. package/types/modules/LaunchScreen.d.ts +0 -18
  293. /package/src/private/{devmenu → devsupport/devmenu}/DevMenu.d.ts +0 -0
  294. /package/src/private/{debugging → devsupport/rndevtools}/FuseboxSessionObserver.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"TextInputTest.js","sourceRoot":"","sources":["../../../../src-win/Libraries/Components/TextInput/Tests/TextInputTest.tsx"],"names":[],"mappings":"AAA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KACF;CACF,CAAC;AAEJ,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,KAAK,EAAE;QACL,MAAM,EAAE,EAAE;KACX;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,EAAE;KACX;IACD,KAAK,EAAE;QACL,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,EAAE;KACX;IACD,UAAU,EAAE;QACV,KAAK,EAAE,QAAQ;QACf,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE,MAAM;QAClB,UAAU,EAAE,iBAAiB;QAC7B,MAAM,EAAE,GAAG;KACZ;CACF,CAAC,CAAC","sourcesContent":["'use strict';\nimport React from 'react'\nimport { StyleSheet, Text, TextInput, View } from 'react-native';\n\n// Disabling no-jsx-lambda so functional components are more convenient to use\n\nconst AutoFocusingTextInputTest: React.FC<{}> = () => {\n return (\n <View>\n <Text>This TextInput auto focuses</Text>\n <TextInput\n autoFocus\n maxLength={140}\n multiline\n style={styles.input}\n />\n </View>\n );\n};\n\nconst PlaceholderTextInputTest: React.FC<{}> = () => {\n return (\n <View>\n <Text>This TextInput demonstrates placeholders</Text>\n <TextInput\n maxLength={140}\n multiline\n placeholder=\"I am a blue placeholder, type in me for something magical\"\n placeholderTextColor=\"blue\"\n style={styles.green}\n />\n </View>\n );\n};\n\nconst ControllingTextInputTest: React.FC<{}> = () => {\n const [value, setValue] = React.useState('');\n\n return (\n <View>\n <Text>This TextInput inserts spaces between characters</Text>\n <TextInput\n multiline\n onChangeText={(text) => setValue(text.endsWith(' ') ? value : (text + ' '))}\n style={styles.blue}\n value={value}\n />\n </View>\n );\n};\n\nconst BlurringAndFocusingTextInputTest: React.FC<{}> = () => {\n const [isFocused, setIsFocused] = React.useState(false);\n return (\n <View>\n <Text>This TextInput is currently focused: + {isFocused ? 'true' : 'false'}</Text>\n <TextInput\n multiline\n onBlur={() => setIsFocused(false)}\n onFocus={() => setIsFocused(true)}\n style={styles.input}\n />\n </View>\n );\n};\n\nconst LayoutListeningTextInputTest: React.FC<{}> = () => {\n const [eventCounter, setEventCounter] = React.useState(0);\n\n return (\n <View>\n <Text>The number of onContentSizeChanges is listed here + {eventCounter}</Text>\n <TextInput\n multiline\n onContentSizeChange={() => setEventCounter(eventCounter + 1)}\n style={styles.input}\n />\n </View>\n );\n};\n\nconst KeyPressListeningTextInputTest: React.FC<{}> = () => {\n const [value, setValue] = React.useState('');\n\n return (\n <View>\n <Text>This TextInput uses onKeyPress to maintain state: it is slow</Text>\n <TextInput\n multiline\n onKeyPress={(e) => setValue(value + e.nativeEvent.key)}\n style={styles.input}\n value={value}\n />\n </View>\n );\n};\n\nconst StyleTextInputTest: React.FC<{}> = () => {\n return (\n <View>\n <Text>This TextInput is styled differently</Text>\n <TextInput\n multiline\n style={styles.superInput}\n />\n </View>\n );\n};\n\nexport const title = 'TextInput';\nexport const displayName = 'TextInput';\nexport const description = 'TextInput Examples and Tests';\nexport const examples = [\n {\n title: 'Autofocus Example',\n description: 'autoFocus in action',\n render(): JSX.Element {\n return (<AutoFocusingTextInputTest />);\n },\n },\n {\n title: 'Placeholders Example',\n description: 'placeholder in action',\n render(): JSX.Element {\n return (<PlaceholderTextInputTest />);\n },\n },\n {\n title: 'Controlled Example',\n description: 'Controlling inputs in action',\n render(): JSX.Element {\n return (<ControllingTextInputTest />);\n },\n },\n {\n title: 'Focus and Blur Example',\n description: 'onFocus/onBlur in action',\n render(): JSX.Element {\n return (<BlurringAndFocusingTextInputTest />);\n },\n },\n {\n title: 'ContentSizeChange Example',\n description: 'onContentSizeChange in action',\n render(): JSX.Element {\n return (<LayoutListeningTextInputTest />);\n },\n },\n {\n title: 'Control via onKeyPress Example',\n description: 'onKeyPress in action',\n render(): JSX.Element {\n return (<KeyPressListeningTextInputTest />);\n },\n },\n {\n title: 'Super Styling Example',\n description: 'Styling in action',\n render(): JSX.Element {\n return (<StyleTextInputTest />);\n },\n },\n ];\n\nconst styles = StyleSheet.create({\n input: {\n height: 20,\n },\n blue: {\n color: 'blue',\n height: 20,\n },\n green: {\n color: 'green',\n height: 20,\n },\n superInput: {\n color: 'purple',\n fontSize: 24,\n fontStyle: 'italic',\n fontWeight: 'bold',\n fontFamily: 'times-new-roman',\n height: 100,\n },\n});\n"]}
1
+ {"version":3,"file":"TextInputTest.js","sourceRoot":"","sources":["../../../../src-win/Libraries/Components/TextInput/Tests/TextInputTest.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;AACb,kDAAyB;AACzB,+CAAiE;AAEjE,8EAA8E;AAE9E,MAAM,yBAAyB,GAAiB,GAAG,EAAE;IACnD,OAAO,CACL,8BAAC,mBAAI;QACH,8BAAC,mBAAI,sCAAmC;QACxC,8BAAC,wBAAS,IACR,SAAS,QACT,SAAS,EAAE,GAAG,EACd,SAAS,QACT,KAAK,EAAE,MAAM,CAAC,KAAK,GACnB,CACG,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,wBAAwB,GAAiB,GAAG,EAAE;IAClD,OAAO,CACL,8BAAC,mBAAI;QACH,8BAAC,mBAAI,mDAAgD;QACrD,8BAAC,wBAAS,IACR,SAAS,EAAE,GAAG,EACd,SAAS,QACT,WAAW,EAAC,2DAA2D,EACvE,oBAAoB,EAAC,MAAM,EAC3B,KAAK,EAAE,MAAM,CAAC,KAAK,GACnB,CACG,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,wBAAwB,GAAiB,GAAG,EAAE;IAClD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAE7C,OAAO,CACL,8BAAC,mBAAI;QACH,8BAAC,mBAAI,2DAAwD;QAC7D,8BAAC,wBAAS,IACR,SAAS,QACT,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC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CAAC;QAC5C,CAAC;KACF;IACD;QACE,KAAK,EAAE,gCAAgC;QACvC,WAAW,EAAE,sBAAsB;QACnC,MAAM;YACJ,OAAO,CAAC,8BAAC,8BAA8B,OAAG,CAAC,CAAC;QAC9C,CAAC;KACF;IACD;QACE,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EAAE,mBAAmB;QAChC,MAAM;YACJ,OAAO,CAAC,8BAAC,kBAAkB,OAAG,CAAC,CAAC;QAClC,CAAC;KACF;CACF,CAAC;AAEJ,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,KAAK,EAAE;QACL,MAAM,EAAE,EAAE;KACX;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,EAAE;KACX;IACD,KAAK,EAAE;QACL,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,EAAE;KACX;IACD,UAAU,EAAE;QACV,KAAK,EAAE,QAAQ;QACf,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE,MAAM;QAClB,UAAU,EAAE,iBAAiB;QAC7B,MAAM,EAAE,GAAG;KACZ;CACF,CAAC,CAAC","sourcesContent":["'use strict';\nimport React from 'react'\nimport { StyleSheet, Text, TextInput, View } from 'react-native';\n\n// Disabling no-jsx-lambda so functional components are more convenient to use\n\nconst AutoFocusingTextInputTest: React.FC<{}> = () => {\n return (\n <View>\n <Text>This TextInput auto focuses</Text>\n <TextInput\n autoFocus\n maxLength={140}\n multiline\n style={styles.input}\n />\n </View>\n );\n};\n\nconst PlaceholderTextInputTest: React.FC<{}> = () => {\n return (\n <View>\n <Text>This TextInput demonstrates placeholders</Text>\n <TextInput\n maxLength={140}\n multiline\n placeholder=\"I am a blue placeholder, type in me for something magical\"\n placeholderTextColor=\"blue\"\n style={styles.green}\n />\n </View>\n );\n};\n\nconst ControllingTextInputTest: React.FC<{}> = () => {\n const [value, setValue] = React.useState('');\n\n return (\n <View>\n <Text>This TextInput inserts spaces between characters</Text>\n <TextInput\n multiline\n onChangeText={(text) => setValue(text.endsWith(' ') ? value : (text + ' '))}\n style={styles.blue}\n value={value}\n />\n </View>\n );\n};\n\nconst BlurringAndFocusingTextInputTest: React.FC<{}> = () => {\n const [isFocused, setIsFocused] = React.useState(false);\n return (\n <View>\n <Text>This TextInput is currently focused: + {isFocused ? 'true' : 'false'}</Text>\n <TextInput\n multiline\n onBlur={() => setIsFocused(false)}\n onFocus={() => setIsFocused(true)}\n style={styles.input}\n />\n </View>\n );\n};\n\nconst LayoutListeningTextInputTest: React.FC<{}> = () => {\n const [eventCounter, setEventCounter] = React.useState(0);\n\n return (\n <View>\n <Text>The number of onContentSizeChanges is listed here + {eventCounter}</Text>\n <TextInput\n multiline\n onContentSizeChange={() => setEventCounter(eventCounter + 1)}\n style={styles.input}\n />\n </View>\n );\n};\n\nconst KeyPressListeningTextInputTest: React.FC<{}> = () => {\n const [value, setValue] = React.useState('');\n\n return (\n <View>\n <Text>This TextInput uses onKeyPress to maintain state: it is slow</Text>\n <TextInput\n multiline\n onKeyPress={(e) => setValue(value + e.nativeEvent.key)}\n style={styles.input}\n value={value}\n />\n </View>\n );\n};\n\nconst StyleTextInputTest: React.FC<{}> = () => {\n return (\n <View>\n <Text>This TextInput is styled differently</Text>\n <TextInput\n multiline\n style={styles.superInput}\n />\n </View>\n );\n};\n\nexport const title = 'TextInput';\nexport const displayName = 'TextInput';\nexport const description = 'TextInput Examples and Tests';\nexport const examples = [\n {\n title: 'Autofocus Example',\n description: 'autoFocus in action',\n render() {\n return (<AutoFocusingTextInputTest />);\n },\n },\n {\n title: 'Placeholders Example',\n description: 'placeholder in action',\n render() {\n return (<PlaceholderTextInputTest />);\n },\n },\n {\n title: 'Controlled Example',\n description: 'Controlling inputs in action',\n render() {\n return (<ControllingTextInputTest />);\n },\n },\n {\n title: 'Focus and Blur Example',\n description: 'onFocus/onBlur in action',\n render() {\n return (<BlurringAndFocusingTextInputTest />);\n },\n },\n {\n title: 'ContentSizeChange Example',\n description: 'onContentSizeChange in action',\n render() {\n return (<LayoutListeningTextInputTest />);\n },\n },\n {\n title: 'Control via onKeyPress Example',\n description: 'onKeyPress in action',\n render() {\n return (<KeyPressListeningTextInputTest />);\n },\n },\n {\n title: 'Super Styling Example',\n description: 'Styling in action',\n render() {\n return (<StyleTextInputTest />);\n },\n },\n ];\n\nconst styles = StyleSheet.create({\n input: {\n height: 20,\n },\n blue: {\n color: 'blue',\n height: 20,\n },\n green: {\n color: 'green',\n height: 20,\n },\n superInput: {\n color: 'purple',\n fontSize: 24,\n fontStyle: 'italic',\n fontWeight: 'bold',\n fontFamily: 'times-new-roman',\n height: 100,\n },\n});\n"]}
@@ -455,7 +455,7 @@ export interface TextInputAndroidProps {
455
455
  }
456
456
 
457
457
  /**
458
- * @see TextInputProps.onFocus
458
+ * @deprecated Use `TextInputFocusEvent` instead
459
459
  */
460
460
  export interface TextInputFocusEventData extends TargetedEvent {
461
461
  text: string;
@@ -463,14 +463,25 @@ export interface TextInputFocusEventData extends TargetedEvent {
463
463
  }
464
464
 
465
465
  /**
466
- * @see TextInputProps.onScroll
466
+ * @see TextInputProps.onFocus
467
+ */
468
+ export type TextInputFocusEvent = NativeSyntheticEvent<TextInputFocusEventData>;
469
+
470
+ /**
471
+ * @deprecated Use `TextInputScrollEvent` instead
467
472
  */
468
473
  export interface TextInputScrollEventData {
469
474
  contentOffset: {x: number; y: number};
470
475
  }
471
476
 
472
477
  /**
473
- * @see TextInputProps.onSelectionChange
478
+ * @see TextInputProps.onScroll
479
+ */
480
+ export type TextInputScrollEvent =
481
+ NativeSyntheticEvent<TextInputScrollEventData>;
482
+
483
+ /**
484
+ * @deprecated Use `TextInputSelectionChangeEvent` instead
474
485
  */
475
486
  export interface TextInputSelectionChangeEventData extends TargetedEvent {
476
487
  selection: {
@@ -480,14 +491,26 @@ export interface TextInputSelectionChangeEventData extends TargetedEvent {
480
491
  }
481
492
 
482
493
  /**
483
- * @see TextInputProps.onKeyPress
494
+ * @see TextInputProps.onSelectionChange
495
+ */
496
+ export type TextInputSelectionChangeEvent =
497
+ NativeSyntheticEvent<TextInputSelectionChangeEventData>;
498
+
499
+ /**
500
+ * @deprecated Use `TextInputKeyPressEvent` instead
484
501
  */
485
502
  export interface TextInputKeyPressEventData {
486
503
  key: string;
487
504
  }
488
505
 
489
506
  /**
490
- * @see TextInputProps.onChange
507
+ * @see TextInputProps.onKeyPress
508
+ */
509
+ export type TextInputKeyPressEvent =
510
+ NativeSyntheticEvent<TextInputKeyPressEventData>;
511
+
512
+ /**
513
+ * @deprecated Use `TextInputChangeEvent` instead
491
514
  */
492
515
  export interface TextInputChangeEventData extends TargetedEvent {
493
516
  eventCount: number;
@@ -495,26 +518,50 @@ export interface TextInputChangeEventData extends TargetedEvent {
495
518
  }
496
519
 
497
520
  /**
498
- * @see TextInputProps.onContentSizeChange
521
+ * @see TextInputProps.onChange
522
+ */
523
+ export type TextInputChangeEvent =
524
+ NativeSyntheticEvent<TextInputChangeEventData>;
525
+
526
+ /**
527
+ * @deprecated Use `TextInputContentSizeChangeEvent` instead
499
528
  */
500
529
  export interface TextInputContentSizeChangeEventData {
501
530
  contentSize: {width: number; height: number};
502
531
  }
503
532
 
504
533
  /**
505
- * @see TextInputProps.onEndEditing
534
+ * @see TextInputProps.onContentSizeChange
535
+ */
536
+ export type TextInputContentSizeChangeEvent =
537
+ NativeSyntheticEvent<TextInputContentSizeChangeEventData>;
538
+
539
+ /**
540
+ * @deprecated Use `TextInputEndEditingEvent` instead
506
541
  */
507
542
  export interface TextInputEndEditingEventData {
508
543
  text: string;
509
544
  }
510
545
 
511
546
  /**
512
- * @see TextInputProps.onSubmitEditing
547
+ * @see TextInputProps.onEndEditing
548
+ */
549
+ export type TextInputEndEditingEvent =
550
+ NativeSyntheticEvent<TextInputEndEditingEventData>;
551
+
552
+ /**
553
+ * @deprecated Use `TextInputSubmitEditingEvent` instead
513
554
  */
514
555
  export interface TextInputSubmitEditingEventData {
515
556
  text: string;
516
557
  }
517
558
 
559
+ /**
560
+ * @see TextInputProps.onSubmitEditing
561
+ */
562
+ export type TextInputSubmitEditingEvent =
563
+ NativeSyntheticEvent<TextInputSubmitEditingEventData>;
564
+
518
565
  /**
519
566
  * @see https://reactnative.dev/docs/textinput#props
520
567
  */
@@ -763,16 +810,12 @@ export interface TextInputProps
763
810
  /**
764
811
  * Callback that is called when the text input is blurred
765
812
  */
766
- onBlur?:
767
- | ((e: NativeSyntheticEvent<TextInputFocusEventData>) => void)
768
- | undefined;
813
+ onBlur?: ((e: TextInputFocusEvent) => void) | undefined;
769
814
 
770
815
  /**
771
816
  * Callback that is called when the text input's text changes.
772
817
  */
773
- onChange?:
774
- | ((e: NativeSyntheticEvent<TextInputChangeEventData>) => void)
775
- | undefined;
818
+ onChange?: ((e: TextInputChangeEvent) => void) | undefined;
776
819
 
777
820
  /**
778
821
  * Callback that is called when the text input's text changes.
@@ -788,15 +831,13 @@ export interface TextInputProps
788
831
  * Only called for multiline text inputs.
789
832
  */
790
833
  onContentSizeChange?:
791
- | ((e: NativeSyntheticEvent<TextInputContentSizeChangeEventData>) => void)
834
+ | ((e: TextInputContentSizeChangeEvent) => void)
792
835
  | undefined;
793
836
 
794
837
  /**
795
838
  * Callback that is called when text input ends.
796
839
  */
797
- onEndEditing?:
798
- | ((e: NativeSyntheticEvent<TextInputEndEditingEventData>) => void)
799
- | undefined;
840
+ onEndEditing?: ((e: TextInputEndEditingEvent) => void) | undefined;
800
841
 
801
842
  /**
802
843
  * Called when a single tap gesture is detected.
@@ -818,23 +859,17 @@ export interface TextInputProps
818
859
  /**
819
860
  * Callback that is called when the text input is focused
820
861
  */
821
- onFocus?:
822
- | ((e: NativeSyntheticEvent<TextInputFocusEventData>) => void)
823
- | undefined;
862
+ onFocus?: ((e: TextInputFocusEvent) => void) | undefined;
824
863
 
825
864
  /**
826
865
  * Callback that is called when the text input selection is changed.
827
866
  */
828
- onSelectionChange?:
829
- | ((e: NativeSyntheticEvent<TextInputSelectionChangeEventData>) => void)
830
- | undefined;
867
+ onSelectionChange?: ((e: TextInputSelectionChangeEvent) => void) | undefined;
831
868
 
832
869
  /**
833
870
  * Callback that is called when the text input's submit button is pressed.
834
871
  */
835
- onSubmitEditing?:
836
- | ((e: NativeSyntheticEvent<TextInputSubmitEditingEventData>) => void)
837
- | undefined;
872
+ onSubmitEditing?: ((e: TextInputSubmitEditingEvent) => void) | undefined;
838
873
 
839
874
  /**
840
875
  * Invoked on content scroll with
@@ -842,9 +877,7 @@ export interface TextInputProps
842
877
  *
843
878
  * May also contain other properties from ScrollEvent but on Android contentSize is not provided for performance reasons.
844
879
  */
845
- onScroll?:
846
- | ((e: NativeSyntheticEvent<TextInputScrollEventData>) => void)
847
- | undefined;
880
+ onScroll?: ((e: TextInputScrollEvent) => void) | undefined;
848
881
 
849
882
  /**
850
883
  * Callback that is called when a key is pressed.
@@ -855,9 +888,7 @@ export interface TextInputProps
855
888
  * Fires before onChange callbacks.
856
889
  * Note: on Android only the inputs from soft keyboard are handled, not the hardware keyboard inputs.
857
890
  */
858
- onKeyPress?:
859
- | ((e: NativeSyntheticEvent<TextInputKeyPressEventData>) => void)
860
- | undefined;
891
+ onKeyPress?: ((e: TextInputKeyPressEvent) => void) | undefined;
861
892
 
862
893
  /**
863
894
  * The string that will be rendered before text input has been entered
@@ -930,6 +961,12 @@ export interface TextInputProps
930
961
  */
931
962
  inputAccessoryViewID?: string | undefined;
932
963
 
964
+ /**
965
+ * An optional label that overrides the default input accessory view button label.
966
+ * @platform ios
967
+ */
968
+ inputAccessoryViewButtonLabel?: string | undefined;
969
+
933
970
  /**
934
971
  * The value to show for the text input. TextInput is a controlled component,
935
972
  * which means the native value will be forced to match this value prop if provided.
@@ -23,7 +23,10 @@ import {
23
23
  } from '../../StyleSheet/StyleSheet';
24
24
  import * as React from 'react';
25
25
 
26
- export type TextInputChangeEventData = $ReadOnly<{
26
+ /**
27
+ * @see TextInputProps.onChange
28
+ */
29
+ type TextInputChangeEventData = $ReadOnly<{
27
30
  eventCount: number,
28
31
  target: number,
29
32
  text: string,
@@ -45,7 +48,7 @@ export type TextInputEvent = NativeSyntheticEvent<
45
48
  }>,
46
49
  >;
47
50
 
48
- export type TextInputContentSizeChangeEventData = $ReadOnly<{
51
+ type TextInputContentSizeChangeEventData = $ReadOnly<{
49
52
  target: number,
50
53
  contentSize: $ReadOnly<{
51
54
  width: number,
@@ -53,47 +56,86 @@ export type TextInputContentSizeChangeEventData = $ReadOnly<{
53
56
  }>,
54
57
  }>;
55
58
 
59
+ /**
60
+ * @see TextInputProps.onContentSizeChange
61
+ */
56
62
  export type TextInputContentSizeChangeEvent =
57
63
  NativeSyntheticEvent<TextInputContentSizeChangeEventData>;
58
64
 
59
- export type TargetEvent = $ReadOnly<{
65
+ type TargetEvent = $ReadOnly<{
60
66
  target: number,
67
+ ...
61
68
  }>;
62
69
 
63
- export type TextInputFocusEventData = TargetEvent;
70
+ type TextInputFocusEventData = TargetEvent;
64
71
 
72
+ /**
73
+ * @see TextInputProps.onBlur
74
+ */
65
75
  export type TextInputBlurEvent = NativeSyntheticEvent<TextInputFocusEventData>;
76
+
77
+ /**
78
+ * @see TextInputProps.onFocus
79
+ */
66
80
  export type TextInputFocusEvent = NativeSyntheticEvent<TextInputFocusEventData>;
67
81
 
68
- type Selection = $ReadOnly<{
82
+ export type Selection = $ReadOnly<{
69
83
  start: number,
70
84
  end: number,
71
85
  }>;
72
86
 
73
- export type TextInputSelectionChangeEventData = $ReadOnly<{
87
+ type TextInputSelectionChangeEventData = $ReadOnly<{
74
88
  ...TargetEvent,
75
89
  selection: Selection,
90
+ ...
76
91
  }>;
77
92
 
93
+ /**
94
+ * @see TextInputProps.onSelectionChange
95
+ */
78
96
  export type TextInputSelectionChangeEvent =
79
97
  NativeSyntheticEvent<TextInputSelectionChangeEventData>;
80
98
 
81
- export type TextInputKeyPressEventData = $ReadOnly<{
99
+ type TextInputKeyPressEventData = $ReadOnly<{
82
100
  ...TargetEvent,
83
101
  key: string,
84
102
  target?: ?number,
85
103
  eventCount: number,
104
+ ...
86
105
  }>;
87
106
 
107
+ /**
108
+ * @see TextInputProps.onKeyPress
109
+ */
88
110
  export type TextInputKeyPressEvent =
89
111
  NativeSyntheticEvent<TextInputKeyPressEventData>;
90
112
 
91
- export type TextInputEndEditingEventData = $ReadOnly<{
113
+ type TextInputEndEditingEventData = $ReadOnly<{
114
+ ...TargetEvent,
115
+ eventCount: number,
116
+ text: string,
117
+ ...
118
+ }>;
119
+
120
+ /**
121
+ * @see TextInputProps.onEndEditing
122
+ */
123
+ export type TextInputEndEditingEvent =
124
+ NativeSyntheticEvent<TextInputEndEditingEventData>;
125
+
126
+ type TextInputSubmitEditingEventData = $ReadOnly<{
92
127
  ...TargetEvent,
93
128
  eventCount: number,
94
129
  text: string,
130
+ ...
95
131
  }>;
96
132
 
133
+ /**
134
+ * @see TextInputProps.onSubmitEditing
135
+ */
136
+ export type TextInputSubmitEditingEvent =
137
+ NativeSyntheticEvent<TextInputSubmitEditingEventData>;
138
+
97
139
  export type TextInputEditingEvent =
98
140
  NativeSyntheticEvent<TextInputEndEditingEventData>;
99
141
 
@@ -389,6 +431,21 @@ export type TextInputAndroidProps = $ReadOnly<{
389
431
  */
390
432
  disableFullscreenUI?: ?boolean,
391
433
 
434
+ /**
435
+ * Determines whether the individual fields in your app should be included in a
436
+ * view structure for autofill purposes on Android API Level 26+. Defaults to auto.
437
+ * To disable auto complete, use `off`.
438
+ *
439
+ * *Android Only*
440
+ *
441
+ * The following values work on Android only:
442
+ *
443
+ * - `auto` - let Android decide
444
+ * - `no` - not important for autofill
445
+ * - `noExcludeDescendants` - this view and its children aren't important for autofill
446
+ * - `yes` - is important for autofill
447
+ * - `yesExcludeDescendants` - this view is important for autofill but its children aren't
448
+ */
392
449
  importantForAutofill?: ?(
393
450
  | 'auto'
394
451
  | 'no'
@@ -456,10 +513,26 @@ export type TextInputAndroidProps = $ReadOnly<{
456
513
  underlineColorAndroid?: ?ColorValue,
457
514
  }>;
458
515
 
459
- export type TextInputProps = $ReadOnly<{
460
- ...$Diff<ViewProps, $ReadOnly<{style: ?ViewStyleProp}>>,
461
- ...TextInputIOSProps,
462
- ...TextInputAndroidProps,
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>,
463
536
 
464
537
  /**
465
538
  * Can tell `TextInput` to automatically capitalize certain characters.
@@ -744,33 +817,12 @@ export type TextInputProps = $ReadOnly<{
744
817
  */
745
818
  onChange?: ?(e: TextInputChangeEvent) => mixed,
746
819
 
747
- /**
748
- * DANGER: this API is not stable and will change in the future.
749
- *
750
- * Callback will be called on the main thread and may result in dropped frames.
751
- * Callback that is called when the text input's text changes.
752
- *
753
- * @platform ios
754
- */
755
- unstable_onChangeSync?: ?(e: TextInputChangeEvent) => mixed,
756
-
757
820
  /**
758
821
  * Callback that is called when the text input's text changes.
759
822
  * Changed text is passed as an argument to the callback handler.
760
823
  */
761
824
  onChangeText?: ?(text: string) => mixed,
762
825
 
763
- /**
764
- * DANGER: this API is not stable and will change in the future.
765
- *
766
- * Callback will be called on the main thread and may result in dropped frames.
767
- * Callback that is called when the text input's text changes.
768
- * Changed text is passed as an argument to the callback handler.
769
- *
770
- * @platform ios
771
- */
772
- unstable_onChangeTextSync?: ?(text: string) => mixed,
773
-
774
826
  /**
775
827
  * Callback that is called when the text input's content size changes.
776
828
  * This will be called with
@@ -783,7 +835,7 @@ export type TextInputProps = $ReadOnly<{
783
835
  /**
784
836
  * Callback that is called when text input ends.
785
837
  */
786
- onEndEditing?: ?(e: TextInputEditingEvent) => mixed,
838
+ onEndEditing?: ?(e: TextInputEndEditingEvent) => mixed,
787
839
 
788
840
  /**
789
841
  * Callback that is called when the text input is focused.
@@ -799,21 +851,6 @@ export type TextInputProps = $ReadOnly<{
799
851
  */
800
852
  onKeyPress?: ?(e: TextInputKeyPressEvent) => mixed,
801
853
 
802
- /**
803
- * DANGER: this API is not stable and will change in the future.
804
- *
805
- * Callback will be called on the main thread and may result in dropped frames.
806
- *
807
- * Callback that is called when a key is pressed.
808
- * This will be called with `{ nativeEvent: { key: keyValue } }`
809
- * where `keyValue` is `'Enter'` or `'Backspace'` for respective keys and
810
- * the typed-in character otherwise including `' '` for space.
811
- * Fires before `onChange` callbacks.
812
- *
813
- * @platform ios
814
- */
815
- unstable_onKeyPressSync?: ?(e: TextInputKeyPressEvent) => mixed,
816
-
817
854
  /**
818
855
  * Called when a single tap gesture is detected.
819
856
  */
@@ -840,7 +877,7 @@ export type TextInputProps = $ReadOnly<{
840
877
  * Callback that is called when the text input's submit button is pressed.
841
878
  * Invalid if `multiline={true}` is specified.
842
879
  */
843
- onSubmitEditing?: ?(e: TextInputEditingEvent) => mixed,
880
+ onSubmitEditing?: ?(e: TextInputSubmitEditingEvent) => mixed,
844
881
 
845
882
  /**
846
883
  * Invoked on content scroll with `{ nativeEvent: { contentOffset: { x, y } } }`.
@@ -988,6 +1025,18 @@ export type TextInputProps = $ReadOnly<{
988
1025
  * unwanted edits without flicker.
989
1026
  */
990
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,
991
1040
  }>;
992
1041
 
993
1042
  export interface TextInputInstance extends HostInstance {
@@ -1109,7 +1158,7 @@ export interface TextInputInstance extends HostInstance {
1109
1158
  *
1110
1159
  */
1111
1160
  type InternalTextInput = component(
1112
- ref: React.RefSetter<TextInputInstance>,
1161
+ ref?: React.RefSetter<TextInputInstance>,
1113
1162
  ...TextInputProps
1114
1163
  );
1115
1164