@dropins/storefront-checkout 0.1.0-alpha8 → 1.0.0-beta1

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 (282) 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 +34 -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 +40 -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/fetch-graphql.js +12 -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/withConditionalRendering.js +3 -0
  73. package/components/BillToShippingAddress/BillToShippingAddress.d.ts +9 -0
  74. package/components/BillToShippingAddress/BillToShippingAddressSkeleton.d.ts +4 -0
  75. package/components/BillToShippingAddress/index.d.ts +20 -0
  76. package/components/EstimateShipping/EstimateShipping.d.ts +12 -0
  77. package/components/EstimateShipping/EstimateShippingSkeleton.d.ts +4 -0
  78. package/components/EstimateShipping/index.d.ts +20 -0
  79. package/components/LoginForm/Email.d.ts +13 -0
  80. package/components/LoginForm/LoginForm.d.ts +20 -0
  81. package/components/LoginForm/LoginFormSkeleton.d.ts +4 -0
  82. package/components/LoginForm/SignIn.d.ts +8 -0
  83. package/components/LoginForm/SignOut.d.ts +8 -0
  84. package/components/LoginForm/index.d.ts +22 -0
  85. package/components/OutOfStock/OutOfStock.d.ts +11 -0
  86. package/components/OutOfStock/index.d.ts +19 -0
  87. package/components/PaymentMethods/PaymentMethods.d.ts +14 -0
  88. package/components/PaymentMethods/PaymentMethodsSkeleton.d.ts +4 -0
  89. package/components/PaymentMethods/index.d.ts +20 -0
  90. package/components/PlaceOrder/PlaceOrder.d.ts +9 -0
  91. package/components/PlaceOrder/PlaceOrderSkeleton.d.ts +4 -0
  92. package/components/PlaceOrder/index.d.ts +19 -0
  93. package/components/ServerError/ServerError.d.ts +10 -0
  94. package/components/ServerError/index.d.ts +19 -0
  95. package/components/ShippingMethods/ShippingMethods.d.ts +12 -0
  96. package/components/ShippingMethods/ShippingMethodsSkeleton.d.ts +4 -0
  97. package/components/ShippingMethods/index.d.ts +20 -0
  98. package/components/index.d.ts +25 -0
  99. package/containers/BillToShippingAddress/BillToShippingAddress.d.ts +24 -0
  100. package/containers/BillToShippingAddress/index.d.ts +19 -0
  101. package/containers/BillToShippingAddress.d.ts +3 -0
  102. package/containers/BillToShippingAddress.js +3 -1
  103. package/containers/ErrorBanner/ErrorBanner.d.ts +5 -0
  104. package/containers/ErrorBanner/index.d.ts +19 -0
  105. package/containers/ErrorBanner.d.ts +3 -0
  106. package/containers/ErrorBanner.js +3 -0
  107. package/containers/EstimateShipping/EstimateShipping.d.ts +4 -0
  108. package/containers/EstimateShipping/index.d.ts +19 -0
  109. package/containers/EstimateShipping.d.ts +3 -0
  110. package/containers/EstimateShipping.js +3 -0
  111. package/containers/LoginForm/LoginForm.d.ts +11 -0
  112. package/containers/LoginForm/index.d.ts +19 -0
  113. package/containers/LoginForm.d.ts +3 -0
  114. package/containers/LoginForm.js +3 -1
  115. package/containers/MergedCartBanner/MergedCartBanner.d.ts +7 -0
  116. package/containers/MergedCartBanner/index.d.ts +19 -0
  117. package/containers/MergedCartBanner.d.ts +3 -0
  118. package/containers/MergedCartBanner.js +3 -0
  119. package/containers/OutOfStock/OutOfStock.d.ts +13 -0
  120. package/containers/OutOfStock/index.d.ts +19 -0
  121. package/containers/OutOfStock.d.ts +3 -0
  122. package/containers/OutOfStock.js +3 -0
  123. package/containers/PaymentMethods/PaymentMethods.d.ts +27 -0
  124. package/containers/PaymentMethods/defaultHandlers.d.ts +4 -0
  125. package/containers/PaymentMethods/index.d.ts +19 -0
  126. package/containers/PaymentMethods.d.ts +3 -0
  127. package/containers/PaymentMethods.js +3 -1
  128. package/containers/PlaceOrder/PlaceOrder.d.ts +16 -0
  129. package/containers/PlaceOrder/index.d.ts +19 -0
  130. package/containers/PlaceOrder.d.ts +3 -0
  131. package/containers/PlaceOrder.js +3 -2
  132. package/containers/ServerError/ServerError.d.ts +8 -0
  133. package/containers/ServerError/index.d.ts +19 -0
  134. package/containers/ServerError.d.ts +3 -0
  135. package/containers/ServerError.js +3 -0
  136. package/containers/ShippingMethods/ShippingMethods.d.ts +17 -0
  137. package/containers/ShippingMethods/hooks/useShippingEstimateEventEmitter.d.ts +19 -0
  138. package/containers/ShippingMethods/index.d.ts +19 -0
  139. package/containers/ShippingMethods.d.ts +3 -0
  140. package/containers/ShippingMethods.js +3 -1
  141. package/containers/index.d.ts +27 -0
  142. package/data/models/address.d.ts +21 -0
  143. package/data/models/api.d.ts +33 -0
  144. package/data/models/cart.d.ts +19 -0
  145. package/data/models/country.d.ts +21 -0
  146. package/data/models/custom-attribute.d.ts +21 -0
  147. package/data/models/customer.d.ts +22 -0
  148. package/data/models/email-availability.d.ts +18 -0
  149. package/data/models/index.d.ts +30 -0
  150. package/data/models/payment-method.d.ts +21 -0
  151. package/data/models/price.d.ts +21 -0
  152. package/data/models/region.d.ts +22 -0
  153. package/data/models/shipping-estimate.d.ts +17 -0
  154. package/data/models/shipping-method.d.ts +19 -0
  155. package/data/models/store-config.d.ts +30 -0
  156. package/data/transforms/index.d.ts +24 -0
  157. package/data/transforms/transform-address.d.ts +95 -0
  158. package/data/transforms/transform-cart.d.ts +7 -0
  159. package/data/transforms/transform-customer.d.ts +7 -0
  160. package/data/transforms/transform-email-availability.d.ts +6 -0
  161. package/data/transforms/transform-payment-methods.d.ts +9 -0
  162. package/data/transforms/transform-shipping-estimate.d.ts +5 -0
  163. package/data/transforms/transform-shipping-methods.d.ts +14 -0
  164. package/data/transforms/transform-store-config.d.ts +6 -0
  165. package/fragments.d.ts +1 -0
  166. package/fragments.js +134 -0
  167. package/hocs/index.d.ts +18 -0
  168. package/hocs/withConditionalRendering.d.ts +13 -0
  169. package/hooks/index.d.ts +20 -0
  170. package/hooks/useBreakpoint/index.d.ts +18 -0
  171. package/hooks/useBreakpoint/useBreakpoint.d.ts +18 -0
  172. package/hooks/useLockScroll/index.d.ts +18 -0
  173. package/hooks/useLockScroll/useLockScroll.d.ts +21 -0
  174. package/hooks/useStableList/index.d.ts +2 -0
  175. package/hooks/useStableList/useStableList.d.ts +2 -0
  176. package/i18n/en_US.json.d.ts +79 -0
  177. package/lib/fetch-error.d.ts +23 -0
  178. package/lib/index.d.ts +21 -0
  179. package/lib/network-error.d.ts +22 -0
  180. package/lib/state.d.ts +24 -0
  181. package/lib/validation.d.ts +5 -0
  182. package/msw/browser.d.ts +18 -0
  183. package/msw/fixtures/fragments/available-shipping-methods.d.ts +23 -0
  184. package/msw/fixtures/fragments/billing-address.d.ts +60 -0
  185. package/msw/fixtures/fragments/cart.d.ts +149 -0
  186. package/msw/fixtures/fragments/index.d.ts +21 -0
  187. package/msw/fixtures/fragments/shipping-address.d.ts +62 -0
  188. package/msw/fixtures/index.d.ts +20 -0
  189. package/msw/fixtures/mutations/estimate-shipping-methods.d.ts +4 -0
  190. package/msw/fixtures/mutations/index.d.ts +23 -0
  191. package/msw/fixtures/mutations/set-billing-address.d.ts +5 -0
  192. package/msw/fixtures/mutations/set-guest-email.d.ts +4 -0
  193. package/msw/fixtures/mutations/set-payment-method.d.ts +4 -0
  194. package/msw/fixtures/mutations/set-shipping-address.d.ts +4 -0
  195. package/msw/fixtures/mutations/set-shipping-methods.d.ts +4 -0
  196. package/msw/fixtures/queries/get-cart.d.ts +4 -0
  197. package/msw/fixtures/queries/get-customer-cart-stock-status.d.ts +4 -0
  198. package/msw/fixtures/queries/get-customer.d.ts +5 -0
  199. package/msw/fixtures/queries/get-stock-status.d.ts +4 -0
  200. package/msw/fixtures/queries/get-store-config.d.ts +4 -0
  201. package/msw/fixtures/queries/index.d.ts +23 -0
  202. package/msw/fixtures/queries/is-email-available.d.ts +4 -0
  203. package/msw/handlers.d.ts +4 -0
  204. package/msw/server.d.ts +18 -0
  205. package/package.json +1 -1
  206. package/render/Provider.d.ts +8 -0
  207. package/render/index.d.ts +18 -0
  208. package/render/render.d.ts +6 -0
  209. package/render.d.ts +1 -0
  210. package/render.js +9 -1
  211. package/signals/CartSignal.d.ts +7 -0
  212. package/signals/CustomerSignal.d.ts +7 -0
  213. package/signals/EstimateShippingMethodsSignal.d.ts +7 -0
  214. package/signals/IsBillToShippingSignal.d.ts +18 -0
  215. package/signals/SelectedPaymentMethodSignal.d.ts +18 -0
  216. package/signals/SelectedShippingMethodSignal.d.ts +4 -0
  217. package/signals/ServerErrorSignal.d.ts +18 -0
  218. package/signals/StoreConfigSignal.d.ts +7 -0
  219. package/signals/index.d.ts +25 -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/139.js +0 -1
  242. package/213.js +0 -2
  243. package/213.js.LICENSE.txt +0 -1
  244. package/292.js +0 -2
  245. package/292.js.LICENSE.txt +0 -1
  246. package/350.js +0 -2
  247. package/350.js.LICENSE.txt +0 -1
  248. package/357.js +0 -1
  249. package/393.js +0 -2
  250. package/393.js.LICENSE.txt +0 -1
  251. package/4.js +0 -1
  252. package/41.js +0 -2
  253. package/41.js.LICENSE.txt +0 -1
  254. package/43.js +0 -1
  255. package/483.js +0 -2
  256. package/483.js.LICENSE.txt +0 -1
  257. package/494.js +0 -2
  258. package/494.js.LICENSE.txt +0 -1
  259. package/516.js +0 -1
  260. package/549.js +0 -2
  261. package/549.js.LICENSE.txt +0 -1
  262. package/584.js +0 -1
  263. package/636.js +0 -2
  264. package/636.js.LICENSE.txt +0 -1
  265. package/687.js +0 -2
  266. package/687.js.LICENSE.txt +0 -1
  267. package/693.js +0 -1
  268. package/731.js +0 -1
  269. package/802.js +0 -2
  270. package/802.js.LICENSE.txt +0 -1
  271. package/805.js +0 -2
  272. package/805.js.LICENSE.txt +0 -1
  273. package/88.js +0 -2
  274. package/88.js.LICENSE.txt +0 -1
  275. package/api.js.LICENSE.txt +0 -3
  276. package/containers/BillingForm.js +0 -1
  277. package/containers/Checkout.js +0 -2
  278. package/containers/Checkout.js.LICENSE.txt +0 -1
  279. package/containers/OrderSummary.js +0 -1
  280. package/containers/PlaceOrder.js.LICENSE.txt +0 -1
  281. package/containers/ShippingForm.js +0 -1
  282. package/runtime.js +0 -1
