New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dropins/storefront-account

Package Overview
Dependencies
Maintainers
0
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dropins/storefront-account - npm Package Compare versions

Comparing version 0.1.0-alpha15 to 0.1.0-alpha16

api/fragments/CustomerFragment.graphql.d.ts

10

api.js

@@ -1,9 +0,1 @@

import{Initializer as c}from"@dropins/tools/lib.js";import{f as n,h as d,a as u}from"./chunks/removeCustomerAddress.js";import{e as T,d as x,g as y,j as Q,i as k,k as w,l as z,r as O,s as R,b,c as v,u as M}from"./chunks/removeCustomerAddress.js";import{g as U}from"./chunks/getOrderHistoryList.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/fetch-graphql.js";const s=new c({init:async t=>{const a={authHeaderConfig:{header:"Authorization",tokenPrefix:"Bearer"}};s.config.setConfig({...a,...t})},listeners:()=>[]}),G=s.config,f=t=>{var a,r,e,i,o,m;return{email:((r=(a=t==null?void 0:t.data)==null?void 0:a.customer)==null?void 0:r.email)||"",firstname:((i=(e=t==null?void 0:t.data)==null?void 0:e.customer)==null?void 0:i.firstname)||"",lastname:((m=(o=t==null?void 0:t.data)==null?void 0:o.customer)==null?void 0:m.lastname)||""}},h=`
query GET_CUSTOMER {
customer {
firstname
lastname
email
}
}
`,A=async()=>await n(h,{method:"GET",cache:"force-cache"}).then(t=>{var a;return(a=t.errors)!=null&&a.length?d(t.errors):f(t)}).catch(u);export{G as config,T as createCustomerAddress,n as fetchGraphQl,x as getAttributesForm,y as getConfig,Q as getCountries,A as getCustomer,k as getCustomerAddress,U as getOrderHistoryList,w as getRegions,s as initialize,z as removeCustomerAddress,O as removeFetchGraphQlHeader,R as setEndpoint,b as setFetchGraphQlHeader,v as setFetchGraphQlHeaders,M as updateCustomerAddress};
import{Initializer as r}from"@dropins/tools/lib.js";import{d as m,f as u,c as f,g as p,h as c,e as C,i as h,j as l,r as A,s as x,a as H,b as F,u as G}from"./chunks/removeCustomerAddress.js";import{g as b,a as z,c as v,b as w,u as y}from"./chunks/updateCustomer.js";import{g as P}from"./chunks/getOrderHistoryList.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/fetch-graphql.js";const e=new r({init:async t=>{const s={authHeaderConfig:{header:"Authorization",tokenPrefix:"Bearer"}};e.config.setConfig({...s,...t})},listeners:()=>[]}),n=e.config;export{n as config,m as createCustomerAddress,u as fetchGraphQl,f as getAttributesForm,p as getConfig,c as getCountries,b as getCustomer,C as getCustomerAddress,P as getOrderHistoryList,h as getRegions,z as getStoreConfig,e as initialize,l as removeCustomerAddress,A as removeFetchGraphQlHeader,x as setEndpoint,H as setFetchGraphQlHeader,F as setFetchGraphQlHeaders,v as updateCustomer,G as updateCustomerAddress,w as updateCustomerEmail,y as updateCustomerPassword};

@@ -1,2 +0,2 @@

export declare const GET_CUSTOMER = "\n query GET_CUSTOMER {\n customer {\n firstname\n lastname\n email\n }\n }\n";
export declare const GET_CUSTOMER: string;
//# sourceMappingURL=getCustomer.graphql.d.ts.map

@@ -12,2 +12,6 @@ export * from './initialize';

export * from './getOrderHistoryList';
export * from './updateCustomerPassword';
export * from './getStoreConfig';
export * from './updateCustomerEmail';
export * from './updateCustomer';
//# sourceMappingURL=index.d.ts.map

@@ -1,2 +0,2 @@

