@dropins/storefront-cart 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/addProductsToCart/graphql/AddProductsToCartMutation.d.ts +16 -0
- package/api/addProductsToCart/index.d.ts +16 -0
- package/api/createEmptyCart/createEmptyCart.d.ts +16 -0
- package/api/createEmptyCart/graphql/CreateCartMutation.d.ts +16 -0
- package/api/createEmptyCart/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/getCartData/graphql/CartQuery.d.ts +16 -0
- package/api/getCartData/index.d.ts +16 -0
- package/api/getEstimateShipping/graphql/countriesAndRegionsQueries.d.ts +16 -0
- package/api/getEstimateShipping/graphql/estimateShippingMethodsMutation.d.ts +16 -0
- package/api/getEstimateShipping/index.d.ts +16 -0
- package/api/getEstimatedTotals/graphql/GetEstimatedTotalsMutation.d.ts +16 -0
- package/api/getEstimatedTotals/index.d.ts +16 -0
- package/api/getStoreConfig/graphql/StoreConfigQuery.d.ts +16 -0
- package/api/getStoreConfig/index.d.ts +16 -0
- package/api/graphql/CartFragment.d.ts +16 -0
- package/api/index.d.ts +16 -0
- package/api/initialize/index.d.ts +16 -0
- package/api/initializeCart/graphql/MergeCartsMutation.d.ts +16 -0
- package/api/initializeCart/index.d.ts +16 -0
- package/api/refreshCart/index.d.ts +16 -0
- package/api/resetCart/index.d.ts +16 -0
- package/api/updateProductsFromCart/graphql/UpdateProductsMutation.d.ts +16 -0
- package/api/updateProductsFromCart/index.d.ts +16 -0
- package/api.js +3 -3
- package/chunks/MiniCart.js +1 -1
- package/chunks/OrderSummary.js +1 -1
- package/chunks/acdl.js +1 -0
- package/chunks/updateProductsFromCart.js +4 -4
- package/components/Cart/index.d.ts +16 -0
- package/components/CartSummaryGrid/index.d.ts +16 -0
- package/components/CartSummaryList/index.d.ts +16 -0
- package/components/EmptyCart/index.d.ts +16 -0
- package/components/EstimateShipping/index.d.ts +16 -0
- package/components/MiniCart/index.d.ts +16 -0
- package/components/OrderSummary/index.d.ts +16 -0
- package/components/index.d.ts +16 -0
- package/containers/Cart/index.d.ts +16 -0
- package/containers/Cart.js +1 -1
- package/containers/CartSummaryGrid/index.d.ts +16 -0
- package/containers/CartSummaryList/index.d.ts +16 -0
- package/containers/CartSummaryList.js +1 -1
- package/containers/EmptyCart/index.d.ts +16 -0
- package/containers/EstimateShipping/index.d.ts +16 -0
- package/containers/MiniCart/index.d.ts +16 -0
- package/containers/MiniCart.js +1 -1
- package/containers/OrderSummary/index.d.ts +16 -0
- package/containers/OrderSummary.js +1 -1
- package/containers/index.d.ts +16 -0
- package/data/models/acdl-models.d.ts +16 -0
- package/data/models/cart-model.d.ts +16 -0
- package/data/models/index.d.ts +16 -0
- package/data/models/store-models.d.ts +16 -0
- package/data/transforms/__fixtures__/estimatedTotalsData.d.ts +16 -0
- package/data/transforms/__fixtures__/productTypesData.d.ts +16 -0
- package/data/transforms/index.d.ts +16 -0
- package/hooks/index.d.ts +16 -0
- package/hooks/useEstimatedShipping.d.ts +16 -0
- package/hooks/useEstimatedTotals.d.ts +16 -0
- package/lib/acdl.d.ts +2 -0
- package/lib/cookies.d.ts +16 -0
- package/lib/fetch-error.d.ts +16 -0
- package/package.json +1 -1
- package/render/index.d.ts +16 -0
|
@@ -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 ADD_PRODUCTS_TO_CART_MUTATION: string;
|
|
2
18
|
//# sourceMappingURL=AddProductsToCartMutation.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 './addProductsToCart';
|
|
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 declare const createEmptyCart: () => Promise<any>;
|
|
2
18
|
//# sourceMappingURL=createEmptyCart.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 CREATE_EMPTY_CART_MUTATION = "\n mutation CREATE_EMPTY_CART_MUTATION {\n createEmptyCart\n }\n";
|
|
2
18
|
//# sourceMappingURL=CreateCartMutation.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 './createEmptyCart';
|
|
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 declare const setEndpoint: (endpoint: string) => void, setFetchGraphQlHeader: (key: string, value: string | null) => void, removeFetchGraphQlHeader: (key: string) => void, setFetchGraphQlHeaders: (header: import('@adobe/fetch-graphql').Header) => void, fetchGraphQl: <T = any>(query: string, options?: import('@adobe/fetch-graphql').FetchOptions | undefined) => Promise<{
|
|
2
18
|
errors?: import('@adobe/fetch-graphql').FetchQueryError | undefined;
|
|
3
19
|
data: T;
|
|
@@ -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 './fetch-graphql';
|
|
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 declare const GUEST_CART_QUERY: string;
|
|
2
18
|
export declare const CUSTOMER_CART_QUERY: string;
|
|
3
19
|
//# sourceMappingURL=CartQuery.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 './getCartData';
|
|
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 declare const COUNTRIES_QUERY = "\nquery COUNTRIES_QUERY {\n countries {\n label: full_name_locale\n id\n }\n storeConfig {\n defaultCountry: default_country\n }\n}\n";
|
|
2
18
|
export declare const REGIONS_QUERY = "\nquery REGIONS_QUERY($id: String) {\n country(id: $id) {\n available_regions {\n code\n\t\t\tname\n }\n }\n}\n";
|
|
3
19
|
export type CountryData = {
|
|
@@ -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 ESTIMATE_SHIPPING_METHODS_MUTATION = "\n mutation ESTIMATE_SHIPPING_METHODS_MUTATION(\n $cartId: String!\n $address: EstimateAddressInput!\n ) {\n estimateShippingMethods(\n input: {\n cart_id: $cartId\n address: $address\n }\n ) {\n amount {\n currency\n value\n }\n carrier_code\n method_code\n error_message\n price_excl_tax {\n currency\n value\n }\n price_incl_tax {\n currency\n value\n }\n }\n }\n";
|
|
2
18
|
//# sourceMappingURL=estimateShippingMethodsMutation.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 './getEstimateShipping';
|
|
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 declare const GET_ESTIMATED_TOTALS_MUTATION: string;
|
|
2
18
|
//# sourceMappingURL=GetEstimatedTotalsMutation.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 './getEstimatedTotals';
|
|
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 declare const STORE_CONFIG_QUERY = "\nquery STORE_CONFIG_QUERY {\n storeConfig {\n minicart_display \n minicart_max_items\n cart_expires_in_days \n cart_summary_display_quantity\n default_country\n category_fixed_product_tax_display_setting\n product_fixed_product_tax_display_setting\n sales_fixed_product_tax_display_setting\n shopping_cart_display_full_summary\n shopping_cart_display_grand_total\n shopping_cart_display_price\n shopping_cart_display_shipping\n shopping_cart_display_subtotal\n shopping_cart_display_tax_gift_wrapping\n shopping_cart_display_zero_tax\n configurable_thumbnail_source\n }\n}\n";
|
|
2
18
|
//# sourceMappingURL=StoreConfigQuery.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 './getStoreConfig';
|
|
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 declare const CART_FRAGMENT: string;
|
|
2
18
|
export declare const CART_ITEMS_PAGINATION_ARGUMENTS = "\n $pageSize: Int! = 100,\n $currentPage: Int! = 1,\n $itemsSortInput: QuoteItemsSortInput! = {field: CREATED_AT, order: DESC}\n";
|
|
3
19
|
export declare const CUSTOMER_ACCOUNT_FRAGMENT = "\ncustomer {\n addresses {\n default_shipping\n country_id\n postcode\n region {\n region\n region_code\n region_id\n }\n }\n}";
|
package/api/index.d.ts
CHANGED
|
@@ -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 './initialize';
|
|
2
18
|
export * from './fetch-graphql';
|
|
3
19
|
export * from './addProductsToCart';
|
|
@@ -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 './initialize';
|
|
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 declare const MERGE_CARTS_MUTATION: string;
|
|
2
18
|
//# sourceMappingURL=MergeCartsMutation.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 './initializeCart';
|
|
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 * from './refreshCart';
|
|
2
18
|
//# sourceMappingURL=index.d.ts.map
|
package/api/resetCart/index.d.ts
CHANGED
|
@@ -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 './resetCart';
|
|
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 declare const UPDATE_PRODUCTS_FROM_CART_MUTATION: string;
|
|
2
18
|
//# sourceMappingURL=UpdateProductsMutation.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 './updateProductsFromCart';
|
|
2
18
|
//# sourceMappingURL=index.d.ts.map
|
package/api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s,f as p,h as T}from"./chunks/resetCart.js";import{g as $,r as v,d as Q,a as H,b as k,c as z}from"./chunks/resetCart.js";import{C as g,a as l,t as f}from"./chunks/CartFragment.js";import{events as m}from"@dropins/tools/event-bus.js";import{
|
|
1
|
+
import{s,f as p,h as T}from"./chunks/resetCart.js";import{g as $,r as v,d as Q,a as H,b as k,c as z}from"./chunks/resetCart.js";import{C as g,a as l,t as f}from"./chunks/CartFragment.js";import{events as m}from"@dropins/tools/event-bus.js";import{c as h,p as I}from"./chunks/acdl.js";import{c as _,g as E,a as A}from"./chunks/getStoreConfig.js";import{b as j,e as q,i as B,d as J}from"./chunks/getStoreConfig.js";import{u as L}from"./chunks/updateProductsFromCart.js";import{g as W,b as X,a as Z}from"./chunks/getEstimateShipping.js";import{g as at}from"./chunks/getEstimatedTotals.js";import{g as et}from"./chunks/persisted-data.js";import"@dropins/tools/fetch-graphql.js";import"@dropins/tools/lib.js";const R=`
|
|
2
2
|
mutation ADD_PRODUCTS_TO_CART_MUTATION(
|
|
3
3
|
$cartId: String!,
|
|
4
4
|
$cartItems: [CartItemInput!]!,
|
|
@@ -18,8 +18,8 @@ import{s,f as p,h as T}from"./chunks/resetCart.js";import{g as $,r as v,d as Q,a
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
${l}
|
|
21
|
-
`,
|
|
21
|
+
`,b=async a=>{let o=!1;const n=s.cartId||await O().then(e=>(o=!0,e));return p(R,{variables:{cartId:n,cartItems:a.map(({sku:e,parentSku:r,quantity:c,optionsUIDs:t,enteredOptions:i})=>({sku:e,parent_sku:r,quantity:c,selected_options:t,entered_options:i}))}}).then(({errors:e,data:r})=>{var i;const c=[...((i=r==null?void 0:r.addProductsToCart)==null?void 0:i.user_errors)??[],...e??[]];if(c.length>0)return T(c);const t=f(r.addProductsToCart.cart);if(m.emit("cart/updated",t),m.emit("cart/data",t),t){const d=t.items.filter(C=>a.some(({sku:u})=>u===C.sku));o?h(t,d,s.locale??"en-US"):I(t,d,s.locale??"en-US")}return t})},P=`
|
|
22
22
|
mutation CREATE_EMPTY_CART_MUTATION {
|
|
23
23
|
createEmptyCart
|
|
24
24
|
}
|
|
25
|
-
`,O=async()=>{const{disableGuestCart:a}=_.getConfig();if(a)throw new Error("Guest cart is disabled");return await p(P).then(({data:o})=>{const n=o.createEmptyCart;return s.cartId=n,n})},F=async()=>{const a=s.authenticated?await E():await A();return m.emit("cart/updated",a),m.emit("cart/data",a),a};export{
|
|
25
|
+
`,O=async()=>{const{disableGuestCart:a}=_.getConfig();if(a)throw new Error("Guest cart is disabled");return await p(P).then(({data:o})=>{const n=o.createEmptyCart;return s.cartId=n,n})},F=async()=>{const a=s.authenticated?await E():await A();return m.emit("cart/updated",a),m.emit("cart/data",a),a};export{b as addProductsToCart,_ as config,O as createEmptyCart,p as fetchGraphQl,j as getCartData,et as getCartDataFromCache,$ as getConfig,W as getCountries,E as getCustomerCartPayload,X as getEstimateShipping,at as getEstimatedTotals,A as getGuestCartPayload,Z as getRegions,q as getStoreConfig,B as initialize,J as initializeCart,F as refreshCart,v as removeFetchGraphQlHeader,Q as resetCart,H as setEndpoint,k as setFetchGraphQlHeader,z as setFetchGraphQlHeaders,L as updateProductsFromCart};
|
package/chunks/MiniCart.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as d,Fragment as
|
|
1
|
+
import{jsx as e,jsxs as d,Fragment as G}from"@dropins/tools/preact-jsx-runtime.js";import{useState as N,useEffect as g,useCallback as H}from"@dropins/tools/preact-compat.js";import{classes as p,VComponent as f,Slot as k}from"@dropins/tools/lib.js";import{g as M}from"./persisted-data.js";import{events as P}from"@dropins/tools/event-bus.js";/* empty css */import{Price as Q,Button as S}from"@dropins/tools/components.js";import{useText as T}from"@dropins/tools/i18n.js";import{s as _}from"./resetCart.js";import{a as D,b as X}from"./acdl.js";import{u as O}from"./updateProductsFromCart.js";import"./CartSummaryGrid.js";import{C as R}from"./CartSummaryList.js";import"./OrderSummary.js";const j=({className:h,products:n,orderSummary:i,empty:r,...a})=>e("div",{...a,className:p(["cart-cart",h]),children:d("div",{className:p(["cart-cart__wrapper"]),children:[e("div",{"data-testid":"cart-content",className:p(["cart-cart__content",["cart-cart__content--empty",r||i==null],["cart-cart__content--full-width",r||i==null]]),children:n&&e(f,{node:n})}),n&&i&&e(f,{node:i,className:p(["cart-cart__order-summary"])})]})}),A=({className:h,products:n,subtotal:i,subtotalExcludingTaxes:r,ctas:a,...m})=>{const o=T({subtotal:"Cart.MiniCart.subtotal",subtotalExcludingTaxes:"Cart.MiniCart.subtotalExcludingTaxes"});return e("div",{...m,className:p(["cart-mini-cart",h]),children:n&&d(G,{children:[e("div",{className:"cart-mini-cart__products","data-testid":"mini-cart-products-wrapper",children:n}),d("div",{className:"cart-mini-cart__footer","data-testid":"mini-cart-subtotals",children:[i&&d("div",{className:"cart-mini-cart__footer__estimated-total","data-testid":"mini-cart-subtotal",children:[o.subtotal,e(f,{node:i})]}),r&&d("div",{className:"cart-mini-cart__footer__estimated-total-excluding-taxes","data-testid":"mini-cart-subtotal-excluding-taxes",children:[o.subtotalExcludingTaxes,e(f,{node:r,className:p(["dropin-price-summary__price","dropin-price-summary__price--muted"])})]}),a&&e(f,{node:a,className:"cart-mini-cart__footer__ctas"})]})]})})},F=({children:h,routeProduct:n,routeEmptyCartCTA:i,slots:r,initialData:a=null,...m})=>{const[o,v]=N(a),[t,C]=N(new Map),c={hasErrors:t.size>0},b=(s,y)=>O([{uid:s,quantity:y}]);g(()=>{const s=P.on("cart/data",y=>{v(y)},{eager:!0});return()=>{s==null||s.off()}},[]),g(()=>{a&&Object.keys(a).length>0&&D(a,_.locale??"en-US")},[a]);const x=r!=null&&r.OrderSummary?e(k,{name:"OrderSummary",slot:r.OrderSummary,context:{...c}}):void 0,I=s=>b(s,0),u=e(k,{name:"ProductList",slot:r==null?void 0:r.ProductList,context:{itemQuantityUpdateHandler:b,itemRemoveHandler:I},children:e(R,{"data-testid":"default-cart-summary-list",routeProduct:n,routeEmptyCartCTA:i,initialData:o,enableRemoveItem:!0,enableUpdateItemQuantity:!0,onItemsErrorsChange:C})});return e(j,{...m,empty:((o==null?void 0:o.items)&&o.items.length===0)??!0,orderSummary:x,products:u})};F.getInitialData=async function(){return M()};const V=({children:h,initialData:n=null,slots:i,routeProduct:r,routeCart:a,routeCheckout:m,routeEmptyCartCTA:o,...v})=>{var U,E;const[t,C]=N(n),c=(U=_.config)==null?void 0:U.shoppingCartDisplaySetting;g(()=>{const l=P.on("cart/data",L=>{C(L)},{eager:!0});return()=>{l==null||l.off()}},[]);const b=T({cartLink:"Cart.MiniCart.cartLink",checkoutLink:"Cart.MiniCart.checkoutLink"}),x=(l,L)=>O([{uid:l,quantity:L}]),I=l=>x(l,0),u=t==null?void 0:t.hasOutOfStockItems,s=H(()=>{t&&!u&&X(t,_.locale)},[t,u]);g(()=>{n&&Object.keys(n).length>0&&D(n,_.locale||"en-US")},[n]);const y=e(k,{name:"ProductList",slot:i==null?void 0:i.ProductList,context:{itemQuantityUpdateHandler:x,itemRemoveHandler:I,totalQuantity:t==null?void 0:t.totalQuantity},children:e(R,{"data-testid":"default-cart-summary-list",routeProduct:r,routeEmptyCartCTA:o,initialData:t,maxItems:(E=_.config)==null?void 0:E.miniCartMaxItemsDisplay,hideHeading:!(t!=null&&t.totalQuantity),enableRemoveItem:!0})}),w=()=>(c==null?void 0:c.subtotal)==="INCLUDING_TAX"||(c==null?void 0:c.subtotal)==="INCLUDING_EXCLUDING_TAX"?{amount:t==null?void 0:t.subtotal.includingTax.value,currency:t==null?void 0:t.subtotal.includingTax.currency,"data-testid":"subtotal-including-tax",style:{font:"inherit"}}:{amount:t==null?void 0:t.subtotal.excludingTax.value,currency:t==null?void 0:t.subtotal.excludingTax.currency,"data-testid":"subtotal-excluding-tax",style:{font:"inherit"}};return e(A,{...v,subtotal:t!=null&&t.totalQuantity?(t==null?void 0:t.subtotal)&&e(Q,{...w()}):void 0,subtotalExcludingTaxes:t!=null&&t.totalQuantity?(t==null?void 0:t.subtotal)&&((c==null?void 0:c.subtotal)==="INCLUDING_EXCLUDING_TAX"?e(Q,{amount:t==null?void 0:t.subtotal.excludingTax.value,currency:t==null?void 0:t.subtotal.excludingTax.currency,"data-testid":"subtotal-including-excluding-tax",style:{font:"inherit"}}):void 0):void 0,ctas:t!=null&&t.totalQuantity?d("div",{children:[m&&e(S,{"data-testid":"route-checkout-button",variant:"primary",href:u?void 0:m(),disabled:u,"aria-disabled":u,onClick:s,children:b.checkoutLink}),a&&e(S,{"data-testid":"route-cart-button",variant:"tertiary",href:a(),children:b.cartLink})]}):void 0,products:y})};V.getInitialData=async function(){return M()};export{F as C,V as M};
|