react-native-windows 0.72.0-preview.7 → 0.72.0-preview.9

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 (52) hide show
  1. package/Directory.Build.props +24 -19
  2. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +0 -1
  3. package/Libraries/Components/TextInput/TextInput.d.ts +121 -86
  4. package/Libraries/Components/TextInput/TextInput.flow.js +121 -135
  5. package/Libraries/Components/TextInput/TextInput.js +126 -155
  6. package/Libraries/Components/TextInput/TextInput.windows.js +126 -155
  7. package/Libraries/Core/ReactNativeVersion.js +1 -1
  8. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +0 -2
  9. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -13
  10. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +2 -4
  11. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters +2 -57
  12. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +22 -17
  13. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h +0 -2
  14. package/Microsoft.ReactNative.Cxx/JSI/NodeApiJsiLoader.cpp +16 -0
  15. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems +41 -12
  16. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters +17 -6
  17. package/Microsoft.ReactNative.Managed/packages.lock.json +6 -6
  18. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpApp.targets +1 -1
  19. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CppApp.targets +1 -1
  20. package/PropertySheets/External/Microsoft.ReactNative.WinAppSDK.CSharpApp.targets +1 -1
  21. package/PropertySheets/Generated/PackageVersion.g.props +2 -2
  22. package/PropertySheets/JSEngine.props +4 -4
  23. package/PropertySheets/Warnings.props +6 -0
  24. package/ReactCommon/ReactCommon.vcxproj +53 -1
  25. package/ReactCommon/cgmanifest.json +15 -0
  26. package/Scripts/Tfs/Layout-MSRN-Headers.ps1 +36 -0
  27. package/Shared/DevSupportManager.cpp +2 -9
  28. package/Shared/DevSupportManager.h +2 -6
  29. package/Shared/HermesRuntimeHolder.cpp +318 -81
  30. package/Shared/HermesRuntimeHolder.h +15 -19
  31. package/Shared/HermesSamplingProfiler.cpp +5 -6
  32. package/Shared/InspectorPackagerConnection.cpp +62 -108
  33. package/Shared/InspectorPackagerConnection.h +9 -21
  34. package/Shared/JSI/ScriptStore.h +18 -20
  35. package/Shared/JSI/V8RuntimeHolder.cpp +262 -0
  36. package/Shared/JSI/V8RuntimeHolder.h +37 -0
  37. package/Shared/OInstance.cpp +16 -36
  38. package/Shared/SafeLoadLibrary.cpp +41 -0
  39. package/Shared/SafeLoadLibrary.h +15 -0
  40. package/Shared/Shared.vcxitems +21 -10
  41. package/Shared/Shared.vcxitems.filters +23 -30
  42. package/codegen/rnwcoreJSI.h +2 -2
  43. package/package.json +15 -14
  44. package/template/cs-app-WinAppSDK/proj/ExperimentalFeatures.props +1 -1
  45. package/Microsoft.ReactNative.Cxx/JSI/NodeApiJsiRuntime.cpp +0 -2105
  46. package/Microsoft.ReactNative.Cxx/JSI/NodeApiJsiRuntime.h +0 -73
  47. package/Shared/HermesShim.cpp +0 -122
  48. package/Shared/HermesShim.h +0 -41
  49. package/Shared/JSI/NapiJsiV8RuntimeHolder.cpp +0 -209
  50. package/Shared/JSI/NapiJsiV8RuntimeHolder.h +0 -46
  51. package/Shared/V8JSIRuntimeHolder.cpp +0 -71
  52. package/Shared/V8JSIRuntimeHolder.h +0 -58
@@ -234,36 +234,6 @@ export type enterKeyHintType =
234
234
  type PasswordRules = string;
235
235
 
