@aws-amplify/ui 5.2.0 → 5.3.1
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/esm/helpers/accountSettings/utils.js +1 -0
- package/dist/esm/helpers/accountSettings/validator.js +1 -0
- package/dist/esm/helpers/utils.js +1 -0
- package/dist/esm/i18n/dictionaries/authenticator/fr.js +1 -1
- package/dist/esm/i18n/dictionaries/authenticator/he.js +1 -0
- package/dist/esm/i18n/dictionaries/index.js +1 -1
- package/dist/esm/i18n/translations.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/machines/authenticator/defaultServices.js +1 -1
- package/dist/esm/theme/tokens/components/button.js +1 -1
- package/dist/index.js +1 -1
- package/dist/styles.css +125 -0
- package/dist/theme.css +41 -0
- package/dist/types/helpers/accountSettings/index.d.ts +2 -0
- package/dist/types/helpers/accountSettings/utils.d.ts +9 -0
- package/dist/types/helpers/accountSettings/validator.d.ts +21 -0
- package/dist/types/helpers/authenticator/textUtil.d.ts +1 -1
- package/dist/types/helpers/index.d.ts +2 -0
- package/dist/types/helpers/utils.d.ts +4 -0
- package/dist/types/i18n/dictionaries/authenticator/he.d.ts +2 -0
- package/dist/types/i18n/dictionaries/authenticator/index.d.ts +1 -0
- package/dist/types/i18n/dictionaries/index.d.ts +52 -0
- package/dist/types/theme/tokens/components/button.d.ts +4 -2
- package/dist/types/theme/tokens/components/collection.d.ts +8 -8
- package/dist/types/theme/tokens/components/fileUploader.d.ts +13 -13
- package/dist/types/theme/tokens/components/heading.d.ts +1 -1
- package/dist/types/theme/tokens/components/link.d.ts +1 -1
- package/dist/types/theme/tokens/components/rating.d.ts +3 -3
- package/dist/types/theme/tokens/components/select.d.ts +5 -5
- package/dist/types/theme/tokens/components/stepperField.d.ts +1 -1
- package/dist/types/theme/tokens/components/switchField.d.ts +6 -6
- package/dist/types/theme/tokens/components/table.d.ts +2 -2
- package/dist/types/theme/tokens/components/text.d.ts +1 -1
- package/dist/types/theme/tokens/components/textAreaField.d.ts +1 -1
- package/dist/types/theme/tokens/components/textField.d.ts +1 -1
- package/dist/types/types/accountSettings/index.d.ts +1 -0
- package/dist/types/types/accountSettings/validator.d.ts +14 -0
- package/dist/types/types/index.d.ts +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as e,__generator as r}from"tslib";import{Auth as s}from"aws-amplify";import{getLogger as t}from"../utils.js";var u=t("Auth"),n=function(t){var n=t.user,o=t.currentPassword,a=t.newPassword;return e(void 0,void 0,void 0,(function(){var e;return r(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),u.debug("calling Auth.changePassword"),[4,s.changePassword(n,o,a)];case 1:return r.sent(),u.debug("Auth.changePassword was successful"),[2,Promise.resolve()];case 2:return e=r.sent(),u.debug("Auth.changePassword failed with error",e),[2,Promise.reject(e)];case 3:return[2]}}))}))},o=function(){return e(void 0,void 0,void 0,(function(){var e;return r(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),u.debug("calling Auth.deleteUser"),[4,s.deleteUser()];case 1:return r.sent(),u.debug("Auth.deleteUser was successful"),[2,Promise.resolve()];case 2:return e=r.sent(),u.debug("Auth.deleteUser failed with error",e),[2,Promise.reject(e)];case 3:return[2]}}))}))};export{n as changePassword,o as deleteUser};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__spreadArray as e}from"tslib";import{Amplify as t}from"aws-amplify";import"lodash/includes";import"../../types/authenticator/user.js";import"../../types/authenticator/attributes.js";import"../../types/primitives/componentClassName.js";import"../../i18n/translations.js";import{hasSpecialChars as r}from"../authenticator/utils.js";import"lodash/cloneDeep";var a=function(){var e=t.configure(),r=null==e?void 0:e.aws_cognito_password_protection_settings;if(!r)return null;var a=r.passwordPolicyCharacters,n=void 0===a?[]:a;return{minLength:r.passwordPolicyMinLength,needsLowerCase:n.includes("REQUIRES_LOWERCASE"),needsUpperCase:n.includes("REQUIRES_UPPERCASE"),needsNumber:n.includes("REQUIRES_NUMBERS"),needsSpecialChar:n.includes("REQUIRES_SYMBOLS")}},n=function(e){return{validationMode:"onTouched",validator:function(t){return t.length>=e},message:"Password must have at least ".concat(e," characters")}},s={validationMode:"onTouched",validator:function(e){return/[a-z]/.test(e)},message:"Password must have lower case letters"},o={validationMode:"onTouched",validator:function(e){return/[A-Z]/.test(e)},message:"Password must have upper case letters"},i={validationMode:"onTouched",validator:function(e){return/[0-9]/.test(e)},message:"Password must have numbers"},u={validationMode:"onTouched",validator:function(e){return r(e)},message:"Password must have special characters"},d=function(e){return{validationMode:"onTouched",validator:function(t){return e===t},message:"Your passwords must match"}},c=function(){var e=a();if(!e)return[];var t=[],r=e.minLength,d=e.needsLowerCase,c=e.needsUpperCase,l=e.needsNumber,p=e.needsSpecialChar;return r&&t.push(n(r)),d&&t.push(s),c&&t.push(o),l&&t.push(i),p&&t.push(u),t},l=function(e){return[d(e)]},p=function(e){var t=e.validationMode,r=e.eventType,a=e.hasBlurred;switch(t){case"onBlur":return"blur"===r;case"onChange":return"change"===r;case"onTouched":return"blur"===r||a}},h=function(t){var r=t.value,a=t.validators,n=t.eventType,s=t.hasBlurred;return r?a.reduce((function(t,a){var o=a.validator,i=a.validationMode,u=a.message;if(p({validationMode:i,eventType:n,hasBlurred:s}))return!o(r)?e(e([],t,!0),[u],!1):t}),[]):[]};export{l as getDefaultConfirmPasswordValidators,c as getDefaultPasswordValidators,n as getHasMinLength,d as getMatchesConfirmPassword,a as getPasswordRequirement,s as hasLowerCase,i as hasNumber,u as hasSpecialChar,o as hasUpperCase,h as runFieldValidators,p as shouldValidate};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Logger as r}from"aws-amplify";var n=function(n){return new r("AmplifyUI:".concat(n))};export{n as getLogger};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={"Account recovery requires verified contact information":"La récupération du compte nécessite des informations de contact vérifiées","Back to Sign In":"Retour à la connexion","Change Password":"Modifier le mot de passe",Changing:"Modification en cours",Code:"Code","Confirm Password":"Confirmez le mot de passe","Confirm Sign Up":"Confirmer l'inscription","Confirm SMS Code":"Confirmer le code SMS","Confirm TOTP Code":"Confirmer le code TOTP",Confirm:"Confirmer","Confirmation Code":"Code de confirmation",Confirming:"Confirmation","Create a new account":"Créer un nouveau compte","Create Account":"Créer un compte","Creating Account":"Création d'un compte","Dismiss alert":"Supprimer l'alerte",Email:"Email","Enter your code":"Saisissez cotre code de confirmation","Enter your email":"Saisissez votre adresse email","Enter your phone number":"Saisissez votre numéro de téléphone","Enter your username":"Saisissez votre nom d'utilisateur","Forgot your password?":"Mot de passe oublié ? ","Hide password":"Masquer le mot de passe",Loading:"Chargement en cours","New password":"Nouveau mot de passe",Password:"Mot de passe","Phone Number":"Numéro de téléphone","Resend Code":"Renvoyer le code","Reset your Password":"Réinitialiser votre mot de passe","Reset your password":"Réinitialisez votre mot de passe","Send code":"Envoyer le code","Send Code":"M'envoyer un code",Sending:"Envoi en cours","Setup TOTP":"Configuration de TOTP","Show password":"Afficher le mot de passe","Sign in to your account":"Connexion à votre compte","Sign In with Amazon":"Se connecter avec Amazon","Sign In with Apple":"Se connecter avec Apple","Sign In with Facebook":"Se connecter avec Facebook","Sign In with Google":"Se connecter avec Google","Sign in":"Se connecter","Sign In":"Se connecter","Signing in":"Connexion en cours",Skip:"Passer",Submit:"Soumettre",Submitting:"Envoi en cours",Username:"Nom d'utilisateur","Verify Contact":"Vérifier le contact",Verify:"Vérifier","An account with the given email already exists.":"Un utilisateur avec cette adresse email existe déjà.",Change:"Modifier","Confirm a Code":"Confirmer un code","Confirm Sign In":"Confirmer la connexion","Create account":"Créer un compte","Enter your password":"Saisissez votre mot de passe","Forgot Password":"Mot de passe oublié","Have an account? ":"Déjà un compte ? ",Hello:"Bonjour","Incorrect username or password":"Identifiant ou mot de passe incorrect","Invalid password format":"Format de mot de passe invalide","Invalid phone number format":"Format de numéro de téléphone invalide. Veuillez utiliser un format +12345678900","Loading...":"Chargement...","Lost your code? ":"Vous avez perdu votre code ? ","Network error":"Erreur réseau","New Password":"Nouveau mot de passe","No account? ":"Pas de compte ? ",or:"ou","Resend a Code":"Renvoyer un code","Reset password":"Réinitialisez votre mot de passe",Send:"Envoyer","Sign In with AWS":"Se connecter avec AWS","Sign Out":"Déconnexion","Sign Up":"S'inscrire",SMS:"SMS","User already exists":"L'utilisateur existe déjà","User does not exist":"L'utilisateur n'existe pas","Username cannot be empty":"Le nom d'utilisateur doit être renseigné","Username/client id combination not found.":"L'utilisateur n'existe pas"};export{e as frDict};
|
|
1
|
+
var e={"Account recovery requires verified contact information":"La récupération du compte nécessite des informations de contact vérifiées","Back to Sign In":"Retour à la connexion","Change Password":"Modifier le mot de passe",Changing:"Modification en cours",Code:"Code","Confirm Password":"Confirmez le mot de passe","Confirm Sign Up":"Confirmer l'inscription","Confirm SMS Code":"Confirmer le code SMS","Confirm TOTP Code":"Confirmer le code TOTP",Confirm:"Confirmer","Confirmation Code":"Code de confirmation",Confirming:"Confirmation","Create a new account":"Créer un nouveau compte","Create Account":"Créer un compte","Creating Account":"Création d'un compte","Dismiss alert":"Supprimer l'alerte",Email:"Email","Enter your code":"Saisissez cotre code de confirmation","Enter your email":"Saisissez votre adresse email","Enter your phone number":"Saisissez votre numéro de téléphone","Enter your username":"Saisissez votre nom d'utilisateur","Forgot your password?":"Mot de passe oublié ? ","Hide password":"Masquer le mot de passe",Loading:"Chargement en cours","New password":"Nouveau mot de passe",Password:"Mot de passe","Phone Number":"Numéro de téléphone","Resend Code":"Renvoyer le code","Reset your Password":"Réinitialiser votre mot de passe","Reset your password":"Réinitialisez votre mot de passe","Send code":"Envoyer le code","Send Code":"M'envoyer un code",Sending:"Envoi en cours","Setup TOTP":"Configuration de TOTP","Show password":"Afficher le mot de passe","Sign in to your account":"Connexion à votre compte","Sign In with Amazon":"Se connecter avec Amazon","Sign In with Apple":"Se connecter avec Apple","Sign In with Facebook":"Se connecter avec Facebook","Sign In with Google":"Se connecter avec Google","Sign in":"Se connecter","Sign In":"Se connecter","Signing in":"Connexion en cours",Skip:"Passer",Submit:"Soumettre",Submitting:"Envoi en cours",Username:"Nom d'utilisateur","Verify Contact":"Vérifier le contact",Verify:"Vérifier","An account with the given email already exists.":"Un utilisateur avec cette adresse email existe déjà.",Change:"Modifier","Confirm a Code":"Confirmer un code","Confirm Sign In":"Confirmer la connexion","Create account":"Créer un compte","Enter your password":"Saisissez votre mot de passe","Forgot Password":"Mot de passe oublié","Have an account? ":"Déjà un compte ? ",Hello:"Bonjour","Incorrect username or password":"Identifiant ou mot de passe incorrect","Invalid password format":"Format de mot de passe invalide","Invalid phone number format":"Format de numéro de téléphone invalide. Veuillez utiliser un format +12345678900","Loading...":"Chargement...","Lost your code? ":"Vous avez perdu votre code ? ","Network error":"Erreur réseau","New Password":"Nouveau mot de passe","No account? ":"Pas de compte ? ",or:"ou","Resend a Code":"Renvoyer un code","Reset password":"Réinitialisez votre mot de passe",Send:"Envoyer","Sign In with AWS":"Se connecter avec AWS","Sign Out":"Déconnexion","Sign Up":"S'inscrire",SMS:"SMS","User already exists":"L'utilisateur existe déjà","User does not exist":"L'utilisateur n'existe pas","Username cannot be empty":"Le nom d'utilisateur doit être renseigné","Username/client id combination not found.":"L'utilisateur n'existe pas","We Emailed You":"Nous vous avons envoyé un code","Your code is on the way. To log in, enter the code we emailed to":"Votre code est en route. Pour vous connecter entrez le code reçu sur cette adresse email","Your code is on the way. To log in, enter the code we texted to":"Votre code est en route. Pour vous connecter entrez le code reçu sur ce numéro de téléphone","It may take a minute to arrive.":"Cela peut prendre quelques minutes."};export{e as frDict};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n={"Account recovery requires verified contact information":"שחזור לקוח דורש עוד מידע","Back to Sign In":"חזור להרשמה","Change Password":"עדכון סיסמא",Changing:"מעדכן",Code:"קוד","Confirm Password":"אשר סיסמא","Confirm Sign Up":"אשר הרשמה","Confirm SMS Code":"אשר sms קוד","Confirm TOTP Code":"אשר totp קוד",Confirm:"אישור","Confirmation Code":"אישור קוד",Confirming:"מאשר","Create a new account":"צור משתמש חדש","Create Account":"צור משתמש","Creating Account":"יצירת משתמש","Dismiss alert":"הסר התראה",Email:"אימייל","Enter your code":"הכנס את הקוד","Enter your email":"הכנס את המייל שלך","Enter your phone number":"הכנס את מספר הטלפון שלך","Enter your username":"הכנס את שם המתמש שלך","Forgot your password?":"שחכת סיסמא ?","Hide password":"הסתר סיסמא",Loading:"טוען","New password":"סיסמא חדשה",Password:"סיסמא","Phone Number":"מספר טלפון","Resend Code":"שלח קוד שוב","Reset your password":"אפס סיסמא","Reset your Password":"אפס סיסמא","Send code":"שלח קוד","Send Code":"שלח קוד",Sending:"שולח","Setup TOTP":"Setup TOTP","Show password":"הצג סיסמא","Sign in to your account":"התחבר לחשבון שלך","Sign In with Amazon":"Sign In with Amazon","Sign In with Apple":"Sign In with Apple","Sign In with Facebook":"Sign In with Facebook","Sign In with Google":"Sign In with Google","Sign in":"התחבר","Sign In":"התחבר","Signing in":"מתחבר",Skip:"דלג",Submit:"שלח",Submitting:"שולח",Username:"שם משתמש","Verify Contact":"אמת איש קשר",Verify:"אמת"};export{n as heDict};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{deDict as r}from"./authenticator/de.js";import{enDict as a}from"./authenticator/en.js";import{esDict as i}from"./authenticator/es.js";import{frDict as o}from"./authenticator/fr.js";import{itDict as s}from"./authenticator/it.js";import{jaDict as m}from"./authenticator/ja.js";import{krDict as c}from"./authenticator/kr.js";import{nlDict as e}from"./authenticator/nl.js";import{plDict as p}from"./authenticator/pl.js";import{ptDict as f}from"./authenticator/pt.js";import{zhDict as
|
|
1
|
+
import{__assign as t}from"tslib";import{deDict as r}from"./authenticator/de.js";import{enDict as a}from"./authenticator/en.js";import{esDict as i}from"./authenticator/es.js";import{frDict as o}from"./authenticator/fr.js";import{itDict as s}from"./authenticator/it.js";import{jaDict as m}from"./authenticator/ja.js";import{krDict as c}from"./authenticator/kr.js";import{nlDict as e}from"./authenticator/nl.js";import{plDict as p}from"./authenticator/pl.js";import{ptDict as f}from"./authenticator/pt.js";import{zhDict as h}from"./authenticator/zh.js";import{svDict as n}from"./authenticator/sv.js";import{idDict as u}from"./authenticator/id.js";import{trDict as j}from"./authenticator/tr.js";import{ruDict as D}from"./authenticator/ru.js";import{heDict as l}from"./authenticator/he.js";import{defaultTexts as d}from"./authenticator/defaultTexts.js";var v=t({},r),x=t({},a),k=t({},i),z=t({},o),T=t({},s),b=t({},m),g=t({},c),q=t({},e),w=t({},p),y=t({},f),A=t({},h),B=t({},n),C=t({},u),E=t({},j),F=t({},D),G=t({},l),H=t({},d);export{v as deDict,H as defaultTexts,x as enDict,k as esDict,z as frDict,G as heDict,C as idDict,T as itDict,b as jaDict,g as krDict,q as nlDict,w as plDict,y as ptDict,F as ruDict,B as svDict,E as trDict,A as zhDict};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as r}from"tslib";import{I18n as t}from"aws-amplify";import{defaultTexts as i,deDict as e,enDict as n,esDict as o,frDict as f,idDict as m,itDict as p,jaDict as a,krDict as s,nlDict as u,plDict as d,ptDict as l,zhDict as c,svDict as v,trDict as g,ruDict as j}from"./dictionaries/index.js";var x=r({},i);function b(r){return t.get(r)}function
|
|
1
|
+
import{__assign as r}from"tslib";import{I18n as t}from"aws-amplify";import{defaultTexts as i,deDict as e,enDict as n,esDict as o,frDict as f,idDict as m,itDict as p,jaDict as a,krDict as s,nlDict as u,plDict as d,ptDict as l,zhDict as c,svDict as v,trDict as g,ruDict as h,heDict as j}from"./dictionaries/index.js";var x=r({},i);function b(r){return t.get(r)}function k(r){return t.get(r)!==r}var w={de:e,en:n,es:o,fr:f,id:m,it:p,ja:a,kr:s,nl:u,pl:d,pt:l,zh:c,sv:v,tr:g,ru:h,he:j};export{x as DefaultTexts,k as hasTranslation,b as translate,w as translations};
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{getActorContext,getActorState}from"./helpers/authenticator/actor.js";export{getConfiguredAliases,getPrimaryAlias}from"./helpers/authenticator/context.js";export{getSendEventAliases,getServiceContextFacade,getServiceFacade}from"./helpers/authenticator/facade.js";export{ALLOWED_SPECIAL_CHARACTERS,defaultFormFieldOptions}from"./helpers/authenticator/constants.js";export{getErrors,getFormDataFromEvent,isAuthFieldWithDefaults,setFormOrder}from"./helpers/authenticator/form.js";export{censorAllButFirstAndLast,censorPhoneNumber,defaultAuthHubHandler,getTotpCodeURL,hasSpecialChars,listenToAuthHub}from"./helpers/authenticator/utils.js";export{getDefaultFormFields,getFormFields,getSortedFormFields}from"./helpers/authenticator/formFields/formFields.js";export{defaultFormFieldsGetters}from"./helpers/authenticator/formFields/defaults.js";export{applyDefaults,applyTranslation,sortFormFields}from"./helpers/authenticator/formFields/util.js";export{authenticatorTextUtil}from"./helpers/authenticator/textUtil.js";export{checkMaxSize,humanFileSize,isValidExtension,returnAcceptedFiles,uploadFile}from"./helpers/storage/fileUploader/utils/uploader.js";export{countryDialCodes}from"./i18n/country-dial-codes.js";export{DefaultTexts,hasTranslation,translate,translations}from"./i18n/translations.js";export{createAuthenticatorMachine}from"./machines/authenticator/index.js";export{createTheme}from"./theme/createTheme.js";export{defaultTheme}from"./theme/defaultTheme.js";export{defaultDarkModeOverride,reactNativeDarkTokens}from"./theme/defaultDarkModeOverride.js";export{reactNativeTokens}from"./theme/tokens/index.js";export{cssNameTransform,isDesignToken,setupTokens}from"./theme/utils.js";export{FederatedIdentityProviders,UnverifiedContactMethodType}from"./types/authenticator/user.js";export{isUnverifiedContactMethodType}from"./types/authenticator/utils.js";export{LoginMechanismArray,authFieldsWithDefaults,signUpFieldsWithDefault,signUpFieldsWithoutDefault}from"./types/authenticator/attributes.js";export{ComponentClassName}from"./types/primitives/componentClassName.js";
|
|
1
|
+
export{getActorContext,getActorState}from"./helpers/authenticator/actor.js";export{getConfiguredAliases,getPrimaryAlias}from"./helpers/authenticator/context.js";export{getSendEventAliases,getServiceContextFacade,getServiceFacade}from"./helpers/authenticator/facade.js";export{ALLOWED_SPECIAL_CHARACTERS,defaultFormFieldOptions}from"./helpers/authenticator/constants.js";export{getErrors,getFormDataFromEvent,isAuthFieldWithDefaults,setFormOrder}from"./helpers/authenticator/form.js";export{censorAllButFirstAndLast,censorPhoneNumber,defaultAuthHubHandler,getTotpCodeURL,hasSpecialChars,listenToAuthHub}from"./helpers/authenticator/utils.js";export{getDefaultFormFields,getFormFields,getSortedFormFields}from"./helpers/authenticator/formFields/formFields.js";export{defaultFormFieldsGetters}from"./helpers/authenticator/formFields/defaults.js";export{applyDefaults,applyTranslation,sortFormFields}from"./helpers/authenticator/formFields/util.js";export{authenticatorTextUtil}from"./helpers/authenticator/textUtil.js";export{changePassword,deleteUser}from"./helpers/accountSettings/utils.js";export{getDefaultConfirmPasswordValidators,getDefaultPasswordValidators,runFieldValidators}from"./helpers/accountSettings/validator.js";export{checkMaxSize,humanFileSize,isValidExtension,returnAcceptedFiles,uploadFile}from"./helpers/storage/fileUploader/utils/uploader.js";export{getLogger}from"./helpers/utils.js";export{countryDialCodes}from"./i18n/country-dial-codes.js";export{DefaultTexts,hasTranslation,translate,translations}from"./i18n/translations.js";export{createAuthenticatorMachine}from"./machines/authenticator/index.js";export{createTheme}from"./theme/createTheme.js";export{defaultTheme}from"./theme/defaultTheme.js";export{defaultDarkModeOverride,reactNativeDarkTokens}from"./theme/defaultDarkModeOverride.js";export{reactNativeTokens}from"./theme/tokens/index.js";export{cssNameTransform,isDesignToken,setupTokens}from"./theme/utils.js";export{FederatedIdentityProviders,UnverifiedContactMethodType}from"./types/authenticator/user.js";export{isUnverifiedContactMethodType}from"./types/authenticator/utils.js";export{LoginMechanismArray,authFieldsWithDefaults,signUpFieldsWithDefault,signUpFieldsWithoutDefault}from"./types/authenticator/attributes.js";export{ComponentClassName}from"./types/primitives/componentClassName.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as n,__assign as r}from"tslib";import{Amplify as i,Auth as o}from"aws-amplify";import"lodash/includes";import"../../types/authenticator/user.js";import"../../types/authenticator/attributes.js";import"../../types/primitives/componentClassName.js";import"../../i18n/translations.js";import{hasSpecialChars as s}from"../../helpers/authenticator/utils.js";import"lodash/cloneDeep";var e={getAmplifyConfig:function(){return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2,i.configure()]}))}))},getCurrentUser:function(){return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2,o.currentAuthenticatedUser()]}))}))},handleSignUp:function(i){return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2,o.signUp(r(r({},i),{autoSignIn:{enabled:!0}}))]}))}))},handleSignIn:function(r){var i=r.username,s=r.password;return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2,o.signIn(i,s)]}))}))},handleConfirmSignIn:function(r){var i=r.user,s=r.code,e=r.mfaType;return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2,o.confirmSignIn(i,s,e)]}))}))},handleConfirmSignUp:function(r){var i=r.username,s=r.code;return t(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,o.confirmSignUp(i,s)];case 1:return[2,t.sent()]}}))}))},handleForgotPasswordSubmit:function(r){var i=r.username,s=r.code,e=r.password;return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2,o.forgotPasswordSubmit(i,s,e)]}))}))},handleForgotPassword:function(r){return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2,o.forgotPassword(r)]}))}))},validateCustomSignUp:function(r,i){return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2]}))}))},validateFormPassword:function(r,i,o){return t(this,void 0,void 0,(function(){var t,e,u,a;return n(this,(function(n){return t=r.password,i.password&&o?(e=[],u=+(null==o?void 0:o.passwordPolicyMinLength),t.length<u&&e.push("Password must have at least ".concat(u," characters")),null==(a=null==o?void 0:o.passwordPolicyCharacters)||a.forEach((function(n){switch(n){case"REQUIRES_LOWERCASE":/[a-z]/.test(t)||e.push("Password must have lower case letters");break;case"REQUIRES_UPPERCASE":/[A-Z]/.test(t)||e.push("Password must have upper case letters");break;case"REQUIRES_NUMBERS":/[0-9]/.test(t)||e.push("Password must have numbers");break;case"REQUIRES_SYMBOLS":s(t)||e.push("Password must have special characters")}})),[2,0!==e.length?{password:e}:null]):[2,null]}))}))},validateConfirmPassword:function(r,i){return t(this,void 0,void 0,(function(){var t,o,s,e;return n(this,(function(n){return t=r.password,o=r.confirm_password,s=i.confirm_password,e=i.password,t||o?(t||o)&&t!==o&&(s&&e||(null==t?void 0:t.length)>=6&&(null==o?void 0:o.length)>=6)?[2,{confirm_password:"Your passwords must match"}]:[2]:[2,null]}))}))},validatePreferredUsername:function(r,i){return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2]}))}))}};export{e as defaultServices};
|
|
1
|
+
import{__awaiter as t,__generator as n,__assign as r}from"tslib";import{Amplify as i,Auth as o}from"aws-amplify";import"lodash/includes";import"../../types/authenticator/user.js";import"../../types/authenticator/attributes.js";import"../../types/primitives/componentClassName.js";import"../../i18n/translations.js";import{hasSpecialChars as s}from"../../helpers/authenticator/utils.js";import"lodash/cloneDeep";import"../../helpers/accountSettings/utils.js";var e={getAmplifyConfig:function(){return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2,i.configure()]}))}))},getCurrentUser:function(){return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2,o.currentAuthenticatedUser()]}))}))},handleSignUp:function(i){return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2,o.signUp(r(r({},i),{autoSignIn:{enabled:!0}}))]}))}))},handleSignIn:function(r){var i=r.username,s=r.password;return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2,o.signIn(i,s)]}))}))},handleConfirmSignIn:function(r){var i=r.user,s=r.code,e=r.mfaType;return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2,o.confirmSignIn(i,s,e)]}))}))},handleConfirmSignUp:function(r){var i=r.username,s=r.code;return t(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,o.confirmSignUp(i,s)];case 1:return[2,t.sent()]}}))}))},handleForgotPasswordSubmit:function(r){var i=r.username,s=r.code,e=r.password;return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2,o.forgotPasswordSubmit(i,s,e)]}))}))},handleForgotPassword:function(r){return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2,o.forgotPassword(r)]}))}))},validateCustomSignUp:function(r,i){return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2]}))}))},validateFormPassword:function(r,i,o){return t(this,void 0,void 0,(function(){var t,e,u,a;return n(this,(function(n){return t=r.password,i.password&&o?(e=[],u=+(null==o?void 0:o.passwordPolicyMinLength),t.length<u&&e.push("Password must have at least ".concat(u," characters")),null==(a=null==o?void 0:o.passwordPolicyCharacters)||a.forEach((function(n){switch(n){case"REQUIRES_LOWERCASE":/[a-z]/.test(t)||e.push("Password must have lower case letters");break;case"REQUIRES_UPPERCASE":/[A-Z]/.test(t)||e.push("Password must have upper case letters");break;case"REQUIRES_NUMBERS":/[0-9]/.test(t)||e.push("Password must have numbers");break;case"REQUIRES_SYMBOLS":s(t)||e.push("Password must have special characters")}})),[2,0!==e.length?{password:e}:null]):[2,null]}))}))},validateConfirmPassword:function(r,i){return t(this,void 0,void 0,(function(){var t,o,s,e;return n(this,(function(n){return t=r.password,o=r.confirm_password,s=i.confirm_password,e=i.password,t||o?(t||o)&&t!==o&&(s&&e||(null==t?void 0:t.length)>=6&&(null==o?void 0:o.length)>=6)?[2,{confirm_password:"Your passwords must match"}]:[2]:[2,null]}))}))},validatePreferredUsername:function(r,i){return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2]}))}))}};export{e as defaultServices};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var o={fontWeight:{value:"{fontWeights.bold.value}"},transitionDuration:{value:"{components.fieldcontrol.transitionDuration.value}"},fontSize:{value:"{components.fieldcontrol.fontSize.value}"},lineHeight:{value:"{components.fieldcontrol.lineHeight.value}"},paddingBlockStart:{value:"{components.fieldcontrol.paddingBlockStart.value}"},paddingBlockEnd:{value:"{components.fieldcontrol.paddingBlockEnd.value}"},paddingInlineStart:{value:"{components.fieldcontrol.paddingInlineStart.value}"},paddingInlineEnd:{value:"{components.fieldcontrol.paddingInlineEnd.value}"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},borderWidth:{value:"{components.fieldcontrol.borderWidth.value}"},borderStyle:{value:"{components.fieldcontrol.borderStyle.value}"},borderRadius:{value:"{components.fieldcontrol.borderRadius.value}"},color:{value:"{colors.font.primary.value}"},_hover:{color:{value:"{colors.font.focus.value}"},backgroundColor:{value:"{colors.brand.primary.10.value}"},borderColor:{value:"{colors.brand.primary.60.value}"}},_focus:{color:{value:"{colors.font.focus.value}"},backgroundColor:{value:"{colors.brand.primary.10.value}"},borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_active:{color:{value:"{colors.font.active.value}"},backgroundColor:{value:"{colors.brand.primary.20.value}"},borderColor:{value:"{colors.brand.primary.100.value}"}},_loading:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.tertiary.value}"}},_disabled:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.tertiary.value}"}},primary:{borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},backgroundColor:{value:"{colors.brand.primary.80.value}"},color:{value:"{colors.font.inverse.value}"},_disabled:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_loading:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.brand.primary.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.brand.primary.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.brand.primary.100.value}"},color:{value:"{colors.font.inverse.value}"}}},menu:{borderWidth:{value:"{space.zero.value}"},backgroundColor:{value:"transparent"},justifyContent:{value:"start"},_hover:{color:{value:"{colors.font.inverse.value}"},backgroundColor:{value:"{colors.brand.primary.80.value}"}},_focus:{color:{value:"{colors.font.inverse.value}"},backgroundColor:{value:"{colors.brand.primary.80.value}"}},_active:{color:{value:"{colors.font.inverse.value}"},backgroundColor:{value:"{colors.brand.primary.90.value}"}},_disabled:{color:{value:"{colors.font.disabled.value}"}}},link:{backgroundColor:{value:"transparent"},borderColor:{value:"transparent"},borderWidth:{value:"{space.zero.value}"},color:{value:"{colors.font.interactive.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.brand.primary.10.value}"},color:{value:"{colors.font.hover.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.brand.primary.10.value}"},color:{value:"{colors.font.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.brand.primary.20.value}"},color:{value:"{colors.font.active.value}"}},_disabled:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled.value}"}},_loading:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled.value}"}}},small:{fontSize:{value:"{components.fieldcontrol.small.fontSize.value}"},paddingBlockStart:{value:"{components.fieldcontrol.small.paddingBlockStart.value}"},paddingBlockEnd:{value:"{components.fieldcontrol.small.paddingBlockEnd.value}"},paddingInlineStart:{value:"{components.fieldcontrol.small.paddingInlineStart.value}"},paddingInlineEnd:{value:"{components.fieldcontrol.small.paddingInlineEnd.value}"}},large:{fontSize:{value:"{components.fieldcontrol.large.fontSize.value}"},paddingBlockStart:{value:"{components.fieldcontrol.large.paddingBlockStart.value}"},paddingBlockEnd:{value:"{components.fieldcontrol.large.paddingBlockEnd.value}"},paddingInlineStart:{value:"{components.fieldcontrol.large.paddingInlineStart.value}"},paddingInlineEnd:{value:"{components.fieldcontrol.large.paddingInlineEnd.value}"}},loaderWrapper:{alignItems:{value:"center"},gap:{value:"{space.xs.value}"}}};export{o as button};
|
|
1
|
+
var o={fontWeight:{value:"{fontWeights.bold.value}"},transitionDuration:{value:"{components.fieldcontrol.transitionDuration.value}"},fontSize:{value:"{components.fieldcontrol.fontSize.value}"},lineHeight:{value:"{components.fieldcontrol.lineHeight.value}"},paddingBlockStart:{value:"{components.fieldcontrol.paddingBlockStart.value}"},paddingBlockEnd:{value:"{components.fieldcontrol.paddingBlockEnd.value}"},paddingInlineStart:{value:"{components.fieldcontrol.paddingInlineStart.value}"},paddingInlineEnd:{value:"{components.fieldcontrol.paddingInlineEnd.value}"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},borderWidth:{value:"{components.fieldcontrol.borderWidth.value}"},borderStyle:{value:"{components.fieldcontrol.borderStyle.value}"},borderRadius:{value:"{components.fieldcontrol.borderRadius.value}"},color:{value:"{colors.font.primary.value}"},_hover:{color:{value:"{colors.font.focus.value}"},backgroundColor:{value:"{colors.brand.primary.10.value}"},borderColor:{value:"{colors.brand.primary.60.value}"}},_focus:{color:{value:"{colors.font.focus.value}"},backgroundColor:{value:"{colors.brand.primary.10.value}"},borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_active:{color:{value:"{colors.font.active.value}"},backgroundColor:{value:"{colors.brand.primary.20.value}"},borderColor:{value:"{colors.brand.primary.100.value}"}},_loading:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.tertiary.value}"}},_disabled:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.tertiary.value}"}},primary:{borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},backgroundColor:{value:"{colors.brand.primary.80.value}"},color:{value:"{colors.font.inverse.value}"},_disabled:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_loading:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.brand.primary.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.brand.primary.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.brand.primary.100.value}"},color:{value:"{colors.font.inverse.value}"}}},menu:{borderWidth:{value:"{space.zero.value}"},backgroundColor:{value:"transparent"},justifyContent:{value:"start"},_hover:{color:{value:"{colors.font.inverse.value}"},backgroundColor:{value:"{colors.brand.primary.80.value}"}},_focus:{color:{value:"{colors.font.inverse.value}"},backgroundColor:{value:"{colors.brand.primary.80.value}"}},_active:{color:{value:"{colors.font.inverse.value}"},backgroundColor:{value:"{colors.brand.primary.90.value}"}},_disabled:{color:{value:"{colors.font.disabled.value}"}}},link:{backgroundColor:{value:"transparent"},borderColor:{value:"transparent"},borderWidth:{value:"{space.zero.value}"},color:{value:"{colors.font.interactive.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.brand.primary.10.value}"},color:{value:"{colors.font.hover.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.brand.primary.10.value}"},color:{value:"{colors.font.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.brand.primary.20.value}"},color:{value:"{colors.font.active.value}"}},_disabled:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled.value}"}},_loading:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled.value}"}}},warning:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.red.60}"},borderWidth:{value:"{borderWidths.small}"},color:{value:"{colors.red.60}"},_hover:{borderColor:{value:"{colors.red.80}"},backgroundColor:{value:"{colors.red.10}"},color:{value:"{colors.font.error}"}},_focus:{borderColor:{value:"{colors.red.80}"},backgroundColor:{value:"{colors.red.10}"},color:{value:"{colors.red.80}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow}"}},_active:{borderColor:{value:"{colors.red.100}"},backgroundColor:{value:"{colors.red.20}"},color:{value:"{colors.red.100}"}},_disabled:{borderColor:{value:"{colors.border.tertiary}"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled}"}},_loading:{borderColor:{value:"{colors.border.tertiary}"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled}"}}},destructive:{borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small}"},borderStyle:{value:"solid"},backgroundColor:{value:"{colors.red.60}"},color:{value:"{colors.font.inverse}"},_disabled:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled}"},color:{value:"{colors.font.disabled}"}},_loading:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled}"},color:{value:"{colors.font.disabled}"}},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.80}"},color:{value:"{colors.font.inverse}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.80}"},color:{value:"{colors.font.inverse}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.100}"},color:{value:"{colors.font.inverse}"}}},small:{fontSize:{value:"{components.fieldcontrol.small.fontSize.value}"},paddingBlockStart:{value:"{components.fieldcontrol.small.paddingBlockStart.value}"},paddingBlockEnd:{value:"{components.fieldcontrol.small.paddingBlockEnd.value}"},paddingInlineStart:{value:"{components.fieldcontrol.small.paddingInlineStart.value}"},paddingInlineEnd:{value:"{components.fieldcontrol.small.paddingInlineEnd.value}"}},large:{fontSize:{value:"{components.fieldcontrol.large.fontSize.value}"},paddingBlockStart:{value:"{components.fieldcontrol.large.paddingBlockStart.value}"},paddingBlockEnd:{value:"{components.fieldcontrol.large.paddingBlockEnd.value}"},paddingInlineStart:{value:"{components.fieldcontrol.large.paddingInlineStart.value}"},paddingInlineEnd:{value:"{components.fieldcontrol.large.paddingInlineEnd.value}"}},loaderWrapper:{alignItems:{value:"center"},gap:{value:"{space.xs.value}"}}};export{o as button};
|