@dropins/storefront-account 0.1.0-alpha4 → 0.1.0-alpha6

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 (131) 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/getAttributesForm/getAttributesForm.d.ts +4 -0
  5. package/api/getAttributesForm/graphql/getAttributesForm.graphql.d.ts +3 -0
  6. package/api/getAttributesForm/index.d.ts +2 -0
  7. package/api/getCountries/getCountries.d.ts +5 -0
  8. package/api/getCountries/graphql/getCountries.graphql.d.ts +2 -0
  9. package/api/getCountries/index.d.ts +2 -0
  10. package/api/getCustomer/getCustomer.d.ts +4 -0
  11. package/api/getCustomer/graphql/getCustomer.graphql.d.ts +2 -0
  12. package/api/getCustomer/index.d.ts +2 -0
  13. package/api/getCustomerAddress/getCustomerAddress.d.ts +4 -0
  14. package/api/getCustomerAddress/graphql/getCustomerAddress.graphql.d.ts +2 -0
  15. package/api/getCustomerAddress/index.d.ts +2 -0
  16. package/api/getOrderHistoryList/getOrderHistoryList.d.ts +4 -0
  17. package/api/getOrderHistoryList/graphql/getOrderHistoryList.graphql.d.ts +2 -0
  18. package/api/getOrderHistoryList/index.d.ts +2 -0
  19. package/api/getRegions/getRegions.d.ts +2 -0
  20. package/api/getRegions/graphql/getRegions.graphql.d.ts +2 -0
  21. package/api/getRegions/index.d.ts +2 -0
  22. package/api/index.d.ts +9 -0
  23. package/api/initialize/initialize.d.ts +4 -0
  24. package/api/removeCustomerAddress/graphql/removeCustomerAddress.graphql.d.ts +2 -0
  25. package/api/removeCustomerAddress/index.d.ts +2 -0
  26. package/api/removeCustomerAddress/removeCustomerAddress.d.ts +2 -0
  27. package/api/updateCustomerAddress/graphql/updateCustomerAddress.graphql.d.ts +2 -0
  28. package/api/updateCustomerAddress/index.d.ts +2 -0
  29. package/api/updateCustomerAddress/updateCustomerAddress.d.ts +8 -0
  30. package/api.js +9 -1
  31. package/chunks/AddressFormWrapper.js +1 -0
  32. package/chunks/AddressFormWrapper2.js +1 -0
  33. package/chunks/checkIsFunction.js +1 -0
  34. package/chunks/convertCase.js +1 -0
  35. package/chunks/getOrderHistoryList.js +90 -0
  36. package/chunks/removeCustomerAddress.js +35 -0
  37. package/chunks/transform-customer-address.js +1 -0
  38. package/chunks/updateCustomerAddress.js +78 -0
  39. package/components/AccountLoaders/AccountLoaders.d.ts +7 -0
  40. package/components/AccountLoaders/index.d.ts +3 -0
  41. package/components/AddressActions/AddressActions.d.ts +5 -0
  42. package/components/AddressActions/index.d.ts +3 -0
  43. package/components/AddressCard/AddressCard.d.ts +5 -0
  44. package/components/AddressCard/index.d.ts +3 -0
  45. package/components/AddressFormWrapper/AddressFormWrapper.d.ts +5 -0
  46. package/components/AddressFormWrapper/index.d.ts +3 -0
  47. package/components/AddressModal/AddressModal.d.ts +5 -0
  48. package/components/AddressModal/index.d.ts +3 -0
  49. package/components/AddressesWrapper/AddressesWrapper.d.ts +5 -0
  50. package/components/AddressesWrapper/index.d.ts +3 -0
  51. package/components/EmptyList/EmptyList.d.ts +5 -0
  52. package/components/EmptyList/index.d.ts +3 -0
  53. package/components/Form/Form.d.ts +5 -0
  54. package/components/Form/FormInputs/FormInputs.d.ts +5 -0
  55. package/components/Form/FormInputs/index.d.ts +3 -0
  56. package/components/Form/index.d.ts +3 -0
  57. package/components/OrdersListAction/OrdersListAction.d.ts +5 -0
  58. package/components/OrdersListAction/index.d.ts +3 -0
  59. package/components/OrdersListCard/OrdersListCard.d.ts +5 -0
  60. package/components/OrdersListCard/index.d.ts +3 -0
  61. package/components/OrdersListWrapper/OrdersListWrapper.d.ts +5 -0
  62. package/components/OrdersListWrapper/index.d.ts +3 -0
  63. package/components/index.d.ts +13 -0
  64. package/configs/addressField.config.d.ts +39 -0
  65. package/configs/defaultAttributePreset.config.d.ts +2 -0
  66. package/configs/mockDefaultAddress.config.d.ts +184 -0
  67. package/configs/mockOrdersList.config.d.ts +96 -0
  68. package/containers/AddressForm/AddressForm.d.ts +5 -0
  69. package/containers/AddressForm/index.d.ts +3 -0
  70. package/containers/AddressForm.d.ts +3 -0
  71. package/containers/AddressForm.js +1 -0
  72. package/containers/Addresses/Addresses.d.ts +5 -0
  73. package/containers/Addresses/index.d.ts +3 -0
  74. package/containers/Addresses.d.ts +3 -0
  75. package/containers/Addresses.js +1 -0
  76. package/containers/OrdersList/OrdersList.d.ts +5 -0
  77. package/containers/OrdersList/index.d.ts +3 -0
  78. package/containers/OrdersList.d.ts +3 -0
  79. package/containers/OrdersList.js +1 -0
  80. package/containers/index.d.ts +4 -0
  81. package/data/models/attributes-form.d.ts +45 -0
  82. package/data/models/country.d.ts +5 -0
  83. package/data/models/customer-address.d.ts +21 -0
  84. package/data/models/customer.d.ts +6 -0
  85. package/data/models/index.d.ts +5 -1
  86. package/data/models/order-history-list.d.ts +63 -0
  87. package/data/models/region.d.ts +10 -0
  88. package/data/transforms/index.d.ts +6 -1
  89. package/data/transforms/transform-attributes-form.d.ts +6 -0
  90. package/data/transforms/transform-countries.d.ts +6 -0
  91. package/data/transforms/transform-customer-address.d.ts +8 -0
  92. package/data/transforms/transform-customer.d.ts +5 -0
  93. package/data/transforms/transform-order-history-list.d.ts +5 -0
  94. package/data/transforms/transform-regions.d.ts +6 -0
  95. package/hooks/api/useCountryRegionOptions.d.ts +7 -0
  96. package/hooks/components/useForm.d.ts +12 -0
  97. package/hooks/containers/useAddressForm.d.ts +20 -0
  98. package/hooks/containers/useAddresses.d.ts +22 -0
  99. package/hooks/containers/useOrdersList.d.ts +11 -0
  100. package/hooks/useDebounce.d.ts +3 -0
  101. package/i18n/en_US.json.d.ts +85 -1
  102. package/lib/checkIsFunction.d.ts +2 -0
  103. package/lib/convertCase.d.ts +4 -0
  104. package/lib/convertToBoolean.d.ts +2 -0
  105. package/lib/convertToInputDateFormat.d.ts +2 -0
  106. package/lib/fetch-error.d.ts +5 -0
  107. package/lib/formatDateToLocale.d.ts +31 -0
  108. package/lib/getFieldsConfig.d.ts +24 -0
  109. package/lib/getFormValues.d.ts +2 -0
  110. package/lib/manageAddressDeletion.d.ts +9 -0
  111. package/lib/network-error.d.ts +6 -0
  112. package/lib/normalizeAttributes.d.ts +2 -0
  113. package/lib/serializeAddressForm.d.ts +4 -0
  114. package/package.json +1 -1
  115. package/render.js +3 -1
  116. package/types/addressForm.types.d.ts +41 -0
  117. package/types/addresses.types.d.ts +56 -0
  118. package/types/api/createCustomerAddress.types.d.ts +47 -0
  119. package/types/api/getAttributesForm.types.d.ts +31 -0
  120. package/types/api/getCountries.types.d.ts +15 -0
  121. package/types/api/getCustomer.types.d.ts +13 -0
  122. package/types/api/getCustomerAddress.type.d.ts +36 -0
  123. package/types/api/getOrderHistoryList.types.d.ts +73 -0
  124. package/types/api/getRegions.types.d.ts +16 -0
  125. package/types/api/removeCustomerAddress.types.d.ts +9 -0
  126. package/types/api/updateCustomerAddress.types.d.ts +11 -0
  127. package/types/emptyList.types.d.ts +8 -0
  128. package/types/form.types.d.ts +40 -0
  129. package/types/index.d.ts +16 -0
  130. package/types/ordersList.types.d.ts +49 -0
  131. package/types/translations.types.d.ts +9 -0
