@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.
@@ -12,4 +12,5 @@ exports.COMPONENT_ROUTE_KEYS = [
12
12
  'confirmVerifyUser',
13
13
  'resetPassword',
14
14
  'setupTOTP',
15
+ 'verifyUser',
15
16
  ];
@@ -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) => (0, exports.isComponentRouteKey)(route)
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;
@@ -9,4 +9,5 @@ export const COMPONENT_ROUTE_KEYS = [
9
9
  'confirmVerifyUser',
10
10
  'resetPassword',
11
11
  'setupTOTP',
12
+ 'verifyUser',
12
13
  ];
@@ -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) => isComponentRouteKey(route)
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/ui-react-core",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "exports": {