@dropins/storefront-auth 0.0.1-alpha5 → 0.0.1-alpha6

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.
Files changed (233) hide show
  1. package/api/confirmEmail/confirmEmail.d.ts +4 -0
  2. package/api/confirmEmail/graphql/confirmEmail.graphql.d.ts +2 -0
  3. package/api/confirmEmail/index.d.ts +2 -0
  4. package/api/createCustomer/createCustomer.d.ts +4 -0
  5. package/api/createCustomer/graphql/createCustomer.graphql.d.ts +2 -0
  6. package/api/createCustomer/graphql/createCustomerV2.graphql.d.ts +2 -0
  7. package/api/createCustomer/index.d.ts +2 -0
  8. package/api/createCustomerAddress/createCustomerAddress.d.ts +4 -0
  9. package/api/createCustomerAddress/graphql/createCustomerAddress.graphql.d.ts +2 -0
  10. package/api/createCustomerAddress/index.d.ts +2 -0
  11. package/api/fetch-graphql/fetch-graphql.d.ts +8 -0
  12. package/api/fetch-graphql/index.d.ts +2 -0
  13. package/api/getAttributesForm/getAttributesForm.d.ts +4 -0
  14. package/api/getAttributesForm/graphql/getAttributesForm.graphql.d.ts +2 -0
  15. package/api/getAttributesForm/index.d.ts +2 -0
  16. package/api/getCustomerData/getCustomerData.d.ts +4 -0
  17. package/api/getCustomerData/graphql/getCustomerData.graphql.d.ts +2 -0
  18. package/api/getCustomerData/index.d.ts +2 -0
  19. package/api/getCustomerToken/getCustomerToken.d.ts +15 -0
  20. package/api/getCustomerToken/graphql/getCustomerToken.graphql.d.ts +2 -0
  21. package/api/getCustomerToken/index.d.ts +2 -0
  22. package/api/getStoreConfig/getStoreConfig.d.ts +4 -0
  23. package/api/getStoreConfig/graphql/getStoreConfig.graphql.d.ts +2 -0
  24. package/api/getStoreConfig/index.d.ts +2 -0
  25. package/api/index.d.ts +14 -0
  26. package/api/initialize/index.d.ts +2 -0
  27. package/api/initialize/initialize.d.ts +14 -0
  28. package/api/requestPasswordResetEmail/graphql/requestPasswordResetEmail.graphql.d.ts +2 -0
  29. package/api/requestPasswordResetEmail/index.d.ts +2 -0
  30. package/api/requestPasswordResetEmail/requestPasswordResetEmail.d.ts +4 -0
  31. package/api/resendConfirmationEmail/graphql/resendConfirmationEmail.graphql.d.ts +2 -0
  32. package/api/resendConfirmationEmail/index.d.ts +2 -0
  33. package/api/resendConfirmationEmail/resendConfirmationEmail.d.ts +4 -0
  34. package/api/resetPassword/graphql/resetPassword.graphql.d.ts +2 -0
  35. package/api/resetPassword/index.d.ts +2 -0
  36. package/api/resetPassword/resetPassword.d.ts +4 -0
  37. package/api/revokeCustomerToken/graphql/revokeCustomerToken.graphql.d.ts +2 -0
  38. package/api/revokeCustomerToken/index.d.ts +2 -0
  39. package/api/revokeCustomerToken/revokeCustomerToken.d.ts +4 -0
  40. package/api.d.ts +1 -0
  41. package/api.js +3 -4
  42. package/chunks/EmailConfirmationForm.js +1 -2
  43. package/chunks/PasswordField.js +1 -2
  44. package/chunks/ResetPasswordForm.js +1 -2
  45. package/chunks/SignInForm.js +1 -2
  46. package/chunks/SignUpForm.js +1 -2
  47. package/chunks/SkeletonLoader.js +1 -2
  48. package/chunks/confirmEmail.js +1 -2
  49. package/chunks/createCustomerAddress.js +5 -6
  50. package/chunks/getStoreConfig.js +4 -5
  51. package/chunks/index.js +1 -2
  52. package/chunks/index2.js +1 -2
  53. package/chunks/index3.js +1 -2
  54. package/chunks/initialize.js +0 -1
  55. package/chunks/requestPasswordResetEmail.js +2 -3
  56. package/chunks/resendConfirmationEmail.js +1 -2
  57. package/chunks/resetPassword.js +2 -3
  58. package/chunks/setReCaptchaToken.js +1 -0
  59. package/chunks/simplifyTransformAttributesForm.js +0 -1
  60. package/chunks/transform-attributes-form.js +0 -1
  61. package/chunks/useInLineAlert.js +1 -2
  62. package/chunks/usePasswordValidationMessage.js +1 -2
  63. package/components/EmailConfirmationForm/EmailConfirmationForm.d.ts +5 -0
  64. package/components/EmailConfirmationForm/index.d.ts +3 -0
  65. package/components/PasswordValidationMessage/PasswordValidationMessage.d.ts +12 -0
  66. package/components/PasswordValidationMessage/index.d.ts +3 -0
  67. package/components/ResetPasswordForm/ResetPasswordForm.d.ts +6 -0
  68. package/components/ResetPasswordForm/index.d.ts +3 -0
  69. package/components/SignInForm/SignInForm.d.ts +5 -0
  70. package/components/SignInForm/index.d.ts +3 -0
  71. package/components/SignUpForm/SignUpForm.d.ts +5 -0
  72. package/components/SignUpForm/index.d.ts +3 -0
  73. package/components/SkeletonLoader/SkeletonLoader.d.ts +5 -0
  74. package/components/SkeletonLoader/Skeletons/ResetPasswordSkeleton.d.ts +2 -0
  75. package/components/SkeletonLoader/Skeletons/SignInSkeleton.d.ts +2 -0
  76. package/components/SkeletonLoader/Skeletons/SignUpSkeleton.d.ts +2 -0
  77. package/components/SkeletonLoader/Skeletons/index.d.ts +4 -0
  78. package/components/SkeletonLoader/index.d.ts +3 -0
  79. package/components/SuccessNotificationForm/SuccessNotificationForm.d.ts +6 -0
  80. package/components/SuccessNotificationForm/index.d.ts +3 -0
  81. package/components/UI/Button/Button.d.ts +16 -0
  82. package/components/UI/Button/index.d.ts +3 -0
  83. package/components/UI/CheckboxField/CheckboxField.d.ts +13 -0
  84. package/components/UI/CheckboxField/index.d.ts +3 -0
  85. package/components/UI/DateField/DateField.d.ts +13 -0
  86. package/components/UI/DateField/index.d.ts +3 -0
  87. package/components/UI/Form/Form.d.ts +5 -0
  88. package/components/UI/Form/index.d.ts +3 -0
  89. package/components/UI/FormInputs/FormInputs.d.ts +12 -0
  90. package/components/UI/FormInputs/index.d.ts +3 -0
  91. package/components/UI/PasswordField/PasswordField.d.ts +15 -0
  92. package/components/UI/PasswordField/index.d.ts +3 -0
  93. package/components/UI/SelectField/SelectField.d.ts +17 -0
  94. package/components/UI/SelectField/index.d.ts +3 -0
  95. package/components/UI/TextArea/TextArea.d.ts +13 -0
  96. package/components/UI/TextArea/index.d.ts +3 -0
  97. package/components/UI/TextField/TextField.d.ts +13 -0
  98. package/components/UI/TextField/index.d.ts +3 -0
  99. package/components/UI/Title/Title.d.ts +11 -0
  100. package/components/UI/Title/index.d.ts +3 -0
  101. package/components/UI/index.d.ts +11 -0
  102. package/components/UpdatePasswordForm/UpdatePasswordForm.d.ts +5 -0
  103. package/components/UpdatePasswordForm/index.d.ts +3 -0
  104. package/components/index.d.ts +18 -0
  105. package/configs/cookieConfigs.d.ts +7 -0
  106. package/configs/defaultCreateUserConfigs.d.ts +16 -0
  107. package/configs/patternConfigs.d.ts +3 -0
  108. package/containers/AuthCombine/AuthCombine.d.ts +5 -0
  109. package/containers/AuthCombine/index.d.ts +3 -0
  110. package/containers/AuthCombine.d.ts +3 -0
  111. package/containers/AuthCombine.js +1 -2
  112. package/containers/ResetPassword/ResetPassword.d.ts +5 -0
  113. package/containers/ResetPassword/index.d.ts +3 -0
  114. package/containers/ResetPassword.d.ts +3 -0
  115. package/containers/ResetPassword.js +1 -2
  116. package/containers/SignIn/SignIn.d.ts +5 -0
  117. package/containers/SignIn/index.d.ts +3 -0
  118. package/containers/SignIn.d.ts +3 -0
  119. package/containers/SignIn.js +1 -2
  120. package/containers/SignUp/SignUp.d.ts +5 -0
  121. package/containers/SignUp/index.d.ts +3 -0
  122. package/containers/SignUp.d.ts +3 -0
  123. package/containers/SignUp.js +1 -2
  124. package/containers/SuccessNotification/SuccessNotification.d.ts +5 -0
  125. package/containers/SuccessNotification/index.d.ts +3 -0
  126. package/containers/SuccessNotification.d.ts +3 -0
  127. package/containers/SuccessNotification.js +1 -2
  128. package/containers/UpdatePassword/UpdatePassword.d.ts +5 -0
  129. package/containers/UpdatePassword/index.d.ts +3 -0
  130. package/containers/UpdatePassword.d.ts +3 -0
  131. package/containers/UpdatePassword.js +1 -2
  132. package/containers/index.d.ts +7 -0
  133. package/data/models/attributes-form.d.ts +25 -0
  134. package/data/models/customer-data.d.ts +6 -0
  135. package/data/models/index.d.ts +7 -0
  136. package/data/models/password-reset-email.d.ts +5 -0
  137. package/data/models/reset-password.d.ts +5 -0
  138. package/data/models/revoke-customer-token.d.ts +5 -0
  139. package/data/models/store-config.d.ts +8 -0
  140. package/data/transforms/index.d.ts +7 -0
  141. package/data/transforms/transform-attributes-form.d.ts +5 -0
  142. package/data/transforms/transform-auth.d.ts +37 -0
  143. package/data/transforms/transform-customer-data.d.ts +5 -0
  144. package/data/transforms/transform-password-reset-email.d.ts +5 -0
  145. package/data/transforms/transform-reset-password.d.ts +5 -0
  146. package/data/transforms/transform-revoke-customer-token.d.ts +5 -0
  147. package/data/transforms/transform-store-config.d.ts +5 -0
  148. package/hooks/api/useGetAttributesForm.d.ts +14 -0
  149. package/hooks/api/useGetStoreConfigs.d.ts +8 -0
  150. package/hooks/components/useEmailConfirmationForm.d.ts +7 -0
  151. package/hooks/components/usePasswordValidationMessage.d.ts +16 -0
  152. package/hooks/components/useResetPasswordForm.d.ts +8 -0
  153. package/hooks/components/useSignInForm.d.ts +21 -0
  154. package/hooks/components/useSignUpForm.d.ts +20 -0
  155. package/hooks/components/useUpdatePasswordForm.d.ts +14 -0
  156. package/hooks/ui/useForm.d.ts +11 -0
  157. package/hooks/useEmailConfirmation.d.ts +11 -0
  158. package/hooks/useInLineAlert.d.ts +7 -0
  159. package/i18n/en_US.json.d.ts +66 -0
  160. package/icons/index.d.ts +4 -0
  161. package/lib/acdl.d.ts +9 -0
  162. package/lib/checkIsFunction.d.ts +2 -0
  163. package/lib/clearUrlAndReplace.d.ts +2 -0
  164. package/lib/convertToInputDateFormat.d.ts +2 -0
  165. package/lib/cookieUtils.d.ts +3 -0
  166. package/lib/fetch-error.d.ts +5 -0
  167. package/lib/generateRandomDigits.d.ts +2 -0
  168. package/lib/getFormValues.d.ts +2 -0
  169. package/lib/getUrlParam.d.ts +2 -0
  170. package/lib/mergeFormObjects.d.ts +3 -0
  171. package/lib/network-error.d.ts +6 -0
  172. package/lib/setLoadingState.d.ts +2 -0
  173. package/lib/setReCaptchaToken.d.ts +2 -0
  174. package/lib/simplifyTransformAttributesForm.d.ts +2 -0
  175. package/lib/validationUniqueSymbolsPassword.d.ts +2 -0
  176. package/package.json +1 -1
  177. package/render/Provider.d.ts +8 -0
  178. package/render/index.d.ts +2 -0
  179. package/render/render.d.ts +4 -0
  180. package/render.d.ts +1 -0
  181. package/render.js +1 -2
  182. package/types/api/confirmEmail.types.d.ts +17 -0
  183. package/types/api/createCustomer.types.d.ts +24 -0
  184. package/types/api/createCustomerAddress.types.d.ts +47 -0
  185. package/types/api/getAttributesForm.types.d.ts +29 -0
  186. package/types/api/getCustomerData.types.d.ts +13 -0
  187. package/types/api/getCustomerToken.types.d.ts +11 -0
  188. package/types/api/passwordResetEmail.types.d.ts +9 -0
  189. package/types/api/resendConfirmationEmail.types.d.ts +9 -0
  190. package/types/api/resetPassword.types.d.ts +9 -0
  191. package/types/api/revokeCustomerToken.types.d.ts +9 -0
  192. package/types/api/storeConfig.types.d.ts +16 -0
  193. package/types/authCombine.types.d.ts +12 -0
  194. package/types/emailConfirmationForm.types.d.ts +14 -0
  195. package/types/form.types.d.ts +11 -0
  196. package/types/index.d.ts +22 -0
  197. package/types/notification.types.d.ts +15 -0
  198. package/types/resetPassword.types.d.ts +15 -0
  199. package/types/signIn.types.d.ts +34 -0
  200. package/types/signUp.types.d.ts +41 -0
  201. package/types/skeletonLoader.types.d.ts +6 -0
  202. package/types/successNotification.types.d.ts +13 -0
  203. package/types/updatePassword.types.d.ts +24 -0
  204. package/api.js.map +0 -1
  205. package/chunks/EmailConfirmationForm.js.map +0 -1
  206. package/chunks/PasswordField.js.map +0 -1
  207. package/chunks/ResetPasswordForm.js.map +0 -1
  208. package/chunks/SignInForm.js.map +0 -1
  209. package/chunks/SignUpForm.js.map +0 -1
  210. package/chunks/SkeletonLoader.js.map +0 -1
  211. package/chunks/confirmEmail.js.map +0 -1
  212. package/chunks/createCustomerAddress.js.map +0 -1
  213. package/chunks/getStoreConfig.js.map +0 -1
  214. package/chunks/index.js.map +0 -1
  215. package/chunks/index2.js.map +0 -1
  216. package/chunks/index3.js.map +0 -1
  217. package/chunks/initialize.js.map +0 -1
  218. package/chunks/network-error.js +0 -2
  219. package/chunks/network-error.js.map +0 -1
  220. package/chunks/requestPasswordResetEmail.js.map +0 -1
  221. package/chunks/resendConfirmationEmail.js.map +0 -1
  222. package/chunks/resetPassword.js.map +0 -1
  223. package/chunks/simplifyTransformAttributesForm.js.map +0 -1
  224. package/chunks/transform-attributes-form.js.map +0 -1
  225. package/chunks/useInLineAlert.js.map +0 -1
  226. package/chunks/usePasswordValidationMessage.js.map +0 -1
  227. package/containers/AuthCombine.js.map +0 -1
  228. package/containers/ResetPassword.js.map +0 -1
  229. package/containers/SignIn.js.map +0 -1
  230. package/containers/SignUp.js.map +0 -1
  231. package/containers/SuccessNotification.js.map +0 -1
  232. package/containers/UpdatePassword.js.map +0 -1
  233. package/render.js.map +0 -1
