@dropins/storefront-checkout 0.1.0-alpha45 → 0.1.0-alpha47
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 +22 -20
- package/api/errors/index.d.ts +16 -0
- package/api/estimateShippingMethods/graphql/estimateShippingMethods.graphql.d.ts +16 -0
- package/api/estimateShippingMethods/graphql/index.d.ts +16 -0
- package/api/estimateShippingMethods/index.d.ts +16 -0
- package/api/fetch-graphql/fetch-graphql.d.ts +16 -0
- package/api/fetch-graphql/index.d.ts +16 -0
- package/api/fetchAddressFormFields/fetchAddressFormFields.d.ts +16 -0
- package/api/fetchAddressFormFields/graphql/fetchAddressFormFields.graphql.d.ts +16 -0
- package/api/fetchAddressFormFields/index.d.ts +16 -0
- package/api/getCart/getCart.d.ts +16 -0
- package/api/getCart/graphql/getCart.graphql.d.ts +16 -0
- package/api/getCart/graphql/index.d.ts +16 -0
- package/api/getCart/index.d.ts +16 -0
- package/api/getCheckoutData/getCheckoutData.d.ts +16 -0
- package/api/getCheckoutData/index.d.ts +16 -0
- package/api/getCountries/getCountries.d.ts +16 -0
- package/api/getCountries/graphql/getCountries.graphql.d.ts +16 -0
- package/api/getCountries/index.d.ts +16 -0
- package/api/getCustomer/graphql/getCustomer.graphql.d.ts +16 -0
- package/api/getCustomer/graphql/index.d.ts +16 -0
- package/api/getCustomer/index.d.ts +16 -0
- package/api/getRegions/graphql/getRegions.graphql.d.ts +16 -0
- package/api/getRegions/index.d.ts +16 -0
- package/api/getStoreConfig/graphql/getStoreConfig.graphql.d.ts +16 -0
- package/api/getStoreConfig/index.d.ts +16 -0
- package/api/index.d.ts +16 -0
- package/api/initialize/index.d.ts +16 -0
- package/api/initialize/listeners.d.ts +16 -0
- package/api/initializeCheckout/index.d.ts +16 -0
- package/api/initializeCheckout/initializeCheckout.d.ts +16 -0
- package/api/isEmailAvailable/graphql/isEmailAvailable.graphql.d.ts +16 -0
- package/api/isEmailAvailable/index.d.ts +16 -0
- package/api/placeOrder/graphql/index.d.ts +16 -0
- package/api/placeOrder/graphql/placeOrder.graphql.d.ts +17 -1
- package/api/placeOrder/index.d.ts +16 -0
- package/api/placeOrder/placeOrder.d.ts +16 -0
- package/api/redirect/index.d.ts +16 -0
- package/api/redirect/redirect.d.ts +16 -0
- package/api/resetCheckout/index.d.ts +16 -0
- package/api/resetCheckout/resetCheckout.d.ts +16 -0
- package/api/resetCustomer/index.d.ts +16 -0
- package/api/resetCustomer/resetCustomer.d.ts +16 -0
- package/api/setBillingAddress/graphql/setBillingAddress.graphql.d.ts +16 -0
- package/api/setBillingAddress/index.d.ts +16 -0
- package/api/setGuestEmailOnCart/graphql/setGuestEmailOnCart.graphql.d.ts +16 -0
- package/api/setGuestEmailOnCart/index.d.ts +16 -0
- package/api/setGuestEmailOnCart/setGuestEmailOnCart.d.ts +16 -0
- package/api/setPaymentMethod/graphql/setPaymentMethod.graphql.d.ts +16 -0
- package/api/setPaymentMethod/index.d.ts +16 -0
- package/api/setPaymentMethod/setPaymentMethod.d.ts +16 -0
- package/api/setShippingAddress/graphql/setShippingAddress.graphql.d.ts +16 -0
- package/api/setShippingAddress/index.d.ts +16 -0
- package/api/setShippingAddress/setShippingAddress.d.ts +17 -1
- package/api/setShippingMethods/graphql/setShippingMethodsOnCart.graphql.d.ts +16 -0
- package/api/setShippingMethods/index.d.ts +16 -0
- package/api/setShippingMethods/setShippingMethods.d.ts +16 -0
- package/api/utils/enqueueRequest.d.ts +16 -0
- package/api.js +1 -1
- package/chunks/BillToShippingAddress.js +1 -1
- package/chunks/OrderError.js +1 -0
- package/chunks/ShippingMethods.js +1 -1
- package/chunks/fixtures.js +15 -0
- package/chunks/getCart.graphql.js +6 -20
- package/chunks/getCustomer.js +1 -1
- package/chunks/getMultilineValues.js +43 -0
- package/chunks/placeOrder.js +6 -2
- package/chunks/resetCustomer.js +1 -1
- package/chunks/setBillingAddress.js +3 -3
- package/chunks/setGuestEmailOnCart.js +17 -0
- package/chunks/setPaymentMethod.js +13 -0
- package/chunks/setShippingAddress.js +16 -0
- package/chunks/setShippingMethods.js +3 -85
- package/chunks/transform-shipping-methods.js +1 -0
- package/chunks/withConditionalRendering.js +1 -0
- package/components/AddressForm/constants.d.ts +16 -0
- package/components/AddressForm/index.d.ts +16 -0
- package/components/BillToShippingAddress/index.d.ts +16 -0
- package/components/EstimateShipping/index.d.ts +16 -0
- package/components/FieldsForm/index.d.ts +16 -0
- package/components/Heading/index.d.ts +16 -0
- package/components/LoginForm/index.d.ts +16 -0
- package/components/OutOfStock/index.d.ts +16 -0
- package/components/OverlayLoader/index.d.ts +16 -0
- package/components/PaymentMethods/index.d.ts +16 -0
- package/components/PlaceOrder/PlaceOrder.d.ts +1 -1
- package/components/PlaceOrder/index.d.ts +16 -0
- package/components/ServerError/index.d.ts +16 -0
- package/components/ShippingMethods/index.d.ts +16 -0
- package/components/ToggleButton/assets/icons/index.d.ts +16 -0
- package/components/ToggleButton/assets/images/index.d.ts +16 -0
- package/components/ToggleButton/index.d.ts +16 -0
- package/components/index.d.ts +16 -2
- package/containers/BillToShippingAddress/BillToShippingAddress.d.ts +1 -1
- package/containers/BillToShippingAddress/constants.d.ts +16 -0
- package/containers/BillToShippingAddress/index.d.ts +16 -0
- package/containers/BillToShippingAddress.js +1 -1
- package/containers/BillingForm/BillingForm.d.ts +1 -1
- package/containers/BillingForm/constants.d.ts +16 -0
- package/containers/BillingForm/index.d.ts +16 -0
- package/containers/BillingForm.js +1 -1
- package/containers/ErrorBanner/index.d.ts +16 -0
- package/containers/ErrorBanner.js +1 -1
- package/containers/EstimateShipping/index.d.ts +16 -0
- package/containers/EstimateShipping.js +1 -1
- package/containers/LoginForm/LoginForm.d.ts +1 -1
- package/containers/LoginForm/constants.d.ts +16 -0
- package/containers/LoginForm/index.d.ts +16 -0
- package/containers/LoginForm.js +1 -1
- package/containers/MergedCartBanner/index.d.ts +16 -0
- package/containers/MergedCartBanner.js +1 -1
- package/containers/OutOfStock/index.d.ts +16 -0
- package/containers/OutOfStock.js +1 -1
- package/containers/PaymentMethods/PaymentMethods.d.ts +10 -11
- package/containers/PaymentMethods/defaultHandlers.d.ts +2 -9
- package/containers/PaymentMethods/index.d.ts +16 -0
- package/containers/PaymentMethods.js +1 -1
- package/containers/PlaceOrder/PlaceOrder.d.ts +10 -3
- package/containers/PlaceOrder/index.d.ts +16 -0
- package/containers/PlaceOrder.js +1 -1
- 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 +1 -0
- package/containers/ShippingForm/ShippingForm.d.ts +1 -1
- package/containers/ShippingForm/constants.d.ts +16 -0
- package/containers/ShippingForm/index.d.ts +17 -1
- package/containers/ShippingForm.js +1 -1
- package/containers/ShippingMethods/ShippingMethods.d.ts +7 -3
- package/containers/ShippingMethods/hooks/useShippingEstimateEventEmitter.d.ts +16 -0
- package/containers/ShippingMethods/index.d.ts +16 -0
- package/containers/ShippingMethods.js +1 -1
- package/containers/index.d.ts +17 -2
- package/data/models/acdl.d.ts +16 -0
- package/data/models/country.d.ts +16 -0
- package/data/models/custom-attribute.d.ts +16 -0
- package/data/models/email-availability.d.ts +16 -0
- package/data/models/index.d.ts +16 -0
- package/data/models/payment-method.d.ts +16 -0
- package/data/models/price.d.ts +16 -0
- package/data/models/region.d.ts +16 -0
- package/data/models/store-config.d.ts +16 -0
- package/data/transforms/index.d.ts +16 -0
- package/hocs/index.d.ts +16 -0
- package/hocs/withConditionalRendering.d.ts +1 -1
- package/hooks/index.d.ts +16 -0
- package/hooks/useBreakpoint/index.d.ts +16 -0
- package/hooks/useBreakpoint/useBreakpoint.d.ts +16 -0
- package/hooks/useLockScroll/index.d.ts +16 -0
- package/hooks/useLockScroll/useLockScroll.d.ts +16 -0
- package/hooks/useValidity/index.d.ts +16 -0
- package/hooks/useValidity/useValidity.d.ts +16 -0
- package/i18n/en_US.json.d.ts +0 -8
- package/lib/backup-data.d.ts +16 -0
- package/lib/fetch-error.d.ts +16 -0
- package/lib/index.d.ts +16 -0
- package/lib/network-error.d.ts +16 -0
- package/lib/redirect.d.ts +16 -0
- package/lib/state.d.ts +16 -0
- package/msw/browser.d.ts +16 -0
- package/msw/fixtures/fragments/billing-address.d.ts +16 -0
- package/msw/fixtures/fragments/cart.d.ts +16 -0
- package/msw/fixtures/fragments/index.d.ts +16 -0
- package/msw/fixtures/fragments/shipping-address.d.ts +16 -0
- package/msw/fixtures/index.d.ts +16 -0
- package/msw/fixtures/mutations/index.d.ts +16 -0
- package/msw/fixtures/queries/index.d.ts +16 -0
- package/msw/server.d.ts +16 -0
- package/package.json +1 -1
- package/render/index.d.ts +16 -0
- package/render.js +4 -3
- package/signals/IsBillToShippingSignal.d.ts +16 -0
- package/signals/ServerErrorSignal.d.ts +18 -0
- package/signals/index.d.ts +17 -0
- package/tests/constants.d.ts +16 -0
- package/tests/integration/utils/index.d.ts +16 -0
- package/tests/integration/utils/setup.d.ts +6 -4
- package/tests/integration/utils/user-actions.d.ts +16 -0
- package/tests/mocks/svg.d.ts +16 -0
- package/tests/utils/expectError.d.ts +16 -0
- package/tests/utils/index.d.ts +16 -0
- package/tests/utils/mockEvents.d.ts +16 -0
- package/utils/autocompleteFieldCodes/autocompleteFieldCodes.d.ts +16 -0
- package/utils/autocompleteFieldCodes/index.d.ts +16 -0
- package/utils/getDisplayName/index.d.ts +16 -0
- package/utils/getMultilineValues/getMultilineValues.d.ts +16 -0
- package/utils/getMultilineValues/index.d.ts +16 -0
- package/utils/index.d.ts +19 -0
- package/utils/isEmpty/index.d.ts +16 -0
- package/utils/isEmpty/isEmpty.d.ts +16 -0
- package/utils/isNullish/index.d.ts +16 -0
- package/utils/isNullish/isNullish.d.ts +16 -0
- package/utils/isUnexpectedError/index.d.ts +18 -0
- package/utils/isUnexpectedError/isUnexpectedError.d.ts +18 -0
- package/utils/parseRegionId/index.d.ts +16 -0
- package/utils/parseRegionId/parseRegionId.d.ts +16 -0
- package/utils/processFormFields/index.d.ts +16 -0
- package/utils/refetchEstimatedShippingMethods/index.d.ts +16 -0
- package/utils/scrollToElement/index.d.ts +18 -0
- package/utils/scrollToElement/scrollToElement.d.ts +18 -0
- package/utils/shippingMethods/index.d.ts +16 -0
- package/utils/validateForms/index.d.ts +18 -0
- package/utils/validateForms/validateForms.d.ts +18 -0
- package/chunks/EmptyCart.js +0 -1
- package/chunks/ErrorBanner.js +0 -1
- package/chunks/MergedCartBanner.js +0 -1
- package/chunks/OutOfStock.js +0 -1
- package/components/Checkout/Checkout.d.ts +0 -28
- package/components/Checkout/index.d.ts +0 -3
- package/components/EmptyCart/EmptyCart.d.ts +0 -9
- package/components/EmptyCart/index.d.ts +0 -3
- package/containers/Checkout/Checkout.d.ts +0 -35
- package/containers/Checkout/constants.d.ts +0 -2
- package/containers/Checkout/index.d.ts +0 -4
- package/containers/Checkout.d.ts +0 -3
- package/containers/Checkout.js +0 -1
- package/containers/EmptyCart/EmptyCart.d.ts +0 -8
- package/containers/EmptyCart/index.d.ts +0 -3
- package/containers/EmptyCart.d.ts +0 -3
- package/containers/EmptyCart.js +0 -1
|
@@ -1,3 +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
|
+
*******************************************************************/
|
|
1
17
|
export * from './fieldFactory';
|
|
2
18
|
export * from './validation';
|
|
3
19
|
export * from './FieldsForm';
|
|
@@ -1,3 +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
|
+
*******************************************************************/
|
|
1
17
|
export * from './Heading';
|
|
2
18
|
export { Heading as default } from './Heading';
|
|
3
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +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
|
+
*******************************************************************/
|
|
1
17
|
export * from './Email';
|
|
2
18
|
export * from './SignIn';
|
|
3
19
|
export * from './LoginForm';
|
|
@@ -1,3 +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
|
+
*******************************************************************/
|
|
1
17
|
export * from './OutOfStock';
|
|
2
18
|
export { OutOfStock as default } from './OutOfStock';
|
|
3
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2024 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
1
17
|
export * from './OverlayLoader';
|
|
2
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +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
|
+
*******************************************************************/
|
|
1
17
|
export * from './PaymentMethods';
|
|
2
18
|
export * from './PaymentMethodsSkeleton';
|
|
3
19
|
export { PaymentMethods as default } from './PaymentMethods';
|
|
@@ -3,7 +3,7 @@ import { HTMLAttributes } from 'preact/compat';
|
|
|
3
3
|
|
|
4
4
|
export interface PlaceOrderProps extends HTMLAttributes<HTMLButtonElement> {
|
|
5
5
|
disabled?: boolean;
|
|
6
|
-
onClick
|
|
6
|
+
onClick: (event: Event) => Promise<void>;
|
|
7
7
|
}
|
|
8
8
|
export declare const PlaceOrder: FunctionComponent<PlaceOrderProps>;
|
|
9
9
|
//# sourceMappingURL=PlaceOrder.d.ts.map
|
|
@@ -1,3 +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
|
+
*******************************************************************/
|
|
1
17
|
export * from './PlaceOrder';
|
|
2
18
|
export * from './PlaceOrderSkeleton';
|
|
3
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +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
|
+
*******************************************************************/
|
|
1
17
|
export * from './ServerError';
|
|
2
18
|
export { ServerError as default } from './ServerError';
|
|
3
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +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
|
+
*******************************************************************/
|
|
1
17
|
export * from './ShippingMethods';
|
|
2
18
|
export * from './ShippingMethodsSkeleton';
|
|
3
19
|
export { ShippingMethods as default } from './ShippingMethods';
|
|
@@ -1,2 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2024 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
1
17
|
export { default as Card } from './Card.svg';
|
|
2
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2024 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
1
17
|
export { default as Card } from './Card.png';
|
|
2
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +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
|
+
*******************************************************************/
|
|
1
17
|
export * from './ToggleButton';
|
|
2
18
|
export { ToggleButton as default } from './ToggleButton';
|
|
3
19
|
//# sourceMappingURL=index.d.ts.map
|
package/components/index.d.ts
CHANGED
|
@@ -1,7 +1,21 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2024 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
1
17
|
export * from './AddressForm';
|
|
2
18
|
export * from './BillToShippingAddress';
|
|
3
|
-
export * from './Checkout';
|
|
4
|
-
export * from './EmptyCart';
|
|
5
19
|
export * from './EstimateShipping';
|
|
6
20
|
export * from './FieldsForm';
|
|
7
21
|
export * from './Heading';
|
|
@@ -6,7 +6,7 @@ export declare function compareAddresses(addressFormFields: AddressFormField[],
|
|
|
6
6
|
export interface BillToShippingAddressProps extends Omit<CheckboxProps, 'name' | 'label'> {
|
|
7
7
|
}
|
|
8
8
|
export declare const BillToShippingAddress: {
|
|
9
|
-
({ hideOnEmptyCart, hideOnVirtualCart, ...props }: import('../../hocs/withConditionalRendering').ConditionalProps & BillToShippingAddressProps): import("preact/compat").JSX.Element
|
|
9
|
+
({ hideOnEmptyCart, hideOnVirtualCart, ...props }: import('../../hocs/withConditionalRendering').ConditionalProps & BillToShippingAddressProps): import("preact/compat").JSX.Element;
|
|
10
10
|
displayName: string;
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=BillToShippingAddress.d.ts.map
|
|
@@ -1,2 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2024 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
1
17
|
export declare const BILL_TO_SHIPPING_KEY = "is_bill_to_shipping_address";
|
|
2
18
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1,3 +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
|
+
*******************************************************************/
|
|
1
17
|
export * from './constants';
|
|
2
18
|
export * from './BillToShippingAddress';
|
|
3
19
|
export { BillToShippingAddress as default } from './BillToShippingAddress';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as A,B as L,c as P,B as S}from"../chunks/BillToShippingAddress.js";import"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/event-bus.js";import"../chunks/fixtures.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/setBillingAddress.js";import"../chunks/getCart.graphql.js";import"../chunks/transform-shipping-methods.js";import"@dropins/tools/lib.js";import"@dropins/tools/components.js";/* empty css */import"@dropins/tools/i18n.js";import"../chunks/withConditionalRendering.js";import"@dropins/tools/preact-compat.js";export{A as BILL_TO_SHIPPING_KEY,L as BillToShippingAddress,P as compareAddresses,S as default};
|
|
@@ -3,7 +3,7 @@ import { HTMLAttributes } from 'preact/compat';
|
|
|
3
3
|
export interface BillingFormProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
}
|
|
5
5
|
export declare const BillingForm: {
|
|
6
|
-
({ hideOnEmptyCart, hideOnVirtualCart, ...props }: import('../../hocs/withConditionalRendering').ConditionalProps & BillingFormProps): import("preact/compat").JSX.Element
|
|
6
|
+
({ hideOnEmptyCart, hideOnVirtualCart, ...props }: import('../../hocs/withConditionalRendering').ConditionalProps & BillingFormProps): import("preact/compat").JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=BillingForm.d.ts.map
|
|
@@ -1,2 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2024 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
1
17
|
export declare const BILLING_FORM_NAME = "billing_address";
|
|
2
18
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1,3 +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
|
+
*******************************************************************/
|
|
1
17
|
export * from './BillingForm';
|
|
2
18
|
export * from './constants';
|
|
3
19
|
export { BillingForm as default } from './BillingForm';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as g}from"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/event-bus.js";import{o as F,p as B,q as b,m as h}from"../chunks/fixtures.js";import{A as v}from"../chunks/getMultilineValues.js";import{s as y}from"../chunks/setBillingAddress.js";import{p as C}from"../chunks/setShippingAddress.js";import{A as S}from"../chunks/ShippingMethods.js";import"@dropins/tools/preact-hooks.js";import"@dropins/tools/lib.js";import{c as I}from"../chunks/BillToShippingAddress.js";import{w as _}from"../chunks/withConditionalRendering.js";import{useRef as k,useMemo as L,useCallback as N,useEffect as R}from"@dropins/tools/preact-compat.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/transform-shipping-methods.js";import"../chunks/getCart.graphql.js";import"@dropins/tools/i18n.js";import"@dropins/tools/components.js";/* empty css *//* empty css */const f=u=>{var p;const l=k(null),e=F.value.data,o=B.value.data,d=o==null?void 0:o.defaultBillingAddress,s=b.value.data,t=s==null?void 0:s.billingAddress,a=(p=s==null?void 0:s.shippingAddresses)==null?void 0:p[0],{checked:r,setByUser:m}=h.value,n=!r,c=L(()=>!e||!n?!1:t?!I(e,t,a):!!d,[n,e,t,a,d]),A=N(i=>y({signal:i.signal,input:{address:r?void 0:C(i.address),same_as_shipping:r}}),[r]);return R(()=>{if(!m)return;const i=new AbortController;return r||l.current.triggerSaveAddress(i.signal),()=>{i.abort()}},[r,m]),g("div",{children:g(S,{...u,addressType:v.BILLING,autoFill:c,"data-testid":"billing-form",headingId:"Checkout.BillingAddress.title",name:w,ref:l,saveAddressHandler:A,style:{display:n?"block":"none"}})})};f.displayName="BillingFormContainer";const Z=_(f),w="billing_address";export{w as BILLING_FORM_NAME,Z as BillingForm,Z as default};
|
|
@@ -1,3 +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
|
+
*******************************************************************/
|
|
1
17
|
export * from './ErrorBanner';
|
|
2
18
|
export { ErrorBanner as default } from './ErrorBanner';
|
|
3
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as o}from"@dropins/tools/preact-jsx-runtime.js";import*as l from"@dropins/tools/preact-compat.js";import{useState as m,useEffect as f}from"@dropins/tools/preact-compat.js";import{events as a}from"@dropins/tools/event-bus.js";import{AlertBanner as u,Icon as g}from"@dropins/tools/components.js";import{useText as p}from"@dropins/tools/i18n.js";const h=r=>l.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},l.createElement("path",{vectorEffect:"non-scaling-stroke",fillRule:"evenodd",clipRule:"evenodd",d:"M1 20.8953L12.1922 1.5L23.395 20.8953H1ZM13.0278 13.9638L13.25 10.0377V9H11.25V10.0377L11.4722 13.9638H13.0278ZM11.2994 16V17.7509H13.2253V16H11.2994Z",fill:"currentColor"})),x=r=>{const[c,s]=m(!1),t=p({message:"Checkout.ErrorBanner.genericMessage"});f(()=>{const n=a.on("error",e=>{(e==null?void 0:e.source)==="checkout"&&(e==null?void 0:e.type)==="network"&&s(!0)});return()=>{n==null||n.off()}},[]);const i=()=>{s(!1)};return c?o(u,{...r,className:"checkout__banner","data-testid":"error-banner",icon:o(g,{source:h}),message:o("span",{children:t.message}),"aria-label":t.message,onDismiss:i,variant:"warning"}):null};export{x as ErrorBanner,x as default};
|
|
@@ -1,3 +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
|
+
*******************************************************************/
|
|
1
17
|
export * from './EstimateShipping';
|
|
2
18
|
export { EstimateShipping as default } from './EstimateShipping';
|
|
3
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsxs as E,Fragment as L,jsx as t}from"@dropins/tools/preact-jsx-runtime.js";import"../chunks/ShippingMethods.js";import{events as S}from"@dropins/tools/event-bus.js";import{useState as M,useEffect as k}from"@dropins/tools/preact-hooks.js";import{t as w,T as I}from"../chunks/fixtures.js";import{VComponent as A,classes as C}from"@dropins/tools/lib.js";import{Skeleton as B,SkeletonRow as G,Price as l}from"@dropins/tools/components.js";/* empty css */import{Text as c,useText as P}from"@dropins/tools/i18n.js";/* empty css */import"../chunks/getMultilineValues.js";import"../chunks/transform-shipping-methods.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";const U=({estimated:e=!1,price:o,priceExclTax:r,taxExcluded:s=!1,taxIncluded:n=!1})=>E(L,{children:[t("span",{className:"checkout-estimate-shipping__label",children:e?t(c,{id:"Checkout.EstimateShipping.estimated"}):t(c,{id:"Checkout.EstimateShipping.label"})}),t(A,{node:o,className:"checkout-estimate-shipping__price"}),n&&t("span",{"data-testid":"shipping-tax-included",className:C(["checkout-estimate-shipping__caption"]),children:t(c,{id:"Checkout.EstimateShipping.withTaxes"})}),s&&E("span",{"data-testid":"shipping-tax-included-excluded",className:C(["checkout-estimate-shipping__caption"]),children:[r," ",t(c,{id:"Checkout.EstimateShipping.withoutTaxes"})]})]}),X=()=>t(B,{"data-testid":"estimate-shipping-skeleton",children:t(G,{size:"xsmall"})}),Z=()=>{const[e,o]=M(),r=e!==void 0,s=(e==null?void 0:e.amount.value)===0,{data:n,pending:_}=w.value,y=_||n===void 0,d=n==null?void 0:n.shoppingCartDisplaySetting.shipping,D=d===I.INCLUDING_EXCLUDING_TAX,g=d===I.INCLUDING_TAX,x=P({freeShipping:"Checkout.EstimateShipping.freeShipping",taxToBeDetermined:"Checkout.EstimateShipping.taxToBeDetermined"});k(()=>{const i=S.on("shipping/estimate",a=>{const p=a.shippingMethod,{amount:m,amountExclTax:u,amountInclTax:h}=p;o({estimated:!0,amount:m,amountExclTax:u,amountInclTax:h})},{eager:!0});return()=>{i==null||i.off()}},[]),k(()=>{const i=S.on("checkout/data",a=>{var f,T;const p=(T=(f=a==null?void 0:a.shippingAddresses)==null?void 0:f[0])==null?void 0:T.selectedShippingMethod;if(!p)return;const{amount:m,amountExclTax:u,amountInclTax:h}=p;o({estimated:!1,amount:m,amountExclTax:u,amountInclTax:h})},{eager:!0});return()=>{i==null||i.off()}},[]);const N=()=>s?t("span",{"data-testId":"free-shipping",children:x.freeShipping}):g&&(e!=null&&e.amountInclTax)?t(l,{"data-testid":"shipping",amount:e.amountInclTax.value,currency:e.amountInclTax.currency}):t(l,{"data-testid":"shipping",amount:e==null?void 0:e.amount.value,currency:e==null?void 0:e.amount.currency}),v=()=>e!=null&&e.amountExclTax?t(l,{"data-testid":"shipping-excluding-tax",amount:e.amountExclTax.value,currency:e.amountExclTax.currency}):t("span",{children:x.taxToBeDetermined});return t("div",{"data-testid":"estimate-shipping",className:"checkout-estimate-shipping",children:!r||y?t(X,{}):t(U,{estimated:e.estimated,price:N(),taxExcluded:D&&!s,taxIncluded:g&&!s,priceExclTax:v()})})};export{Z as EstimateShipping,Z as default};
|
|
@@ -6,7 +6,7 @@ export interface LoginFormProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
6
6
|
onSignOutClick?: () => void;
|
|
7
7
|
}
|
|
8
8
|
export declare const LoginForm: {
|
|
9
|
-
({ hideOnEmptyCart, hideOnVirtualCart, ...props }: import('../../hocs/withConditionalRendering').ConditionalProps & LoginFormProps): import("preact/compat").JSX.Element
|
|
9
|
+
({ hideOnEmptyCart, hideOnVirtualCart, ...props }: import('../../hocs/withConditionalRendering').ConditionalProps & LoginFormProps): import("preact/compat").JSX.Element;
|
|
10
10
|
displayName: string;
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=LoginForm.d.ts.map
|
|
@@ -1,2 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2024 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
1
17
|
export declare const LOGIN_FORM_NAME = "login-form";
|
|
2
18
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1,3 +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
|
+
*******************************************************************/
|
|
1
17
|
export * from './constants';
|
|
2
18
|
export * from './LoginForm';
|
|
3
19
|
export { LoginForm as default } from './LoginForm';
|
package/containers/LoginForm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as o,jsxs as c,Fragment as B}from"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/event-bus.js";import{q,p as w,k as z}from"../chunks/fixtures.js";import{i as V,s as $}from"../chunks/setGuestEmailOnCart.js";import{H as j,p as G}from"../chunks/ShippingMethods.js";import{useState as F,useEffect as O}from"@dropins/tools/preact-hooks.js";import{classes as C}from"@dropins/tools/lib.js";import{Field as P,Input as R}from"@dropins/tools/components.js";/* empty css */import{useText as N,Text as L}from"@dropins/tools/i18n.js";/* empty css */import{w as U}from"../chunks/withConditionalRendering.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/getCart.graphql.js";import"../chunks/transform-shipping-methods.js";import"../chunks/getMultilineValues.js";import"@dropins/tools/preact-compat.js";const D=({value:e,error:l,hint:t,onChange:u,onBlur:d,onInvalid:s})=>{const i=N({LoginFormLabel:"Checkout.LoginForm.ariaLabel",LoginFormFloatingLabel:"Checkout.LoginForm.floatingLabel",LoginFormPlaceholder:"Checkout.LoginForm.placeholder"});return o(P,{size:"medium",error:l,hint:t,children:o(R,{id:"customer-email",name:"customer-email",type:"email",value:e,autocomplete:"email",placeholder:i.LoginFormPlaceholder,floatingLabel:i.LoginFormFloatingLabel,onChange:u,onBlur:d,onInvalid:s,required:!0,"aria-label":i.LoginFormLabel,"aria-required":!0})})},J=({onSignInClick:e,email:l})=>c("div",{className:"checkout-login-form__sign-in",children:[o(L,{id:"Checkout.LoginForm.account"}),o("a",{"data-testid":"sign-in-link",className:"checkout-login-form__link",href:"#",target:"_blank",rel:"noreferrer",onClick:t=>{t.preventDefault(),e==null||e(l)},children:o(L,{id:"Checkout.LoginForm.signIn"})})]}),K=({name:e,className:l,currentEmail:t,hint:u,error:d=null,onEmailChange:s,onEmailBlur:i,onEmailInvalid:p,onSignInClick:v,onSignOutClick:g,customer:a,..._})=>{const n=N({Title:"Checkout.LoginForm.title"}),h=!!a;return c("div",{..._,className:C(["checkout-login-form",l]),"data-testid":"checkout-login-form",children:[c("div",{className:"checkout-login-form__heading",children:[o(j,{level:2,className:"checkout-login-form__title",children:n.Title}),h?o(Q,{onSignOutClick:g}):o(J,{onSignInClick:v,email:t})]}),a?c("div",{className:"checkout-login-form__customer-details",children:[o("div",{className:"checkout-login-form__customer-name",children:`${a==null?void 0:a.firstName} ${a==null?void 0:a.lastName}`}),o("div",{className:"checkout-login-form__customer-email",children:a==null?void 0:a.email})]}):o("div",{className:"checkout-login-form__content",children:c("form",{className:C(["dropin-login-form__form",l]),name:e,noValidate:!0,children:[o("button",{type:"submit",disabled:!0,style:"display: none","aria-hidden":"true"}),o(D,{value:t||void 0,error:d||"",hint:u,onChange:s,onBlur:i,onInvalid:p})]})})]})},Q=({onSignOutClick:e})=>c("p",{className:"checkout-login-form__sign-out",children:[o(L,{id:"Checkout.LoginForm.switch"}),o("a",{className:"checkout-login-form__link",href:"#",target:"_blank",rel:"noreferrer",onClick:l=>{l.preventDefault(),e==null||e()},children:o(L,{id:"Checkout.LoginForm.signOut"})})]}),W="login-form",X=e=>G.email.test(e),Y=1e3,x=({className:e,email:l=null,onSignInClick:t,onSignOutClick:u,...d})=>{const s=N({LoginFormInvalidEmailError:"Checkout.LoginForm.invalidEmailError",LoginFormMissingEmailError:"Checkout.LoginForm.missingEmailError",LoginFormEmailExistsAlreadyHaveAccount:"Checkout.LoginForm.emailExists.alreadyHaveAccount",LoginFormEmailExistsSignInButton:"Checkout.LoginForm.emailExists.signInButton",LoginFormEmailExistsForFasterCheckout:"Checkout.LoginForm.emailExists.forFasterCheckout"}),{data:i}=q.value,p=(i==null?void 0:i.id)||"",v=!!i,g=(i==null?void 0:i.email)||"",[a,_]=F(!1),[n,h]=F(l),[f,E]=F(null),[y,k]=F(!0),b=r=>r.valid?null:r.valueMissing?s.LoginFormMissingEmailError:s.LoginFormInvalidEmailError,A=w.value.data,I=r=>{const{value:m}=r.target;h(m),E(null),k(!0)},H=r=>{const{validity:m}=r.target;E(b(m))},M=r=>{const{validity:m}=r.target;E(b(m))};!a&&v&&(_(!0),h((i==null?void 0:i.email)||l)),O(()=>{if(f!==null&&f!==""||n===null||n===""||z.authenticated)return;const r=setTimeout(()=>{V(n).then(m=>{k(m),g!==n&&$(n).catch(console.error)}).catch(m=>{console.log(m),E(s.LoginFormInvalidEmailError),k(!0)})},Y);return()=>{r&&clearTimeout(r)}},[g,p,n,f,s.LoginFormInvalidEmailError]);const T=y?"":c(B,{children:[s.LoginFormEmailExistsAlreadyHaveAccount," ",o("a",{href:"#",onClick:r=>{r.preventDefault(),t==null||t(n)},children:s.LoginFormEmailExistsSignInButton})," ",s.LoginFormEmailExistsForFasterCheckout]});return o(K,{className:e,currentEmail:n,error:f,hint:T,name:W,onEmailBlur:H,onEmailChange:I,onEmailInvalid:M,onSignInClick:r=>{const m=n?X(n):!1;t==null||t(m?r:null)},onSignOutClick:u,customer:A,...d})};x.displayName="LoginFormContainer";const Lo=U(x);export{W as LOGIN_FORM_NAME,Lo as LoginForm,Lo as default};
|
|
@@ -1,3 +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
|
+
*******************************************************************/
|
|
1
17
|
export * from './MergedCartBanner';
|
|
2
18
|
export { MergedCartBanner as default } from './MergedCartBanner';
|
|
3
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as e}from"@dropins/tools/preact-jsx-runtime.js";import{AlertBanner as f,Icon as u}from"@dropins/tools/components.js";import{events as g}from"@dropins/tools/event-bus.js";import*as i from"@dropins/tools/preact-compat.js";import{useState as p,useEffect as I}from"@dropins/tools/preact-compat.js";import{useText as h,Text as v}from"@dropins/tools/i18n.js";const B=t=>i.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 12C0 5.37931 5.37931 0 12 0C18.6207 0 24 5.37931 24 12C24 18.6207 18.6207 24 12 24C5.37931 24 0 18.6207 0 12ZM11.8885 5.06101C11.1405 5.06101 10.5357 5.66579 10.5357 6.4138V6.57295C10.5835 7.27321 11.1882 7.81433 11.8885 7.76658H12.0795C12.7797 7.70292 13.289 7.09815 13.2413 6.4138C13.2413 5.66579 12.6365 5.06101 11.8885 5.06101ZM13.1935 16.8223H14.1007C14.2599 16.8223 14.4031 16.9655 14.4031 17.1247V17.7294C14.4031 17.9045 14.2599 18.0318 14.1007 18.0318H9.8832C9.70813 18.0318 9.58081 17.8886 9.58081 17.7294V17.1247C9.58081 16.9496 9.72405 16.8223 9.8832 16.8223H10.7904V10.7905H9.8832C9.70813 10.7905 9.58081 10.6472 9.58081 10.4881V9.88329C9.58081 9.70823 9.72405 9.58091 9.8832 9.58091H12.5888C12.923 9.58091 13.1935 9.85146 13.1935 10.1857V16.8223Z",fill:"currentColor"})),E=t=>{const[r,s]=p(0),a=h({mergedCartBannerItems:e(v,{id:"Checkout.MergedCartBanner.items",fields:{count:r},plural:r})});I(()=>{const n=g.on("cart/merged",o=>{var m;const l=(m=o==null?void 0:o.oldCartItems)==null?void 0:m.reduce((C,d)=>C+d.quantity,0);l>0&&s(l)});return()=>{n==null||n.off()}},[]);const c=()=>{s(0)};return r?e(f,{...t,className:"checkout__banner","data-testid":"merged-cart-banner",icon:e(u,{source:B}),message:e("span",{children:a.mergedCartBannerItems}),"aria-label":a.mergedCartBannerItems,onDismiss:c,variant:"neutral"}):null};export{E as MergedCartBanner,E as default};
|
|
@@ -1,3 +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
|
+
*******************************************************************/
|
|
1
17
|
export * from './OutOfStock';
|
|
2
18
|
export { OutOfStock as default } from './OutOfStock';
|
|
3
19
|
//# sourceMappingURL=index.d.ts.map
|
package/containers/OutOfStock.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsxs as n,jsx as e}from"@dropins/tools/preact-jsx-runtime.js";import"../chunks/ShippingMethods.js";import{events as k}from"@dropins/tools/event-bus.js";import"@dropins/tools/preact-hooks.js";import"../chunks/fixtures.js";import{classes as l}from"@dropins/tools/lib.js";import{Card as h,Icon as O,Image as d}from"@dropins/tools/components.js";/* empty css */import{S as p}from"../chunks/OrderError.js";import{useText as S}from"@dropins/tools/i18n.js";/* empty css */import{useState as v,useCallback as _,useEffect as g}from"@dropins/tools/preact-compat.js";import"../chunks/getMultilineValues.js";import"../chunks/transform-shipping-methods.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";const N=({className:i,items:r,onRemoveOutOfStock:o,routeCart:m,...a})=>{const s=S({title:"Checkout.OutOfStock.title",message:"Checkout.OutOfStock.message",reviewCart:"Checkout.OutOfStock.actions.reviewCart",removeOutOfStock:"Checkout.OutOfStock.actions.removeOutOfStock"});return n(h,{className:l(["checkout-out-of-stock",i]),"data-testid":"checkout-out-of-stock",variant:"secondary",...a,children:[n("h4",{className:"checkout-out-of-stock__title",children:[e(O,{source:p,size:"16",stroke:"1"}),s.title]}),e("p",{className:"checkout-out-of-stock__message",children:s.message}),e("ol",{className:"checkout-out-of-stock__items",children:r.map(u=>e("li",{"data-testid":"out-of-stock-item",className:"checkout-out-of-stock__item",children:e(d,{loading:"eager",src:u.image.src,alt:u.image.alt,width:"100",height:"100",params:{width:100}})},u.sku))}),n("div",{className:"checkout-out-of-stock__actions",children:[m&&e("a",{"data-testid":"review-cart",className:"checkout-out-of-stock__action",href:m,children:s.reviewCart}),o&&e("button",{className:"checkout-out-of-stock__action","data-testid":"remove-out-of-stock",type:"button",onClick:o,children:s.removeOutOfStock})]})]})},F=({onCartProductsUpdate:i,routeCart:r})=>{const[o,m]=v([]),a=t=>t.outOfStock||t.insufficientQuantity,s=_(()=>{if(!i)return;const t=o.filter(c=>c.outOfStock).map(c=>({uid:c.uid,quantity:0}));i(t)},[o,i]);if(g(()=>{const t=k.on("cart/data",c=>{const f=(c==null?void 0:c.items)||[];m(f.filter(a))},{eager:!0});return()=>{t==null||t.off()}},[]),o.length===0)return null;const u=!o.some(t=>t.insufficientQuantity);return e(N,{items:o,onRemoveOutOfStock:u?s:void 0,routeCart:r==null?void 0:r()})};export{F as OutOfStock,F as default};
|