@dropins/storefront-checkout 0.1.0-alpha9 → 1.0.0-beta2

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 (289) 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 +19 -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/index.d.ts +35 -0
  30. package/api/initialize/index.d.ts +18 -0
  31. package/api/initialize/initialize.d.ts +15 -0
  32. package/api/initialize/listeners.d.ts +20 -0
  33. package/api/initializeCheckout/index.d.ts +18 -0
  34. package/api/initializeCheckout/initializeCheckout.d.ts +4 -0
  35. package/api/isEmailAvailable/graphql/isEmailAvailable.graphql.d.ts +18 -0
  36. package/api/isEmailAvailable/index.d.ts +18 -0
  37. package/api/isEmailAvailable/isEmailAvailable.d.ts +4 -0
  38. package/api/resetCheckout/index.d.ts +2 -0
  39. package/api/resetCheckout/resetCheckout.d.ts +18 -0
  40. package/api/setBillingAddress/graphql/setBillingAddress.graphql.d.ts +18 -0
  41. package/api/setBillingAddress/index.d.ts +18 -0
  42. package/api/setBillingAddress/setBillingAddress.d.ts +4 -0
  43. package/api/setGuestEmailOnCart/graphql/setGuestEmailOnCart.graphql.d.ts +18 -0
  44. package/api/setGuestEmailOnCart/index.d.ts +18 -0
  45. package/api/setGuestEmailOnCart/setGuestEmailOnCart.d.ts +18 -0
  46. package/api/setPaymentMethod/graphql/setPaymentMethod.graphql.d.ts +18 -0
  47. package/api/setPaymentMethod/index.d.ts +18 -0
  48. package/api/setPaymentMethod/setPaymentMethod.d.ts +4 -0
  49. package/api/setShippingAddress/graphql/setShippingAddress.graphql.d.ts +18 -0
  50. package/api/setShippingAddress/index.d.ts +18 -0
  51. package/api/setShippingAddress/setShippingAddress.d.ts +4 -0
  52. package/api/setShippingMethods/graphql/setShippingMethodsOnCart.graphql.d.ts +18 -0
  53. package/api/setShippingMethods/index.d.ts +18 -0
  54. package/api/setShippingMethods/setShippingMethods.d.ts +18 -0
  55. package/api/synchronizeCheckout/index.d.ts +18 -0
  56. package/api/synchronizeCheckout/synchronizeCheckout.d.ts +4 -0
  57. package/api/utils/dispatchApiCall.d.ts +36 -0
  58. package/api/utils/enqueueRequest.d.ts +26 -0
  59. package/api/utils/filterControlledErrors.d.ts +18 -0
  60. package/api.d.ts +1 -0
  61. package/api.js +39 -2
  62. package/chunks/OrderError.js +3 -0
  63. package/chunks/ServerErrorSignal.js +3 -0
  64. package/chunks/classes.js +3 -0
  65. package/chunks/errors.js +3 -0
  66. package/chunks/setBillingAddress.js +13 -0
  67. package/chunks/setGuestEmailOnCart.js +19 -0
  68. package/chunks/setPaymentMethod.js +18 -0
  69. package/chunks/setShippingMethods.js +18 -0
  70. package/chunks/store-config.js +3 -0
  71. package/chunks/synchronizeCheckout.js +27 -0
  72. package/chunks/transform-store-config.js +12 -0
  73. package/chunks/withConditionalRendering.js +3 -0
  74. package/components/BillToShippingAddress/BillToShippingAddress.d.ts +9 -0
  75. package/components/BillToShippingAddress/BillToShippingAddressSkeleton.d.ts +4 -0
  76. package/components/BillToShippingAddress/index.d.ts +20 -0
  77. package/components/EstimateShipping/EstimateShipping.d.ts +12 -0
  78. package/components/EstimateShipping/EstimateShippingSkeleton.d.ts +4 -0
  79. package/components/EstimateShipping/index.d.ts +20 -0
  80. package/components/LoginForm/Email.d.ts +13 -0
  81. package/components/LoginForm/LoginForm.d.ts +20 -0
  82. package/components/LoginForm/LoginFormSkeleton.d.ts +4 -0
  83. package/components/LoginForm/SignIn.d.ts +8 -0
  84. package/components/LoginForm/SignOut.d.ts +8 -0
  85. package/components/LoginForm/index.d.ts +22 -0
  86. package/components/OutOfStock/OutOfStock.d.ts +11 -0
  87. package/components/OutOfStock/index.d.ts +19 -0
  88. package/components/PaymentMethods/PaymentMethods.d.ts +14 -0
  89. package/components/PaymentMethods/PaymentMethodsSkeleton.d.ts +4 -0
  90. package/components/PaymentMethods/index.d.ts +20 -0
  91. package/components/PlaceOrder/PlaceOrder.d.ts +9 -0
  92. package/components/PlaceOrder/PlaceOrderSkeleton.d.ts +4 -0
  93. package/components/PlaceOrder/index.d.ts +19 -0
  94. package/components/ServerError/ServerError.d.ts +10 -0
  95. package/components/ServerError/index.d.ts +19 -0
  96. package/components/ShippingMethods/ShippingMethods.d.ts +12 -0
  97. package/components/ShippingMethods/ShippingMethodsSkeleton.d.ts +4 -0
  98. package/components/ShippingMethods/index.d.ts +20 -0
  99. package/components/index.d.ts +25 -0
  100. package/containers/BillToShippingAddress/BillToShippingAddress.d.ts +24 -0
  101. package/containers/BillToShippingAddress/index.d.ts +19 -0
  102. package/containers/BillToShippingAddress.d.ts +3 -0
  103. package/containers/BillToShippingAddress.js +3 -1
  104. package/containers/ErrorBanner/ErrorBanner.d.ts +5 -0
  105. package/containers/ErrorBanner/index.d.ts +19 -0
  106. package/containers/ErrorBanner.d.ts +3 -0
  107. package/containers/ErrorBanner.js +3 -1
  108. package/containers/EstimateShipping/EstimateShipping.d.ts +4 -0
  109. package/containers/EstimateShipping/index.d.ts +19 -0
  110. package/containers/EstimateShipping.d.ts +3 -0
  111. package/containers/EstimateShipping.js +3 -0
  112. package/containers/LoginForm/LoginForm.d.ts +11 -0
  113. package/containers/LoginForm/index.d.ts +19 -0
  114. package/containers/LoginForm.d.ts +3 -0
  115. package/containers/LoginForm.js +3 -1
  116. package/containers/MergedCartBanner/MergedCartBanner.d.ts +7 -0
  117. package/containers/MergedCartBanner/index.d.ts +19 -0
  118. package/containers/MergedCartBanner.d.ts +3 -0
  119. package/containers/MergedCartBanner.js +3 -0
  120. package/containers/OutOfStock/OutOfStock.d.ts +13 -0
  121. package/containers/OutOfStock/index.d.ts +19 -0
  122. package/containers/OutOfStock.d.ts +3 -0
  123. package/containers/OutOfStock.js +3 -0
  124. package/containers/PaymentMethods/PaymentMethods.d.ts +27 -0
  125. package/containers/PaymentMethods/defaultHandlers.d.ts +4 -0
  126. package/containers/PaymentMethods/index.d.ts +19 -0
  127. package/containers/PaymentMethods.d.ts +3 -0
  128. package/containers/PaymentMethods.js +3 -2
  129. package/containers/PlaceOrder/PlaceOrder.d.ts +16 -0
  130. package/containers/PlaceOrder/index.d.ts +19 -0
  131. package/containers/PlaceOrder.d.ts +3 -0
  132. package/containers/PlaceOrder.js +3 -2
  133. package/containers/ServerError/ServerError.d.ts +8 -0
  134. package/containers/ServerError/index.d.ts +19 -0
  135. package/containers/ServerError.d.ts +3 -0
  136. package/containers/ServerError.js +3 -0
  137. package/containers/ShippingMethods/ShippingMethods.d.ts +17 -0
  138. package/containers/ShippingMethods/hooks/useShippingEstimateEventEmitter.d.ts +19 -0
  139. package/containers/ShippingMethods/index.d.ts +19 -0
  140. package/containers/ShippingMethods.d.ts +3 -0
  141. package/containers/ShippingMethods.js +3 -2
  142. package/containers/index.d.ts +27 -0
  143. package/data/models/address.d.ts +21 -0
  144. package/data/models/api.d.ts +33 -0
  145. package/data/models/cart.d.ts +19 -0
  146. package/data/models/country.d.ts +21 -0
  147. package/data/models/custom-attribute.d.ts +21 -0
  148. package/data/models/customer.d.ts +22 -0
  149. package/data/models/email-availability.d.ts +18 -0
  150. package/data/models/index.d.ts +30 -0
  151. package/data/models/payment-method.d.ts +21 -0
  152. package/data/models/price.d.ts +21 -0
  153. package/data/models/region.d.ts +22 -0
  154. package/data/models/shipping-estimate.d.ts +17 -0
  155. package/data/models/shipping-method.d.ts +19 -0
  156. package/data/models/store-config.d.ts +30 -0
  157. package/data/transforms/index.d.ts +24 -0
  158. package/data/transforms/transform-address.d.ts +95 -0
  159. package/data/transforms/transform-cart.d.ts +7 -0
  160. package/data/transforms/transform-customer.d.ts +7 -0
  161. package/data/transforms/transform-email-availability.d.ts +6 -0
  162. package/data/transforms/transform-payment-methods.d.ts +9 -0
  163. package/data/transforms/transform-shipping-estimate.d.ts +5 -0
  164. package/data/transforms/transform-shipping-methods.d.ts +14 -0
  165. package/data/transforms/transform-store-config.d.ts +6 -0
  166. package/fragments.d.ts +1 -0
  167. package/fragments.js +134 -0
  168. package/hocs/index.d.ts +18 -0
  169. package/hocs/withConditionalRendering.d.ts +13 -0
  170. package/hooks/index.d.ts +20 -0
  171. package/hooks/useBreakpoint/index.d.ts +18 -0
  172. package/hooks/useBreakpoint/useBreakpoint.d.ts +18 -0
  173. package/hooks/useLockScroll/index.d.ts +18 -0
  174. package/hooks/useLockScroll/useLockScroll.d.ts +21 -0
  175. package/hooks/useStableList/index.d.ts +2 -0
  176. package/hooks/useStableList/useStableList.d.ts +2 -0
  177. package/i18n/en_US.json.d.ts +79 -0
  178. package/lib/fetch-error.d.ts +23 -0
  179. package/lib/index.d.ts +21 -0
  180. package/lib/network-error.d.ts +22 -0
  181. package/lib/state.d.ts +12 -0
  182. package/lib/validation.d.ts +5 -0
  183. package/msw/browser.d.ts +18 -0
  184. package/msw/fixtures/fragments/available-shipping-methods.d.ts +23 -0
  185. package/msw/fixtures/fragments/billing-address.d.ts +60 -0
  186. package/msw/fixtures/fragments/cart.d.ts +149 -0
  187. package/msw/fixtures/fragments/index.d.ts +21 -0
  188. package/msw/fixtures/fragments/shipping-address.d.ts +62 -0
  189. package/msw/fixtures/index.d.ts +20 -0
  190. package/msw/fixtures/mutations/estimate-shipping-methods.d.ts +4 -0
  191. package/msw/fixtures/mutations/index.d.ts +23 -0
  192. package/msw/fixtures/mutations/set-billing-address.d.ts +5 -0
  193. package/msw/fixtures/mutations/set-guest-email.d.ts +4 -0
  194. package/msw/fixtures/mutations/set-payment-method.d.ts +4 -0
  195. package/msw/fixtures/mutations/set-shipping-address.d.ts +4 -0
  196. package/msw/fixtures/mutations/set-shipping-methods.d.ts +4 -0
  197. package/msw/fixtures/queries/get-cart.d.ts +4 -0
  198. package/msw/fixtures/queries/get-customer-cart-stock-status.d.ts +4 -0
  199. package/msw/fixtures/queries/get-customer.d.ts +5 -0
  200. package/msw/fixtures/queries/get-stock-status.d.ts +4 -0
  201. package/msw/fixtures/queries/get-store-config.d.ts +4 -0
  202. package/msw/fixtures/queries/index.d.ts +23 -0
  203. package/msw/fixtures/queries/is-email-available.d.ts +4 -0
  204. package/msw/handlers.d.ts +4 -0
  205. package/msw/server.d.ts +18 -0
  206. package/package.json +1 -1
  207. package/render/Provider.d.ts +8 -0
  208. package/render/index.d.ts +18 -0
  209. package/render/render.d.ts +6 -0
  210. package/render.d.ts +1 -0
  211. package/render.js +9 -2
  212. package/signals/CartSignal.d.ts +7 -0
  213. package/signals/CustomerSignal.d.ts +7 -0
  214. package/signals/EstimateShippingMethodsSignal.d.ts +7 -0
  215. package/signals/IsBillToShippingSignal.d.ts +18 -0
  216. package/signals/SelectedPaymentMethodSignal.d.ts +18 -0
  217. package/signals/SelectedShippingMethodSignal.d.ts +4 -0
  218. package/signals/ServerErrorSignal.d.ts +18 -0
  219. package/signals/index.d.ts +24 -0
  220. package/tests/constants.d.ts +19 -0
  221. package/tests/integration/utils/index.d.ts +19 -0
  222. package/tests/integration/utils/setup.d.ts +8 -0
  223. package/tests/integration/utils/user-actions.d.ts +18 -0
  224. package/tests/mocks/svg.d.ts +20 -0
  225. package/tests/utils/expectError.d.ts +25 -0
  226. package/tests/utils/index.d.ts +19 -0
  227. package/tests/utils/mockEvents.d.ts +21 -0
  228. package/utils/convertCase/convertCase.d.ts +4 -0
  229. package/utils/convertCase/index.d.ts +18 -0
  230. package/utils/getDisplayName/getDisplayName.d.ts +4 -0
  231. package/utils/getDisplayName/index.d.ts +18 -0
  232. package/utils/index.d.ts +21 -0
  233. package/utils/isEmpty/index.d.ts +18 -0
  234. package/utils/isEmpty/isEmpty.d.ts +18 -0
  235. package/utils/isNullish/index.d.ts +18 -0
  236. package/utils/isNullish/isNullish.d.ts +18 -0
  237. package/utils/isUnexpectedError/index.d.ts +18 -0
  238. package/utils/isUnexpectedError/isUnexpectedError.d.ts +18 -0
  239. package/utils/shippingMethods/index.d.ts +18 -0
  240. package/utils/shippingMethods/isEqual.d.ts +4 -0
  241. package/223.js +0 -2
  242. package/223.js.LICENSE.txt +0 -1
  243. package/270.js +0 -1
  244. package/323.js +0 -1
  245. package/358.js +0 -2
  246. package/358.js.LICENSE.txt +0 -1
  247. package/378.js +0 -2
  248. package/378.js.LICENSE.txt +0 -1
  249. package/41.js +0 -2
  250. package/41.js.LICENSE.txt +0 -1
  251. package/424.js +0 -2
  252. package/424.js.LICENSE.txt +0 -1
  253. package/448.js +0 -1
  254. package/449.js +0 -1
  255. package/466.js +0 -1
  256. package/483.js +0 -2
  257. package/483.js.LICENSE.txt +0 -1
  258. package/499.js +0 -1
  259. package/603.js +0 -2
  260. package/603.js.LICENSE.txt +0 -1
  261. package/636.js +0 -2
  262. package/636.js.LICENSE.txt +0 -1
  263. package/637.js +0 -2
  264. package/637.js.LICENSE.txt +0 -1
  265. package/757.js +0 -1
  266. package/774.js +0 -2
  267. package/774.js.LICENSE.txt +0 -1
  268. package/79.js +0 -2
  269. package/79.js.LICENSE.txt +0 -1
  270. package/822.js +0 -1
  271. package/840.js +0 -1
  272. package/94.js +0 -2
  273. package/94.js.LICENSE.txt +0 -1
  274. package/965.js +0 -2
  275. package/965.js.LICENSE.txt +0 -1
  276. package/967.js +0 -1
  277. package/api.js.LICENSE.txt +0 -3
  278. package/containers/BillingForm.js +0 -1
  279. package/containers/CartSummary.js +0 -1
  280. package/containers/Checkout.js +0 -2
  281. package/containers/Checkout.js.LICENSE.txt +0 -1
  282. package/containers/OrderSummary.js +0 -1
  283. package/containers/PaymentMethods.js.LICENSE.txt +0 -1
  284. package/containers/PlaceOrder.js.LICENSE.txt +0 -1
  285. package/containers/ShippingForm.js +0 -2
  286. package/containers/ShippingForm.js.LICENSE.txt +0 -1
  287. package/containers/ShippingMethods.js.LICENSE.txt +0 -1
  288. package/render.js.LICENSE.txt +0 -1
  289. package/runtime.js +0 -1
