react-native-windows 0.0.0-canary.685 → 0.0.0-canary.686
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.flowconfig +1 -1
- package/Libraries/Animated/Animated.js +1 -1
- package/Libraries/Animated/animations/Animation.js +5 -1
- package/Libraries/Animated/useAnimatedProps.js +5 -2
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +1 -0
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.windows.js +1 -0
- package/Libraries/Components/ScrollView/ScrollViewNativeComponentType.js +1 -0
- package/Libraries/Components/ScrollView/ScrollViewViewConfig.js +1 -0
- package/Libraries/Components/TextInput/TextInput.d.ts +31 -7
- package/Libraries/Components/TextInput/TextInput.flow.js +33 -10
- package/Libraries/Components/TextInput/TextInput.js +46 -10
- package/Libraries/Components/TextInput/TextInput.windows.js +46 -10
- package/Libraries/Components/View/ViewPropTypes.js +3 -3
- package/Libraries/Components/View/ViewPropTypes.windows.js +3 -3
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/LayoutAnimation/LayoutAnimation.js +1 -1
- package/Libraries/Pressability/Pressability.js +8 -2
- package/Libraries/Pressability/Pressability.windows.js +8 -2
- package/Libraries/ReactNative/BridgelessUIManager.js +26 -8
- package/Libraries/ReactNative/ReactNativeFeatureFlags.js +10 -0
- package/Libraries/ReactNative/UIManager.js +8 -0
- package/Libraries/Share/Share.d.ts +3 -9
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +19 -15
- package/Libraries/Utilities/NativePlatformConstantsAndroid.js +1 -0
- package/Libraries/Utilities/NativePlatformConstantsIOS.js +1 -0
- package/Libraries/Utilities/NativePlatformConstantsWin.js +1 -0
- package/Libraries/Utilities/Platform.android.js +6 -0
- package/Libraries/Utilities/Platform.d.ts +1 -0
- package/Libraries/Utilities/Platform.ios.js +6 -0
- package/Libraries/Utilities/Platform.windows.js +6 -0
- package/Libraries/vendor/emitter/EventEmitter.js +13 -13
- package/PropertySheets/Generated/PackageVersion.g.props +2 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp +14 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/TouchEventEmitter.cpp +2 -43
- package/Shared/Shared.vcxitems +3 -0
- package/codegen/NativePlatformConstantsAndroidSpec.g.h +2 -0
- package/codegen/NativePlatformConstantsIOSSpec.g.h +2 -0
- package/codegen/NativePlatformConstantsWinSpec.g.h +2 -0
- package/codegen/rnwcoreJSI.h +189 -63
- package/package.json +11 -11
- package/types/modules/globals.d.ts +1 -1
package/.flowconfig
CHANGED
|
@@ -21,7 +21,7 @@ import Platform from '../Utilities/Platform';
|
|
|
21
21
|
import AnimatedImplementation from './AnimatedImplementation';
|
|
22
22
|
import AnimatedMock from './AnimatedMock';
|
|
23
23
|
|
|
24
|
-
const Animated = ((Platform.
|
|
24
|
+
const Animated = ((Platform.isDisableAnimations
|
|
25
25
|
? AnimatedMock
|
|
26
26
|
: AnimatedImplementation): typeof AnimatedImplementation);
|
|
27
27
|
|
|
@@ -14,6 +14,7 @@ import type {PlatformConfig} from '../AnimatedPlatformConfig';
|
|
|
14
14
|
import type AnimatedNode from '../nodes/AnimatedNode';
|
|
15
15
|
import type AnimatedValue from '../nodes/AnimatedValue';
|
|
16
16
|
|
|
17
|
+
import Platform from '../../Utilities/Platform';
|
|
17
18
|
import NativeAnimatedHelper from '../NativeAnimatedHelper';
|
|
18
19
|
import AnimatedColor from '../nodes/AnimatedColor';
|
|
19
20
|
import AnimatedProps from '../nodes/AnimatedProps';
|
|
@@ -84,7 +85,10 @@ export default class Animation {
|
|
|
84
85
|
// may not have completed yet. For example, only the animation for the red channel of
|
|
85
86
|
// an animating color may have been completed, resulting in a temporary red color
|
|
86
87
|
// being rendered. So, for now, ignore AnimatedProps that use a vectorized animation.
|
|
87
|
-
if (
|
|
88
|
+
if (
|
|
89
|
+
Platform.OS === 'ios' &&
|
|
90
|
+
(node instanceof AnimatedValueXY || node instanceof AnimatedColor)
|
|
91
|
+
) {
|
|
88
92
|
return result;
|
|
89
93
|
}
|
|
90
94
|
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
13
|
import {isPublicInstance as isFabricPublicInstance} from '../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstanceUtils';
|
|
14
|
+
import ReactNativeFeatureFlags from '../ReactNative/ReactNativeFeatureFlags';
|
|
14
15
|
import useRefEffect from '../Utilities/useRefEffect';
|
|
15
16
|
import {AnimatedEvent} from './AnimatedEvent';
|
|
16
17
|
import NativeAnimatedHelper from './NativeAnimatedHelper';
|
|
@@ -45,6 +46,8 @@ export default function useAnimatedProps<TProps: {...}, TInstance>(
|
|
|
45
46
|
() => new AnimatedProps(props, () => onUpdateRef.current?.()),
|
|
46
47
|
[props],
|
|
47
48
|
);
|
|
49
|
+
const useNativePropsInFabric =
|
|
50
|
+
ReactNativeFeatureFlags.shouldUseSetNativePropsInFabric();
|
|
48
51
|
useAnimatedPropsLifecycle(node);
|
|
49
52
|
|
|
50
53
|
// TODO: This "effect" does three things:
|
|
@@ -74,7 +77,7 @@ export default function useAnimatedProps<TProps: {...}, TInstance>(
|
|
|
74
77
|
process.env.NODE_ENV === 'test' ||
|
|
75
78
|
typeof instance !== 'object' ||
|
|
76
79
|
typeof instance?.setNativeProps !== 'function' ||
|
|
77
|
-
isFabricInstance(instance)
|
|
80
|
+
(isFabricInstance(instance) && !useNativePropsInFabric)
|
|
78
81
|
) {
|
|
79
82
|
// Schedule an update for this component to update `reducedProps`,
|
|
80
83
|
// but do not compute it immediately. If a parent also updated, we
|
|
@@ -106,7 +109,7 @@ export default function useAnimatedProps<TProps: {...}, TInstance>(
|
|
|
106
109
|
}
|
|
107
110
|
};
|
|
108
111
|
},
|
|
109
|
-
[props, node],
|
|
112
|
+
[props, node, useNativePropsInFabric],
|
|
110
113
|
);
|
|
111
114
|
const callbackRef = useRefEffect<TInstance>(refEffect);
|
|
112
115
|
|
|
@@ -41,6 +41,7 @@ export type ScrollViewNativeProps = $ReadOnly<{
|
|
|
41
41
|
endFillColor?: ?ColorValue,
|
|
42
42
|
fadingEdgeLength?: ?number,
|
|
43
43
|
indicatorStyle?: ?('default' | 'black' | 'white'),
|
|
44
|
+
isInvertedVirtualizedList?: ?boolean,
|
|
44
45
|
keyboardDismissMode?: ?('none' | 'on-drag' | 'interactive'),
|
|
45
46
|
maintainVisibleContentPosition?: ?$ReadOnly<{
|
|
46
47
|
minIndexForVisible: number,
|
|
@@ -205,13 +205,6 @@ export interface TextInputIOSProps {
|
|
|
205
205
|
* Give the keyboard and the system information about the expected
|
|
206
206
|
* semantic meaning for the content that users enter.
|
|
207
207
|
*
|
|
208
|
-
* For iOS 11+ you can set `textContentType` to `username` or `password` to
|
|
209
|
-
* enable autofill of login details from the device keychain.
|
|
210
|
-
*
|
|
211
|
-
* For iOS 12+ `newPassword` can be used to indicate a new password input the
|
|
212
|
-
* user may want to save in the keychain, and `oneTimeCode` can be used to indicate
|
|
213
|
-
* that a field can be autofilled by a code arriving in an SMS.
|
|
214
|
-
*
|
|
215
208
|
* To disable autofill, set textContentType to `none`.
|
|
216
209
|
*
|
|
217
210
|
* Possible values for `textContentType` are:
|
|
@@ -223,6 +216,15 @@ export interface TextInputIOSProps {
|
|
|
223
216
|
* - `'addressState'`
|
|
224
217
|
* - `'countryName'`
|
|
225
218
|
* - `'creditCardNumber'`
|
|
219
|
+
* - `'creditCardExpiration'` (iOS 17+)
|
|
220
|
+
* - `'creditCardExpirationMonth'` (iOS 17+)
|
|
221
|
+
* - `'creditCardExpirationYear'` (iOS 17+)
|
|
222
|
+
* - `'creditCardSecurityCode'` (iOS 17+)
|
|
223
|
+
* - `'creditCardType'` (iOS 17+)
|
|
224
|
+
* - `'creditCardName'` (iOS 17+)
|
|
225
|
+
* - `'creditCardGivenName'` (iOS 17+)
|
|
226
|
+
* - `'creditCardMiddleName'` (iOS 17+)
|
|
227
|
+
* - `'creditCardFamilyName'` (iOS 17+)
|
|
226
228
|
* - `'emailAddress'`
|
|
227
229
|
* - `'familyName'`
|
|
228
230
|
* - `'fullStreetAddress'`
|
|
@@ -244,6 +246,10 @@ export interface TextInputIOSProps {
|
|
|
244
246
|
* - `'password'`
|
|
245
247
|
* - `'newPassword'`
|
|
246
248
|
* - `'oneTimeCode'`
|
|
249
|
+
* - `'birthdate'` (iOS 17+)
|
|
250
|
+
* - `'birthdateDay'` (iOS 17+)
|
|
251
|
+
* - `'birthdateMonth'` (iOS 17+)
|
|
252
|
+
* - `'birthdateYear'` (iOS 17+)
|
|
247
253
|
*
|
|
248
254
|
*/
|
|
249
255
|
textContentType?:
|
|
@@ -254,6 +260,15 @@ export interface TextInputIOSProps {
|
|
|
254
260
|
| 'addressState'
|
|
255
261
|
| 'countryName'
|
|
256
262
|
| 'creditCardNumber'
|
|
263
|
+
| 'creditCardExpiration'
|
|
264
|
+
| 'creditCardExpirationMonth'
|
|
265
|
+
| 'creditCardExpirationYear'
|
|
266
|
+
| 'creditCardSecurityCode'
|
|
267
|
+
| 'creditCardType'
|
|
268
|
+
| 'creditCardName'
|
|
269
|
+
| 'creditCardGivenName'
|
|
270
|
+
| 'creditCardMiddleName'
|
|
271
|
+
| 'creditCardFamilyName'
|
|
257
272
|
| 'emailAddress'
|
|
258
273
|
| 'familyName'
|
|
259
274
|
| 'fullStreetAddress'
|
|
@@ -275,6 +290,10 @@ export interface TextInputIOSProps {
|
|
|
275
290
|
| 'password'
|
|
276
291
|
| 'newPassword'
|
|
277
292
|
| 'oneTimeCode'
|
|
293
|
+
| 'birthdate'
|
|
294
|
+
| 'birthdateDay'
|
|
295
|
+
| 'birthdateMonth'
|
|
296
|
+
| 'birthdateYear'
|
|
278
297
|
| undefined;
|
|
279
298
|
|
|
280
299
|
/**
|
|
@@ -569,6 +588,11 @@ export interface TextInputProps
|
|
|
569
588
|
| 'cc-exp-month'
|
|
570
589
|
| 'cc-exp-year'
|
|
571
590
|
| 'cc-number'
|
|
591
|
+
| 'cc-name'
|
|
592
|
+
| 'cc-given-name'
|
|
593
|
+
| 'cc-middle-name'
|
|
594
|
+
| 'cc-family-name'
|
|
595
|
+
| 'cc-type'
|
|
572
596
|
| 'country'
|
|
573
597
|
| 'current-password'
|
|
574
598
|
| 'email'
|
|
@@ -162,6 +162,15 @@ export type TextContentType =
|
|
|
162
162
|
| 'addressState'
|
|
163
163
|
| 'countryName'
|
|
164
164
|
| 'creditCardNumber'
|
|
165
|
+
| 'creditCardExpiration'
|
|
166
|
+
| 'creditCardExpirationMonth'
|
|
167
|
+
| 'creditCardExpirationYear'
|
|
168
|
+
| 'creditCardSecurityCode'
|
|
169
|
+
| 'creditCardType'
|
|
170
|
+
| 'creditCardName'
|
|
171
|
+
| 'creditCardGivenName'
|
|
172
|
+
| 'creditCardMiddleName'
|
|
173
|
+
| 'creditCardFamilyName'
|
|
165
174
|
| 'emailAddress'
|
|
166
175
|
| 'familyName'
|
|
167
176
|
| 'fullStreetAddress'
|
|
@@ -182,7 +191,11 @@ export type TextContentType =
|
|
|
182
191
|
| 'username'
|
|
183
192
|
| 'password'
|
|
184
193
|
| 'newPassword'
|
|
185
|
-
| 'oneTimeCode'
|
|
194
|
+
| 'oneTimeCode'
|
|
195
|
+
| 'birthdate'
|
|
196
|
+
| 'birthdateDay'
|
|
197
|
+
| 'birthdateMonth'
|
|
198
|
+
| 'birthdateYear';
|
|
186
199
|
|
|
187
200
|
export type enterKeyHintType =
|
|
188
201
|
| 'enter'
|
|
@@ -418,7 +431,16 @@ export type Props = $ReadOnly<{|
|
|
|
418
431
|
* - `additional-name`
|
|
419
432
|
* - `address-line1`
|
|
420
433
|
* - `address-line2`
|
|
434
|
+
* - `birthdate-day` (iOS 17+)
|
|
435
|
+
* - `birthdate-full` (iOS 17+)
|
|
436
|
+
* - `birthdate-month` (iOS 17+)
|
|
437
|
+
* - `birthdate-year` (iOS 17+)
|
|
421
438
|
* - `cc-number`
|
|
439
|
+
* - `cc-csc` (iOS 17+)
|
|
440
|
+
* - `cc-exp` (iOS 17+)
|
|
441
|
+
* - `cc-exp-day` (iOS 17+)
|
|
442
|
+
* - `cc-exp-month` (iOS 17+)
|
|
443
|
+
* - `cc-exp-year` (iOS 17+)
|
|
422
444
|
* - `country`
|
|
423
445
|
* - `current-password`
|
|
424
446
|
* - `email`
|
|
@@ -437,6 +459,11 @@ export type Props = $ReadOnly<{|
|
|
|
437
459
|
*
|
|
438
460
|
* The following values work on iOS only:
|
|
439
461
|
*
|
|
462
|
+
* - `cc-name` (iOS 17+)
|
|
463
|
+
* - `cc-given-name` (iOS 17+)
|
|
464
|
+
* - `cc-middle-name` (iOS 17+)
|
|
465
|
+
* - `cc-family-name` (iOS 17+)
|
|
466
|
+
* - `cc-type` (iOS 17+)
|
|
440
467
|
* - `nickname`
|
|
441
468
|
* - `organization`
|
|
442
469
|
* - `organization-title`
|
|
@@ -444,15 +471,6 @@ export type Props = $ReadOnly<{|
|
|
|
444
471
|
*
|
|
445
472
|
* The following values work on Android only:
|
|
446
473
|
*
|
|
447
|
-
* - `birthdate-day`
|
|
448
|
-
* - `birthdate-full`
|
|
449
|
-
* - `birthdate-month`
|
|
450
|
-
* - `birthdate-year`
|
|
451
|
-
* - `cc-csc`
|
|
452
|
-
* - `cc-exp`
|
|
453
|
-
* - `cc-exp-day`
|
|
454
|
-
* - `cc-exp-month`
|
|
455
|
-
* - `cc-exp-year`
|
|
456
474
|
* - `gender`
|
|
457
475
|
* - `name-family`
|
|
458
476
|
* - `name-given`
|
|
@@ -488,6 +506,11 @@ export type Props = $ReadOnly<{|
|
|
|
488
506
|
| 'cc-exp-month'
|
|
489
507
|
| 'cc-exp-year'
|
|
490
508
|
| 'cc-number'
|
|
509
|
+
| 'cc-name'
|
|
510
|
+
| 'cc-given-name'
|
|
511
|
+
| 'cc-middle-name'
|
|
512
|
+
| 'cc-family-name'
|
|
513
|
+
| 'cc-type'
|
|
491
514
|
| 'country'
|
|
492
515
|
| 'current-password'
|
|
493
516
|
| 'email'
|
|
@@ -200,6 +200,15 @@ export type TextContentType =
|
|
|
200
200
|
| 'addressState'
|
|
201
201
|
| 'countryName'
|
|
202
202
|
| 'creditCardNumber'
|
|
203
|
+
| 'creditCardExpiration'
|
|
204
|
+
| 'creditCardExpirationMonth'
|
|
205
|
+
| 'creditCardExpirationYear'
|
|
206
|
+
| 'creditCardSecurityCode'
|
|
207
|
+
| 'creditCardType'
|
|
208
|
+
| 'creditCardName'
|
|
209
|
+
| 'creditCardGivenName'
|
|
210
|
+
| 'creditCardMiddleName'
|
|
211
|
+
| 'creditCardFamilyName'
|
|
203
212
|
| 'emailAddress'
|
|
204
213
|
| 'familyName'
|
|
205
214
|
| 'fullStreetAddress'
|
|
@@ -220,7 +229,11 @@ export type TextContentType =
|
|
|
220
229
|
| 'username'
|
|
221
230
|
| 'password'
|
|
222
231
|
| 'newPassword'
|
|
223
|
-
| 'oneTimeCode'
|
|
232
|
+
| 'oneTimeCode'
|
|
233
|
+
| 'birthdate'
|
|
234
|
+
| 'birthdateDay'
|
|
235
|
+
| 'birthdateMonth'
|
|
236
|
+
| 'birthdateYear';
|
|
224
237
|
|
|
225
238
|
export type enterKeyHintType =
|
|
226
239
|
// Cross Platform
|
|
@@ -462,7 +475,16 @@ export type Props = $ReadOnly<{|
|
|
|
462
475
|
* - `additional-name`
|
|
463
476
|
* - `address-line1`
|
|
464
477
|
* - `address-line2`
|
|
478
|
+
* - `birthdate-day` (iOS 17+)
|
|
479
|
+
* - `birthdate-full` (iOS 17+)
|
|
480
|
+
* - `birthdate-month` (iOS 17+)
|
|
481
|
+
* - `birthdate-year` (iOS 17+)
|
|
465
482
|
* - `cc-number`
|
|
483
|
+
* - `cc-csc` (iOS 17+)
|
|
484
|
+
* - `cc-exp` (iOS 17+)
|
|
485
|
+
* - `cc-exp-day` (iOS 17+)
|
|
486
|
+
* - `cc-exp-month` (iOS 17+)
|
|
487
|
+
* - `cc-exp-year` (iOS 17+)
|
|
466
488
|
* - `country`
|
|
467
489
|
* - `current-password`
|
|
468
490
|
* - `email`
|
|
@@ -481,6 +503,11 @@ export type Props = $ReadOnly<{|
|
|
|
481
503
|
*
|
|
482
504
|
* The following values work on iOS only:
|
|
483
505
|
*
|
|
506
|
+
* - `cc-name` (iOS 17+)
|
|
507
|
+
* - `cc-given-name` (iOS 17+)
|
|
508
|
+
* - `cc-middle-name` (iOS 17+)
|
|
509
|
+
* - `cc-family-name` (iOS 17+)
|
|
510
|
+
* - `cc-type` (iOS 17+)
|
|
484
511
|
* - `nickname`
|
|
485
512
|
* - `organization`
|
|
486
513
|
* - `organization-title`
|
|
@@ -488,15 +515,6 @@ export type Props = $ReadOnly<{|
|
|
|
488
515
|
*
|
|
489
516
|
* The following values work on Android only:
|
|
490
517
|
*
|
|
491
|
-
* - `birthdate-day`
|
|
492
|
-
* - `birthdate-full`
|
|
493
|
-
* - `birthdate-month`
|
|
494
|
-
* - `birthdate-year`
|
|
495
|
-
* - `cc-csc`
|
|
496
|
-
* - `cc-exp`
|
|
497
|
-
* - `cc-exp-day`
|
|
498
|
-
* - `cc-exp-month`
|
|
499
|
-
* - `cc-exp-year`
|
|
500
518
|
* - `gender`
|
|
501
519
|
* - `name-family`
|
|
502
520
|
* - `name-given`
|
|
@@ -532,6 +550,11 @@ export type Props = $ReadOnly<{|
|
|
|
532
550
|
| 'cc-exp-month'
|
|
533
551
|
| 'cc-exp-year'
|
|
534
552
|
| 'cc-number'
|
|
553
|
+
| 'cc-name'
|
|
554
|
+
| 'cc-given-name'
|
|
555
|
+
| 'cc-middle-name'
|
|
556
|
+
| 'cc-family-name'
|
|
557
|
+
| 'cc-type'
|
|
535
558
|
| 'country'
|
|
536
559
|
| 'current-password'
|
|
537
560
|
| 'email'
|
|
@@ -1572,7 +1595,20 @@ const autoCompleteWebToAutoCompleteAndroidMap = {
|
|
|
1572
1595
|
const autoCompleteWebToTextContentTypeMap = {
|
|
1573
1596
|
'address-line1': 'streetAddressLine1',
|
|
1574
1597
|
'address-line2': 'streetAddressLine2',
|
|
1598
|
+
bday: 'birthdate',
|
|
1599
|
+
'bday-day': 'birthdateDay',
|
|
1600
|
+
'bday-month': 'birthdateMonth',
|
|
1601
|
+
'bday-year': 'birthdateYear',
|
|
1602
|
+
'cc-csc': 'creditCardSecurityCode',
|
|
1603
|
+
'cc-exp-month': 'creditCardExpirationMonth',
|
|
1604
|
+
'cc-exp-year': 'creditCardExpirationYear',
|
|
1605
|
+
'cc-exp': 'creditCardExpiration',
|
|
1606
|
+
'cc-given-name': 'creditCardGivenName',
|
|
1607
|
+
'cc-additional-name': 'creditCardMiddleName',
|
|
1608
|
+
'cc-family-name': 'creditCardFamilyName',
|
|
1609
|
+
'cc-name': 'creditCardName',
|
|
1575
1610
|
'cc-number': 'creditCardNumber',
|
|
1611
|
+
'cc-type': 'creditCardType',
|
|
1576
1612
|
'current-password': 'password',
|
|
1577
1613
|
country: 'countryName',
|
|
1578
1614
|
email: 'emailAddress',
|
|
@@ -212,6 +212,15 @@ export type TextContentType =
|
|
|
212
212
|
| 'addressState'
|
|
213
213
|
| 'countryName'
|
|
214
214
|
| 'creditCardNumber'
|
|
215
|
+
| 'creditCardExpiration'
|
|
216
|
+
| 'creditCardExpirationMonth'
|
|
217
|
+
| 'creditCardExpirationYear'
|
|
218
|
+
| 'creditCardSecurityCode'
|
|
219
|
+
| 'creditCardType'
|
|
220
|
+
| 'creditCardName'
|
|
221
|
+
| 'creditCardGivenName'
|
|
222
|
+
| 'creditCardMiddleName'
|
|
223
|
+
| 'creditCardFamilyName'
|
|
215
224
|
| 'emailAddress'
|
|
216
225
|
| 'familyName'
|
|
217
226
|
| 'fullStreetAddress'
|
|
@@ -232,7 +241,11 @@ export type TextContentType =
|
|
|
232
241
|
| 'username'
|
|
233
242
|
| 'password'
|
|
234
243
|
| 'newPassword'
|
|
235
|
-
| 'oneTimeCode'
|
|
244
|
+
| 'oneTimeCode'
|
|
245
|
+
| 'birthdate'
|
|
246
|
+
| 'birthdateDay'
|
|
247
|
+
| 'birthdateMonth'
|
|
248
|
+
| 'birthdateYear';
|
|
236
249
|
|
|
237
250
|
export type enterKeyHintType =
|
|
238
251
|
// Cross Platform
|
|
@@ -539,7 +552,16 @@ export type Props = $ReadOnly<{|
|
|
|
539
552
|
* - `additional-name`
|
|
540
553
|
* - `address-line1`
|
|
541
554
|
* - `address-line2`
|
|
555
|
+
* - `birthdate-day` (iOS 17+)
|
|
556
|
+
* - `birthdate-full` (iOS 17+)
|
|
557
|
+
* - `birthdate-month` (iOS 17+)
|
|
558
|
+
* - `birthdate-year` (iOS 17+)
|
|
542
559
|
* - `cc-number`
|
|
560
|
+
* - `cc-csc` (iOS 17+)
|
|
561
|
+
* - `cc-exp` (iOS 17+)
|
|
562
|
+
* - `cc-exp-day` (iOS 17+)
|
|
563
|
+
* - `cc-exp-month` (iOS 17+)
|
|
564
|
+
* - `cc-exp-year` (iOS 17+)
|
|
543
565
|
* - `country`
|
|
544
566
|
* - `current-password`
|
|
545
567
|
* - `email`
|
|
@@ -558,6 +580,11 @@ export type Props = $ReadOnly<{|
|
|
|
558
580
|
*
|
|
559
581
|
* The following values work on iOS only:
|
|
560
582
|
*
|
|
583
|
+
* - `cc-name` (iOS 17+)
|
|
584
|
+
* - `cc-given-name` (iOS 17+)
|
|
585
|
+
* - `cc-middle-name` (iOS 17+)
|
|
586
|
+
* - `cc-family-name` (iOS 17+)
|
|
587
|
+
* - `cc-type` (iOS 17+)
|
|
561
588
|
* - `nickname`
|
|
562
589
|
* - `organization`
|
|
563
590
|
* - `organization-title`
|
|
@@ -565,15 +592,6 @@ export type Props = $ReadOnly<{|
|
|
|
565
592
|
*
|
|
566
593
|
* The following values work on Android only:
|
|
567
594
|
*
|
|
568
|
-
* - `birthdate-day`
|
|
569
|
-
* - `birthdate-full`
|
|
570
|
-
* - `birthdate-month`
|
|
571
|
-
* - `birthdate-year`
|
|
572
|
-
* - `cc-csc`
|
|
573
|
-
* - `cc-exp`
|
|
574
|
-
* - `cc-exp-day`
|
|
575
|
-
* - `cc-exp-month`
|
|
576
|
-
* - `cc-exp-year`
|
|
577
595
|
* - `gender`
|
|
578
596
|
* - `name-family`
|
|
579
597
|
* - `name-given`
|
|
@@ -609,6 +627,11 @@ export type Props = $ReadOnly<{|
|
|
|
609
627
|
| 'cc-exp-month'
|
|
610
628
|
| 'cc-exp-year'
|
|
611
629
|
| 'cc-number'
|
|
630
|
+
| 'cc-name'
|
|
631
|
+
| 'cc-given-name'
|
|
632
|
+
| 'cc-middle-name'
|
|
633
|
+
| 'cc-family-name'
|
|
634
|
+
| 'cc-type'
|
|
612
635
|
| 'country'
|
|
613
636
|
| 'current-password'
|
|
614
637
|
| 'email'
|
|
@@ -1746,7 +1769,20 @@ const autoCompleteWebToAutoCompleteAndroidMap = {
|
|
|
1746
1769
|
const autoCompleteWebToTextContentTypeMap = {
|
|
1747
1770
|
'address-line1': 'streetAddressLine1',
|
|
1748
1771
|
'address-line2': 'streetAddressLine2',
|
|
1772
|
+
bday: 'birthdate',
|
|
1773
|
+
'bday-day': 'birthdateDay',
|
|
1774
|
+
'bday-month': 'birthdateMonth',
|
|
1775
|
+
'bday-year': 'birthdateYear',
|
|
1776
|
+
'cc-csc': 'creditCardSecurityCode',
|
|
1777
|
+
'cc-exp-month': 'creditCardExpirationMonth',
|
|
1778
|
+
'cc-exp-year': 'creditCardExpirationYear',
|
|
1779
|
+
'cc-exp': 'creditCardExpiration',
|
|
1780
|
+
'cc-given-name': 'creditCardGivenName',
|
|
1781
|
+
'cc-additional-name': 'creditCardMiddleName',
|
|
1782
|
+
'cc-family-name': 'creditCardFamilyName',
|
|
1783
|
+
'cc-name': 'creditCardName',
|
|
1749
1784
|
'cc-number': 'creditCardNumber',
|
|
1785
|
+
'cc-type': 'creditCardType',
|
|
1750
1786
|
'current-password': 'password',
|
|
1751
1787
|
country: 'countryName',
|
|
1752
1788
|
email: 'emailAddress',
|
|
@@ -164,8 +164,8 @@ type GestureResponderEventProps = $ReadOnly<{|
|
|
|
164
164
|
* `View.props.onResponderGrant: (event) => {}`, where `event` is a synthetic
|
|
165
165
|
* touch event as described above.
|
|
166
166
|
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
167
|
+
* Return true from this callback to prevent any other native components from
|
|
168
|
+
* becoming responder until this responder terminates (Android-only).
|
|
169
169
|
*
|
|
170
170
|
* See https://reactnative.dev/docs/view#onrespondergrant
|
|
171
171
|
*/
|
|
@@ -569,7 +569,7 @@ export type ViewProps = $ReadOnly<{|
|
|
|
569
569
|
collapsable?: ?boolean,
|
|
570
570
|
|
|
571
571
|
/**
|
|
572
|
-
* Used to locate this view from native classes.
|
|
572
|
+
* Used to locate this view from native classes. Has precedence over `nativeID` prop.
|
|
573
573
|
*
|
|
574
574
|
* > This disables the 'layout-only view removal' optimization for this view!
|
|
575
575
|
*
|
|
@@ -165,8 +165,8 @@ type GestureResponderEventProps = $ReadOnly<{|
|
|
|
165
165
|
* `View.props.onResponderGrant: (event) => {}`, where `event` is a synthetic
|
|
166
166
|
* touch event as described above.
|
|
167
167
|
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
168
|
+
* Return true from this callback to prevent any other native components from
|
|
169
|
+
* becoming responder until this responder terminates (Android-only).
|
|
170
170
|
*
|
|
171
171
|
* See https://reactnative.dev/docs/view#onrespondergrant
|
|
172
172
|
*/
|
|
@@ -635,7 +635,7 @@ export type ViewProps = $ReadOnly<{|
|
|
|
635
635
|
collapsable?: ?boolean,
|
|
636
636
|
|
|
637
637
|
/**
|
|
638
|
-
* Used to locate this view from native classes.
|
|
638
|
+
* Used to locate this view from native classes. Has precedence over `nativeID` prop.
|
|
639
639
|
*
|
|
640
640
|
* > This disables the 'layout-only view removal' optimization for this view!
|
|
641
641
|
*
|
|
@@ -134,6 +134,8 @@ export type PressabilityConfig = $ReadOnly<{|
|
|
|
134
134
|
/**
|
|
135
135
|
* Returns whether a long press gesture should cancel the press gesture.
|
|
136
136
|
* Defaults to true.
|
|
137
|
+
*
|
|
138
|
+
* @deprecated
|
|
137
139
|
*/
|
|
138
140
|
onLongPressShouldCancelPress_DEPRECATED?: ?() => boolean,
|
|
139
141
|
|
|
@@ -142,6 +144,8 @@ export type PressabilityConfig = $ReadOnly<{|
|
|
|
142
144
|
*
|
|
143
145
|
* Returns whether to yield to a lock termination request (e.g. if a native
|
|
144
146
|
* scroll gesture attempts to steal the responder lock).
|
|
147
|
+
*
|
|
148
|
+
* @deprecated
|
|
145
149
|
*/
|
|
146
150
|
onResponderTerminationRequest_DEPRECATED?: ?() => boolean,
|
|
147
151
|
|
|
@@ -163,7 +167,7 @@ export type EventHandlers = $ReadOnly<{|
|
|
|
163
167
|
onMouseLeave?: (event: MouseEvent) => void,
|
|
164
168
|
onPointerEnter?: (event: PointerEvent) => void,
|
|
165
169
|
onPointerLeave?: (event: PointerEvent) => void,
|
|
166
|
-
onResponderGrant: (event: PressEvent) => void,
|
|
170
|
+
onResponderGrant: (event: PressEvent) => void | boolean,
|
|
167
171
|
onResponderMove: (event: PressEvent) => void,
|
|
168
172
|
onResponderRelease: (event: PressEvent) => void,
|
|
169
173
|
onResponderTerminate: (event: PressEvent) => void,
|
|
@@ -464,7 +468,7 @@ export default class Pressability {
|
|
|
464
468
|
return !disabled;
|
|
465
469
|
},
|
|
466
470
|
|
|
467
|
-
onResponderGrant: (event: PressEvent): void => {
|
|
471
|
+
onResponderGrant: (event: PressEvent): void | boolean => {
|
|
468
472
|
event.persist();
|
|
469
473
|
|
|
470
474
|
this._cancelPressOutDelayTimeout();
|
|
@@ -490,6 +494,8 @@ export default class Pressability {
|
|
|
490
494
|
this._longPressDelayTimeout = setTimeout(() => {
|
|
491
495
|
this._handleLongPress(event);
|
|
492
496
|
}, delayLongPress + delayPressIn);
|
|
497
|
+
|
|
498
|
+
return this._config.cancelable === false;
|
|
493
499
|
},
|
|
494
500
|
|
|
495
501
|
onResponderMove: (event: PressEvent): void => {
|
|
@@ -145,6 +145,8 @@ export type PressabilityConfig = $ReadOnly<{|
|
|
|
145
145
|
/**
|
|
146
146
|
* Returns whether a long press gesture should cancel the press gesture.
|
|
147
147
|
* Defaults to true.
|
|
148
|
+
*
|
|
149
|
+
* @deprecated
|
|
148
150
|
*/
|
|
149
151
|
onLongPressShouldCancelPress_DEPRECATED?: ?() => boolean,
|
|
150
152
|
|
|
@@ -153,6 +155,8 @@ export type PressabilityConfig = $ReadOnly<{|
|
|
|
153
155
|
*
|
|
154
156
|
* Returns whether to yield to a lock termination request (e.g. if a native
|
|
155
157
|
* scroll gesture attempts to steal the responder lock).
|
|
158
|
+
*
|
|
159
|
+
* @deprecated
|
|
156
160
|
*/
|
|
157
161
|
onResponderTerminationRequest_DEPRECATED?: ?() => boolean,
|
|
158
162
|
|
|
@@ -190,7 +194,7 @@ export type EventHandlers = $ReadOnly<{|
|
|
|
190
194
|
onMouseLeave?: (event: MouseEvent) => void,
|
|
191
195
|
onPointerEnter?: (event: PointerEvent) => void,
|
|
192
196
|
onPointerLeave?: (event: PointerEvent) => void,
|
|
193
|
-
onResponderGrant: (event: PressEvent) => void,
|
|
197
|
+
onResponderGrant: (event: PressEvent) => void | boolean,
|
|
194
198
|
onResponderMove: (event: PressEvent) => void,
|
|
195
199
|
onResponderRelease: (event: PressEvent) => void,
|
|
196
200
|
onResponderTerminate: (event: PressEvent) => void,
|
|
@@ -497,7 +501,7 @@ export default class Pressability {
|
|
|
497
501
|
return !disabled;
|
|
498
502
|
},
|
|
499
503
|
|
|
500
|
-
onResponderGrant: (event: PressEvent): void => {
|
|
504
|
+
onResponderGrant: (event: PressEvent): void | boolean => {
|
|
501
505
|
event.persist();
|
|
502
506
|
|
|
503
507
|
this._cancelPressOutDelayTimeout();
|
|
@@ -523,6 +527,8 @@ export default class Pressability {
|
|
|
523
527
|
this._longPressDelayTimeout = setTimeout(() => {
|
|
524
528
|
this._handleLongPress(event);
|
|
525
529
|
}, delayLongPress + delayPressIn);
|
|
530
|
+
|
|
531
|
+
return this._config.cancelable === false;
|
|
526
532
|
},
|
|
527
533
|
|
|
528
534
|
onResponderMove: (event: PressEvent): void => {
|