@dropins/storefront-auth 2.1.0 → 2.1.1-beta1
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/chunks/Button.js.map +1 -1
- package/chunks/Button2.js.map +1 -1
- package/chunks/ResetPasswordForm.js.map +1 -1
- package/chunks/SignInForm.js.map +1 -1
- package/chunks/SignUpForm.js.map +1 -1
- package/chunks/SkeletonLoader.js.map +1 -1
- package/chunks/acdl.js.map +1 -1
- package/chunks/confirmEmail.js.map +1 -1
- package/chunks/createCustomerAddress.js.map +1 -1
- package/chunks/focusOnEmptyPasswordField.js.map +1 -1
- package/chunks/getCustomerToken.js +2 -2
- package/chunks/getCustomerToken.js.map +1 -1
- package/chunks/initialize.js.map +1 -1
- package/chunks/network-error.js.map +1 -1
- package/chunks/requestPasswordResetEmail.js.map +1 -1
- package/chunks/resendConfirmationEmail.js.map +1 -1
- package/chunks/resetPassword.js.map +1 -1
- package/chunks/revokeCustomerToken.js.map +1 -1
- package/chunks/setReCaptchaToken.js.map +1 -1
- package/chunks/simplifyTransformAttributesForm.js.map +1 -1
- package/chunks/transform-attributes-form.js.map +1 -1
- package/chunks/usePasswordValidationMessage.js.map +1 -1
- package/chunks/verifyToken.js.map +1 -1
- package/containers/AuthCombine.js.map +1 -1
- package/containers/ResetPassword.js.map +1 -1
- package/containers/SignIn.js.map +1 -1
- package/containers/SignUp.js.map +1 -1
- package/containers/SuccessNotification.js.map +1 -1
- package/containers/UpdatePassword.js.map +1 -1
- package/fragments.js.map +1 -1
- package/package.json +1 -1
- package/render.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestPasswordResetEmail.js","sources":["/@dropins/storefront-auth/src/data/transforms/transform-password-reset-email.ts","/@dropins/storefront-auth/src/api/requestPasswordResetEmail/graphql/requestPasswordResetEmail.graphql.ts","/@dropins/storefront-auth/src/api/requestPasswordResetEmail/requestPasswordResetEmail.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { PasswordResetEmailResponse } from '@/auth/types';\nimport { PasswordResetEmailModel } from '../models';\n\nexport const transformPasswordResetEmail = (\n response: PasswordResetEmailResponse\n): PasswordResetEmailModel => {\n let message: string = '';\n\n if (response?.errors?.length)\n message = response?.errors[0]?.message as unknown as string;\n\n return {\n message,\n success: Boolean(response?.data?.requestPasswordResetEmail),\n };\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const REQUEST_PASSWORD_RESET_EMAIL = /* GraphQL */ `\n mutation REQUEST_PASSWORD_RESET_EMAIL($email: String!) {\n requestPasswordResetEmail(email: $email)\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { handleNetworkError } from '@/auth/lib/network-error';\nimport { fetchGraphQl } from '../fetch-graphql';\nimport { REQUEST_PASSWORD_RESET_EMAIL } from './graphql/requestPasswordResetEmail.graphql';\nimport { transformPasswordResetEmail } from '@/auth/data/transforms';\nimport { PasswordResetEmailModel } from '@/auth/data/models';\nimport { setReCaptchaToken } from '@/auth/lib/setReCaptchaToken';\n\nexport const requestPasswordResetEmail = async (\n email: string\n): Promise<PasswordResetEmailModel> => {\n await setReCaptchaToken();\n\n return await fetchGraphQl(REQUEST_PASSWORD_RESET_EMAIL, {\n method: 'POST',\n variables: { email },\n })\n .then((response) => {\n return transformPasswordResetEmail(response);\n })\n .catch(handleNetworkError);\n};\n"],"names":["transformPasswordResetEmail","response","message","_a","_b","_c","REQUEST_PASSWORD_RESET_EMAIL","requestPasswordResetEmail","email","setReCaptchaToken","fetchGraphQl","handleNetworkError"],"mappings":"
|
|
1
|
+
{"version":3,"file":"requestPasswordResetEmail.js","sources":["/@dropins/storefront-auth/src/data/transforms/transform-password-reset-email.ts","/@dropins/storefront-auth/src/api/requestPasswordResetEmail/graphql/requestPasswordResetEmail.graphql.ts","/@dropins/storefront-auth/src/api/requestPasswordResetEmail/requestPasswordResetEmail.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { PasswordResetEmailResponse } from '@/auth/types';\nimport { PasswordResetEmailModel } from '../models';\n\nexport const transformPasswordResetEmail = (\n response: PasswordResetEmailResponse\n): PasswordResetEmailModel => {\n let message: string = '';\n\n if (response?.errors?.length)\n message = response?.errors[0]?.message as unknown as string;\n\n return {\n message,\n success: Boolean(response?.data?.requestPasswordResetEmail),\n };\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const REQUEST_PASSWORD_RESET_EMAIL = /* GraphQL */ `\n mutation REQUEST_PASSWORD_RESET_EMAIL($email: String!) {\n requestPasswordResetEmail(email: $email)\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { handleNetworkError } from '@/auth/lib/network-error';\nimport { fetchGraphQl } from '../fetch-graphql';\nimport { REQUEST_PASSWORD_RESET_EMAIL } from './graphql/requestPasswordResetEmail.graphql';\nimport { transformPasswordResetEmail } from '@/auth/data/transforms';\nimport { PasswordResetEmailModel } from '@/auth/data/models';\nimport { setReCaptchaToken } from '@/auth/lib/setReCaptchaToken';\n\nexport const requestPasswordResetEmail = async (\n email: string\n): Promise<PasswordResetEmailModel> => {\n await setReCaptchaToken();\n\n return await fetchGraphQl(REQUEST_PASSWORD_RESET_EMAIL, {\n method: 'POST',\n variables: { email },\n })\n .then((response) => {\n return transformPasswordResetEmail(response);\n })\n .catch(handleNetworkError);\n};\n"],"names":["transformPasswordResetEmail","response","message","_a","_b","_c","REQUEST_PASSWORD_RESET_EMAIL","requestPasswordResetEmail","email","setReCaptchaToken","fetchGraphQl","handleNetworkError"],"mappings":"yFAoBO,MAAMA,EACXC,GAC4B,WAC5B,IAAIC,EAAkB,GAEtB,OAAIC,EAAAF,GAAA,YAAAA,EAAU,SAAV,MAAAE,EAAkB,SACpBD,GAAUE,EAAAH,GAAA,YAAAA,EAAU,OAAO,KAAjB,YAAAG,EAAqB,SAE1B,CACL,QAAAF,EACA,QAAS,IAAQG,EAAAJ,GAAA,YAAAA,EAAU,OAAV,MAAAI,EAAgB,0BAAyB,CAE9D,ECfaC,EAA6C;AAAA;AAAA;AAAA;AAAA,ECO7CC,EAA4B,MACvCC,IAEA,MAAMC,EAAA,EAEC,MAAMC,EAAaJ,EAA8B,CACtD,OAAQ,OACR,UAAW,CAAE,MAAAE,CAAA,CAAM,CACpB,EACE,KAAMP,GACED,EAA4BC,CAAQ,CAC5C,EACA,MAAMU,CAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resendConfirmationEmail.js","sources":["/@dropins/storefront-auth/src/api/resendConfirmationEmail/graphql/resendConfirmationEmail.graphql.ts","/@dropins/storefront-auth/src/api/resendConfirmationEmail/resendConfirmationEmail.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const RESEND_CONFIRMATION_EMAIL = /* GraphQL */ `\n mutation RESEND_CONFIRMATION_EMAIL($email: String!) {\n resendConfirmationEmail(email: $email)\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { fetchGraphQl } from '../fetch-graphql';\nimport { handleNetworkError } from '@/auth/lib/network-error';\nimport { RESEND_CONFIRMATION_EMAIL } from './graphql/resendConfirmationEmail.graphql';\nimport { resendConfirmationEmailResponse } from '@/auth/types';\n\nexport const resendConfirmationEmail = async (\n customerEmail: string\n): Promise<resendConfirmationEmailResponse> => {\n return await fetchGraphQl(RESEND_CONFIRMATION_EMAIL, {\n method: 'POST',\n variables: {\n email: customerEmail,\n },\n }).catch(handleNetworkError);\n};\n"],"names":["RESEND_CONFIRMATION_EMAIL","resendConfirmationEmail","customerEmail","fetchGraphQl","handleNetworkError"],"mappings":"
|
|
1
|
+
{"version":3,"file":"resendConfirmationEmail.js","sources":["/@dropins/storefront-auth/src/api/resendConfirmationEmail/graphql/resendConfirmationEmail.graphql.ts","/@dropins/storefront-auth/src/api/resendConfirmationEmail/resendConfirmationEmail.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const RESEND_CONFIRMATION_EMAIL = /* GraphQL */ `\n mutation RESEND_CONFIRMATION_EMAIL($email: String!) {\n resendConfirmationEmail(email: $email)\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { fetchGraphQl } from '../fetch-graphql';\nimport { handleNetworkError } from '@/auth/lib/network-error';\nimport { RESEND_CONFIRMATION_EMAIL } from './graphql/resendConfirmationEmail.graphql';\nimport { resendConfirmationEmailResponse } from '@/auth/types';\n\nexport const resendConfirmationEmail = async (\n customerEmail: string\n): Promise<resendConfirmationEmailResponse> => {\n return await fetchGraphQl(RESEND_CONFIRMATION_EMAIL, {\n method: 'POST',\n variables: {\n email: customerEmail,\n },\n }).catch(handleNetworkError);\n};\n"],"names":["RESEND_CONFIRMATION_EMAIL","resendConfirmationEmail","customerEmail","fetchGraphQl","handleNetworkError"],"mappings":"8CAiBO,MAAMA,EAA0C;AAAA;AAAA;AAAA;AAAA,ECK1CC,EAA0B,MACrCC,GAEO,MAAMC,EAAaH,EAA2B,CACnD,OAAQ,OACR,UAAW,CACT,MAAOE,CAAA,CACT,CACD,EAAE,MAAME,CAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resetPassword.js","sources":["/@dropins/storefront-auth/src/api/resetPassword/graphql/resetPassword.graphql.ts","/@dropins/storefront-auth/src/data/transforms/transform-reset-password.ts","/@dropins/storefront-auth/src/api/resetPassword/resetPassword.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const RESET_PASSWORD = /* GraphQL */ `\n mutation RESET_PASSWORD(\n $email: String!\n $resetPasswordToken: String!\n $newPassword: String!\n ) {\n resetPassword(\n email: $email\n resetPasswordToken: $resetPasswordToken\n newPassword: $newPassword\n )\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { ResetPasswordResponse } from '@/auth/types';\nimport { ResetPasswordModel } from '../models';\n\nexport const transformResetPassword = (\n response: ResetPasswordResponse\n): ResetPasswordModel => {\n let message: string = '';\n\n if (response?.errors?.length)\n message = response?.errors[0]?.message as unknown as string;\n\n return {\n message,\n success: Boolean(response?.data?.resetPassword),\n };\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { handleNetworkError } from '@/auth/lib/network-error';\nimport { fetchGraphQl } from '../fetch-graphql';\nimport { RESET_PASSWORD } from './graphql/resetPassword.graphql';\nimport { transformResetPassword } from '@/auth/data/transforms/transform-reset-password';\nimport { ResetPasswordModel } from '@/auth/data/models';\nimport { ResetPasswordResponse } from '@/auth/types';\nimport { setReCaptchaToken } from '@/auth/lib/setReCaptchaToken';\n\nexport const resetPassword = async (\n email: string,\n resetPasswordToken: string,\n newPassword: string\n): Promise<ResetPasswordModel> => {\n await setReCaptchaToken();\n\n return await fetchGraphQl(RESET_PASSWORD, {\n method: 'POST',\n variables: { email, resetPasswordToken, newPassword },\n })\n .then((response: ResetPasswordResponse) => {\n return transformResetPassword(response);\n })\n .catch(handleNetworkError);\n};\n"],"names":["RESET_PASSWORD","transformResetPassword","response","message","_a","_b","_c","resetPassword","email","resetPasswordToken","newPassword","setReCaptchaToken","fetchGraphQl","handleNetworkError"],"mappings":"
|
|
1
|
+
{"version":3,"file":"resetPassword.js","sources":["/@dropins/storefront-auth/src/api/resetPassword/graphql/resetPassword.graphql.ts","/@dropins/storefront-auth/src/data/transforms/transform-reset-password.ts","/@dropins/storefront-auth/src/api/resetPassword/resetPassword.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const RESET_PASSWORD = /* GraphQL */ `\n mutation RESET_PASSWORD(\n $email: String!\n $resetPasswordToken: String!\n $newPassword: String!\n ) {\n resetPassword(\n email: $email\n resetPasswordToken: $resetPasswordToken\n newPassword: $newPassword\n )\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { ResetPasswordResponse } from '@/auth/types';\nimport { ResetPasswordModel } from '../models';\n\nexport const transformResetPassword = (\n response: ResetPasswordResponse\n): ResetPasswordModel => {\n let message: string = '';\n\n if (response?.errors?.length)\n message = response?.errors[0]?.message as unknown as string;\n\n return {\n message,\n success: Boolean(response?.data?.resetPassword),\n };\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { handleNetworkError } from '@/auth/lib/network-error';\nimport { fetchGraphQl } from '../fetch-graphql';\nimport { RESET_PASSWORD } from './graphql/resetPassword.graphql';\nimport { transformResetPassword } from '@/auth/data/transforms/transform-reset-password';\nimport { ResetPasswordModel } from '@/auth/data/models';\nimport { ResetPasswordResponse } from '@/auth/types';\nimport { setReCaptchaToken } from '@/auth/lib/setReCaptchaToken';\n\nexport const resetPassword = async (\n email: string,\n resetPasswordToken: string,\n newPassword: string\n): Promise<ResetPasswordModel> => {\n await setReCaptchaToken();\n\n return await fetchGraphQl(RESET_PASSWORD, {\n method: 'POST',\n variables: { email, resetPasswordToken, newPassword },\n })\n .then((response: ResetPasswordResponse) => {\n return transformResetPassword(response);\n })\n .catch(handleNetworkError);\n};\n"],"names":["RESET_PASSWORD","transformResetPassword","response","message","_a","_b","_c","resetPassword","email","resetPasswordToken","newPassword","setReCaptchaToken","fetchGraphQl","handleNetworkError"],"mappings":"yFAiBO,MAAMA,EAA+B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,ECG/BC,EACXC,GACuB,WACvB,IAAIC,EAAkB,GAEtB,OAAIC,EAAAF,GAAA,YAAAA,EAAU,SAAV,MAAAE,EAAkB,SACpBD,GAAUE,EAAAH,GAAA,YAAAA,EAAU,OAAO,KAAjB,YAAAG,EAAqB,SAE1B,CACL,QAAAF,EACA,QAAS,IAAQG,EAAAJ,GAAA,YAAAA,EAAU,OAAV,MAAAI,EAAgB,cAAa,CAElD,ECPaC,EAAgB,MAC3BC,EACAC,EACAC,KAEA,MAAMC,EAAA,EAEC,MAAMC,EAAaZ,EAAgB,CACxC,OAAQ,OACR,UAAW,CAAE,MAAAQ,EAAO,mBAAAC,EAAoB,YAAAC,CAAA,CAAY,CACrD,EACE,KAAMR,GACED,EAAuBC,CAAQ,CACvC,EACA,MAAMW,CAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revokeCustomerToken.js","sources":["/@dropins/storefront-auth/src/data/transforms/transform-revoke-customer-token.ts","/@dropins/storefront-auth/src/api/revokeCustomerToken/graphql/revokeCustomerToken.graphql.ts","/@dropins/storefront-auth/src/api/revokeCustomerToken/revokeCustomerToken.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { 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","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const REVOKE_CUSTOMER_TOKEN = /* GraphQL */ `\n mutation REVOKE_CUSTOMER_TOKEN {\n revokeCustomerToken {\n result\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { 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-commerce/event-bus';\nimport { COOKIE_NAMES } from '@/auth/configs/cookieConfigs';\nimport { EventsList, publishEvents } from '@/auth/lib/acdl';\nimport { verifyToken } from '@/auth/api/verifyToken';\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, {});\n } else {\n const errorMessage = `\n ERROR revokeCustomerToken: ${transformData.message}`;\n console.error(errorMessage);\n\n // Verify if the token is still valid after failed revocation attempt\n // This ensures the authentication state is consistent with the actual token status even if the revocation fails\n verifyToken();\n }\n\n return transformData;\n })\n .catch(handleNetworkError);\n };\n"],"names":["transformRevokeCustomerToken","response","message","_a","_b","_c","REVOKE_CUSTOMER_TOKEN","revokeCustomerToken","fetchGraphQl","transformData","COOKIE_NAMES","name","deleteCookie","events","publishEvents","EventsList","errorMessage","verifyToken","handleNetworkError"],"mappings":"
|
|
1
|
+
{"version":3,"file":"revokeCustomerToken.js","sources":["/@dropins/storefront-auth/src/data/transforms/transform-revoke-customer-token.ts","/@dropins/storefront-auth/src/api/revokeCustomerToken/graphql/revokeCustomerToken.graphql.ts","/@dropins/storefront-auth/src/api/revokeCustomerToken/revokeCustomerToken.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { 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","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const REVOKE_CUSTOMER_TOKEN = /* GraphQL */ `\n mutation REVOKE_CUSTOMER_TOKEN {\n revokeCustomerToken {\n result\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { 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-commerce/event-bus';\nimport { COOKIE_NAMES } from '@/auth/configs/cookieConfigs';\nimport { EventsList, publishEvents } from '@/auth/lib/acdl';\nimport { verifyToken } from '@/auth/api/verifyToken';\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, {});\n } else {\n const errorMessage = `\n ERROR revokeCustomerToken: ${transformData.message}`;\n console.error(errorMessage);\n\n // Verify if the token is still valid after failed revocation attempt\n // This ensures the authentication state is consistent with the actual token status even if the revocation fails\n verifyToken();\n }\n\n return transformData;\n })\n .catch(handleNetworkError);\n };\n"],"names":["transformRevokeCustomerToken","response","message","_a","_b","_c","REVOKE_CUSTOMER_TOKEN","revokeCustomerToken","fetchGraphQl","transformData","COOKIE_NAMES","name","deleteCookie","events","publishEvents","EventsList","errorMessage","verifyToken","handleNetworkError"],"mappings":"2LAoBO,MAAMA,EACXC,GAC6B,WAC7B,IAAIC,EAAkB,GAEtB,OAAIC,EAAAF,GAAA,YAAAA,EAAU,SAAV,MAAAE,EAAkB,SACpBD,IACGE,EAAAH,GAAA,YAAAA,EAAU,OAAO,KAAjB,YAAAG,EAAqB,UAAiC,iBAEpD,CACL,QAAAF,EACA,QAAS,IAAQG,EAAAJ,GAAA,YAAAA,EAAU,OAAV,MAAAI,EAAgB,oBAAmB,CAExD,EChBaC,EAAsC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,ECYtCC,EACX,SACS,MAAMC,EAAaF,EAAuB,CAC/C,OAAQ,MAAA,CACT,EACE,KAAML,GAA0C,CAC/C,MAAMQ,EAAgBT,EAA6BC,CAAQ,EAE3D,GAAIQ,GAAA,MAAAA,EAAe,QACjB,CACEC,EAAa,uBACbA,EAAa,qBAAA,EACb,QAASC,GAAS,CAClBC,EAAaD,CAAI,CACnB,CAAC,EAEDE,EAAO,KAAK,gBAAiB,EAAK,EAElCC,EAAcC,EAAW,SAAU,EAAE,MAChC,CACL,MAAMC,EAAe;AAAA,uCACQP,EAAc,OAAO,GAClD,QAAQ,MAAMO,CAAY,EAI1BC,EAAA,CACF,CAEA,OAAOR,CACT,CAAC,EACA,MAAMS,CAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setReCaptchaToken.js","sources":["/@dropins/storefront-auth/src/lib/setReCaptchaToken.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { verifyReCaptcha } from '@adobe-commerce/recaptcha';\nimport { setFetchGraphQlHeader } from '../api';\n\nexport const setReCaptchaToken = async () => {\n const token = await verifyReCaptcha();\n\n if (token) {\n setFetchGraphQlHeader('X-ReCaptcha', token);\n }\n};\n"],"names":["setReCaptchaToken","token","verifyReCaptcha","setFetchGraphQlHeader"],"mappings":"yIAoBO,MAAMA,EAAoB,SAAY,
|
|
1
|
+
{"version":3,"file":"setReCaptchaToken.js","sources":["/@dropins/storefront-auth/src/lib/setReCaptchaToken.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { verifyReCaptcha } from '@adobe-commerce/recaptcha';\nimport { setFetchGraphQlHeader } from '../api';\n\nexport const setReCaptchaToken = async () => {\n const token = await verifyReCaptcha();\n\n if (token) {\n setFetchGraphQlHeader('X-ReCaptcha', token);\n }\n};\n"],"names":["setReCaptchaToken","token","verifyReCaptcha","setFetchGraphQlHeader"],"mappings":"yIAoBO,MAAMA,EAAoB,SAAY,CAC3C,MAAMC,EAAQ,MAAMC,EAAA,EAEhBD,GACFE,EAAsB,cAAeF,CAAK,CAE9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simplifyTransformAttributesForm.js","sources":["/@dropins/storefront-auth/src/configs/defaultCreateUserConfigs.ts","/@dropins/storefront-auth/src/lib/simplifyTransformAttributesForm.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const DEFAULT__SIGN_IN_EMAIL_FIELD = [\n {\n customUpperCode: 'email',\n code: 'email',\n default_value: '',\n entity_type: 'CUSTOMER',\n frontend_class: 'auth-sign-in-form__form__email',\n frontend_input: 'TEXT',\n is_required: true,\n multiline_count: 1,\n sort_order: 1,\n is_unique: false,\n label: 'Email',\n options: [],\n validateRules: [\n {\n name: 'INPUT_VALIDATION',\n value: 'email',\n },\n ],\n autocomplete: 'username',\n },\n];\n\nexport const DEFAULT__RESET_PASSWORD_EMAIL_FIELD: Record<\n string,\n string | boolean | unknown\n>[] = [\n {\n customUpperCode: 'email',\n code: 'email',\n default_value: '',\n entity_type: 'CUSTOMER',\n frontend_class: 'auth-reset-password-form__form__item',\n frontend_input: 'TEXT',\n is_required: true,\n is_unique: false,\n label: 'Email',\n options: [],\n validateRules: [\n {\n name: 'INPUT_VALIDATION',\n value: 'email',\n },\n ],\n autocomplete: 'username',\n },\n];\n\nexport const DEFAULT_SIGN_UP_FIELDS = [\n {\n customUpperCode: 'email',\n code: 'email',\n default_value: '',\n entity_type: 'CUSTOMER',\n frontend_class: '',\n frontend_input: 'TEXT',\n is_required: true,\n is_unique: false,\n label: 'Email',\n multiline_count: 1,\n sort_order: 1,\n options: [],\n validateRules: [\n {\n name: 'INPUT_VALIDATION',\n value: 'email',\n },\n ],\n autocomplete: 'username',\n },\n {\n customUpperCode: 'firstname',\n code: 'firstname',\n default_value: '',\n entity_type: 'CUSTOMER',\n frontend_class: '',\n frontend_input: 'TEXT',\n is_required: true,\n is_unique: false,\n label: 'First name',\n multiline_count: 1,\n sort_order: 2,\n options: [],\n },\n {\n customUpperCode: 'lastname',\n code: 'lastname',\n default_value: '',\n entity_type: 'CUSTOMER',\n frontend_class: '',\n frontend_input: 'TEXT',\n is_required: false,\n is_unique: false,\n label: 'Last name',\n multiline_count: 1,\n sort_order: 3,\n options: [],\n },\n];\n\nexport const DEFAULT_INPUTS_PROPS: Record<string, string | ''> = {\n dob: '',\n email: '',\n firstname: '',\n gender: '',\n lastname: '',\n middlename: '',\n password: '',\n prefix: '',\n suffix: '',\n taxvat: '',\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { transformAttributesForm } from '../data/transforms';\n\nexport const simplifyTransformAttributesForm = (defaultSignUpFields: any) => {\n if (!defaultSignUpFields?.length) return [];\n\n const params = {\n data: {\n attributesForm: { items: defaultSignUpFields },\n },\n };\n\n return transformAttributesForm(params);\n};\n"],"names":["DEFAULT__SIGN_IN_EMAIL_FIELD","DEFAULT__RESET_PASSWORD_EMAIL_FIELD","DEFAULT_SIGN_UP_FIELDS","simplifyTransformAttributesForm","defaultSignUpFields","transformAttributesForm"],"mappings":"8CAiBO,MAAMA,EAA+B,CAC1C,CACE,gBAAiB,QACjB,KAAM,QACN,cAAe,GACf,YAAa,WACb,eAAgB,iCAChB,eAAgB,OAChB,YAAa,GACb,gBAAiB,EACjB,WAAY,EACZ,UAAW,GACX,MAAO,QACP,QAAS,
|
|
1
|
+
{"version":3,"file":"simplifyTransformAttributesForm.js","sources":["/@dropins/storefront-auth/src/configs/defaultCreateUserConfigs.ts","/@dropins/storefront-auth/src/lib/simplifyTransformAttributesForm.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const DEFAULT__SIGN_IN_EMAIL_FIELD = [\n {\n customUpperCode: 'email',\n code: 'email',\n default_value: '',\n entity_type: 'CUSTOMER',\n frontend_class: 'auth-sign-in-form__form__email',\n frontend_input: 'TEXT',\n is_required: true,\n multiline_count: 1,\n sort_order: 1,\n is_unique: false,\n label: 'Email',\n options: [],\n validateRules: [\n {\n name: 'INPUT_VALIDATION',\n value: 'email',\n },\n ],\n autocomplete: 'username',\n },\n];\n\nexport const DEFAULT__RESET_PASSWORD_EMAIL_FIELD: Record<\n string,\n string | boolean | unknown\n>[] = [\n {\n customUpperCode: 'email',\n code: 'email',\n default_value: '',\n entity_type: 'CUSTOMER',\n frontend_class: 'auth-reset-password-form__form__item',\n frontend_input: 'TEXT',\n is_required: true,\n is_unique: false,\n label: 'Email',\n options: [],\n validateRules: [\n {\n name: 'INPUT_VALIDATION',\n value: 'email',\n },\n ],\n autocomplete: 'username',\n },\n];\n\nexport const DEFAULT_SIGN_UP_FIELDS = [\n {\n customUpperCode: 'email',\n code: 'email',\n default_value: '',\n entity_type: 'CUSTOMER',\n frontend_class: '',\n frontend_input: 'TEXT',\n is_required: true,\n is_unique: false,\n label: 'Email',\n multiline_count: 1,\n sort_order: 1,\n options: [],\n validateRules: [\n {\n name: 'INPUT_VALIDATION',\n value: 'email',\n },\n ],\n autocomplete: 'username',\n },\n {\n customUpperCode: 'firstname',\n code: 'firstname',\n default_value: '',\n entity_type: 'CUSTOMER',\n frontend_class: '',\n frontend_input: 'TEXT',\n is_required: true,\n is_unique: false,\n label: 'First name',\n multiline_count: 1,\n sort_order: 2,\n options: [],\n },\n {\n customUpperCode: 'lastname',\n code: 'lastname',\n default_value: '',\n entity_type: 'CUSTOMER',\n frontend_class: '',\n frontend_input: 'TEXT',\n is_required: false,\n is_unique: false,\n label: 'Last name',\n multiline_count: 1,\n sort_order: 3,\n options: [],\n },\n];\n\nexport const DEFAULT_INPUTS_PROPS: Record<string, string | ''> = {\n dob: '',\n email: '',\n firstname: '',\n gender: '',\n lastname: '',\n middlename: '',\n password: '',\n prefix: '',\n suffix: '',\n taxvat: '',\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { transformAttributesForm } from '../data/transforms';\n\nexport const simplifyTransformAttributesForm = (defaultSignUpFields: any) => {\n if (!defaultSignUpFields?.length) return [];\n\n const params = {\n data: {\n attributesForm: { items: defaultSignUpFields },\n },\n };\n\n return transformAttributesForm(params);\n};\n"],"names":["DEFAULT__SIGN_IN_EMAIL_FIELD","DEFAULT__RESET_PASSWORD_EMAIL_FIELD","DEFAULT_SIGN_UP_FIELDS","simplifyTransformAttributesForm","defaultSignUpFields","transformAttributesForm"],"mappings":"8CAiBO,MAAMA,EAA+B,CAC1C,CACE,gBAAiB,QACjB,KAAM,QACN,cAAe,GACf,YAAa,WACb,eAAgB,iCAChB,eAAgB,OAChB,YAAa,GACb,gBAAiB,EACjB,WAAY,EACZ,UAAW,GACX,MAAO,QACP,QAAS,CAAA,EACT,cAAe,CACb,CACE,KAAM,mBACN,MAAO,OAAA,CACT,EAEF,aAAc,UAAA,CAElB,EAEaC,EAGP,CACJ,CACE,gBAAiB,QACjB,KAAM,QACN,cAAe,GACf,YAAa,WACb,eAAgB,uCAChB,eAAgB,OAChB,YAAa,GACb,UAAW,GACX,MAAO,QACP,QAAS,CAAA,EACT,cAAe,CACb,CACE,KAAM,mBACN,MAAO,OAAA,CACT,EAEF,aAAc,UAAA,CAElB,EAEaC,EAAyB,CACpC,CACE,gBAAiB,QACjB,KAAM,QACN,cAAe,GACf,YAAa,WACb,eAAgB,GAChB,eAAgB,OAChB,YAAa,GACb,UAAW,GACX,MAAO,QACP,gBAAiB,EACjB,WAAY,EACZ,QAAS,CAAA,EACT,cAAe,CACb,CACE,KAAM,mBACN,MAAO,OAAA,CACT,EAEF,aAAc,UAAA,EAEhB,CACE,gBAAiB,YACjB,KAAM,YACN,cAAe,GACf,YAAa,WACb,eAAgB,GAChB,eAAgB,OAChB,YAAa,GACb,UAAW,GACX,MAAO,aACP,gBAAiB,EACjB,WAAY,EACZ,QAAS,CAAA,CAAC,EAEZ,CACE,gBAAiB,WACjB,KAAM,WACN,cAAe,GACf,YAAa,WACb,eAAgB,GAChB,eAAgB,OAChB,YAAa,GACb,UAAW,GACX,MAAO,YACP,gBAAiB,EACjB,WAAY,EACZ,QAAS,CAAA,CAAC,CAEd,ECjGaC,EAAmCC,GACzCA,GAAA,MAAAA,EAAqB,OAQnBC,EANQ,CACb,KAAM,CACJ,eAAgB,CAAE,MAAOD,CAAA,CAAoB,CAC/C,CAGmC,EARI,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform-attributes-form.js","sources":["/@dropins/storefront-auth/src/lib/convertCase.ts","/@dropins/storefront-auth/src/data/transforms/transform-attributes-form.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const convertToCamelCase = (key: string): string => {\n return key.replace(/_([a-z])/g, (_, letter) => letter.toUpperCase());\n};\n\nexport const convertToSnakeCase = (key: string): string => {\n return key.replace(/([A-Z])/g, (letter) => `_${letter.toLowerCase()}`);\n};\n\nexport const convertKeysCase = (\n data: any,\n type: 'snakeCase' | 'camelCase',\n dictionary?: Record<string, string>\n): any => {\n const typeList = ['string', 'boolean', 'number'];\n const callback =\n type === 'camelCase' ? convertToCamelCase : convertToSnakeCase;\n\n if (Array.isArray(data)) {\n return data.map((element) => {\n if (typeList.includes(typeof element) || element === null) return element;\n\n if (typeof element === 'object') {\n return convertKeysCase(element, type, dictionary);\n }\n return element;\n });\n }\n\n if (data !== null && typeof data === 'object') {\n return Object.entries(data).reduce((acc, [key, value]) => {\n const newKey =\n dictionary && dictionary[key] ? dictionary[key] : callback(key);\n acc[newKey] =\n typeList.includes(typeof value) || value === null\n ? value\n : convertKeysCase(value, type, dictionary);\n return acc;\n }, {} as Record<string, unknown>);\n }\n\n return data;\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport {\n GetAttributesFormResponse,\n ResponseAttributesFormItemsProps,\n} from '@/auth/types';\nimport { AttributesFormModel } from '../models';\nimport { convertKeysCase, convertToCamelCase } from '@/auth/lib/convertCase';\n\nexport const cloneArrayIfExists = (\n fields: ResponseAttributesFormItemsProps[]\n) => {\n let multilineItems: any = [];\n\n for (const element of fields) {\n if (element.frontend_input !== 'MULTILINE' || element.multiline_count < 2) {\n continue;\n }\n\n for (let i = 2; i <= element.multiline_count; i++) {\n const newItem = {\n ...element,\n is_required: false,\n name: `${element.code}_multiline_${i}`,\n code: `${element.code}_multiline_${i}`,\n id: `${element.code}_multiline_${i}`,\n };\n\n multilineItems.push(newItem);\n }\n }\n\n return multilineItems;\n};\n\nexport const transformAttributesForm = (\n response: GetAttributesFormResponse\n): AttributesFormModel[] => {\n const items = response?.data?.attributesForm?.items || [];\n\n if (!items.length) return [];\n\n const fields = items\n .filter((el) => !el.frontend_input?.includes('HIDDEN'))\n ?.map(({ code, ...other }) => {\n const isDefaultCode = code !== 'country_id' ? code : 'country_code';\n\n return {\n ...other,\n name: isDefaultCode,\n id: isDefaultCode,\n code: isDefaultCode,\n };\n });\n\n const multilineItems = cloneArrayIfExists(fields as any);\n\n const attributesConfig = fields\n .concat(multilineItems)\n .map((item) => {\n const customUpperCode =\n item.code === 'firstname'\n ? 'firstName'\n : item.code === 'lastname'\n ? 'lastName'\n : convertToCamelCase(item.code);\n\n const options = item.options?.map((el) => {\n return {\n isDefault: el.is_default,\n text: el.label,\n value: el.value,\n };\n });\n\n return convertKeysCase(\n { ...item, options, customUpperCode },\n 'camelCase',\n {\n frontend_input: 'fieldType',\n frontend_class: 'className',\n is_required: 'required',\n sort_order: 'orderNumber',\n }\n );\n })\n .sort(\n (a: AttributesFormModel, b: AttributesFormModel) =>\n a.orderNumber - b.orderNumber\n );\n\n return attributesConfig;\n};\n"],"names":["convertToCamelCase","key","_","letter","convertToSnakeCase","convertKeysCase","data","type","dictionary","typeList","callback","element","acc","value","newKey","cloneArrayIfExists","fields","multilineItems","i","newItem","transformAttributesForm","response","_a","_b","_c","items","el","code","other","isDefaultCode","item","customUpperCode","options","a","b"],"mappings":"
|
|
1
|
+
{"version":3,"file":"transform-attributes-form.js","sources":["/@dropins/storefront-auth/src/lib/convertCase.ts","/@dropins/storefront-auth/src/data/transforms/transform-attributes-form.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const convertToCamelCase = (key: string): string => {\n return key.replace(/_([a-z])/g, (_, letter) => letter.toUpperCase());\n};\n\nexport const convertToSnakeCase = (key: string): string => {\n return key.replace(/([A-Z])/g, (letter) => `_${letter.toLowerCase()}`);\n};\n\nexport const convertKeysCase = (\n data: any,\n type: 'snakeCase' | 'camelCase',\n dictionary?: Record<string, string>\n): any => {\n const typeList = ['string', 'boolean', 'number'];\n const callback =\n type === 'camelCase' ? convertToCamelCase : convertToSnakeCase;\n\n if (Array.isArray(data)) {\n return data.map((element) => {\n if (typeList.includes(typeof element) || element === null) return element;\n\n if (typeof element === 'object') {\n return convertKeysCase(element, type, dictionary);\n }\n return element;\n });\n }\n\n if (data !== null && typeof data === 'object') {\n return Object.entries(data).reduce((acc, [key, value]) => {\n const newKey =\n dictionary && dictionary[key] ? dictionary[key] : callback(key);\n acc[newKey] =\n typeList.includes(typeof value) || value === null\n ? value\n : convertKeysCase(value, type, dictionary);\n return acc;\n }, {} as Record<string, unknown>);\n }\n\n return data;\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport {\n GetAttributesFormResponse,\n ResponseAttributesFormItemsProps,\n} from '@/auth/types';\nimport { AttributesFormModel } from '../models';\nimport { convertKeysCase, convertToCamelCase } from '@/auth/lib/convertCase';\n\nexport const cloneArrayIfExists = (\n fields: ResponseAttributesFormItemsProps[]\n) => {\n let multilineItems: any = [];\n\n for (const element of fields) {\n if (element.frontend_input !== 'MULTILINE' || element.multiline_count < 2) {\n continue;\n }\n\n for (let i = 2; i <= element.multiline_count; i++) {\n const newItem = {\n ...element,\n is_required: false,\n name: `${element.code}_multiline_${i}`,\n code: `${element.code}_multiline_${i}`,\n id: `${element.code}_multiline_${i}`,\n };\n\n multilineItems.push(newItem);\n }\n }\n\n return multilineItems;\n};\n\nexport const transformAttributesForm = (\n response: GetAttributesFormResponse\n): AttributesFormModel[] => {\n const items = response?.data?.attributesForm?.items || [];\n\n if (!items.length) return [];\n\n const fields = items\n .filter((el) => !el.frontend_input?.includes('HIDDEN'))\n ?.map(({ code, ...other }) => {\n const isDefaultCode = code !== 'country_id' ? code : 'country_code';\n\n return {\n ...other,\n name: isDefaultCode,\n id: isDefaultCode,\n code: isDefaultCode,\n };\n });\n\n const multilineItems = cloneArrayIfExists(fields as any);\n\n const attributesConfig = fields\n .concat(multilineItems)\n .map((item) => {\n const customUpperCode =\n item.code === 'firstname'\n ? 'firstName'\n : item.code === 'lastname'\n ? 'lastName'\n : convertToCamelCase(item.code);\n\n const options = item.options?.map((el) => {\n return {\n isDefault: el.is_default,\n text: el.label,\n value: el.value,\n };\n });\n\n return convertKeysCase(\n { ...item, options, customUpperCode },\n 'camelCase',\n {\n frontend_input: 'fieldType',\n frontend_class: 'className',\n is_required: 'required',\n sort_order: 'orderNumber',\n }\n );\n })\n .sort(\n (a: AttributesFormModel, b: AttributesFormModel) =>\n a.orderNumber - b.orderNumber\n );\n\n return attributesConfig;\n};\n"],"names":["convertToCamelCase","key","_","letter","convertToSnakeCase","convertKeysCase","data","type","dictionary","typeList","callback","element","acc","value","newKey","cloneArrayIfExists","fields","multilineItems","i","newItem","transformAttributesForm","response","_a","_b","_c","items","el","code","other","isDefaultCode","item","customUpperCode","options","a","b"],"mappings":"AAiBO,MAAMA,EAAsBC,GAC1BA,EAAI,QAAQ,YAAa,CAACC,EAAGC,IAAWA,EAAO,aAAa,EAGxDC,EAAsBH,GAC1BA,EAAI,QAAQ,WAAaE,GAAW,IAAIA,EAAO,YAAA,CAAa,EAAE,EAG1DE,EAAkB,CAC7BC,EACAC,EACAC,IACQ,CACR,MAAMC,EAAW,CAAC,SAAU,UAAW,QAAQ,EACzCC,EACJH,IAAS,YAAcP,EAAqBI,EAE9C,OAAI,MAAM,QAAQE,CAAI,EACbA,EAAK,IAAKK,GACXF,EAAS,SAAS,OAAOE,CAAO,GAAKA,IAAY,KAAaA,EAE9D,OAAOA,GAAY,SACdN,EAAgBM,EAASJ,EAAMC,CAAU,EAE3CG,CACR,EAGCL,IAAS,MAAQ,OAAOA,GAAS,SAC5B,OAAO,QAAQA,CAAI,EAAE,OAAO,CAACM,EAAK,CAACX,EAAKY,CAAK,IAAM,CACxD,MAAMC,EACJN,GAAcA,EAAWP,CAAG,EAAIO,EAAWP,CAAG,EAAIS,EAAST,CAAG,EAChE,OAAAW,EAAIE,CAAM,EACRL,EAAS,SAAS,OAAOI,CAAK,GAAKA,IAAU,KACzCA,EACAR,EAAgBQ,EAAON,EAAMC,CAAU,EACtC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A,EAAG,WACd,KAAMA,EAAG,MACT,MAAOA,EAAG,KAAA,IAId,OAAOrB,EACL,CAAE,GAAGyB,EAAM,QAAAE,EAAS,gBAAAD,CAAA,EACpB,YACA,CACE,eAAgB,YAChB,eAAgB,YAChB,YAAa,WACb,WAAY,aAAA,CACd,CAEJ,CAAC,EACA,KACC,CAACE,EAAwBC,IACvBD,EAAE,YAAcC,EAAE,WAAA,CAI1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePasswordValidationMessage.js","sources":["/@dropins/storefront-auth/src/hooks/api/useGetStoreConfigs.tsx","/@dropins/storefront-auth/src/lib/validationUniqueSymbolsPassword.ts","/@dropins/storefront-auth/src/hooks/components/usePasswordValidationMessage.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { getStoreConfig } from '@/auth/api';\nimport { useEffect, useState } from 'preact/hooks';\nimport { StoreConfigModel } from '../../data/models';\n\nexport const useGetStoreConfigs = () => {\n const [isEmailConfirmationRequired, setIsEmailConfirmationRequired] =\n useState(false);\n const [passwordConfigs, setPasswordConfigs] = useState<{\n minLength: number;\n requiredCharacterClasses: number;\n } | null>(null);\n\n useEffect(() => {\n const storeConfigString = sessionStorage.getItem('storeConfig');\n\n const cachedStoreConfig: StoreConfigModel = storeConfigString\n ? JSON.parse(storeConfigString)\n : null;\n\n if (cachedStoreConfig) {\n const { minLength, requiredCharacterClasses, createAccountConfirmation } =\n cachedStoreConfig;\n\n setPasswordConfigs({\n minLength,\n requiredCharacterClasses,\n });\n\n setIsEmailConfirmationRequired(createAccountConfirmation);\n } else {\n getStoreConfig().then((response) => {\n if (response) {\n const {\n minLength,\n requiredCharacterClasses,\n createAccountConfirmation,\n } = response;\n\n sessionStorage.setItem('storeConfig', JSON.stringify(response));\n\n setPasswordConfigs({\n minLength,\n requiredCharacterClasses,\n });\n\n setIsEmailConfirmationRequired(createAccountConfirmation);\n }\n });\n }\n }, []);\n\n return { passwordConfigs, isEmailConfirmationRequired };\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const validationUniqueSymbolsPassword = (\n password: string,\n uniqueSymbolsCount: number\n) => {\n if (uniqueSymbolsCount <= 1) return true;\n\n const numbers = /[0-9]/.test(password) ? 1 : 0;\n const lowerCaseLetter = /[a-z]/.test(password) ? 1 : 0;\n const upperCaseLetter = /[A-Z]/.test(password) ? 1 : 0;\n const specialSymbols = /[^a-zA-Z0-9\\s]/.test(password) ? 1 : 0;\n\n return (\n numbers + lowerCaseLetter + upperCaseLetter + specialSymbols >=\n uniqueSymbolsCount\n );\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { validationUniqueSymbolsPassword } from '@/auth/lib/validationUniqueSymbolsPassword';\nimport { useEffect, useMemo, useState } from 'preact/hooks';\nimport { ValidateLengthConfigProps, statusTypes } from '@/auth/types';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\ninterface UsePasswordValidationMessageProps {\n passwordConfigs: {\n minLength: number;\n requiredCharacterClasses: number;\n } | null;\n isClickSubmit: boolean;\n password: string;\n}\n\nexport const usePasswordValidationMessage = ({\n passwordConfigs,\n isClickSubmit,\n password,\n}: UsePasswordValidationMessageProps) => {\n const translations = useText({\n messageLengthPassword:\n 'Auth.PasswordValidationMessage.messageLengthPassword',\n });\n\n const [isValidUniqueSymbols, setIsValidUniqueSymbols] =\n useState<statusTypes>('pending');\n\n useEffect(() => {\n if (!passwordConfigs) return;\n\n const result = validationUniqueSymbolsPassword(\n password,\n passwordConfigs.requiredCharacterClasses\n );\n\n if (isClickSubmit && password.length > 0) {\n result\n ? setIsValidUniqueSymbols('success')\n : setIsValidUniqueSymbols('error');\n } else if (isClickSubmit && password.length === 0) {\n setIsValidUniqueSymbols('pending');\n } else {\n result\n ? setIsValidUniqueSymbols('success')\n : setIsValidUniqueSymbols('pending');\n }\n }, [isClickSubmit, passwordConfigs, password]);\n\n const defaultLengthMessage: ValidateLengthConfigProps | undefined =\n useMemo(() => {\n if (!passwordConfigs) return;\n\n const defaultMessage: ValidateLengthConfigProps = {\n status: 'pending',\n icon: 'pending',\n message: translations.messageLengthPassword?.replace(\n '{minLength}',\n `${passwordConfigs.minLength}`\n ),\n };\n\n if (password.length && password.length >= passwordConfigs.minLength) {\n return { ...defaultMessage, icon: 'success', status: 'success' };\n }\n\n if (password.length && password.length < passwordConfigs.minLength) {\n return isClickSubmit\n ? { ...defaultMessage, icon: 'error', status: 'error' }\n : { ...defaultMessage, icon: 'pending', status: 'pending' };\n }\n\n return defaultMessage;\n }, [\n passwordConfigs,\n translations.messageLengthPassword,\n password?.length,\n isClickSubmit,\n ]);\n\n return { isValidUniqueSymbols, defaultLengthMessage };\n};\n"],"names":["useGetStoreConfigs","isEmailConfirmationRequired","setIsEmailConfirmationRequired","useState","passwordConfigs","setPasswordConfigs","useEffect","storeConfigString","cachedStoreConfig","minLength","requiredCharacterClasses","createAccountConfirmation","getStoreConfig","response","validationUniqueSymbolsPassword","password","uniqueSymbolsCount","numbers","lowerCaseLetter","upperCaseLetter","specialSymbols","usePasswordValidationMessage","isClickSubmit","translations","useText","isValidUniqueSymbols","setIsValidUniqueSymbols","result","defaultLengthMessage","useMemo","defaultMessage","_a"],"mappings":"oPAqBO,MAAMA,EAAqB,IAAM,CACtC,KAAM,CAACC,EAA6BC,CAA8B,EAChEC,EAAS,EAAK,EACV,CAACC,EAAiBC,CAAkB,EAAIF,EAGpC,IAAI,EAEd,OAAAG,EAAU,IAAM,
|
|
1
|
+
{"version":3,"file":"usePasswordValidationMessage.js","sources":["/@dropins/storefront-auth/src/hooks/api/useGetStoreConfigs.tsx","/@dropins/storefront-auth/src/lib/validationUniqueSymbolsPassword.ts","/@dropins/storefront-auth/src/hooks/components/usePasswordValidationMessage.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { getStoreConfig } from '@/auth/api';\nimport { useEffect, useState } from 'preact/hooks';\nimport { StoreConfigModel } from '../../data/models';\n\nexport const useGetStoreConfigs = () => {\n const [isEmailConfirmationRequired, setIsEmailConfirmationRequired] =\n useState(false);\n const [passwordConfigs, setPasswordConfigs] = useState<{\n minLength: number;\n requiredCharacterClasses: number;\n } | null>(null);\n\n useEffect(() => {\n const storeConfigString = sessionStorage.getItem('storeConfig');\n\n const cachedStoreConfig: StoreConfigModel = storeConfigString\n ? JSON.parse(storeConfigString)\n : null;\n\n if (cachedStoreConfig) {\n const { minLength, requiredCharacterClasses, createAccountConfirmation } =\n cachedStoreConfig;\n\n setPasswordConfigs({\n minLength,\n requiredCharacterClasses,\n });\n\n setIsEmailConfirmationRequired(createAccountConfirmation);\n } else {\n getStoreConfig().then((response) => {\n if (response) {\n const {\n minLength,\n requiredCharacterClasses,\n createAccountConfirmation,\n } = response;\n\n sessionStorage.setItem('storeConfig', JSON.stringify(response));\n\n setPasswordConfigs({\n minLength,\n requiredCharacterClasses,\n });\n\n setIsEmailConfirmationRequired(createAccountConfirmation);\n }\n });\n }\n }, []);\n\n return { passwordConfigs, isEmailConfirmationRequired };\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const validationUniqueSymbolsPassword = (\n password: string,\n uniqueSymbolsCount: number\n) => {\n if (uniqueSymbolsCount <= 1) return true;\n\n const numbers = /[0-9]/.test(password) ? 1 : 0;\n const lowerCaseLetter = /[a-z]/.test(password) ? 1 : 0;\n const upperCaseLetter = /[A-Z]/.test(password) ? 1 : 0;\n const specialSymbols = /[^a-zA-Z0-9\\s]/.test(password) ? 1 : 0;\n\n return (\n numbers + lowerCaseLetter + upperCaseLetter + specialSymbols >=\n uniqueSymbolsCount\n );\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { validationUniqueSymbolsPassword } from '@/auth/lib/validationUniqueSymbolsPassword';\nimport { useEffect, useMemo, useState } from 'preact/hooks';\nimport { ValidateLengthConfigProps, statusTypes } from '@/auth/types';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\ninterface UsePasswordValidationMessageProps {\n passwordConfigs: {\n minLength: number;\n requiredCharacterClasses: number;\n } | null;\n isClickSubmit: boolean;\n password: string;\n}\n\nexport const usePasswordValidationMessage = ({\n passwordConfigs,\n isClickSubmit,\n password,\n}: UsePasswordValidationMessageProps) => {\n const translations = useText({\n messageLengthPassword:\n 'Auth.PasswordValidationMessage.messageLengthPassword',\n });\n\n const [isValidUniqueSymbols, setIsValidUniqueSymbols] =\n useState<statusTypes>('pending');\n\n useEffect(() => {\n if (!passwordConfigs) return;\n\n const result = validationUniqueSymbolsPassword(\n password,\n passwordConfigs.requiredCharacterClasses\n );\n\n if (isClickSubmit && password.length > 0) {\n result\n ? setIsValidUniqueSymbols('success')\n : setIsValidUniqueSymbols('error');\n } else if (isClickSubmit && password.length === 0) {\n setIsValidUniqueSymbols('pending');\n } else {\n result\n ? setIsValidUniqueSymbols('success')\n : setIsValidUniqueSymbols('pending');\n }\n }, [isClickSubmit, passwordConfigs, password]);\n\n const defaultLengthMessage: ValidateLengthConfigProps | undefined =\n useMemo(() => {\n if (!passwordConfigs) return;\n\n const defaultMessage: ValidateLengthConfigProps = {\n status: 'pending',\n icon: 'pending',\n message: translations.messageLengthPassword?.replace(\n '{minLength}',\n `${passwordConfigs.minLength}`\n ),\n };\n\n if (password.length && password.length >= passwordConfigs.minLength) {\n return { ...defaultMessage, icon: 'success', status: 'success' };\n }\n\n if (password.length && password.length < passwordConfigs.minLength) {\n return isClickSubmit\n ? { ...defaultMessage, icon: 'error', status: 'error' }\n : { ...defaultMessage, icon: 'pending', status: 'pending' };\n }\n\n return defaultMessage;\n }, [\n passwordConfigs,\n translations.messageLengthPassword,\n password?.length,\n isClickSubmit,\n ]);\n\n return { isValidUniqueSymbols, defaultLengthMessage };\n};\n"],"names":["useGetStoreConfigs","isEmailConfirmationRequired","setIsEmailConfirmationRequired","useState","passwordConfigs","setPasswordConfigs","useEffect","storeConfigString","cachedStoreConfig","minLength","requiredCharacterClasses","createAccountConfirmation","getStoreConfig","response","validationUniqueSymbolsPassword","password","uniqueSymbolsCount","numbers","lowerCaseLetter","upperCaseLetter","specialSymbols","usePasswordValidationMessage","isClickSubmit","translations","useText","isValidUniqueSymbols","setIsValidUniqueSymbols","result","defaultLengthMessage","useMemo","defaultMessage","_a"],"mappings":"oPAqBO,MAAMA,EAAqB,IAAM,CACtC,KAAM,CAACC,EAA6BC,CAA8B,EAChEC,EAAS,EAAK,EACV,CAACC,EAAiBC,CAAkB,EAAIF,EAGpC,IAAI,EAEd,OAAAG,EAAU,IAAM,CACd,MAAMC,EAAoB,eAAe,QAAQ,aAAa,EAExDC,EAAsCD,EACxC,KAAK,MAAMA,CAAiB,EAC5B,KAEJ,GAAIC,EAAmB,CACrB,KAAM,CAAE,UAAAC,EAAW,yBAAAC,EAA0B,0BAAAC,CAAA,EAC3CH,EAEFH,EAAmB,CACjB,UAAAI,EACA,yBAAAC,CAAA,CACD,EAEDR,EAA+BS,CAAyB,CAC1D,MACEC,EAAA,EAAiB,KAAMC,GAAa,CAClC,GAAIA,EAAU,CACZ,KAAM,CACJ,UAAAJ,EACA,yBAAAC,EACA,0BAAAC,CAAA,EACEE,EAEJ,eAAe,QAAQ,cAAe,KAAK,UAAUA,CAAQ,CAAC,EAE9DR,EAAmB,CACjB,UAAAI,EACA,yBAAAC,CAAA,CACD,EAEDR,EAA+BS,CAAyB,CAC1D,CACF,CAAC,CAEL,EAAG,CAAA,CAAE,EAEE,CAAE,gBAAAP,EAAiB,4BAAAH,CAAA,CAC5B,ECpDaa,EAAkC,CAC7CC,EACAC,IACG,CACH,GAAIA,GAAsB,EAAG,M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EAAU,OACVO,CAAA,CACD,EAEH,MAAO,CAAE,qBAAAG,EAAsB,qBAAAG,CAAA,CACjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifyToken.js","sources":["/@dropins/storefront-auth/src/configs/cookieConfigs.ts","/@dropins/storefront-auth/src/data/transforms/transform-store-config.ts","/@dropins/storefront-auth/src/lib/fetch-error.ts","/@dropins/storefront-auth/src/lib/cookieUtils.ts","/@dropins/storefront-auth/src/api/getStoreConfig/graphql/getStoreConfig.graphql.ts","/@dropins/storefront-auth/src/api/getStoreConfig/getStoreConfig.ts","/@dropins/storefront-auth/src/api/verifyToken/graphql/verifyToken.graphql.ts","/@dropins/storefront-auth/src/api/verifyToken/verifyToken.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nconst COOKIE_NAMES = {\n auth_dropin_user_token: 'auth_dropin_user_token',\n auth_dropin_firstname: 'auth_dropin_firstname',\n};\n\nconst COOKIE_LIFETIME = 3600;\n\nexport { COOKIE_NAMES, COOKIE_LIFETIME };\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { getStoreConfigResponse } from '@/auth/types';\nimport { COOKIE_LIFETIME } from '@/auth/configs/cookieConfigs';\nimport { StoreConfigModel } from '../models';\n\nexport const transformStoreConfig = (\n response: getStoreConfigResponse\n): StoreConfigModel => {\n return {\n autocompleteOnStorefront:\n response?.data?.storeConfig?.autocomplete_on_storefront || false,\n // Need information about min length in response undefined\n minLength: response?.data?.storeConfig?.minimum_password_length || 3,\n requiredCharacterClasses:\n +response?.data?.storeConfig?.required_character_classes_number || 0,\n createAccountConfirmation:\n response?.data?.storeConfig?.create_account_confirmation || false,\n customerAccessTokenLifetime:\n response?.data?.storeConfig?.customer_access_token_lifetime *\n COOKIE_LIFETIME || COOKIE_LIFETIME,\n };\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\n/** Actions */\nexport const handleFetchError = (errors: Array<{ message: string }>) => {\n const errorMessage = errors.map((e: any) => e.message).join(' ');\n\n throw Error(errorMessage);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\n/* eslint-disable no-useless-escape */\nimport { getStoreConfig } from '@/auth/api';\nimport { COOKIE_LIFETIME } from '@/auth/configs/cookieConfigs';\n\nexport const getCookie = (cookieName: string) => {\n const cookies = document.cookie.split(';');\n let foundValue;\n\n cookies.forEach((cookie) => {\n const [name, value] = cookie.trim().split('=');\n if (name === cookieName) {\n foundValue = decodeURIComponent(value);\n }\n });\n\n return foundValue;\n};\n\nexport const deleteCookie = (cookieName: string) => {\n document.cookie = `${cookieName}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`;\n};\n\nexport const getCookiesLifetime = async () => {\n try {\n const storeConfigString = sessionStorage.getItem('storeConfig');\n const cachedStoreConfig = storeConfigString\n ? JSON.parse(storeConfigString)\n : {};\n\n let accessTokenLifeTime = cachedStoreConfig.customerAccessTokenLifetime;\n\n if (!accessTokenLifeTime) {\n const storeConfig = await getStoreConfig();\n\n sessionStorage.setItem('storeConfig', JSON.stringify(storeConfig));\n\n accessTokenLifeTime =\n storeConfig?.customerAccessTokenLifetime || COOKIE_LIFETIME;\n }\n\n return `Max-Age=${accessTokenLifeTime}`;\n } catch (error) {\n console.error('getCookiesLifetime() Error:', error);\n return `Max-Age=${COOKIE_LIFETIME}`;\n }\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const GET_STORE_CONFIG = /* GraphQL */ `\n query GET_STORE_CONFIG {\n storeConfig {\n autocomplete_on_storefront\n minimum_password_length\n required_character_classes_number\n store_code\n store_name\n store_group_code\n locale\n create_account_confirmation\n customer_access_token_lifetime\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { getStoreConfigResponse } from '@/auth/types';\nimport { fetchGraphQl } from '../fetch-graphql';\nimport { GET_STORE_CONFIG } from './graphql/getStoreConfig.graphql';\nimport { handleNetworkError } from '@/auth/lib/network-error';\nimport { transformStoreConfig } from '@/auth/data/transforms';\nimport { StoreConfigModel } from '@/auth/data/models';\nimport { handleFetchError } from '@/auth/lib/fetch-error';\n\nexport const getStoreConfig = async (): Promise<StoreConfigModel> => {\n return await fetchGraphQl(GET_STORE_CONFIG, {\n method: 'GET',\n cache: 'force-cache',\n })\n .then((response: getStoreConfigResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n return transformStoreConfig(response);\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const VALIDATE_CUSTOMER_TOKEN = /* GraphQL */ `\n query VALIDATE_TOKEN {\n customerCart {\n id\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { events } from '@adobe-commerce/event-bus';\nimport {\n fetchGraphQl,\n removeFetchGraphQlHeader,\n setFetchGraphQlHeader,\n} from '../fetch-graphql';\nimport { deleteCookie, getCookie } from '@/auth/lib/cookieUtils';\nimport { COOKIE_NAMES } from '@/auth/configs/cookieConfigs';\nimport { VALIDATE_CUSTOMER_TOKEN } from './graphql/verifyToken.graphql';\n\nexport const verifyToken = async (\n authType = 'Authorization',\n type = 'Bearer'\n) => {\n const token = getCookie(COOKIE_NAMES.auth_dropin_user_token);\n\n events.emit('authenticated', !!token);\n\n if (!token) return;\n\n setFetchGraphQlHeader(authType, `${type} ${token}`);\n\n return fetchGraphQl(VALIDATE_CUSTOMER_TOKEN).then((res) => {\n const unauthenticated = !!res.errors?.find(\n (error) => error.extensions?.category === 'graphql-authentication'\n );\n\n if (!unauthenticated) return;\n\n deleteCookie(COOKIE_NAMES.auth_dropin_user_token);\n removeFetchGraphQlHeader(authType);\n events.emit('authenticated', false);\n });\n};\n"],"names":["COOKIE_NAMES","COOKIE_LIFETIME","transformStoreConfig","response","_b","_a","_d","_c","_f","_e","_h","_g","_j","_i","handleFetchError","errors","errorMessage","getCookie","cookieName","cookies","foundValue","cookie","name","value","deleteCookie","getCookiesLifetime","storeConfigString","accessTokenLifeTime","storeConfig","getStoreConfig","error","GET_STORE_CONFIG","fetchGraphQl","handleNetworkError","VALIDATE_CUSTOMER_TOKEN","verifyToken","authType","type","token","events","setFetchGraphQlHeader","res","removeFetchGraphQlHeader"],"mappings":"qJAiBA,MAAMA,EAAe,CACnB,uBAAwB,yBACxB,sBAAuB,uBACzB,EAEMC,EAAkB,KCDXC,EACXC,GACqB,yBACd,MAAA,CACL,2BACEC,GAAAC,EAAAF,GAAA,YAAAA,EAAU,OAAV,YAAAE,EAAgB,cAAhB,YAAAD,EAA6B,6BAA8B,GAE7D,YAAWE,GAAAC,EAAAJ,GAAA,YAAAA,EAAU,OAAV,YAAAI,EAAgB,cAAhB,YAAAD,EAA6B,0BAA2B,EACnE,yBACE,GAACE,GAAAC,E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;AAAA,ECQjCF,EAAiB,SACrB,MAAMG,EAAaD,EAAkB,CAC1C,OAAQ,MACR,MAAO,aAAA,CACR,EACE,KAAM5B,GAAqC,OAC1C,OAAIE,EAAAF,EAAS,SAAT,MAAAE,EAAiB,OAAeS,EAAiBX,EAAS,MAAM,EAE7DD,EAAqBC,CAAQ,CAAA,CACrC,EACA,MAAM8B,CAAkB,EClBhBC,EAAwC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,ECUxCC,EAAc,MACzBC,EAAW,gBACXC,EAAO,WACJ,CACG,MAAAC,EAAQrB,EAAUjB,EAAa,sBAAsB,EAI3D,GAFAuC,EAAO,KAAK,gBAAiB,CAAC,CAACD,CAAK,EAEhC,EAACA,EAEL,OAAAE,EAAsBJ,EAAU,GAAGC,CAAI,IAAIC,CAAK,EAAE,EAE3CN,EAAaE,CAAuB,EAAE,KAAMO,GAAQ,QAC/BpC,EAAAoC,EAAI,SAAJ,MAAApC,EAAY,KACnCyB,GAAU,OAAA,QAAAzB,EAAAyB,EAAM,aAAN,YAAAzB,EAAkB,YAAa,6BAK5CmB,EAAaxB,EAAa,sBAAsB,EAChD0C,EAAyBN,CAAQ,EAC1BG,EAAA,KAAK,gBAAiB,EAAK,EAAA,CACnC,CACH"}
|
|
1
|
+
{"version":3,"file":"verifyToken.js","sources":["/@dropins/storefront-auth/src/configs/cookieConfigs.ts","/@dropins/storefront-auth/src/data/transforms/transform-store-config.ts","/@dropins/storefront-auth/src/lib/fetch-error.ts","/@dropins/storefront-auth/src/lib/cookieUtils.ts","/@dropins/storefront-auth/src/api/getStoreConfig/graphql/getStoreConfig.graphql.ts","/@dropins/storefront-auth/src/api/getStoreConfig/getStoreConfig.ts","/@dropins/storefront-auth/src/api/verifyToken/graphql/verifyToken.graphql.ts","/@dropins/storefront-auth/src/api/verifyToken/verifyToken.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nconst COOKIE_NAMES = {\n auth_dropin_user_token: 'auth_dropin_user_token',\n auth_dropin_firstname: 'auth_dropin_firstname',\n};\n\nconst COOKIE_LIFETIME = 3600;\n\nexport { COOKIE_NAMES, COOKIE_LIFETIME };\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { getStoreConfigResponse } from '@/auth/types';\nimport { COOKIE_LIFETIME } from '@/auth/configs/cookieConfigs';\nimport { StoreConfigModel } from '../models';\n\nexport const transformStoreConfig = (\n response: getStoreConfigResponse\n): StoreConfigModel => {\n return {\n autocompleteOnStorefront:\n response?.data?.storeConfig?.autocomplete_on_storefront || false,\n // Need information about min length in response undefined\n minLength: response?.data?.storeConfig?.minimum_password_length || 3,\n requiredCharacterClasses:\n +response?.data?.storeConfig?.required_character_classes_number || 0,\n createAccountConfirmation:\n response?.data?.storeConfig?.create_account_confirmation || false,\n customerAccessTokenLifetime:\n response?.data?.storeConfig?.customer_access_token_lifetime *\n COOKIE_LIFETIME || COOKIE_LIFETIME,\n };\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\n/** Actions */\nexport const handleFetchError = (errors: Array<{ message: string }>) => {\n const errorMessage = errors.map((e: any) => e.message).join(' ');\n\n throw Error(errorMessage);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\n/* eslint-disable no-useless-escape */\nimport { getStoreConfig } from '@/auth/api';\nimport { COOKIE_LIFETIME } from '@/auth/configs/cookieConfigs';\n\nexport const getCookie = (cookieName: string) => {\n const cookies = document.cookie.split(';');\n let foundValue;\n\n cookies.forEach((cookie) => {\n const [name, value] = cookie.trim().split('=');\n if (name === cookieName) {\n foundValue = decodeURIComponent(value);\n }\n });\n\n return foundValue;\n};\n\nexport const deleteCookie = (cookieName: string) => {\n document.cookie = `${cookieName}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`;\n};\n\nexport const getCookiesLifetime = async () => {\n try {\n const storeConfigString = sessionStorage.getItem('storeConfig');\n const cachedStoreConfig = storeConfigString\n ? JSON.parse(storeConfigString)\n : {};\n\n let accessTokenLifeTime = cachedStoreConfig.customerAccessTokenLifetime;\n\n if (!accessTokenLifeTime) {\n const storeConfig = await getStoreConfig();\n\n sessionStorage.setItem('storeConfig', JSON.stringify(storeConfig));\n\n accessTokenLifeTime =\n storeConfig?.customerAccessTokenLifetime || COOKIE_LIFETIME;\n }\n\n return `Max-Age=${accessTokenLifeTime}`;\n } catch (error) {\n console.error('getCookiesLifetime() Error:', error);\n return `Max-Age=${COOKIE_LIFETIME}`;\n }\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const GET_STORE_CONFIG = /* GraphQL */ `\n query GET_STORE_CONFIG {\n storeConfig {\n autocomplete_on_storefront\n minimum_password_length\n required_character_classes_number\n store_code\n store_name\n store_group_code\n locale\n create_account_confirmation\n customer_access_token_lifetime\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { getStoreConfigResponse } from '@/auth/types';\nimport { fetchGraphQl } from '../fetch-graphql';\nimport { GET_STORE_CONFIG } from './graphql/getStoreConfig.graphql';\nimport { handleNetworkError } from '@/auth/lib/network-error';\nimport { transformStoreConfig } from '@/auth/data/transforms';\nimport { StoreConfigModel } from '@/auth/data/models';\nimport { handleFetchError } from '@/auth/lib/fetch-error';\n\nexport const getStoreConfig = async (): Promise<StoreConfigModel> => {\n return await fetchGraphQl(GET_STORE_CONFIG, {\n method: 'GET',\n cache: 'force-cache',\n })\n .then((response: getStoreConfigResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n return transformStoreConfig(response);\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const VALIDATE_CUSTOMER_TOKEN = /* GraphQL */ `\n query VALIDATE_TOKEN {\n customerCart {\n id\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { events } from '@adobe-commerce/event-bus';\nimport {\n fetchGraphQl,\n removeFetchGraphQlHeader,\n setFetchGraphQlHeader,\n} from '../fetch-graphql';\nimport { deleteCookie, getCookie } from '@/auth/lib/cookieUtils';\nimport { COOKIE_NAMES } from '@/auth/configs/cookieConfigs';\nimport { VALIDATE_CUSTOMER_TOKEN } from './graphql/verifyToken.graphql';\n\nexport const verifyToken = async (\n authType = 'Authorization',\n type = 'Bearer'\n) => {\n const token = getCookie(COOKIE_NAMES.auth_dropin_user_token);\n\n events.emit('authenticated', !!token);\n\n if (!token) return;\n\n setFetchGraphQlHeader(authType, `${type} ${token}`);\n\n return fetchGraphQl(VALIDATE_CUSTOMER_TOKEN).then((res) => {\n const unauthenticated = !!res.errors?.find(\n (error) => error.extensions?.category === 'graphql-authentication'\n );\n\n if (!unauthenticated) return;\n\n deleteCookie(COOKIE_NAMES.auth_dropin_user_token);\n removeFetchGraphQlHeader(authType);\n events.emit('authenticated', false);\n });\n};\n"],"names":["COOKIE_NAMES","COOKIE_LIFETIME","transformStoreConfig","response","_b","_a","_d","_c","_f","_e","_h","_g","_j","_i","handleFetchError","errors","errorMessage","getCookie","cookieName","cookies","foundValue","cookie","name","value","deleteCookie","getCookiesLifetime","storeConfigString","accessTokenLifeTime","storeConfig","getStoreConfig","error","GET_STORE_CONFIG","fetchGraphQl","handleNetworkError","VALIDATE_CUSTOMER_TOKEN","verifyToken","authType","type","token","events","setFetchGraphQlHeader","res","removeFetchGraphQlHeader"],"mappings":"qJAiBA,MAAMA,EAAe,CACnB,uBAAwB,yBACxB,sBAAuB,uBACzB,EAEMC,EAAkB,KCDXC,EACXC,GACqB,yBACrB,MAAO,CACL,2BACEC,GAAAC,EAAAF,GAAA,YAAAA,EAAU,OAAV,YAAAE,EAAgB,cAAhB,YAAAD,EAA6B,6BAA8B,GAE7D,YAAWE,GAAAC,EAAAJ,GAAA,YAAAA,EAAU,OAAV,YAAAI,EAAgB,cAAhB,YAAAD,EAA6B,0BAA2B,EACnE,yBACE,GAACE,GAAAC,EAAAN,GAAA,YAAAA,EAAU,OAAV,YAAAM,EAAgB,cAAhB,YAAAD,EAA6B,oCAAqC,EACrE,4BACEE,GAAAC,EAAAR,GAAA,YAAAA,EAAU,OAAV,YAAAQ,EAAgB,cAAhB,YAAAD,EAA6B,8BAA+B,GAC9D,8BACEE,GAAAC,EAAAV,GAAA,YAAAA,EAAU,OAAV,YAAAU,EAAgB,cAAhB,YAAAD,EAA6B,gCAC3BX,GAAmBA,CAAA,CAE3B,ECnBaa,EAAoBC,GAAuC,CACtE,MAAMC,EAAeD,EAAO,IAAK,GAAW,EAAE,OAAO,EAAE,KAAK,GAAG,EAE/D,MAAM,MAAMC,CAAY,CAC1B,ECDaC,EAAaC,GAAuB,CAC/C,MAAMC,EAAU,SAAS,OAAO,MAAM,GAAG,EACzC,IAAIC,EAEJ,OAAAD,EAAQ,QAASE,GAAW,CAC1B,KAAM,CA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KAAMO,GAAQ,QAC/BpC,EAAAoC,EAAI,SAAJ,MAAApC,EAAY,KACnCyB,GAAA,OAAU,QAAAzB,EAAAyB,EAAM,aAAN,YAAAzB,EAAkB,YAAa,6BAK5CmB,EAAaxB,EAAa,sBAAsB,EAChD0C,EAAyBN,CAAQ,EACjCG,EAAO,KAAK,gBAAiB,EAAK,EACpC,CAAC,CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":"m5CAuBMA,EAAoBC,EACxB,UAAM,OAAO,oBAAqC,KACpD,EACMC,EAAaD,EAAK,
|
|
1
|
+
{"version":3,"mappings":"m5CAuBMA,EAAoBC,EACxB,UAAM,OAAO,oBAAqC,KACpD,EACMC,EAAaD,EAAK,IAAAE,EAAA,IAAM,OAAO,qBAA8B,KAAC,EAC9DC,EAAaH,EAAK,IAAAE,EAAA,IAAM,OAAO,qBAA8B,KAAC,EAEvDE,EAA2C,CAAC,CACvD,YAAAC,EAAc,aACd,iBAAAC,EACA,iBAAAC,EACA,wBAAAC,CACF,IAAM,CACJ,KAAM,CAACC,EAAiBC,CAAkB,EACxCC,EAA8BN,CAAW,EAErCO,EAAkBC,EACtB,KAAO,CACL,WACEC,EAACb,EAAA,CACC,mBAAAS,EACC,GAAGJ,CAAA,GAGR,WACEQ,EAACX,EAAA,CACC,mBAAAO,EACC,GAAGH,CAAA,GAGR,kBACEO,EAACf,EAAA,CACC,mBAAAW,EACC,GAAGF,CAAA,EACN,GAGJ,CACEA,EACAF,EACAC,EACAG,CAAA,CACF,EAGF,SACG,OACC,SAAAI,EAACC,GAAS,SAAUD,EAACE,GAAe,eAAgBP,CAAA,CAAiB,EACnE,SAAAK,EAAC,OAAI,UAAU,eAAgB,WAAgBL,CAAe,EAAE,EAClE,EACF,CAEJ","names":["ResetPasswordForm","lazy","SignInForm","__vitePreload","SignUpForm","AuthCombine","defaultView","signInFormConfig","signUpFormConfig","resetPasswordFormConfig","activeComponent","setActiveComponent","useState","renderComponent","useMemo","jsx","Suspense","SkeletonLoader"],"ignoreList":[],"sources":["/@dropins/storefront-auth/src/containers/AuthCombine/AuthCombine.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { Suspense, lazy } from 'preact/compat';\nimport { Container } from '@adobe-commerce/elsie/lib';\nimport { useMemo, useState } from 'preact/hooks';\nimport { AuthCombineProps, activeComponentType } from '@/auth/types';\nimport SkeletonLoader from '@/auth/components/SkeletonLoader';\n\nconst ResetPasswordForm = lazy(\n () => import('@/auth/components/ResetPasswordForm')\n);\nconst SignInForm = lazy(() => import('@/auth/components/SignInForm'));\nconst SignUpForm = lazy(() => import('@/auth/components/SignUpForm'));\n\nexport const AuthCombine: Container<AuthCombineProps> = ({\n defaultView = 'signInForm',\n signInFormConfig,\n signUpFormConfig,\n resetPasswordFormConfig,\n}) => {\n const [activeComponent, setActiveComponent] =\n useState<activeComponentType>(defaultView);\n\n const renderComponent = useMemo(\n () => ({\n signInForm: (\n <SignInForm\n setActiveComponent={setActiveComponent}\n {...signInFormConfig}\n />\n ),\n signUpForm: (\n <SignUpForm\n setActiveComponent={setActiveComponent}\n {...signUpFormConfig}\n />\n ),\n resetPasswordForm: (\n <ResetPasswordForm\n setActiveComponent={setActiveComponent}\n {...resetPasswordFormConfig}\n />\n ),\n }),\n [\n resetPasswordFormConfig,\n signInFormConfig,\n signUpFormConfig,\n setActiveComponent,\n ]\n );\n\n return (\n <div>\n <Suspense fallback={<SkeletonLoader activeSkeleton={activeComponent} />}>\n <div className=\"auth-combine\">{renderComponent[activeComponent]}</div>\n </Suspense>\n </div>\n );\n};\n"],"file":"containers/AuthCombine.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResetPassword.js","sources":["/@dropins/storefront-auth/src/containers/ResetPassword/ResetPassword.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { Container } from '@adobe-commerce/elsie/lib';\nimport { ResetPasswordForm } from '@/auth/components';\nimport { ResetPasswordProps } from '@/auth/types';\n\nexport const ResetPassword: Container<ResetPasswordProps> = ({\n formSize,\n routeSignIn,\n onErrorCallback,\n onSuccessCallback,\n}) => {\n return (\n <div className=\"auth-reset-password\">\n <ResetPasswordForm\n formSize={formSize}\n routeSignIn={routeSignIn}\n onErrorCallback={onErrorCallback}\n onSuccessCallback={onSuccessCallback}\n />\n </div>\n );\n};\n"],"names":["ResetPassword","formSize","routeSignIn","onErrorCallback","onSuccessCallback","jsx","ResetPasswordForm"],"mappings":"qqBAqBO,MAAMA,EAA+C,CAAC,CAC3D,SAAAC,EACA,YAAAC,EACA,gBAAAC,EACA,kBAAAC,CACF,IAEIC,EAAC,
|
|
1
|
+
{"version":3,"file":"ResetPassword.js","sources":["/@dropins/storefront-auth/src/containers/ResetPassword/ResetPassword.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { Container } from '@adobe-commerce/elsie/lib';\nimport { ResetPasswordForm } from '@/auth/components';\nimport { ResetPasswordProps } from '@/auth/types';\n\nexport const ResetPassword: Container<ResetPasswordProps> = ({\n formSize,\n routeSignIn,\n onErrorCallback,\n onSuccessCallback,\n}) => {\n return (\n <div className=\"auth-reset-password\">\n <ResetPasswordForm\n formSize={formSize}\n routeSignIn={routeSignIn}\n onErrorCallback={onErrorCallback}\n onSuccessCallback={onSuccessCallback}\n />\n </div>\n );\n};\n"],"names":["ResetPassword","formSize","routeSignIn","onErrorCallback","onSuccessCallback","jsx","ResetPasswordForm"],"mappings":"qqBAqBO,MAAMA,EAA+C,CAAC,CAC3D,SAAAC,EACA,YAAAC,EACA,gBAAAC,EACA,kBAAAC,CACF,IAEIC,EAAC,MAAA,CAAI,UAAU,sBACb,SAAAA,EAACC,EAAA,CACC,SAAAL,EACA,YAAAC,EACA,gBAAAC,EACA,kBAAAC,CAAA,CAAA,EAEJ"}
|
package/containers/SignIn.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignIn.js","sources":["/@dropins/storefront-auth/src/containers/SignIn/SignIn.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { Container } from '@adobe-commerce/elsie/lib';\nimport { SignInForm } from '@/auth/components';\nimport { SignInProps } from '@/auth/types';\n\nexport const SignIn: Container<SignInProps> = ({\n slots,\n labels,\n enableEmailConfirmation,\n initialEmailValue,\n formSize,\n renderSignUpLink,\n hideCloseBtnOnEmailConfirmation,\n routeRedirectOnEmailConfirmationClose,\n routeRedirectOnSignIn,\n routeForgotPassword,\n routeSignUp,\n onSuccessCallback,\n onErrorCallback,\n onSignUpLinkClick,\n}) => {\n return (\n <div className=\"auth-sign-in\">\n <SignInForm\n slots={slots}\n labels={labels}\n formSize={formSize}\n renderSignUpLink={renderSignUpLink}\n initialEmailValue={initialEmailValue}\n enableEmailConfirmation={enableEmailConfirmation}\n hideCloseBtnOnEmailConfirmation={hideCloseBtnOnEmailConfirmation}\n routeRedirectOnEmailConfirmationClose={\n routeRedirectOnEmailConfirmationClose\n }\n routeSignUp={routeSignUp}\n onErrorCallback={onErrorCallback}\n onSuccessCallback={onSuccessCallback}\n onSignUpLinkClick={onSignUpLinkClick}\n routeForgotPassword={routeForgotPassword}\n routeRedirectOnSignIn={routeRedirectOnSignIn}\n />\n </div>\n );\n};\n"],"names":["SignIn","slots","labels","enableEmailConfirmation","initialEmailValue","formSize","renderSignUpLink","hideCloseBtnOnEmailConfirmation","routeRedirectOnEmailConfirmationClose","routeRedirectOnSignIn","routeForgotPassword","routeSignUp","onSuccessCallback","onErrorCallback","onSignUpLinkClick","jsx","SignInForm"],"mappings":"s4BAqBO,MAAMA,EAAiC,CAAC,CAC7C,MAAAC,EACA,OAAAC,EACA,wBAAAC,EACA,kBAAAC,EACA,SAAAC,EACA,iBAAAC,EACA,gCAAAC,EACA,sCAAAC,EACA,sBAAAC,EACA,oBAAAC,EACA,YAAAC,EACA,kBAAAC,EACA,gBAAAC,EACA,kBAAAC,CACF,IAEIC,EAAC,
|
|
1
|
+
{"version":3,"file":"SignIn.js","sources":["/@dropins/storefront-auth/src/containers/SignIn/SignIn.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { Container } from '@adobe-commerce/elsie/lib';\nimport { SignInForm } from '@/auth/components';\nimport { SignInProps } from '@/auth/types';\n\nexport const SignIn: Container<SignInProps> = ({\n slots,\n labels,\n enableEmailConfirmation,\n initialEmailValue,\n formSize,\n renderSignUpLink,\n hideCloseBtnOnEmailConfirmation,\n routeRedirectOnEmailConfirmationClose,\n routeRedirectOnSignIn,\n routeForgotPassword,\n routeSignUp,\n onSuccessCallback,\n onErrorCallback,\n onSignUpLinkClick,\n}) => {\n return (\n <div className=\"auth-sign-in\">\n <SignInForm\n slots={slots}\n labels={labels}\n formSize={formSize}\n renderSignUpLink={renderSignUpLink}\n initialEmailValue={initialEmailValue}\n enableEmailConfirmation={enableEmailConfirmation}\n hideCloseBtnOnEmailConfirmation={hideCloseBtnOnEmailConfirmation}\n routeRedirectOnEmailConfirmationClose={\n routeRedirectOnEmailConfirmationClose\n }\n routeSignUp={routeSignUp}\n onErrorCallback={onErrorCallback}\n onSuccessCallback={onSuccessCallback}\n onSignUpLinkClick={onSignUpLinkClick}\n routeForgotPassword={routeForgotPassword}\n routeRedirectOnSignIn={routeRedirectOnSignIn}\n />\n </div>\n );\n};\n"],"names":["SignIn","slots","labels","enableEmailConfirmation","initialEmailValue","formSize","renderSignUpLink","hideCloseBtnOnEmailConfirmation","routeRedirectOnEmailConfirmationClose","routeRedirectOnSignIn","routeForgotPassword","routeSignUp","onSuccessCallback","onErrorCallback","onSignUpLinkClick","jsx","SignInForm"],"mappings":"s4BAqBO,MAAMA,EAAiC,CAAC,CAC7C,MAAAC,EACA,OAAAC,EACA,wBAAAC,EACA,kBAAAC,EACA,SAAAC,EACA,iBAAAC,EACA,gCAAAC,EACA,sCAAAC,EACA,sBAAAC,EACA,oBAAAC,EACA,YAAAC,EACA,kBAAAC,EACA,gBAAAC,EACA,kBAAAC,CACF,IAEIC,EAAC,MAAA,CAAI,UAAU,eACb,SAAAA,EAACC,EAAA,CACC,MAAAf,EACA,OAAAC,EACA,SAAAG,EACA,iBAAAC,EACA,kBAAAF,EACA,wBAAAD,EACA,gCAAAI,EACA,sCAAAC,EAGA,YAAAG,EACA,gBAAAE,EACA,kBAAAD,EACA,kBAAAE,EACA,oBAAAJ,EACA,sBAAAD,CAAA,CAAA,EAEJ"}
|
package/containers/SignUp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignUp.js","sources":["/@dropins/storefront-auth/src/containers/SignUp/SignUp.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { Container } from '@adobe-commerce/elsie/lib';\nimport { SignUpForm } from '@/auth/components';\nimport { SignUpProps } from '@/auth/types';\n\nexport const SignUp: Container<SignUpProps> = ({\n slots,\n formSize,\n apiVersion2,\n addressesData,\n isAutoSignInEnabled,\n requireRetypePassword,\n inputsDefaultValueSet,\n fieldsConfigForApiVersion1,\n hideCloseBtnOnEmailConfirmation,\n routeRedirectOnEmailConfirmationClose,\n routeRedirectOnSignIn,\n onSuccessCallback,\n onErrorCallback,\n routeSignIn,\n}) => {\n return (\n <div className=\"auth-sign-up\">\n <SignUpForm\n requireRetypePassword={requireRetypePassword}\n formSize={formSize}\n apiVersion2={apiVersion2}\n addressesData={addressesData}\n isAutoSignInEnabled={isAutoSignInEnabled}\n inputsDefaultValueSet={inputsDefaultValueSet}\n fieldsConfigForApiVersion1={fieldsConfigForApiVersion1}\n hideCloseBtnOnEmailConfirmation={hideCloseBtnOnEmailConfirmation}\n routeRedirectOnEmailConfirmationClose={\n routeRedirectOnEmailConfirmationClose\n }\n routeRedirectOnSignIn={routeRedirectOnSignIn}\n routeSignIn={routeSignIn}\n slots={slots}\n onErrorCallback={onErrorCallback}\n onSuccessCallback={onSuccessCallback}\n />\n </div>\n );\n};\n"],"names":["SignUp","slots","formSize","apiVersion2","addressesData","isAutoSignInEnabled","requireRetypePassword","inputsDefaultValueSet","fieldsConfigForApiVersion1","hideCloseBtnOnEmailConfirmation","routeRedirectOnEmailConfirmationClose","routeRedirectOnSignIn","onSuccessCallback","onErrorCallback","routeSignIn","jsx","SignUpForm"],"mappings":"q+BAqBO,MAAMA,EAAiC,CAAC,CAC7C,MAAAC,EACA,SAAAC,EACA,YAAAC,EACA,cAAAC,EACA,oBAAAC,EACA,sBAAAC,EACA,sBAAAC,EACA,2BAAAC,EACA,gCAAAC,EACA,sCAAAC,EACA,sBAAAC,EACA,kBAAAC,EACA,gBAAAC,EACA,YAAAC,CACF,IAEIC,EAAC,
|
|
1
|
+
{"version":3,"file":"SignUp.js","sources":["/@dropins/storefront-auth/src/containers/SignUp/SignUp.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { Container } from '@adobe-commerce/elsie/lib';\nimport { SignUpForm } from '@/auth/components';\nimport { SignUpProps } from '@/auth/types';\n\nexport const SignUp: Container<SignUpProps> = ({\n slots,\n formSize,\n apiVersion2,\n addressesData,\n isAutoSignInEnabled,\n requireRetypePassword,\n inputsDefaultValueSet,\n fieldsConfigForApiVersion1,\n hideCloseBtnOnEmailConfirmation,\n routeRedirectOnEmailConfirmationClose,\n routeRedirectOnSignIn,\n onSuccessCallback,\n onErrorCallback,\n routeSignIn,\n}) => {\n return (\n <div className=\"auth-sign-up\">\n <SignUpForm\n requireRetypePassword={requireRetypePassword}\n formSize={formSize}\n apiVersion2={apiVersion2}\n addressesData={addressesData}\n isAutoSignInEnabled={isAutoSignInEnabled}\n inputsDefaultValueSet={inputsDefaultValueSet}\n fieldsConfigForApiVersion1={fieldsConfigForApiVersion1}\n hideCloseBtnOnEmailConfirmation={hideCloseBtnOnEmailConfirmation}\n routeRedirectOnEmailConfirmationClose={\n routeRedirectOnEmailConfirmationClose\n }\n routeRedirectOnSignIn={routeRedirectOnSignIn}\n routeSignIn={routeSignIn}\n slots={slots}\n onErrorCallback={onErrorCallback}\n onSuccessCallback={onSuccessCallback}\n />\n </div>\n );\n};\n"],"names":["SignUp","slots","formSize","apiVersion2","addressesData","isAutoSignInEnabled","requireRetypePassword","inputsDefaultValueSet","fieldsConfigForApiVersion1","hideCloseBtnOnEmailConfirmation","routeRedirectOnEmailConfirmationClose","routeRedirectOnSignIn","onSuccessCallback","onErrorCallback","routeSignIn","jsx","SignUpForm"],"mappings":"q+BAqBO,MAAMA,EAAiC,CAAC,CAC7C,MAAAC,EACA,SAAAC,EACA,YAAAC,EACA,cAAAC,EACA,oBAAAC,EACA,sBAAAC,EACA,sBAAAC,EACA,2BAAAC,EACA,gCAAAC,EACA,sCAAAC,EACA,sBAAAC,EACA,kBAAAC,EACA,gBAAAC,EACA,YAAAC,CACF,IAEIC,EAAC,MAAA,CAAI,UAAU,eACb,SAAAA,EAACC,EAAA,CACC,sBAAAV,EACA,SAAAJ,EACA,YAAAC,EACA,cAAAC,EACA,oBAAAC,EACA,sBAAAE,EACA,2BAAAC,EACA,gCAAAC,EACA,sCAAAC,EAGA,sBAAAC,EACA,YAAAG,EACA,MAAAb,EACA,gBAAAY,EACA,kBAAAD,CAAA,CAAA,EAEJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuccessNotification.js","sources":["/@dropins/storefront-auth/src/components/SuccessNotificationForm/SuccessNotificationForm.tsx","/@dropins/storefront-auth/src/containers/SuccessNotification/SuccessNotification.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes, Slot } from '@adobe-commerce/elsie/lib';\nimport '@/auth/components/SuccessNotificationForm/SuccessNotificationForm.css';\nimport { Button } from '@adobe-commerce/elsie/components';\nimport { SuccessNotificationFormProps } from '@/auth/types';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { revokeCustomerToken } from '@/auth/api';\n\nexport const SuccessNotificationForm: FunctionComponent<\n SuccessNotificationFormProps & HTMLAttributes<HTMLDivElement>\n> = ({ formSize = 'default', className = '', slots, labels }) => {\n const translations = useText({\n headingText: 'Auth.SuccessNotification.headingText',\n messageText: 'Auth.SuccessNotification.messageText',\n primaryButtonText: 'Auth.SuccessNotification.primaryButtonText',\n secondaryButtonText: 'Auth.SuccessNotification.secondaryButtonText',\n });\n\n return (\n <div\n className={classes([\n 'auth-success-notification-form',\n `auth-success-notification-form--${formSize}`,\n className,\n ])}\n id=\"welcome-message\"\n role=\"alert\"\n aria-live=\"assertive\"\n aria-labelledby={labels?.headingText ?? translations.headingText}\n aria-describedby={labels?.messageText ?? translations.messageText}\n tab-index=\"-1\"\n >\n <p\n id=\"welcome-heading\"\n className=\"auth-success-notification-form__title\"\n data-testid=\"notification-title\"\n >\n {labels?.headingText ?? translations.headingText}\n </p>\n <p\n id=\"welcome-details\"\n className=\"auth-success-notification-form__content-text\"\n data-testid=\"notification-content\"\n >\n {labels?.messageText ?? translations.messageText}\n </p>\n {slots?.SuccessNotificationActions ? (\n <Slot\n data-testid=\"successNotificationActions\"\n name=\"SuccessNotificationActions\"\n slot={slots?.SuccessNotificationActions}\n context={{}}\n />\n ) : (\n <>\n <Button\n data-testid=\"primaryButton\"\n type=\"button\"\n className=\"auth-success-notification-form__button auth-success-notification-form__button--top\"\n onClick={() => (window.location.href = '/')}\n >\n {translations.primaryButtonText}\n </Button>\n <Button\n data-testid=\"secondaryButton\"\n type=\"button\"\n variant=\"tertiary\"\n onClick={async () => {\n await revokeCustomerToken();\n window.location.href = '/';\n }}\n >\n {translations.secondaryButtonText}\n </Button>\n </>\n )}\n </div>\n );\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { Container } from '@adobe-commerce/elsie/lib';\nimport { SuccessNotificationForm } from '@/auth/components';\nimport { SuccessNotificationProps } from '@/auth/types';\n\nexport const SuccessNotification: Container<SuccessNotificationProps> = ({\n formSize = 'default',\n slots,\n className,\n labels,\n}) => {\n return (\n <div className=\"auth-success-notification\">\n <SuccessNotificationForm\n formSize={formSize}\n className={className}\n slots={slots}\n labels={labels}\n />\n </div>\n );\n};\n"],"names":["SuccessNotificationForm","formSize","className","slots","labels","translations","useText","jsxs","classes","jsx","Slot","Fragment","Button","revokeCustomerToken","SuccessNotification"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SuccessNotification.js","sources":["/@dropins/storefront-auth/src/components/SuccessNotificationForm/SuccessNotificationForm.tsx","/@dropins/storefront-auth/src/containers/SuccessNotification/SuccessNotification.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes, Slot } from '@adobe-commerce/elsie/lib';\nimport '@/auth/components/SuccessNotificationForm/SuccessNotificationForm.css';\nimport { Button } from '@adobe-commerce/elsie/components';\nimport { SuccessNotificationFormProps } from '@/auth/types';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { revokeCustomerToken } from '@/auth/api';\n\nexport const SuccessNotificationForm: FunctionComponent<\n SuccessNotificationFormProps & HTMLAttributes<HTMLDivElement>\n> = ({ formSize = 'default', className = '', slots, labels }) => {\n const translations = useText({\n headingText: 'Auth.SuccessNotification.headingText',\n messageText: 'Auth.SuccessNotification.messageText',\n primaryButtonText: 'Auth.SuccessNotification.primaryButtonText',\n secondaryButtonText: 'Auth.SuccessNotification.secondaryButtonText',\n });\n\n return (\n <div\n className={classes([\n 'auth-success-notification-form',\n `auth-success-notification-form--${formSize}`,\n className,\n ])}\n id=\"welcome-message\"\n role=\"alert\"\n aria-live=\"assertive\"\n aria-labelledby={labels?.headingText ?? translations.headingText}\n aria-describedby={labels?.messageText ?? translations.messageText}\n tab-index=\"-1\"\n >\n <p\n id=\"welcome-heading\"\n className=\"auth-success-notification-form__title\"\n data-testid=\"notification-title\"\n >\n {labels?.headingText ?? translations.headingText}\n </p>\n <p\n id=\"welcome-details\"\n className=\"auth-success-notification-form__content-text\"\n data-testid=\"notification-content\"\n >\n {labels?.messageText ?? translations.messageText}\n </p>\n {slots?.SuccessNotificationActions ? (\n <Slot\n data-testid=\"successNotificationActions\"\n name=\"SuccessNotificationActions\"\n slot={slots?.SuccessNotificationActions}\n context={{}}\n />\n ) : (\n <>\n <Button\n data-testid=\"primaryButton\"\n type=\"button\"\n className=\"auth-success-notification-form__button auth-success-notification-form__button--top\"\n onClick={() => (window.location.href = '/')}\n >\n {translations.primaryButtonText}\n </Button>\n <Button\n data-testid=\"secondaryButton\"\n type=\"button\"\n variant=\"tertiary\"\n onClick={async () => {\n await revokeCustomerToken();\n window.location.href = '/';\n }}\n >\n {translations.secondaryButtonText}\n </Button>\n </>\n )}\n </div>\n );\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { Container } from '@adobe-commerce/elsie/lib';\nimport { SuccessNotificationForm } from '@/auth/components';\nimport { SuccessNotificationProps } from '@/auth/types';\n\nexport const SuccessNotification: Container<SuccessNotificationProps> = ({\n formSize = 'default',\n slots,\n className,\n labels,\n}) => {\n return (\n <div className=\"auth-success-notification\">\n <SuccessNotificationForm\n formSize={formSize}\n className={className}\n slots={slots}\n labels={labels}\n />\n </div>\n );\n};\n"],"names":["SuccessNotificationForm","formSize","className","slots","labels","translations","useText","jsxs","classes","jsx","Slot","Fragment","Button","revokeCustomerToken","SuccessNotification"],"mappings":"kmBA0BO,MAAMA,EAET,CAAC,CAAE,SAAAC,EAAW,UAAW,UAAAC,EAAY,GAAI,MAAAC,EAAO,OAAAC,KAAa,CA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,OAAAC,CAAA,CAAA,EAEJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdatePassword.js","sources":["/@dropins/storefront-auth/src/lib/getUrlParam.ts","/@dropins/storefront-auth/src/hooks/components/useUpdatePasswordForm.tsx","/@dropins/storefront-auth/src/components/UpdatePasswordForm/UpdatePasswordForm.tsx","/@dropins/storefront-auth/src/containers/UpdatePassword/UpdatePassword.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const getUrlParam = (url: string, param: string): string => {\n const result = url\n .split('&')\n .filter((el) => el.includes(param))\n .map((item) => {\n return item.split('=')[1];\n });\n\n return result[0];\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { resetPassword, getCustomerToken } from '@/auth/api';\nimport { getFormValues } from '@/auth/lib/getFormValues';\nimport { getUrlParam } from '@/auth/lib/getUrlParam';\nimport { validationUniqueSymbolsPassword } from '@/auth/lib/validationUniqueSymbolsPassword';\nimport { useCallback, useEffect, useState } from 'preact/hooks';\nimport {\n AdditionalActionsAlertProps,\n UseUpdatePasswordFormProps,\n} from '@/auth/types';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { checkIsFunction } from '@/auth/lib/checkIsFunction';\n\nexport const useUpdatePasswordForm = ({\n isEmailConfirmationRequired,\n signInOnSuccess,\n passwordConfigs,\n routeRedirectOnSignIn,\n routeWrongUrlRedirect,\n onErrorCallback,\n onSuccessCallback,\n handleSetInLineAlertProps,\n routeRedirectOnPasswordUpdate,\n routeSignInPage,\n}: UseUpdatePasswordFormProps) => {\n const translations = useText({\n errorNotification: 'Auth.Notification.errorNotification',\n updatePasswordMessage: 'Auth.Notification.updatePasswordMessage',\n updatePasswordActionMessage:\n 'Auth.Notification.updatePasswordActionMessage',\n customerTokenErrorMessage: 'Auth.Api.customerTokenErrorMessage',\n });\n\n const [isSuccessful, setIsSuccessful] = useState({\n userName: '',\n status: false,\n });\n const [updatePasswordValue, setUpdatePasswordValue] = useState('');\n const [isClickSubmit, setIsClickSubmit] = useState(false);\n const [email, setEmail] = useState('');\n const [token, setToken] = useState('');\n const [isLoading, setIsLoading] = useState(false);\n const [passwordError, setPasswordError] = useState(false);\n const [additionalActionsAlert, setAdditionalActionsAlert] =\n useState<AdditionalActionsAlertProps>([]);\n\n useEffect(() => {\n if (isClickSubmit && !additionalActionsAlert.length) {\n if (updatePasswordValue.length) {\n setPasswordError(false);\n } else {\n setPasswordError(true);\n }\n }\n }, [isClickSubmit, updatePasswordValue, additionalActionsAlert]);\n\n useEffect(() => {\n const { search } = window.location;\n\n if (\n !search.includes('token=') &&\n !search.includes('email=') &&\n checkIsFunction(routeWrongUrlRedirect)\n ) {\n window.location.href = routeWrongUrlRedirect();\n }\n\n const url = decodeURIComponent(search);\n const tokenParam = getUrlParam(url, 'token');\n const emailParam = getUrlParam(url, 'email');\n\n setEmail(emailParam);\n setToken(tokenParam);\n }, [routeWrongUrlRedirect]);\n\n const submitUpdatePassword = useCallback(\n async (event: Event): Promise<void> => {\n event.preventDefault();\n\n setIsLoading(true);\n setAdditionalActionsAlert([]);\n\n const formValues = getFormValues(event.target);\n const validationData = formValues?.password && email && token;\n\n if (!formValues?.password) {\n setPasswordError(true);\n setIsLoading(false);\n }\n\n const requiredCharacterClasses =\n passwordConfigs?.requiredCharacterClasses ?? 0;\n const minLength = passwordConfigs?.minLength ?? 0;\n\n if (\n !validationUniqueSymbolsPassword(\n formValues?.password,\n requiredCharacterClasses\n ) ||\n formValues.password.length < +minLength\n ) {\n setIsClickSubmit(true);\n setIsLoading(false);\n\n return;\n }\n\n if (!validationData) {\n handleSetInLineAlertProps({\n type: 'error',\n text: translations.errorNotification,\n });\n\n setIsLoading(false);\n\n return;\n }\n\n const { message, success } = await resetPassword(\n email,\n token,\n formValues.password\n );\n\n if (success) {\n if (\n isEmailConfirmationRequired ||\n (!isEmailConfirmationRequired && !signInOnSuccess)\n ) {\n onSuccessCallback?.();\n\n if (checkIsFunction(routeRedirectOnPasswordUpdate)) {\n window.location.href = routeRedirectOnPasswordUpdate();\n }\n\n setIsClickSubmit(true);\n setIsLoading(false);\n setPasswordError(false);\n setUpdatePasswordValue('');\n setAdditionalActionsAlert([\n {\n label: translations.updatePasswordActionMessage,\n onClick: () => {\n window.location.href = routeSignInPage?.() as string;\n },\n },\n ]);\n handleSetInLineAlertProps({\n type: 'success',\n text: translations.updatePasswordMessage,\n });\n\n return;\n }\n\n const loginResponse = await getCustomerToken({\n email,\n password: formValues.password,\n handleSetInLineAlertProps,\n onErrorCallback,\n translations,\n });\n\n if (loginResponse?.userName) {\n onSuccessCallback?.(loginResponse?.userName);\n\n if (checkIsFunction(routeRedirectOnSignIn)) {\n window.location.href = routeRedirectOnSignIn();\n } else {\n setIsSuccessful({\n userName: loginResponse?.userName,\n status: true,\n });\n }\n }\n } else {\n handleSetInLineAlertProps({ type: 'error', text: message });\n onErrorCallback?.({ message, success });\n }\n\n setIsLoading(false);\n },\n [\n email,\n token,\n passwordConfigs?.requiredCharacterClasses,\n passwordConfigs?.minLength,\n translations,\n isEmailConfirmationRequired,\n signInOnSuccess,\n routeSignInPage,\n onErrorCallback,\n onSuccessCallback,\n routeRedirectOnSignIn,\n handleSetInLineAlertProps,\n routeRedirectOnPasswordUpdate,\n ]\n );\n\n const handleSetUpdatePasswordValue = useCallback((value: string) => {\n setUpdatePasswordValue(value);\n }, []);\n\n return {\n additionalActionsAlert,\n passwordError,\n isSuccessful,\n updatePasswordValue,\n isClickSubmit,\n isLoading,\n submitUpdatePassword,\n handleSetUpdatePasswordValue,\n setIsClickSubmit,\n };\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { classes, Slot } from '@adobe-commerce/elsie/lib';\nimport { useGetStoreConfigs } from '@/auth/hooks/api/useGetStoreConfigs';\nimport { usePasswordValidationMessage } from '@/auth/hooks/components/usePasswordValidationMessage';\nimport { useUpdatePasswordForm } from '@/auth/hooks/components/useUpdatePasswordForm';\nimport { UpdatePasswordFormProps } from '@/auth/types';\nimport { Form, Button } from '@/auth/components';\nimport { useInLineAlert } from '@/auth/hooks/useInLineAlert';\nimport { Header, InLineAlert, InputPassword } from '@adobe-commerce/elsie/components';\nimport '@/auth/components/UpdatePasswordForm/UpdatePasswordForm.css';\nimport { useCustomTranslations } from '@/auth/hooks/useCustomTranslations';\n\nexport const UpdatePasswordForm: FunctionComponent<UpdatePasswordFormProps> = ({\n signInOnSuccess = true,\n formSize = 'default',\n routeRedirectOnSignIn,\n routeWrongUrlRedirect,\n routeSignInPage,\n slots,\n onErrorCallback,\n onSuccessCallback,\n routeRedirectOnPasswordUpdate,\n}) => {\n /**\n * useCustomTranslations is required to support extensibility of error messages.\n * Ensure all error-related translation paths include \".default\"\n * to allow future handling of dynamic or nested error messages.\n */\n const translations = useCustomTranslations({\n title: 'Auth.UpdatePasswordForm.title',\n buttonPrimary: 'Auth.UpdatePasswordForm.buttonPrimary',\n placeholder: 'Auth.InputPassword.placeholder',\n floatingLabel: 'Auth.InputPassword.floatingLabel',\n requiredFieldError: 'Auth.FormText.requiredFieldError.default',\n });\n\n const { passwordConfigs, isEmailConfirmationRequired } = useGetStoreConfigs();\n\n const { inLineAlertProps, handleSetInLineAlertProps } = useInLineAlert();\n\n const {\n additionalActionsAlert,\n passwordError,\n isSuccessful,\n updatePasswordValue,\n isClickSubmit,\n isLoading,\n submitUpdatePassword,\n handleSetUpdatePasswordValue,\n } = useUpdatePasswordForm({\n isEmailConfirmationRequired,\n signInOnSuccess,\n passwordConfigs,\n routeRedirectOnSignIn,\n routeWrongUrlRedirect,\n onErrorCallback,\n onSuccessCallback,\n handleSetInLineAlertProps,\n routeRedirectOnPasswordUpdate,\n routeSignInPage,\n });\n\n const { isValidUniqueSymbols, defaultLengthMessage } =\n usePasswordValidationMessage({\n password: updatePasswordValue,\n isClickSubmit,\n passwordConfigs,\n });\n\n if (isSuccessful.status && slots?.SuccessNotification) {\n return (\n <Slot\n data-testid=\"successNotificationTestId\"\n name=\"SuccessNotification\"\n slot={slots?.SuccessNotification}\n context={{ isSuccessful }}\n />\n );\n }\n\n return (\n <div\n className={classes([\n 'auth-update-password-form',\n `auth-update-password-form--${formSize}`,\n ])}\n >\n <Header\n title={translations.title}\n divider={false}\n className=\"auth-update-password-form__title\"\n />\n <InLineAlert\n className={classes([\n 'auth-update-password-form__notification',\n [\n 'auth-update-password-form__notification--show',\n !!inLineAlertProps?.text,\n ],\n ])}\n variant=\"secondary\"\n heading={inLineAlertProps?.text as string}\n icon={inLineAlertProps.icon}\n additionalActions={additionalActionsAlert}\n />\n <Form\n name=\"updatePassword_form\"\n className=\"auth-update-password-form__form\"\n onSubmit={submitUpdatePassword}\n loading={isLoading}\n fieldsConfig={[]}\n >\n <div style=\"display: none;\">\n <input\n type=\"text\"\n id=\"username\"\n name=\"username\"\n autoComplete=\"username\"\n />\n </div>\n <InputPassword\n defaultValue={updatePasswordValue}\n onValue={handleSetUpdatePasswordValue}\n className=\"auth-update-password-form__form__item\"\n autoComplete={'new-password'}\n name={'password'}\n errorMessage={\n passwordError ||\n isValidUniqueSymbols === 'error' ||\n defaultLengthMessage?.status === 'error'\n ? translations.requiredFieldError\n : undefined\n }\n minLength={passwordConfigs?.minLength}\n uniqueSymbolsStatus={isValidUniqueSymbols}\n validateLengthConfig={defaultLengthMessage}\n requiredCharacterClasses={passwordConfigs?.requiredCharacterClasses}\n placeholder={translations.placeholder}\n floatingLabel={translations.floatingLabel}\n />\n\n <div className=\"auth-update-password-form__button\">\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","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { Container } from '@adobe-commerce/elsie/lib';\nimport { UpdatePasswordForm } from '@/auth/components';\nimport { UpdatePasswordProps } from '@/auth/types';\n\nexport const UpdatePassword: Container<UpdatePasswordProps> = ({\n slots,\n formSize,\n signInOnSuccess,\n routeRedirectOnPasswordUpdate,\n routeRedirectOnSignIn,\n routeSignInPage,\n routeWrongUrlRedirect,\n onErrorCallback,\n onSuccessCallback,\n}) => {\n return (\n <div className=\"auth-update-password\">\n <UpdatePasswordForm\n formSize={formSize}\n signInOnSuccess={signInOnSuccess}\n routeSignInPage={routeSignInPage}\n routeRedirectOnSignIn={routeRedirectOnSignIn}\n routeWrongUrlRedirect={routeWrongUrlRedirect}\n onErrorCallback={onErrorCallback}\n onSuccessCallback={onSuccessCallback}\n slots={slots}\n routeRedirectOnPasswordUpdate={routeRedirectOnPasswordUpdate}\n />\n </div>\n );\n};\n"],"names":["getUrlParam","url","param","el","item","useUpdatePasswordForm","isEmailConfirmationRequired","signInOnSuccess","passwordConfigs","routeRedirectOnSignIn","routeWrongUrlRedirect","onErrorCallback","onSuccessCallback","handleSetInLineAlertProps","routeRedirectOnPasswordUpdate","routeSignInPage","translations","useText","isSuccessful","setIsSuccessful","useState","updatePasswordValue","setUpdatePasswordValue","isClickSubmit","setIsClickSubmit","email","setEmail","token","setToken","isLoading","setIsLoading","passwordError","setPasswordError","additionalActionsAlert","setAdditionalActionsAlert","useEffect","search","checkIsFunction","tokenParam","emailParam","submitUpdatePassword","useCallback","event","formValues","getFormValues","validationData","requiredCharacterClasses","minLength","validationUniqueSymbolsPassword","message","success","resetPassword","loginResponse","getCustomerToken","handleSetUpdatePasswordValue","value","UpdatePasswordForm","formSize","slots","useCustomTranslations","useGetStoreConfigs","inLineAlertProps","useInLineAlert","isValidUniqueSymbols","defaultLengthMessage","usePasswordValidationMessage","jsx","Slot","jsxs","classes","Header","InLineAlert","Form","InputPassword","Button","UpdatePassword"],"mappings":"y9BAiBa,MAAAA,EAAc,CAACC,EAAaC,IACxBD,EACZ,MAAM,GAAG,EACT,OAAQE,GAAOA,EAAG,SAASD,CAAK,CAAC,EACjC,IAAKE,GACGA,EAAK,MAAM,GAAG,EAAE,CAAC,CACzB,EAEW,CAAC,ECIJC,GAAwB,CAAC,CACpC,4BAAAC,EACA,gBAAAC,EACA,gBAAAC,EACA,sBAAAC,EACA,sBAAAC,EACA,gBAAAC,EACA,kBAAAC,EACA,0BAAAC,EACA,8BAAAC,EACA,gBAAAC,CACF,IAAkC,CAChC,MAAMC,EAAeC,GAAQ,CAC3B,kBAAmB,sCACnB,sBAAuB,0CACvB,4BACE,gDACF,0BAA2B,oCAAA,CAC5B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AC,CAC7D,MAAAjB,EACA,SAAAD,EACA,gBAAAlD,EACA,8BAAAO,EACA,sBAAAL,EACA,gBAAAM,EACA,sBAAAL,EACA,gBAAAC,EACA,kBAAAC,CACF,IAEIsD,EAAC,MAAI,CAAA,UAAU,uBACb,SAAAA,EAACV,GAAA,CACC,SAAAC,EACA,gBAAAlD,EACA,gBAAAQ,EACA,sBAAAN,EACA,sBAAAC,EACA,gBAAAC,EACA,kBAAAC,EACA,MAAA8C,EACA,8BAAA5C,CAAA,CAAA,EAEJ"}
|
|
1
|
+
{"version":3,"file":"UpdatePassword.js","sources":["/@dropins/storefront-auth/src/lib/getUrlParam.ts","/@dropins/storefront-auth/src/hooks/components/useUpdatePasswordForm.tsx","/@dropins/storefront-auth/src/components/UpdatePasswordForm/UpdatePasswordForm.tsx","/@dropins/storefront-auth/src/containers/UpdatePassword/UpdatePassword.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const getUrlParam = (url: string, param: string): string => {\n const result = url\n .split('&')\n .filter((el) => el.includes(param))\n .map((item) => {\n return item.split('=')[1];\n });\n\n return result[0];\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { resetPassword, getCustomerToken } from '@/auth/api';\nimport { getFormValues } from '@/auth/lib/getFormValues';\nimport { getUrlParam } from '@/auth/lib/getUrlParam';\nimport { validationUniqueSymbolsPassword } from '@/auth/lib/validationUniqueSymbolsPassword';\nimport { useCallback, useEffect, useState } from 'preact/hooks';\nimport {\n AdditionalActionsAlertProps,\n UseUpdatePasswordFormProps,\n} from '@/auth/types';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { checkIsFunction } from '@/auth/lib/checkIsFunction';\n\nexport const useUpdatePasswordForm = ({\n isEmailConfirmationRequired,\n signInOnSuccess,\n passwordConfigs,\n routeRedirectOnSignIn,\n routeWrongUrlRedirect,\n onErrorCallback,\n onSuccessCallback,\n handleSetInLineAlertProps,\n routeRedirectOnPasswordUpdate,\n routeSignInPage,\n}: UseUpdatePasswordFormProps) => {\n const translations = useText({\n errorNotification: 'Auth.Notification.errorNotification',\n updatePasswordMessage: 'Auth.Notification.updatePasswordMessage',\n updatePasswordActionMessage:\n 'Auth.Notification.updatePasswordActionMessage',\n customerTokenErrorMessage: 'Auth.Api.customerTokenErrorMessage',\n });\n\n const [isSuccessful, setIsSuccessful] = useState({\n userName: '',\n status: false,\n });\n const [updatePasswordValue, setUpdatePasswordValue] = useState('');\n const [isClickSubmit, setIsClickSubmit] = useState(false);\n const [email, setEmail] = useState('');\n const [token, setToken] = useState('');\n const [isLoading, setIsLoading] = useState(false);\n const [passwordError, setPasswordError] = useState(false);\n const [additionalActionsAlert, setAdditionalActionsAlert] =\n useState<AdditionalActionsAlertProps>([]);\n\n useEffect(() => {\n if (isClickSubmit && !additionalActionsAlert.length) {\n if (updatePasswordValue.length) {\n setPasswordError(false);\n } else {\n setPasswordError(true);\n }\n }\n }, [isClickSubmit, updatePasswordValue, additionalActionsAlert]);\n\n useEffect(() => {\n const { search } = window.location;\n\n if (\n !search.includes('token=') &&\n !search.includes('email=') &&\n checkIsFunction(routeWrongUrlRedirect)\n ) {\n window.location.href = routeWrongUrlRedirect();\n }\n\n const url = decodeURIComponent(search);\n const tokenParam = getUrlParam(url, 'token');\n const emailParam = getUrlParam(url, 'email');\n\n setEmail(emailParam);\n setToken(tokenParam);\n }, [routeWrongUrlRedirect]);\n\n const submitUpdatePassword = useCallback(\n async (event: Event): Promise<void> => {\n event.preventDefault();\n\n setIsLoading(true);\n setAdditionalActionsAlert([]);\n\n const formValues = getFormValues(event.target);\n const validationData = formValues?.password && email && token;\n\n if (!formValues?.password) {\n setPasswordError(true);\n setIsLoading(false);\n }\n\n const requiredCharacterClasses =\n passwordConfigs?.requiredCharacterClasses ?? 0;\n const minLength = passwordConfigs?.minLength ?? 0;\n\n if (\n !validationUniqueSymbolsPassword(\n formValues?.password,\n requiredCharacterClasses\n ) ||\n formValues.password.length < +minLength\n ) {\n setIsClickSubmit(true);\n setIsLoading(false);\n\n return;\n }\n\n if (!validationData) {\n handleSetInLineAlertProps({\n type: 'error',\n text: translations.errorNotification,\n });\n\n setIsLoading(false);\n\n return;\n }\n\n const { message, success } = await resetPassword(\n email,\n token,\n formValues.password\n );\n\n if (success) {\n if (\n isEmailConfirmationRequired ||\n (!isEmailConfirmationRequired && !signInOnSuccess)\n ) {\n onSuccessCallback?.();\n\n if (checkIsFunction(routeRedirectOnPasswordUpdate)) {\n window.location.href = routeRedirectOnPasswordUpdate();\n }\n\n setIsClickSubmit(true);\n setIsLoading(false);\n setPasswordError(false);\n setUpdatePasswordValue('');\n setAdditionalActionsAlert([\n {\n label: translations.updatePasswordActionMessage,\n onClick: () => {\n window.location.href = routeSignInPage?.() as string;\n },\n },\n ]);\n handleSetInLineAlertProps({\n type: 'success',\n text: translations.updatePasswordMessage,\n });\n\n return;\n }\n\n const loginResponse = await getCustomerToken({\n email,\n password: formValues.password,\n handleSetInLineAlertProps,\n onErrorCallback,\n translations,\n });\n\n if (loginResponse?.userName) {\n onSuccessCallback?.(loginResponse?.userName);\n\n if (checkIsFunction(routeRedirectOnSignIn)) {\n window.location.href = routeRedirectOnSignIn();\n } else {\n setIsSuccessful({\n userName: loginResponse?.userName,\n status: true,\n });\n }\n }\n } else {\n handleSetInLineAlertProps({ type: 'error', text: message });\n onErrorCallback?.({ message, success });\n }\n\n setIsLoading(false);\n },\n [\n email,\n token,\n passwordConfigs?.requiredCharacterClasses,\n passwordConfigs?.minLength,\n translations,\n isEmailConfirmationRequired,\n signInOnSuccess,\n routeSignInPage,\n onErrorCallback,\n onSuccessCallback,\n routeRedirectOnSignIn,\n handleSetInLineAlertProps,\n routeRedirectOnPasswordUpdate,\n ]\n );\n\n const handleSetUpdatePasswordValue = useCallback((value: string) => {\n setUpdatePasswordValue(value);\n }, []);\n\n return {\n additionalActionsAlert,\n passwordError,\n isSuccessful,\n updatePasswordValue,\n isClickSubmit,\n isLoading,\n submitUpdatePassword,\n handleSetUpdatePasswordValue,\n setIsClickSubmit,\n };\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { classes, Slot } from '@adobe-commerce/elsie/lib';\nimport { useGetStoreConfigs } from '@/auth/hooks/api/useGetStoreConfigs';\nimport { usePasswordValidationMessage } from '@/auth/hooks/components/usePasswordValidationMessage';\nimport { useUpdatePasswordForm } from '@/auth/hooks/components/useUpdatePasswordForm';\nimport { UpdatePasswordFormProps } from '@/auth/types';\nimport { Form, Button } from '@/auth/components';\nimport { useInLineAlert } from '@/auth/hooks/useInLineAlert';\nimport { Header, InLineAlert, InputPassword } from '@adobe-commerce/elsie/components';\nimport '@/auth/components/UpdatePasswordForm/UpdatePasswordForm.css';\nimport { useCustomTranslations } from '@/auth/hooks/useCustomTranslations';\n\nexport const UpdatePasswordForm: FunctionComponent<UpdatePasswordFormProps> = ({\n signInOnSuccess = true,\n formSize = 'default',\n routeRedirectOnSignIn,\n routeWrongUrlRedirect,\n routeSignInPage,\n slots,\n onErrorCallback,\n onSuccessCallback,\n routeRedirectOnPasswordUpdate,\n}) => {\n /**\n * useCustomTranslations is required to support extensibility of error messages.\n * Ensure all error-related translation paths include \".default\"\n * to allow future handling of dynamic or nested error messages.\n */\n const translations = useCustomTranslations({\n title: 'Auth.UpdatePasswordForm.title',\n buttonPrimary: 'Auth.UpdatePasswordForm.buttonPrimary',\n placeholder: 'Auth.InputPassword.placeholder',\n floatingLabel: 'Auth.InputPassword.floatingLabel',\n requiredFieldError: 'Auth.FormText.requiredFieldError.default',\n });\n\n const { passwordConfigs, isEmailConfirmationRequired } = useGetStoreConfigs();\n\n const { inLineAlertProps, handleSetInLineAlertProps } = useInLineAlert();\n\n const {\n additionalActionsAlert,\n passwordError,\n isSuccessful,\n updatePasswordValue,\n isClickSubmit,\n isLoading,\n submitUpdatePassword,\n handleSetUpdatePasswordValue,\n } = useUpdatePasswordForm({\n isEmailConfirmationRequired,\n signInOnSuccess,\n passwordConfigs,\n routeRedirectOnSignIn,\n routeWrongUrlRedirect,\n onErrorCallback,\n onSuccessCallback,\n handleSetInLineAlertProps,\n routeRedirectOnPasswordUpdate,\n routeSignInPage,\n });\n\n const { isValidUniqueSymbols, defaultLengthMessage } =\n usePasswordValidationMessage({\n password: updatePasswordValue,\n isClickSubmit,\n passwordConfigs,\n });\n\n if (isSuccessful.status && slots?.SuccessNotification) {\n return (\n <Slot\n data-testid=\"successNotificationTestId\"\n name=\"SuccessNotification\"\n slot={slots?.SuccessNotification}\n context={{ isSuccessful }}\n />\n );\n }\n\n return (\n <div\n className={classes([\n 'auth-update-password-form',\n `auth-update-password-form--${formSize}`,\n ])}\n >\n <Header\n title={translations.title}\n divider={false}\n className=\"auth-update-password-form__title\"\n />\n <InLineAlert\n className={classes([\n 'auth-update-password-form__notification',\n [\n 'auth-update-password-form__notification--show',\n !!inLineAlertProps?.text,\n ],\n ])}\n variant=\"secondary\"\n heading={inLineAlertProps?.text as string}\n icon={inLineAlertProps.icon}\n additionalActions={additionalActionsAlert}\n />\n <Form\n name=\"updatePassword_form\"\n className=\"auth-update-password-form__form\"\n onSubmit={submitUpdatePassword}\n loading={isLoading}\n fieldsConfig={[]}\n >\n <div style=\"display: none;\">\n <input\n type=\"text\"\n id=\"username\"\n name=\"username\"\n autoComplete=\"username\"\n />\n </div>\n <InputPassword\n defaultValue={updatePasswordValue}\n onValue={handleSetUpdatePasswordValue}\n className=\"auth-update-password-form__form__item\"\n autoComplete={'new-password'}\n name={'password'}\n errorMessage={\n passwordError ||\n isValidUniqueSymbols === 'error' ||\n defaultLengthMessage?.status === 'error'\n ? translations.requiredFieldError\n : undefined\n }\n minLength={passwordConfigs?.minLength}\n uniqueSymbolsStatus={isValidUniqueSymbols}\n validateLengthConfig={defaultLengthMessage}\n requiredCharacterClasses={passwordConfigs?.requiredCharacterClasses}\n placeholder={translations.placeholder}\n floatingLabel={translations.floatingLabel}\n />\n\n <div className=\"auth-update-password-form__button\">\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","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { Container } from '@adobe-commerce/elsie/lib';\nimport { UpdatePasswordForm } from '@/auth/components';\nimport { UpdatePasswordProps } from '@/auth/types';\n\nexport const UpdatePassword: Container<UpdatePasswordProps> = ({\n slots,\n formSize,\n signInOnSuccess,\n routeRedirectOnPasswordUpdate,\n routeRedirectOnSignIn,\n routeSignInPage,\n routeWrongUrlRedirect,\n onErrorCallback,\n onSuccessCallback,\n}) => {\n return (\n <div className=\"auth-update-password\">\n <UpdatePasswordForm\n formSize={formSize}\n signInOnSuccess={signInOnSuccess}\n routeSignInPage={routeSignInPage}\n routeRedirectOnSignIn={routeRedirectOnSignIn}\n routeWrongUrlRedirect={routeWrongUrlRedirect}\n onErrorCallback={onErrorCallback}\n onSuccessCallback={onSuccessCallback}\n slots={slots}\n routeRedirectOnPasswordUpdate={routeRedirectOnPasswordUpdate}\n />\n </div>\n );\n};\n"],"names":["getUrlParam","url","param","el","item","useUpdatePasswordForm","isEmailConfirmationRequired","signInOnSuccess","passwordConfigs","routeRedirectOnSignIn","routeWrongUrlRedirect","onErrorCallback","onSuccessCallback","handleSetInLineAlertProps","routeRedirectOnPasswordUpdate","routeSignInPage","translations","useText","isSuccessful","setIsSuccessful","useState","updatePasswordValue","setUpdatePasswordValue","isClickSubmit","setIsClickSubmit","email","setEmail","token","setToken","isLoading","setIsLoading","passwordError","setPasswordError","additionalActionsAlert","setAdditionalActionsAlert","useEffect","search","checkIsFunction","tokenParam","emailParam","submitUpdatePassword","useCallback","event","formValues","getFormValues","validationData","requiredCharacterClasses","minLength","validationUniqueSymbolsPassword","message","success","resetPassword","loginResponse","getCustomerToken","handleSetUpdatePasswordValue","value","UpdatePasswordForm","formSize","slots","useCustomTranslations","useGetStoreConfigs","inLineAlertProps","useInLineAlert","isValidUniqueSymbols","defaultLengthMessage","usePasswordValidationMessage","jsx","Slot","jsxs","classes","Header","InLineAlert","Form","InputPassword","Button","UpdatePassword"],"mappings":"y9BAiBO,MAAMA,EAAc,CAACC,EAAaC,IACxBD,EACZ,MAAM,GAAG,EACT,OAAQE,GAAOA,EAAG,SAASD,CAAK,CAAC,EACjC,IAAKE,GACGA,EAAK,MAAM,GAAG,EAAE,CAAC,CACzB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ACtB,yBAA0BxD,GAAA,YAAAA,EAAiB,yBAC3C,YAAaQ,EAAa,YAC1B,cAAeA,EAAa,aAAA,CAAA,EAG9BkD,EAAC,MAAA,CAAI,UAAU,oCACb,SAAAA,EAACQ,GAAA,CACC,KAAK,SACL,WAAY1D,EAAa,cACzB,QAAQ,UACR,aAAca,CAAA,CAAA,CAChB,CACF,CAAA,CAAA,CAAA,CACF,CAAA,CAAA,CAGN,ECpJa8C,GAAiD,CAAC,CAC7D,MAAAjB,EACA,SAAAD,EACA,gBAAAlD,EACA,8BAAAO,EACA,sBAAAL,EACA,gBAAAM,EACA,sBAAAL,EACA,gBAAAC,EACA,kBAAAC,CACF,IAEIsD,EAAC,MAAA,CAAI,UAAU,uBACb,SAAAA,EAACV,GAAA,CACC,SAAAC,EACA,gBAAAlD,EACA,gBAAAQ,EACA,sBAAAN,EACA,sBAAAC,EACA,gBAAAC,EACA,kBAAAC,EACA,MAAA8C,EACA,8BAAA5C,CAAA,CAAA,EAEJ"}
|
package/fragments.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fragments.js","sources":["/@dropins/storefront-auth/src/api/graphql/CustomerFragment.graphql.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const CUSTOMER_INFORMATION_FRAGMENT = /* GraphQL */ `\n fragment CUSTOMER_INFORMATION_FRAGMENT on Customer {\n __typename\n firstname\n lastname\n email\n }\n`;\n"],"names":["CUSTOMER_INFORMATION_FRAGMENT"],"mappings":"
|
|
1
|
+
{"version":3,"file":"fragments.js","sources":["/@dropins/storefront-auth/src/api/graphql/CustomerFragment.graphql.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const CUSTOMER_INFORMATION_FRAGMENT = /* GraphQL */ `\n fragment CUSTOMER_INFORMATION_FRAGMENT on Customer {\n __typename\n firstname\n lastname\n email\n }\n`;\n"],"names":["CUSTOMER_INFORMATION_FRAGMENT"],"mappings":"AAiBO,MAAMA,EAA8C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name": "@dropins/storefront-auth", "version": "2.1.
|
|
1
|
+
{"name": "@dropins/storefront-auth", "version": "2.1.1-beta1", "@dropins/tools": "1.5.0-beta4", "license": "SEE LICENSE IN LICENSE.md"}
|