@office-iss/react-native-win32 0.72.0-preview.5 → 0.72.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.
@@ -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}
@@ -218,36 +218,6 @@ export type enterKeyHintType =
218
218
  type PasswordRules = string;
219
219
 
220
220
  type IOSProps = $ReadOnly<{|
221
- /**
222
- * Give the keyboard and the system information about the
223
- * expected semantic meaning for the content that users enter.
224
- * @platform ios
225
- */
226
- autoComplete?: ?(
227
- | 'address-line1'
228
- | 'address-line2'
229
- | 'cc-number'
230
- | 'current-password'
231
- | 'country'
232
- | 'email'
233
- | 'name'
234
- | 'additional-name'
235
- | 'family-name'
236
- | 'given-name'
237
- | 'nickname'
238
- | 'honorific-prefix'
239
- | 'honorific-suffix'
240
- | 'new-password'
241
- | 'off'
242
- | 'one-time-code'
243
- | 'organization'
244
- | 'organization-title'
245
- | 'postal-code'
246
- | 'street-address'
247
- | 'tel'
248
- | 'url'
249
- | 'username'
250
- ),
251
221
  /**
252
222
  * When the clear button should appear on the right side of the text view.
253
223
  * This property is supported only for single-line TextInput component.
@@ -350,111 +320,6 @@ type IOSProps = $ReadOnly<{|
350
320
  |}>;
351
321
 
352
322
  type AndroidProps = $ReadOnly<{|
353
- /**
354
- * 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.
355
- * To disable autocomplete, set `autoComplete` to `off`.
356
- *
357
- * *Android Only*
358
- *
359
- * Possible values for `autoComplete` are:
360
- *
361
- * - `birthdate-day`
362
- * - `birthdate-full`
363
- * - `birthdate-month`
364
- * - `birthdate-year`
365
- * - `cc-csc`
366
- * - `cc-exp`
367
- * - `cc-exp-day`
368
- * - `cc-exp-month`
369
- * - `cc-exp-year`
370
- * - `cc-number`
371
- * - `email`
372
- * - `gender`
373
- * - `name`
374
- * - `name-family`
375
- * - `name-given`
376
- * - `name-middle`
377
- * - `name-middle-initial`
378
- * - `name-prefix`
379
- * - `name-suffix`
380
- * - `password`
381
- * - `password-new`
382
- * - `postal-address`
383
- * - `postal-address-country`
384
- * - `postal-address-extended`
385
- * - `postal-address-extended-postal-code`
386
- * - `postal-address-locality`
387
- * - `postal-address-region`
388
- * - `postal-code`
389
- * - `street-address`
390
- * - `sms-otp`
391
- * - `tel`
392
- * - `tel-country-code`
393
- * - `tel-national`
394
- * - `tel-device`
395
- * - `username`
396
- * - `username-new`
397
- * - `off`
398
- *
399
- * @platform android
400
- */
401
- autoComplete?: ?(
402
- | 'birthdate-day'
403
- | 'birthdate-full'
404
- | 'birthdate-month'
405
- | 'birthdate-year'
406
- | 'cc-csc'
407
- | 'cc-exp'
408
- | 'cc-exp-day'
409
- | 'cc-exp-month'
410
- | 'cc-exp-year'
411
- | 'cc-number'
412
- | 'email'
413
- | 'gender'
414
- | 'name'
415
- | 'name-family'
416
- | 'name-given'
417
- | 'name-middle'
418
- | 'name-middle-initial'
419
- | 'name-prefix'
420
- | 'name-suffix'
421
- | 'password'
422
- | 'password-new'
423
- | 'postal-address'
424
- | 'postal-address-country'
425
- | 'postal-address-extended'
426
- | 'postal-address-extended-postal-code'
427
- | 'postal-address-locality'
428
- | 'postal-address-region'
429
- | 'postal-code'
430
- | 'street-address'
431
- | 'sms-otp'
432
- | 'tel'
433
- | 'tel-country-code'
434
- | 'tel-national'
435
- | 'tel-device'
436
- | 'username'
437
- | 'username-new'
438
- | 'off'
439
- // additional HTML autocomplete values
440
- | 'address-line1'
441
- | 'address-line2'
442
- | 'bday'
443
- | 'bday-day'
444
- | 'bday-month'
445
- | 'bday-year'
446
- | 'country'
447
- | 'current-password'
448
- | 'honorific-prefix'
449
- | 'honorific-suffix'
450
- | 'additional-name'
451
- | 'family-name'
452
- | 'given-name'
453
- | 'new-password'
454
- | 'one-time-code'
455
- | 'sex'
456
- ),
457
-
458
323
  /**
459
324
  * When provided it will set the color of the cursor (or "caret") in the component.
460
325
  * Unlike the behavior of `selectionColor` the cursor color will be set independently
@@ -563,6 +428,127 @@ export type Props = $ReadOnly<{|
563
428
  */
564
429
  autoCapitalize?: ?AutoCapitalize,
565
430
 
431
+ /**
432
+ * Specifies autocomplete hints for the system, so it can provide autofill.
433
+ * On Android, the system will always attempt to offer autofill by using heuristics to identify the type of content.
434
+ * To disable autocomplete, set autoComplete to off.
435
+ *
436
+ * The following values work across platforms:
437
+ *
438
+ * - `additional-name`
439
+ * - `address-line1`
440
+ * - `address-line2`
441
+ * - `cc-number`
442
+ * - `country`
443
+ * - `current-password`
444
+ * - `email`
445
+ * - `family-name`
446
+ * - `given-name`
447
+ * - `honorific-prefix`
448
+ * - `honorific-suffix`
449
+ * - `name`
450
+ * - `new-password`
451
+ * - `off`
452
+ * - `one-time-code`
453
+ * - `postal-code`
454
+ * - `street-address`
455
+ * - `tel`
456
+ * - `username`
457
+ *
458
+ * The following values work on iOS only:
459
+ *
460
+ * - `nickname`
461
+ * - `organization`
462
+ * - `organization-title`
463
+ * - `url`
464
+ *
465
+ * The following values work on Android only:
466
+ *
467
+ * - `birthdate-day`
468
+ * - `birthdate-full`
469
+ * - `birthdate-month`
470
+ * - `birthdate-year`
471
+ * - `cc-csc`
472
+ * - `cc-exp`
473
+ * - `cc-exp-day`
474
+ * - `cc-exp-month`
475
+ * - `cc-exp-year`
476
+ * - `gender`
477
+ * - `name-family`
478
+ * - `name-given`
479
+ * - `name-middle`
480
+ * - `name-middle-initial`
481
+ * - `name-prefix`
482
+ * - `name-suffix`
483
+ * - `password`
484
+ * - `password-new`
485
+ * - `postal-address`
486
+ * - `postal-address-country`
487
+ * - `postal-address-extended`
488
+ * - `postal-address-extended-postal-code`
489
+ * - `postal-address-locality`
490
+ * - `postal-address-region`
491
+ * - `sms-otp`
492
+ * - `tel-country-code`
493
+ * - `tel-national`
494
+ * - `tel-device`
495
+ * - `username-new`
496
+ */
497
+ autoComplete?: ?(
498
+ | 'additional-name'
499
+ | 'address-line1'
500
+ | 'address-line2'
501
+ | 'birthdate-day'
502
+ | 'birthdate-full'
503
+ | 'birthdate-month'
504
+ | 'birthdate-year'
505
+ | 'cc-csc'
506
+ | 'cc-exp'
507
+ | 'cc-exp-day'
508
+ | 'cc-exp-month'
509
+ | 'cc-exp-year'
510
+ | 'cc-number'
511
+ | 'country'
512
+ | 'current-password'
513
+ | 'email'
514
+ | 'family-name'
515
+ | 'gender'
516
+ | 'given-name'
517
+ | 'honorific-prefix'
518
+ | 'honorific-suffix'
519
+ | 'name'
520
+ | 'name-family'
521
+ | 'name-given'
522
+ | 'name-middle'
523
+ | 'name-middle-initial'
524
+ | 'name-prefix'
525
+ | 'name-suffix'
526
+ | 'new-password'
527
+ | 'nickname'
528
+ | 'one-time-code'
529
+ | 'organization'
530
+ | 'organization-title'
531
+ | 'password'
532
+ | 'password-new'
533
+ | 'postal-address'
534
+ | 'postal-address-country'
535
+ | 'postal-address-extended'
536
+ | 'postal-address-extended-postal-code'
537
+ | 'postal-address-locality'
538
+ | 'postal-address-region'
539
+ | 'postal-code'
540
+ | 'street-address'
541
+ | 'sms-otp'
542
+ | 'tel'
543
+ | 'tel-country-code'
544
+ | 'tel-national'
545
+ | 'tel-device'
546
+ | 'url'
547
+ | 'username'
548
+ | 'username-new'
549
+ | 'off'
550
+ ),
551
+
566
552
  /**
567
553
  * If `false`, disables auto-correct. The default value is `true`.
568
554
  */
@@ -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,
@@ -18,7 +18,7 @@ type FlexAlignType =
18
18
  | 'stretch'
19
19
  | 'baseline';
20
20
 
21
- type DimensionValue =
21
+ export type DimensionValue =
22
22
  | number
23
23
  | 'auto'
24
24
  | `${number}%`
@@ -79,15 +79,9 @@ export interface FlexStyle {
79
79
  | undefined;
80
80
  left?: DimensionValue | undefined;
81
81
  margin?: DimensionValue | undefined;
82
- marginBlock?: DimensionValue | undefined;
83
- marginBlockEnd?: DimensionValue | undefined;
84
- marginBlockStart?: DimensionValue | undefined;
85
82
  marginBottom?: DimensionValue | undefined;
86
83
  marginEnd?: DimensionValue | undefined;
87
84
  marginHorizontal?: DimensionValue | undefined;
88
- marginInline?: DimensionValue | undefined;
89
- marginInlineEnd?: DimensionValue | undefined;
90
- marginInlineStart?: DimensionValue | undefined;
91
85
  marginLeft?: DimensionValue | undefined;
92
86
  marginRight?: DimensionValue | undefined;
93
87
  marginStart?: DimensionValue | undefined;
@@ -100,14 +94,8 @@ export interface FlexStyle {
100
94
  overflow?: 'visible' | 'hidden' | 'scroll' | undefined;
101
95
  padding?: DimensionValue | undefined;
102
96
  paddingBottom?: DimensionValue | undefined;
103
- paddingBlock?: DimensionValue | undefined;
104
- paddingBlockEnd?: DimensionValue | undefined;
105
- paddingBlockStart?: DimensionValue | undefined;
106
97
  paddingEnd?: DimensionValue | undefined;
107
98
  paddingHorizontal?: DimensionValue | undefined;
108
- paddingInline?: DimensionValue | undefined;
109
- paddingInlineEnd?: DimensionValue | undefined;
110
- paddingInlineStart?: DimensionValue | undefined;
111
99
  paddingLeft?: DimensionValue | undefined;
112
100
  paddingRight?: DimensionValue | undefined;
113
101
  paddingStart?: DimensionValue | undefined;
package/overrides.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "**/__snapshots__/**",
8
8
  "src/rntypes/**"
9
9
  ],
10
- "baseVersion": "0.72.0-rc.3",
10
+ "baseVersion": "0.72.0",
11
11
  "overrides": [
12
12
  {
13
13
  "type": "derived",
@@ -123,7 +123,7 @@
123
123
  "type": "derived",
124
124
  "file": "src/Libraries/Components/TextInput/TextInput.win32.js",
125
125
  "baseFile": "packages/react-native/Libraries/Components/TextInput/TextInput.js",
126
- "baseHash": "058fa050230bbb1710b64156f2e3680fc16aa252"
126
+ "baseHash": "a817f8d62ee3ba4c56b772bd0cfb852739cb4aa7"
127
127
  },
128
128
  {
129
129
  "type": "patch",