import{t as l,m as i,f as m,h as _,a as p}from"./removeCustomerAddress.js";const f=(t,r="en-US",s={})=>{const e={...{day:"2-digit",month:"2-digit",year:"numeric"},...s},a=new Date(t);return isNaN(a.getTime())?"Invalid Date":new Intl.DateTimeFormat(r,e).format(a)},g=t=>{var d,c;if(!((c=(d=t.data)==null?void 0:d.customer)!=null&&c.orders))return null;const{items:r,page_info:s,total_count:n,date_of_first_order:e}=t.data.customer.orders;return{items:r.map(o=>{const u={...o,order_date:f(o.order_date),shipping_address:l(o.shipping_address),billing_address:l(o.billing_address)};return i(u,"camelCase",{})}),pageInfo:i(s,"camelCase",{}),totalCount:i(n,"camelCase",{}),dateOfFirstOrder:i(e,"camelCase",{})}},y=`
import{t as l,k as i,f as m,l as _,m as p}from"./removeCustomerAddress.js";const f=(t,r="en-US",s={})=>{const e={...{day:"2-digit",month:"2-digit",year:"numeric"},...s},a=new Date(t);return isNaN(a.getTime())?"Invalid Date":new Intl.DateTimeFormat(r,e).format(a)},g=t=>{var d,c;if(!((c=(d=t.data)==null?void 0:d.customer)!=null&&c.orders))return null;const{items:r,page_info:s,total_count:n,date_of_first_order:e}=t.data.customer.orders;return{items:r.map(o=>{const u={...o,order_date:f(o.order_date),shipping_address:l(o.shipping_address),billing_address:l(o.billing_address)};return i(u,"camelCase",{})}),pageInfo:i(s,"camelCase",{}),totalCount:i(n,"camelCase",{}),dateOfFirstOrder:i(e,"camelCase",{})}},y=`
fragment AddressesList on OrderAddress {

@@ -3,0 +3,0 @@ city

@@ -1,2 +0,2 @@

import{events as C}from"@dropins/tools/event-bus.js";import{FetchGraphQL as T}from"@dropins/tools/fetch-graphql.js";const{setEndpoint:x,setFetchGraphQlHeader:B,removeFetchGraphQlHeader:Q,setFetchGraphQlHeaders:j,fetchGraphQl:s,getConfig:k}=new T().getMethods(),A=`
import{events as C}from"@dropins/tools/event-bus.js";import{FetchGraphQL as T}from"@dropins/tools/fetch-graphql.js";const b=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase()),A=t=>t.replace(/([A-Z])/g,e=>`_${e.toLowerCase()}`),a=(t,e,r)=>{const n=["string","boolean","number"],o=e==="camelCase"?b:A;return Array.isArray(t)?t.map(i=>n.includes(typeof i)||i===null?i:typeof i=="object"?a(i,e,r):i):t!==null&&typeof t=="object"?Object.entries(t).reduce((i,[c,_])=>{const u=r&&r[c]?r[c]:o(c);return i[u]=n.includes(typeof _)||_===null?_:a(_,e,r),i},{}):t},{setEndpoint:x,setFetchGraphQlHeader:B,removeFetchGraphQlHeader:Q,setFetchGraphQlHeaders:j,fetchGraphQl:s,getConfig:k}=new T().getMethods(),p=`
query GET_ATTRIBUTES_FORM($formCode: String!) {

@@ -33,3 +33,3 @@ attributesForm(formCode: $formCode) {

}
`,p=`
`,R=`
query GET_ATTRIBUTES_FORM_SHORT {

@@ -48,3 +48,3 @@ attributesForm(formCode: "customer_register_address") {

}
`,f=t=>{throw t instanceof DOMException&&t.name==="AbortError"||C.emit("error",{source:"auth",type:"network",error:t}),t},h=t=>{const e=t.map(r=>r.message).join(" ");throw Error(e)},b=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase()),R=t=>t.replace(/([A-Z])/g,e=>`_${e.toLowerCase()}`),a=(t,e,r)=>{const n=["string","boolean","number"],o=e==="camelCase"?b:R;return Array.isArray(t)?t.map(i=>n.includes(typeof i)||i===null?i:typeof i=="object"?a(i,e,r):i):t!==null&&typeof t=="object"?Object.entries(t).reduce((i,[c,_])=>{const u=r&&r[c]?r[c]:o(c);return i[u]=n.includes(typeof _)||_===null?_:a(_,e,r),i},{}):t},S=t=>{let e=[];for(const r of t)if(!(r.frontend_input!=="MULTILINE"||r.multiline_count<2))for(let n=2;n<=r.multiline_count;n++){const o={...r,is_required:!1,name:`${r.code}_multiline_${n}`,code:`${r.code}_multiline_${n}`,id:`${r.code}_multiline_${n}`};e.push(o)}return e},y=t=>{var i,c,_;const e=((c=(i=t==null?void 0:t.data)==null?void 0:i.attributesForm)==null?void 0:c.items)||[];if(!e.length)return[];const r=(_=e.filter(u=>{var l;return!((l=u.frontend_input)!=null&&l.includes("HIDDEN"))}))==null?void 0:_.map(({code:u,...l})=>{const m=u!=="country_id"?u:"country_code";return{...l,name:m,id:m,code:m}}),n=S(r);return r.concat(n).map(u=>{var g;const l=u.code==="firstname"?"firstName":u.code==="lastname"?"lastName":b(u.code),m=(g=u.options)==null?void 0:g.map(E=>({isDefault:E.is_default,text:E.label,value:E.value}));return a({...u,options:m,customUpperCode:l},"camelCase",{frontend_input:"fieldType",frontend_class:"className",is_required:"required",sort_order:"orderNumber"})}).sort((u,l)=>u.orderNumber-l.orderNumber)},v=t=>{const e={};for(const r in t){const n=t[r];!Array.isArray(n)||n.length===0||(r==="custom_attributesV2"?n.forEach(o=>{typeof o=="object"&&"value"in o&&(e[o==null?void 0:o.code]=o==null?void 0:o.value)}):n.length>1?n.forEach((o,i)=>{i===0?e[r]=o:e[`${r}_multiline_${i+1}`]=o}):e[r]=n[0])}return e},O=t=>{var e,r,n;return a({firstname:(t==null?void 0:t.firstname)||"",lastname:(t==null?void 0:t.lastname)||"",city:(t==null?void 0:t.city)||"",company:(t==null?void 0:t.company)||"",country_code:(t==null?void 0:t.country_code)||"",region:{region:((e=t==null?void 0:t.region)==null?void 0:e.region)||"",region_code:((r=t==null?void 0:t.region)==null?void 0:r.region_code)||"",region_id:((n=t==null?void 0:t.region)==null?void 0:n.region_id)||""},telephone:(t==null?void 0:t.telephone)||"",id:(t==null?void 0:t.id)||"",vat_id:(t==null?void 0:t.vat_id)||"",postcode:(t==null?void 0:t.postcode)||"",default_shipping:(t==null?void 0:t.default_shipping)||!1,default_billing:(t==null?void 0:t.default_billing)||!1,...v(t)},"camelCase",{})},$=t=>{var r,n;const e=((n=(r=t==null?void 0:t.data)==null?void 0:r.customer)==null?void 0:n.addresses)||[];return e.length?e.map(O).sort((o,i)=>(Number(i.defaultBilling)||Number(i.defaultShipping))-(Number(o.defaultBilling)||Number(o.defaultShipping))):[]},d=t=>{var c,_;if(!((_=(c=t==null?void 0:t.data)==null?void 0:c.countries)!=null&&_.length))return{availableCountries:[],countriesWithRequiredRegion:[],optionalZipCountries:[]};const{countries:e,storeConfig:r}=t.data,n=r==null?void 0:r.countries_with_required_region.split(","),o=r==null?void 0:r.optional_zip_countries.split(",");return{availableCountries:e.filter(({two_letter_abbreviation:u,full_name_locale:l})=>!!(u&&l)).map(u=>{const{two_letter_abbreviation:l,full_name_locale:m}=u;return{value:l,text:m}}).sort((u,l)=>u.text.localeCompare(l.text)),countriesWithRequiredRegion:n,optionalZipCountries:o}},G=t=>{var r,n;return(n=(r=t==null?void 0:t.data)==null?void 0:r.country)!=null&&n.available_regions?t.data.country.available_regions.filter(o=>{if(!o)return!1;const{id:i,code:c,name:_}=o;return!!(i&&c&&_)}).map(o=>{const{id:i}=o;return{id:i,text:o.name,value:`${o.code},${o.id}`}}):[]},H=async t=>await s(t!=="shortRequest"?A:p,{method:"GET",cache:"force-cache",variables:{formCode:t}}).then(e=>{var r;return(r=e.errors)!=null&&r.length?h(e.errors):y(e)}).catch(f),I=`
`,f=t=>{throw t instanceof DOMException&&t.name==="AbortError"||C.emit("error",{source:"auth",type:"network",error:t}),t},h=t=>{const e=t.map(r=>r.message).join(" ");throw Error(e)},S=t=>{let e=[];for(const r of t)if(!(r.frontend_input!=="MULTILINE"||r.multiline_count<2))for(let n=2;n<=r.multiline_count;n++){const o={...r,is_required:!1,name:`${r.code}_multiline_${n}`,code:`${r.code}_multiline_${n}`,id:`${r.code}_multiline_${n}`};e.push(o)}return e},y=t=>{var i,c,_;const e=((c=(i=t==null?void 0:t.data)==null?void 0:i.attributesForm)==null?void 0:c.items)||[];if(!e.length)return[];const r=(_=e.filter(u=>{var l;return!((l=u.frontend_input)!=null&&l.includes("HIDDEN"))}))==null?void 0:_.map(({code:u,...l})=>{const m=u!=="country_id"?u:"country_code";return{...l,name:m,id:m,code:m}}),n=S(r);return r.concat(n).map(u=>{var g;const l=u.code==="middlename"?"middleName":u.code==="firstname"?"firstName":u.code==="lastname"?"lastName":b(u.code),m=(g=u.options)==null?void 0:g.map(E=>({isDefault:E.is_default,text:E.label,value:E.value}));return a({...u,options:m,customUpperCode:l},"camelCase",{frontend_input:"fieldType",frontend_class:"className",is_required:"required",sort_order:"orderNumber"})}).sort((u,l)=>u.orderNumber-l.orderNumber)},v=t=>{const e={};for(const r in t){const n=t[r];!Array.isArray(n)||n.length===0||(r==="custom_attributesV2"?n.forEach(o=>{typeof o=="object"&&"value"in o&&(e[o==null?void 0:o.code]=o==null?void 0:o.value)}):n.length>1?n.forEach((o,i)=>{i===0?e[r]=o:e[`${r}_multiline_${i+1}`]=o}):e[r]=n[0])}return e},d=t=>{var e,r,n;return a({firstname:(t==null?void 0:t.firstname)||"",lastname:(t==null?void 0:t.lastname)||"",city:(t==null?void 0:t.city)||"",company:(t==null?void 0:t.company)||"",country_code:(t==null?void 0:t.country_code)||"",region:{region:((e=t==null?void 0:t.region)==null?void 0:e.region)||"",region_code:((r=t==null?void 0:t.region)==null?void 0:r.region_code)||"",region_id:((n=t==null?void 0:t.region)==null?void 0:n.region_id)||""},telephone:(t==null?void 0:t.telephone)||"",id:(t==null?void 0:t.id)||"",vat_id:(t==null?void 0:t.vat_id)||"",postcode:(t==null?void 0:t.postcode)||"",default_shipping:(t==null?void 0:t.default_shipping)||!1,default_billing:(t==null?void 0:t.default_billing)||!1,...v(t)},"camelCase",{})},O=t=>{var r,n;const e=((n=(r=t==null?void 0:t.data)==null?void 0:r.customer)==null?void 0:n.addresses)||[];return e.length?e.map(d).sort((o,i)=>(Number(i.defaultBilling)||Number(i.defaultShipping))-(Number(o.defaultBilling)||Number(o.defaultShipping))):[]},$=t=>{var c,_;if(!((_=(c=t==null?void 0:t.data)==null?void 0:c.countries)!=null&&_.length))return{availableCountries:[],countriesWithRequiredRegion:[],optionalZipCountries:[]};const{countries:e,storeConfig:r}=t.data,n=r==null?void 0:r.countries_with_required_region.split(","),o=r==null?void 0:r.optional_zip_countries.split(",");return{availableCountries:e.filter(({two_letter_abbreviation:u,full_name_locale:l})=>!!(u&&l)).map(u=>{const{two_letter_abbreviation:l,full_name_locale:m}=u;return{value:l,text:m}}).sort((u,l)=>u.text.localeCompare(l.text)),countriesWithRequiredRegion:n,optionalZipCountries:o}},N=t=>{var r,n;return(n=(r=t==null?void 0:t.data)==null?void 0:r.country)!=null&&n.available_regions?t.data.country.available_regions.filter(o=>{if(!o)return!1;const{id:i,code:c,name:_}=o;return!!(i&&c&&_)}).map(o=>{const{id:i}=o;return{id:i,text:o.name,value:`${o.code},${o.id}`}}):[]},H=async t=>await s(t!=="shortRequest"?p:R,{method:"GET",cache:"force-cache",variables:{formCode:t}}).then(e=>{var r;return(r=e.errors)!=null&&r.length?h(e.errors):y(e)}).catch(f),G=`
mutation CREATE_CUSTOMER_ADDRESS($input: CustomerAddressInput!) {

@@ -55,3 +55,3 @@ createCustomerAddress(input:$input) {

}
`,L=async t=>await s(I,{method:"POST",variables:{input:a(t,"snakeCase",{custom_attributesV2:"custom_attributesV2",firstName:"firstname",lastName:"lastname"})}}).then(e=>{var r,n,o;return(r=e.errors)!=null&&r.length?h(e.errors):((o=(n=e==null?void 0:e.data)==null?void 0:n.createCustomerAddress)==null?void 0:o.firstname)||""}).catch(f),M=`
`,L=async t=>await s(G,{method:"POST",variables:{input:a(t,"snakeCase",{custom_attributesV2:"custom_attributesV2",firstName:"firstname",lastName:"lastname"})}}).then(e=>{var r,n,o;return(r=e.errors)!=null&&r.length?h(e.errors):((o=(n=e==null?void 0:e.data)==null?void 0:n.createCustomerAddress)==null?void 0:o.firstname)||""}).catch(f),I=`
query GET_CUSTOMER_ADDRESS {

@@ -86,3 +86,3 @@ customer {

}
`,P=async()=>await s(M,{method:"GET",cache:"no-cache"}).then(t=>{var e;return(e=t.errors)!=null&&e.length?h(t.errors):$(t)}).catch(f),N=`
`,P=async()=>await s(I,{method:"GET",cache:"no-cache"}).then(t=>{var e;return(e=t.errors)!=null&&e.length?h(t.errors):O(t)}).catch(f),M=`
query GET_COUNTRIES_QUERY {

@@ -98,3 +98,3 @@ countries {

}
`,z=async()=>await s(N,{method:"GET",cache:"no-cache"}).then(t=>{var e;return(e=t.errors)!=null&&e.length?h(t.errors):d(t)}).catch(f),U=`
`,z=async()=>await s(M,{method:"GET",cache:"no-cache"}).then(t=>{var e;return(e=t.errors)!=null&&e.length?h(t.errors):$(t)}).catch(f),U=`
query GET_REGIONS($countryCode: String!) {

@@ -110,3 +110,3 @@ country(id: $countryCode) {

}
`,Z=async t=>await s(U,{method:"GET",cache:"no-cache",variables:{countryCode:t}}).then(e=>{var r;return(r=e.errors)!=null&&r.length?h(e.errors):G(e)}).catch(f),w=`
`,Z=async t=>await s(U,{method:"GET",cache:"no-cache",variables:{countryCode:t}}).then(e=>{var r;return(r=e.errors)!=null&&r.length?h(e.errors):N(e)}).catch(f),w=`
mutation UPDATE_CUSTOMER_ADDRESS($id: Int!,

@@ -122,2 +122,2 @@ $input: CustomerAddressInput) {

}
`,W=async t=>await s(q,{method:"POST",variables:{id:t}}).then(e=>{var r;return(r=e.errors)!=null&&r.length?h(e.errors):e.data.deleteCustomerAddress}).catch(f);export{f as a,B as b,j as c,H as d,L as e,s as f,k as g,h,P as i,z as j,Z as k,W as l,a as m,R as n,b as o,Q as r,x as s,O as t,K as u};
`,W=async t=>await s(q,{method:"POST",variables:{id:t}}).then(e=>{var r;return(r=e.errors)!=null&&r.length?h(e.errors):e.data.deleteCustomerAddress}).catch(f);export{B as a,j as b,H as c,L as d,P as e,s as f,k as g,z as h,Z as i,W as j,a as k,h as l,f as m,b as n,A as o,Q as r,x as s,d as t,K as u};

@@ -13,2 +13,5 @@ export * from '../containers/AddressForm';

export * from './AddressFormWrapper';
export * from './ChangePassword';
export * from './EditCustomerInformation';
export * from './CustomerInformationCard';
//# sourceMappingURL=index.d.ts.map

@@ -1,1 +0,1 @@

import{jsx as s}from"@dropins/tools/preact-jsx-runtime.js";import{classes as B}from"@dropins/tools/lib.js";import{a as C}from"../chunks/AddressFormWrapper.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/components.js";import"@dropins/tools/preact-hooks.js";import"@dropins/tools/event-bus.js";import"../chunks/removeCustomerAddress.js";import"@dropins/tools/fetch-graphql.js";import"@dropins/tools/i18n.js";import"@dropins/tools/preact.js";const O=({hideActionFormButtons:t,formName:o,slots:e,title:i,addressFormTitle:d,defaultSelectAddressId:m,showFormLoader:p,forwardFormRef:a,showSaveCheckBox:c,saveCheckBoxValue:f,selectShipping:n,selectBilling:l,selectable:u,className:r,withHeader:x,minifiedView:A,withActionsInMinifiedView:h,withActionsInFullSizeView:j,inputsDefaultValueSet:v,showShippingCheckBox:W,showBillingCheckBox:b,shippingCheckBoxValue:g,billingCheckBoxValue:k,onAddressData:q,routeAddressesPage:w,onSuccess:y,onError:z})=>s("div",{className:B(["account-addresses",r]),"data-testid":"addressesid",children:s(C,{hideActionFormButtons:t,formName:o,slots:e,title:i,addressFormTitle:d,defaultSelectAddressId:m,showFormLoader:p,onAddressData:q,forwardFormRef:a,selectShipping:n,selectBilling:l,showSaveCheckBox:c,saveCheckBoxValue:f,selectable:u,className:r,withHeader:x,minifiedView:A,withActionsInMinifiedView:h,withActionsInFullSizeView:j,inputsDefaultValueSet:v,billingCheckBoxValue:k,shippingCheckBoxValue:g,showBillingCheckBox:b,showShippingCheckBox:W,routeAddressesPage:w,onSuccess:y,onError:z})});export{O as Addresses,O as default};
import{jsx as s}from"@dropins/tools/preact-jsx-runtime.js";import{classes as B}from"@dropins/tools/lib.js";import{a as C}from"../chunks/CustomerInformationCard.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/components.js";import"@dropins/tools/preact-hooks.js";import"@dropins/tools/event-bus.js";import"../chunks/removeCustomerAddress.js";import"@dropins/tools/fetch-graphql.js";import"@dropins/tools/i18n.js";import"@dropins/tools/preact.js";const O=({hideActionFormButtons:t,formName:o,slots:e,title:i,addressFormTitle:d,defaultSelectAddressId:m,showFormLoader:p,forwardFormRef:a,showSaveCheckBox:c,saveCheckBoxValue:f,selectShipping:n,selectBilling:l,selectable:u,className:r,withHeader:x,minifiedView:A,withActionsInMinifiedView:h,withActionsInFullSizeView:j,inputsDefaultValueSet:v,showShippingCheckBox:W,showBillingCheckBox:b,shippingCheckBoxValue:g,billingCheckBoxValue:k,onAddressData:q,routeAddressesPage:w,onSuccess:y,onError:z})=>s("div",{className:B(["account-addresses",r]),"data-testid":"addressesid",children:s(C,{hideActionFormButtons:t,formName:o,slots:e,title:i,addressFormTitle:d,defaultSelectAddressId:m,showFormLoader:p,onAddressData:q,forwardFormRef:a,selectShipping:n,selectBilling:l,showSaveCheckBox:c,saveCheckBoxValue:f,selectable:u,className:r,withHeader:x,minifiedView:A,withActionsInMinifiedView:h,withActionsInFullSizeView:j,inputsDefaultValueSet:v,billingCheckBoxValue:k,shippingCheckBoxValue:g,showBillingCheckBox:b,showShippingCheckBox:W,routeAddressesPage:w,onSuccess:y,onError:z})});export{O as Addresses,O as default};

@@ -1,1 +0,1 @@

import{A as l,A as u}from"../chunks/AddressFormWrapper.js";import"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/lib.js";import"@dropins/tools/components.js";import"@dropins/tools/preact-hooks.js";import"../chunks/removeCustomerAddress.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/fetch-graphql.js";import"@dropins/tools/i18n.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/preact.js";export{l as AddressForm,u as default};
import{A as l,A as u}from"../chunks/CustomerInformationCard.js";import"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/lib.js";import"@dropins/tools/components.js";import"@dropins/tools/preact-hooks.js";import"../chunks/removeCustomerAddress.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/fetch-graphql.js";import"@dropins/tools/i18n.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/preact.js";export{l as AddressForm,u as default};
export * from './AddressForm';
export * from './Addresses';
export * from './OrdersList';
export * from './CustomerInformation';
//# sourceMappingURL=index.d.ts.map

@@ -1,1 +0,1 @@

import{jsx as s,jsxs as f,Fragment as C}from"@dropins/tools/preact-jsx-runtime.js";import{classes as N,Slot as H}from"@dropins/tools/lib.js";import{S as m,c as B,E as K,C as V}from"../chunks/AddressFormWrapper.js";import"@dropins/tools/preact-compat.js";import{Card as F,Icon as z,ContentGrid as q,Image as Y,Header as J,Picker as R,Pagination as W}from"@dropins/tools/components.js";import{useText as x}from"@dropins/tools/i18n.js";import{useState as O,useEffect as I,useMemo as j,useCallback as P}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/event-bus.js";import{g as G}from"../chunks/getOrderHistoryList.js";import"../chunks/removeCustomerAddress.js";import"@dropins/tools/fetch-graphql.js";import"@dropins/tools/preact.js";const E={size:"32",stroke:"2"},T=({minifiedView:c,orderNumber:r,orderToken:t,routeOrdersList:e,routeOrderDetails:n})=>{const i=c?"minifiedView":"fullSizeView",l=x({viewAllOrdersButton:`Account.${i}.OrdersList.viewAllOrdersButton`,ariaLabelLink:`Account.${i}.OrdersList.ariaLabelLink`});return e?s("a",{className:N(["account-orders-list-action",["account-orders-list-action--minifiedView",c]]),"data-testid":"ordersListActionButtonMinifiedView",href:e(),children:s(F,{"data-testid":"ordersListActionMinifiedView",variant:"secondary",children:f("div",{className:"account-orders-list-action__card-wrapper",children:[s("p",{children:l.viewAllOrdersButton}),s(z,{source:m,...E})]})})}):s("a",{"aria-label":`${l.ariaLabelLink} ${r??t}`,href:B(n)?n(r,t):"#",className:"account-orders-list-action","data-testid":"ordersListActionButton",children:s(z,{source:m,...E})})},U=()=>{const[c,r]=O(window.innerWidth<768);return I(()=>{const t=()=>{r(window.innerWidth<768)};return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[]),c},Q=({minifiedView:c,item:r,withThumbnails:t,children:e,slots:n,routeTracking:i,routeOrderProduct:l,...A})=>{var h,y,_,w,$,b;const L=c?"minifiedView":"fullSizeView",p=x({orderNumber:`Account.${L}.OrdersList.OrdersListCard.orderNumber`,itemsAmount:`Account.${L}.OrdersList.OrdersListCard.itemsAmount`,carrier:`Account.${L}.OrdersList.OrdersListCard.carrier`,deliveryDateText:`Account.${L}.OrdersList.OrdersListCard.orderDate`}),o=U(),u=B(l);return f(F,{variant:"secondary",...A,className:N(["account-orders-list-card",["account-orders-list-card--full",((h=r==null?void 0:r.items)==null?void 0:h.length)>6]]),children:[s("div",{className:"account-orders-list-card__content",children:n!=null&&n.OrdersListCard?s(H,{"data-testid":`ordersListCard${r.id}`,name:"OrdersListCard",slot:n==null?void 0:n.OrdersListCard,context:{orderHistoryListItem:r}}):f(C,{children:[s("div",{children:r==null?void 0:r.status}),f("p",{children:[p.deliveryDateText," ",r==null?void 0:r.orderDate]}),f("p",{children:[p.orderNumber," ",r.number]}),(y=r==null?void 0:r.shipments)==null?void 0:y.map(a=>{var g;return(g=a==null?void 0:a.tracking)==null?void 0:g.map(d=>f("p",{"data-testid":d.number,children:[s("span",{children:`${p.carrier} ${d.carrier.toLocaleUpperCase()} `}),s("a",{href:(i==null?void 0:i(d))??"",className:"account-orders-list-card__content--track_number",children:d.number})]},a.id))}),f("p",{children:["$",(_=r==null?void 0:r.total)==null?void 0:_.grandTotal.value]}),f("p",{"data-testid":"itemsAmount",children:[((w=r==null?void 0:r.items)==null?void 0:w.length)??0," ",p.itemsAmount]}),($=r==null?void 0:r.items)==null?void 0:$.map((a,g)=>{if(g>=0&&g<10)return f("p",{className:"account-orders-list-card__content--product-name",children:[f("span",{className:"account-orders-list-card__content--quantity",children:[(a==null?void 0:a.quantityOrdered)>1?a==null?void 0:a.quantityOrdered:null," "]}),a==null?void 0:a.productName.replaceAll("-"," ")]},`${g}_${a.id}`);if(g===11)return s("p",{children:"..."},"ellipsis")})]})}),t&&((b=r==null?void 0:r.items)!=null&&b.length)?s(q,{maxColumns:o?3:9,emptyGridContent:s(C,{}),className:N(["account-orders-list-card__images",["account-orders-list-card__images-3",o]]),"data-testid":"ordersListCardImages",children:r.items.map((a,g)=>{var v;const d=(v=a==null?void 0:a.product)==null?void 0:v.smallImage.url,D=a==null?void 0:a.productName;return u?s("a",{href:l==null?void 0:l(a),target:"_blank",rel:"noreferrer",children:s(Y,{src:d,width:65,height:65,alt:D})},a.id+g):s(Y,{src:d,width:65,height:65,alt:D},a.id+g)})}):null,s("div",{className:"account-orders-list-card__actions",children:e})]})},X=({ordersInMinifiedView:c,minifiedView:r,pageSize:t,selectedDate:e,selectedPage:n,handleSetFirstOrderDate:i})=>{const[l,A]=O([]),[L,p]=O({totalPages:1,currentPage:1,pageSize:1}),[o,u]=O(!1);return I(()=>{u(!0),G(r?c:t,e,n).then(h=>{!h||!h.items||(p(h.pageInfo),A(h.items),i==null||i(h.dateOfFirstOrder))}).finally(()=>{u(!1)})},[i,r,c,t,e,n]),{loading:o,orderHistoryListItems:l,pageInfo:L}},M=(c,r=1)=>{const t=new Date,e=new Date(t);switch(c){case"sixMonthsAgo":{e.setMonth(e.getMonth()-r);break}case"oneYearAgo":{e.setFullYear(e.getFullYear()-r);break}default:return""}return{from:e==null?void 0:e.toISOString().split("T")[0],to:`${t==null?void 0:t.toISOString().split("T")[0]} 23:59:59`}},Z=c=>{const r=[],t=new Date().getFullYear();for(let e=c;e<=t-1;e++)r.push({value:`{"from":"${e}-01-01","to":"${e+1}-01-01 23:59:59"}`,text:e.toString()});return r},rr=()=>{const c=x({pastSixMonths:"Account.fullSizeView.OrdersList.OrdersListSelectDate.pastSixMonths",currentYear:"Account.fullSizeView.OrdersList.OrdersListSelectDate.currentYear",viewAll:"Account.fullSizeView.OrdersList.OrdersListSelectDate.viewAll"}),[r,t]=O(),[e,n]=O(JSON.stringify(M("sixMonthsAgo",6))),[i,l]=O(1);I(()=>{window==null||window.scrollTo({top:100,behavior:"smooth"})},[i]);const A=j(()=>{const o=[{value:JSON.stringify(M("sixMonthsAgo",6)),text:c.pastSixMonths},{value:JSON.stringify(M("oneYearAgo",1)),text:c.currentYear},{value:"viewAll",text:c.viewAll}];if(r){const h=new Date(r).getFullYear();o==null||o.splice(2,0,...Z(h))}return o},[c,r]),L=P(o=>{t(o)},[]),p=P(o=>{const h=o.target.value;n(h),l(1)},[]);return{selectableDateList:A,selectedDate:e,selectedPage:i,handleSelectDate:p,setSelectedPage:l,handleSetFirstOrderDate:L}},tr=({className:c,withHeader:r=!0,minifiedView:t=!1,withThumbnails:e=!0,withFilter:n=!0,ordersInMinifiedView:i=1,pageSize:l=10,routeOrdersList:A,routeOrderDetails:L,routeTracking:p,routeOrderProduct:o,slots:u})=>{const y=x({containerTitle:`Account.${t?"minifiedView":"fullSizeView"}.OrdersList.containerTitle`}),{selectableDateList:_,selectedDate:w,handleSelectDate:$,selectedPage:b,setSelectedPage:a,handleSetFirstOrderDate:g}=rr(),{pageInfo:d,loading:D,orderHistoryListItems:v}=X({minifiedView:t,pageSize:l,ordersInMinifiedView:i,selectedDate:w,selectedPage:b,handleSetFirstOrderDate:g});return f("div",{children:[r?s(J,{"aria-label":y.containerTitle,role:"region",title:y.containerTitle,divider:!t,className:t?"account-orders-list-header":""}):null,f("div",{className:N(["account-orders-list",c]),children:[!t&&n?s("div",{className:"account-orders-list__date-select",children:s(R,{value:w,name:"orderDatePicker",options:_,handleSelect:$})}):null,D?s(C,{children:Array.from(Array(d==null?void 0:d.pageSize).keys()).map(S=>s(V,{testId:"orderSkeletonLoader",withCard:!1},S))}):s(C,{children:v.length?s(C,{children:v.map((S,k)=>s(Q,{routeTracking:p,routeOrderProduct:o,minifiedView:t,item:S,withThumbnails:e,slots:u,children:u!=null&&u.OrdersListAction?s(H,{"data-testid":`ordersListActionSlot_${k}`,name:"OrdersListAction",slot:u==null?void 0:u.OrdersListAction,context:{orderHistoryListItem:S}}):s(T,{minifiedView:t,orderNumber:S.number,orderToken:S.token,routeOrderDetails:L})},k))}):s(K,{isEmpty:!v.length,typeList:"orders",minifiedView:t})}),!t&&(d==null?void 0:d.totalPages)>1?s(W,{totalPages:d==null?void 0:d.totalPages,currentPage:b,onChange:a}):null,t?s(T,{minifiedView:t,routeOrdersList:A}):null]})]})},pr=({className:c,withHeader:r,minifiedView:t,withThumbnails:e,withFilter:n,ordersInMinifiedView:i,pageSize:l,routeOrdersList:A,routeOrderDetails:L,routeTracking:p,routeOrderProduct:o,slots:u})=>s("div",{className:N(["account-orders-list",c]),"data-testid":"ordersListId",children:s(tr,{className:c,withHeader:r,minifiedView:t,withThumbnails:e,withFilter:n,ordersInMinifiedView:i,pageSize:l,routeOrdersList:A,routeOrderDetails:L,routeTracking:p,routeOrderProduct:o,slots:u})});export{pr as OrdersList,pr as default};
import{jsx as s,jsxs as f,Fragment as C}from"@dropins/tools/preact-jsx-runtime.js";import{classes as N,Slot as H}from"@dropins/tools/lib.js";import{S as m,c as B,E as K,C as V}from"../chunks/CustomerInformationCard.js";import"@dropins/tools/preact-compat.js";import{Card as F,Icon as z,ContentGrid as q,Image as Y,Header as J,Picker as R,Pagination as W}from"@dropins/tools/components.js";import{useText as x}from"@dropins/tools/i18n.js";import{useState as O,useEffect as I,useMemo as j,useCallback as P}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/event-bus.js";import{g as G}from"../chunks/getOrderHistoryList.js";import"../chunks/removeCustomerAddress.js";import"@dropins/tools/fetch-graphql.js";import"@dropins/tools/preact.js";const E={size:"32",stroke:"2"},T=({minifiedView:c,orderNumber:r,orderToken:t,routeOrdersList:e,routeOrderDetails:n})=>{const i=c?"minifiedView":"fullSizeView",l=x({viewAllOrdersButton:`Account.${i}.OrdersList.viewAllOrdersButton`,ariaLabelLink:`Account.${i}.OrdersList.ariaLabelLink`});return e?s("a",{className:N(["account-orders-list-action",["account-orders-list-action--minifiedView",c]]),"data-testid":"ordersListActionButtonMinifiedView",href:e(),children:s(F,{"data-testid":"ordersListActionMinifiedView",variant:"secondary",children:f("div",{className:"account-orders-list-action__card-wrapper",children:[s("p",{children:l.viewAllOrdersButton}),s(z,{source:m,...E})]})})}):s("a",{"aria-label":`${l.ariaLabelLink} ${r??t}`,href:B(n)?n(r,t):"#",className:"account-orders-list-action","data-testid":"ordersListActionButton",children:s(z,{source:m,...E})})},U=()=>{const[c,r]=O(window.innerWidth<768);return I(()=>{const t=()=>{r(window.innerWidth<768)};return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[]),c},Q=({minifiedView:c,item:r,withThumbnails:t,children:e,slots:n,routeTracking:i,routeOrderProduct:l,...A})=>{var h,y,_,w,$,b;const L=c?"minifiedView":"fullSizeView",p=x({orderNumber:`Account.${L}.OrdersList.OrdersListCard.orderNumber`,itemsAmount:`Account.${L}.OrdersList.OrdersListCard.itemsAmount`,carrier:`Account.${L}.OrdersList.OrdersListCard.carrier`,deliveryDateText:`Account.${L}.OrdersList.OrdersListCard.orderDate`}),o=U(),u=B(l);return f(F,{variant:"secondary",...A,className:N(["account-orders-list-card",["account-orders-list-card--full",((h=r==null?void 0:r.items)==null?void 0:h.length)>6]]),children:[s("div",{className:"account-orders-list-card__content",children:n!=null&&n.OrdersListCard?s(H,{"data-testid":`ordersListCard${r.id}`,name:"OrdersListCard",slot:n==null?void 0:n.OrdersListCard,context:{orderHistoryListItem:r}}):f(C,{children:[s("div",{children:r==null?void 0:r.status}),f("p",{children:[p.deliveryDateText," ",r==null?void 0:r.orderDate]}),f("p",{children:[p.orderNumber," ",r.number]}),(y=r==null?void 0:r.shipments)==null?void 0:y.map(a=>{var g;return(g=a==null?void 0:a.tracking)==null?void 0:g.map(d=>f("p",{"data-testid":d.number,children:[s("span",{children:`${p.carrier} ${d.carrier.toLocaleUpperCase()} `}),s("a",{href:(i==null?void 0:i(d))??"",className:"account-orders-list-card__content--track_number",children:d.number})]},a.id))}),f("p",{children:["$",(_=r==null?void 0:r.total)==null?void 0:_.grandTotal.value]}),f("p",{"data-testid":"itemsAmount",children:[((w=r==null?void 0:r.items)==null?void 0:w.length)??0," ",p.itemsAmount]}),($=r==null?void 0:r.items)==null?void 0:$.map((a,g)=>{if(g>=0&&g<10)return f("p",{className:"account-orders-list-card__content--product-name",children:[f("span",{className:"account-orders-list-card__content--quantity",children:[(a==null?void 0:a.quantityOrdered)>1?a==null?void 0:a.quantityOrdered:null," "]}),a==null?void 0:a.productName.replaceAll("-"," ")]},`${g}_${a.id}`);if(g===11)return s("p",{children:"..."},"ellipsis")})]})}),t&&((b=r==null?void 0:r.items)!=null&&b.length)?s(q,{maxColumns:o?3:9,emptyGridContent:s(C,{}),className:N(["account-orders-list-card__images",["account-orders-list-card__images-3",o]]),"data-testid":"ordersListCardImages",children:r.items.map((a,g)=>{var v;const d=(v=a==null?void 0:a.product)==null?void 0:v.smallImage.url,D=a==null?void 0:a.productName;return u?s("a",{href:l==null?void 0:l(a),target:"_blank",rel:"noreferrer",children:s(Y,{src:d,width:65,height:65,alt:D})},a.id+g):s(Y,{src:d,width:65,height:65,alt:D},a.id+g)})}):null,s("div",{className:"account-orders-list-card__actions",children:e})]})},X=({ordersInMinifiedView:c,minifiedView:r,pageSize:t,selectedDate:e,selectedPage:n,handleSetFirstOrderDate:i})=>{const[l,A]=O([]),[L,p]=O({totalPages:1,currentPage:1,pageSize:1}),[o,u]=O(!1);return I(()=>{u(!0),G(r?c:t,e,n).then(h=>{!h||!h.items||(p(h.pageInfo),A(h.items),i==null||i(h.dateOfFirstOrder))}).finally(()=>{u(!1)})},[i,r,c,t,e,n]),{loading:o,orderHistoryListItems:l,pageInfo:L}},M=(c,r=1)=>{const t=new Date,e=new Date(t);switch(c){case"sixMonthsAgo":{e.setMonth(e.getMonth()-r);break}case"oneYearAgo":{e.setFullYear(e.getFullYear()-r);break}default:return""}return{from:e==null?void 0:e.toISOString().split("T")[0],to:`${t==null?void 0:t.toISOString().split("T")[0]} 23:59:59`}},Z=c=>{const r=[],t=new Date().getFullYear();for(let e=c;e<=t-1;e++)r.push({value:`{"from":"${e}-01-01","to":"${e+1}-01-01 23:59:59"}`,text:e.toString()});return r},rr=()=>{const c=x({pastSixMonths:"Account.fullSizeView.OrdersList.OrdersListSelectDate.pastSixMonths",currentYear:"Account.fullSizeView.OrdersList.OrdersListSelectDate.currentYear",viewAll:"Account.fullSizeView.OrdersList.OrdersListSelectDate.viewAll"}),[r,t]=O(),[e,n]=O(JSON.stringify(M("sixMonthsAgo",6))),[i,l]=O(1);I(()=>{window==null||window.scrollTo({top:100,behavior:"smooth"})},[i]);const A=j(()=>{const o=[{value:JSON.stringify(M("sixMonthsAgo",6)),text:c.pastSixMonths},{value:JSON.stringify(M("oneYearAgo",1)),text:c.currentYear},{value:"viewAll",text:c.viewAll}];if(r){const h=new Date(r).getFullYear();o==null||o.splice(2,0,...Z(h))}return o},[c,r]),L=P(o=>{t(o)},[]),p=P(o=>{const h=o.target.value;n(h),l(1)},[]);return{selectableDateList:A,selectedDate:e,selectedPage:i,handleSelectDate:p,setSelectedPage:l,handleSetFirstOrderDate:L}},tr=({className:c,withHeader:r=!0,minifiedView:t=!1,withThumbnails:e=!0,withFilter:n=!0,ordersInMinifiedView:i=1,pageSize:l=10,routeOrdersList:A,routeOrderDetails:L,routeTracking:p,routeOrderProduct:o,slots:u})=>{const y=x({containerTitle:`Account.${t?"minifiedView":"fullSizeView"}.OrdersList.containerTitle`}),{selectableDateList:_,selectedDate:w,handleSelectDate:$,selectedPage:b,setSelectedPage:a,handleSetFirstOrderDate:g}=rr(),{pageInfo:d,loading:D,orderHistoryListItems:v}=X({minifiedView:t,pageSize:l,ordersInMinifiedView:i,selectedDate:w,selectedPage:b,handleSetFirstOrderDate:g});return f("div",{children:[r?s(J,{"aria-label":y.containerTitle,role:"region",title:y.containerTitle,divider:!t,className:t?"account-orders-list-header":""}):null,f("div",{className:N(["account-orders-list",c]),children:[!t&&n?s("div",{className:"account-orders-list__date-select",children:s(R,{value:w,name:"orderDatePicker",options:_,handleSelect:$})}):null,D?s(C,{children:Array.from(Array(d==null?void 0:d.pageSize).keys()).map(S=>s(V,{testId:"orderSkeletonLoader",withCard:!1},S))}):s(C,{children:v.length?s(C,{children:v.map((S,k)=>s(Q,{routeTracking:p,routeOrderProduct:o,minifiedView:t,item:S,withThumbnails:e,slots:u,children:u!=null&&u.OrdersListAction?s(H,{"data-testid":`ordersListActionSlot_${k}`,name:"OrdersListAction",slot:u==null?void 0:u.OrdersListAction,context:{orderHistoryListItem:S}}):s(T,{minifiedView:t,orderNumber:S.number,orderToken:S.token,routeOrderDetails:L})},k))}):s(K,{isEmpty:!v.length,typeList:"orders",minifiedView:t})}),!t&&(d==null?void 0:d.totalPages)>1?s(W,{totalPages:d==null?void 0:d.totalPages,currentPage:b,onChange:a}):null,t?s(T,{minifiedView:t,routeOrdersList:A}):null]})]})},pr=({className:c,withHeader:r,minifiedView:t,withThumbnails:e,withFilter:n,ordersInMinifiedView:i,pageSize:l,routeOrdersList:A,routeOrderDetails:L,routeTracking:p,routeOrderProduct:o,slots:u})=>s("div",{className:N(["account-orders-list",c]),"data-testid":"ordersListId",children:s(tr,{className:c,withHeader:r,minifiedView:t,withThumbnails:e,withFilter:n,ordersInMinifiedView:i,pageSize:l,routeOrdersList:A,routeOrderDetails:L,routeTracking:p,routeOrderProduct:o,slots:u})});export{pr as OrdersList,pr as default};
export interface CustomerDataModelShort {
firstname: string;
lastname: string;
firstName: string;
lastName: string;
middleName: string;
dateOfBirth: string;
dob: string;
prefix: string;
gender: 1 | 2 | string;
suffix: string;
email: string;
createdAt: string;
[key: string]: string | boolean | number;
}
//# sourceMappingURL=customer.d.ts.map

@@ -6,2 +6,3 @@ export * from './customer-address';

export * from './order-history-list';
export * from './store-config';
//# sourceMappingURL=index.d.ts.map

@@ -7,2 +7,3 @@ export * from './transform-attributes-form';

export * from './transform-order-history-list';
export * from './transform-store-config';
//# sourceMappingURL=index.d.ts.map
declare const _default: {
"Account": {
"minifiedView": {
"CustomerInformation": {
"containerTitle": "Account settings",
"genderMale":"Male",
"genderFemale":"Female",
"changePassword": {
"passwordValidationMessage": {
"chartTwoSymbols": "Use characters and numbers or symbols",
"chartThreeSymbols": "Use characters, numbers and symbols",
"chartFourSymbols": "Use uppercase characters, lowercase characters, numbers and symbols",
"messageLengthPassword": "At least {minLength} characters long",
"passwordMismatch": "Passwords do not match. Please make sure both password fields are identical",
"incorrectCurrentPassword": "The current password you entered is incorrect. Please check and try again.",
"passwordUpdateMessage": "Your password has been updated"
},
"containerTitle": "Change password",
"currentPassword": {
"placeholder": "Password",
"floatingLabel": "Password"
},
"newPassword": {
"placeholder": "New Password",
"floatingLabel": "New Password"
},
"confirmPassword": {
"placeholder": "Confirm new password",
"floatingLabel": "Confirm new password"
},
"buttonSecondary": "Cancel",
"buttonPrimary": "Save"
},
"customerInformationCard": {
"buttonSecondary": "Change password",
"buttonPrimary": "Edit",
"accountCreation": "Account creation date"
},
"editCustomerInformation": {
"containerTitle": "Edit details",
"buttonSecondary": "Cancel",
"buttonPrimary": "Save",
"accountSuccess": "Your account information has been updated.",
"accountError": "Your account information has not been updated.",
"passwordField": {
"placeholder": "Password",
"floatingLabel": "Password"
}
}
},
"Addresses": {

@@ -5,0 +52,0 @@ "containerTitle": "Addresses",

@@ -1,1 +0,1 @@

{"name": "@dropins/storefront-account", "version": "0.1.0-alpha15", "@dropins/elsie": "0.32.0"}
{"name": "@dropins/storefront-account", "version": "0.1.0-alpha16", "@dropins/elsie": "0.34.0"}

@@ -1,3 +0,3 @@

(function(c,t){try{if(typeof document<"u"){const a=document.createElement("style"),d=t.styleId;for(const r in t.attributes)a.setAttribute(r,t.attributes[r]);a.setAttribute("data-dropin",d),a.appendChild(document.createTextNode(c));const e=document.querySelector('style[data-dropin="sdk"]');if(e)e.after(a);else{const r=document.querySelector('link[rel="stylesheet"], style');r?r.before(a):document.head.append(a)}}}catch(a){console.error("dropin-styles (injectCodeFunction)",a)}})(`.account-orders-list-header{margin-bottom:var(--spacing-medium)}.account-orders-list ul{list-style:none;margin:0;padding:0}.account-orders-list__date-select{margin-bottom:var(--spacing-xbig)}.account-orders-list__date-select span{display:inline-block;font:var(--type-details-caption-1-font);letter-spacing:var(--type-details-caption-1-letter-spacing);margin-bottom:var(--spacing-xsmall)}.account-orders-list__date-select .dropin-picker{max-width:224px}
.account-form{display:grid;flex-direction:column;gap:var(--spacing-medium)}@media (min-width: 768px){.account-form{display:grid;grid-template-columns:repeat(2,1fr)}.account-form>.dropin-field:nth-child(1),.account-form>.dropin-field:nth-child(2){grid-column:span 1}.account-form>.dropin-field:nth-child(3),.account-form>.dropin-field:nth-child(4),.account-form>.dropin-field:nth-child(5){grid-column:span 2}.account-form>.dropin-field:nth-child(6),.account-form>.dropin-field:nth-child(7){grid-column:span 1}.account-form>.dropin-field:nth-child(8),.account-form>.dropin-field:nth-child(9){grid-column:span 1}.account-form>.dropin-field:nth-child(n+10){grid-column:span 2}}.account-form [class$=-hidden]{position:absolute;opacity:0;height:0;width:0;overflow:hidden;clip:rect(0,0,0,0)}.account-account-loaders--card-loader{margin-bottom:var(--spacing-small);border:var(--shape-border-width-1) solid var(--color-neutral-400);border-radius:var(--shape-border-radius-1)}.account-account-loaders--picker-loader div:first-child{max-width:200px}.account-account-loaders--picker-loader div:nth-child(3){max-width:400px}.account-address-card{border-radius:var(--shape-border-radius-1);margin-bottom:var(--spacing-small);border-width:var(--shape-border-width-1)}.account-address-card .dropin-card__content{display:grid;grid-template-columns:1fr auto;gap:var(--spacing-small) 0px;grid-template-areas:"description action" "labels action"}.account-address-card .account-address-card__action{display:flex;justify-content:flex-end;align-items:baseline;cursor:pointer;grid-area:action}.account-address-card .account-address-card__action--editbutton{margin-left:var(--spacing-small)}.account-address-card .account-address-card__action button{padding:0}.account-address-card .account-address-card__action button:hover{text-decoration:underline}.account-address-card .account-address-card__description{grid-area:description;margin:0;padding:0}.account-address-card .account-address-card__description p{font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing);color:var(--color-neutral-800);margin:0;padding:0;display:inline;overflow:hidden}.account-address-card .account-address-card__description p:nth-child(1),.account-address-card .account-address-card__description p:nth-child(2){margin:0 0 var(--spacing-small) 0;color:var(--color-neutral-800);font:var(--type-button-2-font);text-align:left;font-weight:500;cursor:default}.account-address-card__description p{margin-bottom:var(--spacing-small)}.account-address-card .account-address-card__description p:nth-child(1),.account-address-card .account-address-card__description p:nth-child(5),.account-address-card .account-address-card__description p:nth-child(7){float:left;width:auto;margin-right:var(--spacing-xsmall)}.account-address-card .account-address-card__description p:nth-child(2),.account-address-card .account-address-card__description p:nth-child(6),.account-address-card .account-address-card__description p:nth-child(8){display:inline;width:50%}.account-address-card .account-address-card__description p:nth-child(2):after,.account-address-card .account-address-card__description p:nth-child(6):after,.account-address-card .account-address-card__description p:nth-child(8):after{content:"\\a";white-space:pre;display:block;height:var(--spacing-small)}.account-address-card .account-address-card__description p:nth-child(3),.account-address-card .account-address-card__description p:nth-child(4),.account-address-card .account-address-card__description p:nth-child(n+9){display:block;width:100%;margin-bottom:var(--spacing-small)}.account-address-card .account-address-card__labels{display:flex;gap:0 var(--spacing-xsmall);grid-area:labels}.account-actions-address{cursor:pointer;padding:var(--spacing-xsmall) var(--spacing-medium);border-radius:var(--shape-border-radius-1);border:var(--shape-border-width-1) solid var(--color-neutral-400);background-color:var(--color-neutral-50);width:100%;height:88px;display:flex;align-items:center;justify-content:space-between}.account-actions-address--selectable{max-width:100%;width:auto}.account-actions-address__title{font:var(--type-button-2-font);letter-spacing:var(--type-button-2-letter-spacing)}.account-actions-address svg{stroke:var(--shape-icon-stroke-4);color:var(--color-neutral-800)}.account-address-modal{position:relative;padding:var(--spacing-xbig) var(--spacing-xxbig) var(--spacing-xxbig) var(--spacing-xxbig);width:100%;margin:auto;max-width:721px}.dropin-modal__body--medium>.dropin-modal__header-title,.dropin-modal__body--full>.dropin-modal__header-title,.account-address-modal .dropin-modal__content{margin:0;align-items:center}.account-address-modal .dropin-modal__header-title-content h3{font:var(--type-headline-1-font);letter-spacing:var(--type-headline-1-letter-spacing);margin:0;padding:0}.account-address-modal .account-address-modal__spinner{position:absolute;top:0;left:0;background-color:var(--color-neutral-200);opacity:.8;width:100%;height:100%;display:flex;justify-content:center;align-items:center;z-index:1}.account-address-modal p{color:var(--color-neutral-800);font:var(--type-body-2-strong-font);letter-spacing:var(--type-body-2-strong-letter-spacing);margin-bottom:var(--spacing-medium)}.account-address-modal .account-address-modal__buttons{display:flex;align-items:center;justify-content:right;gap:0 var(--spacing-small)}.account-empty-list{margin-bottom:var(--spacing-small);border:var(--shape-border-width-1) solid var(--color-neutral-400);border-radius:var(--shape-border-radius-1)}.account-empty-list.account-empty-list--minified,.account-empty-list .dropin-card{border:none}.account-empty-list .dropin-card__content{gap:0;padding:var(--spacing-xxbig)}.account-empty-list.account-empty-list--minified .dropin-card__content{flex-direction:row;align-items:center;padding:var(--spacing-big) var(--spacing-small)}.account-empty-list .dropin-card__content svg{width:64px;height:64px;margin-bottom:var(--spacing-medium)}.account-empty-list.account-empty-list--minified .dropin-card__content svg{margin:0 var(--spacing-small) 0 0;width:32px;height:32px}.account-empty-list .dropin-card__content svg path{fill:var(--color-neutral-800)}.account-empty-list.account-empty-list--minified .dropin-card__content svg path{fill:var(--color-neutral-500)}.account-empty-list .dropin-card__content p{font:var(--type-headline-1-font);letter-spacing:var(--type-headline-1-letter-spacing);color:var(--color-neutral-800)}.account-empty-list.account-empty-list--minified .dropin-card__content p{font:var(--type-body-1-strong-font);color:var(--color-neutral-800)}.account-orders-list-action{margin:0;padding:0;border:none;background-color:transparent;cursor:pointer;text-decoration:none}.account-orders-list-action--minifiedView{width:100%;text-align:left;font:var(--type-body-1-default-font)}.account-orders-list-action.account-orders-list-action--minifiedView:hover{text-decoration:none}.account-orders-list-action--minifiedView .account-orders-list-action__card-wrapper{display:flex;justify-content:space-between;align-items:center;color:var(--color-neutral-800);height:calc(88px - var(--spacing-small) * 2)}.account-orders-list-action__card-wrapper>p{font:var(--type-button-2-font);letter-spacing:var(--type-button-2-letter-spacing)}.account-orders-list-action__card-wrapper svg,.account-orders-list-action svg{color:var(--color-neutral-800)}.account-orders-list-action--minifiedView .dropin-card--secondary{border-width:var(--shape-border-width-1);border-radius:var(--shape-border-radius-1)}.account-orders-list-action--minifiedView .dropin-card__content{padding:var(--spacing-small) var(--spacing-medium)}.account-orders-list-action--minifiedView p{font:var(--type-body-1-strong-font)}.account-orders-list-card{height:100%;margin-bottom:var(--spacing-small);border-width:var(--shape-border-width-1);border-radius:var(--shape-border-radius-1)}.account-orders-list-card .dropin-card__content{padding:var(--spacing-medium);display:grid;grid-template-areas:"content actions" "imageList actions";gap:0;max-height:100%}.account-orders-list-card .account-orders-list-card__content{grid-area:content;margin-bottom:var(--spacing-small)}.account-orders-list-card__content--quantity{font-weight:500;color:var(--color-neutral-800)}.account-orders-list-card__content--track_number{font:var(--type-body-1-strong-font);letter-spacing:var(--type-body-1-strong-letter-spacing);cursor:pointer}.account-orders-list-card .account-orders-list-card__content>div:first-child{font-weight:500}.account-orders-list-card .account-orders-list-card__content p,.account-orders-list-card .account-orders-list-card__content div{padding:0;text-align:left;font:var(--type-body-1-default-font);margin-bottom:var(--spacing-small);color:var(--color-neutral-800)}.account-orders-list-card p.account-orders-list-card__content--product-name{margin:0}.account-orders-list-card .account-orders-list-card__content p:last-child{margin:0}.account-orders-list-card .account-orders-list-card__content div{font:var(--type-button-2-font);margin-bottom:var(--spacing-small)}.account-orders-list-card .account-orders-list-card__actions{grid-area:actions}.account-orders-list-card .account-orders-list-card__images{overflow:auto}.account-orders-list-card .account-orders-list-card__images .dropin-content-grid__content{grid-template-columns:repeat(6,max-content)!important}.account-orders-list-card .account-orders-list-card__images-3 .dropin-content-grid__content{grid-template-columns:repeat(3,max-content)!important}.account-orders-list-card .account-orders-list-card__images img{object-fit:contain;width:65px;height:65px}.account-orders-list-card .account-orders-list-card__actions{position:relative;align-self:center;margin-left:auto}@media (min-width: 768px){.account-orders-list-card.account-orders-list-card--full .dropin-card__content{max-height:100%}}.account-addresses-header{margin-bottom:var(--spacing-medium)}.account-addresses-wrapper{box-sizing:border-box;position:relative}.account-addresses-wrapper .account-addresses__footer .dropin-card--secondary{border:var(--shape-border-width-1) solid var(--color-neutral-400);border-radius:var(--shape-border-radius-1)}.account-addresses-wrapper--select-view{position:relative;margin:0;padding:0;border:none}.account-addresses-wrapper--select-view input[type=radio]{position:absolute;clip:rect(0,0,0,0);width:1px;height:1px;padding:0;margin:-1px;border:0;overflow:hidden}.account-addresses-wrapper--select-view .account-addresses-wrapper__label{cursor:pointer;display:block;border-radius:0}.account-addresses-wrapper--select-view .account-addresses-wrapper__label .account-address-card{border-radius:0}.account-addresses-wrapper--select-view .account-addresses-wrapper__label:nth-child(2){border-radius:var(--shape-border-radius-1) var(--shape-border-radius-1) 0 0}.account-addresses-wrapper--select-view>.account-addresses-wrapper__label:nth-child(2)>.account-address-card{border-radius:var(--shape-border-radius-1) var(--shape-border-radius-1) 0 0}.account-addresses-wrapper--select-view>.account-addresses-wrapper__label:last-child,.account-addresses-wrapper--select-view>.account-addresses-wrapper__label:last-child>.account-actions-address.account-actions-address--address{border-radius:0 0 var(--shape-border-radius-1) var(--shape-border-radius-1)}.account-addresses-wrapper--select-view .account-addresses-wrapper__label .account-address-card,.account-addresses-wrapper--select-view .account-addresses-wrapper__label .account-actions-address.account-actions-address--address{background-color:var(--color-neutral-200)}.account-addresses-wrapper--select-view input[type=radio]:checked+.account-addresses-wrapper__label>.account-address-card{border:var(--shape-border-width-1) solid var(--color-neutral-900);position:relative}.account-addresses-wrapper--select-view input[type=radio]:checked+.account-addresses-wrapper__label>.account-addresses-form__footer__wrapper{border:var(--shape-border-width-1) solid var(--color-neutral-900);position:relative}.account-addresses-wrapper--select-view input[type=radio]:checked+.account-addresses-wrapper__label .account-address-card,.account-addresses-wrapper--select-view input[type=radio]:checked+.account-addresses-wrapper__label .account-actions-address.account-actions-address--address{background-color:var(--color-neutral-50)}.account-addresses-wrapper--select-view .account-address-card{margin:0}.account-addresses-wrapper--select-view .account-addresses-form__footer__wrapper{padding:var(--spacing-medium)}.account-address-form-wrapper{box-sizing:border-box;background-color:var(--color-neutral-50)}.account-address-form-wrapper__notification{margin-bottom:var(--spacing-medium)}.account-address-form-wrapper__title{color:var(--color-neutral-800);font:var(--type-headline-2-strong-font);letter-spacing:var(--type-headline-2-strong-letter-spacing);margin-bottom:var(--spacing-medium)}.account-address-form-wrapper__buttons{display:flex;align-items:center;justify-content:end;gap:0 var(--spacing-medium);margin-top:var(--spacing-medium)}.account-address-form-wrapper__buttons--empty{gap:0;margin:0;padding:0;display:inline-block}.account-address-form-wrapper__buttons button{min-width:142px}`,{styleId:"account"});
import{jsx as r}from"@dropins/tools/preact-jsx-runtime.js";import{Render as i}from"@dropins/tools/lib.js";import{useState as o,useEffect as n}from"@dropins/tools/preact-hooks.js";import{UIProvider as l}from"@dropins/tools/components.js";import{events as m}from"@dropins/tools/event-bus.js";const c={minifiedView:{Addresses:{containerTitle:"Addresses",editAddressFormTitle:"Edit address",differentAddressFormTitle:"Deliver to new address",viewAllAddressesButton:"View address list",differentAddressButton:"Use a different address",addressCard:{actionRemove:"Remove",actionEdit:"Edit",cardLabelShipping:"Shipping",cardLabelBilling:"Billing",defaultLabelText:"DEFAULT"},removeAddressModal:{title:"Remove address",description:"Are you sure you would like to remove this address?",actionCancel:"Cancel",actionConfirm:"Remove"}},OrdersList:{containerTitle:"Recent orders",viewAllOrdersButton:"View all orders",ariaLabelLink:"Redirect to full order information",OrdersListCard:{orderNumber:"Order number:",itemsAmount:"items",carrier:"Carrier:",orderDate:"Placed on"},OrdersListSelectDate:{pastSixMonths:"Past 6 months",currentYear:"Current year",viewAll:"View all"}},EmptyList:{Addresses:{message:"No saved addresses"},OrdersList:{message:"No orders"}}},fullSizeView:{Addresses:{containerTitle:"Addresses",editAddressFormTitle:"Edit address",differentAddressFormTitle:"Deliver to new address",newAddressFormTitle:"Add address",addNewAddressButton:"Create new",differentAddressButton:"Use a different address",addressCard:{actionRemove:"Remove",actionEdit:"Edit",cardLabelShipping:"Shipping",cardLabelBilling:"Billing",defaultLabelText:"DEFAULT"},removeAddressModal:{title:"Remove address",description:"Are you sure you would like to remove this address?",actionCancel:"Cancel",actionConfirm:"Remove"}},OrdersList:{containerTitle:"Your orders",ariaLabelLink:"Redirect to full order information",OrdersListCard:{orderNumber:"Order number:",itemsAmount:"items",carrier:"Carrier:",orderDate:"Placed on"},OrdersListSelectDate:{pastSixMonths:"Past 6 months",currentYear:"Current year",viewAll:"View all"}},EmptyList:{Addresses:{message:"No saved addresses"},OrdersList:{message:"No orders"}}},AddressForm:{formText:{secondaryButton:"Cancel",primaryButton:"Save",defaultShippingLabel:"Set as default shipping address",defaultBillingLabel:"Set as default billing address",saveAddressBook:"Save in address book"}},FormText:{requiredFieldError:"This is a required field.",numericError:"Only numeric values are allowed.",alphaNumWithSpacesError:"Only alphanumeric characters and spaces are allowed.",alphaNumericError:"Only alphanumeric characters are allowed.",alphaError:"Only alphabetic characters are allowed.",emailError:"Please enter a valid email address.",dateError:"Please enter a valid date.",dateLengthError:"Date must be between {min} and {max}.",urlError:"Please enter a valid URL, e.g., http://www.adobe.com.",lengthTextError:"Text length must be between {min} and {max} characters."}},u={Account:c},f={default:u},p=({children:s})=>{const[d,a]=o("en_US");return n(()=>{const e=m.on("locale",t=>{a(t)},{eager:!0});return()=>{e==null||e.off()}},[]),r(l,{lang:d,langDefinitions:f,children:s})},g=new i(r(p,{}));export{g as render};
(function(e,t){try{if(typeof document<"u"){const a=document.createElement("style"),o=t.styleId;for(const r in t.attributes)a.setAttribute(r,t.attributes[r]);a.setAttribute("data-dropin",o),a.appendChild(document.createTextNode(e));const c=document.querySelector('style[data-dropin="sdk"]');if(c)c.after(a);else{const r=document.querySelector('link[rel="stylesheet"], style');r?r.before(a):document.head.append(a)}}}catch(a){console.error("dropin-styles (injectCodeFunction)",a)}})(`.account-orders-list-header{margin-bottom:var(--spacing-medium)}.account-orders-list ul{list-style:none;margin:0;padding:0}.account-orders-list__date-select{margin-bottom:var(--spacing-xbig)}.account-orders-list__date-select span{display:inline-block;font:var(--type-details-caption-1-font);letter-spacing:var(--type-details-caption-1-letter-spacing);margin-bottom:var(--spacing-xsmall)}.account-orders-list__date-select .dropin-picker{max-width:224px}
.account-form{display:grid;flex-direction:column;gap:var(--spacing-medium)}@media (min-width: 768px){.account-form{display:grid;grid-template-columns:repeat(2,1fr)}.account-form>.dropin-field:nth-child(1),.account-form>.dropin-field:nth-child(2){grid-column:span 1}.account-form>.dropin-field:nth-child(3),.account-form>.dropin-field:nth-child(4),.account-form>.dropin-field:nth-child(5){grid-column:span 2}.account-form>.dropin-field:nth-child(6),.account-form>.dropin-field:nth-child(7){grid-column:span 1}.account-form>.dropin-field:nth-child(8),.account-form>.dropin-field:nth-child(9){grid-column:span 1}.account-form>.dropin-field:nth-child(n+10){grid-column:span 2}}.account-form [class$=-hidden]{position:absolute;opacity:0;height:0;width:0;overflow:hidden;clip:rect(0,0,0,0)}.account-account-loaders--card-loader{margin-bottom:var(--spacing-small);border:var(--shape-border-width-1) solid var(--color-neutral-400);border-radius:var(--shape-border-radius-1)}.account-account-loaders--picker-loader div:first-child{max-width:200px}.account-account-loaders--picker-loader div:nth-child(3){max-width:400px}.account-address-card{border-radius:var(--shape-border-radius-1);margin-bottom:var(--spacing-small);border-width:var(--shape-border-width-1)}.account-address-card .dropin-card__content{display:grid;grid-template-columns:1fr auto;gap:var(--spacing-small) 0px;grid-template-areas:"description action" "labels action"}.account-address-card .account-address-card__action{display:flex;justify-content:flex-end;align-items:baseline;cursor:pointer;grid-area:action}.account-address-card .account-address-card__action--editbutton{margin-left:var(--spacing-small)}.account-address-card .account-address-card__action button{padding:0}.account-address-card .account-address-card__action button:hover{text-decoration:underline}.account-address-card .account-address-card__description{grid-area:description;margin:0;padding:0}.account-address-card .account-address-card__description p{font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing);color:var(--color-neutral-800);margin:0;padding:0;display:inline;overflow:hidden}.account-address-card .account-address-card__description p:nth-child(1),.account-address-card .account-address-card__description p:nth-child(2){margin:0 0 var(--spacing-small) 0;color:var(--color-neutral-800);font:var(--type-button-2-font);text-align:left;font-weight:500;cursor:default}.account-address-card__description p{margin-bottom:var(--spacing-small)}.account-address-card .account-address-card__description p:nth-child(1),.account-address-card .account-address-card__description p:nth-child(5),.account-address-card .account-address-card__description p:nth-child(7){float:left;width:auto;margin-right:var(--spacing-xsmall)}.account-address-card .account-address-card__description p:nth-child(2),.account-address-card .account-address-card__description p:nth-child(6),.account-address-card .account-address-card__description p:nth-child(8){display:inline;width:50%}.account-address-card .account-address-card__description p:nth-child(2):after,.account-address-card .account-address-card__description p:nth-child(6):after,.account-address-card .account-address-card__description p:nth-child(8):after{content:"\\a";white-space:pre;display:block;height:var(--spacing-small)}.account-address-card .account-address-card__description p:nth-child(3),.account-address-card .account-address-card__description p:nth-child(4),.account-address-card .account-address-card__description p:nth-child(n+9){display:block;width:100%;margin-bottom:var(--spacing-small)}.account-address-card .account-address-card__labels{display:flex;gap:0 var(--spacing-xsmall);grid-area:labels}.account-actions-address{cursor:pointer;padding:var(--spacing-xsmall) var(--spacing-medium);border-radius:var(--shape-border-radius-1);border:var(--shape-border-width-1) solid var(--color-neutral-400);background-color:var(--color-neutral-50);width:100%;height:88px;display:flex;align-items:center;justify-content:space-between}.account-actions-address--selectable{max-width:100%;width:auto}.account-actions-address__title{font:var(--type-button-2-font);letter-spacing:var(--type-button-2-letter-spacing)}.account-actions-address svg{stroke:var(--shape-icon-stroke-4);color:var(--color-neutral-800)}.account-address-modal{position:relative;padding:var(--spacing-xbig) var(--spacing-xxbig) var(--spacing-xxbig) var(--spacing-xxbig);width:100%;margin:auto;max-width:721px}.dropin-modal__body--medium>.dropin-modal__header-title,.dropin-modal__body--full>.dropin-modal__header-title,.account-address-modal .dropin-modal__content{margin:0;align-items:center}.account-address-modal .dropin-modal__header-title-content h3{font:var(--type-headline-1-font);letter-spacing:var(--type-headline-1-letter-spacing);margin:0;padding:0}.account-address-modal .account-address-modal__spinner{position:absolute;top:0;left:0;background-color:var(--color-neutral-200);opacity:.8;width:100%;height:100%;display:flex;justify-content:center;align-items:center;z-index:1}.account-address-modal p{color:var(--color-neutral-800);font:var(--type-body-2-strong-font);letter-spacing:var(--type-body-2-strong-letter-spacing);margin-bottom:var(--spacing-medium)}.account-address-modal .account-address-modal__buttons{display:flex;align-items:center;justify-content:right;gap:0 var(--spacing-small)}.account-empty-list{margin-bottom:var(--spacing-small);border:var(--shape-border-width-1) solid var(--color-neutral-400);border-radius:var(--shape-border-radius-1)}.account-empty-list.account-empty-list--minified,.account-empty-list .dropin-card{border:none}.account-empty-list .dropin-card__content{gap:0;padding:var(--spacing-xxbig)}.account-empty-list.account-empty-list--minified .dropin-card__content{flex-direction:row;align-items:center;padding:var(--spacing-big) var(--spacing-small)}.account-empty-list .dropin-card__content svg{width:64px;height:64px;margin-bottom:var(--spacing-medium)}.account-empty-list.account-empty-list--minified .dropin-card__content svg{margin:0 var(--spacing-small) 0 0;width:32px;height:32px}.account-empty-list .dropin-card__content svg path{fill:var(--color-neutral-800)}.account-empty-list.account-empty-list--minified .dropin-card__content svg path{fill:var(--color-neutral-500)}.account-empty-list .dropin-card__content p{font:var(--type-headline-1-font);letter-spacing:var(--type-headline-1-letter-spacing);color:var(--color-neutral-800)}.account-empty-list.account-empty-list--minified .dropin-card__content p{font:var(--type-body-1-strong-font);color:var(--color-neutral-800)}.account-orders-list-action{margin:0;padding:0;border:none;background-color:transparent;cursor:pointer;text-decoration:none}.account-orders-list-action--minifiedView{width:100%;text-align:left;font:var(--type-body-1-default-font)}.account-orders-list-action.account-orders-list-action--minifiedView:hover{text-decoration:none}.account-orders-list-action--minifiedView .account-orders-list-action__card-wrapper{display:flex;justify-content:space-between;align-items:center;color:var(--color-neutral-800);height:calc(88px - var(--spacing-small) * 2)}.account-orders-list-action__card-wrapper>p{font:var(--type-button-2-font);letter-spacing:var(--type-button-2-letter-spacing)}.account-orders-list-action__card-wrapper svg,.account-orders-list-action svg{color:var(--color-neutral-800)}.account-orders-list-action--minifiedView .dropin-card--secondary{border-width:var(--shape-border-width-1);border-radius:var(--shape-border-radius-1)}.account-orders-list-action--minifiedView .dropin-card__content{padding:var(--spacing-small) var(--spacing-medium)}.account-orders-list-action--minifiedView p{font:var(--type-body-1-strong-font)}.account-orders-list-card{height:100%;margin-bottom:var(--spacing-small);border-width:var(--shape-border-width-1);border-radius:var(--shape-border-radius-1)}.account-orders-list-card .dropin-card__content{padding:var(--spacing-medium);display:grid;grid-template-areas:"content actions" "imageList actions";gap:0;max-height:100%}.account-orders-list-card .account-orders-list-card__content{grid-area:content;margin-bottom:var(--spacing-small)}.account-orders-list-card__content--quantity{font-weight:500;color:var(--color-neutral-800)}.account-orders-list-card__content--track_number{font:var(--type-body-1-strong-font);letter-spacing:var(--type-body-1-strong-letter-spacing);cursor:pointer}.account-orders-list-card .account-orders-list-card__content>div:first-child{font-weight:500}.account-orders-list-card .account-orders-list-card__content p,.account-orders-list-card .account-orders-list-card__content div{padding:0;text-align:left;font:var(--type-body-1-default-font);margin-bottom:var(--spacing-small);color:var(--color-neutral-800)}.account-orders-list-card p.account-orders-list-card__content--product-name{margin:0}.account-orders-list-card .account-orders-list-card__content p:last-child{margin:0}.account-orders-list-card .account-orders-list-card__content div{font:var(--type-button-2-font);margin-bottom:var(--spacing-small)}.account-orders-list-card .account-orders-list-card__actions{grid-area:actions}.account-orders-list-card .account-orders-list-card__images{overflow:auto}.account-orders-list-card .account-orders-list-card__images .dropin-content-grid__content{grid-template-columns:repeat(6,max-content)!important}.account-orders-list-card .account-orders-list-card__images-3 .dropin-content-grid__content{grid-template-columns:repeat(3,max-content)!important}.account-orders-list-card .account-orders-list-card__images img{object-fit:contain;width:65px;height:65px}.account-orders-list-card .account-orders-list-card__actions{position:relative;align-self:center;margin-left:auto}@media (min-width: 768px){.account-orders-list-card.account-orders-list-card--full .dropin-card__content{max-height:100%}}.account-addresses-header{margin-bottom:var(--spacing-medium)}.account-addresses-wrapper{box-sizing:border-box;position:relative}.account-addresses-wrapper .account-addresses__footer .dropin-card--secondary{border:var(--shape-border-width-1) solid var(--color-neutral-400);border-radius:var(--shape-border-radius-1)}.account-addresses-wrapper--select-view{position:relative;margin:0;padding:0;border:none}.account-addresses-wrapper--select-view input[type=radio]{position:absolute;clip:rect(0,0,0,0);width:1px;height:1px;padding:0;margin:-1px;border:0;overflow:hidden}.account-addresses-wrapper--select-view .account-addresses-wrapper__label{cursor:pointer;display:block;border-radius:0}.account-addresses-wrapper--select-view .account-addresses-wrapper__label .account-address-card{border-radius:0}.account-addresses-wrapper--select-view .account-addresses-wrapper__label:nth-child(2){border-radius:var(--shape-border-radius-1) var(--shape-border-radius-1) 0 0}.account-addresses-wrapper--select-view>.account-addresses-wrapper__label:nth-child(2)>.account-address-card{border-radius:var(--shape-border-radius-1) var(--shape-border-radius-1) 0 0}.account-addresses-wrapper--select-view>.account-addresses-wrapper__label:last-child,.account-addresses-wrapper--select-view>.account-addresses-wrapper__label:last-child>.account-actions-address.account-actions-address--address{border-radius:0 0 var(--shape-border-radius-1) var(--shape-border-radius-1)}.account-addresses-wrapper--select-view .account-addresses-wrapper__label .account-address-card,.account-addresses-wrapper--select-view .account-addresses-wrapper__label .account-actions-address.account-actions-address--address{background-color:var(--color-neutral-200)}.account-addresses-wrapper--select-view input[type=radio]:checked+.account-addresses-wrapper__label>.account-address-card{border:var(--shape-border-width-1) solid var(--color-neutral-900);position:relative}.account-addresses-wrapper--select-view input[type=radio]:checked+.account-addresses-wrapper__label>.account-addresses-form__footer__wrapper{border:var(--shape-border-width-1) solid var(--color-neutral-900);position:relative}.account-addresses-wrapper--select-view input[type=radio]:checked+.account-addresses-wrapper__label .account-address-card,.account-addresses-wrapper--select-view input[type=radio]:checked+.account-addresses-wrapper__label .account-actions-address.account-actions-address--address{background-color:var(--color-neutral-50)}.account-addresses-wrapper--select-view .account-address-card{margin:0}.account-addresses-wrapper--select-view .account-addresses-form__footer__wrapper{padding:var(--spacing-medium)}.account-address-form-wrapper{box-sizing:border-box;background-color:var(--color-neutral-50)}.account-address-form-wrapper__notification{margin-bottom:var(--spacing-medium)}.account-address-form-wrapper__title{color:var(--color-neutral-800);font:var(--type-headline-2-strong-font);letter-spacing:var(--type-headline-2-strong-letter-spacing);margin-bottom:var(--spacing-medium)}.account-address-form-wrapper__buttons{display:flex;align-items:center;justify-content:end;gap:0 var(--spacing-medium);margin-top:var(--spacing-medium)}.account-address-form-wrapper__buttons--empty{gap:0;margin:0;padding:0;display:inline-block}.account-address-form-wrapper__buttons button{min-width:142px}.account-change-password .dropin-card__content{gap:0}.account-change-password__title,.account-change-password .account-change-password__notification,.account-change-password .account-change-password__fields .account-change-password__fields-item{margin-bottom:var(--spacing-medium)}.account-change-password .account-change-password__fields .account-change-password__fields-item:last-child{margin-bottom:0}.account-change-password .account-change-password__actions{display:flex;justify-content:right;align-items:center;gap:0 var(--grid-3-gutters);margin-top:var(--spacing-xlarge)}.account-change-password .account-change-password__actions button{min-width:144px}.account-edit-customer-information__title{margin-bottom:var(--spacing-medium)}.account-edit-customer-information .dropin-card__content{gap:0}.account-edit-customer-information .account-edit-customer-information__notification{margin-bottom:var(--spacing-medium)}.account-edit-customer-information .account-edit-customer-information-form__field:nth-child(n+3),.account-edit-customer-information .account-edit-customer-information__password{grid-column:span 2}.account-edit-customer-information .account-edit-customer-information__actions{display:flex;justify-content:end;align-items:center;gap:0 var(--grid-2-gutters);grid-column:span 2}.account-edit-customer-information .account-edit-customer-information__actions button{min-width:144px}.customer-information__title{margin-bottom:var(--spacing-medium)}.account-customer-information-card-short{margin-bottom:var(--spacing-small)}.account-customer-information-card .dropin-card__content{gap:0}.account-customer-information-card__wrapper{display:grid;grid-template-columns:1fr auto;align-items:start}.account-customer-information-card .account-customer-information-card__actions{display:flex;justify-content:space-between;align-items:center;gap:0 var(--grid-2-gutters)}.account-customer-information-card .account-customer-information-card__actions button{cursor:pointer;margin:0;padding:0}.account-customer-information-card .account-customer-information-card__wrapper .account-customer-information-card__content p{display:block;font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing);margin:0 var(--spacing-xxsmall) var(--spacing-small) 0;padding:0}.account-customer-information-card .account-customer-information-card__wrapper .account-customer-information-card__content p:first-child{font:var(--type-body-1-strong-font);letter-spacing:var(--type-body-1-strong-letter-spacing)}.account-customer-information-card .account-customer-information-card__wrapper .account-customer-information-card__content p:last-child{margin-bottom:0}`,{styleId:"account"});
import{jsx as r}from"@dropins/tools/preact-jsx-runtime.js";import{Render as o}from"@dropins/tools/lib.js";import{useState as n,useEffect as i}from"@dropins/tools/preact-hooks.js";import{UIProvider as l}from"@dropins/tools/components.js";import{events as c}from"@dropins/tools/event-bus.js";const m={minifiedView:{CustomerInformation:{containerTitle:"Account settings",genderMale:"Male",genderFemale:"Female",changePassword:{passwordValidationMessage:{chartTwoSymbols:"Use characters and numbers or symbols",chartThreeSymbols:"Use characters, numbers and symbols",chartFourSymbols:"Use uppercase characters, lowercase characters, numbers and symbols",messageLengthPassword:"At least {minLength} characters long",passwordMismatch:"Passwords do not match. Please make sure both password fields are identical",incorrectCurrentPassword:"The current password you entered is incorrect. Please check and try again.",passwordUpdateMessage:"Your password has been updated"},containerTitle:"Change password",currentPassword:{placeholder:"Password",floatingLabel:"Password"},newPassword:{placeholder:"New Password",floatingLabel:"New Password"},confirmPassword:{placeholder:"Confirm new password",floatingLabel:"Confirm new password"},buttonSecondary:"Cancel",buttonPrimary:"Save"},customerInformationCard:{buttonSecondary:"Change password",buttonPrimary:"Edit",accountCreation:"Account creation date"},editCustomerInformation:{containerTitle:"Edit details",buttonSecondary:"Cancel",buttonPrimary:"Save",accountSuccess:"Your account information has been updated.",accountError:"Your account information has not been updated.",passwordField:{placeholder:"Password",floatingLabel:"Password"}}},Addresses:{containerTitle:"Addresses",editAddressFormTitle:"Edit address",differentAddressFormTitle:"Deliver to new address",viewAllAddressesButton:"View address list",differentAddressButton:"Use a different address",addressCard:{actionRemove:"Remove",actionEdit:"Edit",cardLabelShipping:"Shipping",cardLabelBilling:"Billing",defaultLabelText:"DEFAULT"},removeAddressModal:{title:"Remove address",description:"Are you sure you would like to remove this address?",actionCancel:"Cancel",actionConfirm:"Remove"}},OrdersList:{containerTitle:"Recent orders",viewAllOrdersButton:"View all orders",ariaLabelLink:"Redirect to full order information",OrdersListCard:{orderNumber:"Order number:",itemsAmount:"items",carrier:"Carrier:",orderDate:"Placed on"},OrdersListSelectDate:{pastSixMonths:"Past 6 months",currentYear:"Current year",viewAll:"View all"}},EmptyList:{Addresses:{message:"No saved addresses"},OrdersList:{message:"No orders"}}},fullSizeView:{Addresses:{containerTitle:"Addresses",editAddressFormTitle:"Edit address",differentAddressFormTitle:"Deliver to new address",newAddressFormTitle:"Add address",addNewAddressButton:"Create new",differentAddressButton:"Use a different address",addressCard:{actionRemove:"Remove",actionEdit:"Edit",cardLabelShipping:"Shipping",cardLabelBilling:"Billing",defaultLabelText:"DEFAULT"},removeAddressModal:{title:"Remove address",description:"Are you sure you would like to remove this address?",actionCancel:"Cancel",actionConfirm:"Remove"}},OrdersList:{containerTitle:"Your orders",ariaLabelLink:"Redirect to full order information",OrdersListCard:{orderNumber:"Order number:",itemsAmount:"items",carrier:"Carrier:",orderDate:"Placed on"},OrdersListSelectDate:{pastSixMonths:"Past 6 months",currentYear:"Current year",viewAll:"View all"}},EmptyList:{Addresses:{message:"No saved addresses"},OrdersList:{message:"No orders"}}},AddressForm:{formText:{secondaryButton:"Cancel",primaryButton:"Save",defaultShippingLabel:"Set as default shipping address",defaultBillingLabel:"Set as default billing address",saveAddressBook:"Save in address book"}},FormText:{requiredFieldError:"This is a required field.",numericError:"Only numeric values are allowed.",alphaNumWithSpacesError:"Only alphanumeric characters and spaces are allowed.",alphaNumericError:"Only alphanumeric characters are allowed.",alphaError:"Only alphabetic characters are allowed.",emailError:"Please enter a valid email address.",dateError:"Please enter a valid date.",dateLengthError:"Date must be between {min} and {max}.",urlError:"Please enter a valid URL, e.g., http://www.adobe.com.",lengthTextError:"Text length must be between {min} and {max} characters."}},u={Account:m},w={default:u},p=({children:a})=>{const[s,t]=n("en_US");return i(()=>{const e=c.on("locale",d=>{t(d)},{eager:!0});return()=>{e==null||e.off()}},[]),r(l,{lang:s,langDefinitions:w,children:a})},L=new o(r(p,{}));export{L as render};
export interface getCustomerShortResponse {
data: {
customer: {
custom_attributes: {
code: string;
value: string | number | boolean;
}[];
firstname: string;
lastname: string;
email: string;
date_of_birth: string;
dob: string;
gender: 1 | 2;
middlename: string;
prefix: string;
suffix: string;
created_at: string;
};

@@ -8,0 +19,0 @@ };

@@ -13,4 +13,8 @@ export * from './addresses.types';

export * from './api/getOrderHistoryList.types';
export * from './api/updateCustomerPassword.types';
export * from './api/storeConfig.types';
export * from './ordersList.types';
export * from './emptyList.types';
export * from './customerInformation.types';
export * from './notification.types';
//# sourceMappingURL=index.d.ts.map
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc