@dropins/storefront-checkout 0.1.0-alpha9 → 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.
- package/api/authenticateCustomer/authenticateCustomer.d.ts +18 -0
- package/api/authenticateCustomer/index.d.ts +18 -0
- package/api/errors/errors.d.ts +30 -0
- package/api/errors/index.d.ts +18 -0
- package/api/estimateShippingMethods/estimateShippingMethods.d.ts +13 -0
- package/api/estimateShippingMethods/fixtures.d.ts +8 -0
- package/api/estimateShippingMethods/graphql/estimateShippingMethods.graphql.d.ts +18 -0
- package/api/estimateShippingMethods/graphql/index.d.ts +18 -0
- package/api/estimateShippingMethods/index.d.ts +18 -0
- package/api/fetch-graphql/fetch-graphql.d.ts +25 -0
- package/api/fetch-graphql/index.d.ts +18 -0
- package/api/fragments.d.ts +19 -0
- package/api/getCart/fixtures.d.ts +12 -0
- package/api/getCart/getCart.d.ts +18 -0
- package/api/getCart/graphql/getCart.graphql.d.ts +19 -0
- package/api/getCart/graphql/index.d.ts +18 -0
- package/api/getCart/index.d.ts +18 -0
- package/api/getCustomer/fixtures.d.ts +5 -0
- package/api/getCustomer/getCustomer.d.ts +4 -0
- package/api/getCustomer/graphql/getCustomer.graphql.d.ts +18 -0
- package/api/getCustomer/graphql/index.d.ts +18 -0
- package/api/getCustomer/index.d.ts +18 -0
- package/api/getStoreConfig/getStoreConfig.d.ts +6 -0
- package/api/getStoreConfig/graphql/getStoreConfig.graphql.d.ts +18 -0
- package/api/getStoreConfig/index.d.ts +18 -0
- package/api/graphql/CartAddressFragment.graphql.d.ts +19 -0
- package/api/graphql/CheckoutDataFragment.graphql.d.ts +18 -0
- package/api/graphql/CustomerFragment.graphql.d.ts +18 -0
- package/api/index.d.ts +34 -0
- package/api/initialize/index.d.ts +18 -0
- package/api/initialize/initialize.d.ts +15 -0
- package/api/initialize/listeners.d.ts +20 -0
- package/api/initializeCheckout/index.d.ts +18 -0
- package/api/initializeCheckout/initializeCheckout.d.ts +4 -0
- package/api/isEmailAvailable/graphql/isEmailAvailable.graphql.d.ts +18 -0
- package/api/isEmailAvailable/index.d.ts +18 -0
- package/api/isEmailAvailable/isEmailAvailable.d.ts +4 -0
- package/api/resetCheckout/index.d.ts +2 -0
- package/api/resetCheckout/resetCheckout.d.ts +18 -0
- package/api/setBillingAddress/graphql/setBillingAddress.graphql.d.ts +18 -0
- package/api/setBillingAddress/index.d.ts +18 -0
- package/api/setBillingAddress/setBillingAddress.d.ts +4 -0
- package/api/setGuestEmailOnCart/graphql/setGuestEmailOnCart.graphql.d.ts +18 -0
- package/api/setGuestEmailOnCart/index.d.ts +18 -0
- package/api/setGuestEmailOnCart/setGuestEmailOnCart.d.ts +18 -0
- package/api/setPaymentMethod/graphql/setPaymentMethod.graphql.d.ts +18 -0
- package/api/setPaymentMethod/index.d.ts +18 -0
- package/api/setPaymentMethod/setPaymentMethod.d.ts +4 -0
- package/api/setShippingAddress/graphql/setShippingAddress.graphql.d.ts +18 -0
- package/api/setShippingAddress/index.d.ts +18 -0
- package/api/setShippingAddress/setShippingAddress.d.ts +4 -0
- package/api/setShippingMethods/graphql/setShippingMethodsOnCart.graphql.d.ts +18 -0
- package/api/setShippingMethods/index.d.ts +18 -0
- package/api/setShippingMethods/setShippingMethods.d.ts +18 -0
- package/api/synchronizeCheckout/index.d.ts +18 -0
- package/api/synchronizeCheckout/synchronizeCheckout.d.ts +4 -0
- package/api/utils/dispatchApiCall.d.ts +40 -0
- package/api/utils/enqueueRequest.d.ts +26 -0
- package/api/utils/filterControlledErrors.d.ts +18 -0
- package/api.d.ts +1 -0
- package/api.js +39 -2
- package/chunks/OrderError.js +3 -0
- package/chunks/ServerErrorSignal.js +3 -0
- package/chunks/classes.js +3 -0
- package/chunks/fetch-graphql.js +12 -0
- package/chunks/setBillingAddress.js +13 -0
- package/chunks/setGuestEmailOnCart.js +19 -0
- package/chunks/setPaymentMethod.js +18 -0
- package/chunks/setShippingMethods.js +18 -0
- package/chunks/store-config.js +3 -0
- package/chunks/synchronizeCheckout.js +27 -0
- package/chunks/withConditionalRendering.js +3 -0
- package/components/BillToShippingAddress/BillToShippingAddress.d.ts +9 -0
- package/components/BillToShippingAddress/BillToShippingAddressSkeleton.d.ts +4 -0
- package/components/BillToShippingAddress/index.d.ts +20 -0
- package/components/EstimateShipping/EstimateShipping.d.ts +12 -0
- package/components/EstimateShipping/EstimateShippingSkeleton.d.ts +4 -0
- package/components/EstimateShipping/index.d.ts +20 -0
- package/components/LoginForm/Email.d.ts +13 -0
- package/components/LoginForm/LoginForm.d.ts +20 -0
- package/components/LoginForm/LoginFormSkeleton.d.ts +4 -0
- package/components/LoginForm/SignIn.d.ts +8 -0
- package/components/LoginForm/SignOut.d.ts +8 -0
- package/components/LoginForm/index.d.ts +22 -0
- package/components/OutOfStock/OutOfStock.d.ts +11 -0
- package/components/OutOfStock/index.d.ts +19 -0
- package/components/PaymentMethods/PaymentMethods.d.ts +14 -0
- package/components/PaymentMethods/PaymentMethodsSkeleton.d.ts +4 -0
- package/components/PaymentMethods/index.d.ts +20 -0
- package/components/PlaceOrder/PlaceOrder.d.ts +9 -0
- package/components/PlaceOrder/PlaceOrderSkeleton.d.ts +4 -0
- package/components/PlaceOrder/index.d.ts +19 -0
- package/components/ServerError/ServerError.d.ts +10 -0
- package/components/ServerError/index.d.ts +19 -0
- package/components/ShippingMethods/ShippingMethods.d.ts +12 -0
- package/components/ShippingMethods/ShippingMethodsSkeleton.d.ts +4 -0
- package/components/ShippingMethods/index.d.ts +20 -0
- package/components/index.d.ts +25 -0
- package/containers/BillToShippingAddress/BillToShippingAddress.d.ts +24 -0
- package/containers/BillToShippingAddress/index.d.ts +19 -0
- package/containers/BillToShippingAddress.d.ts +3 -0
- package/containers/BillToShippingAddress.js +3 -1
- package/containers/ErrorBanner/ErrorBanner.d.ts +5 -0
- package/containers/ErrorBanner/index.d.ts +19 -0
- package/containers/ErrorBanner.d.ts +3 -0
- package/containers/ErrorBanner.js +3 -1
- package/containers/EstimateShipping/EstimateShipping.d.ts +4 -0
- package/containers/EstimateShipping/index.d.ts +19 -0
- package/containers/EstimateShipping.d.ts +3 -0
- package/containers/EstimateShipping.js +3 -0
- package/containers/LoginForm/LoginForm.d.ts +11 -0
- package/containers/LoginForm/index.d.ts +19 -0
- package/containers/LoginForm.d.ts +3 -0
- package/containers/LoginForm.js +3 -1
- package/containers/MergedCartBanner/MergedCartBanner.d.ts +7 -0
- package/containers/MergedCartBanner/index.d.ts +19 -0
- package/containers/MergedCartBanner.d.ts +3 -0
- package/containers/MergedCartBanner.js +3 -0
- package/containers/OutOfStock/OutOfStock.d.ts +13 -0
- package/containers/OutOfStock/index.d.ts +19 -0
- package/containers/OutOfStock.d.ts +3 -0
- package/containers/OutOfStock.js +3 -0
- package/containers/PaymentMethods/PaymentMethods.d.ts +27 -0
- package/containers/PaymentMethods/defaultHandlers.d.ts +4 -0
- package/containers/PaymentMethods/index.d.ts +19 -0
- package/containers/PaymentMethods.d.ts +3 -0
- package/containers/PaymentMethods.js +3 -2
- package/containers/PlaceOrder/PlaceOrder.d.ts +16 -0
- package/containers/PlaceOrder/index.d.ts +19 -0
- package/containers/PlaceOrder.d.ts +3 -0
- package/containers/PlaceOrder.js +3 -2
- package/containers/ServerError/ServerError.d.ts +8 -0
- package/containers/ServerError/index.d.ts +19 -0
- package/containers/ServerError.d.ts +3 -0
- package/containers/ServerError.js +3 -0
- package/containers/ShippingMethods/ShippingMethods.d.ts +17 -0
- package/containers/ShippingMethods/hooks/useShippingEstimateEventEmitter.d.ts +19 -0
- package/containers/ShippingMethods/index.d.ts +19 -0
- package/containers/ShippingMethods.d.ts +3 -0
- package/containers/ShippingMethods.js +3 -2
- package/containers/index.d.ts +27 -0
- package/data/models/address.d.ts +21 -0
- package/data/models/api.d.ts +33 -0
- package/data/models/cart.d.ts +19 -0
- package/data/models/country.d.ts +21 -0
- package/data/models/custom-attribute.d.ts +21 -0
- package/data/models/customer.d.ts +22 -0
- package/data/models/email-availability.d.ts +18 -0
- package/data/models/index.d.ts +30 -0
- package/data/models/payment-method.d.ts +21 -0
- package/data/models/price.d.ts +21 -0
- package/data/models/region.d.ts +22 -0
- package/data/models/shipping-estimate.d.ts +17 -0
- package/data/models/shipping-method.d.ts +19 -0
- package/data/models/store-config.d.ts +30 -0
- package/data/transforms/index.d.ts +24 -0
- package/data/transforms/transform-address.d.ts +95 -0
- package/data/transforms/transform-cart.d.ts +7 -0
- package/data/transforms/transform-customer.d.ts +7 -0
- package/data/transforms/transform-email-availability.d.ts +6 -0
- package/data/transforms/transform-payment-methods.d.ts +9 -0
- package/data/transforms/transform-shipping-estimate.d.ts +5 -0
- package/data/transforms/transform-shipping-methods.d.ts +14 -0
- package/data/transforms/transform-store-config.d.ts +6 -0
- package/fragments.d.ts +1 -0
- package/fragments.js +134 -0
- package/hocs/index.d.ts +18 -0
- package/hocs/withConditionalRendering.d.ts +13 -0
- package/hooks/index.d.ts +20 -0
- package/hooks/useBreakpoint/index.d.ts +18 -0
- package/hooks/useBreakpoint/useBreakpoint.d.ts +18 -0
- package/hooks/useLockScroll/index.d.ts +18 -0
- package/hooks/useLockScroll/useLockScroll.d.ts +21 -0
- package/hooks/useStableList/index.d.ts +2 -0
- package/hooks/useStableList/useStableList.d.ts +2 -0
- package/i18n/en_US.json.d.ts +79 -0
- package/lib/fetch-error.d.ts +23 -0
- package/lib/index.d.ts +21 -0
- package/lib/network-error.d.ts +22 -0
- package/lib/state.d.ts +24 -0
- package/lib/validation.d.ts +5 -0
- package/msw/browser.d.ts +18 -0
- package/msw/fixtures/fragments/available-shipping-methods.d.ts +23 -0
- package/msw/fixtures/fragments/billing-address.d.ts +60 -0
- package/msw/fixtures/fragments/cart.d.ts +149 -0
- package/msw/fixtures/fragments/index.d.ts +21 -0
- package/msw/fixtures/fragments/shipping-address.d.ts +62 -0
- package/msw/fixtures/index.d.ts +20 -0
- package/msw/fixtures/mutations/estimate-shipping-methods.d.ts +4 -0
- package/msw/fixtures/mutations/index.d.ts +23 -0
- package/msw/fixtures/mutations/set-billing-address.d.ts +5 -0
- package/msw/fixtures/mutations/set-guest-email.d.ts +4 -0
- package/msw/fixtures/mutations/set-payment-method.d.ts +4 -0
- package/msw/fixtures/mutations/set-shipping-address.d.ts +4 -0
- package/msw/fixtures/mutations/set-shipping-methods.d.ts +4 -0
- package/msw/fixtures/queries/get-cart.d.ts +4 -0
- package/msw/fixtures/queries/get-customer-cart-stock-status.d.ts +4 -0
- package/msw/fixtures/queries/get-customer.d.ts +5 -0
- package/msw/fixtures/queries/get-stock-status.d.ts +4 -0
- package/msw/fixtures/queries/get-store-config.d.ts +4 -0
- package/msw/fixtures/queries/index.d.ts +23 -0
- package/msw/fixtures/queries/is-email-available.d.ts +4 -0
- package/msw/handlers.d.ts +4 -0
- package/msw/server.d.ts +18 -0
- package/package.json +1 -1
- package/render/Provider.d.ts +8 -0
- package/render/index.d.ts +18 -0
- package/render/render.d.ts +6 -0
- package/render.d.ts +1 -0
- package/render.js +9 -2
- package/signals/CartSignal.d.ts +7 -0
- package/signals/CustomerSignal.d.ts +7 -0
- package/signals/EstimateShippingMethodsSignal.d.ts +7 -0
- package/signals/IsBillToShippingSignal.d.ts +18 -0
- package/signals/SelectedPaymentMethodSignal.d.ts +18 -0
- package/signals/SelectedShippingMethodSignal.d.ts +4 -0
- package/signals/ServerErrorSignal.d.ts +18 -0
- package/signals/StoreConfigSignal.d.ts +7 -0
- package/signals/index.d.ts +25 -0
- package/tests/constants.d.ts +19 -0
- package/tests/integration/utils/index.d.ts +19 -0
- package/tests/integration/utils/setup.d.ts +8 -0
- package/tests/integration/utils/user-actions.d.ts +18 -0
- package/tests/mocks/svg.d.ts +20 -0
- package/tests/utils/expectError.d.ts +25 -0
- package/tests/utils/index.d.ts +19 -0
- package/tests/utils/mockEvents.d.ts +21 -0
- package/utils/convertCase/convertCase.d.ts +4 -0
- package/utils/convertCase/index.d.ts +18 -0
- package/utils/getDisplayName/getDisplayName.d.ts +4 -0
- package/utils/getDisplayName/index.d.ts +18 -0
- package/utils/index.d.ts +21 -0
- package/utils/isEmpty/index.d.ts +18 -0
- package/utils/isEmpty/isEmpty.d.ts +18 -0
- package/utils/isNullish/index.d.ts +18 -0
- package/utils/isNullish/isNullish.d.ts +18 -0
- package/utils/isUnexpectedError/index.d.ts +18 -0
- package/utils/isUnexpectedError/isUnexpectedError.d.ts +18 -0
- package/utils/shippingMethods/index.d.ts +18 -0
- package/utils/shippingMethods/isEqual.d.ts +4 -0
- package/223.js +0 -2
- package/223.js.LICENSE.txt +0 -1
- package/270.js +0 -1
- package/323.js +0 -1
- package/358.js +0 -2
- package/358.js.LICENSE.txt +0 -1
- package/378.js +0 -2
- package/378.js.LICENSE.txt +0 -1
- package/41.js +0 -2
- package/41.js.LICENSE.txt +0 -1
- package/424.js +0 -2
- package/424.js.LICENSE.txt +0 -1
- package/448.js +0 -1
- package/449.js +0 -1
- package/466.js +0 -1
- package/483.js +0 -2
- package/483.js.LICENSE.txt +0 -1
- package/499.js +0 -1
- package/603.js +0 -2
- package/603.js.LICENSE.txt +0 -1
- package/636.js +0 -2
- package/636.js.LICENSE.txt +0 -1
- package/637.js +0 -2
- package/637.js.LICENSE.txt +0 -1
- package/757.js +0 -1
- package/774.js +0 -2
- package/774.js.LICENSE.txt +0 -1
- package/79.js +0 -2
- package/79.js.LICENSE.txt +0 -1
- package/822.js +0 -1
- package/840.js +0 -1
- package/94.js +0 -2
- package/94.js.LICENSE.txt +0 -1
- package/965.js +0 -2
- package/965.js.LICENSE.txt +0 -1
- package/967.js +0 -1
- package/api.js.LICENSE.txt +0 -3
- package/containers/BillingForm.js +0 -1
- package/containers/CartSummary.js +0 -1
- package/containers/Checkout.js +0 -2
- package/containers/Checkout.js.LICENSE.txt +0 -1
- package/containers/OrderSummary.js +0 -1
- package/containers/PaymentMethods.js.LICENSE.txt +0 -1
- package/containers/PlaceOrder.js.LICENSE.txt +0 -1
- package/containers/ShippingForm.js +0 -2
- package/containers/ShippingForm.js.LICENSE.txt +0 -1
- package/containers/ShippingMethods.js.LICENSE.txt +0 -1
- package/render.js.LICENSE.txt +0 -1
- package/runtime.js +0 -1
|
@@ -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,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,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,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,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,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,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
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
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,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 './ErrorBanner';
|
|
18
|
+
export { ErrorBanner as default } from './ErrorBanner';
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|