From 6bf60101c9723c59261bf491dd8295a1a12eaeb0 Mon Sep 17 00:00:00 2001 From: Konstantin Fandelyuk Date: Thu, 5 Dec 2024 11:44:19 +0200 Subject: [PATCH] added onBlur --- .../storefront-auth/chunks/SignInForm.js | 2 +- .../storefront-auth/chunks/acdl.js | 3 -- .../chunks/getAttributesForm.js | 35 ------------------- .../storefront-auth/chunks/getFormValues.js | 3 -- .../transforms/transform-create-customer.d.ts | 7 ++++ .../hooks/components/useSignInForm.d.ts | 1 + scripts/__dropins__/storefront-auth/reload | 2 +- 7 files changed, 10 insertions(+), 43 deletions(-) delete mode 100644 scripts/__dropins__/storefront-auth/chunks/acdl.js delete mode 100644 scripts/__dropins__/storefront-auth/chunks/getAttributesForm.js delete mode 100644 scripts/__dropins__/storefront-auth/chunks/getFormValues.js create mode 100644 scripts/__dropins__/storefront-auth/data/transforms/transform-create-customer.d.ts diff --git a/scripts/__dropins__/storefront-auth/chunks/SignInForm.js b/scripts/__dropins__/storefront-auth/chunks/SignInForm.js index 87ea40524c..0776c4c0b0 100644 --- a/scripts/__dropins__/storefront-auth/chunks/SignInForm.js +++ b/scripts/__dropins__/storefront-auth/chunks/SignInForm.js @@ -1,3 +1,3 @@ /*! Copyright 2024 Adobe All Rights Reserved. */ -import{jsx as m,jsxs as S}from"@dropins/tools/preact-jsx-runtime.js";import{Slot as Z,classes as z}from"@dropins/tools/lib.js";import{c as _,g as R,u as tt,F as rt,B as H}from"./UpdatePasswordForm.js";import{useState as g,useCallback as d,useEffect as $,useMemo as at}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{a as et}from"./getCustomerToken.js";import{r as ot}from"./resendConfirmationEmail.js";import{s as it,a as st}from"./simplifyTransformAttributesForm.js";import{f as nt,E as ut}from"./EmailConfirmationForm.js";import{c as mt}from"./confirmEmail.js";import{useText as J}from"@dropins/tools/i18n.js";import{Header as ct,InLineAlert as ft,InputPassword as dt}from"@dropins/tools/components.js";/* empty css */const lt=({emailConfirmationStatusMessage:t,translations:e,initialEmailValue:s,routeSignUp:l,routeForgotPassword:u,routeRedirectOnSignIn:E,onErrorCallback:w,setActiveComponent:a,onSuccessCallback:c,onSignUpLinkClick:h,handleSetInLineAlertProps:i,routeRedirectOnEmailConfirmationClose:x})=>{const[L,B]=g(""),[v,n]=g(!1),[F,f]=g(""),[A,y]=g(!1),[U,j]=g({userName:"",status:!1}),[q,T]=g(!1),[k,N]=g([]),P=d(async r=>{i(),n(!0),y(!1),N([]),await ot(r)},[i]),V=d(r=>{r.length?y(!1):y(!0),f(r)},[]);$(()=>{t!=null&&t.text&&i({text:t.text,type:t.status?t.status:void 0})},[t,i]);const p=d((r,o)=>F.length?!1:(y(!0),o&&nt(r,F,""),!0),[F]),C=d((r,o)=>{o!=null&&o.userName&&(r.target.reset(),_(E)?window.location.href=E():(c==null||c({userName:o==null?void 0:o.userName,status:!0}),j({userName:o==null?void 0:o.userName,status:!0})))},[c,E]),M=d((r,o)=>{var I;if((I=r==null?void 0:r.errorMessage)!=null&&I.length){B(o);const G=r.errorMessage.includes("This account isn't confirmed. Verify and try again."),b=G?e.resendEmailInformationText:r.errorMessage;N(G?[{label:e.resendEmailButtonText,onClick:()=>{P(o)}}]:[]),i({text:b,type:"error"}),f("")}},[P,i,e.resendEmailButtonText,e.resendEmailInformationText]),D=d(async(r,o)=>{if(i(),p(r,o))return;T(!0);const I=R(r.target);if(Object.values(I).every(b=>b)){const{email:b,password:Y}=I,K=await et({email:b,password:Y,handleSetInLineAlertProps:i,onErrorCallback:w,translations:e});M(K,b),C(r,K),y(!1)}T(!1)},[e,w,p,M,C,i]),O=d(()=>{if(_(a)){a("resetPasswordForm");return}_(u)&&(window.location.href=u())},[u,a]),Q=d(()=>{if(_(h)&&h(),_(a)){a("signUpForm");return}_(l)&&(window.location.href=l())},[h,l,a]),W=at(()=>{const r=it(st);return s!=null&&s.length?r==null?void 0:r.map(o=>({...o,defaultValue:s})):r},[s]),X=d(()=>{i(),_(x)?window.location.href=x():n(!1)},[i,x]);return{additionalActionsAlert:k,userEmail:L,defaultEnhancedEmailFields:W,passwordError:A,isSuccessful:U,isLoading:q,signInPasswordValue:F,showEmailConfirmationForm:v,setShowEmailConfirmationForm:n,setSignInPasswordValue:f,submitLogInUser:D,forgotPasswordCallback:O,onSignUpLinkClickCallback:Q,handledOnPrimaryButtonClick:X,handleSetPassword:V}},ht=()=>{let t=new URL(window.location.href),e=t.searchParams.get("email"),s=t.searchParams.get("key");e&&s&&(t.searchParams.delete("email"),t.searchParams.delete("key"),window.history.replaceState({},document.title,t.toString()))},gt=({enableEmailConfirmation:t})=>{const e=J({accountConfirmMessage:"Auth.EmailConfirmationForm.accountConfirmMessage",accountConfirmationEmailSuccessMessage:"Auth.EmailConfirmationForm.accountConfirmationEmailSuccessMessage"}),[s,l]=g({text:"",status:""});return $(()=>{if(t){const{search:u}=window.location;u.includes("email=")&&u.includes("key=")&&(async()=>{var c,h,i;const w=new URLSearchParams(u),a=await mt({customerEmail:w.get("email"),customerConfirmationKey:w.get("key")});if(!a)return null;(c=a==null?void 0:a.errors)!=null&&c.length?l({text:a==null?void 0:a.errors[0].message,status:"error"}):(l({text:a.data.confirmEmail.customer.email?e.accountConfirmationEmailSuccessMessage.replace("{email}",(i=(h=a==null?void 0:a.data)==null?void 0:h.confirmEmail.customer)==null?void 0:i.email):e.accountConfirmMessage,status:"success"}),ht())})()}},[t,e]),{emailConfirmationStatusMessage:s}},Ct=({slots:t,labels:e,formSize:s="default",initialEmailValue:l="",renderSignUpLink:u=!1,enableEmailConfirmation:E=!1,hideCloseBtnOnEmailConfirmation:w=!1,routeRedirectOnEmailConfirmationClose:a,routeRedirectOnSignIn:c,routeForgotPassword:h,routeSignUp:i,onSuccessCallback:x,setActiveComponent:L,onErrorCallback:B,onSignUpLinkClick:v})=>{const n=J({title:"Auth.SignInForm.title",buttonPrimary:"Auth.SignInForm.buttonPrimary",buttonSecondary:"Auth.SignInForm.buttonSecondary",buttonTertiary:"Auth.SignInForm.buttonTertiary",resendEmailInformationText:"Auth.Notification.resendEmailNotification.informationText",resendEmailButtonText:"Auth.Notification.resendEmailNotification.buttonText",customerTokenErrorMessage:"Auth.Api.customerTokenErrorMessage",placeholder:"Auth.InputPassword.placeholder",floatingLabel:"Auth.InputPassword.floatingLabel",requiredFieldError:"Auth.FormText.requiredFieldError"}),{emailConfirmationStatusMessage:F}=gt({enableEmailConfirmation:E}),{inLineAlertProps:f,handleSetInLineAlertProps:A}=tt(),{userEmail:y,additionalActionsAlert:U,defaultEnhancedEmailFields:j,passwordError:q,isSuccessful:T,isLoading:k,signInPasswordValue:N,showEmailConfirmationForm:P,submitLogInUser:V,forgotPasswordCallback:p,onSignUpLinkClickCallback:C,handledOnPrimaryButtonClick:M,handleSetPassword:D}=lt({translations:n,emailConfirmationStatusMessage:F,initialEmailValue:l,routeSignUp:i,routeForgotPassword:h,routeRedirectOnSignIn:c,setActiveComponent:L,onErrorCallback:B,onSuccessCallback:x,onSignUpLinkClick:v,handleSetInLineAlertProps:A,routeRedirectOnEmailConfirmationClose:a});return T.status&&(t!=null&&t.SuccessNotification)?m(Z,{"data-testid":"successNotificationTestId",name:"SuccessNotification",slot:t==null?void 0:t.SuccessNotification,context:{isSuccessful:T}}):P?m(ut,{formSize:s,userEmail:y,inLineAlertProps:f,hideCloseBtnOnEmailConfirmation:w,handleSetInLineAlertProps:A,onPrimaryButtonClick:M}):S("div",{className:z(["auth-sign-in-form",`auth-sign-in-form--${s}`]),"data-testid":"signInForm",children:[m(ct,{title:(e==null?void 0:e.formTitleText)??n.title,divider:!1,className:"auth-sign-in-form__title"}),f.text?m(ft,{"data-testid":"authInLineAlert",className:"auth-sign-in-form__notification",type:f.type,variant:"secondary",heading:f.text,icon:f.icon,additionalActions:U}):null,S(rt,{name:"signIn_form",className:"auth-sign-in-form__form",onSubmit:V,loading:k,fieldsConfig:j,children:[m(dt,{hideStatusIndicator:!0,className:"auth-sign-in-form__form__password",autoComplete:"current-password",errorMessage:q?n.requiredFieldError:void 0,defaultValue:N,onValue:D,placeholder:n.placeholder,floatingLabel:n.floatingLabel}),S("div",{className:"auth-sign-in-form__form__buttons",children:[S("div",{className:"auth-sign-in-form__form__buttons__combine",children:[m(H,{type:"button",variant:"tertiary",style:{padding:0},buttonText:n.buttonTertiary,className:"auth-sign-in-form__button auth-sign-in-form__button--forgot",enableLoader:!1,onClick:p,"data-testid":"switchToSignUp"}),u?m("span",{}):null,u?m(H,{type:"button",variant:"tertiary",style:{padding:0},buttonText:n.buttonSecondary,className:"auth-sign-in-form__button auth-sign-in-form__button--signup",enableLoader:!1,onClick:C}):null]}),m(H,{type:"submit",buttonText:(e==null?void 0:e.primaryButtonText)??n.buttonPrimary,variant:"primary",className:"auth-sign-in-form__button auth-sign-in-form__button--submit",enableLoader:k})]})]}),m("div",{id:"generateCustomerToken"})]})};export{Ct as S}; +import{jsx as c,jsxs as M}from"@dropins/tools/preact-jsx-runtime.js";import{Slot as z,classes as R}from"@dropins/tools/lib.js";import{c as E,g as tt,u as rt,F as at,B as K}from"./UpdatePasswordForm.js";import{useState as y,useCallback as m,useEffect as J,useMemo as et}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{a as ot}from"./getCustomerToken.js";import{r as it}from"./resendConfirmationEmail.js";import{s as st,a as nt}from"./simplifyTransformAttributesForm.js";import{f as ut,E as ct}from"./EmailConfirmationForm.js";import{c as mt}from"./confirmEmail.js";import{useText as O}from"@dropins/tools/i18n.js";import{Header as ft,InLineAlert as dt,InputPassword as lt}from"@dropins/tools/components.js";/* empty css */const ht=({emailConfirmationStatusMessage:t,translations:e,initialEmailValue:s,routeSignUp:l,routeForgotPassword:u,routeRedirectOnSignIn:F,onErrorCallback:_,setActiveComponent:a,onSuccessCallback:f,onSignUpLinkClick:h,handleSetInLineAlertProps:i,routeRedirectOnEmailConfirmationClose:x})=>{const[S,L]=y(""),[v,n]=y(!1),[g,d]=y(""),[A,w]=y(!1),[U,j]=y({userName:"",status:!1}),[q,T]=y(!1),[P,N]=y([]),k=m(async r=>{i(),n(!0),w(!1),N([]),await it(r)},[i]),V=m(r=>{r.length?w(!1):w(!0),d(r)},[]);J(()=>{t!=null&&t.text&&i({text:t.text,type:t.status?t.status:void 0})},[t,i]);const D=m(()=>{g.length||w(!0)},[g]),p=m((r,o)=>g.length?!1:(w(!0),o&&ut(r,g,""),!0),[g]),B=m((r,o)=>{o!=null&&o.userName&&(r.target.reset(),E(F)?window.location.href=F():(f==null||f({userName:o==null?void 0:o.userName,status:!0}),j({userName:o==null?void 0:o.userName,status:!0})))},[f,F]),C=m((r,o)=>{var I;if((I=r==null?void 0:r.errorMessage)!=null&&I.length){L(o);const H=r.errorMessage.includes("This account isn't confirmed. Verify and try again."),b=H?e.resendEmailInformationText:r.errorMessage;N(H?[{label:e.resendEmailButtonText,onClick:()=>{k(o)}}]:[]),i({text:b,type:"error"}),d("")}},[k,i,e.resendEmailButtonText,e.resendEmailInformationText]),G=m(async(r,o)=>{if(i(),p(r,o))return;T(!0);const I=tt(r.target);if(Object.values(I).every(b=>b)){const{email:b,password:Z}=I,$=await ot({email:b,password:Z,handleSetInLineAlertProps:i,onErrorCallback:_,translations:e});C($,b),B(r,$),w(!1)}T(!1)},[e,_,p,C,B,i]),Q=m(()=>{if(E(a)){a("resetPasswordForm");return}E(u)&&(window.location.href=u())},[u,a]),W=m(()=>{if(E(h)&&h(),E(a)){a("signUpForm");return}E(l)&&(window.location.href=l())},[h,l,a]),X=et(()=>{const r=st(nt);return s!=null&&s.length?r==null?void 0:r.map(o=>({...o,defaultValue:s})):r},[s]),Y=m(()=>{i(),E(x)?window.location.href=x():n(!1)},[i,x]);return{additionalActionsAlert:P,userEmail:S,defaultEnhancedEmailFields:X,passwordError:A,isSuccessful:U,isLoading:q,signInPasswordValue:g,showEmailConfirmationForm:v,setShowEmailConfirmationForm:n,setSignInPasswordValue:d,submitLogInUser:G,forgotPasswordCallback:Q,onSignUpLinkClickCallback:W,handledOnPrimaryButtonClick:Y,handleSetPassword:V,onBlurPassword:D}},gt=()=>{let t=new URL(window.location.href),e=t.searchParams.get("email"),s=t.searchParams.get("key");e&&s&&(t.searchParams.delete("email"),t.searchParams.delete("key"),window.history.replaceState({},document.title,t.toString()))},wt=({enableEmailConfirmation:t})=>{const e=O({accountConfirmMessage:"Auth.EmailConfirmationForm.accountConfirmMessage",accountConfirmationEmailSuccessMessage:"Auth.EmailConfirmationForm.accountConfirmationEmailSuccessMessage"}),[s,l]=y({text:"",status:""});return J(()=>{if(t){const{search:u}=window.location;u.includes("email=")&&u.includes("key=")&&(async()=>{var f,h,i;const _=new URLSearchParams(u),a=await mt({customerEmail:_.get("email"),customerConfirmationKey:_.get("key")});if(!a)return null;(f=a==null?void 0:a.errors)!=null&&f.length?l({text:a==null?void 0:a.errors[0].message,status:"error"}):(l({text:a.data.confirmEmail.customer.email?e.accountConfirmationEmailSuccessMessage.replace("{email}",(i=(h=a==null?void 0:a.data)==null?void 0:h.confirmEmail.customer)==null?void 0:i.email):e.accountConfirmMessage,status:"success"}),gt())})()}},[t,e]),{emailConfirmationStatusMessage:s}},Ct=({slots:t,labels:e,formSize:s="default",initialEmailValue:l="",renderSignUpLink:u=!1,enableEmailConfirmation:F=!1,hideCloseBtnOnEmailConfirmation:_=!1,routeRedirectOnEmailConfirmationClose:a,routeRedirectOnSignIn:f,routeForgotPassword:h,routeSignUp:i,onSuccessCallback:x,setActiveComponent:S,onErrorCallback:L,onSignUpLinkClick:v})=>{const n=O({title:"Auth.SignInForm.title",buttonPrimary:"Auth.SignInForm.buttonPrimary",buttonSecondary:"Auth.SignInForm.buttonSecondary",buttonTertiary:"Auth.SignInForm.buttonTertiary",resendEmailInformationText:"Auth.Notification.resendEmailNotification.informationText",resendEmailButtonText:"Auth.Notification.resendEmailNotification.buttonText",customerTokenErrorMessage:"Auth.Api.customerTokenErrorMessage",placeholder:"Auth.InputPassword.placeholder",floatingLabel:"Auth.InputPassword.floatingLabel",requiredFieldError:"Auth.FormText.requiredFieldError"}),{emailConfirmationStatusMessage:g}=wt({enableEmailConfirmation:F}),{inLineAlertProps:d,handleSetInLineAlertProps:A}=rt(),{userEmail:w,additionalActionsAlert:U,defaultEnhancedEmailFields:j,passwordError:q,isSuccessful:T,isLoading:P,signInPasswordValue:N,showEmailConfirmationForm:k,submitLogInUser:V,forgotPasswordCallback:D,onSignUpLinkClickCallback:p,handledOnPrimaryButtonClick:B,handleSetPassword:C,onBlurPassword:G}=ht({translations:n,emailConfirmationStatusMessage:g,initialEmailValue:l,routeSignUp:i,routeForgotPassword:h,routeRedirectOnSignIn:f,setActiveComponent:S,onErrorCallback:L,onSuccessCallback:x,onSignUpLinkClick:v,handleSetInLineAlertProps:A,routeRedirectOnEmailConfirmationClose:a});return T.status&&(t!=null&&t.SuccessNotification)?c(z,{"data-testid":"successNotificationTestId",name:"SuccessNotification",slot:t==null?void 0:t.SuccessNotification,context:{isSuccessful:T}}):k?c(ct,{formSize:s,userEmail:w,inLineAlertProps:d,hideCloseBtnOnEmailConfirmation:_,handleSetInLineAlertProps:A,onPrimaryButtonClick:B}):M("div",{className:R(["auth-sign-in-form",`auth-sign-in-form--${s}`]),"data-testid":"signInForm",children:[c(ft,{title:(e==null?void 0:e.formTitleText)??n.title,divider:!1,className:"auth-sign-in-form__title"}),d.text?c(dt,{"data-testid":"authInLineAlert",className:"auth-sign-in-form__notification",type:d.type,variant:"secondary",heading:d.text,icon:d.icon,additionalActions:U}):null,M(at,{name:"signIn_form",className:"auth-sign-in-form__form",onSubmit:V,loading:P,fieldsConfig:j,children:[c(lt,{hideStatusIndicator:!0,className:"auth-sign-in-form__form__password",autoComplete:"current-password",errorMessage:q?n.requiredFieldError:void 0,defaultValue:N,onValue:C,onBlur:G,placeholder:n.placeholder,floatingLabel:n.floatingLabel}),M("div",{className:"auth-sign-in-form__form__buttons",children:[M("div",{className:"auth-sign-in-form__form__buttons__combine",children:[c(K,{type:"button",variant:"tertiary",style:{padding:0},buttonText:n.buttonTertiary,className:"auth-sign-in-form__button auth-sign-in-form__button--forgot",enableLoader:!1,onClick:D,"data-testid":"switchToSignUp"}),u?c("span",{}):null,u?c(K,{type:"button",variant:"tertiary",style:{padding:0},buttonText:n.buttonSecondary,className:"auth-sign-in-form__button auth-sign-in-form__button--signup",enableLoader:!1,onClick:p}):null]}),c(K,{type:"submit",buttonText:(e==null?void 0:e.primaryButtonText)??n.buttonPrimary,variant:"primary",className:"auth-sign-in-form__button auth-sign-in-form__button--submit",enableLoader:P})]})]}),c("div",{id:"generateCustomerToken"})]})};export{Ct as S}; diff --git a/scripts/__dropins__/storefront-auth/chunks/acdl.js b/scripts/__dropins__/storefront-auth/chunks/acdl.js deleted file mode 100644 index 503c9bd64f..0000000000 --- a/scripts/__dropins__/storefront-auth/chunks/acdl.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! Copyright 2024 Adobe -All Rights Reserved. */ -import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{g as C,a as u}from"./getStoreConfig.js";const m=e=>({personalEmail:{address:(e==null?void 0:e.email)||""},userAccount:{login:!0},commerce:{commerceScope:{storeCode:(e==null?void 0:e.store_code)||""}}}),d=e=>({userAccount:{logout:!0},commerce:{commerceScope:{storeCode:(e==null?void 0:e.store_code)||""}}}),f=e=>({personalEmail:{address:(e==null?void 0:e.email)||""},userAccount:{updateProfile:e==null?void 0:e.updateProfile},commerce:{commerceScope:{storeCode:(e==null?void 0:e.store_code)||""}}}),h=e=>{document.cookie=`${e}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`},A=async()=>{try{const e=sessionStorage.getItem("storeConfig");let o=(e?JSON.parse(e):{}).customerAccessTokenLifetime;if(!o){const n=await C();sessionStorage.setItem("storeConfig",JSON.stringify(n)),o=(n==null?void 0:n.customerAccessTokenLifetime)||u}return`Max-Age=${o}`}catch(e){return console.error("getCookiesLifetime() Error:",e),`Max-Age=${u}`}};var p=(e=>(e.CREATE_ACCOUNT_EVENT="create-account",e.SIGN_IN="sign-in",e.SIGN_OUT="sign-out",e))(p||{});const a="authContext",g="shopperContext",i={CREATE_ACCOUNT:"create-account",SIGN_IN:"sign-in",SIGN_OUT:"sign-out"};function s(e,t){const o=window.adobeDataLayer||[];o.push({[e]:null}),o.push({[e]:t})}function c(e){(window.adobeDataLayer||[]).push(o=>{const n=o.getState?o.getState():{};o.push({event:e,eventInfo:{...n}})})}function E(e){const t=f(e);s(a,t),c(i.CREATE_ACCOUNT)}function l(e){const t=m(e);s(a,t),s(g,{shopperId:"logged-in"}),c(i.SIGN_IN)}function S(e){const t=d(e);s(a,t),s(g,{shopperId:"guest"}),c(i.SIGN_OUT)}const _=(e,t)=>{const o=sessionStorage.getItem("storeConfig"),r={...o?JSON.parse(o):{},...t};switch(e){case"create-account":E(r);break;case"sign-in":l(r);break;case"sign-out":S(r);break;default:return null}};export{p as E,h as d,A as g,_ as p}; diff --git a/scripts/__dropins__/storefront-auth/chunks/getAttributesForm.js b/scripts/__dropins__/storefront-auth/chunks/getAttributesForm.js deleted file mode 100644 index 60972b0ddb..0000000000 --- a/scripts/__dropins__/storefront-auth/chunks/getAttributesForm.js +++ /dev/null @@ -1,35 +0,0 @@ -/*! Copyright 2024 Adobe -All Rights Reserved. */ -import{f as o,h as a}from"./network-error.js";import{t as s}from"./transform-attributes-form.js";import{h as i}from"./getStoreConfig.js";const n=` - query GET_ATTRIBUTES_FORM($formCode: String!) { - attributesForm(formCode: $formCode) { - items { - code - default_value - entity_type - frontend_class - frontend_input - is_required - is_unique - label - options { - is_default - label - value - } - ... on CustomerAttributeMetadata { - multiline_count - sort_order - validate_rules { - name - value - } - } - } - errors { - type - message - } - } - } -`,c=async e=>await o(n,{method:"GET",cache:"force-cache",variables:{formCode:e}}).then(r=>{var t;return(t=r.errors)!=null&&t.length?i(r.errors):s(r)}).catch(a);export{c as g}; diff --git a/scripts/__dropins__/storefront-auth/chunks/getFormValues.js b/scripts/__dropins__/storefront-auth/chunks/getFormValues.js deleted file mode 100644 index 1c8fc7e457..0000000000 --- a/scripts/__dropins__/storefront-auth/chunks/getFormValues.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! Copyright 2024 Adobe -All Rights Reserved. */ -const n=r=>{if(!r)return null;const t=new FormData(r);if(t&&typeof t.entries=="function"){const e=t.entries();if(e&&typeof e[Symbol.iterator]=="function")return JSON.parse(JSON.stringify(Object.fromEntries(e)))||{}}return{}};export{n as g}; diff --git a/scripts/__dropins__/storefront-auth/data/transforms/transform-create-customer.d.ts b/scripts/__dropins__/storefront-auth/data/transforms/transform-create-customer.d.ts new file mode 100644 index 0000000000..88ef279d24 --- /dev/null +++ b/scripts/__dropins__/storefront-auth/data/transforms/transform-create-customer.d.ts @@ -0,0 +1,7 @@ +import { DataCreateCustomerV2, DataCreateCustomer } from '../../types'; +import { CustomerModel } from '../models'; + +type ApiResponse = T extends true ? DataCreateCustomerV2 : DataCreateCustomer; +export declare const transformCreateCustomer: (response: ApiResponse, apiVersion2: T) => CustomerModel; +export {}; +//# sourceMappingURL=transform-create-customer.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/hooks/components/useSignInForm.d.ts b/scripts/__dropins__/storefront-auth/hooks/components/useSignInForm.d.ts index 3cd056d247..fb18b8513d 100644 --- a/scripts/__dropins__/storefront-auth/hooks/components/useSignInForm.d.ts +++ b/scripts/__dropins__/storefront-auth/hooks/components/useSignInForm.d.ts @@ -19,5 +19,6 @@ export declare const useSignInForm: ({ emailConfirmationStatusMessage, translati onSignUpLinkClickCallback: () => void; handledOnPrimaryButtonClick: () => void; handleSetPassword: (value: string) => void; + onBlurPassword: () => void; }; //# sourceMappingURL=useSignInForm.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/reload b/scripts/__dropins__/storefront-auth/reload index 79c40faefb..4e36cfd4c6 100644 --- a/scripts/__dropins__/storefront-auth/reload +++ b/scripts/__dropins__/storefront-auth/reload @@ -1 +1 @@ -{"at":1733236994126} \ No newline at end of file +{"at":1733391402238} \ No newline at end of file