@@ -0,0 +1,3 @@
1
+ export * from './OrdersListWrapper';
2
+ export { OrdersListWrapper as default } from './OrdersListWrapper';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,13 @@
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
+ //# 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,2 @@
1
+ export declare const defaultAttributePreset: string[];
2
+ //# sourceMappingURL=defaultAttributePreset.config.d.ts.map
@@ -0,0 +1,184 @@
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
+ street_2: string;
95
+ defaultShipping: boolean;
96
+ defaultBilling: boolean;
97
+ };
98
+ export declare const mockResponseAddressWithText: {
99
+ firstname: string;
100
+ lastname: string;
101
+ city: string;
102
+ company: string;
103
+ country_code: string;
104
+ region: {
105
+ region: string;
106
+ region_code: string;
107
+ region_id: number;
108
+ };
109
+ telephone: string;
110
+ id: string;
111
+ vat_id: string;
112
+ postcode: string;
113
+ street: string[];
114
+ default_shipping: boolean;
115
+ default_billing: boolean;
116
+ custom_attributesV2: never[];
117
+ };
118
+ export declare const mockResponseAddressEmpty: {
119
+ firstname: string;
120
+ lastname: string;
121
+ city: string;
122
+ company: string;
123
+ country_code: string;
124
+ region: {
125
+ region: string;
126
+ region_code: string;
127
+ region_id: string;
128
+ };
129
+ telephone: string;
130
+ id: string;
131
+ vat_id: string;
132
+ postcode: string;
133
+ street: string[];
134
+ default_shipping: boolean;
135
+ default_billing: boolean;
136
+ custom_attributesV2: never[];
137
+ };
138
+ export declare const mockDefaultAddressEmpty: {
139
+ firstname: string;
140
+ lastname: string;
141
+ city: string;
142
+ company: string;
143
+ countryCode: string;
144
+ region: {
145
+ region: string;
146
+ regionCode: string;
147
+ regionId: string;
148
+ };
149
+ telephone: string;
150
+ id: string;
151
+ vatId: string;
152
+ postcode: string;
153
+ street: string;
154
+ defaultShipping: boolean;
155
+ defaultBilling: boolean;
156
+ };
157
+ export declare const mockResponseCountries: {
158
+ two_letter_abbreviation: string;
159
+ full_name_locale: string;
160
+ }[];
161
+ export declare const mockResponseCountriesEmpty: {
162
+ two_letter_abbreviation: null;
163
+ full_name_locale: null;
164
+ }[];
165
+ export declare const mockDefaultCountries: {
166
+ value: string;
167
+ text: string;
168
+ }[];
169
+ export declare const mockResponseRegions: {
170
+ id: number;
171
+ code: string;
172
+ name: string;
173
+ }[];
174
+ export declare const mockResponseRegionsEmpty: {
175
+ id: null;
176
+ code: null;
177
+ name: null;
178
+ }[];
179
+ export declare const mockDefaultRegions: {
180
+ id: number;
181
+ value: string;
182
+ text: string;
183
+ }[];
184
+ //# sourceMappingURL=mockDefaultAddress.config.d.ts.map
@@ -0,0 +1,96 @@
1
+ export declare const mockOrdersListResponse: {
2
+ customer: {
3
+ orders: {
4
+ page_info: {
5
+ page_size: number;
6
+ total_pages: number;
7
+ current_page: number;
8
+ };
9
+ total_count: number;
10
+ items: {
11
+ token: string;
12
+ email: string;
13
+ shipping_method: string;
14
+ shipping_address: {
15
+ firstname: string;
16
+ lastname: string;
17
+ city: string;
18
+ company: string;
19
+ country_code: string;
20
+ region: {
21
+ region: string;
22
+ region_code: string;
23
+ region_id: string;
24
+ };
25
+ telephone: string;
26
+ id: string;
27
+ vat_id: string;
28
+ postcode: string;
29
+ street: string[];
30
+ default_shipping: boolean;
31
+ default_billing: boolean;
32
+ custom_attributesV2: never[];
33
+ };
34
+ billing_address: {
35
+ firstname: string;
36
+ lastname: string;
37
+ city: string;
38
+ company: string;
39
+ country_code: string;
40
+ region: {
41
+ region: string;
42
+ region_code: string;
43
+ region_id: string;
44
+ };
45
+ telephone: string;
46
+ id: string;
47
+ vat_id: string;
48
+ postcode: string;
49
+ street: string[];
50
+ default_shipping: boolean;
51
+ default_billing: boolean;
52
+ custom_attributesV2: never[];
53
+ };
54
+ payment_methods: {
55
+ name: string;
56
+ }[];
57
+ number: string;
58
+ id: string;
59
+ order_date: string;
60
+ carrier: string;
61
+ status: string;
62
+ items: {
63
+ status: string;
64
+ product_name: string;
65
+ id: string;
66
+ product: {
67
+ small_image: {
68
+ url: string;
69
+ };
70
+ };
71
+ }[];
72
+ total: {
73
+ grand_total: {
74
+ value: number;
75
+ currency: string;
76
+ };
77
+ subtotal: {
78
+ currency: string;
79
+ value: number;
80
+ };
81
+ taxes: never[];
82
+ total_tax: {
83
+ currency: string;
84
+ value: number;
85
+ };
86
+ total_shipping: {
87
+ currency: string;
88
+ value: number;
89
+ };
90
+ discounts: never[];
91
+ };
92
+ }[];
93
+ };
94
+ };
95
+ };
96
+ //# sourceMappingURL=mockOrdersList.config.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { Container } from '@dropins/tools/types/elsie/src/lib';
2
+ import { AddressFormProps } from '../../types';
3
+
4
+ export declare const AddressForm: Container<AddressFormProps>;
5
+ //# sourceMappingURL=AddressForm.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './AddressForm';
2
+ export { AddressForm as default } from './AddressForm';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './AddressForm/index'
2
+ import _default from './AddressForm/index'
3
+ export default _default
@@ -0,0 +1 @@
1
+ import{A as x,A as F}from"../chunks/AddressFormWrapper.js";import"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/lib.js";import"../chunks/AddressFormWrapper2.js";import"@dropins/tools/preact-hooks.js";import"@dropins/tools/i18n.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/components.js";import"@dropins/tools/preact.js";import"@dropins/tools/event-bus.js";import"../chunks/updateCustomerAddress.js";import"../chunks/convertCase.js";import"@dropins/tools/fetch-graphql.js";export{x as AddressForm,F as default};
@@ -0,0 +1,5 @@
1
+ import { Container } from '@dropins/tools/types/elsie/src/lib';
2
+ import { AddressesProps } from '../../types';
3
+
4
+ export declare const Addresses: Container<AddressesProps>;
5
+ //# sourceMappingURL=Addresses.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './Addresses';
2
+ export { Addresses as default } from './Addresses';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './Addresses/index'
2
+ import _default from './Addresses/index'
3
+ export default _default
@@ -0,0 +1 @@
1
+ import{jsx as i,jsxs as C,Fragment as X}from"@dropins/tools/preact-jsx-runtime.js";import{classes as M}from"@dropins/tools/lib.js";import{C as K}from"../chunks/AddressFormWrapper2.js";import*as z from"@dropins/tools/preact-compat.js";import{useCallback as I,useMemo as Y}from"@dropins/tools/preact-compat.js";import{Card as j,Button as x,Tag as W,Icon as Z,Modal as D,ProgressSpinner as ee,Header as ie}from"@dropins/tools/components.js";import{useState as v,useCallback as h,useEffect as se}from"@dropins/tools/preact-hooks.js";import{Fragment as te}from"@dropins/tools/preact.js";import{u as q,g as re}from"../chunks/updateCustomerAddress.js";import"@dropins/tools/event-bus.js";import{e as de}from"../chunks/convertCase.js";import{g as ne,r as oe}from"../chunks/removeCustomerAddress.js";import{S as le,c as ae,E as ce}from"../chunks/checkIsFunction.js";import{A as H}from"../chunks/AddressFormWrapper.js";import{useText as S}from"@dropins/tools/i18n.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/transform-customer-address.js";const G=({minifiedView:t,keysSortOrder:n,addressData:e,loading:l,setAddressId:s,handleRenderModal:c,handleRenderForm:d})=>{const r={minifiedView:{},fullSizeView:{}};r.minifiedView=S({actionRemove:"Account.Addresses.minifiedView.addressCard.actionRemove",actionEdit:"Account.Addresses.minifiedView.addressCard.actionEdit",cardLabelShipping:"Account.Addresses.minifiedView.addressCard.cardLabelShipping",cardLabelBilling:"Account.Addresses.minifiedView.addressCard.cardLabelBilling"}),r.fullSizeView=S({actionRemove:"Account.Addresses.fullSizeView.addressCard.actionRemove",actionEdit:"Account.Addresses.fullSizeView.addressCard.actionEdit",cardLabelShipping:"Account.Addresses.fullSizeView.addressCard.cardLabelShipping",cardLabelBilling:"Account.Addresses.fullSizeView.addressCard.cardLabelBilling"});const p=I(()=>{s==null||s(e==null?void 0:e.id),c==null||c()},[c,e==null?void 0:e.id,s]),g=I(()=>{s==null||s(e==null?void 0:e.id),d==null||d()},[d,e==null?void 0:e.id,s]),w=Y(()=>{if(!n)return[];const{region:o,...u}=e,a={...u,...o};return n.filter(({name:m})=>a[m]).map(m=>({name:m.name,orderNumber:m.orderNumber,value:a[m.name],label:m.label}))},[e,n]);return i(j,{variant:"secondary",className:"dropin-address-card","data-testid":"addressCard",children:l?i(K,{}):C(X,{children:[C("div",{className:"dropin-address-card__action",children:[c?i(x,{variant:"tertiary",onClick:p,"data-testid":"removeButton",children:t?r.minifiedView.actionRemove:r.fullSizeView.actionRemove}):null,d?i(x,{variant:"tertiary",onClick:g,className:"dropin-address-card__action--editbutton","data-testid":"editButton",children:t?r.minifiedView.actionEdit:r.fullSizeView.actionEdit}):null]}),i("div",{className:"dropin-address-card__description",children:w.map((o,u)=>{const a=o.label?`${o.label}: ${o==null?void 0:o.value}`:o==null?void 0:o.value;return i("p",{"data-testid":`${o.name}_${u}`,children:a},u)})}),e!=null&&e.defaultShipping||e!=null&&e.defaultBilling?C("div",{className:"dropin-address-card__labels",children:[e!=null&&e.defaultShipping?i(W,{label:t?r.minifiedView.cardLabelShipping.toLocaleUpperCase():r.fullSizeView.cardLabelShipping.toLocaleUpperCase()}):null,e!=null&&e.defaultBilling?i(W,{label:t?r.minifiedView.cardLabelBilling.toLocaleUpperCase():r.fullSizeView.cardLabelBilling.toLocaleUpperCase()}):null]}):null]})})},ue=t=>z.createElement("svg",{id:"Icon_Add_Base","data-name":"Icon \\u2013 Add \\u2013 Base",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...t},z.createElement("g",{id:"Large"},z.createElement("rect",{id:"Placement_area","data-name":"Placement area",width:24,height:24,fill:"#fff",opacity:0}),z.createElement("g",{id:"Add_icon","data-name":"Add icon",transform:"translate(9.734 9.737)"},z.createElement("line",{vectorEffect:"non-scaling-stroke",id:"Line_579","data-name":"Line 579",y2:12.7,transform:"translate(2.216 -4.087)",fill:"none",stroke:"currentColor"}),z.createElement("line",{vectorEffect:"non-scaling-stroke",id:"Line_580","data-name":"Line 580",x2:12.7,transform:"translate(-4.079 2.263)",fill:"none",stroke:"currentColor"})))),me=({className:t,addNewAddress:n,minifiedView:e,routeAddressesPage:l})=>{const s={minifiedView:{},fullSizeView:{}};return s.minifiedView=S({viewAllAddressesButton:"Account.Addresses.minifiedView.viewAllAddressesButton"}),s.fullSizeView=S({addNewAddressButton:"Account.Addresses.fullSizeView.addNewAddressButton"}),C("button",{className:M(["dropin-actions-address",["dropin-actions-address--viewall",e],["dropin-actions-address--address",!e],t]),"data-testid":"showRouteFullAddress",onClick:l,children:[i("span",{className:"dropin-actions-address--title","data-testid":"addressActionsText",children:e&&!n?s.minifiedView.viewAllAddressesButton:s.fullSizeView.addNewAddressButton}),i(Z,{source:e&&!n?le:ue,size:"32"})]})},fe=({minifiedView:t,keysSortOrder:n,addressData:e,open:l,submitLoading:s,onRemoveAddress:c,closeModal:d})=>{const r={minifiedView:{},fullSizeView:{}};return r.minifiedView=S({title:"Account.Addresses.minifiedView.removeAddressModal.title",description:"Account.Addresses.minifiedView.removeAddressModal.description",actionCancel:"Account.Addresses.minifiedView.removeAddressModal.actionCancel",actionConfirm:"Account.Addresses.minifiedView.removeAddressModal.actionConfirm"}),r.fullSizeView=S({title:"Account.Addresses.fullSizeView.removeAddressModal.title",description:"Account.Addresses.fullSizeView.removeAddressModal.description",actionCancel:"Account.Addresses.fullSizeView.removeAddressModal.actionCancel",actionConfirm:"Account.Addresses.fullSizeView.removeAddressModal.actionConfirm"}),l?C(D,{title:i("h3",{children:t?r.minifiedView.title:r.fullSizeView.title}),className:"dropin-address-modal",size:"full","data-testid":"addressModal",showCloseButton:!0,onClose:d,children:[s?i("div",{className:"dropin-address-modal__spinner","data-testid":"progressSpinner",children:i(ee,{stroke:"4",size:"large"})}):null,i("p",{children:t?r.minifiedView.description:r.fullSizeView.description}),i(G,{minifiedView:t,addressData:e,keysSortOrder:n}),C("div",{className:"dropin-address-modal__wrapper--buttons",children:[i(x,{type:"button",onClick:d,variant:"secondary",disabled:s,children:t?r.minifiedView.actionCancel:r.fullSizeView.actionCancel}),i(x,{disabled:s,onClick:c,children:t?r.minifiedView.actionConfirm:r.fullSizeView.actionConfirm})]})]}):null},pe=async(t,n)=>{if(n.length===1){const d=n[0],p=Object.values(d.region).every(w=>!!w)?{}:{region:{...d.region,regionId:0}};return!!await q({addressId:Number(d==null?void 0:d.id),defaultShipping:!1,defaultBilling:!1,...p})}const e=n.filter(d=>d.id!==t&&(d.defaultBilling||d.defaultShipping)||d.id!==t),l=n[n.length-1],s=e[0]||((l==null?void 0:l.id)!==t?l:null);return!s||!s.id?!1:!!await q({addressId:+s.id,defaultShipping:!0,defaultBilling:!0})},Ae=["firstname","lastname","city","company","country_code","region","region_code","region_id","telephone","id","vat_id","postcode","street","street_2","default_shipping","default_billing"],we=({minifiedView:t,routeAddressesPage:n,onSuccess:e})=>{const[l,s]=v(!1),[c,d]=v(!1),[r,p]=v(!1),[g,w]=v(!1),[o,u]=v(!1),[a,m]=v(""),[_,N]=v([]),[T,E]=v([]),A=h(async()=>{p(!0),Promise.all([re("shortRequest"),ne()]).then(b=>{const[k,f]=b;if(k){const U=k.map(({name:y,orderNumber:J,label:Q})=>({name:de(y),orderNumber:J,label:Ae.includes(y)?null:Q}));E(U)}if(f)if(t){const U=f.filter(y=>!!y.defaultShipping||!!y.defaultBilling);N(U)}else N(f)}).finally(()=>{p(!1)})},[t]);se(()=>{A()},[A]);const V=h(b=>{m(b),u(!1)},[]),B=h(()=>{d(!0)},[]),L=h(()=>{m(""),d(!1),s(!1)},[]),O=h(()=>{s(!0)},[]),$=h(async()=>{w(!0),await pe(a,_),oe(+a).then(()=>{A(),L()}).finally(()=>{w(!1)})},[_,a,L,A]),F=h(()=>{u(!1)},[]),R=h(()=>{ae(n)&&t&&!o?window.location.href=n():(u(!0),m(""))},[o,n,t]),P=h(async()=>{await A(),await(e==null?void 0:e())},[A,e]);return{keysSortOrder:T,submitLoading:g,isModalRendered:l,isFormRendered:c,loading:r,addNewAddress:o,addressesList:_,addressId:a,handleRenderForm:B,handleRenderModal:O,removeAddress:$,onCloseBtnClick:L,setEditingAddressId:V,closeNewAddressForm:F,redirectToAddressesRoute:R,handleOnSuccess:P}},ge=({className:t,withHeader:n=!0,minifiedView:e=!1,withActionsInMinifiedView:l=!1,withActionsInFullSizeView:s=!0,inputsDefaultValueSet:c,showShippingCheckBox:d=!0,showBillingCheckBox:r=!0,shippingCheckBoxValue:p=!0,billingCheckBoxValue:g=!0,routeAddressesPage:w,onSuccess:o,onError:u})=>{const a={minifiedView:{},fullSizeView:{}};a.minifiedView=S({containerTitle:"Account.Addresses.minifiedView.containerTitle",editAddressFormTitle:"Account.Addresses.minifiedView.editAddressFormTitle",viewAllAddressesButton:"Account.Addresses.minifiedView.viewAllAddressesButton"}),a.fullSizeView=S({containerTitle:"Account.Addresses.fullSizeView.containerTitle",editAddressFormTitle:"Account.Addresses.fullSizeView.editAddressFormTitle",newAddressFormTitle:"Account.Addresses.fullSizeView.newAddressFormTitle",viewAllAddressesButton:"Account.Addresses.fullSizeView.viewAllAddressesButton"});const{keysSortOrder:m,submitLoading:_,isModalRendered:N,isFormRendered:T,loading:E,addNewAddress:A,addressesList:V,addressId:B,handleRenderForm:L,handleRenderModal:O,removeAddress:$,onCloseBtnClick:F,handleOnSuccess:R,setEditingAddressId:P,closeNewAddressForm:b,redirectToAddressesRoute:k}=we({minifiedView:e,routeAddressesPage:w,onSuccess:o});return C("div",{children:[i("div",{children:n?i(ie,{title:e?a.minifiedView.containerTitle:a.fullSizeView.containerTitle,divider:!e,className:e?"dropin-addresses-header":""}):null}),C("div",{className:M(["dropin-addresses-wrapper",t]),"data-testid":"addressesIdWrapper",children:[i(fe,{minifiedView:e,addressData:V.find(f=>f.id===B),keysSortOrder:m,submitLoading:_,open:N,closeModal:F,onRemoveAddress:$}),E?i(K,{testId:"addressSkeletonLoader",withCard:!1}):i(ce,{isEmpty:!V.length,typeList:"address",minifiedView:e}),V.map(f=>i(te,{children:B===f.id&&T?i(j,{variant:"secondary",style:{marginBottom:20},children:i(H,{isOpen:B===f.id&&T,addressFormId:B,inputsDefaultValueSet:f,addressesFormTitle:e?a.minifiedView.editAddressFormTitle:a.fullSizeView.editAddressFormTitle,showShippingCheckBox:d,showBillingCheckBox:r,shippingCheckBoxValue:p,billingCheckBoxValue:g,onCloseBtnClick:F,onSuccess:R,onError:u})}):i(G,{minifiedView:e,addressData:f,keysSortOrder:m,loading:E,setAddressId:P,handleRenderModal:e&&l||!e&&s?O:void 0,handleRenderForm:e&&l||!e&&s?L:void 0},f.id)},f.id)),i("div",{className:"dropin-addresses__footer",children:A?i("div",{className:M(["dropin-addresses-form__footer__wrapper",["dropin-addresses-form__footer__wrapper-show",A]]),children:i(j,{variant:"secondary",children:i(H,{isOpen:A,addressesFormTitle:a.fullSizeView.newAddressFormTitle,inputsDefaultValueSet:c,showShippingCheckBox:!!V.length,showBillingCheckBox:!!V.length,shippingCheckBoxValue:p,billingCheckBoxValue:g,onCloseBtnClick:b,onSuccess:R,onError:u})})}):i(me,{minifiedView:e,addNewAddress:A,routeAddressesPage:k})})]})]})},ke=({className:t,withHeader:n,minifiedView:e,withActionsInMinifiedView:l,withActionsInFullSizeView:s,inputsDefaultValueSet:c,showShippingCheckBox:d,showBillingCheckBox:r,shippingCheckBoxValue:p,billingCheckBoxValue:g,routeAddressesPage:w,onSuccess:o,onError:u})=>i("div",{className:M(["dropin-addresses",t]),"data-testid":"addressesid",children:i(ge,{className:t,withHeader:n,minifiedView:e,withActionsInMinifiedView:l,withActionsInFullSizeView:s,inputsDefaultValueSet:c,billingCheckBoxValue:g,shippingCheckBoxValue:p,showBillingCheckBox:r,showShippingCheckBox:d,routeAddressesPage:w,onSuccess:o,onError:u})});export{ke as Addresses,ke as default};
@@ -0,0 +1,5 @@
1
+ import { Container } from '@dropins/tools/types/elsie/src/lib';
2
+ import { OrdersListProps } from '../../types';
3
+
4
+ export declare const OrdersList: Container<OrdersListProps>;
5
+ //# sourceMappingURL=OrdersList.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './OrdersList';
2
+ export { OrdersList as default } from './OrdersList';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './OrdersList/index'
2
+ import _default from './OrdersList/index'
3
+ export default _default
@@ -0,0 +1 @@
1
+ import{jsx as i,jsxs as p,Fragment as z}from"@dropins/tools/preact-jsx-runtime.js";import{classes as w,Slot as S}from"@dropins/tools/lib.js";import{C as k}from"../chunks/AddressFormWrapper2.js";import"@dropins/tools/preact-compat.js";import{Card as y,Icon as C,Image as T,Header as b}from"@dropins/tools/components.js";import{S as v,c as H,E as x}from"../chunks/checkIsFunction.js";import{useCallback as I,useState as A,useEffect as B}from"@dropins/tools/preact-hooks.js";import{useText as h}from"@dropins/tools/i18n.js";import"@dropins/tools/preact.js";import"@dropins/tools/event-bus.js";import{g as E}from"../chunks/getOrderHistoryList.js";import"../chunks/convertCase.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/transform-customer-address.js";const N={size:"32",stroke:"2"},V=({minifiedView:n,orderId:r,orderToken:t,onSelectId:o,routeOrdersList:e,routeOrderDetails:f})=>{const s={minifiedView:{},fullSizeView:{}};s.minifiedView=h({viewAllOrdersButton:"Account.OrdersList.minifiedView.viewAllOrdersButton"});const l=I(()=>{o&&r&&(o==null||o(r))},[o,r]);return e?i("a",{className:w(["dropin-orders-list-action",["dropin-orders-list-action--minifiedView",n]]),"data-testid":"ordersListActionButtonMinifiedView",href:e(),onClick:l,children:i(y,{"data-testid":"ordersListActionMinifiedView",variant:"secondary",children:p("div",{className:"dropin-orders-list-action__card-wrapper",children:[i("p",{children:s.minifiedView.viewAllOrdersButton}),i(C,{source:v,...N})]})})}):i("a",{href:H(f)?f(r,t):"#",onClick:l,className:"dropin-orders-list-action","data-testid":"ordersListActionButton",children:i(C,{source:v,...N})})},_=({minifiedView:n,item:r,withThumbnails:t,children:o,slots:e,...f})=>{var l,d,u,L;const s={minifiedView:{},fullSizeView:{}};return s.minifiedView=h({orderNumber:"Account.OrdersList.minifiedView.OrdersListCard.orderNumber",itemsAmount:"Account.OrdersList.minifiedView.OrdersListCard.itemsAmount"}),s.fullSizeView=h({orderNumber:"Account.OrdersList.fullSizeView.OrdersListCard.orderNumber",itemsAmount:"Account.OrdersList.fullSizeView.OrdersListCard.itemsAmount"}),p(y,{...f,className:w(["dropin-orders-list-card",["dropin-orders-list-card--full",((l=r==null?void 0:r.items)==null?void 0:l.length)>6]]),variant:"secondary",children:[i("div",{className:"dropin-orders-list-card--content",children:e!=null&&e.OrdersListCard?i(S,{"data-testid":`ordersListCard${r.id}`,name:"OrdersListCard",slot:e==null?void 0:e.OrdersListCard,context:{orderHistoryListItem:r}}):p(z,{children:[i("div",{children:r==null?void 0:r.status}),i("p",{children:r==null?void 0:r.orderDate}),p("p",{children:[n?s.minifiedView.orderNumber:s.fullSizeView.orderNumber," ",r.number]}),p("p",{children:["$",(d=r==null?void 0:r.total)==null?void 0:d.grandTotal.value]}),p("p",{children:[(u=r==null?void 0:r.items)==null?void 0:u.length," ",n?s.minifiedView.itemsAmount:s.fullSizeView.itemsAmount]})]})}),t&&((L=r==null?void 0:r.items)!=null&&L.length)?i("div",{className:"dropin-orders-list-card--images","data-testid":"ordersListCardImages",children:r.items.map((a,c)=>{var g;const m=(g=a==null?void 0:a.product)==null?void 0:g.smallImage.url,O=a==null?void 0:a.productName;return i(T,{src:m,width:65,height:65,alt:O},a.id+c)})}):null,i("div",{className:"dropin-orders-list-card--actions",children:o})]})},$=({ordersInMinifiedView:n,minifiedView:r,pageSize:t})=>{const[o,e]=A([]),[f,s]=A({}),[l,d]=A(""),[u,L]=A(!1);B(()=>{L(!0),E(r?n:t).then(c=>{!c||!c.items||(s(c.pageInfo),e(c.items))}).finally(()=>{L(!1)})},[r,n,t]);const a=I(c=>{d(c)},[]);return{loading:u,orderHistoryListItems:o,pageInfo:f,selectedId:l,handleSelectId:a}},j=({className:n,withHeader:r=!0,minifiedView:t=!1,withThumbnails:o=!0,ordersInMinifiedView:e=1,pageSize:f=10,routeOrdersList:s,routeOrderDetails:l,slots:d})=>{const u={minifiedView:{},fullSizeView:{}};u.minifiedView=h({containerTitle:"Account.OrdersList.minifiedView.containerTitle"}),u.fullSizeView=h({containerTitle:"Account.OrdersList.fullSizeView.containerTitle"});const{loading:L,orderHistoryListItems:a,handleSelectId:c}=$({minifiedView:t,pageSize:f,ordersInMinifiedView:e});return p("div",{children:[r?i(b,{title:t?u.minifiedView.containerTitle:u.fullSizeView.containerTitle,divider:!t,className:t?"dropin-orders-list-header":""}):null,p("div",{className:w(["dropin-orders-list",n]),children:[L?i(k,{testId:"orderSkeletonLoader",withCard:!1}):i(x,{isEmpty:!a.length,typeList:"orders",minifiedView:t}),a.map((m,O)=>i(_,{minifiedView:t,item:m,withThumbnails:o,slots:d,children:d!=null&&d.OrdersListAction?i(S,{"data-testid":`ordersListActionSlot_${O}`,name:"OrdersListAction",slot:d==null?void 0:d.OrdersListAction,context:{handleSelectId:c,orderHistoryListItem:m}}):i(V,{minifiedView:t,onSelectId:c,orderId:m.id,orderToken:m.token,routeOrderDetails:l})},O)),t?i(V,{minifiedView:t,onSelectId:c,routeOrdersList:s}):null]})]})},Z=({className:n,withHeader:r,minifiedView:t,withThumbnails:o,withFilter:e,ordersInMinifiedView:f,pageSize:s,routeOrdersList:l,routeOrderDetails:d,slots:u})=>i("div",{className:w(["dropin-orders-list",n]),"data-testid":"ordersListId",children:i(j,{className:n,withHeader:r,minifiedView:t,withThumbnails:o,withFilter:e,ordersInMinifiedView:f,pageSize:s,routeOrdersList:l,routeOrderDetails:d,slots:u})});export{Z as OrdersList,Z as default};
@@ -0,0 +1,4 @@
1
+ export * from './AddressForm';
2
+ export * from './Addresses';
3
+ export * from './OrdersList';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,45 @@
1
+ export declare enum FieldEnumList {
2
+ BOOLEAN = "BOOLEAN",
3
+ DATE = "DATE",
4
+ DATETIME = "DATETIME",
5
+ DROPDOWN = "DROPDOWN",
6
+ FILE = "FILE",
7
+ GALLERY = "GALLERY",
8
+ HIDDEN = "HIDDEN",
9
+ IMAGE = "IMAGE",
10
+ MEDIA_IMAGE = "MEDIA_IMAGE",
11
+ MULTILINE = "MULTILINE",
12
+ MULTISELECT = "MULTISELECT",
13
+ PRICE = "PRICE",
14
+ SELECT = "SELECT",
15
+ TEXT = "TEXT",
16
+ TEXTAREA = "TEXTAREA",
17
+ UNDEFINED = "UNDEFINED",
18
+ VISUAL = "VISUAL",
19
+ WEIGHT = "WEIGHT",
20
+ EMPTY = ""
21
+ }
22
+ export interface AttributesFormItemsProps {
23
+ code?: string;
24
+ name?: string;
25
+ id?: string;
26
+ required?: boolean;
27
+ label?: string;
28
+ options?: {
29
+ is_default: boolean;
30
+ label: string;
31
+ value: string;
32
+ }[];
33
+ entityType?: string;
34
+ className?: string;
35
+ defaultValue?: string | boolean | number;
36
+ fieldType?: FieldEnumList;
37
+ multilineCount?: number;
38
+ isUnique?: boolean;
39
+ orderNumber: number;
40
+ isHidden?: boolean;
41
+ customUpperCode: string;
42
+ }
43
+ export interface AttributesFormModel extends AttributesFormItemsProps {
44
+ }
45
+ //# sourceMappingURL=attributes-form.d.ts.map
@@ -0,0 +1,5 @@
1
+ export type Country = {
2
+ value: string;
3
+ text: string;
4
+ };
5
+ //# sourceMappingURL=country.d.ts.map
@@ -0,0 +1,21 @@
1
+ export interface CustomerAddressesModel {
2
+ firstname?: string;
3
+ lastname?: string;
4
+ city?: string;
5
+ company?: string;
6
+ countryCode?: string;
7
+ region?: {
8
+ region: string;
9
+ regionCode: string;
10
+ regionId: string | number;
11
+ };
12
+ telephone?: string;
13
+ id?: string;
14
+ vatId?: string;
15
+ postcode?: string;
16
+ street?: string;
17
+ street_2?: string;
18
+ defaultShipping?: boolean;
19
+ defaultBilling?: boolean;
20
+ }
21
+ //# sourceMappingURL=customer-address.d.ts.map
@@ -0,0 +1,6 @@
1
+ export interface CustomerDataModelShort {
2
+ firstname: string;
3
+ lastname: string;
4
+ email: string;
5
+ }
6
+ //# sourceMappingURL=customer.d.ts.map
@@ -1,2 +1,6 @@
1
- export {};
1
+ export * from './customer-address';
2
+ export * from './attributes-form';
3
+ export * from './country';
4
+ export * from './region';
5
+ export * from './order-history-list';
2
6
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,63 @@
1
+ import { CustomerAddressesModel } from './customer-address';
2
+
3
+ export type ProductImage = {
4
+ url: string;
5
+ };
6
+ export type Product = {
7
+ smallImage: ProductImage;
8
+ };
9
+ export type OrderItem = {
10
+ status: string;
11
+ productName: string;
12
+ id: string;
13
+ product: Product;
14
+ };
15
+ export type PaymentMethod = {
16
+ name: string;
17
+ };
18
+ export type MoneyAmount = {
19
+ value: number;
20
+ currency: string;
21
+ };
22
+ export type Discount = {
23
+ amount: MoneyAmount;
24
+ label: string;
25
+ };
26
+ export type Tax = {
27
+ amount: MoneyAmount;
28
+ rate: number;
29
+ title: string;
30
+ };
31
+ export type OrderTotals = {
32
+ discounts: Discount[];
33
+ grandTotal: MoneyAmount;
34
+ subtotal: MoneyAmount;
35
+ taxes: Tax[];
36
+ totalTax: MoneyAmount;
37
+ totalShipping: MoneyAmount;
38
+ };
39
+ export type OrderDetails = {
40
+ token: string;
41
+ billingAddress: CustomerAddressesModel;
42
+ carrier: string;
43
+ email: string;
44
+ id: string;
45
+ items: OrderItem[];
46
+ number: string;
47
+ orderDate: string;
48
+ paymentMethods: PaymentMethod[];
49
+ shippingAddress: CustomerAddressesModel;
50
+ status: string;
51
+ total: OrderTotals;
52
+ };
53
+ export type PaginationInfo = {
54
+ currentPage: number;
55
+ pageSize: number;
56
+ totalPages: number;
57
+ };
58
+ export interface OrderHistory {
59
+ items: OrderDetails[];
60
+ pageInfo: PaginationInfo;
61
+ totalCount: number;
62
+ }
63
+ //# sourceMappingURL=order-history-list.d.ts.map
@@ -0,0 +1,10 @@
1
+ export type Region = {
2
+ code: string;
3
+ id?: number;
4
+ name: string;
5
+ };
6
+ export interface RegionTransform {
7
+ text: string;
8
+ value: string;
9
+ }
10
+ //# sourceMappingURL=region.d.ts.map
@@ -1,2 +1,7 @@
1
- export {};
1
+ export * from './transform-attributes-form';
2
+ export * from './transform-customer-address';
3
+ export * from './transform-customer';
4
+ export * from './transform-countries';
5
+ export * from './transform-regions';
6
+ export * from './transform-order-history-list';
2
7
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { GetAttributesFormResponse, ResponseAttributesFormItemsProps } from '../../types';
2
+ import { AttributesFormModel } from '../models';
3
+
4
+ export declare const cloneArrayIfExists: (fields: ResponseAttributesFormItemsProps[]) => any;
5
+ export declare const transformAttributesForm: (response: GetAttributesFormResponse) => AttributesFormModel[];
6
+ //# sourceMappingURL=transform-attributes-form.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { CountriesFormResponse } from '../../types';
2
+ import { Country } from '../models';
3
+
4
+ export declare const transformCountries: (response: CountriesFormResponse) => Country[] | [
5
+ ];
6
+ //# sourceMappingURL=transform-countries.d.ts.map
@@ -0,0 +1,8 @@
1
+ import { CustomerAddressesModel } from '../models';
2
+ import { AddressResponse, UserAddressesProps } from '../../types';
3
+
4
+ export declare const expandArraysInObject: (inputObject: UserAddressesProps) => Record<string, unknown>;
5
+ export declare const transformSingleAddress: (addressData: UserAddressesProps) => CustomerAddressesModel;
6
+ export declare const transformMultipleAddresses: (response: AddressResponse) => CustomerAddressesModel[] | [
7
+ ];
8
+ //# sourceMappingURL=transform-customer-address.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { getCustomerShortResponse } from '../../types';
2
+ import { CustomerDataModelShort } from '../models/customer';
3
+
4
+ export declare const transformCustomer: (response: getCustomerShortResponse) => CustomerDataModelShort;
5
+ //# sourceMappingURL=transform-customer.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { OrderHistoryListResponse } from '../../types';
2
+ import { OrderHistory } from '../models';
3
+
4
+ export declare const transformOrderHistoryList: (response: OrderHistoryListResponse) => OrderHistory | null;
5
+ //# sourceMappingURL=transform-order-history-list.d.ts.map