@@ -0,0 +1,3 @@
1
+ /*! Copyright 2024 Adobe
2
+ All Rights Reserved. */
3
+ import*as e from"@dropins/tools/preact-compat.js";const t=r=>e.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},e.createElement("g",{clipPath:"url(#clip0_4797_15331)"},e.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M10.25 20.91L1.5 17.55V6.51996L10.25 9.92996V20.91Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),e.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M6.24023 4.64001L14.9902 8.06001V11.42",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),e.createElement("path",{className:"error-icon",vectorEffect:"non-scaling-stroke",d:"M19 13.31L15.5 19.37H22.5L19 13.31Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),e.createElement("path",{className:"error-icon",vectorEffect:"non-scaling-stroke",d:"M19.0202 17.11H18.9802L18.9502 15.56H19.0502L19.0202 17.11ZM18.9602 18.29V18.06H19.0502V18.29H18.9602Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),e.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M19 12.16V6.51996L10.25 9.92996V20.91L14.27 19.37L14.4 19.32",stroke:"currentColor",strokeLinejoin:"round"}),e.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M1.5 6.51999L10.25 3.04999L19 6.51999L10.25 9.92999L1.5 6.51999Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),e.createElement("defs",null,e.createElement("clipPath",{id:"clip0_4797_15331"},e.createElement("rect",{width:22,height:18.86,fill:"white",transform:"translate(1 2.54999)"}))));export{t as S};
@@ -0,0 +1,3 @@
1
+ /*! Copyright 2024 Adobe
2
+ All Rights Reserved. */
3
+ import{signal as r}from"@dropins/tools/signals.js";const s=r();export{s};
@@ -0,0 +1,3 @@
1
+ /*! Copyright 2024 Adobe
2
+ All Rights Reserved. */
3
+ const e=n=>n.reduce((s,r)=>{if(!r)return s;if(typeof r=="string"&&(s+=` ${r}`),Array.isArray(r)){const[c,a]=r;c&&a&&(s+=` ${c}`)}return s},"").trim();export{e as c};
@@ -0,0 +1,12 @@
1
+ /*! Copyright 2024 Adobe
2
+ All Rights Reserved. */
3
+ import{c as T,b as q,e as b,d as v,T as l}from"./store-config.js";import"./ServerErrorSignal.js";import{events as A}from"@dropins/tools/event-bus.js";import"@dropins/tools/lib.js";import{FetchGraphQL as G}from"@dropins/tools/fetch-graphql.js";const x={authenticated:!1,cartId:null,initialized:!1},j=new Proxy(x,{set(e,t,s){return e[t]=s,!0},get(e,t){return e[t]}});class D extends Error{constructor(t){super(t.map(s=>s.message).join(" ")),this.name="FetchError"}}class i extends Error{constructor(t){super(t),this.name="InvalidArgument"}}class B extends Error{constructor(t){super(t),this.name="UnexpectedError"}}class z extends i{constructor(){super("Cart ID is required")}}class Y extends i{constructor(){super("Email is required")}}class $ extends i{constructor(){super("Payment method code is required")}}class J extends i{constructor(){super("Shipping address is required")}}class K extends i{constructor(){super("Billing address is required")}}class W extends i{constructor(){super("Country Code is required")}}const y={cartUpdate:{requests:[]},default:{requests:[]}};function k(e,t="default"){const s=y[t];return new Promise((r,a)=>{s.requests.push(e);const u=()=>{s.requests[0]===e?e().then(r).catch(a).finally(()=>{var o;s.requests.shift(),s.requests.length===0?(o=s.onComplete)==null||o.call(s):u()}):setTimeout(u,100)};u()})}function Z(e,t){const s=y[e];s.onComplete=t}const w=["sender_email","recipient_email"];function I(e){return e.filter(t=>!t.path||!w.some(s=>{var r;return((r=t.path)==null?void 0:r.at(-1))===s}))}const C=e=>{throw e instanceof DOMException&&e.name==="AbortError"||A.emit("error",{source:"checkout",type:"network",error:e}),e},U={cart:T,customer:q,estimateShippingMethods:b,storeConfig:v};function M(e,t){return t.split(".").reduce((s,r)=>s&&s[r]!==void 0?s[r]:void 0,e)}const E={cart:null,customer:null,estimateShippingMethods:null,storeConfig:null};async function N(e){const{defaultValueOnFail:t,options:s,path:r,query:a,queueName:u,signalType:o,transformer:h,type:S}=e,n=U[o],g=Symbol();E[o]=g,n.value={...n.value,pending:!0};try{const{data:p,errors:f}=await(S==="mutation"?k(()=>_(a,s).catch(C),u):_(a,{method:"GET",cache:"no-cache",...s}).catch(C));if(f){const m=I(f);if(m.length>0)throw new D(m)}let c=M(p,r);if(c===void 0)throw new Error(`No data found at path: ${r}`);return h&&(c=h(c)),n.value={...n.value,data:c},setTimeout(()=>{n.value={...n.value,pending:E[o]===g?!1:n.value.pending}},0),c}catch(p){if(t)return n.value={pending:!1,data:t},t;if(p.name==="AbortError")return;throw n.value={...n.value,pending:!1},p}}const F=`
4
+ query getStoreConfig {
5
+ storeConfig {
6
+ default_country
7
+ is_guest_checkout_enabled
8
+ is_one_page_checkout_enabled
9
+ shopping_cart_display_shipping
10
+ }
11
+ }
12
+ `,L="US",d={defaultCountry:L,isGuestCheckoutEnabled:!1,isOnePageCheckoutEnabled:!1,shoppingCartDisplaySetting:{shipping:l.EXCLUDING_TAX}},ee=async()=>await N({type:"query",query:F,options:{method:"GET",cache:"no-cache"},path:"storeConfig",signalType:"storeConfig",transformer:P,defaultValueOnFail:d});function O(e){switch(e){case 1:return l.EXCLUDING_TAX;case 2:return l.INCLUDING_TAX;case 3:return l.INCLUDING_EXCLUDING_TAX;default:return l.EXCLUDING_TAX}}function P(e){if(!e)return d;const{default_country:t,is_guest_checkout_enabled:s,is_one_page_checkout_enabled:r,shopping_cart_display_shipping:a}=e;return{defaultCountry:t||d.defaultCountry,isGuestCheckoutEnabled:s||d.isGuestCheckoutEnabled,isOnePageCheckoutEnabled:r||d.isOnePageCheckoutEnabled,shoppingCartDisplaySetting:{shipping:O(a)}}}const{setEndpoint:te,setFetchGraphQlHeader:se,removeFetchGraphQlHeader:re,setFetchGraphQlHeaders:ne,fetchGraphQl:_,getConfig:ae}=new G().getMethods();export{L as D,D as F,i as I,z as M,d as S,B as U,W as a,J as b,Y as c,N as d,$ as e,K as f,te as g,se as h,ne as i,_ as j,ae as k,ee as l,C as m,Z as n,re as r,j as s};
@@ -0,0 +1,13 @@
1
+ /*! Copyright 2024 Adobe
2
+ All Rights Reserved. */
3
+ import{s as e,M as d,f as o,d as l}from"./fetch-graphql.js";import{CHECKOUT_DATA_FRAGMENT as p}from"../fragments.js";import{a as u,b as c}from"./synchronizeCheckout.js";import"./store-config.js";import"./ServerErrorSignal.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/lib.js";const f=`
4
+ mutation setBillingAddress($input: SetBillingAddressOnCartInput!) {
5
+ setBillingAddressOnCart(input: $input) {
6
+ cart {
7
+ ...CHECKOUT_DATA_FRAGMENT
8
+ }
9
+ }
10
+ }
11
+
12
+ ${p}
13
+ `,h=async({address:i,customerAddressId:t,sameAsShipping:s=!1,useForShipping:n=!1})=>{const r=e.cartId;if(!r)throw new d;const a={cart_id:r,billing_address:{same_as_shipping:s,use_for_shipping:n}};if(!s&&t&&(a.billing_address.customer_address_id=t),!s&&!t){if(!i)throw new o;a.billing_address.address=u(i)}return await l({options:{variables:{input:a}},path:"setBillingAddressOnCart.cart",query:f,queueName:"cartUpdate",signalType:"cart",transformer:c,type:"mutation"})};export{f as a,h as s};
@@ -0,0 +1,19 @@
1
+ /*! Copyright 2024 Adobe
2
+ All Rights Reserved. */
3
+ import{c as e,j as r,m as s,s as l,M as o,d as n}from"./fetch-graphql.js";import"./store-config.js";import"./ServerErrorSignal.js";import"@dropins/tools/lib.js";import"@dropins/tools/event-bus.js";import{CHECKOUT_DATA_FRAGMENT as m}from"../fragments.js";import{b as c}from"./synchronizeCheckout.js";const u=a=>!!(a!=null&&a.is_email_available),p=`
4
+ query isEmailAvailable($email: String!) {
5
+ isEmailAvailable(email: $email) {
6
+ is_email_available
7
+ }
8
+ }
9
+ `,E=a=>{if(!(!a||a.length===0))throw Error(a.map(t=>t.message).join(" "))},_=async a=>{if(!a)throw new e;const{data:t,errors:i}=await r(p,{method:"GET",cache:"no-cache",variables:{email:a}}).catch(s);return i&&E(i),u(t.isEmailAvailable)},h=`
10
+ mutation setGuestEmail($cartId: String!, $email: String!) {
11
+ setGuestEmailOnCart(input: { cart_id: $cartId, email: $email }) {
12
+ cart {
13
+ ...CHECKOUT_DATA_FRAGMENT
14
+ }
15
+ }
16
+ }
17
+
18
+ ${m}
19
+ `,g=async a=>{const t=l.cartId;if(!t)throw new o;return await n({options:{variables:{cartId:t,email:a}},path:"setGuestEmailOnCart.cart",query:h,queueName:"cartUpdate",signalType:"cart",transformer:c,type:"mutation"})};export{_ as i,g as s};
@@ -0,0 +1,18 @@
1
+ /*! Copyright 2024 Adobe
2
+ All Rights Reserved. */
3
+ import{s as e,M as r,e as o,d as n}from"./fetch-graphql.js";import{CHECKOUT_DATA_FRAGMENT as s}from"../fragments.js";import{b as i}from"./synchronizeCheckout.js";import"./store-config.js";import"./ServerErrorSignal.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/lib.js";const m=`
4
+ mutation setPaymentMethod(
5
+ $cartId: String!
6
+ $paymentMethod: PaymentMethodInput!
7
+ ) {
8
+ setPaymentMethodOnCart(
9
+ input: { cart_id: $cartId, payment_method: $paymentMethod }
10
+ ) {
11
+ cart {
12
+ ...CHECKOUT_DATA_FRAGMENT
13
+ }
14
+ }
15
+ }
16
+
17
+ ${s}
18
+ `,f=async t=>{const a=e.cartId;if(!a)throw new r;if(!t)throw new o;return await n({options:{variables:{cartId:a,paymentMethod:t}},path:"setPaymentMethodOnCart.cart",query:m,queueName:"cartUpdate",signalType:"cart",transformer:i,type:"mutation"})};export{f as s};
@@ -0,0 +1,18 @@
1
+ /*! Copyright 2024 Adobe
2
+ All Rights Reserved. */
3
+ import{s as i,M as p,d as s}from"./fetch-graphql.js";import"./store-config.js";import"./ServerErrorSignal.js";import{b as r}from"./synchronizeCheckout.js";import"@dropins/tools/lib.js";import"@dropins/tools/event-bus.js";import{CHECKOUT_DATA_FRAGMENT as o}from"../fragments.js";const e=`
4
+ mutation setShippingMethods(
5
+ $cartId: String!
6
+ $shippingMethods: [ShippingMethodInput]!
7
+ ) {
8
+ setShippingMethodsOnCart(
9
+ input: { cart_id: $cartId, shipping_methods: $shippingMethods }
10
+ ) {
11
+ cart {
12
+ ...CHECKOUT_DATA_FRAGMENT
13
+ }
14
+ }
15
+ }
16
+
17
+ ${o}
18
+ `,C=async a=>{const t=i.cartId;if(!t)throw new p;return await s({type:"mutation",query:e,queueName:"cartUpdate",options:{variables:{cartId:t,shippingMethods:a}},path:"setShippingMethodsOnCart.cart",signalType:"cart",transformer:r})};export{C as s};
@@ -0,0 +1,3 @@
1
+ /*! Copyright 2024 Adobe
2
+ All Rights Reserved. */
3
+ import{signal as e,effect as i}from"@dropins/tools/signals.js";const n=e(!0),t=e({pending:!1,data:void 0});i(()=>{var a;(a=t.value.data)!=null&&a.isVirtual&&(n.value=!1)});const d=e({pending:!1,data:void 0}),l=e({pending:!1,data:void 0}),g=e(),c=e(void 0),N=e({data:void 0,pending:!1});var s=(a=>(a.EXCLUDING_TAX="EXCLUDING_TAX",a.INCLUDING_EXCLUDING_TAX="INCLUDING_AND_EXCLUDING_TAX",a.INCLUDING_TAX="INCLUDING_TAX",a))(s||{});export{s as T,g as a,d as b,t as c,N as d,l as e,n as i,c as s};
@@ -0,0 +1,27 @@
1
+ /*! Copyright 2024 Adobe
2
+ All Rights Reserved. */
3
+ import{s as i,M as C,d as l,l as A,n as x}from"./fetch-graphql.js";import{b,d as M,c}from"./store-config.js";import"./ServerErrorSignal.js";import{events as o}from"@dropins/tools/event-bus.js";import{merge as u,Initializer as T}from"@dropins/tools/lib.js";import{CHECKOUT_DATA_FRAGMENT as a,CUSTOMER_FRAGMENT as S}from"../fragments.js";const I=async(e=!1)=>{i.authenticated=e,e?await K():b.value={pending:!1,data:null}},N=e=>e==null,E=(e,t)=>e.amount.value-t.amount.value,m=e=>!(!e||!e.method_code||!e.method_title||N(e.amount.value)||!e.amount.currency),f=e=>({amount:{value:e.amount.value,currency:e.amount.currency},title:e.method_title,code:e.method_code,carrier:{code:e.carrier_code,title:e.carrier_title},value:`${e.carrier_code} - ${e.method_code}`,...e.price_excl_tax&&{amountExclTax:{value:e.price_excl_tax.value,currency:e.price_excl_tax.currency}},...e.price_incl_tax&&{amountInclTax:{value:e.price_incl_tax.value,currency:e.price_incl_tax.currency}}}),k=e=>{if(m(e))return f(e)},w=e=>{if(e)return e.filter(m).map(t=>f(t)).sort(E)},z=e=>e?!!e.code&&!!e.label:!1,R=e=>{if(!z(e))return;const{code:t,label:r,region_id:n}=e;return n?{code:t,name:r,id:n}:{code:t,name:r}},q=e=>{const{code:t,label:r}=e;return{value:t,label:r}},P=e=>e?"code"in e&&"value"in e:!1,G=e=>e.filter(P).map(t=>{const{code:r,value:n}=t;return{code:r,value:n}}),d=e=>{const t=e.street.filter(Boolean);return{id:(e==null?void 0:e.id)||void 0,city:e.city,company:e.company||void 0,country:q(e.country),customAttributes:G(e.custom_attributes),firstName:e.firstname,lastName:e.lastname,postCode:e.postcode||void 0,region:R(e.region),street:t,telephone:e.telephone||void 0,vatId:e.vat_id||void 0,prefix:e.prefix||void 0,suffix:e.suffix||void 0,middleName:e.middlename||void 0,fax:e.fax||void 0}},O=e=>{if(e)return d(e)},$=e=>e.filter(t=>!!t).map(t=>{const{available_shipping_methods:r,selected_shipping_method:n,same_as_billing:s,...v}=t;return{...d(v),availableShippingMethods:w(r),selectedShippingMethod:k(n),sameAsBilling:s}}),te=e=>({city:e.city,company:e.company,country_code:e.countryCode,custom_attributes:e.customAttributes.map(t=>({attribute_code:t.code,value:t.value})),firstname:e.firstName,lastname:e.lastName,postcode:e.postcode,region:e.region,region_id:e.regionId,save_in_address_book:e.saveInAddressBook??!0,street:e.street,telephone:e.telephone,vat_id:e.vatId,prefix:e.prefix,suffix:e.suffix,middlename:e.middleName,fax:e.fax}),U=e=>{if(e)return{code:e.code,title:e.title}},B=e=>{if(e)return e.filter(t=>!!t).map(t=>{const{code:r,title:n}=t;return{code:r,title:n}})},D=e=>{var r,n,s;if(!e)return;const t={availablePaymentMethods:B(e.available_payment_methods),billingAddress:O(e.billing_address),email:e.email??void 0,id:e.id,isEmpty:e.total_quantity===0,isVirtual:e.is_virtual,selectedPaymentMethod:U(e.selected_payment_method),shippingAddresses:$(e.shipping_addresses),isGuest:!i.authenticated};return u(t,(s=(n=(r=_.getConfig().models)==null?void 0:r.CartModel)==null?void 0:n.transformer)==null?void 0:s.call(n,e))},F=e=>{var r,n,s;if(!e)return;const t={firstName:e.firstname||"",lastName:e.lastname||"",email:e.email||""};return u(t,(s=(n=(r=_.getConfig().models)==null?void 0:r.CustomerModel)==null?void 0:n.transformer)==null?void 0:s.call(n,e))},H=`
4
+ query getCart($cartId: String!) {
5
+ cart(cart_id: $cartId) {
6
+ ...CHECKOUT_DATA_FRAGMENT
7
+ }
8
+ }
9
+
10
+ ${a}
11
+ `,Q=`
12
+ query getCustomerCart {
13
+ cart: customerCart {
14
+ ...CHECKOUT_DATA_FRAGMENT
15
+ }
16
+ }
17
+
18
+ ${a}
19
+ `,p=async()=>{const e=i.cartId,t=i.authenticated===!1,r=t?H:Q,n=t?{cartId:e}:{};if(t&&!e)throw new C;return await l({type:"query",query:r,options:{method:"POST",cache:"no-cache",variables:n},path:"cart",signalType:"cart",transformer:D})},V=`
20
+ query getCustomer {
21
+ customer {
22
+ ...CUSTOMER_FRAGMENT
23
+ }
24
+ }
25
+
26
+ ${S}
27
+ `,K=async()=>{if(i.authenticated)return await l({type:"query",query:V,options:{method:"POST",cache:"no-cache"},path:"customer",signalType:"customer",transformer:F})},L=()=>[o.on("authenticated",I,{eager:!0}),o.on("cart/initialized",h,{eager:!0}),o.on("cart/reset",j),o.on("cart/updated",y)],g=new T({init:async e=>{const t=e||{};g.config.setConfig(t);const{data:r,pending:n}=M.value;!r&&!n&&await A()},listeners:L}),_=g.config;x("cartUpdate",()=>{o.emit("checkout/updated",c.value.data)});const h=async e=>{if(i.initialized)return y(e);const t=e?e.id:null;i.cartId=t;const r=t?await p():null;c.value={pending:!1,data:r},i.initialized=!0,o.emit("checkout/initialized",r||null)},j=()=>{i.cartId=null,c.value={pending:!1,data:null},o.emit("checkout/updated",null)},y=async e=>{if(!i.initialized)return h(e);const t=e?e.id:null;i.cartId=t;const r=t?await p():null;c.value={pending:!1,data:r},o.emit("checkout/updated",r||null)};export{te as a,D as b,_ as c,I as d,K as e,h as f,p as g,g as i,j as r,y as s,w as t};
@@ -0,0 +1,3 @@
1
+ /*! Copyright 2024 Adobe
2
+ All Rights Reserved. */
3
+ import{jsx as n}from"@dropins/tools/preact-jsx-runtime.js";import{c as d}from"./store-config.js";import"./ServerErrorSignal.js";import"./fetch-graphql.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/lib.js";function u(i){return i.displayName||i.name||"Component"}const h=i=>{const o=u(i),a=({hideOnEmptyCart:s=!0,hideOnVirtualCart:r=!1,...e})=>{const t=d.value.data,l=t!==void 0&&(t===null||t.isEmpty),m=!!(t!=null&&t.isVirtual),c=s&&l||r&&m,p=`conditional-${o.toLowerCase()}`;return n("div",{className:p,children:!c&&n(i,{...e})})};return a.displayName=`Conditional(${o})`,a};export{h as w};
@@ -0,0 +1,9 @@
1
+ import { FunctionComponent } from 'preact';
2
+ import { HTMLAttributes } from 'preact/compat';
3
+
4
+ export interface BillToShippingAddressProps extends Omit<HTMLAttributes<HTMLInputElement>, 'loading' | 'disabled'> {
5
+ loading?: boolean;
6
+ disabled?: boolean;
7
+ }
8
+ export declare const BillToShippingAddress: FunctionComponent<BillToShippingAddressProps>;
9
+ //# sourceMappingURL=BillToShippingAddress.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { FunctionComponent } from 'preact';
2
+
3
+ export declare const BillToShippingAddressSkeleton: FunctionComponent;
4
+ //# sourceMappingURL=BillToShippingAddressSkeleton.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 './BillToShippingAddress';
18
+ export * from './BillToShippingAddressSkeleton';
19
+ export { BillToShippingAddress as default } from './BillToShippingAddress';
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { FunctionComponent, VNode } from 'preact';
2
+ import { HTMLAttributes } from 'preact/compat';
3
+
4
+ export interface EstimateShippingProps {
5
+ estimated?: boolean;
6
+ price: VNode<HTMLAttributes<HTMLSpanElement>>;
7
+ priceExclTax?: VNode<HTMLAttributes<HTMLSpanElement>>;
8
+ taxExcluded?: boolean;
9
+ taxIncluded?: boolean;
10
+ }
11
+ export declare const EstimateShipping: FunctionComponent<EstimateShippingProps>;
12
+ //# sourceMappingURL=EstimateShipping.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { FunctionComponent } from 'preact';
2
+
3
+ export declare const EstimateShippingSkeleton: FunctionComponent;
4
+ //# sourceMappingURL=EstimateShippingSkeleton.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 './EstimateShipping';
18
+ export { EstimateShipping as default } from './EstimateShipping';
19
+ export * from './EstimateShippingSkeleton';
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { FunctionComponent } from 'preact';
2
+ import { HTMLAttributes } from 'preact/compat';
3
+
4
+ export interface LoginEmailProps extends HTMLAttributes<HTMLInputElement> {
5
+ value: string;
6
+ error: string;
7
+ hint: string;
8
+ onChange: (event: Event) => void;
9
+ onBlur: (event: Event) => void;
10
+ onInvalid: (event: Event) => void;
11
+ }
12
+ export declare const Email: FunctionComponent<LoginEmailProps>;
13
+ //# sourceMappingURL=Email.d.ts.map
@@ -0,0 +1,20 @@
1
+ import { FunctionComponent, HTMLAttributes } from 'preact/compat';
2
+
3
+ export interface LoginFormProps extends Omit<HTMLAttributes<HTMLFormElement>, 'loading'> {
4
+ customerDetails?: {
5
+ firstName: string;
6
+ lastName: string;
7
+ email: string;
8
+ };
9
+ email: string;
10
+ error: string;
11
+ hint: string;
12
+ loading?: boolean;
13
+ onEmailBlur: (event: Event) => void;
14
+ onEmailChange: (event: Event) => void;
15
+ onEmailInvalid: (event: Event) => void;
16
+ onSignInClick?: (email: string) => void;
17
+ onSignOutClick?: () => void;
18
+ }
19
+ export declare const LoginForm: FunctionComponent<LoginFormProps>;
20
+ //# sourceMappingURL=LoginForm.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { FunctionComponent } from 'preact';
2
+
3
+ export declare const LoginFormSkeleton: FunctionComponent;
4
+ //# sourceMappingURL=LoginFormSkeleton.d.ts.map
@@ -0,0 +1,8 @@
1
+ import { FunctionComponent } from 'preact';
2
+
3
+ interface SignInProps {
4
+ onClick: (event: Event) => void;
5
+ }
6
+ export declare const SignIn: FunctionComponent<SignInProps>;
7
+ export {};
8
+ //# sourceMappingURL=SignIn.d.ts.map
@@ -0,0 +1,8 @@
1
+ import { FunctionComponent } from 'preact';
2
+
3
+ interface SignOutProps {
4
+ onClick?: (event: Event) => void;
5
+ }
6
+ export declare const SignOut: FunctionComponent<SignOutProps>;
7
+ export {};
8
+ //# sourceMappingURL=SignOut.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 * from './Email';
18
+ export * from './SignIn';
19
+ export * from './LoginForm';
20
+ export * from './LoginFormSkeleton';
21
+ export * from './SignOut';
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,11 @@
1
+ import { Item as CartItem } from '../../types/cart';
2
+ import { FunctionComponent } from 'preact';
3
+ import { HTMLAttributes } from 'preact/compat';
4
+
5
+ export interface OutOfStockProps extends HTMLAttributes<HTMLDivElement> {
6
+ items: CartItem[];
7
+ onRemoveOutOfStock?: (event: Event) => void;
8
+ routeCart?: string;
9
+ }
10
+ export declare const OutOfStock: FunctionComponent<OutOfStockProps>;
11
+ //# sourceMappingURL=OutOfStock.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 './OutOfStock';
18
+ export { OutOfStock as default } from './OutOfStock';
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,14 @@
1
+ import { PaymentMethod } from '../../data/models/payment-method';
2
+ import { FunctionComponent, VNode } from 'preact';
3
+ import { HTMLAttributes } from 'preact/compat';
4
+
5
+ export interface PaymentMethodsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'loading'> {
6
+ initializing?: boolean;
7
+ loading?: boolean;
8
+ onChange?: (value: string) => void;
9
+ options?: PaymentMethod[];
10
+ paymentMethodContent?: VNode;
11
+ selection?: string;
12
+ }
13
+ export declare const PaymentMethods: FunctionComponent<PaymentMethodsProps>;
14
+ //# sourceMappingURL=PaymentMethods.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { FunctionComponent } from 'preact';
2
+
3
+ export declare const PaymentMethodsSkeleton: FunctionComponent;
4
+ //# sourceMappingURL=PaymentMethodsSkeleton.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 './PaymentMethods';
18
+ export * from './PaymentMethodsSkeleton';
19
+ export { PaymentMethods as default } from './PaymentMethods';
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { FunctionComponent } from 'preact';
2
+ import { HTMLAttributes } from 'preact/compat';
3
+
4
+ export interface PlaceOrderProps extends HTMLAttributes<HTMLDivElement> {
5
+ disabled?: boolean;
6
+ onClick: (event: Event) => Promise<void>;
7
+ }
8
+ export declare const PlaceOrder: FunctionComponent<PlaceOrderProps>;
9
+ //# sourceMappingURL=PlaceOrder.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { FunctionComponent } from 'preact';
2
+
3
+ export declare const PlaceOrderSkeleton: FunctionComponent;
4
+ //# sourceMappingURL=PlaceOrderSkeleton.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 './PlaceOrder';
18
+ export * from './PlaceOrderSkeleton';
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,10 @@
1
+ import { FunctionComponent } from 'preact';
2
+ import { HTMLAttributes } from 'preact/compat';
3
+
4
+ export interface ServerErrorProps extends Omit<HTMLAttributes<HTMLDivElement>, 'icon'> {
5
+ errorMessage: string;
6
+ contactSupport?: string;
7
+ onClick?: (e: any) => void;
8
+ }
9
+ export declare const ServerError: FunctionComponent<ServerErrorProps>;
10
+ //# sourceMappingURL=ServerError.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 './ServerError';
18
+ export { ServerError as default } from './ServerError';
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { ShippingMethod } from '../../data/models';
2
+ import { FunctionComponent } from 'preact';
3
+ import { HTMLAttributes } from 'preact/compat';
4
+
5
+ export interface ShippingMethodsProps extends HTMLAttributes<HTMLDivElement> {
6
+ isLoading?: boolean;
7
+ onSelectionChange?: (method: ShippingMethod) => void;
8
+ options?: ShippingMethod[];
9
+ selection?: ShippingMethod;
10
+ }
11
+ export declare const ShippingMethods: FunctionComponent<ShippingMethodsProps>;
12
+ //# sourceMappingURL=ShippingMethods.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { FunctionComponent } from 'preact';
2
+
3
+ export declare const ShippingMethodsSkeleton: FunctionComponent;
4
+ //# sourceMappingURL=ShippingMethodsSkeleton.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 './ShippingMethods';
18
+ export * from './ShippingMethodsSkeleton';
19
+ export { ShippingMethods as default } from './ShippingMethods';
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,25 @@
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 './EstimateShipping';
19
+ export * from './LoginForm';
20
+ export * from './OutOfStock';
21
+ export * from './PaymentMethods';
22
+ export * from './PlaceOrder';
23
+ export * from './ServerError';
24
+ export * from './ShippingMethods';
25
+ //# sourceMappingURL=index.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 interface BillToShippingAddressProps {
18
+ onChange?: (checked: boolean) => void;
19
+ }
20
+ export declare const BillToShippingAddress: {
21
+ ({ hideOnEmptyCart, hideOnVirtualCart, ...props }: import('../../hocs/withConditionalRendering').ConditionalProps & BillToShippingAddressProps): import("preact/compat").JSX.Element;
22
+ displayName: string;
23
+ };
24
+ //# sourceMappingURL=BillToShippingAddress.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 './BillToShippingAddress';
18
+ export { BillToShippingAddress as default } from './BillToShippingAddress';
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './BillToShippingAddress/index'
2
+ import _default from './BillToShippingAddress/index'
3
+ export default _default
@@ -1 +1,3 @@
1
- import*as e from"@dropins/elsie/event-bus.js";import*as s from"@dropins/elsie/fetch-graphql.js";import*as r from"@dropins/elsie/preact-compat.js";import*as t from"@dropins/elsie/preact-hooks.js";import*as o from"@dropins/elsie/preact-jsx-runtime.js";import*as a from"@dropins/elsie/preact.js";export const id=812;export const ids=[812];export const modules={1392:(e,s,r)=>{r.d(s,{Hd:()=>t.H,IL:()=>o.I,ZP:()=>o.y,yJ:()=>o.y});var t=r(9688),o=r(9636)},6765:(s,r,t)=>{var o,a;s.exports=(o={events:()=>e.events},a={},t.d(a,o),a)},9699:(e,r,t)=>{var o,a;e.exports=(o={FetchGraphQL:()=>s.FetchGraphQL},a={},t.d(a,o),a)},4853:(e,s,t)=>{var o,a;e.exports=(o={forwardRef:()=>r.forwardRef,useCallback:()=>r.useCallback,useEffect:()=>r.useEffect,useImperativeHandle:()=>r.useImperativeHandle,useMemo:()=>r.useMemo,useRef:()=>r.useRef,useState:()=>r.useState},a={},t.d(a,o),a)},5437:(e,s,r)=>{var o,a;e.exports=(o={useCallback:()=>t.useCallback,useContext:()=>t.useContext,useDebugValue:()=>t.useDebugValue,useEffect:()=>t.useEffect,useId:()=>t.useId,useImperativeHandle:()=>t.useImperativeHandle,useLayoutEffect:()=>t.useLayoutEffect,useMemo:()=>t.useMemo,useReducer:()=>t.useReducer,useRef:()=>t.useRef,useState:()=>t.useState},a={},r.d(a,o),a)},4142:(e,s,r)=>{var t,a;e.exports=(t={Fragment:()=>o.Fragment,jsx:()=>o.jsx,jsxs:()=>o.jsxs},a={},r.d(a,t),a)},3474:(e,s,r)=>{var t,o;e.exports=(t={Component:()=>a.Component,Fragment:()=>a.Fragment,cloneElement:()=>a.cloneElement,createContext:()=>a.createContext,createElement:()=>a.createElement,createRef:()=>a.createRef,h:()=>a.h,hydrate:()=>a.hydrate,isValidElement:()=>a.isValidElement,options:()=>a.options,render:()=>a.render,toChildArray:()=>a.toChildArray},o={},r.d(o,t),o)}};import m from"../runtime.js";import*as p from"../4.js";m.C(p);import*as i from"../516.js";m.C(i);import*as u from"../139.js";m.C(u);import*as n from"../292.js";m.C(n);import*as d from"../483.js";m.C(d);import*as f from"../393.js";m.C(f);import*as l from"../636.js";m.C(l);import*as c from"./BillToShippingAddress.js";m.C(c);var j=(1392,m(m.s=1392)),C=j.Hd,x=j.yJ,h=j.IL,v=j.ZP;export{C as BILL_TO_SHIPPING_KEY,x as BillToShippingAddress,h as compareAddresses,v as default};
1
+ /*! Copyright 2024 Adobe
2
+ All Rights Reserved. */
3
+ import{jsx as t}from"@dropins/tools/preact-jsx-runtime.js";import"../chunks/fetch-graphql.js";import{i as d,c as u}from"../chunks/store-config.js";import"../chunks/ServerErrorSignal.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/lib.js";import{s as S}from"../chunks/setBillingAddress.js";/* empty css */import{Checkbox as b,Skeleton as f,SkeletonRow as A}from"@dropins/tools/components.js";import{c as B}from"../chunks/classes.js";import{useText as x}from"@dropins/tools/i18n.js";import{w as T}from"../chunks/withConditionalRendering.js";import{useState as v,useEffect as _}from"@dropins/tools/preact-compat.js";import"@dropins/tools/fetch-graphql.js";import"@dropins/tools/signals.js";import"../fragments.js";import"../chunks/synchronizeCheckout.js";const w=({className:i,checked:e,loading:r,onChange:n,disabled:s})=>{const c=x({title:"Checkout.BillToShippingAddress.title"});return r?t(y,{}):t("div",{className:"checkout-bill-to-shipping-address",children:t(b,{checked:e,className:B(["checkout-bill-to-shipping-address__checkbox",i]),"data-testid":"bill-to-shipping-checkbox",disabled:s,label:c.title,name:"checkout-bill-to-shipping-address__checkbox",onChange:n})})},y=()=>t(f,{className:"bill-to-shipping-address__skeleton",children:t(A,{variant:"row",size:"small"})}),k=({onChange:i})=>{var g;const[e,r]=v(!0),n=d.value,s=u.value.data,c=u.value.pending,p=!!s,m=!!(s==null?void 0:s.billingAddress),l=(g=s==null?void 0:s.shippingAddresses)==null?void 0:g[0],h=l==null?void 0:l.sameAsBilling;return _(()=>{if(!e||!p)return;r(!1);const o=h??!m;d.value=o,i==null||i(o)},[p,m,h,e,i]),t(w,{checked:n,disabled:c,loading:e,onChange:async o=>{const a=o.target.checked;d.value=a,i==null||i(a),!e&&l&&a&&await S({sameAsShipping:!0}).catch(console.error)}})};k.displayName="BillToShippingAddressContainer";const U=T(k);export{U as BillToShippingAddress,U as default};
@@ -0,0 +1,5 @@
1
+ import { AlertBannerProps } from '@dropins/tools/types/elsie/src/components';
2
+ import { Container } from '@dropins/tools/types/elsie/src/src/lib/types';
3
+
4
+ export declare const ErrorBanner: Container<AlertBannerProps>;
5
+ //# sourceMappingURL=ErrorBanner.d.ts.map