@dropins/storefront-checkout 0.1.0-alpha4 → 0.1.0-alpha40
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/__generated__/types.d.ts +15363 -0
- package/api/errors/errors.d.ts +27 -0
- package/api/errors/index.d.ts +2 -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 +2 -0
- package/api/estimateShippingMethods/graphql/index.d.ts +2 -0
- package/api/estimateShippingMethods/index.d.ts +2 -0
- package/api/fetch-graphql/fetch-graphql.d.ts +9 -0
- package/api/fetch-graphql/index.d.ts +2 -0
- package/api/fetchAddressFormFields/fetchAddressFormFields.d.ts +2 -0
- package/api/fetchAddressFormFields/fixtures.d.ts +5 -0
- package/api/fetchAddressFormFields/graphql/fetchAddressFormFields.graphql.d.ts +2 -0
- package/api/fetchAddressFormFields/index.d.ts +3 -0
- package/api/getCart/fixtures.d.ts +12 -0
- package/api/getCart/getCart.d.ts +2 -0
- package/api/getCart/graphql/getCart.graphql.d.ts +4 -0
- package/api/getCart/graphql/index.d.ts +2 -0
- package/api/getCart/index.d.ts +2 -0
- package/api/getCheckoutData/getCheckoutData.d.ts +2 -0
- package/api/getCheckoutData/index.d.ts +2 -0
- package/api/getCountries/fixtures.d.ts +6 -0
- package/api/getCountries/getCountries.d.ts +2 -0
- package/api/getCountries/graphql/getCountries.graphql.d.ts +2 -0
- package/api/getCountries/index.d.ts +2 -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 +2 -0
- package/api/getCustomer/graphql/index.d.ts +2 -0
- package/api/getCustomer/index.d.ts +2 -0
- package/api/getRegions/fixtures.d.ts +5 -0
- package/api/getRegions/getRegions.d.ts +5 -0
- package/api/getRegions/graphql/getRegions.graphql.d.ts +2 -0
- package/api/getRegions/index.d.ts +2 -0
- package/api/getStoreConfig/getStoreConfig.d.ts +6 -0
- package/api/getStoreConfig/graphql/getStoreConfig.graphql.d.ts +2 -0
- package/api/getStoreConfig/index.d.ts +2 -0
- package/api/index.d.ts +23 -0
- package/api/initialize/index.d.ts +2 -0
- package/api/initialize/initialize.d.ts +10 -0
- package/api/initialize/listeners.d.ts +4 -0
- package/api/initializeCheckout/index.d.ts +2 -0
- package/api/initializeCheckout/initializeCheckout.d.ts +2 -0
- package/api/isEmailAvailable/graphql/isEmailAvailable.graphql.d.ts +2 -0
- package/api/isEmailAvailable/index.d.ts +2 -0
- package/api/isEmailAvailable/isEmailAvailable.d.ts +4 -0
- package/api/placeOrder/fixtures.d.ts +6 -0
- package/api/placeOrder/graphql/index.d.ts +2 -0
- package/api/placeOrder/graphql/placeOrder.graphql.d.ts +2 -0
- package/api/placeOrder/index.d.ts +2 -0
- package/api/placeOrder/placeOrder.d.ts +2 -0
- package/api/redirect/index.d.ts +2 -0
- package/api/redirect/redirect.d.ts +2 -0
- package/api/resetCheckout/index.d.ts +2 -0
- package/api/resetCheckout/resetCheckout.d.ts +2 -0
- package/api/resetCustomer/index.d.ts +2 -0
- package/api/resetCustomer/resetCustomer.d.ts +2 -0
- package/api/setBillingAddress/graphql/setBillingAddress.graphql.d.ts +2 -0
- package/api/setBillingAddress/index.d.ts +2 -0
- package/api/setBillingAddress/setBillingAddress.d.ts +13 -0
- package/api/setGuestEmailOnCart/graphql/setGuestEmailOnCart.graphql.d.ts +2 -0
- package/api/setGuestEmailOnCart/index.d.ts +2 -0
- package/api/setGuestEmailOnCart/setGuestEmailOnCart.d.ts +2 -0
- package/api/setPaymentMethod/graphql/setPaymentMethod.graphql.d.ts +2 -0
- package/api/setPaymentMethod/index.d.ts +2 -0
- package/api/setPaymentMethod/setPaymentMethod.d.ts +2 -0
- package/api/setShippingAddress/graphql/setShippingAddress.graphql.d.ts +2 -0
- package/api/setShippingAddress/index.d.ts +2 -0
- package/api/setShippingAddress/setShippingAddress.d.ts +30 -0
- package/api/setShippingMethods/graphql/setShippingMethodsOnCart.graphql.d.ts +2 -0
- package/api/setShippingMethods/index.d.ts +2 -0
- package/api/setShippingMethods/setShippingMethods.d.ts +2 -0
- package/api/utils/dispatchApiCall.d.ts +54 -0
- package/api/utils/enqueueRequest.d.ts +2 -0
- package/api/utils/filterControlledErrors.d.ts +18 -0
- package/api.d.ts +1 -0
- package/api.js +1 -2
- package/chunks/BillToShippingAddress2.js +1 -0
- package/chunks/BillingForm.js +1 -0
- package/chunks/ErrorBanner.js +1 -0
- package/chunks/LoginForm.js +1 -0
- package/chunks/MergedCartBanner.js +1 -0
- package/chunks/OutOfStock.js +1 -0
- package/chunks/PlaceOrder.js +1 -0
- package/chunks/ShippingForm.js +1 -0
- package/chunks/ShippingMethods.js +1 -0
- package/chunks/ToggleButton.js +1 -0
- package/chunks/ToggleButton2.js +1 -0
- package/chunks/constants.js +1 -0
- package/chunks/constants2.js +1 -0
- package/chunks/constants3.js +1 -0
- package/chunks/fixtures.js +15 -0
- package/chunks/getCart.graphql.js +119 -0
- package/chunks/getCustomer.js +34 -0
- package/chunks/getMultilineValues.js +43 -0
- package/chunks/placeOrder2.js +127 -0
- package/chunks/resetCustomer.js +36 -0
- package/chunks/setBillingAddress.js +13 -0
- package/chunks/setGuestEmailOnCart.js +17 -0
- package/chunks/setPaymentMethod.js +13 -0
- package/chunks/setShippingAddress.js +13 -0
- package/chunks/setShippingMethods.js +16 -0
- package/components/AddressForm/AddressForm.d.ts +22 -0
- package/components/AddressForm/constants.d.ts +4 -0
- package/components/AddressForm/index.d.ts +7 -0
- package/components/AddressForm/useAddressBackup.d.ts +8 -0
- package/components/AddressForm/useAddressForm.d.ts +39 -0
- package/components/AddressForm/useCheckoutAddressEventEmitter.d.ts +9 -0
- package/components/AddressForm/usePreselectedFields.d.ts +9 -0
- package/components/AddressForm/utils.d.ts +13 -0
- package/components/BillToShippingAddress/BillToShippingAddress.d.ts +8 -0
- package/components/BillToShippingAddress/BillToShippingAddressSkeleton.d.ts +4 -0
- package/components/BillToShippingAddress/index.d.ts +4 -0
- package/components/Checkout/Checkout.d.ts +32 -0
- package/components/Checkout/index.d.ts +3 -0
- package/components/EmptyCart/EmptyCart.d.ts +9 -0
- package/components/EmptyCart/index.d.ts +3 -0
- package/components/EstimateShipping/EstimateShipping.d.ts +12 -0
- package/components/EstimateShipping/EstimateShippingSkeleton.d.ts +4 -0
- package/components/EstimateShipping/index.d.ts +4 -0
- package/components/FieldsForm/FieldsForm.d.ts +13 -0
- package/components/FieldsForm/FieldsFormSkeleton.d.ts +4 -0
- package/components/FieldsForm/fieldFactory.d.ts +9 -0
- package/components/FieldsForm/fixtures.d.ts +5 -0
- package/components/FieldsForm/index.d.ts +6 -0
- package/components/FieldsForm/validation.d.ts +18 -0
- package/components/Heading/Heading.d.ts +8 -0
- package/components/Heading/index.d.ts +3 -0
- package/components/LoginForm/Email.d.ts +13 -0
- package/components/LoginForm/LoginForm.d.ts +16 -0
- package/components/LoginForm/LoginFormSkeleton.d.ts +4 -0
- package/components/LoginForm/SignIn.d.ts +9 -0
- package/components/LoginForm/SignOut.d.ts +8 -0
- package/components/LoginForm/index.d.ts +6 -0
- package/components/OutOfStock/OutOfStock.d.ts +11 -0
- package/components/OutOfStock/index.d.ts +3 -0
- package/components/OverlayLoader/OverlayLoader.d.ts +6 -0
- package/components/OverlayLoader/index.d.ts +2 -0
- package/components/PaymentMethods/PaymentMethods.d.ts +13 -0
- package/components/PaymentMethods/PaymentMethodsSkeleton.d.ts +4 -0
- package/components/PaymentMethods/index.d.ts +4 -0
- package/components/PlaceOrder/PlaceOrder.d.ts +9 -0
- package/components/PlaceOrder/PlaceOrderSkeleton.d.ts +4 -0
- package/components/PlaceOrder/index.d.ts +3 -0
- package/components/ServerError/ServerError.d.ts +10 -0
- package/components/ServerError/index.d.ts +3 -0
- package/components/ShippingMethods/ShippingMethods.d.ts +12 -0
- package/components/ShippingMethods/ShippingMethodsSkeleton.d.ts +4 -0
- package/components/ShippingMethods/index.d.ts +4 -0
- package/components/ToggleButton/ToggleButton.d.ts +14 -0
- package/components/ToggleButton/assets/icons/index.d.ts +2 -0
- package/components/ToggleButton/assets/images/index.d.ts +2 -0
- package/components/ToggleButton/index.d.ts +3 -0
- package/components/index.d.ts +16 -0
- package/containers/BillToShippingAddress/BillToShippingAddress.d.ts +10 -0
- package/containers/BillToShippingAddress/constants.d.ts +2 -0
- package/containers/BillToShippingAddress/index.d.ts +4 -0
- package/containers/BillToShippingAddress.d.ts +3 -0
- package/containers/BillToShippingAddress.js +1 -1
- package/containers/BillingForm/BillingForm.d.ts +7 -0
- package/containers/BillingForm/constants.d.ts +2 -0
- package/containers/BillingForm/index.d.ts +4 -0
- package/containers/BillingForm.d.ts +3 -0
- package/containers/BillingForm.js +1 -2
- package/containers/Checkout/Checkout.d.ts +39 -0
- package/containers/Checkout/constants.d.ts +2 -0
- package/containers/Checkout/index.d.ts +4 -0
- package/containers/Checkout.d.ts +3 -0
- package/containers/Checkout.js +1 -1
- package/containers/ErrorBanner/ErrorBanner.d.ts +5 -0
- package/containers/ErrorBanner/index.d.ts +3 -0
- package/containers/ErrorBanner.d.ts +3 -0
- package/containers/ErrorBanner.js +1 -0
- package/containers/EstimateShipping/EstimateShipping.d.ts +4 -0
- package/containers/EstimateShipping/index.d.ts +3 -0
- package/containers/EstimateShipping.d.ts +3 -0
- package/containers/EstimateShipping.js +1 -0
- package/containers/LoginForm/LoginForm.d.ts +10 -0
- package/containers/LoginForm/constants.d.ts +2 -0
- package/containers/LoginForm/index.d.ts +4 -0
- package/containers/LoginForm.d.ts +3 -0
- package/containers/LoginForm.js +1 -1
- package/containers/MergedCartBanner/MergedCartBanner.d.ts +5 -0
- package/containers/MergedCartBanner/index.d.ts +3 -0
- package/containers/MergedCartBanner.d.ts +3 -0
- package/containers/MergedCartBanner.js +1 -0
- package/containers/OutOfStock/OutOfStock.d.ts +13 -0
- package/containers/OutOfStock/index.d.ts +3 -0
- package/containers/OutOfStock.d.ts +3 -0
- package/containers/OutOfStock.js +1 -0
- package/containers/PaymentMethods/PaymentMethods.d.ts +23 -0
- package/containers/PaymentMethods/defaultHandlers.d.ts +11 -0
- package/containers/PaymentMethods/index.d.ts +3 -0
- package/containers/PaymentMethods.d.ts +3 -0
- package/containers/PaymentMethods.js +1 -1
- package/containers/PlaceOrder/PlaceOrder.d.ts +9 -0
- package/containers/PlaceOrder/index.d.ts +3 -0
- package/containers/PlaceOrder.d.ts +3 -0
- package/containers/PlaceOrder.js +1 -1
- package/containers/ShippingForm/ShippingForm.d.ts +10 -0
- package/containers/ShippingForm/constants.d.ts +2 -0
- package/containers/ShippingForm/index.d.ts +4 -0
- package/containers/ShippingForm.d.ts +3 -0
- package/containers/ShippingForm.js +1 -1
- package/containers/ShippingMethods/ShippingMethods.d.ts +10 -0
- package/containers/ShippingMethods/hooks/useShippingEstimateEventEmitter.d.ts +3 -0
- package/containers/ShippingMethods/index.d.ts +3 -0
- package/containers/ShippingMethods.d.ts +3 -0
- package/containers/ShippingMethods.js +1 -1
- package/containers/index.d.ts +13 -0
- package/data/models/acdl.d.ts +99 -0
- package/data/models/address-form-fields.d.ts +52 -0
- package/data/models/address.d.ts +21 -0
- package/data/models/cart.d.ts +14 -0
- package/data/models/country.d.ts +5 -0
- package/data/models/custom-attribute.d.ts +5 -0
- package/data/models/customer.d.ts +25 -0
- package/data/models/email-availability.d.ts +2 -0
- package/data/models/index.d.ts +14 -0
- package/data/models/order.d.ts +81 -0
- package/data/models/payment-method.d.ts +5 -0
- package/data/models/price.d.ts +5 -0
- package/data/models/region.d.ts +6 -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 +17 -0
- package/data/transforms/index.d.ts +12 -0
- package/data/transforms/transform-acdl.d.ts +6 -0
- package/data/transforms/transform-address-form-fields.d.ts +66 -0
- package/data/transforms/transform-address.d.ts +89 -0
- package/data/transforms/transform-cart.d.ts +7 -0
- package/data/transforms/transform-countries.d.ts +5 -0
- package/data/transforms/transform-customer.d.ts +14 -0
- package/data/transforms/transform-email-availability.d.ts +6 -0
- package/data/transforms/transform-order.d.ts +7 -0
- package/data/transforms/transform-payment-methods.d.ts +9 -0
- package/data/transforms/transform-regions.d.ts +8 -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/hooks/index.d.ts +4 -0
- package/hooks/useBreakpoint/index.d.ts +2 -0
- package/hooks/useBreakpoint/useBreakpoint.d.ts +2 -0
- package/hooks/useLockScroll/index.d.ts +2 -0
- package/hooks/useLockScroll/useLockScroll.d.ts +5 -0
- package/hooks/useValidity/index.d.ts +2 -0
- package/hooks/useValidity/useValidity.d.ts +19 -0
- package/i18n/en_US.json.d.ts +97 -0
- package/lib/acdl.d.ts +18 -0
- package/lib/backup-data.d.ts +4 -0
- package/lib/fetch-error.d.ts +7 -0
- package/lib/index.d.ts +3 -0
- package/lib/network-error.d.ts +6 -0
- package/lib/redirect.d.ts +2 -0
- package/lib/state.d.ts +7 -0
- package/msw/browser.d.ts +2 -0
- package/msw/fixtures/fragments/american-regions.d.ts +4 -0
- package/msw/fixtures/fragments/available-shipping-methods.d.ts +23 -0
- package/msw/fixtures/fragments/billing-address.d.ts +36 -0
- package/msw/fixtures/fragments/cart.d.ts +122 -0
- package/msw/fixtures/fragments/countries.d.ts +4 -0
- package/msw/fixtures/fragments/form-fields.d.ts +4 -0
- package/msw/fixtures/fragments/index.d.ts +8 -0
- package/msw/fixtures/fragments/shipping-address.d.ts +42 -0
- package/msw/fixtures/index.d.ts +4 -0
- package/msw/fixtures/mutations/estimate-shipping-methods.d.ts +4 -0
- package/msw/fixtures/mutations/index.d.ts +8 -0
- package/msw/fixtures/mutations/place-order.d.ts +4 -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/fetch-address-form-fields.d.ts +4 -0
- package/msw/fixtures/queries/get-cart.d.ts +4 -0
- package/msw/fixtures/queries/get-countries.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-regions.d.ts +4 -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 +10 -0
- package/msw/fixtures/queries/is-email-available.d.ts +4 -0
- package/msw/handlers.d.ts +4 -0
- package/msw/server.d.ts +2 -0
- package/package.json +1 -1
- package/render/Provider.d.ts +8 -0
- package/render/index.d.ts +2 -0
- package/render/render.d.ts +6 -0
- package/render.d.ts +1 -0
- package/render.js +3 -1
- package/signals/AddressFormFieldsSignal.d.ts +7 -0
- package/signals/CartSignal.d.ts +7 -0
- package/signals/CountryListSignal.d.ts +7 -0
- package/signals/CustomerSignal.d.ts +7 -0
- package/signals/EstimateShippingMethodsSignal.d.ts +7 -0
- package/signals/IsBillToShippingSignal.d.ts +6 -0
- package/signals/RegionsSignal.d.ts +12 -0
- package/signals/SelectedShippingMethodSignal.d.ts +4 -0
- package/signals/StoreConfigSignal.d.ts +7 -0
- package/signals/index.d.ts +10 -0
- package/tests/constants.d.ts +3 -0
- package/tests/integration/utils/index.d.ts +3 -0
- package/tests/integration/utils/setup.d.ts +6 -0
- package/tests/integration/utils/user-actions.d.ts +2 -0
- package/tests/mocks/svg.d.ts +4 -0
- package/tests/utils/expectError.d.ts +9 -0
- package/tests/utils/index.d.ts +3 -0
- package/tests/utils/mockEvents.d.ts +5 -0
- package/utils/autocompleteFieldCodes/autocompleteFieldCodes.d.ts +18 -0
- package/utils/autocompleteFieldCodes/index.d.ts +2 -0
- package/utils/getMultilineValues/getMultilineValues.d.ts +3 -0
- package/utils/getMultilineValues/index.d.ts +2 -0
- package/utils/index.d.ts +7 -0
- package/utils/isEmpty/index.d.ts +2 -0
- package/utils/isEmpty/isEmpty.d.ts +2 -0
- package/utils/isNullish/index.d.ts +2 -0
- package/utils/isNullish/isNullish.d.ts +2 -0
- package/utils/parseRegionId/index.d.ts +2 -0
- package/utils/parseRegionId/parseRegionId.d.ts +2 -0
- package/utils/processFormFields/index.d.ts +2 -0
- package/utils/processFormFields/processFormFields.d.ts +21 -0
- package/utils/refetchEstimatedShippingMethods/index.d.ts +2 -0
- package/utils/refetchEstimatedShippingMethods/refetchEstimatedShippingMethods.d.ts +4 -0
- package/utils/shippingMethods/index.d.ts +2 -0
- package/utils/shippingMethods/isEqual.d.ts +4 -0
- package/181.js +0 -1
- package/212.js +0 -2
- package/212.js.LICENSE.txt +0 -1
- package/261.js +0 -2
- package/261.js.LICENSE.txt +0 -1
- package/299.js +0 -2
- package/299.js.LICENSE.txt +0 -1
- package/325.js +0 -2
- package/325.js.LICENSE.txt +0 -1
- package/350.js +0 -2
- package/350.js.LICENSE.txt +0 -1
- package/494.js +0 -2
- package/494.js.LICENSE.txt +0 -1
- package/548.js +0 -1
- package/549.js +0 -2
- package/549.js.LICENSE.txt +0 -1
- package/60.js +0 -2
- package/60.js.LICENSE.txt +0 -1
- package/627.js +0 -1
- package/645.js +0 -1
- package/757.js +0 -1
- package/805.js +0 -2
- package/805.js.LICENSE.txt +0 -1
- package/985.js +0 -2
- package/985.js.LICENSE.txt +0 -1
- package/994.js +0 -1
- package/api.js.LICENSE.txt +0 -1
- package/containers/AddressForm.js +0 -1
- package/containers/BillingForm.js.LICENSE.txt +0 -1
- package/containers/OrderSummary.js +0 -1
- package/runtime.js +0 -1
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
export declare const cartFixture: {
|
|
2
|
+
__typename?: "Cart" | undefined;
|
|
3
|
+
id: string;
|
|
4
|
+
is_virtual: boolean;
|
|
5
|
+
email?: string | null | undefined;
|
|
6
|
+
total_quantity: number;
|
|
7
|
+
billing_address?: {
|
|
8
|
+
__typename?: "BillingCartAddress" | undefined;
|
|
9
|
+
city: string;
|
|
10
|
+
firstname: string;
|
|
11
|
+
lastname: string;
|
|
12
|
+
company?: string | null | undefined;
|
|
13
|
+
postcode?: string | null | undefined;
|
|
14
|
+
vat_id?: string | null | undefined;
|
|
15
|
+
street: (string | null)[];
|
|
16
|
+
telephone?: string | null | undefined;
|
|
17
|
+
country: {
|
|
18
|
+
__typename?: "CartAddressCountry" | undefined;
|
|
19
|
+
code: string;
|
|
20
|
+
label: string;
|
|
21
|
+
};
|
|
22
|
+
region?: {
|
|
23
|
+
__typename?: "CartAddressRegion" | undefined;
|
|
24
|
+
region_id?: number | null | undefined;
|
|
25
|
+
code?: string | null | undefined;
|
|
26
|
+
label?: string | null | undefined;
|
|
27
|
+
} | null | undefined;
|
|
28
|
+
custom_attributes: ({
|
|
29
|
+
__typename?: "AttributeSelectedOptions" | undefined;
|
|
30
|
+
} | {
|
|
31
|
+
__typename?: "AttributeValue" | undefined;
|
|
32
|
+
code: string;
|
|
33
|
+
value: string;
|
|
34
|
+
} | null)[];
|
|
35
|
+
} | null | undefined;
|
|
36
|
+
shipping_addresses: ({
|
|
37
|
+
__typename?: "ShippingCartAddress" | undefined;
|
|
38
|
+
firstname: string;
|
|
39
|
+
lastname: string;
|
|
40
|
+
company?: string | null | undefined;
|
|
41
|
+
street: (string | null)[];
|
|
42
|
+
city: string;
|
|
43
|
+
postcode?: string | null | undefined;
|
|
44
|
+
vat_id?: string | null | undefined;
|
|
45
|
+
telephone?: string | null | undefined;
|
|
46
|
+
region?: {
|
|
47
|
+
__typename?: "CartAddressRegion" | undefined;
|
|
48
|
+
region_id?: number | null | undefined;
|
|
49
|
+
code?: string | null | undefined;
|
|
50
|
+
label?: string | null | undefined;
|
|
51
|
+
} | null | undefined;
|
|
52
|
+
country: {
|
|
53
|
+
__typename?: "CartAddressCountry" | undefined;
|
|
54
|
+
code: string;
|
|
55
|
+
label: string;
|
|
56
|
+
};
|
|
57
|
+
custom_attributes: ({
|
|
58
|
+
__typename?: "AttributeSelectedOptions" | undefined;
|
|
59
|
+
} | {
|
|
60
|
+
__typename?: "AttributeValue" | undefined;
|
|
61
|
+
code: string;
|
|
62
|
+
value: string;
|
|
63
|
+
} | null)[];
|
|
64
|
+
available_shipping_methods?: ({
|
|
65
|
+
__typename?: "AvailableShippingMethod" | undefined;
|
|
66
|
+
available: boolean;
|
|
67
|
+
carrier_code: string;
|
|
68
|
+
carrier_title: string;
|
|
69
|
+
error_message?: string | null | undefined;
|
|
70
|
+
method_code?: string | null | undefined;
|
|
71
|
+
method_title?: string | null | undefined;
|
|
72
|
+
amount: {
|
|
73
|
+
__typename?: "Money" | undefined;
|
|
74
|
+
currency?: import('../../../__generated__/types').CurrencyEnum | null | undefined;
|
|
75
|
+
value?: number | null | undefined;
|
|
76
|
+
};
|
|
77
|
+
price_excl_tax: {
|
|
78
|
+
__typename?: "Money" | undefined;
|
|
79
|
+
value?: number | null | undefined;
|
|
80
|
+
currency?: import('../../../__generated__/types').CurrencyEnum | null | undefined;
|
|
81
|
+
};
|
|
82
|
+
price_incl_tax: {
|
|
83
|
+
__typename?: "Money" | undefined;
|
|
84
|
+
value?: number | null | undefined;
|
|
85
|
+
currency?: import('../../../__generated__/types').CurrencyEnum | null | undefined;
|
|
86
|
+
};
|
|
87
|
+
} | null)[] | null | undefined;
|
|
88
|
+
selected_shipping_method?: {
|
|
89
|
+
__typename?: "SelectedShippingMethod" | undefined;
|
|
90
|
+
carrier_code: string;
|
|
91
|
+
carrier_title: string;
|
|
92
|
+
method_code: string;
|
|
93
|
+
method_title: string;
|
|
94
|
+
amount: {
|
|
95
|
+
__typename?: "Money" | undefined;
|
|
96
|
+
value?: number | null | undefined;
|
|
97
|
+
currency?: import('../../../__generated__/types').CurrencyEnum | null | undefined;
|
|
98
|
+
};
|
|
99
|
+
price_excl_tax: {
|
|
100
|
+
__typename?: "Money" | undefined;
|
|
101
|
+
value?: number | null | undefined;
|
|
102
|
+
currency?: import('../../../__generated__/types').CurrencyEnum | null | undefined;
|
|
103
|
+
};
|
|
104
|
+
price_incl_tax: {
|
|
105
|
+
__typename?: "Money" | undefined;
|
|
106
|
+
value?: number | null | undefined;
|
|
107
|
+
currency?: import('../../../__generated__/types').CurrencyEnum | null | undefined;
|
|
108
|
+
};
|
|
109
|
+
} | null | undefined;
|
|
110
|
+
} | null)[];
|
|
111
|
+
available_payment_methods?: ({
|
|
112
|
+
__typename?: "AvailablePaymentMethod" | undefined;
|
|
113
|
+
code: string;
|
|
114
|
+
title: string;
|
|
115
|
+
} | null)[] | null | undefined;
|
|
116
|
+
selected_payment_method?: {
|
|
117
|
+
__typename?: "SelectedPaymentMethod" | undefined;
|
|
118
|
+
code: string;
|
|
119
|
+
title: string;
|
|
120
|
+
} | null | undefined;
|
|
121
|
+
} | null | undefined;
|
|
122
|
+
//# sourceMappingURL=cart.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './shipping-address';
|
|
2
|
+
export * from './available-shipping-methods';
|
|
3
|
+
export * from './billing-address';
|
|
4
|
+
export * from './countries';
|
|
5
|
+
export * from './american-regions';
|
|
6
|
+
export * from './form-fields';
|
|
7
|
+
export * from './cart';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare const shippingAddressFixture: {
|
|
2
|
+
firstname: string;
|
|
3
|
+
lastname: string;
|
|
4
|
+
company: null;
|
|
5
|
+
street: string[];
|
|
6
|
+
city: string;
|
|
7
|
+
postcode: string;
|
|
8
|
+
vat_id: null;
|
|
9
|
+
country: {
|
|
10
|
+
code: string;
|
|
11
|
+
label: string;
|
|
12
|
+
};
|
|
13
|
+
region: {
|
|
14
|
+
region_id: number;
|
|
15
|
+
code: string;
|
|
16
|
+
label: string;
|
|
17
|
+
};
|
|
18
|
+
telephone: string;
|
|
19
|
+
custom_attributes: {}[];
|
|
20
|
+
available_shipping_methods: {
|
|
21
|
+
amount: {
|
|
22
|
+
currency: import('../../../__generated__/types').CurrencyEnum;
|
|
23
|
+
value: number;
|
|
24
|
+
};
|
|
25
|
+
available: boolean;
|
|
26
|
+
carrier_code: string;
|
|
27
|
+
carrier_title: string;
|
|
28
|
+
error_message: string;
|
|
29
|
+
method_code: string;
|
|
30
|
+
method_title: string;
|
|
31
|
+
price_excl_tax: {
|
|
32
|
+
value: number;
|
|
33
|
+
currency: import('../../../__generated__/types').CurrencyEnum;
|
|
34
|
+
};
|
|
35
|
+
price_incl_tax: {
|
|
36
|
+
value: number;
|
|
37
|
+
currency: import('../../../__generated__/types').CurrencyEnum;
|
|
38
|
+
};
|
|
39
|
+
}[];
|
|
40
|
+
selected_shipping_method: null;
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=shipping-address.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './set-shipping-address';
|
|
2
|
+
export * from './set-billing-address';
|
|
3
|
+
export * from './set-shipping-methods';
|
|
4
|
+
export * from './set-payment-method';
|
|
5
|
+
export * from './set-guest-email';
|
|
6
|
+
export * from './place-order';
|
|
7
|
+
export * from './estimate-shipping-methods';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SetBillingAddressMutation } from '../../../__generated__/types';
|
|
2
|
+
|
|
3
|
+
export declare const setBillingAddressFixture: SetBillingAddressMutation;
|
|
4
|
+
export declare const setBillingAddressSameAsShippingFixture: SetBillingAddressMutation;
|
|
5
|
+
//# sourceMappingURL=set-billing-address.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './get-cart';
|
|
2
|
+
export * from './fetch-address-form-fields';
|
|
3
|
+
export * from './get-store-config';
|
|
4
|
+
export * from './get-stock-status';
|
|
5
|
+
export * from './get-countries';
|
|
6
|
+
export * from './get-regions';
|
|
7
|
+
export * from './is-email-available';
|
|
8
|
+
export * from './get-customer';
|
|
9
|
+
export * from './get-customer-cart-stock-status';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
package/msw/server.d.ts
ADDED
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name": "@dropins/storefront-checkout", "version": "0.1.0-
|
|
1
|
+
{"name": "@dropins/storefront-checkout", "version": "0.1.0-alpha40", "@dropins/tools": "~0.27.1"}
|
package/render.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './render/index'
|
package/render.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
(function(a,o){try{if(typeof document<"u"){const t=document.createElement("style"),i=o.styleId;for(const e in o.attributes)t.setAttribute(e,o.attributes[e]);t.setAttribute("data-dropin",i),t.appendChild(document.createTextNode(a));const r=document.querySelector('style[data-dropin="sdk"]');if(r)r.after(t);else{const e=document.querySelector('link[rel="stylesheet"], style');e?e.before(t):document.head.append(t)}}}catch(t){console.error("dropin-styles (injectCodeFunction)",t)}})(`.checkout-bill-to-shipping-address{display:grid;grid-area:billToShippingAddress}.checkout-bill-to-shipping-address label{font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing);gap:0}
|
|
2
|
+
.checkout-shipping-methods{display:grid;grid-area:shippingMethods}.checkout-shipping-methods__title{color:var(--color-neutral-800);font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing);margin:0 0 var(--spacing-medium) 0}.checkout-shipping-methods__content{position:relative;display:block}.checkout-shipping-methods__method{margin-bottom:var(--spacing-medium);width:fit-content;cursor:pointer;font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing)}.checkout-shipping-methods__method:last-child{margin-bottom:0}.dropin-radio-button__label .dropin-price{color:var(--color-neutral-800);font-weight:400}.checkout-shipping-methods__options--loading{opacity:.4;pointer-events:none}.checkout-shipping-methods__spinner{margin:0 auto;position:absolute;z-index:999;left:0;right:0;top:calc(50% - (var(--size) / 2));bottom:0}.checkout-fields-form{display:grid}div[data-slot=ShippingForm]{display:grid;grid-area:shippingAddress}div[data-slot=BillingForm]{display:grid;grid-area:billingAddress}.checkout-shipping-address__skeleton{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--spacing-medium);flex-wrap:wrap;min-width:384px}.checkout-address-form__company,.checkout-address-form__street{grid-column:1 / -1}.checkout-address-form__street .dropin-input-container{margin-bottom:var(--spacing-medium)}.checkout-address-form__street .dropin-input-container:last-child{margin-bottom:0}.checkout-address-form__street .dropin-field__content{display:grid;grid-auto-flow:row;gap:var(--spacing-xxsmall)}.checkout-address-form__country_id .dropin-picker__options-container,.checkout-address-form__region .dropin-picker__options-container{z-index:100}.checkout-address-form__save{grid-column:1 / -1;justify-self:center}.checkout-fields-form__title{color:var(--color-neutral-800);font:var(--type-headline-2-default-font);letter-spacing:var(--type-headline-2-default-letter-spacing);margin:0 0 var(--spacing-medium) 0}.checkout-fields-form__form{display:grid;grid-template-columns:1fr 1fr;gap:var(--spacing-medium)}@media only screen and (min-width: 320px) and (max-width: 768px){.checkout-fields-form__form{grid-template-columns:1fr}}@media only screen and (min-width: 768px){.dropin-field--multiline{grid-column:span 2}}.checkout__content{display:grid;align-items:start;grid-template-columns:repeat(var(--grid-4-columns),1fr);grid-template-areas:"main aside";column-gap:var(--grid-4-gutters)}.checkout__main{display:grid;grid-area:main;grid-template-areas:"header" "login" "shippingAddress" "billToShippingAddress" "shippingMethods" "paymentMethods" "billingAddress" "placeOrder";grid-column:1 / span 7;row-gap:var(--spacing-xbig)}.checkout__aside{display:grid;grid-area:aside;grid-column:9 / span 4}.checkout__banner{margin-bottom:var(--spacing-xbig)}.checkout-heading__title{display:grid;grid-area:header;color:var(--color-neutral-800);font:var(--type-headline-1-font);letter-spacing:var(--type-headline-1-letter-spacing);padding:var(--spacing-small) 0;margin:0}.checkout-heading__divider-primary{margin:0}.checkout__content .dropin-divider{margin-bottom:0;width:100%}.checkout__content .checkout-billing-form__divider{margin-top:0}.checkout__content .checkout-billing-form__visible{display:block}.checkout__content .checkout-billing-form__hidden{display:none}.cart-order-summary__taxes.dropin-accordion .dropin-divider{margin:var(--spacing-medium) auto}@media only screen and (min-width: 320px) and (max-width: 768px){.checkout__content{grid-template-columns:1fr;grid-template-areas:"header" "login" "shippingAddress" "billToShippingAddress" "shippingMethods" "paymentMethods" "billingAddress" "orderSummary" "placeOrder";row-gap:var(--spacing-big);column-gap:0}.checkout__content>*:nth-last-child(2){margin-top:calc(var(--spacing-big) * -1)}div[data-slot=OrderSummary]{display:grid;grid-area:orderSummary}}.checkout-login-form{display:grid;grid-area:login}.checkout-login-form__heading{display:grid;grid-template-columns:1fr max-content;grid-auto-rows:max-content}.checkout-login-form__content{grid-auto-rows:max-content}.checkout-login-form__customer-details{display:grid;grid-auto-flow:row;gap:var(--spacing-xxsmall)}.checkout-login-form__customer-name{font:var(--type-body-1-strong-font);letter-spacing:var(--type-body-1-default-letter-spacing)}.checkout-login-form__customer-email{font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing);color:var(--color-neutral-700)}.checkout-login-form__title{grid-column-start:1;color:var(--color-neutral-800);font:var(--type-headline-2-default-font);letter-spacing:var(--type-headline-2-default-letter-spacing);margin-top:0}.checkout-login-form__sign-in,.checkout-login-form__sign-out{grid-column-start:2;color:var(--color-neutral-800);font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing);justify-self:flex-end;margin-top:var(--spacing-xxsmall)}a.checkout-login-form__link{font:var(--type-body-2-strong-font);margin-left:var(--spacing-xxsmall)}@media only screen and (min-width: 320px) and (max-width: 768px){.checkout-login-form__heading{grid-template-columns:repeat(1,1fr [col-start]);grid-template-rows:1fr}.checkout-login-form__sign-in,.checkout-login-form__sign-out{grid-column-start:1;align-self:flex-start;justify-self:flex-start;margin-top:0;margin-bottom:var(--spacing-medium)}}.checkout-payment-methods{position:relative;display:grid;grid-area:paymentMethods}.checkout-payment-methods__title{font:var(--type-headline-2-default-font);letter-spacing:var(--type-headline-2-default-letter-spacing);margin:0 0 var(--spacing-medium) 0}.checkout-payment-methods__wrapper{position:relative;display:grid}.checkout-payment-methods__methods{display:grid;grid-template-columns:1fr 1fr;gap:var(--spacing-medium)}.checkout-payment-methods__content{margin-top:var(--spacing-medium)}.checkout-payment-methods--full-width{grid-template-columns:1fr}.checkout-payment-methods--loading{opacity:.4;pointer-events:none}.checkout-payment-methods__spinner{margin:0 auto;position:absolute;z-index:999;left:0;right:0;top:calc(50% - (var(--size) / 2));bottom:0}.checkout__content [data-slot=PaymentMethods]:empty{display:none}@media only screen and (min-width: 320px) and (max-width: 768px){.checkout-payment-methods__methods{grid-template-columns:1fr}}.checkout-place-order{display:grid;grid-area:placeOrder;padding-bottom:var(--spacing-big)}.checkout-place-order__button{align-self:flex-end;justify-self:flex-end}@media only screen and (min-width:320px) and (max-width: 768px){.checkout-place-order{background-color:var(--color-neutral-200);padding:var(--spacing-medium) var(--spacing-medium) var(--spacing-big) var(--spacing-medium)}.checkout-place-order__button{align-self:center;justify-self:stretch}}.checkout-estimate-shipping{display:grid;grid-template-columns:1fr 1fr;gap:var(--spacing-xxsmall);align-items:center;color:var(--color-neutral-800)}.checkout-estimate-shipping__label,.checkout-estimate-shipping__price{font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing)}.checkout-estimate-shipping__label--muted{font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing);color:var(--color-neutral-700)}.checkout-estimate-shipping__price--muted{font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing)}.checkout-estimate-shipping__price{text-align:right}.checkout-estimate-shipping__label--bold,.checkout-estimate-shipping__price--bold{font:var(--type-body-1-emphasized-font);letter-spacing:var(--type-body-1-emphasized-letter-spacing)}.checkout-estimate-shipping__caption{font:var(--type-details-caption-2-font);letter-spacing:var(--type-details-caption-2-letter-spacing);color:var(--color-neutral-700)}.cart-order-summary__shipping .dropin-skeleton{grid-template-columns:1fr}.checkout-out-of-stock.dropin-card{border-color:var(--color-warning-500)}.checkout-out-of-stock .dropin-card__content{gap:var(--spacing-small);padding:var(--spacing-small)}.checkout-out-of-stock__title{color:var(--color-neutral-900);font:var(--type-body-2-strong-font);margin:0;display:flex;gap:var(--spacing-xxsmall);align-items:center;justify-content:left;text-align:center}.checkout-out-of-stock__message{color:var(--color-neutral-800);font:var(--type-body-2-default-font);margin:0}.checkout-out-of-stock__items{display:grid;grid-template-columns:repeat(5,100px);grid-gap:var(--spacing-small);list-style:none;padding:0;margin:0}.checkout-out-of-stock__item img{width:100%;height:auto}.checkout-out-of-stock__actions{display:flex;gap:var(--spacing-small);justify-content:flex-end}a.checkout-out-of-stock__action{font:var(--type-details-caption-1-font)}.checkout-out-of-stock__action{background:none;border:none;padding:0;cursor:pointer}.checkout-out-of-stock__action:hover{--textColor: var(--color-brand-700);text-decoration:solid underline var(--textColor);text-underline-offset:6px}.checkout-overlay-loader{align-items:center;background:var(--color-neutral-50);display:flex;height:100vh;justify-content:center;left:0;opacity:.5;position:fixed;top:0;width:100%;z-index:9999}.checkout-server-error{position:relative;text-align:center;display:grid}.checkout-server-error__icon .error-icon{color:var(--color-alert-500)}.checkout-server-error a{font:var(--type-body-2-strong-font);letter-spacing:var(--type-body-2-strong-letter-spacing)}.checkout-toggle-button{display:block;position:relative;width:100%}.checkout-toggle-button__actionButton{cursor:pointer;background-color:var(--color-neutral-200);border:var(--shape-border-width-1) solid var(--color-neutral-400);border-radius:var(--shape-border-radius-1);font:var(--type-body-2-strong-font);letter-spacing:var(--type-body-2-strong-letter-spacing);padding:var(--spacing-medium);align-items:center;display:grid}.checkout-toggle-button__selected .checkout-toggle-button__actionButton{background-color:var(--color-neutral-50);border:var(--shape-border-width-1) solid var(--color-neutral-800)}.checkout-toggle-button:has(input:focus-visible){outline:0 none;box-shadow:0 0 0 var(--shape-icon-stroke-4) var(--color-neutral-400);-webkit-box-shadow:0 0 0 var(--shape-icon-stroke-4) var(--color-neutral-400);-moz-box-shadow:0 0 0 var(--shape-icon-stroke-4) var(--color-neutral-400);border-radius:var(--shape-border-radius-1)}.checkout-toggle-button__radioButton.dropin-radio-button{cursor:pointer;position:absolute}.checkout-toggle-button__radioButton .dropin-radio-button__label:before{cursor:pointer;margin-right:0}.checkout-toggle-button__radioButton .dropin-radio-button__input:focus-visible+.dropin-radio-button__label:before{box-shadow:0 0 0 var(--shape-border-width-1) var(--color-neutral-600)}.checkout-toggle-button__content{display:flex;align-items:center;justify-content:center;margin-left:var(--spacing-big)}.checkout-toggle-button__icon{height:24px;margin-right:var(--spacing-xsmall)}`,{styleId:"checkout"});
|
|
3
|
+
import{jsx as d}from"@dropins/tools/preact-jsx-runtime.js";import{Render as m}from"@dropins/tools/lib.js";import{events as g}from"@dropins/tools/event-bus.js";import"./chunks/fixtures.js";import{c as p}from"./chunks/resetCustomer.js";import{UIProvider as y}from"@dropins/tools/components.js";import{useState as h,useEffect as b}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/preact.js";import"@dropins/tools/fetch-graphql.js";import"./chunks/getCustomer.js";import"./chunks/getCart.graphql.js";function O(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var v=function(r){return w(r)&&!S(r)};function w(e){return!!e&&typeof e=="object"}function S(e){var r=Object.prototype.toString.call(e);return r==="[object RegExp]"||r==="[object Date]"||j(e)}var E=typeof Symbol=="function"&&Symbol.for,M=E?Symbol.for("react.element"):60103;function j(e){return e.$$typeof===M}function A(e){return Array.isArray(e)?[]:{}}function o(e,r){return r.clone!==!1&&r.isMergeableObject(e)?i(A(e),e,r):e}function P(e,r,t){return e.concat(r).map(function(a){return o(a,t)})}function I(e,r){if(!r.customMerge)return i;var t=r.customMerge(e);return typeof t=="function"?t:i}function T(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(r){return Object.propertyIsEnumerable.call(e,r)}):[]}function u(e){return Object.keys(e).concat(T(e))}function f(e,r){try{return r in e}catch{return!1}}function C(e,r){return f(e,r)&&!(Object.hasOwnProperty.call(e,r)&&Object.propertyIsEnumerable.call(e,r))}function x(e,r,t){var a={};return t.isMergeableObject(e)&&u(e).forEach(function(n){a[n]=o(e[n],t)}),u(r).forEach(function(n){C(e,n)||(f(e,n)&&t.isMergeableObject(r[n])?a[n]=I(n,t)(e[n],r[n],t):a[n]=o(r[n],t))}),a}function i(e,r,t){t=t||{},t.arrayMerge=t.arrayMerge||P,t.isMergeableObject=t.isMergeableObject||v,t.cloneUnlessOtherwiseSpecified=o;var a=Array.isArray(r),n=Array.isArray(e),s=a===n;return s?a?t.arrayMerge(e,r,t):x(e,r,t):o(r,t)}i.all=function(r,t){if(!Array.isArray(r))throw new Error("first argument should be an array");return r.reduce(function(a,n){return i(a,n,t)},{})};var D=i,B=D;const L=O(B),U={title:"Checkout",LoginForm:{title:"Contact details",account:"Already have an account?",ariaLabel:"Email",invalidEmailError:"Please enter a valid email address.",missingEmailError:"Enter an email address.",emailExists:{alreadyHaveAccount:"It looks like you already have an account.",signInButton:"Sign in",forFasterCheckout:"for a faster checkout."},floatingLabel:"Email *",placeholder:"Enter your email address",signIn:"Sign In",switch:"Do you want to switch account?",signOut:"Sign Out"},ShippingMethods:{title:"Shipping options",emptyState:"This order can't be shipped to the address provided. Please review the address details you entered and make sure they're correct."},ShippingAddress:{title:"Delivery"},BillingAddress:{title:"Billing Address"},AddressForm:{Validity:{badInput:"Provide a valid {field}.",patternMismatch:"Ensure you have entered a correct {field} format.",rangeOverflow:"Choose a valid {field} within the allowed range.",rangeUnderflow:"Choose a valid {field} within the allowed range.",tooLong:"This entry is too long. Keep it under {field} characters.",tooShort:"Use at least {field} characters.",typeMismatch:"Enter a valid {field}.",valueMissing:"Enter a {field}, this field is required."}},BillToShippingAddress:{title:"Bill to shipping address"},PaymentMethods:{title:"Payment",emptyState:"No payment methods available"},OutOfStock:{title:"Your cart contains items that are out of stock",message:"The following items are out of stock:",actions:{reviewCart:"Review cart",removeOutOfStock:"Remove out of stock items"},lowInventory:{one:"Last item!",many:"Only {{count}} left!"},alert:"Out of stock!"},PlaceOrder:{button:"Place Order"},ServerError:{title:"We were unable to process your order",contactSupport:"If you continue to have issues, please contact support.",unexpected:"An unexpected error occurred while processing your order. Please try again later.",button:"Try again"},EmptyCart:{title:"Your cart is empty",button:"Start shopping"},ErrorBanner:{genericMessage:"Server error detected. Please check your connection and try again."},MergedCartBanner:{items:{one:"1 item from a previous session was added to your cart. Please review your new subtotal.",many:"{{count}} items from a previous session were added to your cart. Please review your new subtotal."}},EstimateShipping:{estimated:"Estimated Shipping",freeShipping:"Free",label:"Shipping",taxToBeDetermined:"TBD",withTaxes:"Including taxes",withoutTaxes:"Excluding taxes"}},_={Checkout:U},F={default:_},R=({children:e})=>{var s;const[r,t]=h(),a=(s=p.getConfig())==null?void 0:s.langDefinitions;b(()=>{const c=g.on("locale",l=>{l!==r&&t(l)},{eager:!0});return()=>{c==null||c.off()}},[r]);const n=L(F,a??{});return d(y,{lang:r,langDefinitions:n,children:e})},J=new m(d(R,{}));export{R as Provider,J as render};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ShippingMethod } from '../data/models';
|
|
2
|
+
|
|
3
|
+
export declare const estimateShippingMethodsSignal: import('@preact/signals-core').Signal<{
|
|
4
|
+
pending: boolean;
|
|
5
|
+
data?: ShippingMethod[] | undefined;
|
|
6
|
+
}>;
|
|
7
|
+
//# sourceMappingURL=EstimateShippingMethodsSignal.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AddressFormType } from '../data/models';
|
|
2
|
+
import { Region as RegionModel } from '../data/models/region';
|
|
3
|
+
|
|
4
|
+
export declare const regionsSignal: import('@preact/signals-core').Signal<{
|
|
5
|
+
addressType?: AddressFormType | undefined;
|
|
6
|
+
country?: string | undefined;
|
|
7
|
+
selectedRegion?: string | undefined;
|
|
8
|
+
selectedRegionId?: string | undefined;
|
|
9
|
+
pending: boolean;
|
|
10
|
+
data?: RegionModel[] | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
//# sourceMappingURL=RegionsSignal.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './AddressFormFieldsSignal';
|
|
2
|
+
export * from './CartSignal';
|
|
3
|
+
export * from './CountryListSignal';
|
|
4
|
+
export * from './CustomerSignal';
|
|
5
|
+
export * from './EstimateShippingMethodsSignal';
|
|
6
|
+
export * from './IsBillToShippingSignal';
|
|
7
|
+
export * from './RegionsSignal';
|
|
8
|
+
export * from './SelectedShippingMethodSignal';
|
|
9
|
+
export * from './StoreConfigSignal';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function setupCheckout({ clearLocalStorage, dropinProps, registerCheckoutListeners, }?: {
|
|
2
|
+
clearLocalStorage?: boolean | undefined;
|
|
3
|
+
dropinProps?: {} | undefined;
|
|
4
|
+
registerCheckoutListeners?: boolean | undefined;
|
|
5
|
+
}): Promise<void>;
|
|
6
|
+
//# sourceMappingURL=setup.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type expectErrorProps = {
|
|
2
|
+
candidate: (...args: any[]) => Promise<any>;
|
|
3
|
+
args: any[];
|
|
4
|
+
expectedError: any;
|
|
5
|
+
expectedMessage: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function expectError({ candidate, args, expectedError, expectedMessage, }: expectErrorProps): Promise<void>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=expectError.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface fieldCodes {
|
|
2
|
+
firstname: string;
|
|
3
|
+
lastname: string;
|
|
4
|
+
company: string;
|
|
5
|
+
country: string;
|
|
6
|
+
region: string;
|
|
7
|
+
city: string;
|
|
8
|
+
postcode: string;
|
|
9
|
+
telephone: string;
|
|
10
|
+
street: string;
|
|
11
|
+
email: string;
|
|
12
|
+
middlename: string;
|
|
13
|
+
prefix: string;
|
|
14
|
+
suffix: string;
|
|
15
|
+
}
|
|
16
|
+
declare const autocompleteFieldCodes: fieldCodes;
|
|
17
|
+
export default autocompleteFieldCodes;
|
|
18
|
+
//# sourceMappingURL=autocompleteFieldCodes.d.ts.map
|
package/utils/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './autocompleteFieldCodes';
|
|
2
|
+
export * from './getMultilineValues';
|
|
3
|
+
export * from './isEmpty';
|
|
4
|
+
export * from './parseRegionId';
|
|
5
|
+
export * from './processFormFields';
|
|
6
|
+
export * from './refetchEstimatedShippingMethods';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|