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

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 +17 -0
  161. package/data/models/api.d.ts +29 -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 +150 -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 +91 -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 +372 -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 +52 -0
  208. package/msw/fixtures/fragments/cart.d.ts +141 -0
  209. package/msw/fixtures/fragments/index.d.ts +21 -0
  210. package/msw/fixtures/fragments/shipping-address.d.ts +58 -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,372 @@
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
+ }
30
+ `,t=`
31
+ fragment SHIPPING_CART_ADDRESS_FRAGMENT on ShippingCartAddress {
32
+ id
33
+ firstname
34
+ lastname
35
+ company
36
+ street
37
+ city
38
+ postcode
39
+ vat_id
40
+ region {
41
+ region_id
42
+ code
43
+ label
44
+ }
45
+ country {
46
+ code
47
+ label
48
+ }
49
+ telephone
50
+ custom_attributes {
51
+ ... on AttributeValue {
52
+ code
53
+ value
54
+ }
55
+ }
56
+ available_shipping_methods {
57
+ amount {
58
+ currency
59
+ value
60
+ }
61
+ available
62
+ carrier_code
63
+ carrier_title
64
+ error_message
65
+ method_code
66
+ method_title
67
+ price_excl_tax {
68
+ value
69
+ currency
70
+ }
71
+ price_incl_tax {
72
+ value
73
+ currency
74
+ }
75
+ }
76
+ selected_shipping_method {
77
+ amount {
78
+ value
79
+ currency
80
+ }
81
+ carrier_code
82
+ carrier_title
83
+ method_code
84
+ method_title
85
+ price_excl_tax {
86
+ value
87
+ currency
88
+ }
89
+ price_incl_tax {
90
+ value
91
+ currency
92
+ }
93
+ }
94
+ same_as_billing
95
+ }
96
+ `,d=`
97
+ fragment CHECKOUT_DATA_FRAGMENT on Cart {
98
+ id
99
+ is_virtual
100
+ email
101
+ total_quantity
102
+ billing_address {
103
+ ...BILLING_CART_ADDRESS_FRAGMENT
104
+ }
105
+ shipping_addresses {
106
+ ...SHIPPING_CART_ADDRESS_FRAGMENT
107
+ }
108
+ available_payment_methods {
109
+ code
110
+ title
111
+ }
112
+ selected_payment_method {
113
+ code
114
+ title
115
+ }
116
+ }
117
+
118
+ ${e}
119
+ ${t}
120
+ `,l=`
121
+ fragment CUSTOMER_FRAGMENT on Customer {
122
+ firstname
123
+ lastname
124
+ email
125
+ }
126
+ `,r=`
127
+ fragment ORDER_ADDRESS_FRAGMENT on OrderAddress {
128
+ city
129
+ company
130
+ country_code
131
+ fax
132
+ firstname
133
+ lastname
134
+ middlename
135
+ postcode
136
+ prefix
137
+ region
138
+ region_id
139
+ street
140
+ suffix
141
+ telephone
142
+ vat_id
143
+ custom_attributesV2 {
144
+ code
145
+ ... on AttributeValue {
146
+ value
147
+ }
148
+ }
149
+ }
150
+ `,a=`
151
+ fragment PRODUCT_FRAGMENT on ProductInterface {
152
+ __typename
153
+ canonical_url
154
+ uid
155
+ name
156
+ sku
157
+ only_x_left_in_stock
158
+ stock_status
159
+ image {
160
+ url
161
+ }
162
+ thumbnail {
163
+ label
164
+ url
165
+ }
166
+ price_range {
167
+ maximum_price {
168
+ regular_price {
169
+ currency
170
+ value
171
+ }
172
+ }
173
+ }
174
+ }
175
+ `,_=`
176
+ fragment PRICE_FRAGMENT on OrderItemInterface {
177
+ prices {
178
+ price_including_tax {
179
+ value
180
+ currency
181
+ }
182
+ original_price {
183
+ value
184
+ currency
185
+ }
186
+ original_price_including_tax {
187
+ value
188
+ currency
189
+ }
190
+ price {
191
+ value
192
+ currency
193
+ }
194
+ }
195
+ }
196
+ `,n=`
197
+ fragment GIFT_CARD_FRAGMENT on GiftCardOrderItem {
198
+ ...PRICE_FRAGMENT
199
+ gift_message {
200
+ message
201
+ }
202
+ gift_card {
203
+ recipient_name
204
+ recipient_email
205
+ sender_name
206
+ sender_email
207
+ message
208
+ }
209
+ }
210
+ `,i=`
211
+ fragment ORDER_ITEM_FRAGMENT on OrderItemInterface {
212
+ __typename
213
+ status
214
+ product_name
215
+ id
216
+ quantity_ordered
217
+ quantity_shipped
218
+ quantity_canceled
219
+ quantity_invoiced
220
+ quantity_refunded
221
+ quantity_returned
222
+ product_sale_price {
223
+ value
224
+ currency
225
+ }
226
+ selected_options {
227
+ label
228
+ value
229
+ }
230
+ product {
231
+ ...PRODUCT_FRAGMENT
232
+ }
233
+ ...PRICE_FRAGMENT
234
+ }
235
+ `,c=`
236
+ fragment BUNDLE_ORDER_ITEM_FRAGMENT on BundleOrderItem {
237
+ ...PRICE_FRAGMENT
238
+ bundle_options {
239
+ uid
240
+ label
241
+ values {
242
+ uid
243
+ product_name
244
+ }
245
+ }
246
+ }
247
+ `,o=`
248
+ fragment ORDER_SUMMARY_FRAGMENT on OrderTotal {
249
+ grand_total {
250
+ value
251
+ currency
252
+ }
253
+ total_giftcard {
254
+ currency
255
+ value
256
+ }
257
+ subtotal {
258
+ currency
259
+ value
260
+ }
261
+ taxes {
262
+ amount {
263
+ currency
264
+ value
265
+ }
266
+ rate
267
+ }
268
+ total_tax {
269
+ currency
270
+ value
271
+ }
272
+ total_shipping {
273
+ currency
274
+ value
275
+ }
276
+ discounts {
277
+ amount {
278
+ currency
279
+ value
280
+ }
281
+ label
282
+ }
283
+ }
284
+ `,u=`
285
+ fragment ORDER_FRAGMENT on CustomerOrder {
286
+ email
287
+ id
288
+ number
289
+ order_date
290
+ order_status_change_date
291
+ status
292
+ token
293
+ carrier
294
+ shipping_method
295
+ printed_card_included
296
+ gift_receipt_included
297
+ available_actions
298
+ is_virtual
299
+ payment_methods {
300
+ name
301
+ type
302
+ }
303
+ applied_coupons {
304
+ code
305
+ }
306
+ shipments {
307
+ id
308
+ tracking {
309
+ title
310
+ number
311
+ carrier
312
+ }
313
+ comments {
314
+ message
315
+ timestamp
316
+ }
317
+ items {
318
+ id
319
+ product_sku
320
+ product_name
321
+ order_item {
322
+ ...ORDER_ITEM_FRAGMENT
323
+ ... on GiftCardOrderItem {
324
+ ...GIFT_CARD_FRAGMENT
325
+ product {
326
+ ...PRODUCT_FRAGMENT
327
+ }
328
+ }
329
+ }
330
+ }
331
+ }
332
+ payment_methods {
333
+ name
334
+ type
335
+ }
336
+ shipping_address {
337
+ ...ORDER_ADDRESS_FRAGMENT
338
+ }
339
+ billing_address {
340
+ ...ORDER_ADDRESS_FRAGMENT
341
+ }
342
+ items {
343
+ ...ORDER_ITEM_FRAGMENT
344
+ ... on BundleOrderItem {
345
+ ...BUNDLE_ORDER_ITEM_FRAGMENT
346
+ }
347
+ ... on GiftCardOrderItem {
348
+ ...GIFT_CARD_FRAGMENT
349
+ product {
350
+ ...PRODUCT_FRAGMENT
351
+ }
352
+ }
353
+ ... on DownloadableOrderItem {
354
+ product_name
355
+ downloadable_links {
356
+ sort_order
357
+ title
358
+ }
359
+ }
360
+ }
361
+ total {
362
+ ...ORDER_SUMMARY_FRAGMENT
363
+ }
364
+ }
365
+ ${c}
366
+ ${n}
367
+ ${r}
368
+ ${i}
369
+ ${o}
370
+ ${_}
371
+ ${a}
372
+ `;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