@dropins/storefront-auth 3.3.0-beta.2 → 4.0.0-alpha-20260601092829
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/CHANGELOG.md +3 -11
- package/api/createCustomer/graphql/createCustomer.graphql.d.ts +1 -1
- package/api/createCustomer/graphql/createCustomerV2.graphql.d.ts +1 -1
- package/api/getCustomerData/graphql/getCustomerData.graphql.d.ts +2 -2
- package/api/getCustomerToken/graphql/getCustomerToken.graphql.d.ts +1 -1
- package/api/getStoreConfig/graphql/getStoreConfig.graphql.d.ts +2 -2
- package/api/graphql/CustomerFragment.graphql.d.ts +2 -2
- package/api/revokeCustomerToken/graphql/revokeCustomerToken.graphql.d.ts +1 -1
- package/api/verifyToken/graphql/verifyToken.graphql.d.ts +1 -1
- package/api/verifyToken/verifyToken.d.ts +1 -1
- package/api.js +1 -179
- package/api.js.map +1 -1
- package/chunks/Button.js +4 -0
- package/chunks/Button.js.map +1 -0
- package/chunks/RemoteShoppingAssistanceConsent.js +4 -0
- package/chunks/RemoteShoppingAssistanceConsent.js.map +1 -0
- package/chunks/RemoteShoppingAssistanceConsent2.js +4 -0
- package/chunks/RemoteShoppingAssistanceConsent2.js.map +1 -0
- package/chunks/ResetPasswordForm.js +4 -0
- package/chunks/ResetPasswordForm.js.map +1 -0
- package/chunks/SignInForm.js +4 -0
- package/chunks/SignInForm.js.map +1 -0
- package/chunks/SkeletonLoader.js +4 -0
- package/chunks/SkeletonLoader.js.map +1 -0
- package/chunks/acdl.js +4 -0
- package/chunks/acdl.js.map +1 -0
- package/chunks/confirmEmail.js +14 -0
- package/chunks/confirmEmail.js.map +1 -0
- package/chunks/createCustomerAddress.js +60 -0
- package/chunks/createCustomerAddress.js.map +1 -0
- package/chunks/focusOnEmptyPasswordField.js +4 -0
- package/chunks/focusOnEmptyPasswordField.js.map +1 -0
- package/chunks/getAdobeCommerceOptimizerData.js +70 -0
- package/chunks/getAdobeCommerceOptimizerData.js.map +1 -0
- package/chunks/getCustomerToken.js +17 -0
- package/chunks/getCustomerToken.js.map +1 -0
- package/chunks/index.js +4 -0
- package/chunks/index.js.map +1 -0
- package/chunks/index2.js +4 -0
- package/chunks/index2.js.map +1 -0
- package/chunks/index3.js +4 -0
- package/chunks/index3.js.map +1 -0
- package/chunks/network-error.js +4 -0
- package/chunks/network-error.js.map +1 -0
- package/chunks/requestPasswordResetEmail.js +8 -0
- package/chunks/requestPasswordResetEmail.js.map +1 -0
- package/chunks/resendConfirmationEmail.js +8 -0
- package/chunks/resendConfirmationEmail.js.map +1 -0
- package/chunks/resetPassword.js +16 -0
- package/chunks/resetPassword.js.map +1 -0
- package/chunks/revokeCustomerToken.js +11 -0
- package/chunks/revokeCustomerToken.js.map +1 -0
- package/chunks/setReCaptchaToken.js +4 -0
- package/chunks/setReCaptchaToken.js.map +1 -0
- package/chunks/simplifyTransformAttributesForm.js +4 -0
- package/chunks/simplifyTransformAttributesForm.js.map +1 -0
- package/chunks/transform-attributes-form.js +4 -0
- package/chunks/transform-attributes-form.js.map +1 -0
- package/chunks/usePasswordValidationMessage.js +4 -0
- package/chunks/usePasswordValidationMessage.js.map +1 -0
- package/components/RemoteShoppingAssistanceConsent/RemoteShoppingAssistanceConsent.d.ts +12 -0
- package/components/RemoteShoppingAssistanceConsent/index.d.ts +19 -0
- package/components/index.d.ts +2 -1
- package/configs/cookieConfigs.d.ts +3 -1
- package/containers/AuthCombine.js +1 -1
- package/containers/AuthCombine.js.map +1 -1
- package/containers/ResetPassword.js +1 -1
- package/containers/ResetPassword.js.map +1 -1
- package/containers/SignIn.js +1 -1
- package/containers/SignIn.js.map +1 -1
- package/containers/SignUp.js +1 -1
- package/containers/SignUp.js.map +1 -1
- package/containers/SuccessNotification.js +1 -1
- package/containers/SuccessNotification.js.map +1 -1
- package/containers/UpdatePassword.js +1 -1
- package/containers/UpdatePassword.js.map +1 -1
- package/data/models/customer-data.d.ts +2 -1
- package/data/models/store-config.d.ts +5 -1
- package/fragments.js +12 -1
- package/fragments.js.map +1 -1
- package/hooks/api/useGetStoreConfigs.d.ts +6 -1
- package/i18n/en_US.json.d.ts +2 -0
- package/lib/acdl.d.ts +1 -1
- package/lib/cookieUtils.d.ts +1 -1
- package/lib/emitAuthGroupId.d.ts +1 -1
- package/lib/jwtUtils.d.ts +50 -0
- package/lib/mergeFormObjects.d.ts +1 -1
- package/package.json +1 -1
- package/render.js +2 -2
- package/render.js.map +1 -1
- package/types/api/getCustomerData.types.d.ts +2 -1
- package/types/api/storeConfig.types.d.ts +5 -1
- package/types/signUp.types.d.ts +4 -2
- package/chunks/components.js +0 -4
- package/chunks/components.js.map +0 -1
|
@@ -0,0 +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 2026 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 2026 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, removeFetchGraphQlHeader } 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';\nimport { config } from '../initialize';\nimport { emitAuthGroupIdEvent } from '@/auth/lib/emitAuthGroupId';\n\nexport const revokeCustomerToken =\n async (): Promise<RevokeCustomerTokenModel> => {\n const { authHeaderConfig } = config.getConfig();\n\n return await fetchGraphQl(REVOKE_CUSTOMER_TOKEN, {\n method: 'POST',\n })\n .then(async (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 COOKIE_NAMES.auth_dropin_lastname,\n COOKIE_NAMES.auth_dropin_admin_session,\n ].forEach((name) => {\n deleteCookie(name);\n });\n\n removeFetchGraphQlHeader(authHeaderConfig.header);\n await emitAuthGroupIdEvent();\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","authHeaderConfig","config","fetchGraphQl","transformData","COOKIE_NAMES","name","deleteCookie","removeFetchGraphQlHeader","emitAuthGroupIdEvent","events","publishEvents","EventsList","errorMessage","verifyToken","handleNetworkError"],"mappings":"kOAoBO,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,ECctCC,EACX,SAA+C,CAC7C,KAAM,CAAE,iBAAAC,CAAA,EAAqBC,EAAO,UAAA,EAEpC,OAAO,MAAMC,EAAaJ,EAAuB,CAC/C,OAAQ,MAAA,CACT,EACE,KAAK,MAAOL,GAA0C,CACrD,MAAMU,EAAgBX,EAA6BC,CAAQ,EAE3D,GAAIU,GAAA,MAAAA,EAAe,QACjB,CACEC,EAAa,uBACbA,EAAa,sBACbA,EAAa,qBACbA,EAAa,yBAAA,EACb,QAASC,GAAS,CAClBC,EAAaD,CAAI,CACnB,CAAC,EAEDE,EAAyBP,EAAiB,MAAM,EAChD,MAAMQ,EAAA,EACNC,EAAO,KAAK,gBAAiB,EAAK,EAElCC,EAAcC,EAAW,SAAU,EAAE,MAChC,CACL,MAAMC,EAAe;AAAA,uCACQT,EAAc,OAAO,GAClD,QAAQ,MAAMS,CAAY,EAI1BC,EAAA,CACF,CAEA,OAAOV,CACT,CAAC,EACA,MAAMW,CAAkB,CAC7B"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
|
+
All Rights Reserved. */
|
|
3
|
+
import{verifyReCaptcha as t}from"@dropins/tools/recaptcha.js";import"@dropins/tools/event-bus.js";import{a as e}from"./network-error.js";const s=async()=>{const a=await t();a&&e("X-ReCaptcha",a)};export{s};
|
|
4
|
+
//# sourceMappingURL=setReCaptchaToken.js.map
|
|
@@ -0,0 +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,CAC3C,MAAMC,EAAQ,MAAMC,EAAA,EAEhBD,GACFE,EAAsB,cAAeF,CAAK,CAE9C"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
|
+
All Rights Reserved. */
|
|
3
|
+
import{t}from"./transform-attributes-form.js";const o=[{customUpperCode:"email",code:"email",default_value:"",entity_type:"CUSTOMER",frontend_class:"auth-sign-in-form__form__email",frontend_input:"TEXT",is_required:!0,multiline_count:1,sort_order:1,is_unique:!1,label:"Email",options:[],validateRules:[{name:"INPUT_VALIDATION",value:"email"}],autocomplete:"username"}],s=[{customUpperCode:"email",code:"email",default_value:"",entity_type:"CUSTOMER",frontend_class:"auth-reset-password-form__form__item",frontend_input:"TEXT",is_required:!0,is_unique:!1,label:"Email",options:[],validateRules:[{name:"INPUT_VALIDATION",value:"email"}],autocomplete:"username"}],n=[{customUpperCode:"email",code:"email",default_value:"",entity_type:"CUSTOMER",frontend_class:"",frontend_input:"TEXT",is_required:!0,is_unique:!1,label:"Email",multiline_count:1,sort_order:1,options:[],validateRules:[{name:"INPUT_VALIDATION",value:"email"}],autocomplete:"username"},{customUpperCode:"firstname",code:"firstname",default_value:"",entity_type:"CUSTOMER",frontend_class:"",frontend_input:"TEXT",is_required:!0,is_unique:!1,label:"First name",multiline_count:1,sort_order:2,options:[]},{customUpperCode:"lastname",code:"lastname",default_value:"",entity_type:"CUSTOMER",frontend_class:"",frontend_input:"TEXT",is_required:!1,is_unique:!1,label:"Last name",multiline_count:1,sort_order:3,options:[]}],i=e=>e!=null&&e.length?t({data:{attributesForm:{items:e}}}):[];export{s as D,o as a,n as b,i as s};
|
|
4
|
+
//# sourceMappingURL=simplifyTransformAttributesForm.js.map
|
|
@@ -0,0 +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,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"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
|
+
All Rights Reserved. */
|
|
3
|
+
const _=t=>t.replace(/_([a-z])/g,(n,e)=>e.toUpperCase()),p=t=>t.replace(/([A-Z])/g,n=>`_${n.toLowerCase()}`),m=(t,n,e)=>{const s=["string","boolean","number"],a=n==="camelCase"?_:p;return Array.isArray(t)?t.map(o=>s.includes(typeof o)||o===null?o:typeof o=="object"?m(o,n,e):o):t!==null&&typeof t=="object"?Object.entries(t).reduce((o,[i,c])=>{const r=e&&e[i]?e[i]:a(i);return o[r]=s.includes(typeof c)||c===null?c:m(c,n,e),o},{}):t},b=t=>{let n=[];for(const e of t)if(!(e.frontend_input!=="MULTILINE"||e.multiline_count<2))for(let s=2;s<=e.multiline_count;s++){const a={...e,is_required:!1,name:`${e.code}_multiline_${s}`,code:`${e.code}_multiline_${s}`,id:`${e.code}_multiline_${s}`};n.push(a)}return n},C=t=>{var o,i,c;const n=((i=(o=t==null?void 0:t.data)==null?void 0:o.attributesForm)==null?void 0:i.items)||[];if(!n.length)return[];const e=(c=n.filter(r=>{var u;return!((u=r.frontend_input)!=null&&u.includes("HIDDEN"))}))==null?void 0:c.map(({code:r,...u})=>{const l=r!=="country_id"?r:"country_code";return{...u,name:l,id:l,code:l}}),s=b(e);return e.concat(s).map(r=>{var d;const u=r.code==="firstname"?"firstName":r.code==="lastname"?"lastName":_(r.code),l=(d=r.options)==null?void 0:d.map(f=>({isDefault:f.is_default,text:f.label,value:f.value}));return m({...r,options:l,customUpperCode:u},"camelCase",{frontend_input:"fieldType",frontend_class:"className",is_required:"required",sort_order:"orderNumber"})}).sort((r,u)=>r.orderNumber-u.orderNumber)};export{m as c,C as t};
|
|
4
|
+
//# sourceMappingURL=transform-attributes-form.js.map
|
|
@@ -0,0 +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":"AAiBO,MAAMA,EAAsBC,GAC1BA,EAAI,QAAQ,YAAa,CAACC,EAAGC,IAAWA,EAAO,aAAa,EAGxDC,EAAsBH,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,YAAAC,EAAgB,iBAAhB,YAAAC,EAAgC,QAAS,CAAA,EAEvD,GAAI,CAACE,EAAM,OAAQ,MAAO,CAAA,EAE1B,MAAMT,GAASQ,EAAAC,EACZ,OAAQC,GAAA,CDzCN,IAAAJ,ECyCa,SAACA,EAAAI,EAAG,iBAAH,MAAAJ,EAAmB,SAAS,WAAS,IADzC,YAAAE,EAEX,IAAI,CAAC,CAAE,KAAAG,EAAM,GAAGC,KAAY,CAC5B,MAAMC,EAAgBF,IAAS,aAAeA,EAAO,eAErD,MAAO,CACL,GAAGC,EACH,KAAMC,EACN,GAAIA,EACJ,KAAMA,CAAA,CAEV,GAEIZ,EAAiBF,EAAmBC,CAAa,EAoCvD,OAlCyBA,EACtB,OAAOC,CAAc,EACrB,IAAKa,GAAS,CDzDZ,IAAAR,EC0DD,MAAMS,EACJD,EAAK,OAAS,YACV,YACAA,EAAK,OAAS,WACd,WACA9B,EAAmB8B,EAAK,IAAI,EAE5BE,GAAUV,EAAAQ,EAAK,UAAL,YAAAR,EAAc,IAAKI,IAC1B,CACL,UAAWA,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"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! Copyright 2026 Adobe
|
|
2
|
+
All Rights Reserved. */
|
|
3
|
+
import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{g as S}from"./getAdobeCommerceOptimizerData.js";import{useState as l,useEffect as u,useMemo as C}from"@dropins/tools/preact-hooks.js";import{useText as A}from"@dropins/tools/i18n.js";const x=()=>{const[e,s]=l(!1),[t,o]=l(null),[a,i]=l(null),c=n=>{const{minLength:r,requiredCharacterClasses:g,createAccountConfirmation:h,shoppingAssistanceEnabled:m,shoppingAssistanceCheckboxTitle:f,shoppingAssistanceCheckboxTooltip:L}=n;o({minLength:r,requiredCharacterClasses:g}),s(h),i({shoppingAssistanceEnabled:m,shoppingAssistanceCheckboxTitle:f,shoppingAssistanceCheckboxTooltip:L})};return u(()=>{const n=sessionStorage.getItem("storeConfig");let r=null;try{r=n?JSON.parse(n):null}catch{r=null}if(r){c(r);return}S().then(g=>{g&&(sessionStorage.setItem("storeConfig",JSON.stringify(g)),c(g))})},[]),{passwordConfigs:t,isEmailConfirmationRequired:e,remoteShoppingAssistanceConfigs:a}},p=(e,s)=>{if(s<=1)return!0;const t=/[0-9]/.test(e)?1:0,o=/[a-z]/.test(e)?1:0,a=/[A-Z]/.test(e)?1:0,i=/[^a-zA-Z0-9\s]/.test(e)?1:0;return t+o+a+i>=s},E=({passwordConfigs:e,isClickSubmit:s,password:t})=>{const o=A({messageLengthPassword:"Auth.PasswordValidationMessage.messageLengthPassword"}),[a,i]=l("pending");u(()=>{if(!e)return;const n=p(t,e.requiredCharacterClasses);s&&t.length>0?i(n?"success":"error"):s&&t.length===0?i("pending"):i(n?"success":"pending")},[s,e,t]);const c=C(()=>{var r;if(!e)return;const n={status:"pending",icon:"pending",message:(r=o.messageLengthPassword)==null?void 0:r.replace("{minLength}",`${e.minLength}`)};return t.length&&t.length>=e.minLength?{...n,icon:"success",status:"success"}:t.length&&t.length<e.minLength?s?{...n,icon:"error",status:"error"}:{...n,icon:"pending",status:"pending"}:n},[e,o.messageLengthPassword,t==null?void 0:t.length,s]);return{isValidUniqueSymbols:a,defaultLengthMessage:c}};export{E as a,x as u,p as v};
|
|
4
|
+
//# sourceMappingURL=usePasswordValidationMessage.js.map
|
|
@@ -0,0 +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 2026 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 const [remoteShoppingAssistanceConfigs, setRemoteShoppingAssistanceConfigs] =\n useState<{\n shoppingAssistanceEnabled: boolean;\n shoppingAssistanceCheckboxTitle: string;\n shoppingAssistanceCheckboxTooltip: string;\n } | null>(null);\n\n const applyStoreConfig = (config: StoreConfigModel) => {\n const {\n minLength,\n requiredCharacterClasses,\n createAccountConfirmation,\n shoppingAssistanceEnabled,\n shoppingAssistanceCheckboxTitle,\n shoppingAssistanceCheckboxTooltip,\n } = config;\n\n setPasswordConfigs({\n minLength,\n requiredCharacterClasses,\n });\n\n setIsEmailConfirmationRequired(createAccountConfirmation);\n\n setRemoteShoppingAssistanceConfigs({\n shoppingAssistanceEnabled,\n shoppingAssistanceCheckboxTitle,\n shoppingAssistanceCheckboxTooltip,\n });\n };\n\n useEffect(() => {\n const storeConfigString = sessionStorage.getItem('storeConfig');\n let cachedStoreConfig: StoreConfigModel | null = null;\n\n try {\n cachedStoreConfig = storeConfigString\n ? JSON.parse(storeConfigString)\n : null;\n } catch {\n cachedStoreConfig = null;\n }\n\n if (cachedStoreConfig) {\n applyStoreConfig(cachedStoreConfig);\n return;\n }\n\n getStoreConfig().then((response) => {\n if (!response) return;\n\n sessionStorage.setItem('storeConfig', JSON.stringify(response));\n applyStoreConfig(response);\n });\n }, []);\n\n return {\n passwordConfigs,\n isEmailConfirmationRequired,\n remoteShoppingAssistanceConfigs,\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 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","remoteShoppingAssistanceConfigs","setRemoteShoppingAssistanceConfigs","applyStoreConfig","config","minLength","requiredCharacterClasses","createAccountConfirmation","shoppingAssistanceEnabled","shoppingAssistanceCheckboxTitle","shoppingAssistanceCheckboxTooltip","useEffect","storeConfigString","cachedStoreConfig","getStoreConfig","response","validationUniqueSymbolsPassword","password","uniqueSymbolsCount","numbers","lowerCaseLetter","upperCaseLetter","specialSymbols","usePasswordValidationMessage","isClickSubmit","translations","useText","isValidUniqueSymbols","setIsValidUniqueSymbols","result","defaultLengthMessage","useMemo","defaultMessage","_a"],"mappings":"sQAqBO,MAAMA,EAAqB,IAAM,CACtC,KAAM,CAACC,EAA6BC,CAA8B,EAChEC,EAAS,EAAK,EACV,CAACC,EAAiBC,CAAkB,EAAIF,EAGpC,IAAI,EACR,CAACG,EAAiCC,CAAkC,EACxEJ,EAIU,IAAI,EAEVK,EAAoBC,GAA6B,CACrD,KAAM,CACJ,UAAAC,EACA,yBAAAC,EACA,0BAAAC,EACA,0BAAAC,EACA,gCAAAC,EACA,kCAAAC,CAAA,EACEN,EAEJJ,EAAmB,CACjB,UAAAK,EACA,yBAAAC,CAAA,CACD,EAEDT,EAA+BU,CAAyB,EAExDL,EAAmC,CACjC,0BAAAM,EACA,gCAAAC,EACA,kCAAAC,CAAA,CACD,CACH,EAEA,OAAAC,EAAU,IAAM,CACd,MAAMC,EAAoB,eAAe,QAAQ,aAAa,EAC9D,IAAIC,EAA6C,KAEjD,GAAI,CACFA,EAAoBD,EAChB,KAAK,MAAMA,CAAiB,EAC5B,IACN,MAAQ,CACNC,EAAoB,IACtB,CAEA,GAAIA,EAAmB,CACrBV,EAAiBU,CAAiB,EAClC,MACF,CAEAC,EAAA,EAAiB,KAAMC,GAAa,CAC7BA,IAEL,eAAe,QAAQ,cAAe,KAAK,UAAUA,CAAQ,CAAC,EAC9DZ,EAAiBY,CAAQ,EAC3B,CAAC,CACH,EAAG,CAAA,CAAE,EAEE,CACL,gBAAAhB,EACA,4BAAAH,EACA,gCAAAK,CAAA,CAEJ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Q,SAAA,EAG7CA,CACT,EAAG,CACDjC,EACA0B,EAAa,sBACbR,GAAA,YAAAA,EAAU,OACVO,CAAA,CACD,EAEH,MAAO,CAAE,qBAAAG,EAAsB,qBAAAG,CAAA,CACjC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FunctionComponent } from 'preact';
|
|
2
|
+
|
|
3
|
+
export interface RemoteShoppingAssistanceConsentProps {
|
|
4
|
+
label?: string;
|
|
5
|
+
tooltip?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
defaultChecked?: boolean;
|
|
8
|
+
onChange?: (checked: boolean) => void;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const RemoteShoppingAssistanceConsent: FunctionComponent<RemoteShoppingAssistanceConsentProps>;
|
|
12
|
+
//# sourceMappingURL=RemoteShoppingAssistanceConsent.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2026 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export * from './RemoteShoppingAssistanceConsent';
|
|
18
|
+
export { RemoteShoppingAssistanceConsent as default } from './RemoteShoppingAssistanceConsent';
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
package/components/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ADOBE CONFIDENTIAL
|
|
3
3
|
* __________________
|
|
4
4
|
*
|
|
5
|
-
* Copyright
|
|
5
|
+
* Copyright 2026 Adobe
|
|
6
6
|
* All Rights Reserved.
|
|
7
7
|
*
|
|
8
8
|
* NOTICE: All information contained herein is, and remains
|
|
@@ -23,4 +23,5 @@ export * from './ResetPasswordForm';
|
|
|
23
23
|
export * from './SkeletonLoader';
|
|
24
24
|
export * from './Form';
|
|
25
25
|
export * from './Button';
|
|
26
|
+
export * from './RemoteShoppingAssistanceConsent';
|
|
26
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ADOBE CONFIDENTIAL
|
|
3
3
|
* __________________
|
|
4
4
|
*
|
|
5
|
-
* Copyright
|
|
5
|
+
* Copyright 2026 Adobe
|
|
6
6
|
* All Rights Reserved.
|
|
7
7
|
*
|
|
8
8
|
* NOTICE: All information contained herein is, and remains
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
declare const COOKIE_NAMES: {
|
|
18
18
|
auth_dropin_user_token: string;
|
|
19
19
|
auth_dropin_firstname: string;
|
|
20
|
+
auth_dropin_lastname: string;
|
|
21
|
+
auth_dropin_admin_session: string;
|
|
20
22
|
};
|
|
21
23
|
declare const LOCALHOST: string[];
|
|
22
24
|
declare const COOKIE_LIFETIME = 3600;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
|
-
import{jsx as
|
|
3
|
+
import{jsx as i}from"@dropins/tools/preact-jsx-runtime.js";import{lazy as d,Suspense as E}from"@dropins/tools/preact-compat.js";import{useState as S,useMemo as P}from"@dropins/tools/preact-hooks.js";import{S as y}from"../chunks/SkeletonLoader.js";import"@dropins/tools/components.js";const L=function(){const r=typeof document<"u"&&document.createElement("link").relList;return r&&r.supports&&r.supports("modulepreload")?"modulepreload":"preload"}(),k=function(l){return"/"+l},f={},p=function(r,c,u){let a=Promise.resolve();if(c&&c.length>0){document.getElementsByTagName("link");const e=document.querySelector("meta[property=csp-nonce]"),t=(e==null?void 0:e.nonce)||(e==null?void 0:e.getAttribute("nonce"));a=Promise.allSettled(c.map(o=>{if(o=k(o),o in f)return;f[o]=!0;const m=o.endsWith(".css"),h=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o}"]${h}`))return;const n=document.createElement("link");if(n.rel=m?"stylesheet":L,m||(n.as="script"),n.crossOrigin="",n.href=o,t&&n.setAttribute("nonce",t),document.head.appendChild(n),m)return new Promise((_,v)=>{n.addEventListener("load",_),n.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${o}`)))})}))}function s(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return a.then(e=>{for(const t of e||[])t.status==="rejected"&&s(t.reason);return r().catch(s)})},b=d(()=>p(()=>import("../chunks/index.js"),[])),w=d(()=>p(()=>import("../chunks/index2.js"),[])),A=d(()=>p(()=>import("../chunks/index3.js"),[])),O=({defaultView:l="signInForm",signInFormConfig:r,signUpFormConfig:c,resetPasswordFormConfig:u})=>{const[a,s]=S(l),e=P(()=>({signInForm:i(w,{setActiveComponent:s,...r}),signUpForm:i(A,{setActiveComponent:s,...c}),resetPasswordForm:i(b,{setActiveComponent:s,...u})}),[u,r,c,s]);return i("div",{children:i(E,{fallback:i(y,{activeSkeleton:a}),children:i("div",{className:"auth-combine",children:e[a]})})})};export{O as AuthCombine,O as default};
|
|
4
4
|
//# sourceMappingURL=AuthCombine.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":"
|
|
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,4 +1,4 @@
|
|
|
1
1
|
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
|
-
import{jsx as r}from"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/lib.js";import"@dropins/tools/components.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import"@dropins/tools/preact-hooks.js";import
|
|
3
|
+
import{jsx as r}from"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/lib.js";import"@dropins/tools/components.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import"@dropins/tools/preact-hooks.js";import"../chunks/RemoteShoppingAssistanceConsent.js";import"@dropins/tools/i18n.js";import{R as s}from"../chunks/ResetPasswordForm.js";import"@dropins/tools/preact-compat.js";import"../chunks/requestPasswordResetEmail.js";import"../chunks/network-error.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/setReCaptchaToken.js";import"../chunks/Button.js";import"../chunks/simplifyTransformAttributesForm.js";import"../chunks/transform-attributes-form.js";const b=({slots:o,formSize:t,routeSignIn:m,onErrorCallback:i,onSuccessCallback:p})=>r("div",{className:"auth-reset-password",children:r(s,{slots:o,formSize:t,routeSignIn:m,onErrorCallback:i,onSuccessCallback:p})});export{b as ResetPassword,b as default};
|
|
4
4
|
//# sourceMappingURL=ResetPassword.js.map
|
|
@@ -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 slots,\n formSize,\n routeSignIn,\n onErrorCallback,\n onSuccessCallback,\n}) => {\n return (\n <div className=\"auth-reset-password\">\n <ResetPasswordForm\n slots={slots}\n formSize={formSize}\n routeSignIn={routeSignIn}\n onErrorCallback={onErrorCallback}\n onSuccessCallback={onSuccessCallback}\n />\n </div>\n );\n};\n"],"names":["ResetPassword","slots","formSize","routeSignIn","onErrorCallback","onSuccessCallback","jsx","ResetPasswordForm"],"mappings":"
|
|
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 slots,\n formSize,\n routeSignIn,\n onErrorCallback,\n onSuccessCallback,\n}) => {\n return (\n <div className=\"auth-reset-password\">\n <ResetPasswordForm\n slots={slots}\n formSize={formSize}\n routeSignIn={routeSignIn}\n onErrorCallback={onErrorCallback}\n onSuccessCallback={onSuccessCallback}\n />\n </div>\n );\n};\n"],"names":["ResetPassword","slots","formSize","routeSignIn","onErrorCallback","onSuccessCallback","jsx","ResetPasswordForm"],"mappings":"6rBAqBO,MAAMA,EAA+C,CAAC,CAC3D,MAAAC,EACA,SAAAC,EACA,YAAAC,EACA,gBAAAC,EACA,kBAAAC,CACF,IAEIC,EAAC,MAAA,CAAI,UAAU,sBACb,SAAAA,EAACC,EAAA,CACC,MAAAN,EACA,SAAAC,EACA,YAAAC,EACA,gBAAAC,EACA,kBAAAC,CAAA,CAAA,EAEJ"}
|
package/containers/SignIn.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
|
-
import{jsx as r}from"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/lib.js";import"@dropins/tools/components.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import"@dropins/tools/preact-hooks.js";import
|
|
3
|
+
import{jsx as r}from"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/lib.js";import"@dropins/tools/components.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import"@dropins/tools/preact-hooks.js";import"../chunks/RemoteShoppingAssistanceConsent.js";import"@dropins/tools/i18n.js";import{S}from"../chunks/SignInForm.js";import"@dropins/tools/preact-compat.js";import"../chunks/Button.js";import"../chunks/getCustomerToken.js";import"../chunks/network-error.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/getAdobeCommerceOptimizerData.js";import"../fragments.js";import"../chunks/acdl.js";import"../chunks/setReCaptchaToken.js";import"../chunks/resendConfirmationEmail.js";import"../chunks/simplifyTransformAttributesForm.js";import"../chunks/transform-attributes-form.js";import"../chunks/focusOnEmptyPasswordField.js";import"../chunks/confirmEmail.js";const M=({slots:i,labels:o,enableEmailConfirmation:t,initialEmailValue:m,formSize:p,renderSignUpLink:n,hideCloseBtnOnEmailConfirmation:s,routeRedirectOnEmailConfirmationClose:a,routeRedirectOnSignIn:e,routeForgotPassword:c,routeSignUp:d,onSuccessCallback:f,onErrorCallback:g,onSignUpLinkClick:l,apiErrorMessageOverride:u})=>r("div",{className:"auth-sign-in",children:r(S,{slots:i,labels:o,formSize:p,renderSignUpLink:n,initialEmailValue:m,enableEmailConfirmation:t,hideCloseBtnOnEmailConfirmation:s,routeRedirectOnEmailConfirmationClose:a,routeSignUp:d,onErrorCallback:g,onSuccessCallback:f,onSignUpLinkClick:l,routeForgotPassword:c,routeRedirectOnSignIn:e,apiErrorMessageOverride:u})});export{M as SignIn,M as default};
|
|
4
4
|
//# sourceMappingURL=SignIn.js.map
|
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 apiErrorMessageOverride,\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 apiErrorMessageOverride={apiErrorMessageOverride}\n />\n </div>\n );\n};\n"],"names":["SignIn","slots","labels","enableEmailConfirmation","initialEmailValue","formSize","renderSignUpLink","hideCloseBtnOnEmailConfirmation","routeRedirectOnEmailConfirmationClose","routeRedirectOnSignIn","routeForgotPassword","routeSignUp","onSuccessCallback","onErrorCallback","onSignUpLinkClick","apiErrorMessageOverride","jsx","SignInForm"],"mappings":"
|
|
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 apiErrorMessageOverride,\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 apiErrorMessageOverride={apiErrorMessageOverride}\n />\n </div>\n );\n};\n"],"names":["SignIn","slots","labels","enableEmailConfirmation","initialEmailValue","formSize","renderSignUpLink","hideCloseBtnOnEmailConfirmation","routeRedirectOnEmailConfirmationClose","routeRedirectOnSignIn","routeForgotPassword","routeSignUp","onSuccessCallback","onErrorCallback","onSignUpLinkClick","apiErrorMessageOverride","jsx","SignInForm"],"mappings":"24BAqBO,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,EACA,wBAAAC,CACF,IAEIC,EAAC,MAAA,CAAI,UAAU,eACb,SAAAA,EAACC,EAAA,CACC,MAAAhB,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,EACA,wBAAAM,CAAA,CAAA,EAEJ"}
|
package/containers/SignUp.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
|
-
import{jsx as r}from"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/lib.js";import"@dropins/tools/components.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import"@dropins/tools/preact-hooks.js";import
|
|
3
|
+
import{jsx as r}from"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/lib.js";import"@dropins/tools/components.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import"@dropins/tools/preact-hooks.js";import"../chunks/RemoteShoppingAssistanceConsent.js";import"@dropins/tools/i18n.js";import{S as l}from"../chunks/RemoteShoppingAssistanceConsent2.js";import"@dropins/tools/preact-compat.js";import"../chunks/createCustomerAddress.js";import"../fragments.js";import"../chunks/network-error.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/setReCaptchaToken.js";import"../chunks/getAdobeCommerceOptimizerData.js";import"../chunks/transform-attributes-form.js";import"../chunks/simplifyTransformAttributesForm.js";import"../chunks/usePasswordValidationMessage.js";import"../chunks/getCustomerToken.js";import"../chunks/acdl.js";import"../chunks/Button.js";import"../chunks/focusOnEmptyPasswordField.js";import"../chunks/resendConfirmationEmail.js";import"../chunks/SkeletonLoader.js";const M=({slots:i,formSize:o,apiVersion2:t,addressesData:m,isAutoSignInEnabled:p,requireRetypePassword:s,inputsDefaultValueSet:a,fieldsConfigForApiVersion1:n,hideCloseBtnOnEmailConfirmation:e,routeRedirectOnEmailConfirmationClose:u,routeRedirectOnSignIn:c,onSuccessCallback:d,onErrorCallback:f,routeSignIn:g})=>r("div",{className:"auth-sign-up",children:r(l,{requireRetypePassword:s,formSize:o,apiVersion2:t,addressesData:m,isAutoSignInEnabled:p,inputsDefaultValueSet:a,fieldsConfigForApiVersion1:n,hideCloseBtnOnEmailConfirmation:e,routeRedirectOnEmailConfirmationClose:u,routeRedirectOnSignIn:c,routeSignIn:g,slots:i,onErrorCallback:f,onSuccessCallback:d})});export{M as SignUp,M as default};
|
|
4
4
|
//# sourceMappingURL=SignUp.js.map
|
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":"
|
|
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":"qgCAqBO,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,4 +1,4 @@
|
|
|
1
1
|
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
|
-
import{jsx as
|
|
3
|
+
import{jsxs as a,jsx as o,Fragment as s}from"@dropins/tools/preact-jsx-runtime.js";import{classes as m,Slot as u}from"@dropins/tools/lib.js";import{Button as r}from"@dropins/tools/components.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import"@dropins/tools/preact-hooks.js";import"../chunks/RemoteShoppingAssistanceConsent.js";import{useText as d}from"@dropins/tools/i18n.js";import{r as f}from"../chunks/revokeCustomerToken.js";import"@dropins/tools/preact-compat.js";import"../chunks/network-error.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/getAdobeCommerceOptimizerData.js";import"../chunks/acdl.js";const h=({formSize:c="default",className:n="",slots:i,labels:t})=>{const e=d({headingText:"Auth.SuccessNotification.headingText",messageText:"Auth.SuccessNotification.messageText",primaryButtonText:"Auth.SuccessNotification.primaryButtonText",secondaryButtonText:"Auth.SuccessNotification.secondaryButtonText"});return a("div",{className:m(["auth-success-notification-form",`auth-success-notification-form--${c}`,n]),id:"welcome-message",role:"alert","aria-live":"assertive","aria-labelledby":(t==null?void 0:t.headingText)??e.headingText,"aria-describedby":(t==null?void 0:t.messageText)??e.messageText,"tab-index":"-1",children:[o("p",{id:"welcome-heading",className:"auth-success-notification-form__title","data-testid":"notification-title",children:(t==null?void 0:t.headingText)??e.headingText}),o("p",{id:"welcome-details",className:"auth-success-notification-form__content-text","data-testid":"notification-content",children:(t==null?void 0:t.messageText)??e.messageText}),i!=null&&i.SuccessNotificationActions?o(u,{"data-testid":"successNotificationActions",name:"SuccessNotificationActions",slot:i==null?void 0:i.SuccessNotificationActions,context:{}}):a(s,{children:[o(r,{"data-testid":"primaryButton",type:"button",className:"auth-success-notification-form__button auth-success-notification-form__button--top",onClick:()=>window.location.href="/",children:e.primaryButtonText}),o(r,{"data-testid":"secondaryButton",type:"button",variant:"tertiary",onClick:async()=>{await f(),window.location.href="/"},children:e.secondaryButtonText})]})]})},j=({formSize:c="default",slots:n,className:i,labels:t})=>o("div",{className:"auth-success-notification",children:o(h,{formSize:c,className:i,slots:n,labels:t})});export{j as SuccessNotification,j as default};
|
|
4
4
|
//# sourceMappingURL=SuccessNotification.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuccessNotification.js","sources":["/@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 { 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":["
|
|
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":"6oBA0BO,MAAMA,EAET,CAAC,CAAE,SAAAC,EAAW,UAAW,UAAAC,EAAY,GAAI,MAAAC,EAAO,OAAAC,KAAa,CAC/D,MAAMC,EAAeC,EAAQ,CAC3B,YAAa,uCACb,YAAa,uCACb,kBAAmB,6CACnB,oBAAqB,8CAAA,CACtB,EAED,OACEC,EAAC,MAAA,CACC,UAAWC,EAAQ,CACjB,iCACA,mCAAmCP,CAAQ,GAC3CC,CAAA,CACD,EACD,GAAG,kBACH,KAAK,QACL,YAAU,YACV,mBAAiBE,GAAA,YAAAA,EAAQ,cAAeC,EAAa,YACrD,oBAAkBD,GAAA,YAAAA,EAAQ,cAAeC,EAAa,YACtD,YAAU,KAEV,SAAA,CAAAI,EAAC,IAAA,CACC,GAAG,kBACH,UAAU,wCACV,cAAY,qBAEX,UAAAL,GAAA,YAAAA,EAAQ,cAAeC,EAAa,WAAA,CAAA,EAEvCI,EAAC,IAAA,CACC,GAAG,kBACH,UAAU,+CACV,cAAY,uBAEX,UAAAL,GAAA,YAAAA,EAAQ,cAAeC,EAAa,WAAA,CAAA,EAEtCF,GAAA,MAAAA,EAAO,2BACNM,EAACC,EAAA,CACC,cAAY,6BACZ,KAAK,6BACL,KAAMP,GAAA,YAAAA,EAAO,2BACb,QAAS,CAAA,CAAC,CAAA,EAGZI,EAAAI,EAAA,CACE,SAAA,CAAAF,EAACG,EAAA,CACC,cAAY,gBACZ,KAAK,SACL,UAAU,qFACV,QAAS,IAAO,OAAO,SAAS,KAAO,IAEtC,SAAAP,EAAa,iBAAA,CAAA,EAEhBI,EAACG,EAAA,CACC,cAAY,kBACZ,KAAK,SACL,QAAQ,WACR,QAAS,SAAY,CACnB,MAAMC,EAAA,EACN,OAAO,SAAS,KAAO,GACzB,EAEC,SAAAR,EAAa,mBAAA,CAAA,CAChB,CAAA,CACF,CAAA,CAAA,CAAA,CAIR,EC3EaS,EAA2D,CAAC,CACvE,SAAAb,EAAW,UACX,MAAAE,EACA,UAAAD,EACA,OAAAE,CACF,IAEIK,EAAC,MAAA,CAAI,UAAU,4BACb,SAAAA,EAACT,EAAA,CACC,SAAAC,EACA,UAAAC,EACA,MAAAC,EACA,OAAAC,CAAA,CAAA,EAEJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
|
-
import{jsx as
|
|
3
|
+
import{jsx as o,jsxs as I}from"@dropins/tools/preact-jsx-runtime.js";import{Slot as E,classes as $}from"@dropins/tools/lib.js";import{Header as Z,InLineAlert as S,InputPassword as k}from"@dropins/tools/components.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{useState as N,useEffect as z,useCallback as J}from"@dropins/tools/preact-hooks.js";import{u as W,F as O}from"../chunks/RemoteShoppingAssistanceConsent.js";import{v as g,u as R,a as C}from"../chunks/usePasswordValidationMessage.js";import{a as tt}from"../chunks/getCustomerToken.js";import{r as et}from"../chunks/resetPassword.js";import{c as j,g as at,u as rt,B as st}from"../chunks/Button.js";import{useText as it}from"@dropins/tools/i18n.js";import"@dropins/tools/preact-compat.js";import"../chunks/getAdobeCommerceOptimizerData.js";import"../chunks/network-error.js";import"@dropins/tools/fetch-graphql.js";import"../fragments.js";import"../chunks/acdl.js";import"../chunks/setReCaptchaToken.js";const K=(d,p)=>d.split("&").filter(s=>s.includes(p)).map(s=>s.split("=")[1])[0],ot=({isEmailConfirmationRequired:d,signInOnSuccess:p,passwordConfigs:e,routeRedirectOnSignIn:s,routeWrongUrlRedirect:P,onErrorCallback:t,onSuccessCallback:i,handleSetInLineAlertProps:m,routeRedirectOnPasswordUpdate:x,routeSignInPage:u})=>{const r=it({errorNotification:"Auth.Notification.errorNotification",updatePasswordMessage:"Auth.Notification.updatePasswordMessage",updatePasswordActionMessage:"Auth.Notification.updatePasswordActionMessage",customerTokenErrorMessage:"Auth.Api.customerTokenErrorMessage"}),[q,n]=N({userName:"",status:!1}),[T,v]=N(""),[_,A]=N(!1),[f,U]=N(""),[y,L]=N(""),[M,c]=N(!1),[F,h]=N(!1),[b,D]=N([]);z(()=>{_&&!b.length&&(T.length?h(!1):h(!0))},[_,T,b]),z(()=>{const{search:w}=window.location;!w.includes("token=")&&!w.includes("email=")&&j(P)&&(window.location.href=P());const a=decodeURIComponent(w),V=K(a,"token"),B=K(a,"email");U(B),L(V)},[P]);const Q=J(async w=>{w.preventDefault(),c(!0),D([]);const a=at(w.target),V=(a==null?void 0:a.password)&&f&&y;a!=null&&a.password||(h(!0),c(!1));const B=(e==null?void 0:e.requiredCharacterClasses)??0,Y=(e==null?void 0:e.minLength)??0;if(!g(a==null?void 0:a.password,B)||a.password.length<+Y){A(!0),c(!1);return}if(!V){m({type:"error",text:r.errorNotification}),c(!1);return}const{message:G,success:H}=await et(f,y,a.password);if(H){if(d||!d&&!p){i==null||i(),j(x)&&(window.location.href=x()),A(!0),c(!1),h(!1),v(""),D([{label:r.updatePasswordActionMessage,onClick:()=>{window.location.href=u==null?void 0:u()}}]),m({type:"success",text:r.updatePasswordMessage});return}const l=await tt({email:f,password:a.password,handleSetInLineAlertProps:m,onErrorCallback:t,translations:r});l!=null&&l.userName&&(i==null||i(l==null?void 0:l.userName),j(s)?window.location.href=s():n({userName:l==null?void 0:l.userName,status:!0}))}else m({type:"error",text:G}),t==null||t({message:G,success:H});c(!1)},[f,y,e==null?void 0:e.requiredCharacterClasses,e==null?void 0:e.minLength,r,d,p,u,t,i,s,m,x]),X=J(w=>{v(w)},[]);return{additionalActionsAlert:b,passwordError:F,isSuccessful:q,updatePasswordValue:T,isClickSubmit:_,isLoading:M,submitUpdatePassword:Q,handleSetUpdatePasswordValue:X,setIsClickSubmit:A}},ut=({signInOnSuccess:d=!0,formSize:p="default",routeRedirectOnSignIn:e,routeWrongUrlRedirect:s,routeSignInPage:P,slots:t,onErrorCallback:i,onSuccessCallback:m,routeRedirectOnPasswordUpdate:x})=>{const u=W({title:"Auth.UpdatePasswordForm.title",buttonPrimary:"Auth.UpdatePasswordForm.buttonPrimary",placeholder:"Auth.InputPassword.placeholder",floatingLabel:"Auth.InputPassword.floatingLabel",requiredFieldError:"Auth.FormText.requiredFieldError.default"}),{passwordConfigs:r,isEmailConfirmationRequired:q}=R(),{inLineAlertProps:n,handleSetInLineAlertProps:T}=rt(),{additionalActionsAlert:v,passwordError:_,isSuccessful:A,updatePasswordValue:f,isClickSubmit:U,isLoading:y,submitUpdatePassword:L,handleSetUpdatePasswordValue:M}=ot({isEmailConfirmationRequired:q,signInOnSuccess:d,passwordConfigs:r,routeRedirectOnSignIn:e,routeWrongUrlRedirect:s,onErrorCallback:i,onSuccessCallback:m,handleSetInLineAlertProps:T,routeRedirectOnPasswordUpdate:x,routeSignInPage:P}),{isValidUniqueSymbols:c,defaultLengthMessage:F}=C({password:f,isClickSubmit:U,passwordConfigs:r});if(A.status&&(t!=null&&t.SuccessNotification))return o(E,{"data-testid":"successNotificationTestId",name:"SuccessNotification",slot:t==null?void 0:t.SuccessNotification,context:{isSuccessful:A}});const h={updatePasswordValue:f,isLoading:y,passwordError:_,isSuccessful:A};return I("div",{className:$(["auth-update-password-form",`auth-update-password-form--${p}`]),children:[o(E,{name:"Title","data-testid":"title",slot:t==null?void 0:t.Title,context:{...h},children:o(Z,{title:u.title,divider:!1,className:"auth-update-password-form__title"})}),o(S,{className:$(["auth-update-password-form__notification",["auth-update-password-form__notification--show",!!(n!=null&&n.text)]]),variant:"secondary",heading:n==null?void 0:n.text,icon:n.icon,additionalActions:v}),I(O,{name:"updatePassword_form",className:"auth-update-password-form__form",onSubmit:L,loading:y,fieldsConfig:[],formSlot:{name:"Form",slot:t==null?void 0:t.Form,context:h,dataTestId:"form"},children:[o("div",{style:"display: none;",children:o("input",{type:"text",id:"username",name:"username",autoComplete:"username"})}),o(k,{defaultValue:f,onValue:M,className:"auth-update-password-form__form__item",autoComplete:"new-password",name:"password",errorMessage:_||c==="error"||(F==null?void 0:F.status)==="error"?u.requiredFieldError:void 0,minLength:r==null?void 0:r.minLength,uniqueSymbolsStatus:c,validateLengthConfig:F,requiredCharacterClasses:r==null?void 0:r.requiredCharacterClasses,placeholder:u.placeholder,floatingLabel:u.floatingLabel}),o(E,{name:"Buttons",className:"auth-update-password-form__button","data-testid":"buttons",slot:t==null?void 0:t.Buttons,context:{...h},children:o(st,{type:"submit",buttonText:u.buttonPrimary,variant:"primary",enableLoader:y})})]})]})},Ut=({slots:d,formSize:p,signInOnSuccess:e,routeRedirectOnPasswordUpdate:s,routeRedirectOnSignIn:P,routeSignInPage:t,routeWrongUrlRedirect:i,onErrorCallback:m,onSuccessCallback:x})=>o("div",{className:"auth-update-password",children:o(ut,{formSize:p,signInOnSuccess:e,routeSignInPage:t,routeRedirectOnSignIn:P,routeWrongUrlRedirect:i,onErrorCallback:m,onSuccessCallback:x,slots:d,routeRedirectOnPasswordUpdate:s})});export{Ut as UpdatePassword,Ut as default};
|
|
4
4
|
//# sourceMappingURL=UpdatePassword.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdatePassword.js","sources":["/@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\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":["UpdatePassword","slots","formSize","signInOnSuccess","routeRedirectOnPasswordUpdate","routeRedirectOnSignIn","routeSignInPage","routeWrongUrlRedirect","onErrorCallback","onSuccessCallback","jsx","UpdatePasswordForm"],"mappings":"0ZAqBO,MAAMA,EAAiD,CAAC,CAC7D,MAAAC,EACA,SAAAC,EACA,gBAAAC,EACA,8BAAAC,EACA,sBAAAC,EACA,gBAAAC,EACA,sBAAAC,EACA,gBAAAC,EACA,kBAAAC,CACF,IAEIC,EAAC,MAAA,CAAI,UAAU,uBACb,SAAAA,EAACC,EAAA,CACC,SAAAT,EACA,gBAAAC,EACA,gBAAAG,EACA,sBAAAD,EACA,sBAAAE,EACA,gBAAAC,EACA,kBAAAC,EACA,MAAAR,EACA,8BAAAG,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 const slotContext = {\n updatePasswordValue,\n isLoading,\n passwordError,\n isSuccessful,\n };\n\n return (\n <div\n className={classes([\n 'auth-update-password-form',\n `auth-update-password-form--${formSize}`,\n ])}\n >\n <Slot\n name=\"Title\"\n data-testid=\"title\"\n slot={slots?.Title}\n context={{ ...slotContext }}\n >\n <Header\n title={translations.title}\n divider={false}\n className=\"auth-update-password-form__title\"\n />\n </Slot>\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 formSlot={{\n name: 'Form',\n slot: slots?.Form,\n context: slotContext,\n dataTestId: 'form',\n }}\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 <Slot\n name=\"Buttons\"\n className=\"auth-update-password-form__button\"\n data-testid=\"buttons\"\n slot={slots?.Buttons}\n context={{ ...slotContext }}\n >\n <Button\n type=\"submit\"\n buttonText={translations.buttonPrimary}\n variant=\"primary\"\n enableLoader={isLoading}\n />\n </Slot>\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","slotContext","jsxs","classes","Header","InLineAlert","Form","InputPassword","Button","UpdatePassword"],"mappings":"m+BAiBO,MAAMA,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,EAEK,CAACC,EAAcC,CAAe,EAAIC,EAAS,CAC/C,SAAU,GACV,OAAQ,EAAA,CACT,EACK,CAACC,EAAqBC,CAAsB,EAAIF,EAAS,EAAE,EAC3D,CAACG,EAAeC,CAAgB,EAAIJ,EAAS,EAAK,EAClD,CAACK,EAAOC,CAAQ,EAAIN,EAAS,EAAE,EAC/B,CAACO,EAAOC,CAAQ,EAAIR,EAAS,EAAE,EAC/B,CAACS,EAAWC,CAAY,EAAIV,EAAS,EAAK,EAC1C,CAACW,EAAeC,CAAgB,EAAIZ,EAAS,EAAK,EAClD,CAACa,EAAwBC,CAAyB,EACtDd,EAAsC,CAAA,CAAE,EAE1Ce,EAAU,IAAM,CACVZ,GAAiB,CAACU,EAAuB,SACvCZ,EAAoB,OACtBW,EAAiB,EAAK,EAEtBA,EAAiB,EAAI,EAG3B,EAAG,CAACT,EAAeF,EAAqBY,CAAsB,CAAC,EAE/DE,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ACC,SAAAC,EACA,gBAAAlD,EACA,gBAAAQ,EACA,sBAAAN,EACA,sBAAAC,EACA,gBAAAC,EACA,kBAAAC,EACA,MAAA8C,EACA,8BAAA5C,CAAA,CAAA,EAEJ"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ADOBE CONFIDENTIAL
|
|
3
3
|
* __________________
|
|
4
4
|
*
|
|
5
|
-
* Copyright
|
|
5
|
+
* Copyright 2026 Adobe
|
|
6
6
|
* All Rights Reserved.
|
|
7
7
|
*
|
|
8
8
|
* NOTICE: All information contained herein is, and remains
|
|
@@ -19,6 +19,7 @@ export interface CustomerModel {
|
|
|
19
19
|
lastName: string;
|
|
20
20
|
email: string;
|
|
21
21
|
groupUid: string;
|
|
22
|
+
allowRemoteShoppingAssistance?: boolean;
|
|
22
23
|
customAttributes?: Record<string, string>[];
|
|
23
24
|
errors?: {
|
|
24
25
|
message: string;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ADOBE CONFIDENTIAL
|
|
3
3
|
* __________________
|
|
4
4
|
*
|
|
5
|
-
* Copyright
|
|
5
|
+
* Copyright 2026 Adobe
|
|
6
6
|
* All Rights Reserved.
|
|
7
7
|
*
|
|
8
8
|
* NOTICE: All information contained herein is, and remains
|
|
@@ -20,5 +20,9 @@ export interface StoreConfigModel {
|
|
|
20
20
|
requiredCharacterClasses: number;
|
|
21
21
|
createAccountConfirmation: boolean;
|
|
22
22
|
customerAccessTokenLifetime: number;
|
|
23
|
+
websiteName: string;
|
|
24
|
+
shoppingAssistanceEnabled: boolean;
|
|
25
|
+
shoppingAssistanceCheckboxTitle: string;
|
|
26
|
+
shoppingAssistanceCheckboxTooltip: string;
|
|
23
27
|
}
|
|
24
28
|
//# sourceMappingURL=store-config.d.ts.map
|
package/fragments.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
/*! Copyright 2026 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
|
-
|
|
3
|
+
const e=`
|
|
4
|
+
fragment CUSTOMER_INFORMATION_FRAGMENT on Customer {
|
|
5
|
+
__typename
|
|
6
|
+
firstname
|
|
7
|
+
lastname
|
|
8
|
+
email
|
|
9
|
+
allow_remote_shopping_assistance
|
|
10
|
+
group {
|
|
11
|
+
uid
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
`;export{e as CUSTOMER_INFORMATION_FRAGMENT};
|
|
4
15
|
//# sourceMappingURL=fragments.js.map
|
package/fragments.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fragments.js","sources":[],"sourcesContent":[],"names":[],"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 2026 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 allow_remote_shopping_assistance\n group {\n uid\n }\n }\n`;\n"],"names":["CUSTOMER_INFORMATION_FRAGMENT"],"mappings":"AAiBO,MAAMA,EAA8C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ADOBE CONFIDENTIAL
|
|
3
3
|
* __________________
|
|
4
4
|
*
|
|
5
|
-
* Copyright
|
|
5
|
+
* Copyright 2026 Adobe
|
|
6
6
|
* All Rights Reserved.
|
|
7
7
|
*
|
|
8
8
|
* NOTICE: All information contained herein is, and remains
|
|
@@ -20,5 +20,10 @@ export declare const useGetStoreConfigs: () => {
|
|
|
20
20
|
requiredCharacterClasses: number;
|
|
21
21
|
} | null;
|
|
22
22
|
isEmailConfirmationRequired: boolean;
|
|
23
|
+
remoteShoppingAssistanceConfigs: {
|
|
24
|
+
shoppingAssistanceEnabled: boolean;
|
|
25
|
+
shoppingAssistanceCheckboxTitle: string;
|
|
26
|
+
shoppingAssistanceCheckboxTooltip: string;
|
|
27
|
+
} | null;
|
|
23
28
|
};
|
|
24
29
|
//# sourceMappingURL=useGetStoreConfigs.d.ts.map
|
package/i18n/en_US.json.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ declare const _default: {
|
|
|
24
24
|
"buttonSecondary": "Already a member? Sign in",
|
|
25
25
|
"keepMeLoggedText": "Keep me logged in after account creation",
|
|
26
26
|
"failedCreateCustomerAddress": "Failed to create customer addresses:",
|
|
27
|
+
"shoppingAssistanceCheckboxTitle": "Allow remote shopping assistance",
|
|
28
|
+
"shoppingAssistanceCheckboxTooltip": "This allows merchants to \"see what you see\" and take actions on your behalf in order to provide better assistance.",
|
|
27
29
|
"confirmPassword": {
|
|
28
30
|
"placeholder": "Confirm password",
|
|
29
31
|
"floatingLabel": "Confirm password *",
|
package/lib/acdl.d.ts
CHANGED