@@ -0,0 +1,4 @@
1
+ import { Render } from '@dropins/tools/types/elsie/src/lib';
2
+
3
+ export declare const render: Render;
4
+ //# sourceMappingURL=render.d.ts.map
package/render.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './render/index'
package/render.js CHANGED
@@ -7,5 +7,4 @@
7
7
  .auth-password-field{position:relative}.auth-password-field>div:first-child{margin-bottom:var(--spacing-small)}.auth-password-field--error .auth-password-field__eye-icon{right:var(--spacing-xbig);transition:all .3s ease-in-out}.auth-password-field__eye-icon{position:absolute;height:24px;top:17px;right:17px;cursor:pointer;z-index:2}
8
8
  .auth-passwordValidationMessage_item{display:grid;grid-template-columns:20px auto;align-items:center;justify-content:left;gap:0 8px;font:var(--type-details-caption-2-font);letter-spacing:var(--type-details-caption-2-letter-spacing)}.auth-passwordValidationMessage_item.auth-passwordValidationMessage_item--status-pending{color:var(--color-neutral-700, #666)}.auth-passwordValidationMessage_item.auth-passwordValidationMessage_item--status-success{color:var(--color-positive-800, #53824c)}.auth-passwordValidationMessage_item.auth-passwordValidationMessage_item--status-error{color:var(--color-alert-800, #bf4545)}
9
9
  .auth-checkbox-field{text-align:start}.auth-checkbox-field__error{font-family:var(--type-base-font-family);font:var(--type-details-caption-2-font);letter-spacing:var(--type-details-caption-2-letter-spacing);color:var(--color-alert-800);padding-top:var(--spacing-xsmall)}.auth-button{position:relative}.auth-button__loader-wrapper{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);opacity:0;display:none}.auth-custom-button__loader{width:20px;height:20px;border:5px solid #fff;border-radius:50%;display:inline-block;box-sizing:border-box;position:relative;animation:pulse 1s linear infinite}.auth-button__loader:after{content:"";position:absolute;width:20px;height:20px;border:5px solid #fff;border-radius:50%;display:inline-block;box-sizing:border-box;left:50%;top:50%;transform:translate(-50%,-50%);animation:scaleUp 1s linear infinite}@keyframes scaleUp{0%{transform:translate(-50%,-50%) scale(0)}60%,to{transform:translate(-50%,-50%) scale(1)}}@keyframes pulse{0%,60%,to{transform:scale(1)}80%{transform:scale(1.2)}}.auth-button.enableLoader .auth-button__text{opacity:0}.auth-button.enableLoader .auth-button__loader-wrapper{opacity:1;display:inline-flex}.auth-date-field{position:relative}.auth-date-field input{max-height:56px}.auth-date-field input::-webkit-calendar-picker-indicator{opacity:0}.auth-date-field svg{display:inline-block;position:absolute;top:calc(var(--spacing-small) - 3px);right:var(--spacing-small)}.auth-select-field{position:relative}.auth-select-field--error .auth-select-field__select{border:var(--shape-border-width-1) solid var(--color-alert-800)}.auth-select-field--error .auth-select-field__error-text{color:var(--color-alert-800)}.elsie-field.elsie-field__label--disabled .auth-select-field__select{background-color:var(--color-neutral-300)}.auth-select-field__select{background-color:transparent;width:100%;height:56px;transition:all .2s;touch-action:manipulation;font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing);padding:var(--spacing-xsmall) var(--spacing-small);padding-bottom:calc(var(--spacing-small) - var(--spacing-xsmall));-webkit-appearance:none;-moz-appearance:none;border-radius:var(--shape-border-radius-1);color:var(--color-neutral-700)}.auth-select-field__select:focus-visible{outline:none}.auth-select-field__select:focus{border-color:var(--color-neutral-800, #3d3d3d);border-radius:var(--shape-border-radius-1, 3px)}.auth-select-field__select:focus+label{color:var(--color-neutral-800)}.auth-select-field__label{color:var(--color-neutral-700, #666);font-family:var(--type-base-font-family);font:var(--type-details-caption-2-font);letter-spacing:var(--type-details-caption-2-letter-spacing);position:absolute;top:11px;left:17px;opacity:0}.auth-select-field svg{position:absolute;top:18px;right:var(--spacing-small)}.auth-select-field__error-text{color:var(--color-neutral-700, #666);font-family:var(--type-base-font-family);font:var(--type-details-caption-2-font);letter-spacing:var(--type-details-caption-2-letter-spacing);padding-top:var(--spacing-xsmall)}.auth-textarea-field{position:relative}.auth-textarea-field--error .auth-textarea-field__textarea{border:var(--shape-border-width-1) solid var(--color-alert-800)}.auth-textarea-field--error .auth-textarea-field__label{color:var(--color-alert-800)}.auth-textarea-field__label{font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing);color:var(--color-neutral-700);position:absolute;top:18px;left:17px;transition:all .2s}.auth-textarea-field__textarea{font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing);color:var(--color-neutral-800, #3d3d3d);max-width:100%;width:100%;box-sizing:border-box;min-height:200px;padding:var(--spacing-big) var(--spacing-small);border-radius:var(--shape-border-radius-1);transition:border-color .2s}.auth-textarea-field__textarea::placeholder{color:var(--color-neutral-700);opacity:0;transition:color .2s,opacity .2s}.auth-textarea-field__textarea:focus{border-color:var(--color-neutral-800, #3d3d3d);border-radius:var(--shape-border-radius-1)}.auth-textarea-field__textarea:focus::placeholder{color:var(--color-neutral-700);opacity:.8}.auth-textarea-field__textarea:not(:placeholder-shown)+.auth-textarea-field__label,.auth-textarea-field__textarea:focus+.auth-textarea-field__label{font:var(--type-details-caption-2-font);letter-spacing:var(--type-details-caption-1-letter-spacing);color:var(--color-neutral-700, #666666);top:12px;left:17px;transition:all .2s;touch-action:manipulation}.auth-textarea-field__textarea:focus+.auth-textarea-field__label{color:var(--color-neutral-800)}.auth-textarea-field__textarea:focus-visible{outline:none}.auth-textarea-field__error-text{font:var(--type-details-caption-1-font);letter-spacing:var(--type-details-caption-1-letter-spacing);color:var(--color-alert-800);padding-top:var(--spacing-xsmall)}.auth-title__heading{color:var(--color-neutral-800, #2b2b2b);font:var(--type-headline-2-default-font);letter-spacing:var(--type-details-caption-1-letter-spacing)}.auth-title__text{display:flex;justify-content:space-between;align-items:center}.auth-title__hr{margin-top:var(--spacing-xsmall);border:none;border-bottom:var(--shape-border-width-2) solid var(--color-neutral-400, #d6d6d6)}`,{styleId:"Auth"});
10
- import{deepmerge as d,Render as u}from"@dropins/tools/lib.js";import{useState as m,useEffect as f}from"@dropins/tools/preact-hooks.js";import{UIProvider as g}from"@dropins/tools/components.js";import{events as y}from"@dropins/tools/event-bus.js";import{jsx as i}from"@dropins/tools/preact-jsx-runtime.js";import{c as h}from"./chunks/initialize.js";const p={PasswordValidationMessage:{chartTwoSymbols:"Use characters and numbers or symbols",chartThreeSymbols:"Use characters, numbers and symbols",chartFourSymbols:"Use uppercase characters, lowercase characters, numbers and symbols",messageLengthPassword:"At least {minLength} characters long"},ResetPasswordForm:{title:"Reset your password",buttonPrimary:"Reset password",buttonSecondary:"Back to sign in"},SignInForm:{title:"Sign in",buttonPrimary:"Sign in",buttonSecondary:"Sign up",buttonTertiary:"Forgot password?"},SignUpForm:{title:"Sign up",buttonPrimary:"Create account",buttonSecondary:"Already a member? Sign in",privacyPolicyDefaultText:"I’ve read and accept the Terms of Use and Privacy Policy.",subscribedDefaultText:"Subscribe to our newsletter and be the first to know about new arrivals, sales and exclusive offers.",keepMeLoggedText:"Keep me logged in after account creation",failedCreateCustomerAddress:"Failed to create customer addresses:"},UpdatePasswordForm:{title:"Update password",buttonPrimary:"Update password"},FormText:{requiredFieldError:"This is a required field."},EmailConfirmationForm:{title:"Verify your email address",subtitle:"We`ve sent an email to",mainText:"Check your inbox and click on the link we just send you to confirm your email address and activate your account.",buttonSecondary:"Resend email",buttonPrimary:"Close",accountConfirmMessage:"Account confirmed",accountConfirmationEmailSuccessMessage:"Congratulations! Your account at {email} email has been successfully confirmed."},Notification:{errorNotification:"Your password update failed due to validation errors. Please check your information and try again.",updatePasswordMessage:"The password has been updated. Now you can log in with the new password.",successPasswordResetEmailNotification:"If there is an account associated with {email} you will receive an email with a link to reset your password.",resendEmailNotification:{informationText:"This account is not confirmed.",buttonText:"Click here",additionalText:"to resend confirmation email."},emailConfirmationMessage:"Please check your email for confirmation link.",technicalErrors:{technicalErrorSendEmail:"A technical error occurred while trying to send the email. Please try again later."}},Api:{customerTokenErrorMessage:"Unable to log in. Please try again later or contact support if the issue persists."}},b={Auth:p},w={default:b},P=({children:s})=>{var o,r;const[e,n]=m("en_US"),c=(r=(o=h)==null?void 0:o.getConfig())==null?void 0:r.langDefinitions;f(()=>{const t=y.on("locale",a=>{a!==e&&n(a)},{eager:!0});return()=>{t==null||t.off()}},[e]);const l=d(w,c??{});return i(g,{lang:e,langDefinitions:l,children:s})},v=new u(i(P,{}));export{v as render};
11
- //# sourceMappingURL=render.js.map
10
+ import{jsx as i}from"@dropins/tools/preact-jsx-runtime.js";import{deepmerge as d,Render as u}from"@dropins/tools/lib.js";import{useState as m,useEffect as f}from"@dropins/tools/preact-hooks.js";import{UIProvider as g}from"@dropins/tools/components.js";import{events as y}from"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{c as h}from"./chunks/initialize.js";const p={PasswordValidationMessage:{chartTwoSymbols:"Use characters and numbers or symbols",chartThreeSymbols:"Use characters, numbers and symbols",chartFourSymbols:"Use uppercase characters, lowercase characters, numbers and symbols",messageLengthPassword:"At least {minLength} characters long"},ResetPasswordForm:{title:"Reset your password",buttonPrimary:"Reset password",buttonSecondary:"Back to sign in"},SignInForm:{title:"Sign in",buttonPrimary:"Sign in",buttonSecondary:"Sign up",buttonTertiary:"Forgot password?"},SignUpForm:{title:"Sign up",buttonPrimary:"Create account",buttonSecondary:"Already a member? Sign in",privacyPolicyDefaultText:"I’ve read and accept the Terms of Use and Privacy Policy.",subscribedDefaultText:"Subscribe to our newsletter and be the first to know about new arrivals, sales and exclusive offers.",keepMeLoggedText:"Keep me logged in after account creation",failedCreateCustomerAddress:"Failed to create customer addresses:"},UpdatePasswordForm:{title:"Update password",buttonPrimary:"Update password"},FormText:{requiredFieldError:"This is a required field."},EmailConfirmationForm:{title:"Verify your email address",subtitle:"We`ve sent an email to",mainText:"Check your inbox and click on the link we just send you to confirm your email address and activate your account.",buttonSecondary:"Resend email",buttonPrimary:"Close",accountConfirmMessage:"Account confirmed",accountConfirmationEmailSuccessMessage:"Congratulations! Your account at {email} email has been successfully confirmed."},Notification:{errorNotification:"Your password update failed due to validation errors. Please check your information and try again.",updatePasswordMessage:"The password has been updated. Now you can log in with the new password.",successPasswordResetEmailNotification:"If there is an account associated with {email} you will receive an email with a link to reset your password.",resendEmailNotification:{informationText:"This account is not confirmed.",buttonText:"Click here",additionalText:"to resend confirmation email."},emailConfirmationMessage:"Please check your email for confirmation link.",technicalErrors:{technicalErrorSendEmail:"A technical error occurred while trying to send the email. Please try again later."}},Api:{customerTokenErrorMessage:"Unable to log in. Please try again later or contact support if the issue persists."}},b={Auth:p},w={default:b},P=({children:s})=>{var o,r;const[e,n]=m("en_US"),c=(r=(o=h)==null?void 0:o.getConfig())==null?void 0:r.langDefinitions;f(()=>{const t=y.on("locale",a=>{a!==e&&n(a)},{eager:!0});return()=>{t==null||t.off()}},[e]);const l=d(w,c??{});return i(g,{lang:e,langDefinitions:l,children:s})},F=new u(i(P,{}));export{F as render};
@@ -0,0 +1,17 @@
1
+ export interface confirmEmailResponse {
2
+ data: {
3
+ confirmEmail: {
4
+ customer: {
5
+ email: string;
6
+ };
7
+ };
8
+ };
9
+ errors?: {
10
+ message: string;
11
+ }[];
12
+ }
13
+ export interface confirmEmailProps {
14
+ customerEmail: string;
15
+ customerConfirmationKey: string;
16
+ }
17
+ //# sourceMappingURL=confirmEmail.types.d.ts.map
@@ -0,0 +1,24 @@
1
+ export interface Customer {
2
+ firstname: string;
3
+ lastname: string;
4
+ email: string;
5
+ is_subscribed: boolean;
6
+ custom_attributes?: Record<string, string>[];
7
+ }
8
+ interface CreateCustomerResponse {
9
+ customer: Customer;
10
+ }
11
+ interface DataCreateCustomerV2 {
12
+ createCustomer: CreateCustomerResponse;
13
+ }
14
+ interface DataCreateCustomer {
15
+ createCustomer: CreateCustomerResponse;
16
+ }
17
+ export interface CreateCustomerDataResponse {
18
+ data: DataCreateCustomerV2 | DataCreateCustomer | null;
19
+ errors?: {
20
+ message: string;
21
+ }[];
22
+ }
23
+ export {};
24
+ //# sourceMappingURL=createCustomer.types.d.ts.map
@@ -0,0 +1,47 @@
1
+ export interface CreateCustomerAddressResponse {
2
+ data: {
3
+ createCustomerAddress: {
4
+ firstname: string;
5
+ };
6
+ };
7
+ errors?: {
8
+ message: string;
9
+ }[];
10
+ }
11
+ interface Region {
12
+ region_id: number;
13
+ region: string;
14
+ region_code: string;
15
+ }
16
+ interface CustomAttributes {
17
+ attribute_code: string;
18
+ value: string;
19
+ }
20
+ interface CustomAttributesV2 extends CustomAttributes {
21
+ selected_options: {
22
+ value: string;
23
+ }[];
24
+ }
25
+ export interface AddressFormProps {
26
+ region: Region;
27
+ city: string;
28
+ company: string;
29
+ country_code: string;
30
+ country_id: string;
31
+ custom_attributes: CustomAttributes[];
32
+ custom_attributesV2: CustomAttributesV2[];
33
+ default_billing?: boolean;
34
+ default_shipping?: boolean;
35
+ fax: string;
36
+ firstname: string;
37
+ lastname: string;
38
+ middlename: string;
39
+ postcode: string;
40
+ prefix: string;
41
+ street: string[];
42
+ suffix: string;
43
+ telephone: string;
44
+ vat_id: string;
45
+ }
46
+ export {};
47
+ //# sourceMappingURL=createCustomerAddress.types.d.ts.map
@@ -0,0 +1,29 @@
1
+ export interface getAttributesFormItems {
2
+ code: string;
3
+ default_value: null | string;
4
+ entity_type: string;
5
+ frontend_class: null | string;
6
+ frontend_input: string;
7
+ is_required: boolean;
8
+ is_unique: boolean;
9
+ label: string;
10
+ options: {
11
+ is_default: boolean;
12
+ label: string;
13
+ value: string;
14
+ }[];
15
+ }
16
+ export interface getAttributesFormResponse {
17
+ data: {
18
+ attributesForm: {
19
+ errors?: {
20
+ message: string;
21
+ }[];
22
+ items?: getAttributesFormItems[];
23
+ };
24
+ };
25
+ errors?: {
26
+ message: string;
27
+ }[];
28
+ }
29
+ //# sourceMappingURL=getAttributesForm.types.d.ts.map
@@ -0,0 +1,13 @@
1
+ export interface getCustomerDataResponse {
2
+ data: {
3
+ customer: {
4
+ firstname: string;
5
+ lastname: string;
6
+ email: string;
7
+ };
8
+ };
9
+ errors?: {
10
+ message: string;
11
+ }[];
12
+ }
13
+ //# sourceMappingURL=getCustomerData.types.d.ts.map
@@ -0,0 +1,11 @@
1
+ export interface getCustomerTokenResponse {
2
+ data: {
3
+ generateCustomerToken: {
4
+ token: string | null;
5
+ };
6
+ };
7
+ errors?: {
8
+ message: string;
9
+ }[];
10
+ }
11
+ //# sourceMappingURL=getCustomerToken.types.d.ts.map
@@ -0,0 +1,9 @@
1
+ export interface PasswordResetEmailResponse {
2
+ data?: {
3
+ requestPasswordResetEmail: boolean;
4
+ };
5
+ errors?: {
6
+ message: string;
7
+ }[];
8
+ }
9
+ //# sourceMappingURL=passwordResetEmail.types.d.ts.map
@@ -0,0 +1,9 @@
1
+ export interface resendConfirmationEmailResponse {
2
+ data: {
3
+ resendConfirmationEmail: boolean;
4
+ };
5
+ errors?: {
6
+ message: string;
7
+ }[];
8
+ }
9
+ //# sourceMappingURL=resendConfirmationEmail.types.d.ts.map
@@ -0,0 +1,9 @@
1
+ export interface ResetPasswordResponse {
2
+ data?: {
3
+ resetPassword: boolean;
4
+ };
5
+ errors?: {
6
+ message: string;
7
+ }[];
8
+ }
9
+ //# sourceMappingURL=resetPassword.types.d.ts.map
@@ -0,0 +1,9 @@
1
+ export interface RevokeCustomerTokenResponse {
2
+ data?: {
3
+ revokeCustomerToken: boolean;
4
+ };
5
+ errors?: {
6
+ message: string;
7
+ }[];
8
+ }
9
+ //# sourceMappingURL=revokeCustomerToken.types.d.ts.map
@@ -0,0 +1,16 @@
1
+ export interface storeConfigProps {
2
+ autocomplete_on_storefront: boolean;
3
+ minimum_password_length: number;
4
+ required_character_classes_number: string;
5
+ create_account_confirmation: boolean;
6
+ customer_access_token_lifetime: number;
7
+ }
8
+ export interface getStoreConfigResponse {
9
+ data: {
10
+ storeConfig: storeConfigProps;
11
+ };
12
+ errors?: {
13
+ message: string;
14
+ }[];
15
+ }
16
+ //# sourceMappingURL=storeConfig.types.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { ResetPasswordFormProps } from './resetPassword.types';
2
+ import { SignInFormProps } from './signIn.types';
3
+ import { SignUpFormProps } from './signUp.types';
4
+
5
+ export type activeComponentType = 'signInForm' | 'signUpForm' | 'resetPasswordForm';
6
+ export interface AuthCombineProps {
7
+ defaultView?: activeComponentType;
8
+ signInFormConfig?: SignInFormProps;
9
+ signUpFormConfig?: SignUpFormProps;
10
+ resetPasswordFormConfig?: ResetPasswordFormProps;
11
+ }
12
+ //# sourceMappingURL=authCombine.types.d.ts.map
@@ -0,0 +1,14 @@
1
+ import { inLineAlertInterface } from './notification.types';
2
+
3
+ export interface EmailConfirmationFormProps {
4
+ userEmail: string;
5
+ formSize: 'default' | 'small';
6
+ inLineAlertProps: inLineAlertInterface;
7
+ hideCloseBtnOnEmailConfirmation?: boolean;
8
+ handleSetInLineAlertProps: (value: inLineAlertInterface) => void;
9
+ onPrimaryButtonClick: () => void;
10
+ }
11
+ export interface useEmailConfirmationFormProps extends Omit<EmailConfirmationFormProps, 'formSize' | 'inLineAlertProps' | 'onPrimaryButtonClick'> {
12
+ handleSetInLineAlertProps: (value: inLineAlertInterface) => void;
13
+ }
14
+ //# sourceMappingURL=emailConfirmationForm.types.d.ts.map
@@ -0,0 +1,11 @@
1
+ export interface FormProps {
2
+ fieldsConfig?: any;
3
+ name?: string;
4
+ className?: string;
5
+ children?: any;
6
+ isLoading?: boolean;
7
+ submitCallback?: (event: SubmitEvent, isValid: boolean) => Promise<void | null | undefined>;
8
+ }
9
+ export interface useFormProps extends Omit<FormProps, 'children' | 'className' | 'name'> {
10
+ }
11
+ //# sourceMappingURL=form.types.d.ts.map
@@ -0,0 +1,22 @@
1
+ export * from './form.types';
2
+ export * from './api/storeConfig.types';
3
+ export * from './api/createCustomer.types';
4
+ export * from './api/resetPassword.types';
5
+ export * from './api/getAttributesForm.types';
6
+ export * from './api/getCustomerToken.types';
7
+ export * from './api/passwordResetEmail.types';
8
+ export * from './api/getCustomerData.types';
9
+ export * from './authCombine.types';
10
+ export * from './skeletonLoader.types';
11
+ export * from './updatePassword.types';
12
+ export * from './notification.types';
13
+ export * from './resetPassword.types';
14
+ export * from './signIn.types';
15
+ export * from './signUp.types';
16
+ export * from './successNotification.types';
17
+ export * from './emailConfirmationForm.types';
18
+ export * from './api/confirmEmail.types';
19
+ export * from './api/resendConfirmationEmail.types';
20
+ export * from './emailConfirmationForm.types';
21
+ export * from './api/createCustomerAddress.types';
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,15 @@
1
+ import { VNode } from 'preact';
2
+ import { HTMLAttributes } from 'preact/compat';
3
+
4
+ export interface inLineAlertInterface {
5
+ type?: 'success' | 'warning' | 'error';
6
+ text?: string;
7
+ icon?: VNode<HTMLAttributes<SVGSVGElement>> | undefined;
8
+ }
9
+ export type statusTypes = '' | 'success' | 'error' | 'pending';
10
+ export interface ValidateLengthConfigProps {
11
+ status?: statusTypes;
12
+ icon?: statusTypes;
13
+ message?: string;
14
+ }
15
+ //# sourceMappingURL=notification.types.d.ts.map
@@ -0,0 +1,15 @@
1
+ import { activeComponentType } from './authCombine.types';
2
+ import { inLineAlertInterface } from './notification.types';
3
+
4
+ export interface ResetPasswordProps {
5
+ formSize?: 'default' | 'small';
6
+ routeSignIn?: () => string;
7
+ onErrorCallback?: (value?: unknown) => void;
8
+ }
9
+ export interface ResetPasswordFormProps extends ResetPasswordProps {
10
+ setActiveComponent?: (componentName: activeComponentType) => void;
11
+ }
12
+ export interface UseResetPasswordFormProps extends Omit<ResetPasswordFormProps, 'formSize'> {
13
+ handleSetInLineAlertProps?: (value?: inLineAlertInterface) => void;
14
+ }
15
+ //# sourceMappingURL=resetPassword.types.d.ts.map
@@ -0,0 +1,34 @@
1
+ import { VNode } from 'preact';
2
+ import { activeComponentType } from './authCombine.types';
3
+ import { inLineAlertInterface } from './notification.types';
4
+
5
+ export interface SignInProps {
6
+ formSize?: 'default' | 'small';
7
+ renderSignUpLink?: boolean;
8
+ initialEmailValue?: string;
9
+ enableEmailConfirmation?: boolean;
10
+ hideCloseBtnOnEmailConfirmation?: boolean;
11
+ routeRedirectOnEmailConfirmationClose?: () => string;
12
+ routeForgotPassword?: () => string;
13
+ routeSignUp?: () => string;
14
+ routeRedirectOnSignIn?: () => string;
15
+ successNotificationForm?: (userName: string) => VNode<any>;
16
+ onSuccessCallback?: (value?: {
17
+ userName: string;
18
+ status: boolean;
19
+ }) => Promise<void>;
20
+ onErrorCallback?: (error?: unknown) => void;
21
+ onSignUpLinkClick?: () => void;
22
+ }
23
+ export interface SignInFormProps extends SignInProps {
24
+ setActiveComponent?: (componentName: activeComponentType) => void;
25
+ }
26
+ export interface useSignInFormProps extends Omit<SignInFormProps, 'formSize' | 'successNotificationForm'> {
27
+ handleSetInLineAlertProps: (value?: inLineAlertInterface) => void;
28
+ emailConfirmationStatusMessage?: {
29
+ text: string;
30
+ status: '' | 'success' | 'error';
31
+ };
32
+ translations: any;
33
+ }
34
+ //# sourceMappingURL=signIn.types.d.ts.map
@@ -0,0 +1,41 @@
1
+ import { VNode } from 'preact';
2
+ import { activeComponentType } from './authCombine.types';
3
+ import { inLineAlertInterface } from './notification.types';
4
+ import { AddressFormProps } from './api/createCustomerAddress.types';
5
+
6
+ export interface inputsDefaultValueSetProps {
7
+ code: string;
8
+ defaultValue: string;
9
+ }
10
+ export interface SignUpProps {
11
+ addressesData?: AddressFormProps[];
12
+ inputsDefaultValueSet?: inputsDefaultValueSetProps[];
13
+ fieldsConfigForApiVersion1?: any;
14
+ apiVersion2?: boolean;
15
+ displayTermsOfUseCheckbox?: boolean;
16
+ displayNewsletterCheckbox?: boolean;
17
+ formSize?: 'default' | 'small';
18
+ hideCloseBtnOnEmailConfirmation?: boolean;
19
+ routeRedirectOnEmailConfirmationClose?: () => string;
20
+ successNotificationForm?: (userName: string) => VNode<any>;
21
+ routeSignIn?: () => string;
22
+ routeRedirectOnSignIn?: () => string;
23
+ onErrorCallback?: (value?: unknown) => void;
24
+ onSuccessCallback?: (value?: {
25
+ userName: string;
26
+ status: boolean;
27
+ }) => Promise<void>;
28
+ }
29
+ export interface SignUpFormProps extends SignUpProps {
30
+ setActiveComponent?: (componentName: activeComponentType) => void;
31
+ }
32
+ export interface UseSingUpFormProps extends Omit<SignUpFormProps, 'formSize' | 'displayTermsOfUseCheckbox' | 'displayNewsletterCheckbox' | 'inputsDefaultValueSet' | 'successNotificationForm'> {
33
+ passwordConfigs?: {
34
+ minLength: number;
35
+ requiredCharacterClasses: number;
36
+ } | null;
37
+ handleSetInLineAlertProps: (value?: inLineAlertInterface) => void;
38
+ isEmailConfirmationRequired?: boolean;
39
+ translations: Record<string, string>;
40
+ }
41
+ //# sourceMappingURL=signUp.types.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { activeComponentType } from './authCombine.types';
2
+
3
+ export interface SkeletonLoaderProps {
4
+ activeSkeleton: activeComponentType;
5
+ }
6
+ //# sourceMappingURL=skeletonLoader.types.d.ts.map
@@ -0,0 +1,13 @@
1
+ export interface SuccessNotificationProps {
2
+ formSize?: 'default' | 'small';
3
+ headingText?: string;
4
+ className?: string;
5
+ messageText?: string;
6
+ primaryButtonText?: string;
7
+ secondaryButtonText?: string;
8
+ onPrimaryButtonClick?: () => void;
9
+ onSecondaryButtonClick?: () => void;
10
+ }
11
+ export interface SuccessNotificationFormProps extends SuccessNotificationProps {
12
+ }
13
+ //# sourceMappingURL=successNotification.types.d.ts.map
@@ -0,0 +1,24 @@
1
+ import { VNode } from 'preact';
2
+ import { inLineAlertInterface } from './notification.types';
3
+
4
+ export interface UpdatePasswordProps {
5
+ signInOnSuccess?: boolean;
6
+ formSize?: 'default' | 'small';
7
+ routeRedirectOnPasswordUpdate?: () => string;
8
+ routeRedirectOnSignIn?: () => string;
9
+ routeWrongUrlRedirect?: () => string;
10
+ onErrorCallback?: (value: unknown) => void;
11
+ onSuccessCallback?: (value: string) => void;
12
+ successNotificationForm?: (userName: string) => VNode<any>;
13
+ }
14
+ export interface UpdatePasswordFormProps extends UpdatePasswordProps {
15
+ }
16
+ export interface UseUpdatePasswordFormProps extends Omit<UpdatePasswordFormProps, 'formSize' | 'successNotificationForm'> {
17
+ isEmailConfirmationRequired?: boolean;
18
+ passwordConfigs?: {
19
+ minLength: number;
20
+ requiredCharacterClasses: number;
21
+ } | null;
22
+ handleSetInLineAlertProps: (value?: inLineAlertInterface) => void;
23
+ }
24
+ //# sourceMappingURL=updatePassword.types.d.ts.map
package/api.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"api.js","sources":["../src/data/transforms/transform-revoke-customer-token.ts","../src/api/revokeCustomerToken/graphql/revokeCustomerToken.graphql.ts","../src/api/revokeCustomerToken/revokeCustomerToken.ts"],"sourcesContent":["import { RevokeCustomerTokenResponse } from '@/auth/types/api/revokeCustomerToken.types';\nimport { RevokeCustomerTokenModel } from '../models';\n\nexport const transformRevokeCustomerToken = (\n response: RevokeCustomerTokenResponse\n): RevokeCustomerTokenModel => {\n let message: string = '';\n\n if (response?.errors?.length)\n message =\n (response?.errors[0]?.message as unknown as string) || 'Unknown error';\n\n return {\n message,\n success: Boolean(response?.data?.revokeCustomerToken),\n };\n};\n","export const REVOKE_CUSTOMER_TOKEN = `\n mutation REVOKE_CUSTOMER_TOKEN {\n revokeCustomerToken {\n result\n }\n }\n`;\n","import { RevokeCustomerTokenModel } from '@/auth/data/models';\nimport { fetchGraphQl } from '../fetch-graphql';\nimport { REVOKE_CUSTOMER_TOKEN } from './graphql/revokeCustomerToken.graphql';\nimport { handleNetworkError } from '@/auth/lib/network-error';\nimport { transformRevokeCustomerToken } from '@/auth/data/transforms';\nimport { RevokeCustomerTokenResponse } from '@/auth/types/api/revokeCustomerToken.types';\nimport { deleteCookie } from '@/auth/lib/cookieUtils';\nimport { events } from '@adobe/event-bus';\nimport { COOKIE_NAMES } from '@/auth/configs/cookieConfigs';\nimport { EventsList, publishEvents } from '@/auth/lib/acdl';\n\nexport const revokeCustomerToken =\n async (): Promise<RevokeCustomerTokenModel> => {\n return await fetchGraphQl(REVOKE_CUSTOMER_TOKEN, {\n method: 'POST',\n })\n .then((response: RevokeCustomerTokenResponse) => {\n const transformData = transformRevokeCustomerToken(response);\n\n if (transformData?.success) {\n [\n COOKIE_NAMES.auth_dropin_user_token,\n COOKIE_NAMES.auth_dropin_firstname,\n ].forEach((name) => {\n deleteCookie(name);\n });\n\n events.emit('authenticated', false);\n\n publishEvents(EventsList.SIGN_OUT, { logoutAttempt: true });\n } else {\n const errorMessage = `\n ERROR revokeCustomerToken: ${transformData.message}`;\n console.error(errorMessage);\n }\n\n return transformData;\n })\n .catch(handleNetworkError);\n };\n"],"names":["transformRevokeCustomerToken","response","message","errors","length","success","Boolean","data","revokeCustomerToken","REVOKE_CUSTOMER_TOKEN","fetchGraphQl","method","then","transformData","COOKIE_NAMES","auth_dropin_user_token","auth_dropin_firstname","forEach","name","deleteCookie","emit","publishEvents","EventsList","SIGN_OUT","logoutAttempt","errorMessage","console","error","catch","handleNetworkError"],"mappings":"4uBAGaA,MAAAA,EACXC,GAC6B,WAC7B,IAAIC,EAAkB,GAEtB,OAAID,EAAAA,GAAAA,YAAAA,EAAUE,SAAVF,MAAAA,EAAkBG,SACpBF,IACGD,EAAAA,GAAAA,YAAAA,EAAUE,OAAO,KAAjBF,YAAAA,EAAqBC,UAAiC,iBAEpD,CACLA,QAAAA,EACAG,QAASC,IAAQL,EAAAA,GAAAA,YAAAA,EAAUM,OAAVN,MAAAA,EAAgBO,oBAAmB,CAExD,EChBaC,EAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,ECWxBD,EACX,SACS,MAAME,EAAaD,EAAuB,CAC/CE,OAAQ,MAAA,CACT,EACEC,KAAMX,GAA0C,CACzCY,MAAAA,EAAgBb,EAA6BC,CAAQ,EAE3D,GAAIY,GAAAA,MAAAA,EAAeR,QACjB,CACES,EAAaC,uBACbD,EAAaE,qBAAqB,EAClCC,QAAkBC,GAAA,CAClBC,EAAaD,CAAI,CAAA,CAClB,EAEME,EAAAA,KAAK,gBAAiB,EAAK,EAElCC,EAAcC,EAAWC,SAAU,CAAEC,cAAe,EAAA,CAAM,MACrD,CACL,MAAMC,EAAe;AAAA,uCACQZ,EAAcX,OAAO,GAClDwB,QAAQC,MAAMF,CAAY,CAC5B,CAEOZ,OAAAA,CAAAA,CACR,EACAe,MAAMC,CAAkB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"EmailConfirmationForm.js","sources":["../../src/hooks/components/useEmailConfirmationForm.tsx","../../src/components/EmailConfirmationForm/EmailConfirmationForm.tsx"],"sourcesContent":["import { resendConfirmationEmail } from '@/auth/api';\nimport { useEmailConfirmationFormProps } from '@/auth/types';\nimport { useCallback, useState } from 'preact/hooks';\nimport { useText } from '@adobe/elsie/i18n';\n\nexport const useEmailConfirmationForm = ({\n userEmail,\n handleSetInLineAlertProps,\n}: useEmailConfirmationFormProps) => {\n const translations = useText({\n emailConfirmationMessage: 'Auth.Notification.emailConfirmationMessage',\n technicalErrorSendEmail:\n 'Auth.Notification.technicalErrors.technicalErrorSendEmail',\n });\n\n const [disabledButton, setDisabledButton] = useState(false);\n\n const handleEmailConfirmation = useCallback(async () => {\n setDisabledButton(true);\n\n if (userEmail) {\n const response = await resendConfirmationEmail(userEmail);\n\n if (response) {\n const errors = response?.errors?.length;\n const isEmailResend = response?.data?.resendConfirmationEmail;\n\n if (errors) {\n handleSetInLineAlertProps({\n type: 'error',\n text: translations.technicalErrorSendEmail,\n });\n } else {\n handleSetInLineAlertProps({\n type: isEmailResend ? 'success' : 'error',\n text: translations.emailConfirmationMessage,\n });\n }\n }\n }\n\n setDisabledButton(false);\n }, [handleSetInLineAlertProps, translations, userEmail]);\n\n return { handleEmailConfirmation, disabledButton };\n};\n","import { Button, Title } from '@/auth/components/UI';\nimport { classes } from '@adobe/elsie/lib';\nimport { FunctionComponent } from 'preact';\nimport { InLineAlert } from '@adobe/elsie/components';\nimport '@/auth/components/EmailConfirmationForm/EmailConfirmationForm.css';\nimport { useEmailConfirmationForm } from '@/auth/hooks/components/useEmailConfirmationForm';\nimport { EmailConfirmationFormProps } from '@/auth/types';\nimport { useText } from '@adobe/elsie/i18n';\n\nexport const EmailConfirmationForm: FunctionComponent<\n EmailConfirmationFormProps\n> = ({\n formSize,\n userEmail,\n inLineAlertProps,\n hideCloseBtnOnEmailConfirmation,\n handleSetInLineAlertProps,\n onPrimaryButtonClick,\n}) => {\n const translations = useText({\n title: 'Auth.EmailConfirmationForm.title',\n subtitle: 'Auth.EmailConfirmationForm.subtitle',\n mainText: 'Auth.EmailConfirmationForm.mainText',\n buttonPrimary: 'Auth.EmailConfirmationForm.buttonPrimary',\n buttonSecondary: 'Auth.EmailConfirmationForm.buttonSecondary',\n });\n\n const { handleEmailConfirmation, disabledButton } = useEmailConfirmationForm({\n userEmail,\n handleSetInLineAlertProps,\n });\n\n return (\n <div className={classes(['auth-emailConfirmationForm', formSize])}>\n {inLineAlertProps.text ? (\n <InLineAlert\n className=\"auth-signInForm__notification\"\n type={inLineAlertProps.type}\n /* \n TODO - Remove when SDK will be updated\n https://jira.corp.adobe.com/browse/USF-1240\n */\n // @ts-ignore\n variant=\"secondary\"\n heading={inLineAlertProps.text}\n icon={inLineAlertProps.icon}\n data-testid=\"authInLineAlert\"\n />\n ) : null}\n <Title\n text={translations.title}\n bottomLine={false}\n className=\"auth-emailConfirmationForm__title\"\n />\n {userEmail?.length ? (\n <span className=\"auth-emailConfirmationForm__subtitle\">{`${translations.subtitle} ${userEmail}`}</span>\n ) : null}\n <span className=\"auth-emailConfirmationForm__text\">\n {translations.mainText}\n </span>\n <div className=\"auth-emailConfirmationForm-buttons\">\n <Button\n type=\"button\"\n variant=\"tertiary\"\n style={{ padding: 0 }}\n buttonText={translations.buttonSecondary}\n enableLoader={false}\n onClick={handleEmailConfirmation}\n disabled={disabledButton}\n />\n {hideCloseBtnOnEmailConfirmation ? null : (\n <Button\n type=\"submit\"\n buttonText={translations.buttonPrimary}\n variant=\"primary\"\n enableLoader={false}\n disabled={disabledButton}\n onClick={onPrimaryButtonClick}\n />\n )}\n </div>\n </div>\n );\n};\n"],"names":["useEmailConfirmationForm","userEmail","handleSetInLineAlertProps","translations","useText","emailConfirmationMessage","technicalErrorSendEmail","disabledButton","setDisabledButton","useState","handleEmailConfirmation","useCallback","response","resendConfirmationEmail","errors","length","isEmailResend","data","type","text","EmailConfirmationForm","formSize","inLineAlertProps","hideCloseBtnOnEmailConfirmation","onPrimaryButtonClick","title","subtitle","mainText","buttonPrimary","buttonSecondary","_jsxs","className","classes","children","_jsx","InLineAlert","variant","heading","icon","Title","bottomLine","Button","style","padding","buttonText","enableLoader","onClick","disabled"],"mappings":"gbAKO,MAAMA,EAA2BA,CAAC,CACvCC,UAAAA,EACAC,0BAAAA,CAC6B,IAAM,CACnC,MAAMC,EAAeC,EAAQ,CAC3BC,yBAA0B,6CAC1BC,wBACE,2DAAA,CACH,EAEK,CAACC,EAAgBC,CAAiB,EAAIC,EAAS,EAAK,EA6BnD,MAAA,CAAEC,wBA3BuBC,EAAY,SAAY,SAGtD,GAFAH,EAAkB,EAAI,EAElBP,EAAW,CACPW,MAAAA,EAAW,MAAMC,EAAwBZ,CAAS,EAExD,GAAIW,EAAU,CACNE,MAAAA,GAASF,EAAAA,GAAAA,YAAAA,EAAUE,SAAVF,YAAAA,EAAkBG,OAC3BC,GAAgBJ,EAAAA,GAAAA,YAAAA,EAAUK,OAAVL,YAAAA,EAAgBC,wBAGVX,EADxBY,EACwB,CACxBI,KAAM,QACNC,KAAMhB,EAAaG,uBAAAA,EAGK,CACxBY,KAAMF,EAAgB,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W,EAACO,EAAM,CACLvB,KAAK,SACL0B,WAAYzC,EAAayB,cACzBQ,QAAQ,UACRS,aAAc,GACdE,SAAUxC,EACVuC,QAAStB,CAAAA,CACV,CACF,CAAA,CACE,CAAC,CAAA,CACH,CAET"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"PasswordField.js","sources":["../../node_modules/@adobe/elsie/src/icons/Locker.svg","../../src/icons/Eye.svg","../../src/icons/EyeClose.svg","../../src/components/UI/PasswordField/PasswordField.tsx"],"sourcesContent":["import * as React from \"react\";\nconst SvgLocker = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { clipPath: \"url(#clip0_3785_11045)\" }, /* @__PURE__ */ React.createElement(\"path\", { vectorEffect: \"non-scaling-stroke\", d: \"M7.33 11H16.66C17.4 11 17.99 11.81 17.99 12.82V19.18C17.99 20.18 17.39 21 16.66 21H7.33C6.59 21 6 20.19 6 19.18V12.82C6 11.82 6.6 11 7.33 11Z\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }), /* @__PURE__ */ React.createElement(\"path\", { vectorEffect: \"non-scaling-stroke\", d: \"M8.5 10.86V6.5C8.5 4.57 10.07 3 12 3C13.93 3 15.5 4.57 15.5 6.5V10.86\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\" })), /* @__PURE__ */ React.createElement(\"defs\", null, /* @__PURE__ */ React.createElement(\"clipPath\", { id: \"clip0_3785_11045\" }, /* @__PURE__ */ React.createElement(\"rect\", { width: 13.5, height: 19.5, fill: \"white\", transform: \"translate(5.25 2.25)\" }))));\nexport default SvgLocker;\n","import * as React from \"react\";\nconst SvgEye = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M11.9952 8.05896C7.85898 8.04913 4.04561 10.1916 1.96743 13.6609C4.04561 17.14 7.86907 19.2629 11.9952 19.2629C16.1314 19.2727 19.9447 17.1302 22.0229 13.6609C20.0153 10.3096 16.2827 8.05896 11.9952 8.05896ZM11.9952 8.05896V4.73709M20.5097 11.027L23.2335 9.0221M16.8174 8.88451L18.4618 6.0737M3.48067 11.027L0.756836 9.03193M7.17298 8.89434L5.52859 6.08353M14.8401 13.6609C14.8401 15.1843 13.5689 16.4226 12.0053 16.4226C10.4416 16.4226 9.17045 15.1843 9.17045 13.6609C9.17045 12.1376 10.4416 10.8993 12.0053 10.8993C13.5689 10.8993 14.8401 12.1376 14.8401 13.6609Z\", stroke: \"#2B2B2B\", strokeWidth: 1.5, strokeLinecap: \"round\", strokeLinejoin: \"round\" }));\nexport default SvgEye;\n","import * as React from \"react\";\nconst SvgEyeClose = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M17.11 18.12C19.13 17.16 20.85 15.62 22.02 13.67C20.01 10.32 16.28 8.07 11.99 8.07M11.99 8.07C11.09 8.07 10.21 8.17 9.35 8.36M11.99 8.07V4.75M20.5 11.03L23.22 9.03M16.81 8.89L18.45 6.08M3.47 11.03L0.75 9.03M11.3096 10.99C11.5296 10.94 11.7596 10.91 11.9996 10.91C13.5596 10.91 14.8296 12.15 14.8296 13.67C14.8296 14.05 14.7496 14.41 14.6096 14.74M11.9999 16.43C10.4399 16.43 9.16992 15.19 9.16992 13.67C9.16992 13.37 9.21992 13.09 9.30992 12.83M6.13996 9.60001C4.43996 10.57 2.98996 11.96 1.95996 13.67C4.03996 17.15 7.85996 19.27 11.99 19.27C12.57 19.27 13.15 19.23 13.71 19.14M20.4404 22.5L4.44043 2.5\", stroke: \"#2B2B2B\", strokeWidth: 1.5, strokeLinecap: \"round\", strokeLinejoin: \"round\" }));\nexport default SvgEyeClose;\n","import { FunctionComponent } from 'preact';\nimport { useCallback, useState } from 'preact/hooks';\nimport { classes } from '@adobe/elsie/lib';\nimport { Eye, EyeClose } from '@/auth/icons';\nimport { Locker } from '@adobe/elsie/icons';\nimport { Field, Input } from '@adobe/elsie/components';\nimport { useText } from '@adobe/elsie/i18n';\nimport '@/auth/components/UI/PasswordField/PasswordField.css';\n\nexport interface PasswordFieldProps {\n initialPassword?: string;\n id?: string;\n isError?: boolean;\n className?: string;\n name?: string;\n children?: any;\n required?: boolean;\n setPasswordValueCallback?: (value: string) => void;\n onBlur?: (event: Event) => void;\n}\n\n// TODO: Consider moving this component to the StorefrontSDK repository following the migration to Adobe's git.corp\nexport const PasswordField: FunctionComponent<PasswordFieldProps> = ({\n initialPassword = '',\n required,\n isError,\n children,\n name,\n className,\n setPasswordValueCallback,\n onBlur,\n}) => {\n const translations = useText({\n requiredFieldError: 'Auth.FormText.requiredFieldError',\n });\n const [showPassword, setShowPassword] = useState(false);\n\n const toggleShowPassword = useCallback(() => {\n setShowPassword((prevShowPassword) => !prevShowPassword);\n }, []);\n\n const getErrorMessage = () => {\n if (isError && !initialPassword.length)\n return translations.requiredFieldError;\n\n return '';\n };\n\n const errorMessage = getErrorMessage();\n const errorClass = isError ? 'auth-password-field--error' : '';\n\n return (\n <div className={classes(['auth-password-field', className, errorClass])}>\n <Field error={errorMessage}>\n <Input\n name={name || 'password'}\n type={!showPassword ? 'password' : 'text'}\n placeholder={'Password'}\n floatingLabel={'Password'}\n aria-label={'Password'}\n aria-required={true}\n required={required || false}\n value={initialPassword}\n onValue={setPasswordValueCallback}\n icon={<Locker />}\n onBlur={onBlur}\n data-testid=\"passwordInput\"\n />\n </Field>\n <div\n data-testid=\"toggle-password-icon\"\n className={`auth-password-field__eye-icon auth-password-field__eye-icon--${\n showPassword ? 'show' : 'hide'\n }`}\n onClick={toggleShowPassword}\n >\n {!showPassword ? <EyeClose /> : <Eye />}\n </div>\n {children}\n </div>\n );\n};\n"],"names":["SvgLocker","props","React","SvgEye","SvgEyeClose","PasswordField","initialPassword","required","isError","children","name","className","setPasswordValueCallback","onBlur","translations","useText","requiredFieldError","showPassword","setShowPassword","useState","toggleShowPassword","useCallback","prevShowPassword","errorMessage","length","_jsxs","classes","_jsx","Field","error","Input","type","placeholder","floatingLabel","value","onValue","icon","Locker","onClick","Eye","EyeClose"],"mappings":"mWACA,MAAMA,EAAaC,GAA0BC,EAAM,cAAc,MAAO,CAAE,MAAO,GAAI,OAAQ,GAAI,QAAS,YAAa,KAAM,OAAQ,MAAO,6BAA8B,GAAGD,GAAyBC,EAAM,cAAc,IAAK,CAAE,SAAU,wBAA0B,EAAkBA,EAAM,cAAc,OAAQ,CAAE,aAAc,qBAAsB,EAAG,gJAAiJ,OAAQ,eAAgB,cAAe,QAAS,eAAgB,OAAS,CAAA,EAAmBA,EAAM,cAAc,OAAQ,CAAE,aAAc,qBAAsB,EAAG,wEAAyE,OAAQ,eAAgB,cAAe,QAAS,eAAgB,OAAS,CAAA,CAAC,EAAmBA,EAAM,cAAc,OAAQ,KAAsBA,EAAM,cAAc,WAAY,CAAE,GAAI,kBAAoB,EAAkBA,EAAM,cAAc,OAAQ,CAAE,MAAO,KAAM,OAAQ,KAAM,KAAM,QAAS,UAAW,sBAAsB,CAAE,CAAC,CAAC,CAAC,ECA1hCC,EAAUF,GAA0BC,EAAM,cAAc,MAAO,CAAE,MAAO,GAAI,OAAQ,GAAI,QAAS,YAAa,KAAM,OAAQ,MAAO,6BAA8B,GAAGD,CAAO,EAAkBC,EAAM,cAAc,OAAQ,CAAE,EAAG,wjBAAyjB,OAAQ,UAAW,YAAa,IAAK,cAAe,QAAS,eAAgB,OAAO,CAAE,CAAC,ECA92BE,EAAeH,GAA0BC,EAAM,cAAc,MAAO,CAAE,MAAO,GAAI,OAAQ,GAAI,QAAS,YAAa,KAAM,OAAQ,MAAO,6BAA8B,GAAGD,CAAO,EAAkBC,EAAM,cAAc,OAAQ,CAAE,EAAG,8lBAA+lB,OAAQ,UAAW,YAAa,IAAK,cAAe,QAAS,eAAgB,OAAO,CAAE,CAAC,ECqBl5BG,EAAuDA,CAAC,CACnEC,gBAAAA,EAAkB,GAClBC,SAAAA,EACAC,QAAAA,EACAC,SAAAA,EACAC,KAAAA,EACAC,UAAAA,EACAC,yBAAAA,EACAC,OAAAA,CACF,IAAM,CACJ,MAAMC,EAAeC,EAAQ,CAC3BC,mBAAoB,kCAAA,CACrB,EACK,CAACC,EAAcC,CAAe,EAAIC,EAAS,EAAK,EAEhDC,EAAqBC,EAAY,IAAM,CAC1BC,EAAAA,GAAqB,CAACA,CAAgB,CACzD,EAAG,CAAE,CAAA,EASCC,EANAf,GAAW,CAACF,EAAgBkB,OACvBV,EAAaE,mBAEf,GAMT,OACES,EAAA,MAAA,CAAKd,UAAWe,EAAQ,CAAC,sBAAuBf,EAH/BH,EAAU,6BAA+B,EAGW,CAAC,EAAEC,SAAA,CACtEkB,EAACC,EAAK,CAACC,MAAON,EAAad,SACzBkB,EAACG,EAAK,CACJpB,KAAMA,GAAQ,WACdqB,KAAOd,EAA4B,OAAb,WACtBe,YAAa,WACbC,cAAe,WACf,aAAY,WACZ,gBAAe,GACf1B,SAAUA,GAAY,GACtB2B,MAAO5B,EACP6B,QAASvB,EACTwB,KAAMT,EAACU,IAAQ,EACfxB,OAAAA,EACA,cAAY,eAAA,CACb,CAAA,CACI,EACPc,EAAA,MAAA,CACE,cAAY,uBACZhB,UAAW,gEACTM,EAAe,OAAS,MAAM,GAEhCqB,QAASlB,EAAmBX,SAE1BQ,EAA8BU,EAACY,EAAK,EAAA,EAArBZ,EAACa,EAAQ,CAAA,CAAE,CACzB,CAAA,EACJ/B,CAAQ,CAAA,CACN,CAET","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResetPasswordForm.js","sources":["../../src/hooks/components/useResetPasswordForm.tsx","../../src/components/ResetPasswordForm/ResetPasswordForm.tsx"],"sourcesContent":["import { requestPasswordResetEmail } from '@/auth/api';\nimport { getFormValues } from '@/auth/lib/getFormValues';\nimport { useCallback, useState } from 'preact/hooks';\nimport { UseResetPasswordFormProps } from '@/auth/types';\nimport { useText } from '@adobe/elsie/i18n';\nimport { checkIsFunction } from '@/auth/lib/checkIsFunction';\n\nexport const useResetPasswordForm = ({\n routeSignIn,\n onErrorCallback,\n setActiveComponent,\n handleSetInLineAlertProps,\n}: UseResetPasswordFormProps) => {\n const translations = useText({\n successPasswordResetEmailNotification:\n 'Auth.Notification.successPasswordResetEmailNotification',\n });\n const [isLoading, setIsLoading] = useState(false);\n\n const submitResetPassword = useCallback(\n async (event: any): Promise<void> => {\n event.preventDefault();\n setIsLoading(true);\n\n const formValues = getFormValues(event.target);\n\n if (formValues && formValues.email) {\n const requestPasswordResetEmailResponse =\n await requestPasswordResetEmail(formValues.email);\n\n if (requestPasswordResetEmailResponse.success) {\n handleSetInLineAlertProps?.({\n type: 'success',\n text: translations.successPasswordResetEmailNotification.replace(\n '{email}',\n formValues.email\n ),\n });\n } else {\n onErrorCallback?.(requestPasswordResetEmailResponse);\n\n handleSetInLineAlertProps?.({\n type: 'error',\n text: requestPasswordResetEmailResponse.message,\n });\n }\n }\n\n setIsLoading(false);\n },\n [\n handleSetInLineAlertProps,\n onErrorCallback,\n translations.successPasswordResetEmailNotification,\n ]\n );\n\n const redirectToSignInPage = useCallback(() => {\n if (checkIsFunction(setActiveComponent)) {\n setActiveComponent('signInForm');\n\n return;\n }\n\n if (checkIsFunction(routeSignIn)) {\n window.location.href = routeSignIn();\n }\n }, [setActiveComponent, routeSignIn]);\n\n return {\n isLoading,\n submitResetPassword,\n redirectToSignInPage,\n };\n};\n","import { FunctionComponent } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe/elsie/lib';\nimport '@/auth/components/ResetPasswordForm/ResetPasswordForm.css';\nimport { useResetPasswordForm } from '@/auth/hooks/components/useResetPasswordForm';\nimport { ResetPasswordFormProps } from '@/auth/types';\nimport { ChevronDown as ChevronLeft } from '@adobe/elsie/icons';\nimport { Button, Form, Title } from '@/auth/components/UI';\nimport { useInLineAlert } from '@/auth/hooks/useInLineAlert';\nimport { InLineAlert } from '@adobe/elsie/components';\nimport { useText } from '@adobe/elsie/i18n';\nimport { simplifyTransformAttributesForm } from '@/auth/lib/simplifyTransformAttributesForm';\nimport { DEFAULT__RESET_PASSWORD_EMAIL_FIELD } from '@/auth/configs/defaultCreateUserConfigs';\n\nexport const ResetPasswordForm: FunctionComponent<\n ResetPasswordFormProps & HTMLAttributes<HTMLDivElement>\n> = ({\n formSize = 'default',\n routeSignIn,\n setActiveComponent,\n onErrorCallback,\n ...props\n}) => {\n const translations = useText({\n title: 'Auth.ResetPasswordForm.title',\n buttonPrimary: 'Auth.ResetPasswordForm.buttonPrimary',\n buttonSecondary: 'Auth.ResetPasswordForm.buttonSecondary',\n });\n\n const { inLineAlertProps, handleSetInLineAlertProps } = useInLineAlert();\n\n const { isLoading, submitResetPassword, redirectToSignInPage } =\n useResetPasswordForm({\n routeSignIn,\n setActiveComponent,\n onErrorCallback,\n handleSetInLineAlertProps,\n });\n\n return (\n <div\n {...props}\n className={classes(['auth-resetPasswordForm', formSize])}\n data-testid=\"resetPasswordForm\"\n >\n <Title\n text={translations.title}\n bottomLine={false}\n className=\"auth-resetPasswordForm__title\"\n />\n {inLineAlertProps.text ? (\n <InLineAlert\n className=\"auth-resetPasswordForm__notification\"\n type={inLineAlertProps.type}\n /* \n TODO - Remove when SDK will be updated\n https://jira.corp.adobe.com/browse/USF-1240\n */\n // @ts-ignore\n variant=\"secondary\"\n heading={inLineAlertProps.text}\n icon={inLineAlertProps.icon}\n />\n ) : null}\n <Form\n name=\"resetPassword_form\"\n className=\"auth-resetPasswordForm__form\"\n submitCallback={submitResetPassword}\n isLoading={isLoading}\n fieldsConfig={simplifyTransformAttributesForm(\n DEFAULT__RESET_PASSWORD_EMAIL_FIELD\n )}\n >\n <div className=\"auth-resetPasswordForm__buttons\">\n <Button\n type=\"button\"\n variant=\"tertiary\"\n style={{ padding: '0' }}\n icon={<ChevronLeft style={{ transform: 'rotate(90deg)' }} />}\n buttonText={translations.buttonSecondary}\n enableLoader={false}\n onClick={redirectToSignInPage}\n />\n <Button\n type=\"submit\"\n buttonText={translations.buttonPrimary}\n variant=\"primary\"\n enableLoader={isLoading}\n />\n </div>\n </Form>\n </div>\n );\n};\n"],"names":["useResetPasswordForm","routeSignIn","onErrorCallback","setActiveComponent","handleSetInLineAlertProps","translations","useText","successPasswordResetEmailNotification","isLoading","setIsLoading","useState","submitResetPassword","useCallback","event","preventDefault","formValues","getFormValues","target","email","requestPasswordResetEmailResponse","requestPasswordResetEmail","success","type","text","replace","message","redirectToSignInPage","checkIsFunction","location","href","ResetPasswordForm","formSize","props","title","buttonPrimary","buttonSecondary","inLineAlertProps","useInLineAlert","_jsxs","className","classes","children","_jsx","Title","bottomLine","InLineAlert","variant","heading","icon","Form","name","submitCallback","fieldsConfig","simplifyTransformAttributesForm","DEFAULT__RESET_PASSWORD_EMAIL_FIELD","Button","style","padding","ChevronLeft","transform","buttonText","enableLoader","onClick"],"mappings":"ghBAOO,MAAMA,EAAuBA,CAAC,CACnCC,YAAAA,EACAC,gBAAAA,EACAC,mBAAAA,EACAC,0BAAAA,CACyB,IAAM,CAC/B,MAAMC,EAAeC,EAAQ,CAC3BC,sCACE,yDAAA,CACH,EACK,CAACC,EAAWC,CAAY,EAAIC,EAAS,EAAK,EAE1CC,EAAsBC,EAC1B,MAAOC,GAA8B,CACnCA,EAAMC,eAAe,EACrBL,EAAa,EAAI,EAEXM,MAAAA,EAAaC,EAAcH,EAAMI,MAAM,EAEzCF,GAAAA,GAAcA,EAAWG,MAAO,CAClC,MAAMC,EACJ,MAAMC,EAA0BL,EAAWG,KAAK,EAE9CC,EAAkCE,QACRjB,GAAA,MAAAA,EAAA,CAC1BkB,KAAM,UACNC,KAAMlB,EAAaE,sCAAsCiB,QACvD,UAC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BACLX,UAAU,+BACVY,eAAgBxC,EAChBH,UAAAA,EACA4C,aAAcC,EACZC,CACF,EAAEb,SAEFH,EAAA,MAAA,CAAKC,UAAU,kCAAiCE,SAAA,CAC9CC,EAACa,EAAM,CACLjC,KAAK,SACLwB,QAAQ,WACRU,MAAO,CAAEC,QAAS,GAAI,EACtBT,KAAMN,EAACgB,EAAW,CAACF,MAAO,CAAEG,UAAW,eAAgB,CAAA,CAAI,EAC3DC,WAAYvD,EAAa8B,gBACzB0B,aAAc,GACdC,QAASpC,CAAAA,CACV,EACDgB,EAACa,EAAM,CACLjC,KAAK,SACLsC,WAAYvD,EAAa6B,cACzBY,QAAQ,UACRe,aAAcrD,CAAAA,CACf,CAAC,CAAA,CACC,CAAA,CACD,CAAC,CAAA,CACJ,CAET"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SignInForm.js","sources":["../../src/hooks/components/useSignInForm.tsx","../../src/lib/clearUrlAndReplace.ts","../../src/hooks/useEmailConfirmation.tsx","../../src/components/SignInForm/SignInForm.tsx"],"sourcesContent":["import { getFormValues } from '@/auth/lib/getFormValues';\nimport { useCallback, useState, useMemo, useEffect } from 'preact/hooks';\nimport { getCustomerToken, resendConfirmationEmail } from '@/auth/api';\nimport { useSignInFormProps } from '@/auth/types';\nimport { DEFAULT__SIGN_IN_EMAIL_FIELD } from '@/auth/configs/defaultCreateUserConfigs';\nimport { simplifyTransformAttributesForm } from '@/auth/lib/simplifyTransformAttributesForm';\nimport { checkIsFunction } from '@/auth/lib/checkIsFunction';\n\nexport const useSignInForm = ({\n emailConfirmationStatusMessage,\n translations,\n initialEmailValue,\n routeSignUp,\n routeForgotPassword,\n routeRedirectOnSignIn,\n onErrorCallback,\n setActiveComponent,\n onSuccessCallback,\n onSignUpLinkClick,\n handleSetInLineAlertProps,\n routeRedirectOnEmailConfirmationClose,\n}: useSignInFormProps) => {\n const [userEmail, setUserEmail] = useState('');\n const [showEmailConfirmationForm, setShowEmailConfirmationForm] =\n useState(false);\n const [signInPasswordValue, setSignInPasswordValue] = useState('');\n const [passwordError, setPasswordError] = useState(false);\n const [isSuccessful, setIsSuccessful] = useState({\n userName: '',\n status: false,\n });\n const [isLoading, setIsLoading] = useState(false);\n\n const actionsShowNotificationForm = useCallback(\n async (email: string) => {\n await resendConfirmationEmail(email);\n\n setShowEmailConfirmationForm(true);\n handleSetInLineAlertProps({});\n },\n [handleSetInLineAlertProps]\n );\n\n useEffect(() => {\n if (emailConfirmationStatusMessage?.text) {\n handleSetInLineAlertProps({\n text: emailConfirmationStatusMessage.text,\n type: emailConfirmationStatusMessage.status\n ? emailConfirmationStatusMessage.status\n : undefined,\n });\n }\n }, [emailConfirmationStatusMessage, handleSetInLineAlertProps]);\n\n const emailResendInformationText = useCallback(\n (email: string) => {\n if (!translations) return '';\n\n return (\n <span className=\"auth-signInForm__resend-email-notification\">\n {translations.resendEmailInformationText}{' '}\n <button onClick={() => actionsShowNotificationForm(email)}>\n {translations.resendEmailButtonText}\n </button>{' '}\n {translations.resendEmailAdditionalText}\n </span>\n );\n },\n [actionsShowNotificationForm, translations]\n );\n\n const submitLogInUser = useCallback(\n async (event: any): Promise<void> => {\n handleSetInLineAlertProps({});\n\n setIsLoading(true);\n\n const formValues = getFormValues(event.target);\n\n if (!formValues.password) {\n setPasswordError(true);\n setIsLoading(false);\n }\n\n if (formValues?.email && formValues?.password) {\n const { email, password } = formValues;\n\n const loginResponse = await getCustomerToken({\n email,\n password,\n handleSetInLineAlertProps,\n onErrorCallback,\n translations,\n });\n\n if (loginResponse?.errorMessage?.length) {\n setUserEmail(email);\n\n /**\n * TODO: Use error code when available, instead of comparing to response text\n *\n * This implementation is a temporary solution.\n * The backend functionality is planned to be improved to obtain accurate data that will help correctly identify error types and handle them.\n */\n const errorMessage: any = loginResponse.errorMessage.includes(\n \"This account isn't confirmed. Verify and try again.\"\n )\n ? emailResendInformationText(email)\n : loginResponse.errorMessage;\n\n handleSetInLineAlertProps({\n text: errorMessage,\n type: 'error',\n });\n\n setSignInPasswordValue('');\n }\n\n if (loginResponse?.userName) {\n event.target.reset();\n\n if (checkIsFunction(routeRedirectOnSignIn)) {\n window.location.href = routeRedirectOnSignIn();\n } else {\n onSuccessCallback?.({\n userName: loginResponse?.userName,\n status: true,\n });\n\n setIsSuccessful({\n userName: loginResponse?.userName,\n status: true,\n });\n }\n }\n\n setPasswordError(false);\n }\n\n setIsLoading(false);\n setSignInPasswordValue('');\n },\n [\n emailResendInformationText,\n handleSetInLineAlertProps,\n translations,\n onErrorCallback,\n routeRedirectOnSignIn,\n onSuccessCallback,\n ]\n );\n\n const forgotPasswordCallback = useCallback(() => {\n if (checkIsFunction(setActiveComponent)) {\n setActiveComponent('resetPasswordForm');\n\n return;\n }\n\n if (checkIsFunction(routeForgotPassword)) {\n window.location.href = routeForgotPassword();\n }\n }, [routeForgotPassword, setActiveComponent]);\n\n const onSignUpLinkClickCallback = useCallback(() => {\n if (checkIsFunction(onSignUpLinkClick)) {\n onSignUpLinkClick();\n }\n\n if (checkIsFunction(setActiveComponent)) {\n setActiveComponent('signUpForm');\n\n return;\n }\n\n if (checkIsFunction(routeSignUp)) {\n window.location.href = routeSignUp();\n }\n }, [onSignUpLinkClick, routeSignUp, setActiveComponent]);\n\n const defaultEnhancedEmailFields: any = useMemo(() => {\n const fieldsList = simplifyTransformAttributesForm(\n DEFAULT__SIGN_IN_EMAIL_FIELD\n );\n\n if (!initialEmailValue?.length) return fieldsList;\n\n return fieldsList?.map((el: any) => ({\n ...el,\n defaultValue: initialEmailValue,\n }));\n }, [initialEmailValue]);\n\n const handledOnPrimaryButtonClick = useCallback(() => {\n handleSetInLineAlertProps({});\n\n if (checkIsFunction(routeRedirectOnEmailConfirmationClose)) {\n window.location.href = routeRedirectOnEmailConfirmationClose();\n } else {\n setShowEmailConfirmationForm(false);\n }\n }, [handleSetInLineAlertProps, routeRedirectOnEmailConfirmationClose]);\n\n return {\n userEmail,\n defaultEnhancedEmailFields,\n passwordError,\n isSuccessful,\n isLoading,\n signInPasswordValue,\n showEmailConfirmationForm,\n setShowEmailConfirmationForm,\n setSignInPasswordValue,\n submitLogInUser,\n forgotPasswordCallback,\n onSignUpLinkClickCallback,\n handledOnPrimaryButtonClick,\n };\n};\n","export const clearUrlAndReplace = () => {\n let url = new URL(window.location.href);\n\n let email = url.searchParams.get('email');\n let token = url.searchParams.get('key');\n\n if (email && token) {\n url.searchParams.delete('email');\n url.searchParams.delete('key');\n\n window.history.replaceState({}, document.title, url.toString());\n }\n};\n","import { useEffect, useState } from 'preact/hooks';\nimport { clearUrlAndReplace } from '../lib/clearUrlAndReplace';\nimport { confirmEmail } from '../api';\nimport { useText } from '@adobe/elsie/i18n';\n\ninterface useEmailConfirmationProps {\n enableEmailConfirmation: boolean;\n}\n\n// The client receives a confirmation of the validation via email. When the client follows the provided link, they are directed to the login page with three query parameters. If these parameters are present, we make a request to validate the status. This request returns a response that we display to the user.\nexport const useEmailConfirmation = ({\n enableEmailConfirmation,\n}: useEmailConfirmationProps) => {\n const translations = useText({\n accountConfirmMessage: 'Auth.EmailConfirmationForm.accountConfirmMessage',\n accountConfirmationEmailSuccessMessage:\n 'Auth.EmailConfirmationForm.accountConfirmationEmailSuccessMessage',\n });\n const [emailConfirmationStatusMessage, setEmailConfirmationStatusMessage] =\n useState<{\n text: string;\n status: '' | 'success' | 'error';\n }>({\n text: '',\n status: '',\n });\n\n useEffect(() => {\n if (enableEmailConfirmation) {\n const { search } = window.location;\n\n if (search.includes('email=') && search.includes('key=')) {\n const validateEmailStatus = async () => {\n const params = new URLSearchParams(search);\n\n const response = await confirmEmail({\n customerEmail: params.get('email') as string,\n customerConfirmationKey: params.get('key') as string,\n });\n\n if (!response) return null;\n\n if (response?.errors?.length) {\n setEmailConfirmationStatusMessage({\n text: response?.errors[0].message,\n status: 'error',\n });\n } else {\n setEmailConfirmationStatusMessage({\n text: response.data.confirmEmail.customer.email\n ? translations.accountConfirmationEmailSuccessMessage.replace(\n '{email}',\n response?.data?.confirmEmail.customer?.email\n )\n : translations.accountConfirmMessage,\n status: 'success',\n });\n\n clearUrlAndReplace();\n }\n };\n\n validateEmailStatus();\n }\n }\n }, [enableEmailConfirmation, translations]);\n\n return { emailConfirmationStatusMessage };\n};\n","import { FunctionComponent } from 'preact';\nimport { classes } from '@adobe/elsie/lib';\nimport '@/auth/components/SignInForm/SignInForm.css';\nimport { useSignInForm } from '@/auth/hooks/components/useSignInForm';\nimport { SignInFormProps } from '@/auth/types';\nimport { useEmailConfirmation } from '@/auth/hooks/useEmailConfirmation';\nimport EmailConfirmationForm from '../EmailConfirmationForm';\nimport { Button, Form, PasswordField, Title } from '@/auth/components/UI';\nimport { useInLineAlert } from '@/auth/hooks/useInLineAlert';\nimport { InLineAlert } from '@adobe/elsie/components';\nimport { useText } from '@adobe/elsie/i18n';\n\nexport const SignInForm: FunctionComponent<SignInFormProps> = ({\n formSize = 'default',\n initialEmailValue = '',\n renderSignUpLink = false,\n enableEmailConfirmation = false,\n hideCloseBtnOnEmailConfirmation = false,\n routeRedirectOnEmailConfirmationClose,\n routeRedirectOnSignIn,\n routeForgotPassword,\n routeSignUp,\n onSuccessCallback,\n setActiveComponent,\n onErrorCallback,\n onSignUpLinkClick,\n successNotificationForm,\n}) => {\n const translations = useText({\n title: 'Auth.SignInForm.title',\n buttonPrimary: 'Auth.SignInForm.buttonPrimary',\n buttonSecondary: 'Auth.SignInForm.buttonSecondary',\n buttonTertiary: 'Auth.SignInForm.buttonTertiary',\n resendEmailInformationText:\n 'Auth.Notification.resendEmailNotification.informationText',\n resendEmailButtonText:\n 'Auth.Notification.resendEmailNotification.buttonText',\n resendEmailAdditionalText:\n 'Auth.Notification.resendEmailNotification.additionalText',\n customerTokenErrorMessage: 'Auth.Api.customerTokenErrorMessage',\n });\n\n const { emailConfirmationStatusMessage } = useEmailConfirmation({\n enableEmailConfirmation,\n });\n\n const { inLineAlertProps, handleSetInLineAlertProps } = useInLineAlert();\n\n const {\n userEmail,\n defaultEnhancedEmailFields,\n passwordError,\n isSuccessful,\n isLoading,\n signInPasswordValue,\n showEmailConfirmationForm,\n setSignInPasswordValue,\n submitLogInUser,\n forgotPasswordCallback,\n onSignUpLinkClickCallback,\n handledOnPrimaryButtonClick,\n } = useSignInForm({\n translations,\n emailConfirmationStatusMessage,\n initialEmailValue,\n routeSignUp,\n routeForgotPassword,\n routeRedirectOnSignIn,\n setActiveComponent,\n onErrorCallback,\n onSuccessCallback,\n onSignUpLinkClick,\n handleSetInLineAlertProps,\n routeRedirectOnEmailConfirmationClose,\n });\n\n if (successNotificationForm && isSuccessful.status) {\n return successNotificationForm(isSuccessful.userName);\n }\n\n if (showEmailConfirmationForm) {\n return (\n <EmailConfirmationForm\n formSize={formSize}\n userEmail={userEmail}\n inLineAlertProps={inLineAlertProps}\n hideCloseBtnOnEmailConfirmation={hideCloseBtnOnEmailConfirmation}\n handleSetInLineAlertProps={handleSetInLineAlertProps}\n onPrimaryButtonClick={handledOnPrimaryButtonClick}\n />\n );\n }\n\n return (\n <div\n className={classes(['auth-signInForm', formSize])}\n data-testid=\"signInForm\"\n >\n <Title\n text={translations.title}\n bottomLine={false}\n className=\"auth-signInForm__title\"\n />\n {inLineAlertProps.text ? (\n <InLineAlert\n data-testid=\"authInLineAlert\"\n className=\"auth-signInForm__notification\"\n type={inLineAlertProps.type}\n /* \n TODO - Remove when SDK will be updated\n https://jira.corp.adobe.com/browse/USF-1240\n */\n // @ts-ignore\n variant=\"secondary\"\n heading={inLineAlertProps.text}\n icon={inLineAlertProps.icon}\n />\n ) : null}\n <Form\n name=\"signIn_form\"\n className=\"auth-signInForm__form\"\n submitCallback={submitLogInUser}\n isLoading={isLoading}\n fieldsConfig={defaultEnhancedEmailFields}\n >\n <PasswordField\n className=\"auth-signInForm__form__password\"\n isError={passwordError}\n initialPassword={signInPasswordValue}\n setPasswordValueCallback={setSignInPasswordValue}\n />\n <div className=\"auth-signInForm__form__buttons\">\n <div className=\"auth-signInForm__form__buttons--combine\">\n <Button\n type=\"button\"\n variant=\"tertiary\"\n style={{ padding: 0 }}\n buttonText={translations.buttonTertiary}\n className=\"auth-signInForm__button auth-signInForm__button--forgot\"\n enableLoader={false}\n onClick={forgotPasswordCallback}\n data-testid=\"switchToSignUp\"\n />\n {renderSignUpLink ? <span /> : null}\n {renderSignUpLink ? (\n <Button\n type=\"button\"\n variant=\"tertiary\"\n style={{ padding: 0 }}\n buttonText={translations.buttonSecondary}\n className=\"auth-signInForm__button auth-signInForm__button--signup\"\n enableLoader={false}\n onClick={onSignUpLinkClickCallback}\n />\n ) : null}\n </div>\n <Button\n type=\"submit\"\n buttonText={translations.buttonPrimary}\n variant=\"primary\"\n className=\"auth-signInForm__button auth-signInForm__button--submit\"\n enableLoader={isLoading}\n />\n </div>\n </Form>\n </div>\n );\n};\n"],"names":["useSignInForm","emailConfirmationStatusMessage","translations","initialEmailValue","routeSignUp","routeForgotPassword","routeRedirectOnSignIn","onErrorCallback","setActiveComponent","onSuccessCallback","onSignUpLinkClick","handleSetInLineAlertProps","routeRedirectOnEmailConfirmationClose","userEmail","setUserEmail","useState","showEmailConfirmationForm","setShowEmailConfirmationForm","signInPasswordValue","setSignInPasswordValue","passwordError","setPasswordError","isSuccessful","setIsSuccessful","userName","status","isLoading","setIsLoading","actionsShowNotificationForm","useCallback","email","resendConfirmationEmail","useEffect","text","type","undefined","emailResendInformationText","_jsxs","className","children","resendEmailInformationText","_jsx","onClick","resendEmailButtonText","resendEmailAdditionalText","submitLogInUser","event","formValues","getFormValues","target","password","loginResponse","getCustomerToken","errorMessage","length","includes","reset","checkIsFunction","location","href","forgotPasswordCallback","onSignUpLinkClickCallback","defaultEnhancedEmailFields","useMemo","fieldsList","simplifyTransformAttributesForm","DEFAULT__SIGN_IN_EMAIL_FIELD","map","el","defaultValue","handledOnPrimaryButtonClick","clearUrlAndReplace","url","URL","window","searchParams","get","token","delete","history","replaceState","document","title","toString","useEmailConfirmation","enableEmailConfirmation","useText","accountConfirmMessage","accountConfirmationEmailSuccessMessage","setEmailConfirmationStatusMessage","search","params","URLSearchParams","response","confirmEmail","customerEmail","customerConfirmationKey","errors","message","data","customer","replace","SignInForm","formSize","renderSignUpLink","hideCloseBtnOnEmailConfirmation","successNotificationForm","buttonPrimary","buttonSecondary","buttonTertiary","customerTokenErrorMessage","inLineAlertProps","useInLineAlert","EmailConfirmationForm","onPrimaryButtonClick","classes","Title","bottomLine","InLineAlert","variant","heading","icon","Form","name","submitCallback","fieldsConfig","PasswordField","isError","initialPassword","setPasswordValueCallback","Button","style","padding","buttonText","enableLoader"],"mappings":"ktBAQO,MAAMA,GAAgBA,CAAC,CAC5BC,+BAAAA,EACAC,aAAAA,EACAC,kBAAAA,EACAC,YAAAA,EACAC,oBAAAA,EACAC,sBAAAA,EACAC,gBAAAA,EACAC,mBAAAA,EACAC,kBAAAA,EACAC,kBAAAA,EACAC,0BAAAA,EACAC,sCAAAA,CACkB,IAAM,CACxB,KAAM,CAACC,EAAWC,CAAY,EAAIC,EAAS,EAAE,EACvC,CAACC,EAA2BC,CAA4B,EAC5DF,EAAS,EAAK,EACV,CAACG,EAAqBC,CAAsB,EAAIJ,EAAS,EAAE,EAC3D,CAACK,EAAeC,CAAgB,EAAIN,EAAS,EAAK,EAClD,CAACO,EAAcC,CAAe,EAAIR,EAAS,CAC/CS,SAAU,GACVC,OAAQ,EAAA,CACT,EACK,CAACC,EAAWC,CAAY,EAAIZ,EAAS,EAAK,EAE1Ca,EAA8BC,EAClC,MAAOC,GAAkB,CACvB,MAAMC,EAAwBD,CAAK,EAEnCb,EAA6B,EAAI,EACjCN,EAA0B,CAAE,CAAA,CAAA,EAE9B,CAACA,CAAyB,CAC5B,EAEAqB,EAAU,IAAM,CACV/B,GAAAA,MAAAA,EAAgCgC,MACRtB,EAAA,CACxBsB,KAAMhC,EAA+BgC,KACrCC,KAAMjC,EAA+BwB,OACjCxB,EAA+BwB,OAC/BU,MAAAA,CACL,CACH,EACC,CAAClC,EAAgCU,CAAyB,CAAC,EAExDyB,MAAAA,EAA6BP,EAChCC,GAC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