@dropins/storefront-checkout 0.1.0-alpha6 → 0.1.0-alpha61

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 (302) hide show
  1. package/api/authenticateCustomer/authenticateCustomer.d.ts +18 -0
  2. package/api/authenticateCustomer/index.d.ts +18 -0
  3. package/api/errors/errors.d.ts +30 -0
  4. package/api/errors/index.d.ts +18 -0
  5. package/api/estimateShippingMethods/estimateShippingMethods.d.ts +13 -0
  6. package/api/estimateShippingMethods/fixtures.d.ts +8 -0
  7. package/api/estimateShippingMethods/graphql/estimateShippingMethods.graphql.d.ts +18 -0
  8. package/api/estimateShippingMethods/graphql/index.d.ts +18 -0
  9. package/api/estimateShippingMethods/index.d.ts +18 -0
  10. package/api/fetch-graphql/fetch-graphql.d.ts +25 -0
  11. package/api/fetch-graphql/index.d.ts +18 -0
  12. package/api/fragments.d.ts +21 -0
  13. package/api/getCart/fixtures.d.ts +12 -0
  14. package/api/getCart/getCart.d.ts +18 -0
  15. package/api/getCart/graphql/getCart.graphql.d.ts +19 -0
  16. package/api/getCart/graphql/index.d.ts +18 -0
  17. package/api/getCart/index.d.ts +18 -0
  18. package/api/getCustomer/fixtures.d.ts +5 -0
  19. package/api/getCustomer/getCustomer.d.ts +4 -0
  20. package/api/getCustomer/graphql/getCustomer.graphql.d.ts +18 -0
  21. package/api/getCustomer/graphql/index.d.ts +18 -0
  22. package/api/getCustomer/index.d.ts +18 -0
  23. package/api/getStoreConfig/getStoreConfig.d.ts +6 -0
  24. package/api/getStoreConfig/graphql/getStoreConfig.graphql.d.ts +18 -0
  25. package/api/getStoreConfig/index.d.ts +18 -0
  26. package/api/graphql/CartAddressFragment.graphql.d.ts +19 -0
  27. package/api/graphql/CheckoutDataFragment.graphql.d.ts +18 -0
  28. package/api/graphql/CustomerFragment.graphql.d.ts +18 -0
  29. package/api/graphql/OrderAddressFragment.graphql.d.ts +18 -0
  30. package/api/graphql/OrderFragment.graphql.d.ts +19 -0
  31. package/api/graphql/OrderItemFragment.graphql.d.ts +6 -0
  32. package/api/index.d.ts +35 -0
  33. package/api/initialize/index.d.ts +18 -0
  34. package/api/initialize/initialize.d.ts +15 -0
  35. package/api/initialize/listeners.d.ts +20 -0
  36. package/api/initializeCheckout/index.d.ts +18 -0
  37. package/api/initializeCheckout/initializeCheckout.d.ts +4 -0
  38. package/api/isEmailAvailable/graphql/isEmailAvailable.graphql.d.ts +18 -0
  39. package/api/isEmailAvailable/index.d.ts +18 -0
  40. package/api/isEmailAvailable/isEmailAvailable.d.ts +4 -0
  41. package/api/placeOrder/fixtures.d.ts +20 -0
  42. package/api/placeOrder/graphql/index.d.ts +18 -0
  43. package/api/placeOrder/graphql/placeOrder.graphql.d.ts +18 -0
  44. package/api/placeOrder/index.d.ts +18 -0
  45. package/api/placeOrder/placeOrder.d.ts +18 -0
  46. package/api/resetCheckout/index.d.ts +2 -0
  47. package/api/resetCheckout/resetCheckout.d.ts +18 -0
  48. package/api/setBillingAddress/graphql/setBillingAddress.graphql.d.ts +18 -0
  49. package/api/setBillingAddress/index.d.ts +18 -0
  50. package/api/setBillingAddress/setBillingAddress.d.ts +4 -0
  51. package/api/setGuestEmailOnCart/graphql/setGuestEmailOnCart.graphql.d.ts +18 -0
  52. package/api/setGuestEmailOnCart/index.d.ts +18 -0
  53. package/api/setGuestEmailOnCart/setGuestEmailOnCart.d.ts +18 -0
  54. package/api/setPaymentMethod/graphql/setPaymentMethod.graphql.d.ts +18 -0
  55. package/api/setPaymentMethod/index.d.ts +18 -0
  56. package/api/setPaymentMethod/setPaymentMethod.d.ts +4 -0
  57. package/api/setShippingAddress/graphql/setShippingAddress.graphql.d.ts +18 -0
  58. package/api/setShippingAddress/index.d.ts +18 -0
  59. package/api/setShippingAddress/setShippingAddress.d.ts +4 -0
  60. package/api/setShippingMethods/graphql/setShippingMethodsOnCart.graphql.d.ts +18 -0
  61. package/api/setShippingMethods/index.d.ts +18 -0
  62. package/api/setShippingMethods/setShippingMethods.d.ts +18 -0
  63. package/api/synchronizeCheckout/index.d.ts +18 -0
  64. package/api/synchronizeCheckout/synchronizeCheckout.d.ts +4 -0
  65. package/api/utils/dispatchApiCall.d.ts +38 -0
  66. package/api/utils/enqueueRequest.d.ts +18 -0
  67. package/api/utils/filterControlledErrors.d.ts +18 -0
  68. package/api.d.ts +1 -0
  69. package/api.js +39 -2
  70. package/chunks/OrderError.js +3 -0
  71. package/chunks/ServerErrorSignal.js +3 -0
  72. package/chunks/classes.js +3 -0
  73. package/chunks/fetch-graphql.js +12 -0
  74. package/chunks/isEmailAvailable.js +9 -0
  75. package/chunks/placeOrder2.js +17 -0
  76. package/chunks/setBillingAddress.js +13 -0
  77. package/chunks/setGuestEmailOnCart.js +13 -0
  78. package/chunks/setPaymentMethod.js +18 -0
  79. package/chunks/setShippingMethods.js +18 -0
  80. package/chunks/store-config.js +3 -0
  81. package/chunks/synchronizeCheckout.js +27 -0
  82. package/chunks/withConditionalRendering.js +3 -0
  83. package/components/BillToShippingAddress/BillToShippingAddress.d.ts +9 -0
  84. package/components/BillToShippingAddress/BillToShippingAddressSkeleton.d.ts +4 -0
  85. package/components/BillToShippingAddress/index.d.ts +20 -0
  86. package/components/EstimateShipping/EstimateShipping.d.ts +12 -0
  87. package/components/EstimateShipping/EstimateShippingSkeleton.d.ts +4 -0
  88. package/components/EstimateShipping/index.d.ts +20 -0
  89. package/components/LoginForm/Email.d.ts +13 -0
  90. package/components/LoginForm/LoginForm.d.ts +20 -0
  91. package/components/LoginForm/LoginFormSkeleton.d.ts +4 -0
  92. package/components/LoginForm/SignIn.d.ts +8 -0
  93. package/components/LoginForm/SignOut.d.ts +8 -0
  94. package/components/LoginForm/index.d.ts +22 -0
  95. package/components/OrderConfirmationHeader/OrderConfirmationHeader.d.ts +10 -0
  96. package/components/OrderConfirmationHeader/OrderConfirmationHeaderSkeleton.d.ts +4 -0
  97. package/components/OrderConfirmationHeader/index.d.ts +3 -0
  98. package/components/OutOfStock/OutOfStock.d.ts +11 -0
  99. package/components/OutOfStock/index.d.ts +19 -0
  100. package/components/PaymentMethods/PaymentMethods.d.ts +14 -0
  101. package/components/PaymentMethods/PaymentMethodsSkeleton.d.ts +4 -0
  102. package/components/PaymentMethods/index.d.ts +20 -0
  103. package/components/PlaceOrder/PlaceOrder.d.ts +9 -0
  104. package/components/PlaceOrder/PlaceOrderSkeleton.d.ts +4 -0
  105. package/components/PlaceOrder/index.d.ts +19 -0
  106. package/components/ServerError/ServerError.d.ts +10 -0
  107. package/components/ServerError/index.d.ts +19 -0
  108. package/components/ShippingMethods/ShippingMethods.d.ts +12 -0
  109. package/components/ShippingMethods/ShippingMethodsSkeleton.d.ts +4 -0
  110. package/components/ShippingMethods/index.d.ts +20 -0
  111. package/components/index.d.ts +26 -0
  112. package/containers/BillToShippingAddress/BillToShippingAddress.d.ts +24 -0
  113. package/containers/BillToShippingAddress/index.d.ts +19 -0
  114. package/containers/BillToShippingAddress.d.ts +3 -0
  115. package/containers/BillToShippingAddress.js +3 -1
  116. package/containers/ErrorBanner/ErrorBanner.d.ts +5 -0
  117. package/containers/ErrorBanner/index.d.ts +19 -0
  118. package/containers/ErrorBanner.d.ts +3 -0
  119. package/containers/ErrorBanner.js +3 -0
  120. package/containers/EstimateShipping/EstimateShipping.d.ts +4 -0
  121. package/containers/EstimateShipping/index.d.ts +19 -0
  122. package/containers/EstimateShipping.d.ts +3 -0
  123. package/containers/EstimateShipping.js +3 -0
  124. package/containers/LoginForm/LoginForm.d.ts +11 -0
  125. package/containers/LoginForm/index.d.ts +19 -0
  126. package/containers/LoginForm.d.ts +3 -0
  127. package/containers/LoginForm.js +3 -1
  128. package/containers/MergedCartBanner/MergedCartBanner.d.ts +7 -0
  129. package/containers/MergedCartBanner/index.d.ts +19 -0
  130. package/containers/MergedCartBanner.d.ts +3 -0
  131. package/containers/MergedCartBanner.js +3 -0
  132. package/containers/OrderConfirmationHeader/OrderConfirmationHeader.d.ts +18 -0
  133. package/containers/OrderConfirmationHeader/index.d.ts +3 -0
  134. package/containers/OrderConfirmationHeader.d.ts +3 -0
  135. package/containers/OrderConfirmationHeader.js +3 -0
  136. package/containers/OutOfStock/OutOfStock.d.ts +13 -0
  137. package/containers/OutOfStock/index.d.ts +19 -0
  138. package/containers/OutOfStock.d.ts +3 -0
  139. package/containers/OutOfStock.js +3 -0
  140. package/containers/PaymentMethods/PaymentMethods.d.ts +27 -0
  141. package/containers/PaymentMethods/defaultHandlers.d.ts +4 -0
  142. package/containers/PaymentMethods/index.d.ts +19 -0
  143. package/containers/PaymentMethods.d.ts +3 -0
  144. package/containers/PaymentMethods.js +3 -1
  145. package/containers/PlaceOrder/PlaceOrder.d.ts +15 -0
  146. package/containers/PlaceOrder/index.d.ts +19 -0
  147. package/containers/PlaceOrder.d.ts +3 -0
  148. package/containers/PlaceOrder.js +3 -2
  149. package/containers/ServerError/ServerError.d.ts +8 -0
  150. package/containers/ServerError/index.d.ts +19 -0
  151. package/containers/ServerError.d.ts +3 -0
  152. package/containers/ServerError.js +3 -0
  153. package/containers/ShippingMethods/ShippingMethods.d.ts +18 -0
  154. package/containers/ShippingMethods/hooks/useShippingEstimateEventEmitter.d.ts +19 -0
  155. package/containers/ShippingMethods/index.d.ts +19 -0
  156. package/containers/ShippingMethods.d.ts +3 -0
  157. package/containers/ShippingMethods.js +3 -1
  158. package/containers/index.d.ts +28 -0
  159. package/data/models/acdl.d.ts +115 -0
  160. package/data/models/address.d.ts +21 -0
  161. package/data/models/api.d.ts +33 -0
  162. package/data/models/cart.d.ts +19 -0
  163. package/data/models/country.d.ts +21 -0
  164. package/data/models/custom-attribute.d.ts +21 -0
  165. package/data/models/customer.d.ts +22 -0
  166. package/data/models/email-availability.d.ts +18 -0
  167. package/data/models/index.d.ts +32 -0
  168. package/data/models/order.d.ts +153 -0
  169. package/data/models/payment-method.d.ts +21 -0
  170. package/data/models/price.d.ts +21 -0
  171. package/data/models/region.d.ts +22 -0
  172. package/data/models/shipping-estimate.d.ts +17 -0
  173. package/data/models/shipping-method.d.ts +19 -0
  174. package/data/models/store-config.d.ts +30 -0
  175. package/data/transforms/index.d.ts +27 -0
  176. package/data/transforms/transform-acdl.d.ts +5 -0
  177. package/data/transforms/transform-address.d.ts +95 -0
  178. package/data/transforms/transform-cart.d.ts +7 -0
  179. package/data/transforms/transform-customer-address-input.d.ts +5 -0
  180. package/data/transforms/transform-customer.d.ts +7 -0
  181. package/data/transforms/transform-email-availability.d.ts +6 -0
  182. package/data/transforms/transform-order.d.ts +20 -0
  183. package/data/transforms/transform-payment-methods.d.ts +9 -0
  184. package/data/transforms/transform-shipping-estimate.d.ts +5 -0
  185. package/data/transforms/transform-shipping-methods.d.ts +14 -0
  186. package/data/transforms/transform-store-config.d.ts +6 -0
  187. package/fragments.d.ts +1 -0
  188. package/fragments.js +381 -0
  189. package/hocs/index.d.ts +18 -0
  190. package/hocs/withConditionalRendering.d.ts +13 -0
  191. package/hooks/index.d.ts +20 -0
  192. package/hooks/useBreakpoint/index.d.ts +18 -0
  193. package/hooks/useBreakpoint/useBreakpoint.d.ts +18 -0
  194. package/hooks/useLockScroll/index.d.ts +18 -0
  195. package/hooks/useLockScroll/useLockScroll.d.ts +21 -0
  196. package/hooks/useStableList/index.d.ts +2 -0
  197. package/hooks/useStableList/useStableList.d.ts +2 -0
  198. package/i18n/en_US.json.d.ts +88 -0
  199. package/lib/acdl.d.ts +18 -0
  200. package/lib/fetch-error.d.ts +23 -0
  201. package/lib/index.d.ts +22 -0
  202. package/lib/network-error.d.ts +22 -0
  203. package/lib/state.d.ts +24 -0
  204. package/lib/validation.d.ts +5 -0
  205. package/msw/browser.d.ts +18 -0
  206. package/msw/fixtures/fragments/available-shipping-methods.d.ts +23 -0
  207. package/msw/fixtures/fragments/billing-address.d.ts +60 -0
  208. package/msw/fixtures/fragments/cart.d.ts +149 -0
  209. package/msw/fixtures/fragments/index.d.ts +21 -0
  210. package/msw/fixtures/fragments/shipping-address.d.ts +62 -0
  211. package/msw/fixtures/index.d.ts +20 -0
  212. package/msw/fixtures/mutations/estimate-shipping-methods.d.ts +4 -0
  213. package/msw/fixtures/mutations/index.d.ts +24 -0
  214. package/msw/fixtures/mutations/place-order.d.ts +4 -0
  215. package/msw/fixtures/mutations/set-billing-address.d.ts +5 -0
  216. package/msw/fixtures/mutations/set-guest-email.d.ts +4 -0
  217. package/msw/fixtures/mutations/set-payment-method.d.ts +4 -0
  218. package/msw/fixtures/mutations/set-shipping-address.d.ts +4 -0
  219. package/msw/fixtures/mutations/set-shipping-methods.d.ts +4 -0
  220. package/msw/fixtures/queries/get-cart.d.ts +4 -0
  221. package/msw/fixtures/queries/get-customer-cart-stock-status.d.ts +4 -0
  222. package/msw/fixtures/queries/get-customer.d.ts +5 -0
  223. package/msw/fixtures/queries/get-stock-status.d.ts +4 -0
  224. package/msw/fixtures/queries/get-store-config.d.ts +4 -0
  225. package/msw/fixtures/queries/index.d.ts +23 -0
  226. package/msw/fixtures/queries/is-email-available.d.ts +4 -0
  227. package/msw/handlers.d.ts +4 -0
  228. package/msw/server.d.ts +18 -0
  229. package/package.json +1 -1
  230. package/render/Provider.d.ts +8 -0
  231. package/render/index.d.ts +18 -0
  232. package/render/render.d.ts +6 -0
  233. package/render.d.ts +1 -0
  234. package/render.js +9 -1
  235. package/signals/CartSignal.d.ts +7 -0
  236. package/signals/CustomerSignal.d.ts +7 -0
  237. package/signals/EstimateShippingMethodsSignal.d.ts +7 -0
  238. package/signals/IsBillToShippingSignal.d.ts +18 -0
  239. package/signals/SelectedPaymentMethodSignal.d.ts +18 -0
  240. package/signals/SelectedShippingMethodSignal.d.ts +4 -0
  241. package/signals/ServerErrorSignal.d.ts +18 -0
  242. package/signals/StoreConfigSignal.d.ts +7 -0
  243. package/signals/index.d.ts +25 -0
  244. package/tests/constants.d.ts +19 -0
  245. package/tests/integration/utils/index.d.ts +19 -0
  246. package/tests/integration/utils/setup.d.ts +8 -0
  247. package/tests/integration/utils/user-actions.d.ts +18 -0
  248. package/tests/mocks/svg.d.ts +20 -0
  249. package/tests/utils/expectError.d.ts +25 -0
  250. package/tests/utils/index.d.ts +19 -0
  251. package/tests/utils/mockEvents.d.ts +21 -0
  252. package/utils/convertCase/convertCase.d.ts +4 -0
  253. package/utils/convertCase/index.d.ts +18 -0
  254. package/utils/getDisplayName/getDisplayName.d.ts +4 -0
  255. package/utils/getDisplayName/index.d.ts +18 -0
  256. package/utils/index.d.ts +21 -0
  257. package/utils/isEmpty/index.d.ts +18 -0
  258. package/utils/isEmpty/isEmpty.d.ts +18 -0
  259. package/utils/isNullish/index.d.ts +18 -0
  260. package/utils/isNullish/isNullish.d.ts +18 -0
  261. package/utils/isUnexpectedError/index.d.ts +18 -0
  262. package/utils/isUnexpectedError/isUnexpectedError.d.ts +18 -0
  263. package/utils/shippingMethods/index.d.ts +18 -0
  264. package/utils/shippingMethods/isEqual.d.ts +4 -0
  265. package/193.js +0 -1
  266. package/212.js +0 -2
  267. package/212.js.LICENSE.txt +0 -1
  268. package/261.js +0 -2
  269. package/261.js.LICENSE.txt +0 -1
  270. package/357.js +0 -1
  271. package/405.js +0 -1
  272. package/41.js +0 -2
  273. package/41.js.LICENSE.txt +0 -1
  274. package/494.js +0 -2
  275. package/494.js.LICENSE.txt +0 -1
  276. package/516.js +0 -1
  277. package/549.js +0 -2
  278. package/549.js.LICENSE.txt +0 -1
  279. package/565.js +0 -2
  280. package/565.js.LICENSE.txt +0 -1
  281. package/599.js +0 -1
  282. package/621.js +0 -1
  283. package/632.js +0 -1
  284. package/636.js +0 -2
  285. package/636.js.LICENSE.txt +0 -1
  286. package/687.js +0 -2
  287. package/687.js.LICENSE.txt +0 -1
  288. package/693.js +0 -1
  289. package/731.js +0 -1
  290. package/757.js +0 -1
  291. package/805.js +0 -2
  292. package/805.js.LICENSE.txt +0 -1
  293. package/88.js +0 -2
  294. package/88.js.LICENSE.txt +0 -1
  295. package/api.js.LICENSE.txt +0 -1
  296. package/containers/BillingForm.js +0 -1
  297. package/containers/Checkout.js +0 -2
  298. package/containers/Checkout.js.LICENSE.txt +0 -1
  299. package/containers/OrderSummary.js +0 -1
  300. package/containers/PlaceOrder.js.LICENSE.txt +0 -1
  301. package/containers/ShippingForm.js +0 -1
  302. package/runtime.js +0 -1