236
236
  type IOSProps = $ReadOnly<{|
237
- /**
238
- * Give the keyboard and the system information about the
239
- * expected semantic meaning for the content that users enter.
240
- * @platform ios
241
- */
242
- autoComplete?: ?(
243
- | 'address-line1'
244
- | 'address-line2'
245
- | 'cc-number'
246
- | 'current-password'
247
- | 'country'
248
- | 'email'
249
- | 'name'
250
- | 'additional-name'
251
- | 'family-name'
252
- | 'given-name'
253
- | 'nickname'
254
- | 'honorific-prefix'
255
- | 'honorific-suffix'
256
- | 'new-password'
257
- | 'off'
258
- | 'one-time-code'
259
- | 'organization'
260
- | 'organization-title'
261
- | 'postal-code'
262
- | 'street-address'
263
- | 'tel'
264
- | 'url'
265
- | 'username'
266
- ),
267
237
  /**
268
238
  * When the clear button should appear on the right side of the text view.
269
239
  * This property is supported only for single-line TextInput component.
@@ -369,111 +339,6 @@ type IOSProps = $ReadOnly<{|
369
339
  |}>;
370
340
 
371
341
  type AndroidProps = $ReadOnly<{|
372
- /**
373
- * Specifies autocomplete hints for the system, so it can provide autofill. On Android, the system will always attempt to offer autofill by using heuristics to identify the type of content.
374
- * To disable autocomplete, set `autoComplete` to `off`.
375
- *
376
- * *Android Only*
377
- *
378
- * Possible values for `autoComplete` are:
379
- *
380
- * - `birthdate-day`
381
- * - `birthdate-full`
382
- * - `birthdate-month`
383
- * - `birthdate-year`
384
- * - `cc-csc`
385
- * - `cc-exp`
386
- * - `cc-exp-day`
387
- * - `cc-exp-month`
388
- * - `cc-exp-year`
389
- * - `cc-number`
390
- * - `email`
391
- * - `gender`
392
- * - `name`
393
- * - `name-family`
394
- * - `name-given`
395
- * - `name-middle`
396
- * - `name-middle-initial`
397
- * - `name-prefix`
398
- * - `name-suffix`
399
- * - `password`
400
- * - `password-new`
401
- * - `postal-address`
402
- * - `postal-address-country`
403
- * - `postal-address-extended`
404
- * - `postal-address-extended-postal-code`
405
- * - `postal-address-locality`
406
- * - `postal-address-region`
407
- * - `postal-code`
408
- * - `street-address`
409
- * - `sms-otp`
410
- * - `tel`
411
- * - `tel-country-code`
412
- * - `tel-national`
413
- * - `tel-device`
414
- * - `username`
415
- * - `username-new`
416
- * - `off`
417
- *
418
- * @platform android
419
- */
420
- autoComplete?: ?(
421
- | 'birthdate-day'
422
- | 'birthdate-full'
423
- | 'birthdate-month'
424
- | 'birthdate-year'
425
- | 'cc-csc'
426
- | 'cc-exp'
427
- | 'cc-exp-day'
428
- | 'cc-exp-month'
429
- | 'cc-exp-year'
430
- | 'cc-number'
431
- | 'email'
432
- | 'gender'
433
- | 'name'
434
- | 'name-family'
435
- | 'name-given'
436
- | 'name-middle'
437
- | 'name-middle-initial'
438
- | 'name-prefix'
439
- | 'name-suffix'
440
- | 'password'
441
- | 'password-new'
442
- | 'postal-address'
443
- | 'postal-address-country'
444
- | 'postal-address-extended'
445
- | 'postal-address-extended-postal-code'
446
- | 'postal-address-locality'
447
- | 'postal-address-region'
448
- | 'postal-code'
449
- | 'street-address'
450
- | 'sms-otp'
451
- | 'tel'
452
- | 'tel-country-code'
453
- | 'tel-national'
454
- | 'tel-device'
455
- | 'username'
456
- | 'username-new'
457
- | 'off'
458
- // additional HTML autocomplete values
459
- | 'address-line1'
460
- | 'address-line2'
461
- | 'bday'
462
- | 'bday-day'
463
- | 'bday-month'
464
- | 'bday-year'
465
- | 'country'
466
- | 'current-password'
467
- | 'honorific-prefix'
468
- | 'honorific-suffix'
469
- | 'additional-name'
470
- | 'family-name'
471
- | 'given-name'
472
- | 'new-password'
473
- | 'one-time-code'
474
- | 'sex'
475
- ),
476
-
477
342
  /**
478
343
  * When provided it will set the color of the cursor (or "caret") in the component.
479
344
  * Unlike the behavior of `selectionColor` the cursor color will be set independently
@@ -574,6 +439,127 @@ export type Props = $ReadOnly<{|
574
439
  */
575
440
  autoCapitalize?: ?AutoCapitalize,
576
441
 
442
+ /**
443
+ * Specifies autocomplete hints for the system, so it can provide autofill.
444
+ * On Android, the system will always attempt to offer autofill by using heuristics to identify the type of content.
445
+ * To disable autocomplete, set autoComplete to off.
446
+ *
447
+ * The following values work across platforms:
448
+ *
449
+ * - `additional-name`
450
+ * - `address-line1`
451
+ * - `address-line2`
452
+ * - `cc-number`
453
+ * - `country`
454
+ * - `current-password`
455
+ * - `email`
456
+ * - `family-name`
457
+ * - `given-name`
458
+ * - `honorific-prefix`
459
+ * - `honorific-suffix`
460
+ * - `name`
461
+ * - `new-password`
462
+ * - `off`
463
+ * - `one-time-code`
464
+ * - `postal-code`
465
+ * - `street-address`
466
+ * - `tel`
467
+ * - `username`
468
+ *
469
+ * The following values work on iOS only:
470
+ *
471
+ * - `nickname`
472
+ * - `organization`
473
+ * - `organization-title`
474
+ * - `url`
475
+ *
476
+ * The following values work on Android only:
477
+ *
478
+ * - `birthdate-day`
479
+ * - `birthdate-full`
480
+ * - `birthdate-month`
481
+ * - `birthdate-year`
482
+ * - `cc-csc`
483
+ * - `cc-exp`
484
+ * - `cc-exp-day`
485
+ * - `cc-exp-month`
486
+ * - `cc-exp-year`
487
+ * - `gender`
488
+ * - `name-family`
489
+ * - `name-given`
490
+ * - `name-middle`
491
+ * - `name-middle-initial`
492
+ * - `name-prefix`
493
+ * - `name-suffix`
494
+ * - `password`
495
+ * - `password-new`
496
+ * - `postal-address`
497
+ * - `postal-address-country`
498
+ * - `postal-address-extended`
499
+ * - `postal-address-extended-postal-code`
500
+ * - `postal-address-locality`
501
+ * - `postal-address-region`
502
+ * - `sms-otp`
503
+ * - `tel-country-code`
504
+ * - `tel-national`
505
+ * - `tel-device`
506
+ * - `username-new`
507
+ */
508
+ autoComplete?: ?(
509
+ | 'additional-name'
510
+ | 'address-line1'
511
+ | 'address-line2'
512
+ | 'birthdate-day'
513
+ | 'birthdate-full'
514
+ | 'birthdate-month'
515
+ | 'birthdate-year'
516
+ | 'cc-csc'
517
+ | 'cc-exp'
518
+ | 'cc-exp-day'
519
+ | 'cc-exp-month'
520
+ | 'cc-exp-year'
521
+ | 'cc-number'
522
+ | 'country'
523
+ | 'current-password'
524
+ | 'email'
525
+ | 'family-name'
526
+ | 'gender'
527
+ | 'given-name'
528
+ | 'honorific-prefix'
529
+ | 'honorific-suffix'
530
+ | 'name'
531
+ | 'name-family'
532
+ | 'name-given'
533
+ | 'name-middle'
534
+ | 'name-middle-initial'
535
+ | 'name-prefix'
536
+ | 'name-suffix'
537
+ | 'new-password'
538
+ | 'nickname'
539
+ | 'one-time-code'
540
+ | 'organization'
541
+ | 'organization-title'
542
+ | 'password'
543
+ | 'password-new'
544
+ | 'postal-address'
545
+ | 'postal-address-country'
546
+ | 'postal-address-extended'
547
+ | 'postal-address-extended-postal-code'
548
+ | 'postal-address-locality'
549
+ | 'postal-address-region'
550
+ | 'postal-code'
551
+ | 'street-address'
552
+ | 'sms-otp'
553
+ | 'tel'
554
+ | 'tel-country-code'
555
+ | 'tel-national'
556
+ | 'tel-device'
557
+ | 'url'
558
+ | 'username'
559
+ | 'username-new'
560
+ | 'off'
561
+ ),
562
+
577
563
  /**
578
564
  * If `false`, disables auto-correct. The default value is `true`.
579
565
  */
@@ -1080,27 +1066,19 @@ function InternalTextInput(props: Props): React.Node {
1080
1066
  accessibilityState,
1081
1067
  id,
1082
1068
  tabIndex,
1069
+ selection: propsSelection,
1083
1070
  ...otherProps
1084
1071
  } = props;
1085
1072
 
1086
1073
  const inputRef = useRef<null | React.ElementRef<HostComponent<mixed>>>(null);
1087
1074
 
1088
- // Android sends a "onTextChanged" event followed by a "onSelectionChanged" event, for
1089
- // the same "most recent event count".
1090
- // For controlled selection, that means that immediately after text is updated,
1091
- // a controlled component will pass in the *previous* selection, even if the controlled
1092
- // component didn't mean to modify the selection at all.
1093
- // Therefore, we ignore selections and pass them through until the selection event has
1094
- // been sent.
1095
- // Note that this mitigation is NOT needed for Fabric.
1096
- // discovered when upgrading react-hooks
1097
1075
  // eslint-disable-next-line react-hooks/exhaustive-deps
1098
- let selection: ?Selection =
1099
- props.selection == null
1076
+ const selection: ?Selection =
1077
+ propsSelection == null
1100
1078
  ? null
1101
1079
  : {
1102
- start: props.selection.start,
1103
- end: props.selection.end ?? props.selection.start,
1080
+ start: propsSelection.start,
1081
+ end: propsSelection.end ?? propsSelection.start,
1104
1082
  };
1105
1083
 
1106
1084
  const [mostRecentEventCount, setMostRecentEventCount] = useState<number>(0);
@@ -1112,12 +1090,6 @@ function InternalTextInput(props: Props): React.Node {
1112
1090
  |}>({selection, mostRecentEventCount});
1113
1091
 
1114
1092
  const lastNativeSelection = lastNativeSelectionState.selection;
1115
- const lastNativeSelectionEventCount =
1116
- lastNativeSelectionState.mostRecentEventCount;
1117
-
1118
- if (lastNativeSelectionEventCount < mostRecentEventCount) {
1119
- selection = null;
1120
- }
1121
1093
 
1122
1094
  let viewCommands;
1123
1095
  if (AndroidTextInputCommands) {
@@ -1517,7 +1489,6 @@ function InternalTextInput(props: Props): React.Node {
1517
1489
  onScroll={_onScroll}
1518
1490
  onSelectionChange={_onSelectionChange}
1519
1491
  placeholder={placeholder}
1520
- selection={selection}
1521
1492
  style={style}
1522
1493
  text={text}
1523
1494
  textBreakStrategy={props.textBreakStrategy}
@@ -245,36 +245,6 @@ export type enterKeyHintType =
245
245
  type PasswordRules = string;
246
246
 
247
247
  type IOSProps = $ReadOnly<{|
248
- /**
249
- * Give the keyboard and the system information about the
250
- * expected semantic meaning for the content that users enter.
251
- * @platform ios
252
- */
253
- autoComplete?: ?(
254
- | 'address-line1'
255
- | 'address-line2'
256
- | 'cc-number'
257
- | 'current-password'
258
- | 'country'
259
- | 'email'
260
- | 'name'
261
- | 'additional-name'
262
- | 'family-name'
263
- | 'given-name'
264
- | 'nickname'
265
- | 'honorific-prefix'
266
- | 'honorific-suffix'
267
- | 'new-password'
268
- | 'off'
269
- | 'one-time-code'
270
- | 'organization'
271
- | 'organization-title'
272
- | 'postal-code'
273
- | 'street-address'
274
- | 'tel'
275
- | 'url'
276
- | 'username'
277
- ),
278
248
  /**
279
249
  * When the clear button should appear on the right side of the text view.
280
250
  * This property is supported only for single-line TextInput component.
@@ -377,111 +347,6 @@ type IOSProps = $ReadOnly<{|
377
347
  |}>;
378
348
 
379
349
  type AndroidProps = $ReadOnly<{|
380
- /**
381
- * Specifies autocomplete hints for the system, so it can provide autofill. On Android, the system will always attempt to offer autofill by using heuristics to identify the type of content.
382
- * To disable autocomplete, set `autoComplete` to `off`.
383
- *
384
- * *Android Only*
385
- *
386
- * Possible values for `autoComplete` are:
387
- *
388
- * - `birthdate-day`
389
- * - `birthdate-full`
390
- * - `birthdate-month`
391
- * - `birthdate-year`
392
- * - `cc-csc`
393
- * - `cc-exp`
394
- * - `cc-exp-day`
395
- * - `cc-exp-month`
396
- * - `cc-exp-year`
397
- * - `cc-number`
398
- * - `email`
399
- * - `gender`
400
- * - `name`
401
- * - `name-family`
402
- * - `name-given`
403
- * - `name-middle`
404
- * - `name-middle-initial`
405
- * - `name-prefix`
406
- * - `name-suffix`
407
- * - `password`
408
- * - `password-new`
409
- * - `postal-address`
410
- * - `postal-address-country`
411
- * - `postal-address-extended`
412
- * - `postal-address-extended-postal-code`
413
- * - `postal-address-locality`
414
- * - `postal-address-region`
415
- * - `postal-code`
416
- * - `street-address`
417
- * - `sms-otp`
418
- * - `tel`
419
- * - `tel-country-code`
420
- * - `tel-national`
421
- * - `tel-device`
422
- * - `username`
423
- * - `username-new`
424
- * - `off`
425
- *
426
- * @platform android
427
- */
428
- autoComplete?: ?(
429
- | 'birthdate-day'
430
- | 'birthdate-full'
431
- | 'birthdate-month'
432
- | 'birthdate-year'
433
- | 'cc-csc'
434
- | 'cc-exp'
435
- | 'cc-exp-day'
436
- | 'cc-exp-month'
437
- | 'cc-exp-year'
438
- | 'cc-number'
439
- | 'email'
440
- | 'gender'
441
- | 'name'
442
- | 'name-family'
443
- | 'name-given'
444
- | 'name-middle'
445
- | 'name-middle-initial'
446
- | 'name-prefix'
447
- | 'name-suffix'
448
- | 'password'
449
- | 'password-new'
450
- | 'postal-address'
451
- | 'postal-address-country'
452
- | 'postal-address-extended'
453
- | 'postal-address-extended-postal-code'
454
- | 'postal-address-locality'
455
- | 'postal-address-region'
456
- | 'postal-code'
457
- | 'street-address'
458
- | 'sms-otp'
459
- | 'tel'
460
- | 'tel-country-code'
461
- | 'tel-national'
462
- | 'tel-device'
463
- | 'username'
464
- | 'username-new'
465
- | 'off'
466
- // additional HTML autocomplete values
467
- | 'address-line1'
468
- | 'address-line2'
469
- | 'bday'
470
- | 'bday-day'
471
- | 'bday-month'
472
- | 'bday-year'
473
- | 'country'
474
- | 'current-password'
475
- | 'honorific-prefix'
476
- | 'honorific-suffix'
477
- | 'additional-name'
478
- | 'family-name'
479
- | 'given-name'
480
- | 'new-password'
481
- | 'one-time-code'
482
- | 'sex'
483
- ),
484
-
485
350
  /**
486
351
  * When provided it will set the color of the cursor (or "caret") in the component.
487
352
  * Unlike the behavior of `selectionColor` the cursor color will be set independently
@@ -617,6 +482,127 @@ export type Props = $ReadOnly<{|
617
482
  */
618
483
  autoCapitalize?: ?AutoCapitalize,
619
484
 
485
+ /**
486
+ * Specifies autocomplete hints for the system, so it can provide autofill.
487
+ * On Android, the system will always attempt to offer autofill by using heuristics to identify the type of content.
488
+ * To disable autocomplete, set autoComplete to off.
489
+ *
490
+ * The following values work across platforms:
491
+ *
492
+ * - `additional-name`
493
+ * - `address-line1`
494
+ * - `address-line2`
495
+ * - `cc-number`
496
+ * - `country`
497
+ * - `current-password`
498
+ * - `email`
499
+ * - `family-name`
500
+ * - `given-name`
501
+ * - `honorific-prefix`
502
+ * - `honorific-suffix`
503
+ * - `name`
504
+ * - `new-password`
505
+ * - `off`
506
+ * - `one-time-code`
507
+ * - `postal-code`
508
+ * - `street-address`
509
+ * - `tel`
510
+ * - `username`
511
+ *
512
+ * The following values work on iOS only:
513
+ *
514
+ * - `nickname`
515
+ * - `organization`
516
+ * - `organization-title`
517
+ * - `url`
518
+ *
519
+ * The following values work on Android only:
520
+ *
521
+ * - `birthdate-day`
522
+ * - `birthdate-full`
523
+ * - `birthdate-month`
524
+ * - `birthdate-year`
525
+ * - `cc-csc`
526
+ * - `cc-exp`
527
+ * - `cc-exp-day`
528
+ * - `cc-exp-month`
529
+ * - `cc-exp-year`
530
+ * - `gender`
531
+ * - `name-family`
532
+ * - `name-given`
533
+ * - `name-middle`
534
+ * - `name-middle-initial`
535
+ * - `name-prefix`
536
+ * - `name-suffix`
537
+ * - `password`
538
+ * - `password-new`
539
+ * - `postal-address`
540
+ * - `postal-address-country`
541
+ * - `postal-address-extended`
542
+ * - `postal-address-extended-postal-code`
543
+ * - `postal-address-locality`
544
+ * - `postal-address-region`
545
+ * - `sms-otp`
546
+ * - `tel-country-code`
547
+ * - `tel-national`
548
+ * - `tel-device`
549
+ * - `username-new`
550
+ */
551
+ autoComplete?: ?(
552
+ | 'additional-name'
553
+ | 'address-line1'
554
+ | 'address-line2'
555
+ | 'birthdate-day'
556
+ | 'birthdate-full'
557
+ | 'birthdate-month'
558
+ | 'birthdate-year'
559
+ | 'cc-csc'
560
+ | 'cc-exp'
561
+ | 'cc-exp-day'
562
+ | 'cc-exp-month'
563
+ | 'cc-exp-year'
564
+ | 'cc-number'
565
+ | 'country'
566
+ | 'current-password'
567
+ | 'email'
568
+ | 'family-name'
569
+ | 'gender'
570
+ | 'given-name'
571
+ | 'honorific-prefix'
572
+ | 'honorific-suffix'
573
+ | 'name'
574
+ | 'name-family'
575
+ | 'name-given'
576
+ | 'name-middle'
577
+ | 'name-middle-initial'
578
+ | 'name-prefix'
579
+ | 'name-suffix'
580
+ | 'new-password'
581
+ | 'nickname'
582
+ | 'one-time-code'
583
+ | 'organization'
584
+ | 'organization-title'
585
+ | 'password'
586
+ | 'password-new'
587
+ | 'postal-address'
588
+ | 'postal-address-country'
589
+ | 'postal-address-extended'
590
+ | 'postal-address-extended-postal-code'
591
+ | 'postal-address-locality'
592
+ | 'postal-address-region'
593
+ | 'postal-code'
594
+ | 'street-address'
595
+ | 'sms-otp'
596
+ | 'tel'
597
+ | 'tel-country-code'
598
+ | 'tel-national'
599
+ | 'tel-device'
600
+ | 'url'
601
+ | 'username'
602
+ | 'username-new'
603
+ | 'off'
604
+ ),
605
+
620
606
  /**
621
607
  * If `false`, disables auto-correct. The default value is `true`.
622
608
  */
@@ -1123,27 +1109,19 @@ function InternalTextInput(props: Props): React.Node {
1123
1109
  accessibilityState,
1124
1110
  id,
1125
1111
  tabIndex,
1112
+ selection: propsSelection,
1126
1113
  ...otherProps
1127
1114
  } = props;
1128
1115
 
1129
1116
  const inputRef = useRef<null | React.ElementRef<HostComponent<mixed>>>(null);
1130
1117
 
1131
- // Android sends a "onTextChanged" event followed by a "onSelectionChanged" event, for
1132
- // the same "most recent event count".
1133
- // For controlled selection, that means that immediately after text is updated,
1134
- // a controlled component will pass in the *previous* selection, even if the controlled
1135
- // component didn't mean to modify the selection at all.
1136
- // Therefore, we ignore selections and pass them through until the selection event has
1137
- // been sent.
1138
- // Note that this mitigation is NOT needed for Fabric.
1139
- // discovered when upgrading react-hooks
1140
1118
  // eslint-disable-next-line react-hooks/exhaustive-deps
1141
- let selection: ?Selection =
1142
- props.selection == null
1119
+ const selection: ?Selection =
1120
+ propsSelection == null
1143
1121
  ? null
1144
1122
  : {
1145
- start: props.selection.start,
1146
- end: props.selection.end ?? props.selection.start,
1123
+ start: propsSelection.start,
1124
+ end: propsSelection.end ?? propsSelection.start,
1147
1125
  };
1148
1126
 
1149
1127
  const [mostRecentEventCount, setMostRecentEventCount] = useState<number>(0);
@@ -1155,12 +1133,6 @@ function InternalTextInput(props: Props): React.Node {
1155
1133
  |}>({selection, mostRecentEventCount});
1156
1134
 
1157
1135
  const lastNativeSelection = lastNativeSelectionState.selection;
1158
- const lastNativeSelectionEventCount =
1159
- lastNativeSelectionState.mostRecentEventCount;
1160
-
1161
- if (lastNativeSelectionEventCount < mostRecentEventCount) {
1162
- selection = null;
1163
- }
1164
1136
 
1165
1137
  let viewCommands;
1166
1138
  if (AndroidTextInputCommands) {
@@ -1631,7 +1603,6 @@ function InternalTextInput(props: Props): React.Node {
1631
1603
  onScroll={_onScroll}
1632
1604
  onSelectionChange={_onSelectionChange}
1633
1605
  placeholder={placeholder}
1634
- selection={selection}
1635
1606
  style={style}
1636
1607
  text={text}
1637
1608
  textBreakStrategy={props.textBreakStrategy}
@@ -13,5 +13,5 @@ exports.version = {
13
13
  major: 0,
14
14
  minor: 72,
15
15
  patch: 0,
16
- prerelease: 'rc.3',
16
+ prerelease: null,
17
17
  };
@@ -75,7 +75,6 @@ const PERMISSIONS = Object.freeze({
75
75
  ANSWER_PHONE_CALLS: 'android.permission.ANSWER_PHONE_CALLS',
76
76
  READ_PHONE_NUMBERS: 'android.permission.READ_PHONE_NUMBERS',
77
77
  UWB_RANGING: 'android.permission.UWB_RANGING',
78
- POST_NOTIFICATION: 'android.permission.POST_NOTIFICATIONS', // Remove in 0.72
79
78
  POST_NOTIFICATIONS: 'android.permission.POST_NOTIFICATIONS',
80
79
  NEARBY_WIFI_DEVICES: 'android.permission.NEARBY_WIFI_DEVICES',
81
80
  });
@@ -107,7 +106,6 @@ class PermissionsAndroid {
107
106
  CAMERA: string,
108
107
  GET_ACCOUNTS: string,
109
108
  NEARBY_WIFI_DEVICES: string,
110
- POST_NOTIFICATION: string, // Remove in 0.72
111
109
  POST_NOTIFICATIONS: string,
112
110
  PROCESS_OUTGOING_CALLS: string,
113
111
  READ_CALENDAR: string,