@aws-amplify/ui-react-core 1.0.2 → 1.0.3
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/dist/Authenticator/hooks/useAuthenticator/constants.js +1 -0
- package/dist/Authenticator/hooks/useAuthenticator/utils.js +3 -1
- package/dist/esm/Authenticator/hooks/useAuthenticator/constants.js +1 -0
- package/dist/esm/Authenticator/hooks/useAuthenticator/utils.js +3 -1
- package/dist/types/Authenticator/hooks/useAuthenticator/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -45,7 +45,9 @@ const flattenFormFields = (fields) => fields.flatMap(([name, options]) => (Objec
|
|
|
45
45
|
/**
|
|
46
46
|
* Retrieves legacy form field values from state machine for routes that have fields
|
|
47
47
|
*/
|
|
48
|
-
const getLegacyFields = (route, state) =>
|
|
48
|
+
const getLegacyFields = (route, state) =>
|
|
49
|
+
// verifyUser is a component route, but does not have form fields
|
|
50
|
+
(0, exports.isComponentRouteKey)(route) && route !== 'verifyUser'
|
|
49
51
|
? flattenFormFields((0, ui_1.getSortedFormFields)(route, state))
|
|
50
52
|
: [];
|
|
51
53
|
exports.getLegacyFields = getLegacyFields;
|
|
@@ -37,6 +37,8 @@ const flattenFormFields = (fields) => fields.flatMap(([name, options]) => (Objec
|
|
|
37
37
|
/**
|
|
38
38
|
* Retrieves legacy form field values from state machine for routes that have fields
|
|
39
39
|
*/
|
|
40
|
-
export const getLegacyFields = (route, state) =>
|
|
40
|
+
export const getLegacyFields = (route, state) =>
|
|
41
|
+
// verifyUser is a component route, but does not have form fields
|
|
42
|
+
isComponentRouteKey(route) && route !== 'verifyUser'
|
|
41
43
|
? flattenFormFields(getSortedFormFields(route, state))
|
|
42
44
|
: [];
|
|
@@ -5,7 +5,7 @@ import { AuthMachineSend, AuthMachineState, AuthenticatorServiceFacade, LegacyFo
|
|
|
5
5
|
*/
|
|
6
6
|
declare type AuthenticatorMachineContext = AuthenticatorServiceFacade;
|
|
7
7
|
declare type AuthenticatorMachineContextKey = keyof AuthenticatorMachineContext;
|
|
8
|
-
export declare type AuthenticatorRouteComponentKey = 'signIn' | 'signUp' | 'forceNewPassword' | 'confirmResetPassword' | 'confirmSignIn' | 'confirmSignUp' | 'confirmVerifyUser' | 'resetPassword' | 'setupTOTP';
|
|
8
|
+
export declare type AuthenticatorRouteComponentKey = 'signIn' | 'signUp' | 'forceNewPassword' | 'confirmResetPassword' | 'confirmSignIn' | 'confirmSignUp' | 'confirmVerifyUser' | 'resetPassword' | 'setupTOTP' | 'verifyUser';
|
|
9
9
|
export declare type AuthenticatorLegacyFields = LegacyFormFieldOptions[];
|
|
10
10
|
/**
|
|
11
11
|
* Inspired from https://xstate.js.org/docs/packages/xstate-react/#useselector-actor-selector-compare-getsnapshot.
|