@aws-amplify/ui 3.0.9 → 3.0.13
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/README.md +1 -1
- package/dist/esm/index.js +6 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +18 -1
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/dist/styles.css +42 -18
- package/dist/theme.css +13 -13
- package/package.json +5 -4
package/dist/index.d.ts
CHANGED
|
@@ -70,6 +70,7 @@ interface ServicesContext {
|
|
|
70
70
|
interface BaseFormContext {
|
|
71
71
|
authAttributes?: Record<string, any>;
|
|
72
72
|
challengeName?: string;
|
|
73
|
+
requiredAttributes?: Array<string>;
|
|
73
74
|
formValues?: AuthFormData;
|
|
74
75
|
touched?: AuthFormData;
|
|
75
76
|
intent?: string;
|
|
@@ -115,6 +116,12 @@ declare type AuthActorContext = ActorContextWithForms | SignOutContext;
|
|
|
115
116
|
declare type AuthActorState = State<AuthActorContext, AuthEvent>;
|
|
116
117
|
interface CognitoUserAmplify extends CognitoUser {
|
|
117
118
|
username?: string;
|
|
119
|
+
attributes?: CognitoAttributes;
|
|
120
|
+
}
|
|
121
|
+
interface CognitoAttributes {
|
|
122
|
+
email: string;
|
|
123
|
+
phone_number: string;
|
|
124
|
+
[key: string]: string;
|
|
118
125
|
}
|
|
119
126
|
declare type InvokeActorEventTypes = 'done.invoke.signInActor' | 'done.invoke.signUpActor' | 'done.invoke.signOutActor' | 'done.invoke.resetPasswordActor';
|
|
120
127
|
declare type AuthEventTypes = 'CHANGE' | 'BLUR' | 'FEDERATED_SIGN_IN' | 'RESEND' | 'RESET_PASSWORD' | 'SIGN_IN' | 'SIGN_OUT' | 'SIGN_UP' | 'SKIP' | 'SUBMIT' | 'INIT' | InvokeActorEventTypes;
|
|
@@ -143,6 +150,7 @@ interface AuthEvent {
|
|
|
143
150
|
}
|
|
144
151
|
declare type AuthMachineState = State<AuthContext, AuthEvent>;
|
|
145
152
|
declare type AuthInterpreter = Interpreter<AuthContext, any, AuthEvent>;
|
|
153
|
+
declare type AuthMachineSend = AuthInterpreter['send'];
|
|
146
154
|
|
|
147
155
|
declare type NoInfer<T> = [T][T extends any ? 0 : never];
|
|
148
156
|
|
|
@@ -239,6 +247,15 @@ declare const getServiceFacade: ({ send, state }: {
|
|
|
239
247
|
toSignUp: (data?: AuthEventData) => void;
|
|
240
248
|
skipVerification: (data?: AuthEventData) => void;
|
|
241
249
|
};
|
|
250
|
+
/**
|
|
251
|
+
* Listens to external auth Hub events and sends corresponding event to
|
|
252
|
+
* the `authService` of interest
|
|
253
|
+
*
|
|
254
|
+
* @param send - `send` function associated with the `authService` of interest
|
|
255
|
+
*
|
|
256
|
+
* @returns function that unsubscribes to the hub evenmt
|
|
257
|
+
*/
|
|
258
|
+
declare const listenToAuthHub: (send: AuthMachineSend) => () => void;
|
|
242
259
|
|
|
243
260
|
declare type ContactMethod = 'Email' | 'Phone Number';
|
|
244
261
|
declare const censorAllButFirstAndLast: (value: string) => string;
|
|
@@ -830,4 +847,4 @@ declare function createTheme(theme?: Theme, baseTheme?: BaseTheme): WebTheme;
|
|
|
830
847
|
|
|
831
848
|
declare const defaultTheme: WebTheme;
|
|
832
849
|
|
|
833
|
-
export { ActorContextWithForms, AuthActorContext, AuthActorState, AuthChallengeNames, AuthContext, AuthEvent, AuthEventData, AuthEventTypes, AuthFieldsWithDefaults, AuthFormData, AuthInputAttributes, AuthInterpreter, AuthMachineState, AuthenticatorMachineOptions, BaseTheme, BorderWidthValue, CognitoUserAmplify, ColorModeOverride, ColorValue, ContactMethod, DefaultTexts, DesignToken, Dict, FederatedIdentityProviders, FontSizeValue, FontValue, FontWeightValue, InputAttributes, InvokeActorEventTypes, LineHeightValue, LoginMechanism, LoginMechanismArray, MediaQueryOverride, NoInfer, OpacityValue, OutlineOffsetValue, OutlineWidthValue, Override, Phrase, RadiusValue, ResetPasswordContext, ResetPasswordState, SelectorOverride, ServicesContext, ShadowValue, SignInContext, SignInResult, SignInState, SignInTypes, SignOutContext, SignOutState, SignUpAttribute, SignUpContext, SignUpFieldsWithDefaults, SignUpFieldsWithoutDefaults, SignUpState, SocialProvider, SpaceValue, Theme, TimeValue, TransformValue, ValidationError, Validator, ValidatorResult, WebDesignToken, WebTheme, authInputAttributes, censorAllButFirstAndLast, censorPhoneNumber, countryDialCodes, createAuthenticatorMachine, createTheme, defaultTheme, getActorContext, getActorState, getAliasInfoFromContext, getConfiguredAliases, getSendEventAliases, getServiceContextFacade, getServiceFacade, hasTranslation, isDesignToken, signUpFieldsWithDefault, signUpFieldsWithoutDefault, translate, translations };
|
|
850
|
+
export { ActorContextWithForms, AuthActorContext, AuthActorState, AuthChallengeNames, AuthContext, AuthEvent, AuthEventData, AuthEventTypes, AuthFieldsWithDefaults, AuthFormData, AuthInputAttributes, AuthInterpreter, AuthMachineSend, AuthMachineState, AuthenticatorMachineOptions, BaseTheme, BorderWidthValue, CognitoAttributes, CognitoUserAmplify, ColorModeOverride, ColorValue, ContactMethod, DefaultTexts, DesignToken, Dict, FederatedIdentityProviders, FontSizeValue, FontValue, FontWeightValue, InputAttributes, InvokeActorEventTypes, LineHeightValue, LoginMechanism, LoginMechanismArray, MediaQueryOverride, NoInfer, OpacityValue, OutlineOffsetValue, OutlineWidthValue, Override, Phrase, RadiusValue, ResetPasswordContext, ResetPasswordState, SelectorOverride, ServicesContext, ShadowValue, SignInContext, SignInResult, SignInState, SignInTypes, SignOutContext, SignOutState, SignUpAttribute, SignUpContext, SignUpFieldsWithDefaults, SignUpFieldsWithoutDefaults, SignUpState, SocialProvider, SpaceValue, Theme, TimeValue, TransformValue, ValidationError, Validator, ValidatorResult, WebDesignToken, WebTheme, authInputAttributes, censorAllButFirstAndLast, censorPhoneNumber, countryDialCodes, createAuthenticatorMachine, createTheme, defaultTheme, getActorContext, getActorState, getAliasInfoFromContext, getConfiguredAliases, getSendEventAliases, getServiceContextFacade, getServiceFacade, hasTranslation, isDesignToken, listenToAuthHub, signUpFieldsWithDefault, signUpFieldsWithoutDefault, translate, translations };
|