@sonic-equipment/ui 128.0.0 → 130.0.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/dist/algolia/algolia-query-string-routing.js +2 -2
- package/dist/carousel/carousel.js +3 -3
- package/dist/carousel/pagination/transitions.js +1 -1
- package/dist/carousel/usp-carousel/usp-carousel.js +1 -1
- package/dist/cart-totals/cart-totals.d.ts +3 -1
- package/dist/cart-totals/cart-totals.js +6 -3
- package/dist/checkout/payment.d.ts +1 -2
- package/dist/checkout/payment.js +5 -22
- package/dist/exports.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/intl/translation-id.d.ts +1 -1
- package/dist/media/image-lightbox/image-lightbox.js +3 -3
- package/dist/node_modules/.pnpm/{instantsearch.js@4.75.4_algoliasearch@4.24.0 → instantsearch.js@4.77.3_algoliasearch@4.24.0}/node_modules/instantsearch.js/es/lib/routers/history.js +22 -22
- package/dist/node_modules/.pnpm/{instantsearch.js@4.75.4_algoliasearch@4.24.0 → instantsearch.js@4.77.3_algoliasearch@4.24.0}/node_modules/instantsearch.js/es/lib/stateMappings/simple.js +5 -5
- package/dist/node_modules/.pnpm/{instantsearch.js@4.75.4_algoliasearch@4.24.0 → instantsearch.js@4.77.3_algoliasearch@4.24.0}/node_modules/instantsearch.js/es/lib/utils/documentation.js +1 -1
- package/dist/node_modules/.pnpm/{instantsearch.js@4.75.4_algoliasearch@4.24.0 → instantsearch.js@4.77.3_algoliasearch@4.24.0}/node_modules/instantsearch.js/es/lib/utils/logger.js +1 -1
- package/dist/node_modules/.pnpm/qs@6.9.7/node_modules/qs/lib/stringify.js +1 -1
- package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/modules/thumbs.js +1 -1
- package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/shared/ssr-window.esm.js +2 -2
- package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/shared/swiper-core.js +46 -44
- package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/shared/update-on-virtual-data.js +2 -2
- package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/shared/update-swiper.js +6 -6
- package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/shared/utils.js +25 -9
- package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/swiper-react.js +5 -5
- package/dist/pages/checkout/cart-page/cart-page.js +1 -1
- package/dist/pages/checkout/payment-page/payment-page.js +3 -5
- package/dist/pages/checkout/shipping-page/components/edit-address.d.ts +2 -1
- package/dist/pages/checkout/shipping-page/components/edit-address.js +3 -2
- package/dist/pages/checkout/shipping-page/components/readonly-address.d.ts +2 -1
- package/dist/pages/checkout/shipping-page/components/readonly-address.js +4 -3
- package/dist/pages/checkout/shipping-page/components/sonic-address.d.ts +1 -0
- package/dist/pages/checkout/shipping-page/components/sonic-address.js +9 -0
- package/dist/pages/checkout/shipping-page/components/sonic-address.module.css.js +3 -0
- package/dist/pages/checkout/shipping-page/shipping-page.js +43 -19
- package/dist/pages/checkout/shipping-page/shipping-page.module.css.js +3 -0
- package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart-lines-with-atp.d.ts +31 -5
- package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart-with-atp.d.ts +31 -5
- package/dist/shared/api/storefront/services/website-service.js +7 -7
- package/dist/shared/fetch/request.js +4 -4
- package/dist/shared/providers/global-state-provider.js +2 -2
- package/dist/shared/utils/event-emitter.js +1 -1
- package/dist/styles.css +35 -15
- package/package.json +54 -54
- package/dist/checkout/payment-details.d.ts +0 -8
- package/dist/checkout/payment-details.js +0 -71
- /package/dist/node_modules/.pnpm/{instantsearch.js@4.75.4_algoliasearch@4.24.0 → instantsearch.js@4.77.3_algoliasearch@4.24.0}/node_modules/instantsearch.js/es/lib/utils/noop.js +0 -0
- /package/dist/node_modules/.pnpm/{instantsearch.js@4.75.4_algoliasearch@4.24.0 → instantsearch.js@4.77.3_algoliasearch@4.24.0}/node_modules/instantsearch.js/es/lib/utils/safelyRunOnBrowser.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/modules/free-mode.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/modules/navigation.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/shared/create-element-if-not-defined.js +0 -0
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { useMemo, useEffect, useCallback } from 'react';
|
|
3
3
|
import { Button } from '../../../buttons/button/button.js';
|
|
4
4
|
import { CartTotals } from '../../../cart-totals/cart-totals.js';
|
|
5
5
|
import { CartTotalsSummary } from '../../../cart-totals/cart-totals-summary.js';
|
|
6
|
+
import { Select } from '../../../forms/select/select.js';
|
|
6
7
|
import { FormattedMessage } from '../../../intl/formatted-message.js';
|
|
7
8
|
import { useFormattedMessage } from '../../../intl/use-formatted-message.js';
|
|
9
|
+
import { useFetchSession } from '../../../shared/api/storefront/hooks/authentication/use-fetch-session.js';
|
|
8
10
|
import { useIsAuthenticated } from '../../../shared/api/storefront/hooks/authentication/use-is-authenticated.js';
|
|
11
|
+
import { usePatchSession } from '../../../shared/api/storefront/hooks/authentication/use-patch-session.js';
|
|
9
12
|
import { useFetchCurrentCart } from '../../../shared/api/storefront/hooks/cart/use-fetch-current-cart.js';
|
|
10
13
|
import { usePatchCart } from '../../../shared/api/storefront/hooks/cart/use-patch-cart.js';
|
|
14
|
+
import { useFetchFulfillmentMethodsForCurrentCart } from '../../../shared/api/storefront/hooks/customer/use-fetch-fulfillment-methods-for-current-cart.js';
|
|
11
15
|
import { usePatchBillToAddress } from '../../../shared/api/storefront/hooks/customer/use-patch-bill-to-address.js';
|
|
12
16
|
import { useFetchCountries } from '../../../shared/api/storefront/hooks/website/use-fetch-countries.js';
|
|
13
17
|
import { useNavigate } from '../../../shared/routing/route-provider.js';
|
|
@@ -16,8 +20,11 @@ import { Page } from '../../components/page/page.js';
|
|
|
16
20
|
import { ErrorPage } from '../../error-page/error-page.js';
|
|
17
21
|
import { LoadingPage } from '../../loading-page/loading-page.js';
|
|
18
22
|
import { CheckoutPageLayout } from '../layouts/checkout-page-layout/checkout-page-layout.js';
|
|
23
|
+
import { CheckoutPageSection } from '../layouts/checkout-page-layout/components/checkout-page-section.js';
|
|
24
|
+
import { CheckoutPageSectionContent } from '../layouts/checkout-page-layout/components/checkout-page-section-content.js';
|
|
19
25
|
import { EDIT_ADDRESS_FORM_ID, EditAddresses } from './components/edit-address.js';
|
|
20
26
|
import { ReadOnlyAddresses } from './components/readonly-address.js';
|
|
27
|
+
import styles from './shipping-page.module.css.js';
|
|
21
28
|
|
|
22
29
|
const REVIEW_AND_SUBMIT_PATH = '/CheckoutReviewAndSubmit';
|
|
23
30
|
function usePatchCartAndBillingAddress() {
|
|
@@ -41,18 +48,25 @@ function usePatchCartAndBillingAddress() {
|
|
|
41
48
|
}
|
|
42
49
|
function ShippingPage() {
|
|
43
50
|
const isAuthenticated = useIsAuthenticated();
|
|
44
|
-
const { data: cart, error, isLoading: isLoadingCart } = useFetchCurrentCart();
|
|
51
|
+
const { data: cart, error, isLoading: isLoadingCart, refetch: refetchCart, } = useFetchCurrentCart();
|
|
45
52
|
const { data: countries, isLoading: isLoadingCountries } = useFetchCountries({
|
|
46
53
|
enabled: hasNo(cart?.billTo?.address1),
|
|
47
54
|
});
|
|
55
|
+
const { data: session } = useFetchSession();
|
|
56
|
+
const { data: fulfillmentMethods, isLoading: isLoadingFulfillmentMethods } = useFetchFulfillmentMethodsForCurrentCart();
|
|
57
|
+
const { isLoading: isPatchingSession, mutate: patchSession } = usePatchSession();
|
|
48
58
|
const { isError, isPatching, isSuccess, mutate: patchCartAndBillingAddress, } = usePatchCartAndBillingAddress();
|
|
49
|
-
const isLoading = isLoadingCart || isLoadingCountries;
|
|
59
|
+
const isLoading = isLoadingCart || isLoadingCountries || isLoadingFulfillmentMethods;
|
|
50
60
|
const t = useFormattedMessage();
|
|
51
61
|
const { isNavigating, navigate } = useNavigate();
|
|
52
62
|
const hasBillToAddress = useMemo(() => {
|
|
53
63
|
return Boolean(cart?.billTo?.address1);
|
|
54
64
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
55
65
|
}, [Boolean(cart)]);
|
|
66
|
+
const fulfillmentMethodOptions = fulfillmentMethods?.reduce((acc, method) => ({
|
|
67
|
+
...acc,
|
|
68
|
+
[method]: t(`fulfillmentMethod.${method}`),
|
|
69
|
+
}), {});
|
|
56
70
|
useEffect(() => {
|
|
57
71
|
if (isNavigating)
|
|
58
72
|
return;
|
|
@@ -93,22 +107,32 @@ function ShippingPage() {
|
|
|
93
107
|
{ href: '/', label: t('Home') },
|
|
94
108
|
{ href: '/CheckoutShipping', label: t('Shipping details') },
|
|
95
109
|
], title: t('Shipping details'), children: jsx(CheckoutPageLayout, { actions: {
|
|
96
|
-
primary: (jsx(Button, { withArrow: true, "data-test-selector": "checkoutShippingCartTotalContinueButton", form: EDIT_ADDRESS_FORM_ID, isDisabled: isPatching, isLoading: isPatching
|
|
97
|
-
}, mobileSummary: jsx(CartTotalsSummary, { totalAmount: cart.orderGrandTotalDisplay }), overview: jsx(CartTotals, {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
primary: (jsx(Button, { withArrow: true, "data-test-selector": "checkoutShippingCartTotalContinueButton", form: EDIT_ADDRESS_FORM_ID, isDisabled: isPatching, isLoading: isPatching || isPatchingSession ? (jsx(FormattedMessage, { id: "Updating address" })) : undefined, type: "submit", children: jsx(FormattedMessage, { id: "Continue shopping" }) })),
|
|
111
|
+
}, mobileSummary: jsx(CartTotalsSummary, { totalAmount: cart.orderGrandTotalDisplay }), overview: jsx(CartTotals, { fulfillmentMethod: fulfillmentMethods && fulfillmentMethods.length === 1
|
|
112
|
+
? cart.fulfillmentMethod
|
|
113
|
+
: undefined, shippingCost: cart.shippingAndHandlingDisplay, subtotal: cart.orderSubTotalDisplay, tax: cart.totalTaxDisplay, total: cart.orderGrandTotalDisplay, vatPercentage: cart.cartLines[0]?.pricing?.vatRate }), children: jsxs(Fragment, { children: [fulfillmentMethods && fulfillmentMethods.length > 1 && (jsx(CheckoutPageSection, { hasBorder: true, title: t('Fulfillment method'), children: jsx(CheckoutPageSectionContent, { children: jsx("div", { className: styles['fulfillment-select-wrapper'], children: jsx(Select, { isRequired: true, showLabel: true, "data-test-selector": "fulfillmentMethodSelect", defaultSelectedOption: cart.fulfillmentMethod, isLoading: isLoadingFulfillmentMethods, label: t('Fulfillment method'), name: "fulfillmentMethod", onChange: async (value) => {
|
|
114
|
+
await patchSession({
|
|
115
|
+
session: {
|
|
116
|
+
...session,
|
|
117
|
+
fulfillmentMethod: value,
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
await refetchCart();
|
|
121
|
+
}, options: fulfillmentMethodOptions || {}, variant: "solid" }) }) }) })), hasBillToAddress ? (jsx(ReadOnlyAddresses, { billTo: cart.billTo, isLoading: isPatching, isPickup: cart.fulfillmentMethod === 'PickUp', notes: cart.notes, onSubmit: async ({ notes }) => {
|
|
122
|
+
if (!cart.billTo)
|
|
123
|
+
return;
|
|
124
|
+
await patchCartAndBillingAddress({ cart, notes });
|
|
125
|
+
navigate(REVIEW_AND_SUBMIT_PATH);
|
|
126
|
+
}, shipTo: cart.shipTo })) : (jsx(EditAddresses, { countries: countries || [], isLoading: isPatching, isPickup: cart.fulfillmentMethod === 'PickUp', onSubmit: async ({ address, notes }) => {
|
|
127
|
+
if (!cart.billTo)
|
|
128
|
+
return;
|
|
129
|
+
await patchCartAndBillingAddress({
|
|
130
|
+
billTo: { ...cart.billTo, ...address },
|
|
131
|
+
cart,
|
|
132
|
+
notes,
|
|
133
|
+
});
|
|
134
|
+
navigate(REVIEW_AND_SUBMIT_PATH);
|
|
135
|
+
} }))] }) }) }));
|
|
112
136
|
}
|
|
113
137
|
|
|
114
138
|
export { ShippingPage };
|
|
@@ -8,6 +8,7 @@ export declare function useFetchCurrentCartLinesWithAtp(): {
|
|
|
8
8
|
isLoadingError: false;
|
|
9
9
|
isRefetchError: true;
|
|
10
10
|
isSuccess: false;
|
|
11
|
+
isPlaceholderData: false;
|
|
11
12
|
status: "error";
|
|
12
13
|
dataUpdatedAt: number;
|
|
13
14
|
errorUpdatedAt: number;
|
|
@@ -18,7 +19,6 @@ export declare function useFetchCurrentCartLinesWithAtp(): {
|
|
|
18
19
|
isFetchedAfterMount: boolean;
|
|
19
20
|
isInitialLoading: boolean;
|
|
20
21
|
isPaused: boolean;
|
|
21
|
-
isPlaceholderData: boolean;
|
|
22
22
|
isRefetching: boolean;
|
|
23
23
|
isStale: boolean;
|
|
24
24
|
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("../../model/storefront.model").CartModel, Error>>;
|
|
@@ -34,6 +34,7 @@ export declare function useFetchCurrentCartLinesWithAtp(): {
|
|
|
34
34
|
isLoadingError: false;
|
|
35
35
|
isRefetchError: false;
|
|
36
36
|
isSuccess: true;
|
|
37
|
+
isPlaceholderData: false;
|
|
37
38
|
status: "success";
|
|
38
39
|
dataUpdatedAt: number;
|
|
39
40
|
errorUpdatedAt: number;
|
|
@@ -44,7 +45,6 @@ export declare function useFetchCurrentCartLinesWithAtp(): {
|
|
|
44
45
|
isFetchedAfterMount: boolean;
|
|
45
46
|
isInitialLoading: boolean;
|
|
46
47
|
isPaused: boolean;
|
|
47
|
-
isPlaceholderData: boolean;
|
|
48
48
|
isRefetching: boolean;
|
|
49
49
|
isStale: boolean;
|
|
50
50
|
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("../../model/storefront.model").CartModel, Error>>;
|
|
@@ -60,6 +60,7 @@ export declare function useFetchCurrentCartLinesWithAtp(): {
|
|
|
60
60
|
isLoadingError: true;
|
|
61
61
|
isRefetchError: false;
|
|
62
62
|
isSuccess: false;
|
|
63
|
+
isPlaceholderData: false;
|
|
63
64
|
status: "error";
|
|
64
65
|
dataUpdatedAt: number;
|
|
65
66
|
errorUpdatedAt: number;
|
|
@@ -70,7 +71,6 @@ export declare function useFetchCurrentCartLinesWithAtp(): {
|
|
|
70
71
|
isFetchedAfterMount: boolean;
|
|
71
72
|
isInitialLoading: boolean;
|
|
72
73
|
isPaused: boolean;
|
|
73
|
-
isPlaceholderData: boolean;
|
|
74
74
|
isRefetching: boolean;
|
|
75
75
|
isStale: boolean;
|
|
76
76
|
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("../../model/storefront.model").CartModel, Error>>;
|
|
@@ -86,6 +86,7 @@ export declare function useFetchCurrentCartLinesWithAtp(): {
|
|
|
86
86
|
isLoadingError: false;
|
|
87
87
|
isRefetchError: false;
|
|
88
88
|
isSuccess: false;
|
|
89
|
+
isPlaceholderData: false;
|
|
89
90
|
status: "pending";
|
|
90
91
|
dataUpdatedAt: number;
|
|
91
92
|
errorUpdatedAt: number;
|
|
@@ -96,7 +97,6 @@ export declare function useFetchCurrentCartLinesWithAtp(): {
|
|
|
96
97
|
isFetchedAfterMount: boolean;
|
|
97
98
|
isInitialLoading: boolean;
|
|
98
99
|
isPaused: boolean;
|
|
99
|
-
isPlaceholderData: boolean;
|
|
100
100
|
isRefetching: boolean;
|
|
101
101
|
isStale: boolean;
|
|
102
102
|
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("../../model/storefront.model").CartModel, Error>>;
|
|
@@ -112,6 +112,7 @@ export declare function useFetchCurrentCartLinesWithAtp(): {
|
|
|
112
112
|
isLoadingError: false;
|
|
113
113
|
isRefetchError: false;
|
|
114
114
|
isSuccess: false;
|
|
115
|
+
isPlaceholderData: false;
|
|
115
116
|
status: "pending";
|
|
116
117
|
dataUpdatedAt: number;
|
|
117
118
|
errorUpdatedAt: number;
|
|
@@ -122,7 +123,32 @@ export declare function useFetchCurrentCartLinesWithAtp(): {
|
|
|
122
123
|
isFetchedAfterMount: boolean;
|
|
123
124
|
isInitialLoading: boolean;
|
|
124
125
|
isPaused: boolean;
|
|
125
|
-
|
|
126
|
+
isRefetching: boolean;
|
|
127
|
+
isStale: boolean;
|
|
128
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("../../model/storefront.model").CartModel, Error>>;
|
|
129
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
130
|
+
promise: Promise<import("../../model/storefront.model").CartModel>;
|
|
131
|
+
} | {
|
|
132
|
+
data: import("../../model/storefront.model").CartLineModel[] | undefined;
|
|
133
|
+
error: Error | null;
|
|
134
|
+
isError: boolean;
|
|
135
|
+
isFetching: boolean;
|
|
136
|
+
isLoading: boolean;
|
|
137
|
+
isPending: false;
|
|
138
|
+
isLoadingError: false;
|
|
139
|
+
isRefetchError: false;
|
|
140
|
+
isSuccess: true;
|
|
141
|
+
isPlaceholderData: true;
|
|
142
|
+
status: "success";
|
|
143
|
+
dataUpdatedAt: number;
|
|
144
|
+
errorUpdatedAt: number;
|
|
145
|
+
failureCount: number;
|
|
146
|
+
failureReason: Error | null;
|
|
147
|
+
errorUpdateCount: number;
|
|
148
|
+
isFetched: boolean;
|
|
149
|
+
isFetchedAfterMount: boolean;
|
|
150
|
+
isInitialLoading: boolean;
|
|
151
|
+
isPaused: boolean;
|
|
126
152
|
isRefetching: boolean;
|
|
127
153
|
isStale: boolean;
|
|
128
154
|
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("../../model/storefront.model").CartModel, Error>>;
|
|
@@ -12,6 +12,7 @@ export declare function useFetchCurrentCartWithAtp<T = CartModel>({ forceRecalcu
|
|
|
12
12
|
isLoadingError: false;
|
|
13
13
|
isRefetchError: true;
|
|
14
14
|
isSuccess: false;
|
|
15
|
+
isPlaceholderData: false;
|
|
15
16
|
status: "error";
|
|
16
17
|
dataUpdatedAt: number;
|
|
17
18
|
errorUpdatedAt: number;
|
|
@@ -22,7 +23,6 @@ export declare function useFetchCurrentCartWithAtp<T = CartModel>({ forceRecalcu
|
|
|
22
23
|
isFetchedAfterMount: boolean;
|
|
23
24
|
isInitialLoading: boolean;
|
|
24
25
|
isPaused: boolean;
|
|
25
|
-
isPlaceholderData: boolean;
|
|
26
26
|
isRefetching: boolean;
|
|
27
27
|
isStale: boolean;
|
|
28
28
|
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<CartModel, Error>>;
|
|
@@ -38,6 +38,7 @@ export declare function useFetchCurrentCartWithAtp<T = CartModel>({ forceRecalcu
|
|
|
38
38
|
isLoadingError: false;
|
|
39
39
|
isRefetchError: false;
|
|
40
40
|
isSuccess: true;
|
|
41
|
+
isPlaceholderData: false;
|
|
41
42
|
status: "success";
|
|
42
43
|
dataUpdatedAt: number;
|
|
43
44
|
errorUpdatedAt: number;
|
|
@@ -48,7 +49,6 @@ export declare function useFetchCurrentCartWithAtp<T = CartModel>({ forceRecalcu
|
|
|
48
49
|
isFetchedAfterMount: boolean;
|
|
49
50
|
isInitialLoading: boolean;
|
|
50
51
|
isPaused: boolean;
|
|
51
|
-
isPlaceholderData: boolean;
|
|
52
52
|
isRefetching: boolean;
|
|
53
53
|
isStale: boolean;
|
|
54
54
|
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<CartModel, Error>>;
|
|
@@ -64,6 +64,7 @@ export declare function useFetchCurrentCartWithAtp<T = CartModel>({ forceRecalcu
|
|
|
64
64
|
isLoadingError: true;
|
|
65
65
|
isRefetchError: false;
|
|
66
66
|
isSuccess: false;
|
|
67
|
+
isPlaceholderData: false;
|
|
67
68
|
status: "error";
|
|
68
69
|
dataUpdatedAt: number;
|
|
69
70
|
errorUpdatedAt: number;
|
|
@@ -74,7 +75,6 @@ export declare function useFetchCurrentCartWithAtp<T = CartModel>({ forceRecalcu
|
|
|
74
75
|
isFetchedAfterMount: boolean;
|
|
75
76
|
isInitialLoading: boolean;
|
|
76
77
|
isPaused: boolean;
|
|
77
|
-
isPlaceholderData: boolean;
|
|
78
78
|
isRefetching: boolean;
|
|
79
79
|
isStale: boolean;
|
|
80
80
|
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<CartModel, Error>>;
|
|
@@ -90,6 +90,7 @@ export declare function useFetchCurrentCartWithAtp<T = CartModel>({ forceRecalcu
|
|
|
90
90
|
isLoadingError: false;
|
|
91
91
|
isRefetchError: false;
|
|
92
92
|
isSuccess: false;
|
|
93
|
+
isPlaceholderData: false;
|
|
93
94
|
status: "pending";
|
|
94
95
|
dataUpdatedAt: number;
|
|
95
96
|
errorUpdatedAt: number;
|
|
@@ -100,7 +101,6 @@ export declare function useFetchCurrentCartWithAtp<T = CartModel>({ forceRecalcu
|
|
|
100
101
|
isFetchedAfterMount: boolean;
|
|
101
102
|
isInitialLoading: boolean;
|
|
102
103
|
isPaused: boolean;
|
|
103
|
-
isPlaceholderData: boolean;
|
|
104
104
|
isRefetching: boolean;
|
|
105
105
|
isStale: boolean;
|
|
106
106
|
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<CartModel, Error>>;
|
|
@@ -116,6 +116,7 @@ export declare function useFetchCurrentCartWithAtp<T = CartModel>({ forceRecalcu
|
|
|
116
116
|
isLoadingError: false;
|
|
117
117
|
isRefetchError: false;
|
|
118
118
|
isSuccess: false;
|
|
119
|
+
isPlaceholderData: false;
|
|
119
120
|
status: "pending";
|
|
120
121
|
dataUpdatedAt: number;
|
|
121
122
|
errorUpdatedAt: number;
|
|
@@ -126,7 +127,32 @@ export declare function useFetchCurrentCartWithAtp<T = CartModel>({ forceRecalcu
|
|
|
126
127
|
isFetchedAfterMount: boolean;
|
|
127
128
|
isInitialLoading: boolean;
|
|
128
129
|
isPaused: boolean;
|
|
129
|
-
|
|
130
|
+
isRefetching: boolean;
|
|
131
|
+
isStale: boolean;
|
|
132
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<CartModel, Error>>;
|
|
133
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
134
|
+
promise: Promise<CartModel>;
|
|
135
|
+
} | {
|
|
136
|
+
data: T | undefined;
|
|
137
|
+
error: Error | null;
|
|
138
|
+
isError: boolean;
|
|
139
|
+
isFetching: boolean;
|
|
140
|
+
isLoading: boolean;
|
|
141
|
+
isPending: false;
|
|
142
|
+
isLoadingError: false;
|
|
143
|
+
isRefetchError: false;
|
|
144
|
+
isSuccess: true;
|
|
145
|
+
isPlaceholderData: true;
|
|
146
|
+
status: "success";
|
|
147
|
+
dataUpdatedAt: number;
|
|
148
|
+
errorUpdatedAt: number;
|
|
149
|
+
failureCount: number;
|
|
150
|
+
failureReason: Error | null;
|
|
151
|
+
errorUpdateCount: number;
|
|
152
|
+
isFetched: boolean;
|
|
153
|
+
isFetchedAfterMount: boolean;
|
|
154
|
+
isInitialLoading: boolean;
|
|
155
|
+
isPaused: boolean;
|
|
130
156
|
isRefetching: boolean;
|
|
131
157
|
isStale: boolean;
|
|
132
158
|
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<CartModel, Error>>;
|
|
@@ -4,13 +4,13 @@ import { request } from '../../../fetch/request.js';
|
|
|
4
4
|
|
|
5
5
|
const countryIsoCodeToLanguageIsoCode = {
|
|
6
6
|
'*': ['EN'],
|
|
7
|
-
AT: ['
|
|
8
|
-
BE: ['
|
|
9
|
-
CH: ['
|
|
10
|
-
DE: ['
|
|
11
|
-
FR: ['
|
|
12
|
-
IT: ['
|
|
13
|
-
LU: ['
|
|
7
|
+
AT: ['DE'],
|
|
8
|
+
BE: ['NL', 'FR'],
|
|
9
|
+
CH: ['FR', 'DE', 'IT'],
|
|
10
|
+
DE: ['DE'],
|
|
11
|
+
FR: ['FR'],
|
|
12
|
+
IT: ['IT'],
|
|
13
|
+
LU: ['FR', 'DE'],
|
|
14
14
|
NL: ['EN', 'NL'],
|
|
15
15
|
};
|
|
16
16
|
async function fetchCountries() {
|
|
@@ -27,26 +27,26 @@ class RequestError extends Error {
|
|
|
27
27
|
enumerable: true,
|
|
28
28
|
configurable: true,
|
|
29
29
|
writable: true,
|
|
30
|
-
value:
|
|
30
|
+
value: undefined
|
|
31
31
|
});
|
|
32
32
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
33
33
|
Object.defineProperty(this, "body", {
|
|
34
34
|
enumerable: true,
|
|
35
35
|
configurable: true,
|
|
36
36
|
writable: true,
|
|
37
|
-
value:
|
|
37
|
+
value: undefined
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(this, "context", {
|
|
40
40
|
enumerable: true,
|
|
41
41
|
configurable: true,
|
|
42
42
|
writable: true,
|
|
43
|
-
value:
|
|
43
|
+
value: undefined
|
|
44
44
|
});
|
|
45
45
|
Object.defineProperty(this, "options", {
|
|
46
46
|
enumerable: true,
|
|
47
47
|
configurable: true,
|
|
48
48
|
writable: true,
|
|
49
|
-
value:
|
|
49
|
+
value: undefined
|
|
50
50
|
});
|
|
51
51
|
if (isResponse(responseOrError)) {
|
|
52
52
|
this.status = responseOrError.status || status || -1;
|
|
@@ -12,13 +12,13 @@ class State extends EventEmitter {
|
|
|
12
12
|
enumerable: true,
|
|
13
13
|
configurable: true,
|
|
14
14
|
writable: true,
|
|
15
|
-
value:
|
|
15
|
+
value: undefined
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(this, "_key", {
|
|
18
18
|
enumerable: true,
|
|
19
19
|
configurable: true,
|
|
20
20
|
writable: true,
|
|
21
|
-
value:
|
|
21
|
+
value: undefined
|
|
22
22
|
});
|
|
23
23
|
this._state = state;
|
|
24
24
|
this._key = key;
|
package/dist/styles.css
CHANGED
|
@@ -687,9 +687,11 @@
|
|
|
687
687
|
border-radius: var(--width);
|
|
688
688
|
animation: progress-circle-module-kCf7K 0.6s infinite linear;
|
|
689
689
|
-webkit-mask:
|
|
690
|
+
/* stylelint-disable-next-line declaration-property-value-no-unknown */
|
|
690
691
|
linear-gradient(#000 0 0) padding-box,
|
|
691
692
|
linear-gradient(#000 0 0);
|
|
692
693
|
mask:
|
|
694
|
+
/* stylelint-disable-next-line declaration-property-value-no-unknown */
|
|
693
695
|
linear-gradient(#000 0 0) padding-box,
|
|
694
696
|
linear-gradient(#000 0 0);
|
|
695
697
|
-webkit-mask-composite: xor;
|
|
@@ -1424,7 +1426,7 @@
|
|
|
1424
1426
|
cursor: default;
|
|
1425
1427
|
line-height: 1;
|
|
1426
1428
|
outline: none;
|
|
1427
|
-
|
|
1429
|
+
overflow-wrap: break-word;
|
|
1428
1430
|
}
|
|
1429
1431
|
|
|
1430
1432
|
.select-module-LgEJO {
|
|
@@ -1433,7 +1435,7 @@
|
|
|
1433
1435
|
cursor: pointer;
|
|
1434
1436
|
line-height: 1;
|
|
1435
1437
|
outline: none;
|
|
1436
|
-
|
|
1438
|
+
overflow-wrap: break-word;
|
|
1437
1439
|
}
|
|
1438
1440
|
|
|
1439
1441
|
.select-module-LgEJO .select-module-lQFw3 {
|
|
@@ -2319,9 +2321,9 @@
|
|
|
2319
2321
|
font-style: italic;
|
|
2320
2322
|
font-weight: var(--font-weight-bold);
|
|
2321
2323
|
line-height: 1;
|
|
2324
|
+
overflow-wrap: break-word;
|
|
2322
2325
|
text-align: center;
|
|
2323
2326
|
text-transform: uppercase;
|
|
2324
|
-
word-break: break-word;
|
|
2325
2327
|
}
|
|
2326
2328
|
|
|
2327
2329
|
.category-card-module-4NUjH .category-card-module-LEhh3 .category-card-module-hL4-A {
|
|
@@ -2664,8 +2666,8 @@
|
|
|
2664
2666
|
font-weight: var(--font-weight-bold);
|
|
2665
2667
|
-webkit-line-clamp: 4;
|
|
2666
2668
|
line-height: 1;
|
|
2669
|
+
overflow-wrap: break-word;
|
|
2667
2670
|
text-wrap: balance;
|
|
2668
|
-
word-break: break-word;
|
|
2669
2671
|
}
|
|
2670
2672
|
|
|
2671
2673
|
.product-card-module-pLaiB .product-card-module-Q0VvF .product-card-module-CStNi mark {
|
|
@@ -2900,15 +2902,15 @@
|
|
|
2900
2902
|
}
|
|
2901
2903
|
|
|
2902
2904
|
/**
|
|
2903
|
-
* Swiper 11.1
|
|
2905
|
+
* Swiper 11.2.1
|
|
2904
2906
|
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
|
2905
2907
|
* https://swiperjs.com
|
|
2906
2908
|
*
|
|
2907
|
-
* Copyright 2014-
|
|
2909
|
+
* Copyright 2014-2025 Vladimir Kharlampidi
|
|
2908
2910
|
*
|
|
2909
2911
|
* Released under the MIT License
|
|
2910
2912
|
*
|
|
2911
|
-
* Released on:
|
|
2913
|
+
* Released on: January 10, 2025
|
|
2912
2914
|
*/
|
|
2913
2915
|
|
|
2914
2916
|
/* FONT_START */
|
|
@@ -3847,7 +3849,11 @@ button.swiper-pagination-bullet {
|
|
|
3847
3849
|
display: none;
|
|
3848
3850
|
}
|
|
3849
3851
|
|
|
3850
|
-
.cart-totals-module-Bk9zi
|
|
3852
|
+
.cart-totals-module-Bk9zi,
|
|
3853
|
+
.cart-totals-module-Bk9zi * {
|
|
3854
|
+
box-sizing: border-box;
|
|
3855
|
+
}
|
|
3856
|
+
.cart-totals-module-Bk9zi p {
|
|
3851
3857
|
margin: 0;
|
|
3852
3858
|
}
|
|
3853
3859
|
.cart-totals-module-Bk9zi .cart-totals-module-VJ51p {
|
|
@@ -3869,11 +3875,19 @@ button.swiper-pagination-bullet {
|
|
|
3869
3875
|
margin-bottom: 10px;
|
|
3870
3876
|
}
|
|
3871
3877
|
.cart-totals-module-Bk9zi .cart-totals-module-2RLLQ {
|
|
3878
|
+
--breakout: var(--space-16);
|
|
3879
|
+
|
|
3880
|
+
width: calc(100% + (2 * var(--breakout)));
|
|
3872
3881
|
padding: 10px var(--space-16);
|
|
3873
3882
|
margin-bottom: var(--space-32);
|
|
3883
|
+
margin-left: calc(-1 * var(--breakout));
|
|
3874
3884
|
background-color: var(--color-brand-light-gray);
|
|
3875
3885
|
font-weight: var(--font-weight-bold);
|
|
3876
3886
|
}
|
|
3887
|
+
.cart-totals-module-Bk9zi .cart-totals-module-2RLLQ .cart-totals-module-ciNsz,
|
|
3888
|
+
.cart-totals-module-Bk9zi .cart-totals-module-2RLLQ .cart-totals-module-KaxpH {
|
|
3889
|
+
font-weight: inherit;
|
|
3890
|
+
}
|
|
3877
3891
|
|
|
3878
3892
|
.cart-totals-summary-module-iFaoy {
|
|
3879
3893
|
display: block;
|
|
@@ -3984,7 +3998,7 @@ button.swiper-pagination-bullet {
|
|
|
3984
3998
|
background: var(--tooltip-bg-color);
|
|
3985
3999
|
color: var(--color-white);
|
|
3986
4000
|
outline: none;
|
|
3987
|
-
|
|
4001
|
+
overflow-wrap: break-word;
|
|
3988
4002
|
}
|
|
3989
4003
|
|
|
3990
4004
|
.tooltip-module-T-DtX .tooltip-module-CBW5f svg {
|
|
@@ -4460,7 +4474,7 @@ button.swiper-pagination-bullet {
|
|
|
4460
4474
|
-webkit-box-orient: vertical;
|
|
4461
4475
|
-webkit-line-clamp: 1;
|
|
4462
4476
|
line-clamp: 1;
|
|
4463
|
-
|
|
4477
|
+
overflow-wrap: break-word;
|
|
4464
4478
|
}
|
|
4465
4479
|
|
|
4466
4480
|
.search-list-item-module-WXp77 .search-list-item-module-CPrhz .search-list-item-module--5uqN mark {
|
|
@@ -4562,7 +4576,7 @@ button.swiper-pagination-bullet {
|
|
|
4562
4576
|
margin-bottom: var(--space-24);
|
|
4563
4577
|
font-size: var(--font-size-24);
|
|
4564
4578
|
font-weight: var(--font-weight-medium);
|
|
4565
|
-
|
|
4579
|
+
overflow-wrap: break-word;
|
|
4566
4580
|
}
|
|
4567
4581
|
|
|
4568
4582
|
.search-content-module-H-FX2 .search-content-module-mhiBZ {
|
|
@@ -5220,12 +5234,9 @@ button.swiper-pagination-bullet {
|
|
|
5220
5234
|
}
|
|
5221
5235
|
}
|
|
5222
5236
|
|
|
5223
|
-
.checkout-page-section-module-zyovs:not(:first-child) {
|
|
5224
|
-
margin-top: var(--space-24);
|
|
5225
|
-
}
|
|
5226
|
-
|
|
5227
5237
|
.checkout-page-section-module-zyovs:not(:last-child) {
|
|
5228
5238
|
padding-bottom: var(--space-32);
|
|
5239
|
+
margin-bottom: var(--space-24);
|
|
5229
5240
|
}
|
|
5230
5241
|
|
|
5231
5242
|
.checkout-page-section-module-zyovs.checkout-page-section-module-pe5iL:not(:last-child) {
|
|
@@ -5263,6 +5274,11 @@ button.swiper-pagination-bullet {
|
|
|
5263
5274
|
}
|
|
5264
5275
|
}
|
|
5265
5276
|
|
|
5277
|
+
.sonic-address-module-9Q9-Q {
|
|
5278
|
+
line-height: 1.5;
|
|
5279
|
+
white-space: pre;
|
|
5280
|
+
}
|
|
5281
|
+
|
|
5266
5282
|
.edit-address-module-oC1yA {
|
|
5267
5283
|
display: grid;
|
|
5268
5284
|
gap: var(--space-16);
|
|
@@ -5300,6 +5316,10 @@ button.swiper-pagination-bullet {
|
|
|
5300
5316
|
margin-bottom: var(--space-12);
|
|
5301
5317
|
}
|
|
5302
5318
|
|
|
5319
|
+
.shipping-page-module-v6oci {
|
|
5320
|
+
display: grid;
|
|
5321
|
+
}
|
|
5322
|
+
|
|
5303
5323
|
.product-details-page-layout-module-pPtZX {
|
|
5304
5324
|
display: flex;
|
|
5305
5325
|
flex-direction: column;
|