@dropins/storefront-account 0.1.0-alpha2 → 0.1.0-alpha21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/api/createCustomerAddress/createCustomerAddress.d.ts +4 -0
  2. package/api/createCustomerAddress/graphql/createCustomerAddress.graphql.d.ts +2 -0
  3. package/api/createCustomerAddress/index.d.ts +2 -0
  4. package/api/fetch-graphql/fetch-graphql.d.ts +8 -0
  5. package/api/fetch-graphql/index.d.ts +2 -0
  6. package/api/fragments/CustomerFragment.graphql.d.ts +2 -0
  7. package/api/getAttributesForm/getAttributesForm.d.ts +4 -0
  8. package/api/getAttributesForm/graphql/getAttributesForm.graphql.d.ts +3 -0
  9. package/api/getAttributesForm/index.d.ts +2 -0
  10. package/api/getCountries/getCountries.d.ts +9 -0
  11. package/api/getCountries/graphql/getCountries.graphql.d.ts +2 -0
  12. package/api/getCountries/index.d.ts +2 -0
  13. package/api/getCustomer/getCustomer.d.ts +4 -0
  14. package/api/getCustomer/graphql/getCustomer.graphql.d.ts +2 -0
  15. package/api/getCustomer/index.d.ts +2 -0
  16. package/api/getCustomerAddress/getCustomerAddress.d.ts +4 -0
  17. package/api/getCustomerAddress/graphql/getCustomerAddress.graphql.d.ts +2 -0
  18. package/api/getCustomerAddress/index.d.ts +2 -0
  19. package/api/getOrderHistoryList/getOrderHistoryList.d.ts +4 -0
  20. package/api/getOrderHistoryList/graphql/customerAddressFragment.graphql.d.ts +2 -0
  21. package/api/getOrderHistoryList/graphql/getOrderHistoryList.graphql.d.ts +2 -0
  22. package/api/getOrderHistoryList/graphql/orderSummaryFragment.graphql.d.ts +2 -0
  23. package/api/getOrderHistoryList/index.d.ts +2 -0
  24. package/api/getRegions/getRegions.d.ts +5 -0
  25. package/api/getRegions/graphql/getRegions.graphql.d.ts +2 -0
  26. package/api/getRegions/index.d.ts +2 -0
  27. package/api/getStoreConfig/getStoreConfig.d.ts +4 -0
  28. package/api/getStoreConfig/graphql/getStoreConfig.graphql.d.ts +2 -0
  29. package/api/getStoreConfig/index.d.ts +2 -0
  30. package/api/index.d.ts +16 -0
  31. package/api/initialize/index.d.ts +2 -0
  32. package/api/initialize/initialize.d.ts +14 -0
  33. package/api/removeCustomerAddress/graphql/removeCustomerAddress.graphql.d.ts +2 -0
  34. package/api/removeCustomerAddress/index.d.ts +2 -0
  35. package/api/removeCustomerAddress/removeCustomerAddress.d.ts +2 -0
  36. package/api/updateCustomer/graphql/updateCustomer.graphql.d.ts +2 -0
  37. package/api/updateCustomer/index.d.ts +2 -0
  38. package/api/updateCustomer/updateCustomer.d.ts +2 -0
  39. package/api/updateCustomerAddress/graphql/updateCustomerAddress.graphql.d.ts +2 -0
  40. package/api/updateCustomerAddress/index.d.ts +2 -0
  41. package/api/updateCustomerAddress/updateCustomerAddress.d.ts +8 -0
  42. package/api/updateCustomerEmail/graphql/updateCustomerEmail.graphql.d.ts +2 -0
  43. package/api/updateCustomerEmail/index.d.ts +2 -0
  44. package/api/updateCustomerEmail/updateCustomerEmail.d.ts +5 -0
  45. package/api/updateCustomerPassword/graphql/updateCustomerPassword.graphql.d.ts +2 -0
  46. package/api/updateCustomerPassword/index.d.ts +2 -0
  47. package/api/updateCustomerPassword/updateCustomerPassword.d.ts +4 -0
  48. package/api.d.ts +1 -0
  49. package/api.js +1 -2
  50. package/chunks/CustomerInformationCard.js +1 -0
  51. package/chunks/getOrderHistoryList.js +124 -0
  52. package/chunks/removeCustomerAddress.js +120 -0
  53. package/chunks/updateCustomer.js +57 -0
  54. package/components/AccountLoaders/AccountLoaders.d.ts +8 -0
  55. package/components/AccountLoaders/index.d.ts +3 -0
  56. package/components/AddressActions/AddressActions.d.ts +5 -0
  57. package/components/AddressActions/index.d.ts +3 -0
  58. package/components/AddressCard/AddressCard.d.ts +5 -0
  59. package/components/AddressCard/index.d.ts +3 -0
  60. package/components/AddressFormWrapper/AddressFormWrapper.d.ts +5 -0
  61. package/components/AddressFormWrapper/index.d.ts +3 -0
  62. package/components/AddressModal/AddressModal.d.ts +5 -0
  63. package/components/AddressModal/index.d.ts +3 -0
  64. package/components/AddressesWrapper/AddressesWrapper.d.ts +5 -0
  65. package/components/AddressesWrapper/index.d.ts +3 -0
  66. package/components/ChangePassword/ChangePassword.d.ts +5 -0
  67. package/components/ChangePassword/index.d.ts +3 -0
  68. package/components/CustomerInformationCard/CustomerInformationCard.d.ts +5 -0
  69. package/components/CustomerInformationCard/index.d.ts +3 -0
  70. package/components/EditCustomerInformation/EditCustomerInformation.d.ts +5 -0
  71. package/components/EditCustomerInformation/index.d.ts +3 -0
  72. package/components/EmptyList/EmptyList.d.ts +5 -0
  73. package/components/EmptyList/index.d.ts +3 -0
  74. package/components/Form/Form.d.ts +6 -0
  75. package/components/Form/FormInputs/FormInputs.d.ts +5 -0
  76. package/components/Form/FormInputs/index.d.ts +3 -0
  77. package/components/Form/index.d.ts +3 -0
  78. package/components/OrdersListAction/OrdersListAction.d.ts +5 -0
  79. package/components/OrdersListAction/index.d.ts +3 -0
  80. package/components/OrdersListCard/OrdersListCard.d.ts +5 -0
  81. package/components/OrdersListCard/index.d.ts +3 -0
  82. package/components/OrdersListWrapper/OrdersListWrapper.d.ts +5 -0
  83. package/components/OrdersListWrapper/index.d.ts +3 -0
  84. package/components/index.d.ts +16 -0
  85. package/configs/addressField.config.d.ts +39 -0
  86. package/configs/defaultAttributePreset.config.d.ts +3 -0
  87. package/configs/mockDefaultAddress.config.d.ts +153 -0
  88. package/configs/mockOrdersList.config.d.ts +205 -0
  89. package/containers/AddressForm/AddressForm.d.ts +5 -0
  90. package/containers/AddressForm/index.d.ts +3 -0
  91. package/containers/AddressForm.d.ts +3 -0
  92. package/containers/AddressForm.js +1 -0
  93. package/containers/Addresses/Addresses.d.ts +5 -0
  94. package/containers/Addresses/index.d.ts +3 -0
  95. package/containers/Addresses.d.ts +3 -0
  96. package/containers/Addresses.js +1 -0
  97. package/containers/CustomerInformation/CustomerInformation.d.ts +5 -0
  98. package/containers/CustomerInformation/index.d.ts +3 -0
  99. package/containers/CustomerInformation.d.ts +3 -0
  100. package/containers/CustomerInformation.js +1 -0
  101. package/containers/OrdersList/OrdersList.d.ts +5 -0
  102. package/containers/OrdersList/index.d.ts +3 -0
  103. package/containers/OrdersList.d.ts +3 -0
  104. package/containers/OrdersList.js +1 -0
  105. package/containers/index.d.ts +5 -0
  106. package/data/models/attributes-form.d.ts +46 -0
  107. package/data/models/country.d.ts +5 -0
  108. package/data/models/customer-address.d.ts +21 -0
  109. package/data/models/customer.d.ts +14 -0
  110. package/data/models/index.d.ts +7 -0
  111. package/data/models/order-history-list.d.ts +80 -0
  112. package/data/models/region.d.ts +11 -0
  113. package/data/models/store-config.d.ts +5 -0
  114. package/data/transforms/index.d.ts +8 -0
  115. package/data/transforms/transform-attributes-form.d.ts +6 -0
  116. package/data/transforms/transform-countries.d.ts +10 -0
  117. package/data/transforms/transform-customer-address.d.ts +7 -0
  118. package/data/transforms/transform-customer.d.ts +5 -0
  119. package/data/transforms/transform-order-history-list.d.ts +5 -0
  120. package/data/transforms/transform-regions.d.ts +6 -0
  121. package/data/transforms/transform-store-config.d.ts +5 -0
  122. package/hooks/components/useChangePassword.d.ts +26 -0
  123. package/hooks/components/useForm.d.ts +14 -0
  124. package/hooks/components/usePasswordValidationMessage.d.ts +16 -0
  125. package/hooks/containers/useAddressForm.d.ts +31 -0
  126. package/hooks/containers/useAddresses.d.ts +24 -0
  127. package/hooks/containers/useCustomerInformation.d.ts +50 -0
  128. package/hooks/containers/useGetStoreConfigs.d.ts +7 -0
  129. package/hooks/containers/useOrderSelectList.d.ts +12 -0
  130. package/hooks/containers/useOrdersList.d.ts +13 -0
  131. package/hooks/useDebounce.d.ts +3 -0
  132. package/hooks/useInLineAlert.d.ts +7 -0
  133. package/hooks/useIsMobile.d.ts +2 -0
  134. package/i18n/en_US.json.d.ts +170 -0
  135. package/lib/areRequiredFieldsValid.d.ts +6 -0
  136. package/lib/checkIsFunction.d.ts +2 -0
  137. package/lib/convertCase.d.ts +4 -0
  138. package/lib/convertToBoolean.d.ts +2 -0
  139. package/lib/convertToInputDateFormat.d.ts +2 -0
  140. package/lib/fetch-error.d.ts +5 -0
  141. package/lib/formatDateToLocale.d.ts +31 -0
  142. package/lib/getDateRange.d.ts +10 -0
  143. package/lib/getFieldsConfig.d.ts +4 -0
  144. package/lib/getFormValues.d.ts +2 -0
  145. package/lib/getFormValuesFromRef.d.ts +5 -0
  146. package/lib/initializeFormDataAndErrors.d.ts +10 -0
  147. package/lib/manageAddressDeletion.d.ts +9 -0
  148. package/lib/network-error.d.ts +6 -0
  149. package/lib/normalizeAttributes.d.ts +2 -0
  150. package/lib/normalizeGetAddressData.d.ts +6 -0
  151. package/lib/prepareNormalizedData.d.ts +21 -0
  152. package/lib/serializeAddressForm.d.ts +4 -0
  153. package/lib/sortingAddressesList.d.ts +5 -0
  154. package/lib/transformDefaultValuesAddresses.d.ts +11 -0
  155. package/lib/transformSessionData.d.ts +6 -0
  156. package/lib/validationChangePassword.d.ts +17 -0
  157. package/lib/validationFields.d.ts +33 -0
  158. package/lib/validationUniqueSymbolsPassword.d.ts +2 -0
  159. package/package.json +1 -1
  160. package/render/Provider.d.ts +8 -0
  161. package/render/index.d.ts +2 -0
  162. package/render/render.d.ts +4 -0
  163. package/render.d.ts +1 -0
  164. package/render.js +3 -2
  165. package/types/addressForm.types.d.ts +46 -0
  166. package/types/addresses.types.d.ts +90 -0
  167. package/types/api/createCustomerAddress.types.d.ts +47 -0
  168. package/types/api/getAttributesForm.types.d.ts +31 -0
  169. package/types/api/getCountries.types.d.ts +19 -0
  170. package/types/api/getCustomer.types.d.ts +24 -0
  171. package/types/api/getCustomerAddress.type.d.ts +40 -0
  172. package/types/api/getOrderHistoryList.types.d.ts +91 -0
  173. package/types/api/getRegions.types.d.ts +16 -0
  174. package/types/api/removeCustomerAddress.types.d.ts +9 -0
  175. package/types/api/storeConfig.types.d.ts +13 -0
  176. package/types/api/updateCustomerAddress.types.d.ts +11 -0
  177. package/types/api/updateCustomerPassword.types.d.ts +15 -0
  178. package/types/customerInformation.types.d.ts +61 -0
  179. package/types/emptyList.types.d.ts +8 -0
  180. package/types/form.types.d.ts +56 -0
  181. package/types/index.d.ts +19 -0
  182. package/types/notification.types.d.ts +19 -0
  183. package/types/ordersList.types.d.ts +64 -0
  184. package/api.js.map +0 -1
  185. package/render.js.map +0 -1
