@aws-amplify/ui-react-native 1.2.20 → 1.2.22
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 +57 -0
- package/dist/Authenticator/Authenticator.d.ts +101 -148
- package/dist/Authenticator/Authenticator.js +2 -3
- package/dist/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.d.ts +13 -2
- package/dist/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.js +4 -3
- package/dist/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.d.ts +13 -2
- package/dist/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.js +4 -3
- package/dist/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.d.ts +13 -2
- package/dist/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.js +4 -3
- package/dist/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.d.ts +13 -2
- package/dist/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.js +4 -3
- package/dist/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.d.ts +13 -2
- package/dist/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.js +4 -3
- package/dist/Authenticator/Defaults/ResetPassword/ResetPassword.d.ts +13 -2
- package/dist/Authenticator/Defaults/ResetPassword/ResetPassword.js +4 -3
- package/dist/Authenticator/Defaults/SetupTOTP/SetupTOTP.d.ts +13 -2
- package/dist/Authenticator/Defaults/SetupTOTP/SetupTOTP.js +4 -3
- package/dist/Authenticator/Defaults/SignIn/SignIn.d.ts +13 -2
- package/dist/Authenticator/Defaults/SignIn/SignIn.js +4 -3
- package/dist/Authenticator/Defaults/SignUp/SignUp.d.ts +13 -2
- package/dist/Authenticator/Defaults/SignUp/SignUp.js +4 -3
- package/dist/Authenticator/Defaults/VerifyUser/VerifyUser.d.ts +13 -2
- package/dist/Authenticator/Defaults/VerifyUser/VerifyUser.js +4 -3
- package/dist/Authenticator/Defaults/types.d.ts +21 -20
- package/dist/Authenticator/common/DefaultContent/styles.js +1 -2
- package/dist/Authenticator/common/DefaultContent/types.d.ts +1 -1
- package/dist/Authenticator/common/DefaultFormFields/DefaultRadioFormFields.d.ts +7 -3
- package/dist/Authenticator/common/DefaultFormFields/DefaultRadioFormFields.js +4 -3
- package/dist/Authenticator/common/DefaultFormFields/DefaultTextFormFields.d.ts +6 -2
- package/dist/Authenticator/common/DefaultFormFields/DefaultTextFormFields.js +3 -3
- package/dist/Authenticator/common/DefaultFormFields/types.d.ts +12 -3
- package/dist/Authenticator/hooks/types.d.ts +3 -2
- package/dist/Authenticator/hooks/useFieldValues/types.d.ts +4 -1
- package/dist/Authenticator/hooks/useFieldValues/useFieldValues.d.ts +1 -1
- package/dist/Authenticator/hooks/useFieldValues/useFieldValues.js +21 -3
- package/dist/Authenticator/hooks/useFieldValues/utils.d.ts +10 -1
- package/dist/Authenticator/hooks/useFieldValues/utils.js +32 -2
- package/dist/primitives/Heading/styles.js +5 -5
- package/dist/primitives/Label/styles.js +2 -2
- package/dist/primitives/TextField/TextField.js +2 -1
- package/dist/primitives/TextField/styles.js +6 -3
- package/dist/primitives/TextField/types.d.ts +1 -0
- package/dist/theme/createTheme.js +24 -18
- package/dist/theme/types.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/jest.config.js +1 -0
- package/package.json +5 -5
- package/src/Authenticator/Authenticator.tsx +2 -6
- package/src/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.tsx +7 -3
- package/src/Authenticator/Defaults/ConfirmResetPassword/__tests__/__snapshots__/ConfirmResetPassword.spec.tsx.snap +34 -30
- package/src/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.tsx +7 -3
- package/src/Authenticator/Defaults/ConfirmSignIn/__tests__/ConfirmSignIn.spec.tsx +1 -0
- package/src/Authenticator/Defaults/ConfirmSignIn/__tests__/__snapshots__/ConfirmSignIn.spec.tsx.snap +14 -14
- package/src/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.tsx +7 -3
- package/src/Authenticator/Defaults/ConfirmSignUp/__tests__/ConfirmSignUp.spec.tsx +1 -0
- package/src/Authenticator/Defaults/ConfirmSignUp/__tests__/__snapshots__/ConfirmSignUp.spec.tsx.snap +12 -15
- package/src/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.tsx +7 -3
- package/src/Authenticator/Defaults/ConfirmVerifyUser/__tests__/ConfirmVerifyUser.spec.tsx +1 -0
- package/src/Authenticator/Defaults/ConfirmVerifyUser/__tests__/__snapshots__/ConfirmVerifyUser.spec.tsx.snap +6 -9
- package/src/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.tsx +7 -3
- package/src/Authenticator/Defaults/ForceNewPassword/__tests__/__snapshots__/ForceNewPassword.spec.tsx.snap +13 -10
- package/src/Authenticator/Defaults/ResetPassword/ResetPassword.tsx +7 -3
- package/src/Authenticator/Defaults/ResetPassword/__tests__/ResetPassword.spec.tsx +1 -0
- package/src/Authenticator/Defaults/ResetPassword/__tests__/__snapshots__/ResetPassword.spec.tsx.snap +14 -14
- package/src/Authenticator/Defaults/SetupTOTP/SetupTOTP.tsx +7 -3
- package/src/Authenticator/Defaults/SetupTOTP/__tests__/SetupTOTP.spec.tsx +1 -0
- package/src/Authenticator/Defaults/SetupTOTP/__tests__/__snapshots__/SetupTOTP.spec.tsx.snap +22 -22
- package/src/Authenticator/Defaults/SignIn/SignIn.tsx +7 -3
- package/src/Authenticator/Defaults/SignIn/__tests__/SignIn.spec.tsx +1 -0
- package/src/Authenticator/Defaults/SignIn/__tests__/__snapshots__/SignIn.spec.tsx.snap +36 -33
- package/src/Authenticator/Defaults/SignUp/SignUp.tsx +7 -3
- package/src/Authenticator/Defaults/SignUp/__tests__/__snapshots__/SignUp.spec.tsx.snap +111 -96
- package/src/Authenticator/Defaults/VerifyUser/VerifyUser.tsx +7 -3
- package/src/Authenticator/Defaults/VerifyUser/__tests__/VerifyUser.spec.tsx +1 -0
- package/src/Authenticator/Defaults/VerifyUser/__tests__/__snapshots__/VerifyUser.spec.tsx.snap +16 -18
- package/src/Authenticator/Defaults/types.ts +63 -49
- package/src/Authenticator/__tests__/Authenticator.spec.tsx +16 -19
- package/src/Authenticator/__tests__/__snapshots__/Authenticator.spec.tsx.snap +1 -9
- package/src/Authenticator/__tests__/withAuthenticator.spec.tsx +1 -1
- package/src/Authenticator/common/DefaultContent/styles.ts +1 -2
- package/src/Authenticator/common/DefaultContent/types.ts +1 -4
- package/src/Authenticator/common/DefaultFormFields/DefaultRadioFormFields.tsx +8 -6
- package/src/Authenticator/common/DefaultFormFields/DefaultTextFormFields.tsx +10 -7
- package/src/Authenticator/common/DefaultFormFields/types.ts +15 -5
- package/src/Authenticator/common/DefaultHeader/__tests__/__snapshots__/DefaultHeader.spec.tsx.snap +1 -1
- package/src/Authenticator/common/FederatedProviderButton/__tests__/__snapshots__/FederatedProviderButton.spec.tsx.snap +4 -4
- package/src/Authenticator/common/FederatedProviderButtons/__tests__/__snapshots__/FederatedProviderButtons.spec.tsx.snap +4 -4
- package/src/Authenticator/hooks/types.ts +3 -0
- package/src/Authenticator/hooks/useFieldValues/__tests__/useFieldValues.spec.ts +75 -2
- package/src/Authenticator/hooks/useFieldValues/__tests__/utils.spec.ts +67 -1
- package/src/Authenticator/hooks/useFieldValues/types.ts +5 -0
- package/src/Authenticator/hooks/useFieldValues/useFieldValues.ts +26 -1
- package/src/Authenticator/hooks/useFieldValues/utils.ts +44 -1
- package/src/primitives/Checkbox/__tests__/__snapshots__/Checkbox.spec.tsx.snap +14 -14
- package/src/primitives/Divider/__tests__/__snapshots__/Divider.spec.tsx.snap +4 -4
- package/src/primitives/Heading/__tests__/__snapshots__/Heading.spec.tsx.snap +7 -7
- package/src/primitives/Heading/styles.ts +5 -5
- package/src/primitives/Label/__tests__/__snapshots__/Label.spec.tsx.snap +8 -8
- package/src/primitives/Label/styles.ts +2 -2
- package/src/primitives/PasswordField/__tests__/__snapshots__/PasswordField.spec.tsx.snap +25 -20
- package/src/primitives/PhoneNumberField/__tests__/__snapshots__/PhoneNumberField.spec.tsx.snap +6 -0
- package/src/primitives/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +14 -14
- package/src/primitives/RadioGroup/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +48 -48
- package/src/primitives/TextField/TextField.tsx +2 -1
- package/src/primitives/TextField/__tests__/TextField.spec.tsx +57 -8
- package/src/primitives/TextField/__tests__/__snapshots__/TextField.spec.tsx.snap +61 -55
- package/src/primitives/TextField/styles.ts +6 -3
- package/src/primitives/TextField/types.ts +1 -0
- package/src/theme/__tests__/createTheme.spec.ts +48 -0
- package/src/theme/createTheme.ts +44 -21
- package/src/theme/types.ts +17 -16
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,62 @@
|
|
|
1
1
|
# @aws-amplify/ui-react-native
|
|
2
2
|
|
|
3
|
+
## 1.2.22
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#4276](https://github.com/aws-amplify/amplify-ui/pull/4276) [`9a491c767`](https://github.com/aws-amplify/amplify-ui/commit/9a491c767f2b440d75b8e4b3ddf53711d0fa5e8b) Thanks [@dbanksdesign](https://github.com/dbanksdesign)! - fix(react-native): small tweaks to authenticator styling to space out text fields a bit
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`6b71ec46c`](https://github.com/aws-amplify/amplify-ui/commit/6b71ec46ccbf63c4605c9a57d3ecff098a42938a)]:
|
|
10
|
+
- @aws-amplify/ui@5.6.8
|
|
11
|
+
- @aws-amplify/ui-react-core@2.1.27
|
|
12
|
+
- @aws-amplify/ui-react-core-notifications@1.0.4
|
|
13
|
+
|
|
14
|
+
## 1.2.21
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [#4227](https://github.com/aws-amplify/amplify-ui/pull/4227) [`d3ee05415`](https://github.com/aws-amplify/amplify-ui/commit/d3ee054159e1de81861bcd9273be9b1c87924cf4) Thanks [@dbanksdesign](https://github.com/dbanksdesign)! - fix(react-native): border widths, spacing, font sizes, opacities in the theme don't throw runtime errors.
|
|
19
|
+
|
|
20
|
+
These are all valid in a theme now:
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
const theme: Theme = {
|
|
24
|
+
tokens: {
|
|
25
|
+
borderWidths: {
|
|
26
|
+
small: '4',
|
|
27
|
+
medium: '1rem',
|
|
28
|
+
large: 6,
|
|
29
|
+
},
|
|
30
|
+
opacities: {
|
|
31
|
+
'10': '0.2',
|
|
32
|
+
},
|
|
33
|
+
space: {
|
|
34
|
+
small: 4,
|
|
35
|
+
medium: '6',
|
|
36
|
+
large: '{space.small.value}',
|
|
37
|
+
},
|
|
38
|
+
fontSizes: {
|
|
39
|
+
small: '1rem',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
- [#4215](https://github.com/aws-amplify/amplify-ui/pull/4215) [`279b3852c`](https://github.com/aws-amplify/amplify-ui/commit/279b3852cf579e10fab225536aa54850ab3a9424) Thanks [@calebpollman](https://github.com/calebpollman)! - fix(rna): expose TS types of RNA static components
|
|
46
|
+
|
|
47
|
+
- [#4225](https://github.com/aws-amplify/amplify-ui/pull/4225) [`d87fb4beb`](https://github.com/aws-amplify/amplify-ui/commit/d87fb4beb4fa6e76ee09221a1a361553884ac42b) Thanks [@dbanksdesign](https://github.com/dbanksdesign)! - feat(react-native): adding error styles to text field
|
|
48
|
+
|
|
49
|
+
- [#4107](https://github.com/aws-amplify/amplify-ui/pull/4107) [`6d14bf3f3`](https://github.com/aws-amplify/amplify-ui/commit/6d14bf3f386523bacd6832e56cc5903f644da88e) Thanks [@ioanabrooks](https://github.com/ioanabrooks)! - chore(ui-react-native): Add Authenticator fields validations
|
|
50
|
+
|
|
51
|
+
- [#4247](https://github.com/aws-amplify/amplify-ui/pull/4247) [`41b9055c8`](https://github.com/aws-amplify/amplify-ui/commit/41b9055c821b44e9347146a9588755eeef588f13) Thanks [@calebpollman](https://github.com/calebpollman)! - feature(rna): update is signed in logic to read from Auth
|
|
52
|
+
|
|
53
|
+
- [#4239](https://github.com/aws-amplify/amplify-ui/pull/4239) [`30e0fce43`](https://github.com/aws-amplify/amplify-ui/commit/30e0fce430cbab200f572205b5c5ce6ff618972c) Thanks [@dbanksdesign](https://github.com/dbanksdesign)! - fix(react-native): fix the theme components type
|
|
54
|
+
|
|
55
|
+
- Updated dependencies [[`78fdfd6c8`](https://github.com/aws-amplify/amplify-ui/commit/78fdfd6c8268c56204f905402162ad8cb40a0c8e), [`d3ee05415`](https://github.com/aws-amplify/amplify-ui/commit/d3ee054159e1de81861bcd9273be9b1c87924cf4), [`165a8abbd`](https://github.com/aws-amplify/amplify-ui/commit/165a8abbda8aa3e95fb9466fc60f8694c646d5bc), [`13098b36a`](https://github.com/aws-amplify/amplify-ui/commit/13098b36a75452d839955d141bd25f57538b1a22), [`37e490d39`](https://github.com/aws-amplify/amplify-ui/commit/37e490d3997a1dc55e2998c277790945921e6dc3), [`6d14bf3f3`](https://github.com/aws-amplify/amplify-ui/commit/6d14bf3f386523bacd6832e56cc5903f644da88e), [`aea82ff1b`](https://github.com/aws-amplify/amplify-ui/commit/aea82ff1bb6e066ed8b70433f4d72cd34bf0ccae)]:
|
|
56
|
+
- @aws-amplify/ui@5.6.7
|
|
57
|
+
- @aws-amplify/ui-react-core@2.1.26
|
|
58
|
+
- @aws-amplify/ui-react-core-notifications@1.0.3
|
|
59
|
+
|
|
3
60
|
## 1.2.20
|
|
4
61
|
|
|
5
62
|
### Patch Changes
|
|
@@ -1,156 +1,109 @@
|
|
|
1
|
-
/// <reference types="
|
|
2
|
-
import React from 'react';
|
|
1
|
+
/// <reference types="react" />
|
|
3
2
|
import { DefaultContainer } from './common';
|
|
4
3
|
import { AuthenticatorProps } from './types';
|
|
5
4
|
declare function Authenticator({ children, components: overrides, Container, Footer, Header, ...options }: AuthenticatorProps): JSX.Element | null;
|
|
6
5
|
declare namespace Authenticator {
|
|
7
6
|
var Container: typeof DefaultContainer;
|
|
8
7
|
var Provider: typeof import("@aws-amplify/ui-react-core").AuthenticatorProvider;
|
|
9
|
-
var ConfirmResetPassword:
|
|
10
|
-
resendCode:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
toResetPassword: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
|
|
110
|
-
toSignUp: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
|
|
111
|
-
} & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
|
|
112
|
-
fields: import("./hooks").TextFieldOptionsType[];
|
|
113
|
-
} & {
|
|
114
|
-
style?: import("./Defaults/types").SignInStyle | undefined;
|
|
115
|
-
}, any> | React.FunctionComponent<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
|
|
116
|
-
hideSignUp?: boolean | undefined;
|
|
117
|
-
toFederatedSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
|
|
118
|
-
toResetPassword: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
|
|
119
|
-
toSignUp: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
|
|
120
|
-
} & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
|
|
121
|
-
fields: import("./hooks").TextFieldOptionsType[];
|
|
122
|
-
} & {
|
|
123
|
-
style?: import("./Defaults/types").SignInStyle | undefined;
|
|
124
|
-
}>) & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType>;
|
|
125
|
-
var SignUp: (React.ComponentClass<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
|
|
126
|
-
hideSignIn?: boolean | undefined;
|
|
127
|
-
toFederatedSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
|
|
128
|
-
toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
|
|
129
|
-
} & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ValidationProps & {
|
|
130
|
-
fields: import("./hooks").TextFieldOptionsType[];
|
|
131
|
-
} & {
|
|
132
|
-
style?: import("./Defaults/types").SignUpStyle | undefined;
|
|
133
|
-
}, any> | React.FunctionComponent<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
|
|
134
|
-
hideSignIn?: boolean | undefined;
|
|
135
|
-
toFederatedSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
|
|
136
|
-
toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
|
|
137
|
-
} & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ValidationProps & {
|
|
138
|
-
fields: import("./hooks").TextFieldOptionsType[];
|
|
139
|
-
} & {
|
|
140
|
-
style?: import("./Defaults/types").SignUpStyle | undefined;
|
|
141
|
-
}>) & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType>;
|
|
142
|
-
var VerifyUser: (React.ComponentClass<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").RadioFieldOptions> & {
|
|
143
|
-
skipVerification: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
|
|
144
|
-
} & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
|
|
145
|
-
fields: import("./hooks").RadioFieldOptions[];
|
|
146
|
-
} & {
|
|
147
|
-
style?: import("./Defaults/types").VerifyUserStyle | undefined;
|
|
148
|
-
}, any> | React.FunctionComponent<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").RadioFieldOptions> & {
|
|
149
|
-
skipVerification: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
|
|
150
|
-
} & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
|
|
151
|
-
fields: import("./hooks").RadioFieldOptions[];
|
|
152
|
-
} & {
|
|
153
|
-
style?: import("./Defaults/types").VerifyUserStyle | undefined;
|
|
154
|
-
}>) & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").RadioFieldOptions>;
|
|
8
|
+
var ConfirmResetPassword: {
|
|
9
|
+
({ fields, handleBlur, handleChange, handleSubmit, hasValidationErrors, isPending, resendCode, validationErrors, ...rest }: import("./Defaults/types").DefaultConfirmResetPasswordProps): JSX.Element;
|
|
10
|
+
Footer: typeof import("./common").DefaultFooter;
|
|
11
|
+
FormFields: {
|
|
12
|
+
({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
Header: typeof import("./common").DefaultHeader;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
var ConfirmSignIn: {
|
|
19
|
+
({ challengeName, fields, handleBlur, handleChange, handleSubmit, isPending, toSignIn, validationErrors, ...rest }: import("./Defaults/types").DefaultConfirmSignInProps): JSX.Element;
|
|
20
|
+
Footer: typeof import("./common").DefaultFooter;
|
|
21
|
+
FormFields: {
|
|
22
|
+
({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
|
|
23
|
+
displayName: string;
|
|
24
|
+
};
|
|
25
|
+
Header: typeof import("./common").DefaultHeader;
|
|
26
|
+
displayName: string;
|
|
27
|
+
};
|
|
28
|
+
var ConfirmSignUp: {
|
|
29
|
+
({ codeDeliveryDetails, fields, handleBlur, handleChange, handleSubmit, isPending, resendCode, validationErrors, ...rest }: import("./Defaults/types").DefaultConfirmSignUpProps): JSX.Element;
|
|
30
|
+
FormFields: {
|
|
31
|
+
({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
|
|
32
|
+
displayName: string;
|
|
33
|
+
};
|
|
34
|
+
Footer: typeof import("./common").DefaultFooter;
|
|
35
|
+
Header: typeof import("./common").DefaultHeader;
|
|
36
|
+
displayName: string;
|
|
37
|
+
};
|
|
38
|
+
var ConfirmVerifyUser: {
|
|
39
|
+
({ fields, handleBlur, handleChange, handleSubmit, isPending, skipVerification, validationErrors, ...rest }: import("./Defaults/types").DefaultConfirmVerifyUserProps): JSX.Element;
|
|
40
|
+
Footer: typeof import("./common").DefaultFooter;
|
|
41
|
+
FormFields: {
|
|
42
|
+
({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
|
|
43
|
+
displayName: string;
|
|
44
|
+
};
|
|
45
|
+
Header: typeof import("./common").DefaultHeader;
|
|
46
|
+
displayName: string;
|
|
47
|
+
};
|
|
48
|
+
var ForceNewPassword: {
|
|
49
|
+
({ fields, handleBlur, handleChange, handleSubmit, hasValidationErrors, isPending, toSignIn, validationErrors, ...rest }: import("./Defaults/types").DefaultForceNewPasswordProps): JSX.Element;
|
|
50
|
+
Footer: typeof import("./common").DefaultFooter;
|
|
51
|
+
FormFields: {
|
|
52
|
+
({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
|
|
53
|
+
displayName: string;
|
|
54
|
+
};
|
|
55
|
+
Header: typeof import("./common").DefaultHeader;
|
|
56
|
+
displayName: string;
|
|
57
|
+
};
|
|
58
|
+
var ResetPassword: {
|
|
59
|
+
({ fields, handleBlur, handleChange, handleSubmit, isPending, toSignIn, validationErrors, ...rest }: import("./Defaults/types").DefaultResetPasswordProps): JSX.Element;
|
|
60
|
+
Footer: typeof import("./common").DefaultFooter;
|
|
61
|
+
FormFields: {
|
|
62
|
+
({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
|
|
63
|
+
displayName: string;
|
|
64
|
+
};
|
|
65
|
+
Header: typeof import("./common").DefaultHeader;
|
|
66
|
+
displayName: string;
|
|
67
|
+
};
|
|
68
|
+
var SetupTOTP: {
|
|
69
|
+
({ fields, handleBlur, handleChange, handleSubmit, isPending, toSignIn, totpSecretCode, validationErrors, ...rest }: import("./Defaults/types").DefaultSetupTOTPProps): JSX.Element;
|
|
70
|
+
Footer: typeof import("./common").DefaultFooter;
|
|
71
|
+
FormFields: {
|
|
72
|
+
({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
|
|
73
|
+
displayName: string;
|
|
74
|
+
};
|
|
75
|
+
Header: typeof import("./common").DefaultHeader;
|
|
76
|
+
displayName: string;
|
|
77
|
+
};
|
|
78
|
+
var SignIn: {
|
|
79
|
+
({ fields, handleBlur, handleChange, handleSubmit, hideSignUp, toResetPassword, toSignUp, validationErrors, ...rest }: import("./Defaults/types").DefaultSignInProps): JSX.Element;
|
|
80
|
+
Footer: typeof import("./common").DefaultFooter;
|
|
81
|
+
FormFields: {
|
|
82
|
+
({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
|
|
83
|
+
displayName: string;
|
|
84
|
+
};
|
|
85
|
+
Header: typeof import("./common").DefaultHeader;
|
|
86
|
+
displayName: string;
|
|
87
|
+
};
|
|
88
|
+
var SignUp: {
|
|
89
|
+
({ fields, handleBlur, handleChange, handleSubmit, hasValidationErrors, hideSignIn, isPending, toSignIn, validationErrors, ...rest }: import("./Defaults/types").DefaultSignUpProps): JSX.Element;
|
|
90
|
+
Footer: typeof import("./common").DefaultFooter;
|
|
91
|
+
FormFields: {
|
|
92
|
+
({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
|
|
93
|
+
displayName: string;
|
|
94
|
+
};
|
|
95
|
+
Header: typeof import("./common").DefaultHeader;
|
|
96
|
+
displayName: string;
|
|
97
|
+
};
|
|
98
|
+
var VerifyUser: {
|
|
99
|
+
({ fields, handleBlur, handleChange, handleSubmit, skipVerification, validationErrors, ...rest }: import("./Defaults/types").DefaultVerifyUserProps): JSX.Element;
|
|
100
|
+
Footer: typeof import("./common").DefaultFooter;
|
|
101
|
+
FormFields: {
|
|
102
|
+
({ fields, fieldContainerStyle, fieldLabelStyle, isPending, style, }: import("./common/DefaultFormFields/types").DefaultRadioFormFieldsProps): JSX.Element;
|
|
103
|
+
displayName: string;
|
|
104
|
+
};
|
|
105
|
+
Header: typeof import("./common").DefaultHeader;
|
|
106
|
+
displayName: string;
|
|
107
|
+
};
|
|
155
108
|
}
|
|
156
109
|
export default Authenticator;
|
|
@@ -19,7 +19,6 @@ const DEFAULTS = {
|
|
|
19
19
|
SignUp,
|
|
20
20
|
VerifyUser,
|
|
21
21
|
};
|
|
22
|
-
const isAuthenticatedRoute = (route) => route === 'authenticated' || route === 'signOut';
|
|
23
22
|
const routePropSelector = ({ route, }) => [
|
|
24
23
|
route,
|
|
25
24
|
];
|
|
@@ -35,13 +34,13 @@ function Authenticator({ children, components: overrides, Container = DefaultCon
|
|
|
35
34
|
});
|
|
36
35
|
}, []);
|
|
37
36
|
useAuthenticatorInitMachine(options);
|
|
38
|
-
const { fields, route } = useAuthenticator(routePropSelector);
|
|
37
|
+
const { authStatus, fields, route } = useAuthenticator(routePropSelector);
|
|
39
38
|
const components = useMemo(
|
|
40
39
|
// allow any to prevent TS from assuming that all fields are of type `TextFieldOptions`
|
|
41
40
|
() => resolveAuthenticatorComponents(DEFAULTS, overrides), [overrides]);
|
|
42
41
|
const { Component, props } = useAuthenticatorRoute({ components });
|
|
43
42
|
const typedFields = getRouteTypedFields({ fields, route });
|
|
44
|
-
if (
|
|
43
|
+
if (authStatus === 'authenticated') {
|
|
45
44
|
return children ? <>{children}</> : null;
|
|
46
45
|
}
|
|
47
46
|
return (<SafeAreaProvider>
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DefaultFooter, DefaultHeader } from '../../common';
|
|
3
|
+
import { DefaultConfirmResetPasswordProps } from '../types';
|
|
4
|
+
declare const ConfirmResetPassword: {
|
|
5
|
+
({ fields, handleBlur, handleChange, handleSubmit, hasValidationErrors, isPending, resendCode, validationErrors, ...rest }: DefaultConfirmResetPasswordProps): JSX.Element;
|
|
6
|
+
Footer: typeof DefaultFooter;
|
|
7
|
+
FormFields: {
|
|
8
|
+
({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("../../common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
Header: typeof DefaultHeader;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
3
14
|
export default ConfirmResetPassword;
|
|
@@ -4,13 +4,14 @@ import { DefaultContent, DefaultFooter, DefaultTextFormFields, DefaultHeader, }
|
|
|
4
4
|
import { useFieldValues } from '../../hooks';
|
|
5
5
|
const COMPONENT_NAME = 'ConfirmResetPassword';
|
|
6
6
|
const { getResetYourPasswordText, getSubmitText, getSubmittingText, getResendCodeText, } = authenticatorTextUtil;
|
|
7
|
-
const ConfirmResetPassword = ({ fields, handleBlur, handleChange, handleSubmit, hasValidationErrors, isPending, resendCode, ...rest }) => {
|
|
8
|
-
const { disableFormSubmit, fields: fieldsWithHandlers, handleFormSubmit, } = useFieldValues({
|
|
7
|
+
const ConfirmResetPassword = ({ fields, handleBlur, handleChange, handleSubmit, hasValidationErrors, isPending, resendCode, validationErrors, ...rest }) => {
|
|
8
|
+
const { disableFormSubmit, fields: fieldsWithHandlers, fieldValidationErrors, handleFormSubmit, } = useFieldValues({
|
|
9
9
|
componentName: COMPONENT_NAME,
|
|
10
10
|
fields,
|
|
11
11
|
handleBlur,
|
|
12
12
|
handleChange,
|
|
13
13
|
handleSubmit,
|
|
14
|
+
validationErrors,
|
|
14
15
|
});
|
|
15
16
|
const disabled = hasValidationErrors || disableFormSubmit;
|
|
16
17
|
const headerText = getResetYourPasswordText();
|
|
@@ -30,7 +31,7 @@ const ConfirmResetPassword = ({ fields, handleBlur, handleChange, handleSubmit,
|
|
|
30
31
|
resendCode,
|
|
31
32
|
secondaryButtonText,
|
|
32
33
|
]);
|
|
33
|
-
return (<DefaultContent {...rest} buttons={buttons} headerText={headerText} fields={fieldsWithHandlers} isPending={isPending}/>);
|
|
34
|
+
return (<DefaultContent {...rest} buttons={buttons} headerText={headerText} fields={fieldsWithHandlers} isPending={isPending} validationErrors={fieldValidationErrors}/>);
|
|
34
35
|
};
|
|
35
36
|
ConfirmResetPassword.Footer = DefaultFooter;
|
|
36
37
|
ConfirmResetPassword.FormFields = DefaultTextFormFields;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DefaultFooter, DefaultHeader } from '../../common';
|
|
3
|
+
import { DefaultConfirmSignInProps } from '../types';
|
|
4
|
+
declare const ConfirmSignIn: {
|
|
5
|
+
({ challengeName, fields, handleBlur, handleChange, handleSubmit, isPending, toSignIn, validationErrors, ...rest }: DefaultConfirmSignInProps): JSX.Element;
|
|
6
|
+
Footer: typeof DefaultFooter;
|
|
7
|
+
FormFields: {
|
|
8
|
+
({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("../../common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
Header: typeof DefaultHeader;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
3
14
|
export default ConfirmSignIn;
|
|
@@ -4,13 +4,14 @@ import { DefaultContent, DefaultFooter, DefaultTextFormFields, DefaultHeader, }
|
|
|
4
4
|
import { useFieldValues } from '../../hooks';
|
|
5
5
|
const COMPONENT_NAME = 'ConfirmSignIn';
|
|
6
6
|
const { getBackToSignInText, getChallengeText, getConfirmText, getConfirmingText, } = authenticatorTextUtil;
|
|
7
|
-
const ConfirmSignIn = ({ challengeName, fields, handleBlur, handleChange, handleSubmit, isPending, toSignIn, ...rest }) => {
|
|
8
|
-
const { disableFormSubmit: disabled, fields: fieldsWithHandlers, handleFormSubmit, } = useFieldValues({
|
|
7
|
+
const ConfirmSignIn = ({ challengeName, fields, handleBlur, handleChange, handleSubmit, isPending, toSignIn, validationErrors, ...rest }) => {
|
|
8
|
+
const { disableFormSubmit: disabled, fields: fieldsWithHandlers, fieldValidationErrors, handleFormSubmit, } = useFieldValues({
|
|
9
9
|
componentName: COMPONENT_NAME,
|
|
10
10
|
fields,
|
|
11
11
|
handleBlur,
|
|
12
12
|
handleChange,
|
|
13
13
|
handleSubmit,
|
|
14
|
+
validationErrors,
|
|
14
15
|
});
|
|
15
16
|
const headerText = getChallengeText(challengeName);
|
|
16
17
|
const primaryButtonText = isPending ? getConfirmingText() : getConfirmText();
|
|
@@ -29,7 +30,7 @@ const ConfirmSignIn = ({ challengeName, fields, handleBlur, handleChange, handle
|
|
|
29
30
|
secondaryButtonText,
|
|
30
31
|
toSignIn,
|
|
31
32
|
]);
|
|
32
|
-
return (<DefaultContent {...rest} buttons={buttons} headerText={headerText} fields={fieldsWithHandlers} isPending={isPending}/>);
|
|
33
|
+
return (<DefaultContent {...rest} buttons={buttons} headerText={headerText} fields={fieldsWithHandlers} isPending={isPending} validationErrors={fieldValidationErrors}/>);
|
|
33
34
|
};
|
|
34
35
|
ConfirmSignIn.Footer = DefaultFooter;
|
|
35
36
|
ConfirmSignIn.FormFields = DefaultTextFormFields;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DefaultFooter, DefaultHeader } from '../../common';
|
|
3
|
+
import { DefaultConfirmSignUpProps } from '../types';
|
|
4
|
+
declare const ConfirmSignUp: {
|
|
5
|
+
({ codeDeliveryDetails, fields, handleBlur, handleChange, handleSubmit, isPending, resendCode, validationErrors, ...rest }: DefaultConfirmSignUpProps): JSX.Element;
|
|
6
|
+
FormFields: {
|
|
7
|
+
({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("../../common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
10
|
+
Footer: typeof DefaultFooter;
|
|
11
|
+
Header: typeof DefaultHeader;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
3
14
|
export default ConfirmSignUp;
|
|
@@ -4,13 +4,14 @@ import { DefaultContent, DefaultFooter, DefaultTextFormFields, DefaultHeader, }
|
|
|
4
4
|
import { useFieldValues } from '../../hooks';
|
|
5
5
|
const COMPONENT_NAME = 'ConfirmSignUp';
|
|
6
6
|
const { getDeliveryMethodText, getDeliveryMessageText, getConfirmingText, getConfirmText, getResendCodeText, } = authenticatorTextUtil;
|
|
7
|
-
const ConfirmSignUp = ({ codeDeliveryDetails, fields, handleBlur, handleChange, handleSubmit, isPending, resendCode, ...rest }) => {
|
|
8
|
-
const { disableFormSubmit: disabled, fields: fieldsWithHandlers, handleFormSubmit, } = useFieldValues({
|
|
7
|
+
const ConfirmSignUp = ({ codeDeliveryDetails, fields, handleBlur, handleChange, handleSubmit, isPending, resendCode, validationErrors, ...rest }) => {
|
|
8
|
+
const { disableFormSubmit: disabled, fields: fieldsWithHandlers, fieldValidationErrors, handleFormSubmit, } = useFieldValues({
|
|
9
9
|
componentName: COMPONENT_NAME,
|
|
10
10
|
fields,
|
|
11
11
|
handleBlur,
|
|
12
12
|
handleChange,
|
|
13
13
|
handleSubmit,
|
|
14
|
+
validationErrors,
|
|
14
15
|
});
|
|
15
16
|
const headerText = getDeliveryMethodText(codeDeliveryDetails);
|
|
16
17
|
const bodyText = getDeliveryMessageText(codeDeliveryDetails);
|
|
@@ -30,7 +31,7 @@ const ConfirmSignUp = ({ codeDeliveryDetails, fields, handleBlur, handleChange,
|
|
|
30
31
|
resendCode,
|
|
31
32
|
secondaryButtonText,
|
|
32
33
|
]);
|
|
33
|
-
return (<DefaultContent {...rest} body={bodyText} buttons={buttons} headerText={headerText} fields={fieldsWithHandlers} isPending={isPending}/>);
|
|
34
|
+
return (<DefaultContent {...rest} body={bodyText} buttons={buttons} headerText={headerText} fields={fieldsWithHandlers} isPending={isPending} validationErrors={fieldValidationErrors}/>);
|
|
34
35
|
};
|
|
35
36
|
ConfirmSignUp.FormFields = DefaultTextFormFields;
|
|
36
37
|
ConfirmSignUp.Footer = DefaultFooter;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DefaultFooter, DefaultHeader } from '../../common';
|
|
3
|
+
import { DefaultConfirmVerifyUserProps } from '../types';
|
|
4
|
+
declare const ConfirmVerifyUser: {
|
|
5
|
+
({ fields, handleBlur, handleChange, handleSubmit, isPending, skipVerification, validationErrors, ...rest }: DefaultConfirmVerifyUserProps): JSX.Element;
|
|
6
|
+
Footer: typeof DefaultFooter;
|
|
7
|
+
FormFields: {
|
|
8
|
+
({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("../../common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
Header: typeof DefaultHeader;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
3
14
|
export default ConfirmVerifyUser;
|
|
@@ -4,13 +4,14 @@ import { DefaultContent, DefaultFooter, DefaultTextFormFields, DefaultHeader, }
|
|
|
4
4
|
import { useFieldValues } from '../../hooks';
|
|
5
5
|
const COMPONENT_NAME = 'ConfirmVerifyUser';
|
|
6
6
|
const { getAccountRecoveryInfoText, getSkipText, getSubmitText, getSubmittingText, } = authenticatorTextUtil;
|
|
7
|
-
const ConfirmVerifyUser = ({ fields, handleBlur, handleChange, handleSubmit, isPending, skipVerification, ...rest }) => {
|
|
8
|
-
const { disableFormSubmit: disabled, fields: fieldsWithHandlers, handleFormSubmit, } = useFieldValues({
|
|
7
|
+
const ConfirmVerifyUser = ({ fields, handleBlur, handleChange, handleSubmit, isPending, skipVerification, validationErrors, ...rest }) => {
|
|
8
|
+
const { disableFormSubmit: disabled, fields: fieldsWithHandlers, fieldValidationErrors, handleFormSubmit, } = useFieldValues({
|
|
9
9
|
componentName: COMPONENT_NAME,
|
|
10
10
|
fields,
|
|
11
11
|
handleBlur,
|
|
12
12
|
handleChange,
|
|
13
13
|
handleSubmit,
|
|
14
|
+
validationErrors,
|
|
14
15
|
});
|
|
15
16
|
const headerText = getAccountRecoveryInfoText();
|
|
16
17
|
const primaryButtonText = isPending ? getSubmittingText() : getSubmitText();
|
|
@@ -29,7 +30,7 @@ const ConfirmVerifyUser = ({ fields, handleBlur, handleChange, handleSubmit, isP
|
|
|
29
30
|
skipVerification,
|
|
30
31
|
secondaryButtonText,
|
|
31
32
|
]);
|
|
32
|
-
return (<DefaultContent {...rest} buttons={buttons} headerText={headerText} fields={fieldsWithHandlers} isPending={isPending}/>);
|
|
33
|
+
return (<DefaultContent {...rest} buttons={buttons} headerText={headerText} fields={fieldsWithHandlers} isPending={isPending} validationErrors={fieldValidationErrors}/>);
|
|
33
34
|
};
|
|
34
35
|
ConfirmVerifyUser.Footer = DefaultFooter;
|
|
35
36
|
ConfirmVerifyUser.FormFields = DefaultTextFormFields;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DefaultFooter, DefaultHeader } from '../../common';
|
|
3
|
+
import { DefaultForceNewPasswordProps } from '../types';
|
|
4
|
+
declare const ForceNewPassword: {
|
|
5
|
+
({ fields, handleBlur, handleChange, handleSubmit, hasValidationErrors, isPending, toSignIn, validationErrors, ...rest }: DefaultForceNewPasswordProps): JSX.Element;
|
|
6
|
+
Footer: typeof DefaultFooter;
|
|
7
|
+
FormFields: {
|
|
8
|
+
({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("../../common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
Header: typeof DefaultHeader;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
3
14
|
export default ForceNewPassword;
|
|
@@ -4,13 +4,14 @@ import { DefaultContent, DefaultFooter, DefaultTextFormFields, DefaultHeader, }
|
|
|
4
4
|
import { useFieldValues } from '../../hooks';
|
|
5
5
|
const COMPONENT_NAME = 'ForceNewPassword';
|
|
6
6
|
const { getChangePasswordText, getChangingText, getBackToSignInText } = authenticatorTextUtil;
|
|
7
|
-
const ForceNewPassword = ({ fields, handleBlur, handleChange, handleSubmit, hasValidationErrors, isPending, toSignIn, ...rest }) => {
|
|
8
|
-
const { disableFormSubmit, fields: fieldsWithHandlers, handleFormSubmit, } = useFieldValues({
|
|
7
|
+
const ForceNewPassword = ({ fields, handleBlur, handleChange, handleSubmit, hasValidationErrors, isPending, toSignIn, validationErrors, ...rest }) => {
|
|
8
|
+
const { disableFormSubmit, fields: fieldsWithHandlers, fieldValidationErrors, handleFormSubmit, } = useFieldValues({
|
|
9
9
|
componentName: COMPONENT_NAME,
|
|
10
10
|
fields,
|
|
11
11
|
handleBlur,
|
|
12
12
|
handleChange,
|
|
13
13
|
handleSubmit,
|
|
14
|
+
validationErrors,
|
|
14
15
|
});
|
|
15
16
|
const disabled = hasValidationErrors || disableFormSubmit;
|
|
16
17
|
const headerText = getChangePasswordText();
|
|
@@ -32,7 +33,7 @@ const ForceNewPassword = ({ fields, handleBlur, handleChange, handleSubmit, hasV
|
|
|
32
33
|
secondaryButtonText,
|
|
33
34
|
toSignIn,
|
|
34
35
|
]);
|
|
35
|
-
return (<DefaultContent {...rest} buttons={buttons} headerText={headerText} fields={fieldsWithHandlers} isPending={isPending}/>);
|
|
36
|
+
return (<DefaultContent {...rest} buttons={buttons} headerText={headerText} fields={fieldsWithHandlers} isPending={isPending} validationErrors={fieldValidationErrors}/>);
|
|
36
37
|
};
|
|
37
38
|
ForceNewPassword.Footer = DefaultFooter;
|
|
38
39
|
ForceNewPassword.FormFields = DefaultTextFormFields;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DefaultFooter, DefaultHeader } from '../../common';
|
|
3
|
+
import { DefaultResetPasswordProps } from '../types';
|
|
4
|
+
declare const ResetPassword: {
|
|
5
|
+
({ fields, handleBlur, handleChange, handleSubmit, isPending, toSignIn, validationErrors, ...rest }: DefaultResetPasswordProps): JSX.Element;
|
|
6
|
+
Footer: typeof DefaultFooter;
|
|
7
|
+
FormFields: {
|
|
8
|
+
({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("../../common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
Header: typeof DefaultHeader;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
3
14
|
export default ResetPassword;
|