@@ -0,0 +1,19 @@
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
+ declare function useShippingEstimateEventEmitter(): void;
18
+ export default useShippingEstimateEventEmitter;
19
+ //# sourceMappingURL=useShippingEstimateEventEmitter.d.ts.map
@@ -0,0 +1,19 @@
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 './ShippingMethods';
18
+ export { ShippingMethods as default } from './ShippingMethods';
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './ShippingMethods/index'
2
+ import _default from './ShippingMethods/index'
3
+ export default _default
@@ -1,2 +1,3 @@
1
- /*! For license information please see ShippingMethods.js.LICENSE.txt */
2
- import*as t from"@dropins/elsie/event-bus.js";import*as e from"@dropins/elsie/fetch-graphql.js";import*as r from"@dropins/elsie/preact-compat.js";import*as n from"@dropins/elsie/preact-hooks.js";import*as o from"@dropins/elsie/preact-jsx-runtime.js";import*as i from"@dropins/elsie/preact.js";export const id=57;export const ids=[57];export const modules={9529:(t,e,r)=>{r.d(e,{d:()=>u});var n=r(6680),o=r(9885);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function a(){a=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),c=new N(n||[]);return o(a,"_invoke",{value:P(t,r,c)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var y="suspendedStart",d="suspendedYield",v="executing",m="completed",g={};function b(){}function w(){}function x(){}var j={};f(j,u,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(G([])));S&&S!==r&&n.call(S,u)&&(j=S);var L=x.prototype=b.prototype=Object.create(j);function _(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,a,c,u){var s=p(t[o],t,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==i(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){l.value=t,c(l)}),(function(t){return r("throw",t,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function P(e,r,n){var o=y;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=C(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=p(e,r,n);if("normal"===s.type){if(o=n.done?m:d,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function G(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(i(e)+" is not iterable")}return w.prototype=x,o(L,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:w,configurable:!0}),w.displayName=f(x,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},_(O.prototype),f(O.prototype,s,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(L),f(L,l,"Generator"),f(L,u,(function(){return this})),f(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=G,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:G(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function c(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}var u=function(){var t,e=(t=a().mark((function t(e){var r,i,c,u,s,l,f,h,p,y,d,v,m;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=(r=e||{}).cartId,c=r.estimateShippingSearch,s=(u=c||{}).country_code,l=u.region_name,f=u.region_id,h=u.zip,i){t.next=4;break}throw new n.fQ;case 4:if(s){t.next=6;break}throw new n.UM;case 6:return p=s,y=l||"",d=f||"",v=h||"",t.next=12,(0,o.x)({query:"\n query estimateShipping(\n $cartId: String!\n $countryCode: String!\n $region: String\n $regionId: ID\n $zipCode: String\n ) {\n guestEstimate(\n cart_id: $cartId\n country_id: $countryCode\n region: $region\n region_id: $regionId\n postcode: $zipCode\n ) {\n carrier_title\n carrier_code\n method_title\n method_code\n available\n amount {\n currency\n value\n }\n price_excl_tax {\n currency\n value\n }\n price_incl_tax {\n currency\n value\n }\n error_message\n }\n }\n",options:{variables:{cartId:i,countryCode:p,region:y,regionId:d,zipCode:v}},path:"guestEstimate",signalType:"estimateShipping"});case 12:return m=t.sent,t.abrupt("return",m);case 14:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){c(i,n,o,a,u,"next",t)}function u(t){c(i,n,o,a,u,"throw",t)}a(void 0)}))});return function(t){return e.apply(this,arguments)}}()},9091:(t,e,r)=>{r.d(e,{v:()=>l});var n=r(6680),o=r(7096),i="\n mutation setShippingMethods(\n $cartId: String!\n $shippingMethods: [ShippingMethodInput]!\n ) {\n setShippingMethodsOnCart(\n input: { cart_id: $cartId, shipping_methods: $shippingMethods }\n ) {\n cart {\n id\n ...CheckoutData\n ...CartSummaryItems\n }\n }\n }\n ".concat(o.mr,"\n ").concat(o.G,"\n"),a=r(9885);function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function u(){u=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),c=new N(n||[]);return o(a,"_invoke",{value:P(t,r,c)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var y="suspendedStart",d="suspendedYield",v="executing",m="completed",g={};function b(){}function w(){}function x(){}var j={};f(j,a,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(G([])));S&&S!==r&&n.call(S,a)&&(j=S);var L=x.prototype=b.prototype=Object.create(j);function _(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,a,u){var s=p(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==c(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(s.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function P(e,r,n){var o=y;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=C(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=p(e,r,n);if("normal"===s.type){if(o=n.done?m:d,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function G(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(c(e)+" is not iterable")}return w.prototype=x,o(L,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:w,configurable:!0}),w.displayName=f(x,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},_(O.prototype),f(O.prototype,s,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(L),f(L,l,"Generator"),f(L,a,(function(){return this})),f(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=G,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:G(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function s(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}var l=function(){var t,e=(t=u().mark((function t(e){var r,o,c;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.cartId,o=e.shippingMethods,r){t.next=3;break}throw new n.fQ;case 3:return t.next=5,(0,a.x)({query:i,options:{variables:{cartId:r,shippingMethods:o}},path:"setShippingMethodsOnCart.cart",signalType:"cart"});case 5:return c=t.sent,t.abrupt("return",c);case 7:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){s(i,n,o,a,c,"next",t)}function c(t){s(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t){return e.apply(this,arguments)}}()},7651:(t,e,r)=>{r.d(e,{u:()=>O});var n=r(5587),o=r(1177),i=r(1892),a=r.n(i),c=r(5760),u=r.n(c),s=r(8311),l=r.n(s),f=r(8192),h=r.n(f),p=r(8060),y=r.n(p),d=r(4865),v=r.n(d),m=r(6433),g={};g.styleTagTransform=v(),g.setAttributes=h(),g.insert=l().bind(null,"head"),g.domAPI=u(),g.insertStyleElement=y();a()(m.Z,g);m.Z&&m.Z.locals&&m.Z.locals;var b=r(7553),w=r(7188);function x(t){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},x(t)}var j=["className","icon","heading","headingLevel","message"];function E(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function S(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?E(Object(r),!0).forEach((function(e){L(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function L(t,e,r){var n;return n=function(t,e){if("object"!=x(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=x(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==x(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var O=function(t){var e=t.className,r=t.icon,i=t.heading,a=t.headingLevel,c=void 0===a?2:a,u=t.message,s=_(t,j);return(0,w.jsxs)("div",S(S({},s),{},{className:(0,n.S)(["elsie-empty-state",e]),children:[r&&(0,w.jsx)(o.F,{node:r,className:"elsie-empty-state__icon"}),i&&(0,w.jsx)(b.X,{level:c,className:"elsie-empty-state__heading",children:i}),u&&(0,w.jsx)("p",{className:"elsie-empty-state__message",children:u})]}))}},7553:(t,e,r)=>{r.d(e,{X:()=>g});var n=r(1892),o=r.n(n),i=r(5760),a=r.n(i),c=r(8311),u=r.n(c),s=r(8192),l=r.n(s),f=r(8060),h=r.n(f),p=r(4865),y=r.n(p),d=r(4553),v={};v.styleTagTransform=y(),v.setAttributes=l(),v.insert=u().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=h();o()(d.Z,v);d.Z&&d.Z.locals&&d.Z.locals;var m=r(7188),g=function(t){var e=t.className,r=t.children,n=t.level,o=void 0===n?2:n,i=o>=1&&o<=6?"h".concat(o):"h2";return(0,m.jsx)(i,{className:e,children:r})}},8539:(t,e,r)=>{r.d(e,{SG:()=>n.SG,ZP:()=>n.SG,fz:()=>n.fz,lJ:()=>n.lJ});var n=r(2774)},6433:(t,e,r)=>{r.d(e,{Z:()=>c});var n=r(4933),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([t.id,".elsie-empty-state{\n display:flex;\n flex-direction:column;\n align-items:center;\n justify-content:center;\n height:100%;\n row-gap:var(--spacing-small);\n}\n\n.elsie-empty-state__icon{\n color:var(--color-neutral-400);\n}\n\n.elsie-empty-state__heading{\n color:var(--color-neutral-800);\n font:var(--type-headline-2-strong-font);\n letter-spacing:var(--type-headline-2-strong-letter-spacing);\n margin:0;\n}\n\n.elsie-empty-state__message{\n color:var(--color-neutral-800);\n font:var(--type-body-2-default-font);\n letter-spacing:var(--type-body-2-default-letter-spacing);\n text-align:center;\n margin:0;\n max-width:400px;\n}\n",""]);const c=a},4553:(t,e,r)=>{r.d(e,{Z:()=>c});var n=r(4933),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([t.id,"\n",""]);const c=a},6765:(e,r,n)=>{e.exports=(t=>{var e={};return n.d(e,t),e})({events:()=>t.events})},9699:(t,r,n)=>{t.exports=(t=>{var e={};return n.d(e,t),e})({FetchGraphQL:()=>e.FetchGraphQL})},4853:(t,e,n)=>{t.exports=(t=>{var e={};return n.d(e,t),e})({createContext:()=>r.createContext,forwardRef:()=>r.forwardRef,useCallback:()=>r.useCallback,useContext:()=>r.useContext,useEffect:()=>r.useEffect,useImperativeHandle:()=>r.useImperativeHandle,useMemo:()=>r.useMemo,useRef:()=>r.useRef,useState:()=>r.useState})},5437:(t,e,r)=>{t.exports=(t=>{var e={};return r.d(e,t),e})({useCallback:()=>n.useCallback,useContext:()=>n.useContext,useDebugValue:()=>n.useDebugValue,useEffect:()=>n.useEffect,useId:()=>n.useId,useImperativeHandle:()=>n.useImperativeHandle,useLayoutEffect:()=>n.useLayoutEffect,useMemo:()=>n.useMemo,useReducer:()=>n.useReducer,useRef:()=>n.useRef,useState:()=>n.useState})},4142:(t,e,r)=>{t.exports=(t=>{var e={};return r.d(e,t),e})({Fragment:()=>o.Fragment,jsx:()=>o.jsx,jsxs:()=>o.jsxs})},3474:(t,e,r)=>{t.exports=(t=>{var e={};return r.d(e,t),e})({Component:()=>i.Component,Fragment:()=>i.Fragment,cloneElement:()=>i.cloneElement,createContext:()=>i.createContext,createElement:()=>i.createElement,createRef:()=>i.createRef,h:()=>i.h,hydrate:()=>i.hydrate,isValidElement:()=>i.isValidElement,options:()=>i.options,render:()=>i.render,toChildArray:()=>i.toChildArray})}};import a from"../runtime.js";import*as c from"../757.js";a.C(c);import*as u from"../323.js";a.C(u);import*as s from"../270.js";a.C(s);import*as l from"../965.js";a.C(l);import*as f from"../483.js";a.C(f);import*as h from"../774.js";a.C(h);import*as p from"./ShippingMethods.js";a.C(p);var y,d=(y=8539,a(a.s=y)),v=d.SG,m=d.fz,g=d.ZP,b=d.lJ;export{v as ShippingMethods,m as buildShippingMethod,g as default,b as getShippingMethodValue};
1
+ /*! Copyright 2024 Adobe
2
+ All Rights Reserved. */
3
+ import{jsx as n,jsxs as v,Fragment as T}from"@dropins/tools/preact-jsx-runtime.js";import"../chunks/store-config.js";import{s as k,e as S,c as W}from"../chunks/transform-store-config.js";import"../chunks/ServerErrorSignal.js";import{events as H}from"@dropins/tools/event-bus.js";import{classes as x,Slot as z}from"@dropins/tools/lib.js";import{s as B}from"../chunks/setShippingMethods.js";/* empty css */import{IllustratedMessage as R,Icon as V,ProgressSpinner as A,RadioButton as O,Price as P,Skeleton as D,SkeletonRow as L}from"@dropins/tools/components.js";import*as p from"@dropins/tools/preact-compat.js";import{useCallback as Z,useMemo as $,useEffect as q}from"@dropins/tools/preact-compat.js";import{useText as F}from"@dropins/tools/i18n.js";import{useState as N,useEffect as _}from"@dropins/tools/preact-hooks.js";import{w as G}from"../chunks/withConditionalRendering.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/errors.js";import"../chunks/synchronizeCheckout.js";import"../fragments.js";const J=e=>({countryCode:e.country_id,postCode:e.postcode||"",...e.region_id?{regionId:Number(e.region_id)}:{...e.region?{region:e.region}:{}}}),K=e=>({carrierCode:e.carrier.code||"",methodCode:e.code||"",amount:e.amount,amountExclTax:e.amountExclTax,amountInclTax:e.amountInclTax}),Q=e=>p.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M2.47266 4.90002H15.1851V10.9645H21.2495L23 12.715V17.6124H20.073",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),p.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M15.1758 5.87573H19.0019L21.0394 10.7636",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),p.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M9.76151 16.7898C9.76151 18.0525 8.72845 19.076 7.46582 19.076C6.20318 19.076 5.17969 18.0429 5.17969 16.7803C5.17969 15.5176 6.20318 14.4941 7.46582 14.4941C8.72845 14.4941 9.75195 15.5176 9.76151 16.7803C9.76151 16.7803 9.76151 16.7803 9.76151 16.7898Z",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),p.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M19.8726 16.7898C19.8726 18.062 18.8491 19.0855 17.5769 19.0855C16.3047 19.0855 15.2812 18.062 15.2812 16.7898C15.2812 15.5176 16.3047 14.4941 17.5769 14.4941C18.8491 14.4941 19.8726 15.5176 19.8726 16.7898Z",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),p.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M8.08792 7.63574H1.69824",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),p.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M7.11229 10.3619H1",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),p.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M5.16084 13.0402H1.92773",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),p.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M9.76172 16.7611H15.2809",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),p.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M2.38672 16.7611H5.17025",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"})),U=({className:e,isLoading:t=!1,onSelectionChange:s=()=>{},options:c,selection:l,...u})=>{const i=F({Title:"Checkout.ShippingMethods.title",EmptyState:"Checkout.ShippingMethods.emptyState"});return c===void 0?n(X,{}):v("div",{...u,className:x(["checkout-shipping-methods",e]),children:[n("h3",{className:"checkout-shipping-methods__title",children:i.Title}),!t&&c.length===0&&n(R,{icon:n(V,{source:Q}),message:n("p",{children:i.EmptyState})}),v("div",{className:x(["checkout-shipping-methods__content"]),children:[t&&n(A,{className:"checkout-shipping-methods__spinner"}),n("div",{className:x(["checkout-shipping-methods__options",["checkout-shipping-methods__options--loading",t]]),children:c.map(o=>n(O,{"data-testid":"shipping-method-radiobutton","aria-busy":t,id:o.value,name:"shipping-method",className:"checkout-shipping-methods__method",label:v(T,{children:[n(P,{amount:o.amount.value,currency:o.amount.currency})," ",n("span",{children:o.carrier.title})]}),description:o.title,value:o.value,checked:(l==null?void 0:l.value)===o.value,onChange:()=>s(o)},o.value))})]})]})},X=()=>v(D,{"data-testid":"shipping-methods-skeleton",children:[n(L,{variant:"heading",size:"small"}),n(L,{variant:"empty",size:"small"}),n(L,{size:"medium",fullWidth:!0}),n(L,{size:"medium",fullWidth:!0})]});function Y(){var a;const[e,t]=N(),[s,c]=N();_(()=>{H.on("checkout/estimate-shipping-address",({address:E,isValid:M})=>{t({address:E,isValid:M})})},[]),_(()=>{c(k.value)},[k.value]),_(()=>{S.value.pending?c(void 0):c(k.value)},[S.value.pending]);const{country_id:l,region_id:u,region:i,postcode:o}=(e==null?void 0:e.address)||{},r=!!e,g=W.value.data,C=!!((a=g==null?void 0:g.shippingAddresses)!=null&&a[0]),d=e==null?void 0:e.isValid;_(()=>{C||d||!s||!r||H.emit("shipping/estimate",{address:J({country_id:l,region_id:u,region:i,postcode:o}),shippingMethod:K(s)})},[s,l,u,i,o,r,C,d])}const j=(e,t)=>e.code===t.code&&e.carrier.code===t.carrier.code;function ee({preSelectedMethod:e,onShippingMethodSelect:t}){const s=W.value.data,c=W.value.pending,l=S.value.data,u=S.value.pending,i=k.value,o=s==null?void 0:s.shippingAddresses,r=o==null?void 0:o[0],g=!!r,C=r==null?void 0:r.availableShippingMethods,d=r==null?void 0:r.selectedShippingMethod,a=C||l,E=Z(m=>{if(!g)return;const f={method_code:m.code,carrier_code:m.carrier.code};B([f]).catch(b=>{console.error("Setting shipping methods on cart failed:",b)})},[g]),M=m=>{k.value=m,t==null||t(m)},h=$(()=>{if(!(a!=null&&a.length))return;const m=a[0],f=i||d;return f?a.some(w=>j(w,f))?f:m:a.find(y=>y.carrier.code===(e==null?void 0:e.carrierCode)&&y.code===(e==null?void 0:e.methodCode))||m},[i,d,a,e]);return q(()=>{h&&((!i||!j(h,i))&&(k.value=h,t==null||t(h)),(!d||!j(h,d))&&E(h))},[h,i,d,E,t]),{isLoading:c||u,options:a,selection:h,onSelectionChange:M}}const I=({preSelectedMethod:e,shippingMethodsSlot:t,onShippingMethodSelect:s,initialData:c,...l})=>{const{isLoading:u,options:i,selection:o,onSelectionChange:r}=ee({preSelectedMethod:e,onShippingMethodSelect:s});return Y(),v(T,{children:[n(U,{...l,isLoading:u,onSelectionChange:r,options:i,selection:o}),!u&&t&&n(z,{name:"ShippingMethods",slot:t})]})};I.displayName="ShippingMethodsContainer";const Ce=G(I);export{Ce as ShippingMethods,Ce as default};
@@ -0,0 +1,27 @@
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 './BillToShippingAddress';
18
+ export * from './ErrorBanner';
19
+ export * from './EstimateShipping';
20
+ export * from './LoginForm';
21
+ export * from './MergedCartBanner';
22
+ export * from './OutOfStock';
23
+ export * from './PaymentMethods';
24
+ export * from './PlaceOrder';
25
+ export * from './ServerError';
26
+ export * from './ShippingMethods';
27
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,21 @@
1
+ import { Region, Country, CustomAttribute } from '.';
2
+
3
+ export interface Address {
4
+ id?: number;
5
+ city: string;
6
+ company?: string;
7
+ country: Country;
8
+ customAttributes: CustomAttribute[];
9
+ firstName: string;
10
+ lastName: string;
11
+ postCode?: string;
12
+ region?: Region;
13
+ street: string[];
14
+ telephone?: string;
15
+ vatId?: string;
16
+ prefix?: string;
17
+ suffix?: string;
18
+ middleName?: string;
19
+ fax?: string;
20
+ }
21
+ //# sourceMappingURL=address.d.ts.map
@@ -0,0 +1,33 @@
1
+ import { CustomAttribute } from './custom-attribute';
2
+
3
+ export interface CartAddress {
4
+ city: string;
5
+ company?: string;
6
+ countryCode: string;
7
+ customAttributes: CustomAttribute[];
8
+ firstName: string;
9
+ lastName: string;
10
+ postcode?: string;
11
+ region?: string;
12
+ regionId?: number;
13
+ saveInAddressBook?: boolean;
14
+ street: string[];
15
+ telephone?: string;
16
+ vatId?: string;
17
+ prefix?: string;
18
+ suffix?: string;
19
+ middleName?: string;
20
+ fax?: string;
21
+ }
22
+ export interface ShippingAddressInput {
23
+ address?: CartAddress;
24
+ customerAddressId?: number;
25
+ pickupLocationCode?: string;
26
+ }
27
+ export interface BillingAddressInput {
28
+ address?: CartAddress;
29
+ customerAddressId?: number;
30
+ sameAsShipping?: boolean;
31
+ useForShipping?: boolean;
32
+ }
33
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1,19 @@
1
+ import { Address, PaymentMethod, ShippingMethod } from '.';
2
+
3
+ export interface ShippingAddress extends Address {
4
+ availableShippingMethods?: ShippingMethod[];
5
+ selectedShippingMethod?: ShippingMethod;
6
+ sameAsBilling?: boolean;
7
+ }
8
+ export interface Cart {
9
+ availablePaymentMethods?: PaymentMethod[];
10
+ billingAddress?: Address;
11
+ email?: string;
12
+ id: string;
13
+ isEmpty: boolean;
14
+ isGuest: boolean;
15
+ isVirtual: boolean;
16
+ selectedPaymentMethod?: PaymentMethod;
17
+ shippingAddresses?: ShippingAddress[];
18
+ }
19
+ //# sourceMappingURL=cart.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 type Country = {
18
+ value: string;
19
+ label: string;
20
+ };
21
+ //# sourceMappingURL=country.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 type CustomAttribute = {
18
+ code: string;
19
+ value: string;
20
+ };
21
+ //# sourceMappingURL=custom-attribute.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
+ export interface Customer {
18
+ firstName: string;
19
+ lastName: string;
20
+ email: string;
21
+ }
22
+ //# sourceMappingURL=customer.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 type EmailAvailability = boolean;
18
+ //# sourceMappingURL=email-availability.d.ts.map
@@ -0,0 +1,30 @@
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 './address';
18
+ export * from './api';
19
+ export * from './cart';
20
+ export * from './country';
21
+ export * from './custom-attribute';
22
+ export * from './customer';
23
+ export * from './email-availability';
24
+ export * from './payment-method';
25
+ export * from './price';
26
+ export * from './region';
27
+ export * from './shipping-estimate';
28
+ export * from './shipping-method';
29
+ export * from './store-config';
30
+ //# 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 type PaymentMethod = {
18
+ code: string;
19
+ title: string;
20
+ };
21
+ //# sourceMappingURL=payment-method.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 type Price = {
18
+ value: number;
19
+ currency: string;
20
+ };
21
+ //# sourceMappingURL=price.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
+ export type Region = {
18
+ code: string;
19
+ id?: number;
20
+ name: string;
21
+ };
22
+ //# sourceMappingURL=region.d.ts.map
@@ -0,0 +1,17 @@
1
+ import { Price } from './price';
2
+
3
+ export interface ShippingEstimatePartialAddress {
4
+ countryCode: string;
5
+ postCode?: string;
6
+ region?: string;
7
+ regionCode?: string;
8
+ regionId?: number;
9
+ }
10
+ export interface ShippingEstimateShippingMethod {
11
+ amount: Price;
12
+ carrierCode: string;
13
+ methodCode: string;
14
+ amountExclTax?: Price;
15
+ amountInclTax?: Price;
16
+ }
17
+ //# sourceMappingURL=shipping-estimate.d.ts.map
@@ -0,0 +1,19 @@
1
+ import { Price } from './price';
2
+
3
+ type Code = string;
4
+ type Title = string;
5
+ type Carrier = {
6
+ code: Code;
7
+ title: Title;
8
+ };
9
+ export type ShippingMethod = {
10
+ amount: Price;
11
+ carrier: Carrier;
12
+ code: Code;
13
+ title: Title;
14
+ value: string;
15
+ amountExclTax?: Price;
16
+ amountInclTax?: Price;
17
+ };
18
+ export {};
19
+ //# sourceMappingURL=shipping-method.d.ts.map
@@ -0,0 +1,30 @@
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 enum TaxDisplay {
18
+ EXCLUDING_TAX = "EXCLUDING_TAX",
19
+ INCLUDING_EXCLUDING_TAX = "INCLUDING_AND_EXCLUDING_TAX",
20
+ INCLUDING_TAX = "INCLUDING_TAX"
21
+ }
22
+ export interface StoreConfig {
23
+ defaultCountry: string;
24
+ isGuestCheckoutEnabled: boolean;
25
+ isOnePageCheckoutEnabled: boolean;
26
+ shoppingCartDisplaySetting: {
27
+ shipping: TaxDisplay;
28
+ };
29
+ }
30
+ //# sourceMappingURL=store-config.d.ts.map
@@ -0,0 +1,24 @@
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 './transform-address';
18
+ export * from './transform-cart';
19
+ export * from './transform-customer';
20
+ export * from './transform-email-availability';
21
+ export * from './transform-shipping-estimate';
22
+ export * from './transform-shipping-methods';
23
+ export * from './transform-store-config';
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,95 @@
1
+ import { CartAddressInput, GetCartQuery } from '../../__generated__/types';
2
+ import { Address as AddressModel, CustomAttribute as CustomAttributeModel, ShippingAddress as ShippingAddressModel, CartAddress as CartAddressModel } from '../models';
3
+
4
+ type ShippingAddresses = NonNullable<GetCartQuery['cart']>['shipping_addresses'];
5
+ type ShippingAddress = ShippingAddresses[0];
6
+ type NonNullableShippingAddress = NonNullable<ShippingAddress>;
7
+ type BillingAddress = NonNullable<GetCartQuery['cart']>['billing_address'];
8
+ type NonNullableBillingAddress = NonNullable<BillingAddress>;
9
+ type CustomAttributes = NonNullableShippingAddress['custom_attributes'] | NonNullableBillingAddress['custom_attributes'];
10
+ export declare const transformCustomAttributes: (data: CustomAttributes) => CustomAttributeModel[];
11
+ declare const transformBillingAddress: (data: BillingAddress) => AddressModel | undefined;
12
+ declare const transformShippingAddresses: (data: ({
13
+ __typename?: "ShippingCartAddress" | undefined;
14
+ id?: number | null | undefined;
15
+ firstname: string;
16
+ lastname: string;
17
+ company?: string | null | undefined;
18
+ street: (string | null)[];
19
+ city: string;
20
+ postcode?: string | null | undefined;
21
+ vat_id?: string | null | undefined;
22
+ telephone?: string | null | undefined;
23
+ same_as_billing: boolean;
24
+ prefix?: string | null | undefined;
25
+ suffix?: string | null | undefined;
26
+ middlename?: string | null | undefined;
27
+ fax?: string | null | undefined;
28
+ region?: {
29
+ __typename?: "CartAddressRegion" | undefined;
30
+ region_id?: number | null | undefined;
31
+ code?: string | null | undefined;
32
+ label?: string | null | undefined;
33
+ } | null | undefined;
34
+ country: {
35
+ __typename?: "CartAddressCountry" | undefined;
36
+ code: string;
37
+ label: string;
38
+ };
39
+ custom_attributes: ({
40
+ __typename?: "AttributeSelectedOptions" | undefined;
41
+ } | {
42
+ __typename?: "AttributeValue" | undefined;
43
+ code: string;
44
+ value: string;
45
+ } | null)[];
46
+ available_shipping_methods?: ({
47
+ __typename?: "AvailableShippingMethod" | undefined;
48
+ available: boolean;
49
+ carrier_code: string;
50
+ carrier_title: string;
51
+ error_message?: string | null | undefined;
52
+ method_code?: string | null | undefined;
53
+ method_title?: string | null | undefined;
54
+ amount: {
55
+ __typename?: "Money" | undefined;
56
+ currency?: import('../../__generated__/types').CurrencyEnum | null | undefined;
57
+ value?: number | null | undefined;
58
+ };
59
+ price_excl_tax: {
60
+ __typename?: "Money" | undefined;
61
+ value?: number | null | undefined;
62
+ currency?: import('../../__generated__/types').CurrencyEnum | null | undefined;
63
+ };
64
+ price_incl_tax: {
65
+ __typename?: "Money" | undefined;
66
+ value?: number | null | undefined;
67
+ currency?: import('../../__generated__/types').CurrencyEnum | null | undefined;
68
+ };
69
+ } | null)[] | null | undefined;
70
+ selected_shipping_method?: {
71
+ __typename?: "SelectedShippingMethod" | undefined;
72
+ carrier_code: string;
73
+ carrier_title: string;
74
+ method_code: string;
75
+ method_title: string;
76
+ amount: {
77
+ __typename?: "Money" | undefined;
78
+ value?: number | null | undefined;
79
+ currency?: import('../../__generated__/types').CurrencyEnum | null | undefined;
80
+ };
81
+ price_excl_tax: {
82
+ __typename?: "Money" | undefined;
83
+ value?: number | null | undefined;
84
+ currency?: import('../../__generated__/types').CurrencyEnum | null | undefined;
85
+ };
86
+ price_incl_tax: {
87
+ __typename?: "Money" | undefined;
88
+ value?: number | null | undefined;
89
+ currency?: import('../../__generated__/types').CurrencyEnum | null | undefined;
90
+ };
91
+ } | null | undefined;
92
+ } | null)[]) => ShippingAddressModel[] | undefined;
93
+ declare const transformCartAddressModelToInput: (address: CartAddressModel) => CartAddressInput;
94
+ export { BillingAddress, ShippingAddress, transformCartAddressModelToInput, transformBillingAddress, transformShippingAddresses, };
95
+ //# sourceMappingURL=transform-address.d.ts.map
@@ -0,0 +1,7 @@
1
+ import { GetCartQuery } from '../../__generated__/types';
2
+ import { Cart as CartModel } from '../models';
3
+
4
+ type Cart = NonNullable<GetCartQuery['cart']>;
5
+ declare const transformCart: (data: Cart) => CartModel | undefined;
6
+ export { Cart, transformCart };
7
+ //# sourceMappingURL=transform-cart.d.ts.map
@@ -0,0 +1,7 @@
1
+ import { Customer as CustomerModel } from '../models';
2
+ import { GetCustomerQuery } from '../../__generated__/types';
3
+
4
+ type Customer = GetCustomerQuery['customer'];
5
+ declare const transformCustomer: (data: Customer) => CustomerModel | undefined;
6
+ export { Customer, transformCustomer };
7
+ //# sourceMappingURL=transform-customer.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { IsEmailAvailableQuery } from '../../__generated__/types';
2
+ import { EmailAvailability } from '../models';
3
+
4
+ declare const transformEmailAvailability: (data: IsEmailAvailableQuery['isEmailAvailable']) => EmailAvailability;
5
+ export { transformEmailAvailability };
6
+ //# sourceMappingURL=transform-email-availability.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { GetCartQuery } from '../../__generated__/types';
2
+ import { PaymentMethod } from '../models/payment-method';
3
+
4
+ type SelectedPaymentMethod = NonNullable<GetCartQuery['cart']>['selected_payment_method'];
5
+ type AvailablePaymentMethods = NonNullable<GetCartQuery['cart']>['available_payment_methods'];
6
+ declare const transformSelectedPaymentMethod: (data: SelectedPaymentMethod) => PaymentMethod | undefined;
7
+ declare const transformAvailablePaymentMethods: (data: AvailablePaymentMethods) => PaymentMethod[] | undefined;
8
+ export { transformAvailablePaymentMethods, transformSelectedPaymentMethod };
9
+ //# sourceMappingURL=transform-payment-methods.d.ts.map