package/fragments.js ADDED
@@ -0,0 +1,381 @@
1
+ /*! Copyright 2024 Adobe
2
+ All Rights Reserved. */
3
+ const e=`
4
+ fragment BILLING_CART_ADDRESS_FRAGMENT on BillingCartAddress {
5
+ id
6
+ city
7
+ country {
8
+ code
9
+ label
10
+ }
11
+ firstname
12
+ lastname
13
+ company
14
+ postcode
15
+ vat_id
16
+ region {
17
+ region_id
18
+ code
19
+ label
20
+ }
21
+ street
22
+ telephone
23
+ custom_attributes {
24
+ ... on AttributeValue {
25
+ code
26
+ value
27
+ }
28
+ }
29
+ prefix
30
+ suffix
31
+ middlename
32
+ fax
33
+ }
34
+ `,t=`
35
+ fragment SHIPPING_CART_ADDRESS_FRAGMENT on ShippingCartAddress {
36
+ id
37
+ firstname
38
+ lastname
39
+ company
40
+ street
41
+ city
42
+ postcode
43
+ vat_id
44
+ region {
45
+ region_id
46
+ code
47
+ label
48
+ }
49
+ country {
50
+ code
51
+ label
52
+ }
53
+ telephone
54
+ custom_attributes {
55
+ ... on AttributeValue {
56
+ code
57
+ value
58
+ }
59
+ }
60
+ available_shipping_methods {
61
+ amount {
62
+ currency
63
+ value
64
+ }
65
+ available
66
+ carrier_code
67
+ carrier_title
68
+ error_message
69
+ method_code
70
+ method_title
71
+ price_excl_tax {
72
+ value
73
+ currency
74
+ }
75
+ price_incl_tax {
76
+ value
77
+ currency
78
+ }
79
+ }
80
+ selected_shipping_method {
81
+ amount {
82
+ value
83
+ currency
84
+ }
85
+ carrier_code
86
+ carrier_title
87
+ method_code
88
+ method_title
89
+ price_excl_tax {
90
+ value
91
+ currency
92
+ }
93
+ price_incl_tax {
94
+ value
95
+ currency
96
+ }
97
+ }
98
+ same_as_billing
99
+ prefix
100
+ suffix
101
+ middlename
102
+ fax
103
+ }
104
+ `,d=`
105
+ fragment CHECKOUT_DATA_FRAGMENT on Cart {
106
+ id
107
+ is_virtual
108
+ email
109
+ total_quantity
110
+ billing_address {
111
+ ...BILLING_CART_ADDRESS_FRAGMENT
112
+ }
113
+ shipping_addresses {
114
+ ...SHIPPING_CART_ADDRESS_FRAGMENT
115
+ }
116
+ available_payment_methods {
117
+ code
118
+ title
119
+ }
120
+ selected_payment_method {
121
+ code
122
+ title
123
+ }
124
+ }
125
+
126
+ ${e}
127
+ ${t}
128
+ `,l=`
129
+ fragment CUSTOMER_FRAGMENT on Customer {
130
+ firstname
131
+ lastname
132
+ email
133
+ }
134
+ `,r=`
135
+ fragment ORDER_ADDRESS_FRAGMENT on OrderAddress {
136
+ city
137
+ company
138
+ country_code
139
+ fax
140
+ firstname
141
+ lastname
142
+ middlename
143
+ postcode
144
+ prefix
145
+ region
146
+ region_id
147
+ street
148
+ suffix
149
+ telephone
150
+ vat_id
151
+ custom_attributesV2 {
152
+ code
153
+ ... on AttributeValue {
154
+ value
155
+ }
156
+ }
157
+ }
158
+ `,a=`
159
+ fragment PRODUCT_FRAGMENT on ProductInterface {
160
+ __typename
161
+ canonical_url
162
+ uid
163
+ name
164
+ sku
165
+ only_x_left_in_stock
166
+ stock_status
167
+ image {
168
+ url
169
+ }
170
+ thumbnail {
171
+ label
172
+ url
173
+ }
174
+ price_range {
175
+ maximum_price {
176
+ regular_price {
177
+ currency
178
+ value
179
+ }
180
+ }
181
+ }
182
+ }
183
+ `,_=`
184
+ fragment PRICE_FRAGMENT on OrderItemInterface {
185
+ prices {
186
+ price_including_tax {
187
+ value
188
+ currency
189
+ }
190
+ original_price {
191
+ value
192
+ currency
193
+ }
194
+ original_price_including_tax {
195
+ value
196
+ currency
197
+ }
198
+ price {
199
+ value
200
+ currency
201
+ }
202
+ }
203
+ }
204
+ `,n=`
205
+ fragment GIFT_CARD_FRAGMENT on GiftCardOrderItem {
206
+ ...PRICE_FRAGMENT
207
+ gift_message {
208
+ message
209
+ }
210
+ gift_card {
211
+ recipient_name
212
+ recipient_email
213
+ sender_name
214
+ sender_email
215
+ message
216
+ }
217
+ }
218
+ `,i=`
219
+ fragment ORDER_ITEM_FRAGMENT on OrderItemInterface {
220
+ __typename
221
+ status
222
+ product_name
223
+ id
224
+ quantity_ordered
225
+ quantity_shipped
226
+ quantity_canceled
227
+ quantity_invoiced
228
+ quantity_refunded
229
+ quantity_returned
230
+ product_sale_price {
231
+ value
232
+ currency
233
+ }
234
+ selected_options {
235
+ label
236
+ value
237
+ }
238
+ product {
239
+ ...PRODUCT_FRAGMENT
240
+ }
241
+ ...PRICE_FRAGMENT
242
+ }
243
+ `,c=`
244
+ fragment BUNDLE_ORDER_ITEM_FRAGMENT on BundleOrderItem {
245
+ ...PRICE_FRAGMENT
246
+ bundle_options {
247
+ uid
248
+ label
249
+ values {
250
+ uid
251
+ product_name
252
+ }
253
+ }
254
+ }
255
+ `,o=`
256
+ fragment ORDER_SUMMARY_FRAGMENT on OrderTotal {
257
+ grand_total {
258
+ value
259
+ currency
260
+ }
261
+ total_giftcard {
262
+ currency
263
+ value
264
+ }
265
+ subtotal {
266
+ currency
267
+ value
268
+ }
269
+ taxes {
270
+ title
271
+ amount {
272
+ currency
273
+ value
274
+ }
275
+ rate
276
+ }
277
+ total_tax {
278
+ currency
279
+ value
280
+ }
281
+ total_shipping {
282
+ currency
283
+ value
284
+ }
285
+ discounts {
286
+ amount {
287
+ currency
288
+ value
289
+ }
290
+ label
291
+ }
292
+ }
293
+ `,u=`
294
+ fragment ORDER_FRAGMENT on CustomerOrder {
295
+ email
296
+ id
297
+ number
298
+ order_date
299
+ order_status_change_date
300
+ status
301
+ token
302
+ carrier
303
+ shipping_method
304
+ printed_card_included
305
+ gift_receipt_included
306
+ available_actions
307
+ is_virtual
308
+ payment_methods {
309
+ name
310
+ type
311
+ }
312
+ applied_coupons {
313
+ code
314
+ }
315
+ shipments {
316
+ id
317
+ tracking {
318
+ title
319
+ number
320
+ carrier
321
+ }
322
+ comments {
323
+ message
324
+ timestamp
325
+ }
326
+ items {
327
+ id
328
+ product_sku
329
+ product_name
330
+ order_item {
331
+ ...ORDER_ITEM_FRAGMENT
332
+ ... on GiftCardOrderItem {
333
+ ...GIFT_CARD_FRAGMENT
334
+ product {
335
+ ...PRODUCT_FRAGMENT
336
+ }
337
+ }
338
+ }
339
+ }
340
+ }
341
+ payment_methods {
342
+ name
343
+ type
344
+ }
345
+ shipping_address {
346
+ ...ORDER_ADDRESS_FRAGMENT
347
+ }
348
+ billing_address {
349
+ ...ORDER_ADDRESS_FRAGMENT
350
+ }
351
+ items {
352
+ ...ORDER_ITEM_FRAGMENT
353
+ ... on BundleOrderItem {
354
+ ...BUNDLE_ORDER_ITEM_FRAGMENT
355
+ }
356
+ ... on GiftCardOrderItem {
357
+ ...GIFT_CARD_FRAGMENT
358
+ product {
359
+ ...PRODUCT_FRAGMENT
360
+ }
361
+ }
362
+ ... on DownloadableOrderItem {
363
+ product_name
364
+ downloadable_links {
365
+ sort_order
366
+ title
367
+ }
368
+ }
369
+ }
370
+ total {
371
+ ...ORDER_SUMMARY_FRAGMENT
372
+ }
373
+ }
374
+ ${c}
375
+ ${n}
376
+ ${r}
377
+ ${i}
378
+ ${o}
379
+ ${_}
380
+ ${a}
381
+ `;export{d as CHECKOUT_DATA_FRAGMENT,l as CUSTOMER_FRAGMENT,u as ORDER_FRAGMENT,i as ORDER_ITEM_FRAGMENT};
@@ -0,0 +1,18 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export * from './withConditionalRendering';
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { Container } from '@dropins/tools/types/elsie/src/lib';
2
+
3
+ export interface ConditionalProps {
4
+ hideOnEmptyCart?: boolean;
5
+ hideOnVirtualCart?: boolean;
6
+ }
7
+ export declare const withConditionalRendering: <P extends object>(WrappedContainer: Container<P, {
8
+ [key: string]: any;
9
+ }>) => {
10
+ ({ hideOnEmptyCart, hideOnVirtualCart, ...props }: ConditionalProps & P): import("preact").JSX.Element;
11
+ displayName: string;
12
+ };
13
+ //# sourceMappingURL=withConditionalRendering.d.ts.map
@@ -0,0 +1,20 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export * from './useBreakpoint';
18
+ export * from './useLockScroll';
19
+ export * from './useStableList';
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,18 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export * from './useBreakpoint';
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,18 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export declare const useBreakpoint: () => "small" | "medium" | "large" | "xlarge" | "xxlarge";
18
+ //# sourceMappingURL=useBreakpoint.d.ts.map
@@ -0,0 +1,18 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export * from './useLockScroll';
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,21 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export declare const useScrollLock: () => {
18
+ lockScroll: () => void;
19
+ unlockScroll: () => void;
20
+ };
21
+ //# sourceMappingURL=useLockScroll.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './useStableList';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare const useStableList: <T>(list: T[], isEqual: (a: T[], b: T[]) => boolean) => T[];
2
+ //# sourceMappingURL=useStableList.d.ts.map
@@ -0,0 +1,88 @@
1
+ declare const _default: {
2
+ "Checkout": {
3
+ "title": "Checkout",
4
+ "LoginForm": {
5
+ "title": "Contact details",
6
+ "account": "Already have an account?",
7
+ "ariaLabel": "Email",
8
+ "invalidEmailError": "Please enter a valid email address.",
9
+ "missingEmailError": "Enter an email address.",
10
+ "emailExists": {
11
+ "alreadyHaveAccount": "It looks like you already have an account.",
12
+ "signInButton": "Sign in",
13
+ "forFasterCheckout": "for a faster checkout."
14
+ },
15
+ "floatingLabel": "Email *",
16
+ "placeholder": "Enter your email address",
17
+ "signIn": "Sign In",
18
+ "switch": "Do you want to switch account?",
19
+ "signOut": "Sign Out"
20
+ },
21
+ "ShippingMethods": {
22
+ "title": "Shipping options",
23
+ "emptyState": "This order can't be shipped to the address provided. Please review the address details you entered and make sure they're correct."
24
+ },
25
+ "BillToShippingAddress": {
26
+ "title": "Bill to shipping address"
27
+ },
28
+ "PaymentMethods": {
29
+ "title": "Payment",
30
+ "emptyState": "No payment methods available"
31
+ },
32
+ "OutOfStock": {
33
+ "title": "Your cart contains items that are out of stock",
34
+ "message": "The following items are out of stock:",
35
+ "actions": {
36
+ "reviewCart": "Review cart",
37
+ "removeOutOfStock": "Remove out of stock items"
38
+ },
39
+ "lowInventory": {
40
+ "one": "Last item!",
41
+ "many": "Only {{count}} left!"
42
+ },
43
+ "alert": "Out of stock!"
44
+ },
45
+ "PlaceOrder": {
46
+ "button": "Place Order"
47
+ },
48
+ "ServerError": {
49
+ "title": "We were unable to process your order",
50
+ "contactSupport": "If you continue to have issues, please contact support.",
51
+ "unexpected": "An unexpected error occurred while processing your order. Please try again later.",
52
+ "button": "Try again"
53
+ },
54
+ "EmptyCart": {
55
+ "title": "Your cart is empty",
56
+ "button": "Start shopping"
57
+ },
58
+ "ErrorBanner": {
59
+ "genericMessage": "Server error detected. Please check your connection and try again."
60
+ },
61
+ "MergedCartBanner": {
62
+ "items": {
63
+ "one": "1 item from a previous session was added to your cart. Please review your new subtotal.",
64
+ "many": "{{count}} items from a previous session were added to your cart. Please review your new subtotal."
65
+ }
66
+ },
67
+ "EstimateShipping": {
68
+ "estimated": "Estimated Shipping",
69
+ "freeShipping": "Free",
70
+ "label": "Shipping",
71
+ "taxToBeDetermined": "TBD",
72
+ "withTaxes": "Including taxes",
73
+ "withoutTaxes": "Excluding taxes"
74
+ },
75
+ "OrderConfirmationHeader": {
76
+ "title": "{{name}}, thank you for your order!",
77
+ "defaultTitle": "Thank you for your order!",
78
+ "order": "ORDER #{{order}}",
79
+ "CreateAccount": {
80
+ "message": "Save your information for faster checkout next time.",
81
+ "button": "Create an account"
82
+ }
83
+ }
84
+ }
85
+ }
86
+ ;
87
+
88
+ export default _default;
package/lib/acdl.d.ts ADDED
@@ -0,0 +1,18 @@
1
+ import { Order } from '../data/models/order';
2
+
3
+ /**
4
+ * See: https://github.com/adobe/commerce-events/blob/main/packages/storefront-events-sdk/src/contexts.ts
5
+ */
6
+ export declare const contexts: {
7
+ SHOPPING_CART_CONTEXT: string;
8
+ ORDER_CONTEXT: string;
9
+ };
10
+ /**
11
+ * See: https://github.com/adobe/commerce-events/blob/main/packages/storefront-events-sdk/src/events.ts
12
+ */
13
+ export declare const events: {
14
+ PLACE_ORDER: string;
15
+ };
16
+ export declare function getAdobeDataLayer(): any;
17
+ export declare function publishPlaceOrderEvent(order: Order): void;
18
+ //# sourceMappingURL=acdl.d.ts.map
@@ -0,0 +1,23 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export declare const handleFetchErrors: (errors?: Array<{
18
+ message: string;
19
+ extensions: {
20
+ category: string;
21
+ };
22
+ }>) => void;
23
+ //# sourceMappingURL=fetch-error.d.ts.map
package/lib/index.d.ts ADDED
@@ -0,0 +1,22 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export * from './acdl';
18
+ export * from './fetch-error';
19
+ export * from './network-error';
20
+ export * from './state';
21
+ export * from './validation';
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,22 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ /**
18
+ * A function which can be attached to fetchGraphQL to handle thrown errors in
19
+ * a generic way.
20
+ */
21
+ export declare const handleNetworkError: (error: Error) => never;
22
+ //# sourceMappingURL=network-error.d.ts.map