@aws-amplify/ui-react-native 1.2.18 → 1.2.20
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/CHANGELOG.md +24 -0
- package/dist/Authenticator/Authenticator.d.ts +6 -12
- package/dist/Authenticator/Authenticator.js +5 -0
- package/dist/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.js +15 -4
- package/dist/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.js +13 -3
- package/dist/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.js +13 -3
- package/dist/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.js +13 -3
- package/dist/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.js +15 -4
- package/dist/Authenticator/Defaults/ResetPassword/ResetPassword.js +13 -3
- package/dist/Authenticator/Defaults/SetupTOTP/SetupTOTP.js +13 -3
- package/dist/Authenticator/Defaults/SignIn/SignIn.js +3 -2
- package/dist/Authenticator/Defaults/SignUp/SignUp.js +9 -3
- package/dist/Authenticator/Defaults/VerifyUser/VerifyUser.js +3 -3
- package/dist/Authenticator/common/DefaultContent/DefaultContent.js +2 -2
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/useDeprecationWarning/index.d.ts +1 -0
- package/dist/hooks/useDeprecationWarning/index.js +1 -0
- package/dist/hooks/useDeprecationWarning/useDeprecationWarning.d.ts +6 -0
- package/dist/hooks/useDeprecationWarning/useDeprecationWarning.js +11 -0
- package/dist/primitives/Radio/styles.js +2 -1
- package/dist/utils/platform.d.ts +5 -0
- package/dist/utils/platform.js +2 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -4
- package/src/Authenticator/Authenticator.tsx +7 -0
- package/src/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.tsx +19 -3
- package/src/Authenticator/Defaults/ConfirmResetPassword/__tests__/ConfirmResetPassword.spec.tsx +1 -0
- package/src/Authenticator/Defaults/ConfirmResetPassword/__tests__/__snapshots__/ConfirmResetPassword.spec.tsx.snap +13 -0
- package/src/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.tsx +17 -3
- package/src/Authenticator/Defaults/ConfirmSignIn/__tests__/__snapshots__/ConfirmSignIn.spec.tsx.snap +13 -0
- package/src/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.tsx +17 -3
- package/src/Authenticator/Defaults/ConfirmSignUp/__tests__/__snapshots__/ConfirmSignUp.spec.tsx.snap +19 -0
- package/src/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.tsx +17 -3
- package/src/Authenticator/Defaults/ConfirmVerifyUser/__tests__/__snapshots__/ConfirmVerifyUser.spec.tsx.snap +19 -0
- package/src/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.tsx +19 -3
- package/src/Authenticator/Defaults/ForceNewPassword/__tests__/ForceNewPassword.spec.tsx +1 -0
- package/src/Authenticator/Defaults/ForceNewPassword/__tests__/__snapshots__/ForceNewPassword.spec.tsx.snap +19 -0
- package/src/Authenticator/Defaults/ResetPassword/ResetPassword.tsx +17 -3
- package/src/Authenticator/Defaults/ResetPassword/__tests__/__snapshots__/ResetPassword.spec.tsx.snap +13 -0
- package/src/Authenticator/Defaults/SetupTOTP/SetupTOTP.tsx +17 -3
- package/src/Authenticator/Defaults/SetupTOTP/__tests__/__snapshots__/SetupTOTP.spec.tsx.snap +13 -0
- package/src/Authenticator/Defaults/SignIn/SignIn.tsx +7 -2
- package/src/Authenticator/Defaults/SignIn/__tests__/__snapshots__/SignIn.spec.tsx.snap +19 -0
- package/src/Authenticator/Defaults/SignUp/SignUp.tsx +13 -2
- package/src/Authenticator/Defaults/SignUp/__tests__/SignUp.spec.tsx +1 -0
- package/src/Authenticator/Defaults/SignUp/__tests__/__snapshots__/SignUp.spec.tsx.snap +31 -0
- package/src/Authenticator/Defaults/VerifyUser/VerifyUser.tsx +7 -3
- package/src/Authenticator/Defaults/VerifyUser/__tests__/__snapshots__/VerifyUser.spec.tsx.snap +19 -0
- package/src/Authenticator/common/DefaultContent/DefaultContent.tsx +2 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useDeprecationWarning/__tests__/useDeprecationWarning.spec.ts +42 -0
- package/src/hooks/useDeprecationWarning/index.ts +1 -0
- package/src/hooks/useDeprecationWarning/useDeprecationWarning.ts +21 -0
- package/src/primitives/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +9 -0
- package/src/primitives/Radio/styles.ts +2 -1
- package/src/primitives/RadioGroup/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +24 -0
- package/src/utils/platform.ts +2 -0
- package/src/version.ts +1 -1
|
@@ -25,11 +25,16 @@ const ConfirmResetPassword: DefaultConfirmResetPasswordComponent = ({
|
|
|
25
25
|
handleBlur,
|
|
26
26
|
handleChange,
|
|
27
27
|
handleSubmit,
|
|
28
|
+
hasValidationErrors,
|
|
28
29
|
isPending,
|
|
29
30
|
resendCode,
|
|
30
31
|
...rest
|
|
31
32
|
}) => {
|
|
32
|
-
const {
|
|
33
|
+
const {
|
|
34
|
+
disableFormSubmit,
|
|
35
|
+
fields: fieldsWithHandlers,
|
|
36
|
+
handleFormSubmit,
|
|
37
|
+
} = useFieldValues({
|
|
33
38
|
componentName: COMPONENT_NAME,
|
|
34
39
|
fields,
|
|
35
40
|
handleBlur,
|
|
@@ -37,16 +42,27 @@ const ConfirmResetPassword: DefaultConfirmResetPasswordComponent = ({
|
|
|
37
42
|
handleSubmit,
|
|
38
43
|
});
|
|
39
44
|
|
|
45
|
+
const disabled = hasValidationErrors || disableFormSubmit;
|
|
40
46
|
const headerText = getResetYourPasswordText();
|
|
41
47
|
const primaryButtonText = isPending ? getSubmittingText() : getSubmitText();
|
|
42
48
|
const secondaryButtonText = getResendCodeText();
|
|
43
49
|
|
|
44
50
|
const buttons = useMemo(
|
|
45
51
|
() => ({
|
|
46
|
-
primary: {
|
|
52
|
+
primary: {
|
|
53
|
+
children: primaryButtonText,
|
|
54
|
+
disabled,
|
|
55
|
+
onPress: handleFormSubmit,
|
|
56
|
+
},
|
|
47
57
|
secondary: { children: secondaryButtonText, onPress: resendCode },
|
|
48
58
|
}),
|
|
49
|
-
[
|
|
59
|
+
[
|
|
60
|
+
disabled,
|
|
61
|
+
handleFormSubmit,
|
|
62
|
+
primaryButtonText,
|
|
63
|
+
resendCode,
|
|
64
|
+
secondaryButtonText,
|
|
65
|
+
]
|
|
50
66
|
);
|
|
51
67
|
|
|
52
68
|
return (
|
|
@@ -423,6 +423,7 @@ Array [
|
|
|
423
423
|
},
|
|
424
424
|
]
|
|
425
425
|
}
|
|
426
|
+
testID="amplify__error-message"
|
|
426
427
|
>
|
|
427
428
|
<Image
|
|
428
429
|
accessibilityRole="image"
|
|
@@ -467,6 +468,11 @@ Array [
|
|
|
467
468
|
</View>,
|
|
468
469
|
<View
|
|
469
470
|
accessibilityRole="button"
|
|
471
|
+
accessibilityState={
|
|
472
|
+
Object {
|
|
473
|
+
"disabled": false,
|
|
474
|
+
}
|
|
475
|
+
}
|
|
470
476
|
accessible={true}
|
|
471
477
|
collapsable={false}
|
|
472
478
|
focusable={true}
|
|
@@ -496,6 +502,7 @@ Array [
|
|
|
496
502
|
},
|
|
497
503
|
]
|
|
498
504
|
}
|
|
505
|
+
testID="amplify__button"
|
|
499
506
|
>
|
|
500
507
|
<Text
|
|
501
508
|
style={
|
|
@@ -974,6 +981,11 @@ Array [
|
|
|
974
981
|
</View>,
|
|
975
982
|
<View
|
|
976
983
|
accessibilityRole="button"
|
|
984
|
+
accessibilityState={
|
|
985
|
+
Object {
|
|
986
|
+
"disabled": false,
|
|
987
|
+
}
|
|
988
|
+
}
|
|
977
989
|
accessible={true}
|
|
978
990
|
collapsable={false}
|
|
979
991
|
focusable={true}
|
|
@@ -1003,6 +1015,7 @@ Array [
|
|
|
1003
1015
|
},
|
|
1004
1016
|
]
|
|
1005
1017
|
}
|
|
1018
|
+
testID="amplify__button"
|
|
1006
1019
|
>
|
|
1007
1020
|
<Text
|
|
1008
1021
|
style={
|
|
@@ -30,7 +30,11 @@ const ConfirmSignIn: DefaultConfirmSignInComponent = ({
|
|
|
30
30
|
toSignIn,
|
|
31
31
|
...rest
|
|
32
32
|
}) => {
|
|
33
|
-
const {
|
|
33
|
+
const {
|
|
34
|
+
disableFormSubmit: disabled,
|
|
35
|
+
fields: fieldsWithHandlers,
|
|
36
|
+
handleFormSubmit,
|
|
37
|
+
} = useFieldValues({
|
|
34
38
|
componentName: COMPONENT_NAME,
|
|
35
39
|
fields,
|
|
36
40
|
handleBlur,
|
|
@@ -44,10 +48,20 @@ const ConfirmSignIn: DefaultConfirmSignInComponent = ({
|
|
|
44
48
|
|
|
45
49
|
const buttons = useMemo(
|
|
46
50
|
() => ({
|
|
47
|
-
primary: {
|
|
51
|
+
primary: {
|
|
52
|
+
children: primaryButtonText,
|
|
53
|
+
disabled,
|
|
54
|
+
onPress: handleFormSubmit,
|
|
55
|
+
},
|
|
48
56
|
links: [{ children: secondaryButtonText, onPress: toSignIn }],
|
|
49
57
|
}),
|
|
50
|
-
[
|
|
58
|
+
[
|
|
59
|
+
disabled,
|
|
60
|
+
handleFormSubmit,
|
|
61
|
+
primaryButtonText,
|
|
62
|
+
secondaryButtonText,
|
|
63
|
+
toSignIn,
|
|
64
|
+
]
|
|
51
65
|
);
|
|
52
66
|
|
|
53
67
|
return (
|
package/src/Authenticator/Defaults/ConfirmSignIn/__tests__/__snapshots__/ConfirmSignIn.spec.tsx.snap
CHANGED
|
@@ -127,6 +127,7 @@ Array [
|
|
|
127
127
|
},
|
|
128
128
|
]
|
|
129
129
|
}
|
|
130
|
+
testID="amplify__error-message"
|
|
130
131
|
>
|
|
131
132
|
<Image
|
|
132
133
|
accessibilityRole="image"
|
|
@@ -171,6 +172,11 @@ Array [
|
|
|
171
172
|
</View>,
|
|
172
173
|
<View
|
|
173
174
|
accessibilityRole="button"
|
|
175
|
+
accessibilityState={
|
|
176
|
+
Object {
|
|
177
|
+
"disabled": false,
|
|
178
|
+
}
|
|
179
|
+
}
|
|
174
180
|
accessible={true}
|
|
175
181
|
collapsable={false}
|
|
176
182
|
focusable={true}
|
|
@@ -200,6 +206,7 @@ Array [
|
|
|
200
206
|
},
|
|
201
207
|
]
|
|
202
208
|
}
|
|
209
|
+
testID="amplify__button"
|
|
203
210
|
>
|
|
204
211
|
<Text
|
|
205
212
|
style={
|
|
@@ -391,6 +398,11 @@ Array [
|
|
|
391
398
|
</View>,
|
|
392
399
|
<View
|
|
393
400
|
accessibilityRole="button"
|
|
401
|
+
accessibilityState={
|
|
402
|
+
Object {
|
|
403
|
+
"disabled": false,
|
|
404
|
+
}
|
|
405
|
+
}
|
|
394
406
|
accessible={true}
|
|
395
407
|
collapsable={false}
|
|
396
408
|
focusable={true}
|
|
@@ -420,6 +432,7 @@ Array [
|
|
|
420
432
|
},
|
|
421
433
|
]
|
|
422
434
|
}
|
|
435
|
+
testID="amplify__button"
|
|
423
436
|
>
|
|
424
437
|
<Text
|
|
425
438
|
style={
|
|
@@ -31,7 +31,11 @@ const ConfirmSignUp: DefaultConfirmSignUpComponent = ({
|
|
|
31
31
|
resendCode,
|
|
32
32
|
...rest
|
|
33
33
|
}) => {
|
|
34
|
-
const {
|
|
34
|
+
const {
|
|
35
|
+
disableFormSubmit: disabled,
|
|
36
|
+
fields: fieldsWithHandlers,
|
|
37
|
+
handleFormSubmit,
|
|
38
|
+
} = useFieldValues({
|
|
35
39
|
componentName: COMPONENT_NAME,
|
|
36
40
|
fields,
|
|
37
41
|
handleBlur,
|
|
@@ -46,10 +50,20 @@ const ConfirmSignUp: DefaultConfirmSignUpComponent = ({
|
|
|
46
50
|
|
|
47
51
|
const buttons = useMemo(
|
|
48
52
|
() => ({
|
|
49
|
-
primary: {
|
|
53
|
+
primary: {
|
|
54
|
+
children: primaryButtonText,
|
|
55
|
+
disabled,
|
|
56
|
+
onPress: handleFormSubmit,
|
|
57
|
+
},
|
|
50
58
|
secondary: { children: secondaryButtonText, onPress: resendCode },
|
|
51
59
|
}),
|
|
52
|
-
[
|
|
60
|
+
[
|
|
61
|
+
disabled,
|
|
62
|
+
handleFormSubmit,
|
|
63
|
+
primaryButtonText,
|
|
64
|
+
resendCode,
|
|
65
|
+
secondaryButtonText,
|
|
66
|
+
]
|
|
53
67
|
);
|
|
54
68
|
|
|
55
69
|
return (
|
package/src/Authenticator/Defaults/ConfirmSignUp/__tests__/__snapshots__/ConfirmSignUp.spec.tsx.snap
CHANGED
|
@@ -53,6 +53,11 @@ Array [
|
|
|
53
53
|
/>,
|
|
54
54
|
<View
|
|
55
55
|
accessibilityRole="button"
|
|
56
|
+
accessibilityState={
|
|
57
|
+
Object {
|
|
58
|
+
"disabled": false,
|
|
59
|
+
}
|
|
60
|
+
}
|
|
56
61
|
accessible={true}
|
|
57
62
|
collapsable={false}
|
|
58
63
|
focusable={true}
|
|
@@ -82,6 +87,7 @@ Array [
|
|
|
82
87
|
},
|
|
83
88
|
]
|
|
84
89
|
}
|
|
90
|
+
testID="amplify__button"
|
|
85
91
|
>
|
|
86
92
|
<Text
|
|
87
93
|
style={
|
|
@@ -204,6 +210,11 @@ Array [
|
|
|
204
210
|
/>,
|
|
205
211
|
<View
|
|
206
212
|
accessibilityRole="button"
|
|
213
|
+
accessibilityState={
|
|
214
|
+
Object {
|
|
215
|
+
"disabled": false,
|
|
216
|
+
}
|
|
217
|
+
}
|
|
207
218
|
accessible={true}
|
|
208
219
|
collapsable={false}
|
|
209
220
|
focusable={true}
|
|
@@ -233,6 +244,7 @@ Array [
|
|
|
233
244
|
},
|
|
234
245
|
]
|
|
235
246
|
}
|
|
247
|
+
testID="amplify__button"
|
|
236
248
|
>
|
|
237
249
|
<Text
|
|
238
250
|
style={
|
|
@@ -369,6 +381,7 @@ Array [
|
|
|
369
381
|
},
|
|
370
382
|
]
|
|
371
383
|
}
|
|
384
|
+
testID="amplify__error-message"
|
|
372
385
|
>
|
|
373
386
|
<Image
|
|
374
387
|
accessibilityRole="image"
|
|
@@ -413,6 +426,11 @@ Array [
|
|
|
413
426
|
</View>,
|
|
414
427
|
<View
|
|
415
428
|
accessibilityRole="button"
|
|
429
|
+
accessibilityState={
|
|
430
|
+
Object {
|
|
431
|
+
"disabled": false,
|
|
432
|
+
}
|
|
433
|
+
}
|
|
416
434
|
accessible={true}
|
|
417
435
|
collapsable={false}
|
|
418
436
|
focusable={true}
|
|
@@ -442,6 +460,7 @@ Array [
|
|
|
442
460
|
},
|
|
443
461
|
]
|
|
444
462
|
}
|
|
463
|
+
testID="amplify__button"
|
|
445
464
|
>
|
|
446
465
|
<Text
|
|
447
466
|
style={
|
|
@@ -29,7 +29,11 @@ const ConfirmVerifyUser: DefaultConfirmVerifyUserComponent = ({
|
|
|
29
29
|
skipVerification,
|
|
30
30
|
...rest
|
|
31
31
|
}) => {
|
|
32
|
-
const {
|
|
32
|
+
const {
|
|
33
|
+
disableFormSubmit: disabled,
|
|
34
|
+
fields: fieldsWithHandlers,
|
|
35
|
+
handleFormSubmit,
|
|
36
|
+
} = useFieldValues({
|
|
33
37
|
componentName: COMPONENT_NAME,
|
|
34
38
|
fields,
|
|
35
39
|
handleBlur,
|
|
@@ -43,10 +47,20 @@ const ConfirmVerifyUser: DefaultConfirmVerifyUserComponent = ({
|
|
|
43
47
|
|
|
44
48
|
const buttons = useMemo(
|
|
45
49
|
() => ({
|
|
46
|
-
primary: {
|
|
50
|
+
primary: {
|
|
51
|
+
children: primaryButtonText,
|
|
52
|
+
disabled,
|
|
53
|
+
onPress: handleFormSubmit,
|
|
54
|
+
},
|
|
47
55
|
links: [{ children: secondaryButtonText, onPress: skipVerification }],
|
|
48
56
|
}),
|
|
49
|
-
[
|
|
57
|
+
[
|
|
58
|
+
disabled,
|
|
59
|
+
handleFormSubmit,
|
|
60
|
+
primaryButtonText,
|
|
61
|
+
skipVerification,
|
|
62
|
+
secondaryButtonText,
|
|
63
|
+
]
|
|
50
64
|
);
|
|
51
65
|
|
|
52
66
|
return (
|
|
@@ -32,6 +32,11 @@ Array [
|
|
|
32
32
|
/>,
|
|
33
33
|
<View
|
|
34
34
|
accessibilityRole="button"
|
|
35
|
+
accessibilityState={
|
|
36
|
+
Object {
|
|
37
|
+
"disabled": false,
|
|
38
|
+
}
|
|
39
|
+
}
|
|
35
40
|
accessible={true}
|
|
36
41
|
collapsable={false}
|
|
37
42
|
focusable={true}
|
|
@@ -61,6 +66,7 @@ Array [
|
|
|
61
66
|
},
|
|
62
67
|
]
|
|
63
68
|
}
|
|
69
|
+
testID="amplify__button"
|
|
64
70
|
>
|
|
65
71
|
<Text
|
|
66
72
|
style={
|
|
@@ -171,6 +177,11 @@ Array [
|
|
|
171
177
|
/>,
|
|
172
178
|
<View
|
|
173
179
|
accessibilityRole="button"
|
|
180
|
+
accessibilityState={
|
|
181
|
+
Object {
|
|
182
|
+
"disabled": false,
|
|
183
|
+
}
|
|
184
|
+
}
|
|
174
185
|
accessible={true}
|
|
175
186
|
collapsable={false}
|
|
176
187
|
focusable={true}
|
|
@@ -200,6 +211,7 @@ Array [
|
|
|
200
211
|
},
|
|
201
212
|
]
|
|
202
213
|
}
|
|
214
|
+
testID="amplify__button"
|
|
203
215
|
>
|
|
204
216
|
<Text
|
|
205
217
|
style={
|
|
@@ -324,6 +336,7 @@ Array [
|
|
|
324
336
|
},
|
|
325
337
|
]
|
|
326
338
|
}
|
|
339
|
+
testID="amplify__error-message"
|
|
327
340
|
>
|
|
328
341
|
<Image
|
|
329
342
|
accessibilityRole="image"
|
|
@@ -368,6 +381,11 @@ Array [
|
|
|
368
381
|
</View>,
|
|
369
382
|
<View
|
|
370
383
|
accessibilityRole="button"
|
|
384
|
+
accessibilityState={
|
|
385
|
+
Object {
|
|
386
|
+
"disabled": false,
|
|
387
|
+
}
|
|
388
|
+
}
|
|
371
389
|
accessible={true}
|
|
372
390
|
collapsable={false}
|
|
373
391
|
focusable={true}
|
|
@@ -397,6 +415,7 @@ Array [
|
|
|
397
415
|
},
|
|
398
416
|
]
|
|
399
417
|
}
|
|
418
|
+
testID="amplify__button"
|
|
400
419
|
>
|
|
401
420
|
<Text
|
|
402
421
|
style={
|
|
@@ -21,11 +21,16 @@ const ForceNewPassword: DefaultForceNewPasswordComponent = ({
|
|
|
21
21
|
handleBlur,
|
|
22
22
|
handleChange,
|
|
23
23
|
handleSubmit,
|
|
24
|
+
hasValidationErrors,
|
|
24
25
|
isPending,
|
|
25
26
|
toSignIn,
|
|
26
27
|
...rest
|
|
27
28
|
}) => {
|
|
28
|
-
const {
|
|
29
|
+
const {
|
|
30
|
+
disableFormSubmit,
|
|
31
|
+
fields: fieldsWithHandlers,
|
|
32
|
+
handleFormSubmit,
|
|
33
|
+
} = useFieldValues({
|
|
29
34
|
componentName: COMPONENT_NAME,
|
|
30
35
|
fields,
|
|
31
36
|
handleBlur,
|
|
@@ -33,6 +38,7 @@ const ForceNewPassword: DefaultForceNewPasswordComponent = ({
|
|
|
33
38
|
handleSubmit,
|
|
34
39
|
});
|
|
35
40
|
|
|
41
|
+
const disabled = hasValidationErrors || disableFormSubmit;
|
|
36
42
|
const headerText = getChangePasswordText();
|
|
37
43
|
const primaryButtonText = isPending
|
|
38
44
|
? getChangingText()
|
|
@@ -41,10 +47,20 @@ const ForceNewPassword: DefaultForceNewPasswordComponent = ({
|
|
|
41
47
|
|
|
42
48
|
const buttons = useMemo(
|
|
43
49
|
() => ({
|
|
44
|
-
primary: {
|
|
50
|
+
primary: {
|
|
51
|
+
children: primaryButtonText,
|
|
52
|
+
disabled,
|
|
53
|
+
onPress: handleFormSubmit,
|
|
54
|
+
},
|
|
45
55
|
links: [{ children: secondaryButtonText, onPress: toSignIn }],
|
|
46
56
|
}),
|
|
47
|
-
[
|
|
57
|
+
[
|
|
58
|
+
disabled,
|
|
59
|
+
handleFormSubmit,
|
|
60
|
+
primaryButtonText,
|
|
61
|
+
secondaryButtonText,
|
|
62
|
+
toSignIn,
|
|
63
|
+
]
|
|
48
64
|
);
|
|
49
65
|
|
|
50
66
|
return (
|
|
@@ -168,6 +168,7 @@ Array [
|
|
|
168
168
|
},
|
|
169
169
|
]
|
|
170
170
|
}
|
|
171
|
+
testID="amplify__error-message"
|
|
171
172
|
>
|
|
172
173
|
<Image
|
|
173
174
|
accessibilityRole="image"
|
|
@@ -212,6 +213,11 @@ Array [
|
|
|
212
213
|
</View>,
|
|
213
214
|
<View
|
|
214
215
|
accessibilityRole="button"
|
|
216
|
+
accessibilityState={
|
|
217
|
+
Object {
|
|
218
|
+
"disabled": false,
|
|
219
|
+
}
|
|
220
|
+
}
|
|
215
221
|
accessible={true}
|
|
216
222
|
collapsable={false}
|
|
217
223
|
focusable={true}
|
|
@@ -241,6 +247,7 @@ Array [
|
|
|
241
247
|
},
|
|
242
248
|
]
|
|
243
249
|
}
|
|
250
|
+
testID="amplify__button"
|
|
244
251
|
>
|
|
245
252
|
<Text
|
|
246
253
|
style={
|
|
@@ -473,6 +480,11 @@ Array [
|
|
|
473
480
|
</View>,
|
|
474
481
|
<View
|
|
475
482
|
accessibilityRole="button"
|
|
483
|
+
accessibilityState={
|
|
484
|
+
Object {
|
|
485
|
+
"disabled": false,
|
|
486
|
+
}
|
|
487
|
+
}
|
|
476
488
|
accessible={true}
|
|
477
489
|
collapsable={false}
|
|
478
490
|
focusable={true}
|
|
@@ -502,6 +514,7 @@ Array [
|
|
|
502
514
|
},
|
|
503
515
|
]
|
|
504
516
|
}
|
|
517
|
+
testID="amplify__button"
|
|
505
518
|
>
|
|
506
519
|
<Text
|
|
507
520
|
style={
|
|
@@ -766,6 +779,11 @@ Array [
|
|
|
766
779
|
</View>,
|
|
767
780
|
<View
|
|
768
781
|
accessibilityRole="button"
|
|
782
|
+
accessibilityState={
|
|
783
|
+
Object {
|
|
784
|
+
"disabled": false,
|
|
785
|
+
}
|
|
786
|
+
}
|
|
769
787
|
accessible={true}
|
|
770
788
|
collapsable={false}
|
|
771
789
|
focusable={true}
|
|
@@ -795,6 +813,7 @@ Array [
|
|
|
795
813
|
},
|
|
796
814
|
]
|
|
797
815
|
}
|
|
816
|
+
testID="amplify__button"
|
|
798
817
|
>
|
|
799
818
|
<Text
|
|
800
819
|
style={
|
|
@@ -28,7 +28,11 @@ const ResetPassword: DefaultResetPasswordComponent = ({
|
|
|
28
28
|
toSignIn,
|
|
29
29
|
...rest
|
|
30
30
|
}) => {
|
|
31
|
-
const {
|
|
31
|
+
const {
|
|
32
|
+
disableFormSubmit: disabled,
|
|
33
|
+
fields: fieldsWithHandlers,
|
|
34
|
+
handleFormSubmit,
|
|
35
|
+
} = useFieldValues({
|
|
32
36
|
componentName: COMPONENT_NAME,
|
|
33
37
|
fields,
|
|
34
38
|
handleBlur,
|
|
@@ -42,10 +46,20 @@ const ResetPassword: DefaultResetPasswordComponent = ({
|
|
|
42
46
|
|
|
43
47
|
const buttons = useMemo(
|
|
44
48
|
() => ({
|
|
45
|
-
primary: {
|
|
49
|
+
primary: {
|
|
50
|
+
children: primaryButtonText,
|
|
51
|
+
disabled,
|
|
52
|
+
onPress: handleFormSubmit,
|
|
53
|
+
},
|
|
46
54
|
links: [{ children: secondaryButtonText, onPress: toSignIn }],
|
|
47
55
|
}),
|
|
48
|
-
[
|
|
56
|
+
[
|
|
57
|
+
disabled,
|
|
58
|
+
handleFormSubmit,
|
|
59
|
+
primaryButtonText,
|
|
60
|
+
secondaryButtonText,
|
|
61
|
+
toSignIn,
|
|
62
|
+
]
|
|
49
63
|
);
|
|
50
64
|
|
|
51
65
|
return (
|
package/src/Authenticator/Defaults/ResetPassword/__tests__/__snapshots__/ResetPassword.spec.tsx.snap
CHANGED
|
@@ -127,6 +127,7 @@ Array [
|
|
|
127
127
|
},
|
|
128
128
|
]
|
|
129
129
|
}
|
|
130
|
+
testID="amplify__error-message"
|
|
130
131
|
>
|
|
131
132
|
<Image
|
|
132
133
|
accessibilityRole="image"
|
|
@@ -171,6 +172,11 @@ Array [
|
|
|
171
172
|
</View>,
|
|
172
173
|
<View
|
|
173
174
|
accessibilityRole="button"
|
|
175
|
+
accessibilityState={
|
|
176
|
+
Object {
|
|
177
|
+
"disabled": false,
|
|
178
|
+
}
|
|
179
|
+
}
|
|
174
180
|
accessible={true}
|
|
175
181
|
collapsable={false}
|
|
176
182
|
focusable={true}
|
|
@@ -200,6 +206,7 @@ Array [
|
|
|
200
206
|
},
|
|
201
207
|
]
|
|
202
208
|
}
|
|
209
|
+
testID="amplify__button"
|
|
203
210
|
>
|
|
204
211
|
<Text
|
|
205
212
|
style={
|
|
@@ -391,6 +398,11 @@ Array [
|
|
|
391
398
|
</View>,
|
|
392
399
|
<View
|
|
393
400
|
accessibilityRole="button"
|
|
401
|
+
accessibilityState={
|
|
402
|
+
Object {
|
|
403
|
+
"disabled": false,
|
|
404
|
+
}
|
|
405
|
+
}
|
|
394
406
|
accessible={true}
|
|
395
407
|
collapsable={false}
|
|
396
408
|
focusable={true}
|
|
@@ -420,6 +432,7 @@ Array [
|
|
|
420
432
|
},
|
|
421
433
|
]
|
|
422
434
|
}
|
|
435
|
+
testID="amplify__button"
|
|
423
436
|
>
|
|
424
437
|
<Text
|
|
425
438
|
style={
|
|
@@ -35,7 +35,11 @@ const SetupTOTP: DefaultSetupTOTPComponent = ({
|
|
|
35
35
|
totpSecretCode,
|
|
36
36
|
...rest
|
|
37
37
|
}) => {
|
|
38
|
-
const {
|
|
38
|
+
const {
|
|
39
|
+
disableFormSubmit: disabled,
|
|
40
|
+
fields: fieldsWithHandlers,
|
|
41
|
+
handleFormSubmit,
|
|
42
|
+
} = useFieldValues({
|
|
39
43
|
componentName: COMPONENT_NAME,
|
|
40
44
|
fields,
|
|
41
45
|
handleBlur,
|
|
@@ -60,10 +64,20 @@ const SetupTOTP: DefaultSetupTOTPComponent = ({
|
|
|
60
64
|
|
|
61
65
|
const buttons = useMemo(
|
|
62
66
|
() => ({
|
|
63
|
-
primary: {
|
|
67
|
+
primary: {
|
|
68
|
+
children: primaryButtonText,
|
|
69
|
+
disabled,
|
|
70
|
+
onPress: handleFormSubmit,
|
|
71
|
+
},
|
|
64
72
|
links: [{ children: secondaryButtonText, onPress: toSignIn }],
|
|
65
73
|
}),
|
|
66
|
-
[
|
|
74
|
+
[
|
|
75
|
+
disabled,
|
|
76
|
+
handleFormSubmit,
|
|
77
|
+
primaryButtonText,
|
|
78
|
+
secondaryButtonText,
|
|
79
|
+
toSignIn,
|
|
80
|
+
]
|
|
67
81
|
);
|
|
68
82
|
|
|
69
83
|
return (
|
package/src/Authenticator/Defaults/SetupTOTP/__tests__/__snapshots__/SetupTOTP.spec.tsx.snap
CHANGED
|
@@ -172,6 +172,7 @@ Array [
|
|
|
172
172
|
},
|
|
173
173
|
]
|
|
174
174
|
}
|
|
175
|
+
testID="amplify__error-message"
|
|
175
176
|
>
|
|
176
177
|
<Image
|
|
177
178
|
accessibilityRole="image"
|
|
@@ -216,6 +217,11 @@ Array [
|
|
|
216
217
|
</View>,
|
|
217
218
|
<View
|
|
218
219
|
accessibilityRole="button"
|
|
220
|
+
accessibilityState={
|
|
221
|
+
Object {
|
|
222
|
+
"disabled": false,
|
|
223
|
+
}
|
|
224
|
+
}
|
|
219
225
|
accessible={true}
|
|
220
226
|
collapsable={false}
|
|
221
227
|
focusable={true}
|
|
@@ -245,6 +251,7 @@ Array [
|
|
|
245
251
|
},
|
|
246
252
|
]
|
|
247
253
|
}
|
|
254
|
+
testID="amplify__button"
|
|
248
255
|
>
|
|
249
256
|
<Text
|
|
250
257
|
style={
|
|
@@ -481,6 +488,11 @@ Array [
|
|
|
481
488
|
</View>,
|
|
482
489
|
<View
|
|
483
490
|
accessibilityRole="button"
|
|
491
|
+
accessibilityState={
|
|
492
|
+
Object {
|
|
493
|
+
"disabled": false,
|
|
494
|
+
}
|
|
495
|
+
}
|
|
484
496
|
accessible={true}
|
|
485
497
|
collapsable={false}
|
|
486
498
|
focusable={true}
|
|
@@ -510,6 +522,7 @@ Array [
|
|
|
510
522
|
},
|
|
511
523
|
]
|
|
512
524
|
}
|
|
525
|
+
testID="amplify__button"
|
|
513
526
|
>
|
|
514
527
|
<Text
|
|
515
528
|
style={
|