@@ -0,0 +1,120 @@
1
+ import{events as b}from"@dropins/tools/event-bus.js";import{FetchGraphQL as C}from"@dropins/tools/fetch-graphql.js";const S=t=>t.replace(/_([a-z])/g,(n,e)=>e.toUpperCase()),p=t=>t.replace(/([A-Z])/g,n=>`_${n.toLowerCase()}`),g=(t,n,e)=>{const r=["string","boolean","number"],o=n==="camelCase"?S:p;return Array.isArray(t)?t.map(i=>r.includes(typeof i)||i===null?i:typeof i=="object"?g(i,n,e):i):t!==null&&typeof t=="object"?Object.entries(t).reduce((i,[c,a])=>{const u=e&&e[c]?e[c]:o(c);return i[u]=r.includes(typeof a)||a===null?a:g(a,n,e),i},{}):t},{setEndpoint:k,setFetchGraphQlHeader:H,removeFetchGraphQlHeader:J,setFetchGraphQlHeaders:K,fetchGraphQl:s,getConfig:L}=new C().getMethods(),T=`
2
+ query GET_ATTRIBUTES_FORM($formCode: String!) {
3
+ attributesForm(formCode: $formCode) {
4
+ items {
5
+ code
6
+ default_value
7
+ entity_type
8
+ frontend_class
9
+ frontend_input
10
+ is_required
11
+ is_unique
12
+ label
13
+ options {
14
+ is_default
15
+ label
16
+ value
17
+ }
18
+ ... on CustomerAttributeMetadata {
19
+ multiline_count
20
+ sort_order
21
+ validate_rules {
22
+ name
23
+ value
24
+ }
25
+ }
26
+ }
27
+ errors {
28
+ type
29
+ message
30
+ }
31
+ }
32
+ }
33
+ `,A=`
34
+ query GET_ATTRIBUTES_FORM_SHORT {
35
+ attributesForm(formCode: "customer_register_address") {
36
+ items {
37
+ frontend_input
38
+ label
39
+ code
40
+ ... on CustomerAttributeMetadata {
41
+ multiline_count
42
+ sort_order
43
+ }
44
+ }
45
+ }
46
+ }
47
+ `,_=t=>{throw t instanceof DOMException&&t.name==="AbortError"||b.emit("error",{source:"auth",type:"network",error:t}),t},f=t=>{const n=t.map(e=>e.message).join(" ");throw Error(n)},y=t=>{let n=[];for(const e of t)if(!(e.frontend_input!=="MULTILINE"||e.multiline_count<2))for(let r=2;r<=e.multiline_count;r++){const o={...e,is_required:!1,name:`${e.code}_multiline_${r}`,code:`${e.code}_multiline_${r}`,id:`${e.code}_multiline_${r}`};n.push(o)}return n},R=t=>{var i,c,a;const n=((c=(i=t==null?void 0:t.data)==null?void 0:i.attributesForm)==null?void 0:c.items)||[];if(!n.length)return[];const e=(a=n.filter(u=>{var l;return!((l=u.frontend_input)!=null&&l.includes("HIDDEN"))}))==null?void 0:a.map(({code:u,...l})=>{const m=u!=="country_id"?u:"country_code";return{...l,name:m,id:m,code:m}}),r=y(e);return e.concat(r).map(u=>{var E;const l=u.code==="middlename"?"middleName":u.code==="firstname"?"firstName":u.code==="lastname"?"lastName":S(u.code),m=(E=u.options)==null?void 0:E.map(h=>({isDefault:h.is_default,text:h.label,value:h.value}));return g({...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 n={};for(const e in t){const r=t[e];!Array.isArray(r)||r.length===0||(e==="custom_attributesV2"?r.forEach(o=>{typeof o=="object"&&"value"in o&&(n[o==null?void 0:o.code]=o==null?void 0:o.value)}):r.length>1?r.forEach((o,i)=>{i===0?n[e]=o:n[`${e}_multiline_${i+1}`]=o}):n[e]=r[0])}return n},N=t=>({prefix:(t==null?void 0:t.prefix)??"",suffix:(t==null?void 0:t.suffix)??"",firstname:(t==null?void 0:t.firstname)??"",lastname:(t==null?void 0:t.lastname)??"",middlename:(t==null?void 0:t.middlename)??""}),O=t=>({id:(t==null?void 0:t.id)??"",vat_id:(t==null?void 0:t.vat_id)??"",postcode:(t==null?void 0:t.postcode)??"",country_code:(t==null?void 0:t.country_code)??""}),I=t=>({company:(t==null?void 0:t.company)??"",telephone:(t==null?void 0:t.telephone)??"",fax:(t==null?void 0:t.fax)??""}),$=t=>{var e,r,o;return g({...N(t),...O(t),...I(t),city:(t==null?void 0:t.city)??"",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:((o=t==null?void 0:t.region)==null?void 0:o.region_id)??""},default_shipping:(t==null?void 0:t.default_shipping)||!1,default_billing:(t==null?void 0:t.default_billing)||!1,...v(t)},"camelCase",{})},G=t=>{var r,o;const n=((o=(r=t==null?void 0:t.data)==null?void 0:r.customer)==null?void 0:o.addresses)||[];return n.length?n.map($).sort((i,c)=>(Number(c.defaultBilling)||Number(c.defaultShipping))-(Number(i.defaultBilling)||Number(i.defaultShipping))):[]},M=t=>{var c,a;if(!((a=(c=t==null?void 0:t.data)==null?void 0:c.countries)!=null&&a.length))return{availableCountries:[],countriesWithRequiredRegion:[],optionalZipCountries:[]};const{countries:n,storeConfig:e}=t.data,r=e==null?void 0:e.countries_with_required_region.split(","),o=e==null?void 0:e.optional_zip_countries.split(",");return{availableCountries:n.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:r,optionalZipCountries:o}},U=t=>{var e,r;return(r=(e=t==null?void 0:t.data)==null?void 0:e.country)!=null&&r.available_regions?t.data.country.available_regions.filter(o=>{if(!o)return!1;const{id:i,code:c,name:a}=o;return!!(i&&c&&a)}).map(o=>{const{id:i}=o;return{id:i,text:o.name,value:`${o.code},${o.id}`}}):[]},P=async t=>{const n=`_account_attributesForm_${t}`,e=sessionStorage.getItem(n);return e?JSON.parse(e):await s(t!=="shortRequest"?T:A,{method:"GET",cache:"force-cache",variables:{formCode:t}}).then(r=>{var i;if((i=r.errors)!=null&&i.length)return f(r.errors);const o=R(r);return sessionStorage.setItem(n,JSON.stringify(o)),o}).catch(_)},w=`
48
+ mutation CREATE_CUSTOMER_ADDRESS($input: CustomerAddressInput!) {
49
+ createCustomerAddress(input:$input) {
50
+ firstname
51
+ }
52
+ }
53
+ `,d=async t=>await s(w,{method:"POST",variables:{input:g(t,"snakeCase",{custom_attributesV2:"custom_attributesV2",firstName:"firstname",lastName:"lastname",middleName:"middlename"})}}).then(n=>{var e,r,o;return(e=n.errors)!=null&&e.length?f(n.errors):((o=(r=n==null?void 0:n.data)==null?void 0:r.createCustomerAddress)==null?void 0:o.firstname)||""}).catch(_),x=`
54
+ query GET_CUSTOMER_ADDRESS {
55
+ customer {
56
+ addresses {
57
+ firstname
58
+ lastname
59
+ middlename
60
+ fax
61
+ prefix
62
+ suffix
63
+ city
64
+ company
65
+ country_code
66
+ region {
67
+ region
68
+ region_code
69
+ region_id
70
+ }
71
+ custom_attributesV2 {
72
+ ... on AttributeValue {
73
+ code
74
+ value
75
+ }
76
+ }
77
+ telephone
78
+ id
79
+ vat_id
80
+ postcode
81
+ street
82
+ default_shipping
83
+ default_billing
84
+ }
85
+ }
86
+ }
87
+ `,z=async()=>await s(x,{method:"GET",cache:"no-cache"}).then(t=>{var n;return(n=t.errors)!=null&&n.length?f(t.errors):G(t)}).catch(_),F=`
88
+ query GET_COUNTRIES_QUERY {
89
+ countries {
90
+ two_letter_abbreviation
91
+ full_name_locale
92
+ }
93
+ storeConfig {
94
+ countries_with_required_region
95
+ optional_zip_countries
96
+ }
97
+ }
98
+ `,Z=async()=>{const t="_account_countries",n=sessionStorage.getItem(t);return n?JSON.parse(n):await s(F,{method:"GET",cache:"no-cache"}).then(e=>{var o;if((o=e.errors)!=null&&o.length)return f(e.errors);const r=M(e);return sessionStorage.setItem(t,JSON.stringify(r)),r}).catch(_)},q=`
99
+ query GET_REGIONS($countryCode: String!) {
100
+ country(id: $countryCode) {
101
+ id
102
+ available_regions {
103
+ id
104
+ code
105
+ name
106
+ }
107
+ }
108
+ }
109
+ `,W=async t=>{const n=`_account_regions_${t}`,e=sessionStorage.getItem(n);return e?JSON.parse(e):await s(q,{method:"GET",cache:"no-cache",variables:{countryCode:t}}).then(r=>{var i;if((i=r.errors)!=null&&i.length)return f(r.errors);const o=U(r);return sessionStorage.setItem(n,JSON.stringify(o)),o}).catch(_)},V=`
110
+ mutation UPDATE_CUSTOMER_ADDRESS($id: Int!,
111
+ $input: CustomerAddressInput) {
112
+ updateCustomerAddress(id:$id, input:$input) {
113
+ firstname
114
+ }
115
+ }
116
+ `,Y=async t=>{const{addressId:n,...e}=t;return n?await s(V,{method:"POST",variables:{id:n,input:g(e,"snakeCase",{custom_attributesV2:"custom_attributesV2",firstName:"firstname",lastName:"lastname",middleName:"middlename"})}}).then(r=>{var o,i,c;return(o=r.errors)!=null&&o.length?f(r.errors):((c=(i=r==null?void 0:r.data)==null?void 0:i.updateCustomerAddress)==null?void 0:c.firstname)||""}).catch(_):""},B=`
117
+ mutation REMOVE_CUSTOMER_ADDRESS($id: Int!) {
118
+ deleteCustomerAddress(id:$id)
119
+ }
120
+ `,X=async t=>await s(B,{method:"POST",variables:{id:t}}).then(n=>{var e;return(e=n.errors)!=null&&e.length?f(n.errors):n.data.deleteCustomerAddress}).catch(_);export{H as a,K as b,P as c,d,z as e,s as f,L as g,Z as h,W as i,X as j,g as k,f as l,_ as m,S as n,p as o,J as r,k as s,$ as t,Y as u};
@@ -0,0 +1,57 @@
1
+ import{n as $,f as d,l,m as _,k as I}from"./removeCustomerAddress.js";const y=t=>{var r,m,u,c,i,h,C,f,o,e,E,g,T,S,w,n,O,P,b,A,R,U,N;const a=(u=(m=(r=t==null?void 0:t.data)==null?void 0:r.customer)==null?void 0:m.custom_attributes)==null?void 0:u.reduce((G,M)=>(G[$(M.code)]=M.value??"",G),{});return{email:((i=(c=t==null?void 0:t.data)==null?void 0:c.customer)==null?void 0:i.email)||"",firstName:((C=(h=t==null?void 0:t.data)==null?void 0:h.customer)==null?void 0:C.firstname)||"",lastName:((o=(f=t==null?void 0:t.data)==null?void 0:f.customer)==null?void 0:o.lastname)||"",middleName:((E=(e=t==null?void 0:t.data)==null?void 0:e.customer)==null?void 0:E.middlename)||"",gender:((T=(g=t==null?void 0:t.data)==null?void 0:g.customer)==null?void 0:T.gender)||"1",dob:((w=(S=t==null?void 0:t.data)==null?void 0:S.customer)==null?void 0:w.dob)||"",dateOfBirth:((O=(n=t==null?void 0:t.data)==null?void 0:n.customer)==null?void 0:O.date_of_birth)||"",prefix:((b=(P=t==null?void 0:t.data)==null?void 0:P.customer)==null?void 0:b.prefix)||"",suffix:((R=(A=t==null?void 0:t.data)==null?void 0:A.customer)==null?void 0:R.suffix)||"",createdAt:((N=(U=t==null?void 0:t.data)==null?void 0:U.customer)==null?void 0:N.created_at)||"",...a}},v=t=>{var a,r,m,u;return{minLength:+((r=(a=t==null?void 0:t.data)==null?void 0:a.storeConfig)==null?void 0:r.minimum_password_length)||3,requiredCharacterClasses:+((u=(m=t==null?void 0:t.data)==null?void 0:m.storeConfig)==null?void 0:u.required_character_classes_number)||0}},x=`
2
+ fragment BasicCustomerInfo on Customer {
3
+ date_of_birth
4
+ dob
5
+ email
6
+ firstname
7
+ gender
8
+ lastname
9
+ middlename
10
+ prefix
11
+ suffix
12
+ created_at
13
+ }
14
+ `,D=`
15
+ query GET_CUSTOMER {
16
+ customer {
17
+ ...BasicCustomerInfo
18
+ custom_attributes {
19
+ ... on AttributeValue {
20
+ code
21
+ value
22
+ }
23
+ code
24
+ }
25
+ }
26
+ }
27
+ ${x}`,k=async()=>await d(D,{method:"GET",cache:"no-cache"}).then(t=>{var a;return(a=t.errors)!=null&&a.length?l(t.errors):y(t)}).catch(_),q=`
28
+ mutation CHANGE_CUSTOMER_PASSWORD($currentPassword: String!, $newPassword: String!) {
29
+ changeCustomerPassword(currentPassword: $currentPassword, newPassword: $newPassword) {
30
+ email
31
+ }
32
+ }
33
+ `,H=async({currentPassword:t,newPassword:a})=>await d(q,{method:"POST",variables:{currentPassword:t,newPassword:a}}).then(r=>{var m,u,c;return(m=r.errors)!=null&&m.length?l(r.errors):((c=(u=r==null?void 0:r.data)==null?void 0:u.changeCustomerPassword)==null?void 0:c.email)||""}).catch(_),F=`
34
+ query GET_STORE_CONFIG {
35
+ storeConfig {
36
+ autocomplete_on_storefront
37
+ minimum_password_length
38
+ required_character_classes_number
39
+ }
40
+ }
41
+ `,W=async()=>await d(F,{method:"GET",cache:"force-cache"}).then(t=>{var a;return(a=t.errors)!=null&&a.length?l(t.errors):v(t)}).catch(_),V=`
42
+ mutation UPDATE_CUSTOMER_EMAIL($email: String! $password: String!) {
43
+ updateCustomerEmail(email:$email password:$password) {
44
+ customer {
45
+ email
46
+ }
47
+ }
48
+ }
49
+ `,K=async({email:t,password:a})=>await d(V,{method:"POST",variables:{email:t,password:a}}).then(r=>{var m,u,c,i;return(m=r.errors)!=null&&m.length?l(r.errors):((i=(c=(u=r==null?void 0:r.data)==null?void 0:u.updateCustomerEmail)==null?void 0:c.customer)==null?void 0:i.email)||""}).catch(_),B=`
50
+ mutation UPDATE_CUSTOMER_V2($input: CustomerUpdateInput!) {
51
+ updateCustomerV2(input:$input) {
52
+ customer {
53
+ email
54
+ }
55
+ }
56
+ }
57
+ `,Q=async t=>await d(B,{method:"POST",variables:{input:I(t,"snakeCase",{firstName:"firstname",lastName:"lastname",middleName:"middlename",custom_attributesV2:"custom_attributes"})}}).then(a=>{var r,m,u,c;return(r=a.errors)!=null&&r.length?l(a.errors):((c=(u=(m=a==null?void 0:a.data)==null?void 0:m.updateCustomerV2)==null?void 0:u.customer)==null?void 0:c.email)||""}).catch(_);export{W as a,K as b,Q as c,k as g,H as u};
@@ -0,0 +1,8 @@
1
+
2
+ export declare const CardLoader: ({ testId, withCard, }: {
3
+ testId?: string | undefined;
4
+ withCard?: boolean | undefined;
5
+ }) => import("preact").JSX.Element;
6
+ export declare const AddressFormLoader: () => import("preact").JSX.Element;
7
+ export declare const PickerLoader: (props: any) => import("preact").JSX.Element;
8
+ //# sourceMappingURL=AccountLoaders.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './AccountLoaders';
2
+ export { CardLoader as default } from './AccountLoaders';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { FunctionComponent } from 'preact';
2
+ import { AddressActionsProps } from '../../types';
3
+
4
+ export declare const AddressActions: FunctionComponent<AddressActionsProps>;
5
+ //# sourceMappingURL=AddressActions.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './AddressActions';
2
+ export { AddressActions as default } from './AddressActions';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { FunctionComponent } from 'preact';
2
+ import { AddressCardProps } from '../../types';
3
+
4
+ export declare const AddressCard: FunctionComponent<AddressCardProps>;
5
+ //# sourceMappingURL=AddressCard.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './AddressCard';
2
+ export { AddressCard as default } from './AddressCard';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { FunctionComponent } from 'preact';
2
+ import { AddressFormWrapperProps } from '../../types';
3
+
4
+ export declare const AddressFormWrapper: FunctionComponent<AddressFormWrapperProps>;
5
+ //# sourceMappingURL=AddressFormWrapper.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './AddressFormWrapper';
2
+ export { AddressFormWrapper as default } from './AddressFormWrapper';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { FunctionComponent } from 'preact';
2
+ import { AddressModalProps } from '../../types';
3
+
4
+ export declare const AddressModal: FunctionComponent<AddressModalProps>;
5
+ //# sourceMappingURL=AddressModal.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './AddressModal';
2
+ export { AddressModal as default } from './AddressModal';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { FunctionComponent } from 'preact';
2
+ import { AddressesWrapperProps } from '../../types';
3
+
4
+ export declare const AddressesWrapper: FunctionComponent<AddressesWrapperProps>;
5
+ //# sourceMappingURL=AddressesWrapper.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './AddressesWrapper';
2
+ export { AddressesWrapper as default } from './AddressesWrapper';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { FunctionComponent } from 'preact';
2
+ import { ChangePasswordProps } from '../../types';
3
+
4
+ export declare const ChangePassword: FunctionComponent<ChangePasswordProps>;
5
+ //# sourceMappingURL=ChangePassword.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './ChangePassword';
2
+ export { ChangePassword as default } from './ChangePassword';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { FunctionComponent } from 'preact';
2
+ import { CustomerInformationCardProps } from '../../types';
3
+
4
+ export declare const CustomerInformationCard: FunctionComponent<CustomerInformationCardProps>;
5
+ //# sourceMappingURL=CustomerInformationCard.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './CustomerInformationCard';
2
+ export { CustomerInformationCard as default } from './CustomerInformationCard';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { FunctionComponent } from 'preact';
2
+ import { EditCustomerInformationProps } from '../../types';
3
+
4
+ export declare const EditCustomerInformation: FunctionComponent<EditCustomerInformationProps>;
5
+ //# sourceMappingURL=EditCustomerInformation.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './EditCustomerInformation';
2
+ export { EditCustomerInformation as default } from './EditCustomerInformation';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { FunctionComponent } from 'preact';
2
+ import { EmptyListProps } from '../../types';
3
+
4
+ export declare const EmptyList: FunctionComponent<EmptyListProps>;
5
+ //# sourceMappingURL=EmptyList.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './EmptyList';
2
+ export { EmptyList as default } from './EmptyList';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { FormProps, FormRef } from '../../types';
2
+
3
+ export declare const Form: import('preact').FunctionComponent<import('preact/compat').PropsWithoutRef<FormProps> & {
4
+ ref?: import('preact').Ref<FormRef> | undefined;
5
+ }>;
6
+ //# sourceMappingURL=Form.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { FunctionComponent } from 'preact';
2
+ import { FormInputsProps } from '../../../types';
3
+
4
+ export declare const FormInputs: FunctionComponent<FormInputsProps>;
5
+ //# sourceMappingURL=FormInputs.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './FormInputs';
2
+ export { FormInputs as default } from './FormInputs';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './Form';
2
+ export { Form as default } from './Form';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { FunctionComponent } from 'preact';
2
+ import { OrdersListActionProps } from '../../types';
3
+
4
+ export declare const OrdersListAction: FunctionComponent<OrdersListActionProps>;
5
+ //# sourceMappingURL=OrdersListAction.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './OrdersListAction';
2
+ export { OrdersListAction as default } from './OrdersListAction';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { FunctionComponent } from 'preact';
2
+ import { OrdersListCardProps } from '../../types';
3
+
4
+ export declare const OrdersListCard: FunctionComponent<OrdersListCardProps>;
5
+ //# sourceMappingURL=OrdersListCard.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './OrdersListCard';
2
+ export { OrdersListCard as default } from './OrdersListCard';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { Container } from '@dropins/tools/types/elsie/src/lib';
2
+ import { OrdersListWrapperProps } from '../../types';
3
+
4
+ export declare const OrdersListWrapper: Container<OrdersListWrapperProps>;
5
+ //# sourceMappingURL=OrdersListWrapper.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './OrdersListWrapper';
2
+ export { OrdersListWrapper as default } from './OrdersListWrapper';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,16 @@
1
+ export * from '../containers/AddressForm';
2
+ export * from './Form';
3
+ export * from './Form/FormInputs';
4
+ export * from './AddressCard';
5
+ export * from './AddressActions';
6
+ export * from './AddressModal';
7
+ export * from './EmptyList';
8
+ export * from './OrdersListAction';
9
+ export * from './OrdersListCard';
10
+ export * from './AccountLoaders';
11
+ export * from './AddressesWrapper';
12
+ export * from './AddressFormWrapper';
13
+ export * from './ChangePassword';
14
+ export * from './EditCustomerInformation';
15
+ export * from './CustomerInformationCard';
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,39 @@
1
+ import { FieldEnumList } from '../data/models';
2
+
3
+ export declare const defaultShippingCheckBox: {
4
+ label: string;
5
+ name: string;
6
+ id: string;
7
+ code: string;
8
+ customUpperCode: string;
9
+ entityType: string;
10
+ isUnique: boolean;
11
+ options: never[];
12
+ multilineCount: number;
13
+ validateRules: never[];
14
+ defaultValue: boolean;
15
+ fieldType: FieldEnumList;
16
+ className: string;
17
+ required: boolean;
18
+ orderNumber: number;
19
+ isHidden: boolean;
20
+ };
21
+ export declare const defaultBillingCheckBox: {
22
+ label: string;
23
+ name: string;
24
+ id: string;
25
+ code: string;
26
+ customUpperCode: string;
27
+ entityType: string;
28
+ isUnique: boolean;
29
+ options: never[];
30
+ multilineCount: number;
31
+ validateRules: never[];
32
+ defaultValue: boolean;
33
+ fieldType: FieldEnumList;
34
+ className: string;
35
+ required: boolean;
36
+ orderNumber: number;
37
+ isHidden: boolean;
38
+ };
39
+ //# sourceMappingURL=addressField.config.d.ts.map
@@ -0,0 +1,3 @@
1
+ export declare const defaultAttributePreset: string[];
2
+ export declare const defaultAccountAttributePreset: string[];
3
+ //# sourceMappingURL=defaultAttributePreset.config.d.ts.map
@@ -0,0 +1,153 @@
1
+ export declare const mockResponseInputFieldsList: ({
2
+ default_value: null;
3
+ entity_type: string;
4
+ frontend_class: null;
5
+ frontend_input: string;
6
+ required: boolean;
7
+ is_unique: boolean;
8
+ label: string;
9
+ options: never[];
10
+ multiline_count: number;
11
+ sort_order: number;
12
+ validate_rules: never[];
13
+ name: string;
14
+ id: string;
15
+ code: string;
16
+ isHidden?: undefined;
17
+ } | {
18
+ default_value: boolean;
19
+ entity_type: string;
20
+ is_unique: boolean;
21
+ options: never[];
22
+ multiline_count: number;
23
+ validate_rules: never[];
24
+ frontend_input: string;
25
+ frontend_class: string;
26
+ required: boolean;
27
+ sort_order: number;
28
+ isHidden: boolean;
29
+ label: string;
30
+ name: string;
31
+ id: string;
32
+ code: string;
33
+ })[];
34
+ export declare const mockInputFieldsList: ({
35
+ defaultValue: null;
36
+ entityType: string;
37
+ className: null;
38
+ fieldType: string;
39
+ required: boolean;
40
+ isUnique: boolean;
41
+ label: string;
42
+ options: never[];
43
+ multilineCount: number;
44
+ orderNumber: number;
45
+ validateRules: never[];
46
+ name: string;
47
+ id: string;
48
+ code: string;
49
+ customUpperCode: string;
50
+ isHidden?: undefined;
51
+ } | {
52
+ entityType: string;
53
+ isUnique: boolean;
54
+ options: never[];
55
+ multilineCount: number;
56
+ validateRules: never[];
57
+ defaultValue: boolean;
58
+ fieldType: string;
59
+ className: string;
60
+ required: boolean;
61
+ orderNumber: number;
62
+ isHidden: boolean;
63
+ label: string;
64
+ name: string;
65
+ id: string;
66
+ code: string;
67
+ customUpperCode: string;
68
+ })[];
69
+ export declare const mockKeysSortOrder: ({
70
+ name: string;
71
+ orderNumber: number;
72
+ label: null;
73
+ } | {
74
+ name: string;
75
+ orderNumber: number;
76
+ label: string;
77
+ })[];
78
+ export declare const mockDefaultAddress: {
79
+ firstname: string;
80
+ lastname: string;
81
+ city: string;
82
+ company: string;
83
+ countryCode: string;
84
+ region: {
85
+ region: string;
86
+ regionCode: string;
87
+ regionId: number;
88
+ };
89
+ telephone: string;
90
+ id: string;
91
+ vatId: string;
92
+ postcode: string;
93
+ street: string;
94
+ streetMultiline_2: string;
95
+ defaultShipping: boolean;
96
+ defaultBilling: boolean;
97
+ fax: string;
98
+ middlename: string;
99
+ prefix: string;
100
+ suffix: string;
101
+ };
102
+ export declare const mockResponseAddressWithText: {
103
+ firstname: string;
104
+ lastname: string;
105
+ city: string;
106
+ company: string;
107
+ country_code: string;
108
+ region: {
109
+ region: string;
110
+ region_code: string;
111
+ region_id: number;
112
+ };
113
+ telephone: string;
114
+ id: string;
115
+ vat_id: string;
116
+ postcode: string;
117
+ street: string[];
118
+ default_shipping: boolean;
119
+ default_billing: boolean;
120
+ custom_attributesV2: never[];
121
+ fax: string;
122
+ middlename: string;
123
+ prefix: string;
124
+ suffix: string;
125
+ };
126
+ export declare const mockResponseCountries: {
127
+ two_letter_abbreviation: string;
128
+ full_name_locale: string;
129
+ }[];
130
+ export declare const mockResponseCountriesEmpty: {
131
+ two_letter_abbreviation: null;
132
+ full_name_locale: null;
133
+ }[];
134
+ export declare const mockDefaultCountries: {
135
+ value: string;
136
+ text: string;
137
+ }[];
138
+ export declare const mockResponseRegions: {
139
+ id: number;
140
+ code: string;
141
+ name: string;
142
+ }[];
143
+ export declare const mockResponseRegionsEmpty: {
144
+ id: null;
145
+ code: null;
146
+ name: null;
147
+ }[];
148
+ export declare const mockDefaultRegions: {
149
+ id: number;
150
+ value: string;
151
+ text: string;
152
+ }[];
153
+ //# sourceMappingURL=mockDefaultAddress.config.d.ts.map