@sonic-equipment/ui 126.0.0 → 128.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.
Files changed (175) hide show
  1. package/dist/address/address.d.ts +6 -1
  2. package/dist/address/address.js +2 -2
  3. package/dist/algolia/filter-section.js +1 -1
  4. package/dist/cards/orderline-card/connected-orderline-card.js +1 -1
  5. package/dist/cards/orderline-card/orderline-card.d.ts +3 -3
  6. package/dist/cards/orderline-card/orderline-card.js +3 -2
  7. package/dist/cards/orderline-card/orderline-card.module.css.js +1 -1
  8. package/dist/cards/product-card/product-card.js +1 -1
  9. package/dist/cart-totals/cart-totals.d.ts +1 -1
  10. package/dist/cart-totals/cart-totals.js +1 -1
  11. package/dist/checkout/adyen-payment.d.ts +3 -5
  12. package/dist/checkout/adyen-payment.js +22 -10
  13. package/dist/checkout/adyen-payment.module.css.js +3 -0
  14. package/dist/checkout/payment-details.d.ts +5 -2
  15. package/dist/checkout/payment-details.js +54 -4
  16. package/dist/checkout/payment.d.ts +8 -3
  17. package/dist/checkout/payment.js +168 -34
  18. package/dist/checkout/payment.module.css.js +3 -0
  19. package/dist/checkout/use-get-adyen-redirect-result.d.ts +1 -0
  20. package/dist/checkout/use-get-adyen-redirect-result.js +13 -0
  21. package/dist/checkout/use-has-returned-from-adyen.d.ts +1 -0
  22. package/dist/checkout/use-has-returned-from-adyen.js +8 -0
  23. package/dist/collapsables/accordion/accordion.d.ts +10 -2
  24. package/dist/collapsables/accordion/accordion.js +20 -1
  25. package/dist/collapsables/accordion/accordion.module.css.js +1 -1
  26. package/dist/exports.d.ts +38 -24
  27. package/dist/forms/checkbox/checkbox.d.ts +2 -1
  28. package/dist/forms/checkbox/checkbox.js +2 -2
  29. package/dist/forms/input/input.js +1 -3
  30. package/dist/forms/label/label.d.ts +1 -1
  31. package/dist/forms/select/select.d.ts +4 -2
  32. package/dist/forms/select/select.js +6 -3
  33. package/dist/forms/select/select.module.css.js +1 -1
  34. package/dist/global-search/search-input/connected-search-input.js +1 -1
  35. package/dist/index.js +41 -27
  36. package/dist/intl/missing-translation-provider.js +9 -2
  37. package/dist/intl/translation-id.d.ts +1 -1
  38. package/dist/loading/loading-overlay.js +1 -1
  39. package/dist/pages/{cart-page → checkout/cart-page}/cart-page.js +20 -20
  40. package/dist/pages/{layouts → checkout/layouts}/checkout-page-layout/checkout-page-layout.js +3 -3
  41. package/dist/pages/checkout/layouts/checkout-page-layout/checkout-page-layout.module.css.js +3 -0
  42. package/dist/pages/checkout/layouts/checkout-page-layout/components/checkout-page-section-content.d.ts +7 -0
  43. package/dist/pages/checkout/layouts/checkout-page-layout/components/checkout-page-section-content.js +9 -0
  44. package/dist/pages/checkout/layouts/checkout-page-layout/components/checkout-page-section-header.d.ts +8 -0
  45. package/dist/pages/checkout/layouts/checkout-page-layout/components/checkout-page-section-header.js +9 -0
  46. package/dist/pages/checkout/layouts/checkout-page-layout/components/checkout-page-section-link.d.ts +4 -0
  47. package/dist/pages/checkout/layouts/checkout-page-layout/components/checkout-page-section-link.js +8 -0
  48. package/dist/pages/checkout/layouts/checkout-page-layout/components/checkout-page-section.d.ts +7 -0
  49. package/dist/pages/checkout/layouts/checkout-page-layout/components/checkout-page-section.js +10 -0
  50. package/dist/pages/checkout/layouts/checkout-page-layout/components/checkout-page-section.module.css.js +3 -0
  51. package/dist/pages/checkout/payment-page/payment-page.d.ts +1 -0
  52. package/dist/pages/checkout/payment-page/payment-page.js +89 -0
  53. package/dist/pages/{shipping-page → checkout/shipping-page}/components/edit-address.d.ts +1 -1
  54. package/dist/pages/{shipping-page → checkout/shipping-page}/components/edit-address.js +13 -13
  55. package/dist/pages/checkout/shipping-page/components/edit-address.module.css.js +3 -0
  56. package/dist/pages/{shipping-page → checkout/shipping-page}/components/readonly-address.d.ts +1 -1
  57. package/dist/pages/checkout/shipping-page/components/readonly-address.js +27 -0
  58. package/dist/pages/checkout/shipping-page/components/readonly-address.module.css.js +3 -0
  59. package/dist/pages/checkout/shipping-page/shipping-page.js +114 -0
  60. package/dist/pages/{page → components/page}/page.d.ts +1 -1
  61. package/dist/pages/{page → components/page}/page.js +3 -5
  62. package/dist/pages/components/page/page.module.css.js +3 -0
  63. package/dist/pages/components/page-container/page-container.module.css.js +3 -0
  64. package/dist/pages/components/page-meta-data/page-meta-data.d.ts +16 -0
  65. package/dist/pages/components/page-meta-data/page-meta-data.js +95 -0
  66. package/dist/pages/error-page/error-page.js +1 -1
  67. package/dist/pages/product/layouts/product-details-page-layout/product-details-page-layout.module.css.js +3 -0
  68. package/dist/pages/{product-details-page → product/product-details-page}/components/product-details-images/product-detail-images.d.ts +1 -1
  69. package/dist/pages/{product-details-page → product/product-details-page}/components/product-details-images/product-detail-images.js +6 -6
  70. package/dist/pages/{product-details-page → product/product-details-page}/components/product-details-images/product-detail-images.module.css.js +1 -1
  71. package/dist/pages/{product-details-page → product/product-details-page}/components/product-details-panel/product-details-panel.js +11 -11
  72. package/dist/pages/product/product-details-page/components/product-details-panel/product-details-panel.module.css.js +3 -0
  73. package/dist/pages/{product-details-page → product/product-details-page}/components/product-details-recently-viewed/product-details-recently-viewed.d.ts +1 -1
  74. package/dist/pages/{product-details-page → product/product-details-page}/components/product-details-recently-viewed/product-details-recently-viewed.js +4 -4
  75. package/dist/pages/product/product-details-page/product-details-page.js +30 -0
  76. package/dist/pages/{product-details-page → product/product-details-page}/product-details.d.ts +1 -1
  77. package/dist/pages/{product-details-page → product/product-details-page}/product-details.js +7 -7
  78. package/dist/pages/{product-listing-page → product/product-listing-page}/no-results/no-results.js +4 -4
  79. package/dist/pages/product/product-listing-page/no-results/no-results.module.css.js +3 -0
  80. package/dist/pages/{product-listing-page → product/product-listing-page}/product-listing-page-category-carousel/product-listing-page-category-carousel.js +3 -3
  81. package/dist/pages/{product-listing-page → product/product-listing-page}/product-listing-page-data-types.d.ts +3 -1
  82. package/dist/pages/product/product-listing-page/product-listing-page.js +37 -0
  83. package/dist/pages/product/product-listing-page/product-listing-page.module.css.js +3 -0
  84. package/dist/pages/{product-listing-page → product/product-listing-page}/product-listing-product-overview/product-listing-product-overview.js +6 -6
  85. package/dist/pages/{product-listing-page → product/product-listing-page}/product-listing.js +16 -16
  86. package/dist/pages/{search-result-page → product/search-result-page}/search-result-product-overview/search-result-product-overview.js +6 -6
  87. package/dist/pages/{search-result-page → product/search-result-page}/search-results-page-category-carousel/search-results-page-category-carousel.js +3 -3
  88. package/dist/pages/{search-result-page → product/search-result-page}/search-results-page.js +22 -17
  89. package/dist/pages/product/search-result-page/search-results-page.module.css.js +3 -0
  90. package/dist/shared/api/bff/model/bff.model.d.ts +14 -0
  91. package/dist/shared/api/bff/services/bff-service.d.ts +1 -1
  92. package/dist/shared/api/bff/services/bff-service.js +1 -0
  93. package/dist/shared/api/shared/hooks/use-awaitable-mutation.d.ts +20 -4
  94. package/dist/shared/api/shared/hooks/use-awaitable-mutation.js +29 -21
  95. package/dist/shared/api/storefront/hooks/authentication/use-patch-session.d.ts +7 -4
  96. package/dist/shared/api/storefront/hooks/authentication/use-patch-session.js +4 -3
  97. package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart-with-atp.d.ts +2 -1
  98. package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart-with-atp.js +4 -2
  99. package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart.d.ts +3 -1
  100. package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart.js +3 -2
  101. package/dist/shared/api/storefront/hooks/cart/use-patch-cart.d.ts +9 -8
  102. package/dist/shared/api/storefront/hooks/cart/use-patch-cart.js +6 -4
  103. package/dist/shared/api/storefront/hooks/cart/use-place-order.d.ts +10 -4
  104. package/dist/shared/api/storefront/hooks/cart/use-place-order.js +11 -6
  105. package/dist/shared/api/storefront/hooks/customer/use-fetch-fulfillment-methods-by-customer-id.d.ts +4 -0
  106. package/dist/shared/api/storefront/hooks/customer/use-fetch-fulfillment-methods-by-customer-id.js +12 -0
  107. package/dist/shared/api/storefront/hooks/customer/use-fetch-fulfillment-methods-for-current-cart.d.ts +3 -0
  108. package/dist/shared/api/storefront/hooks/customer/use-fetch-fulfillment-methods-for-current-cart.js +12 -0
  109. package/dist/shared/api/storefront/hooks/customer/use-patch-bill-to-address.d.ts +5 -2
  110. package/dist/shared/api/storefront/hooks/customer/use-patch-bill-to-address.js +1 -1
  111. package/dist/shared/api/storefront/hooks/payment/use-invalidate-adyen.d.ts +1 -1
  112. package/dist/shared/api/storefront/hooks/payment/use-invalidate-adyen.js +1 -1
  113. package/dist/shared/api/storefront/model/storefront.model.d.ts +3 -1
  114. package/dist/shared/api/storefront/services/cart-service.d.ts +7 -3
  115. package/dist/shared/api/storefront/services/cart-service.js +11 -8
  116. package/dist/shared/api/storefront/services/customer-service.d.ts +3 -0
  117. package/dist/shared/api/storefront/services/customer-service.js +9 -1
  118. package/dist/shared/api/storefront/services/finance-service.d.ts +13 -0
  119. package/dist/shared/api/storefront/services/finance-service.js +17 -0
  120. package/dist/shared/api/storefront/services/translation-service.js +1 -1
  121. package/dist/shared/hooks/use-css-link.d.ts +3 -0
  122. package/dist/shared/hooks/use-css-link.js +20 -0
  123. package/dist/shared/hooks/use-script.d.ts +15 -0
  124. package/dist/shared/hooks/use-script.js +33 -0
  125. package/dist/shared/providers/react-query-container.js +4 -2
  126. package/dist/shared/routing/route-provider.d.ts +12 -4
  127. package/dist/shared/routing/route-provider.js +14 -10
  128. package/dist/shared/routing/with-routing.js +6 -6
  129. package/dist/shared/utils/string.d.ts +1 -0
  130. package/dist/shared/utils/string.js +6 -1
  131. package/dist/shared/utils/string.test.d.ts +1 -0
  132. package/dist/shared/utils/types.d.ts +3 -0
  133. package/dist/shared/utils/types.js +8 -0
  134. package/dist/styles.css +690 -331
  135. package/dist/tooltip/tooltip.d.ts +2 -2
  136. package/dist/typography/heading/heading.d.ts +4 -2
  137. package/dist/typography/heading/heading.js +3 -2
  138. package/dist/typography/heading/heading.module.css.js +1 -1
  139. package/package.json +1 -1
  140. package/dist/pages/layouts/checkout-page-layout/checkout-page-layout.module.css.js +0 -3
  141. package/dist/pages/layouts/product-details-page-layout/product-details-page-layout.module.css.js +0 -3
  142. package/dist/pages/page/page.module.css.js +0 -3
  143. package/dist/pages/page-container/page-container.module.css.js +0 -3
  144. package/dist/pages/product-details-page/components/product-details-panel/product-details-panel.module.css.js +0 -3
  145. package/dist/pages/product-details-page/product-details-page.js +0 -22
  146. package/dist/pages/product-listing-page/no-results/no-results.module.css.js +0 -3
  147. package/dist/pages/product-listing-page/product-listing-page.js +0 -29
  148. package/dist/pages/product-listing-page/product-listing-page.module.css.js +0 -3
  149. package/dist/pages/search-result-page/search-results-page.module.css.js +0 -3
  150. package/dist/pages/shipping-page/components/edit-address.module.css.js +0 -3
  151. package/dist/pages/shipping-page/components/readonly-address.js +0 -25
  152. package/dist/pages/shipping-page/components/readonly-address.module.css.js +0 -3
  153. package/dist/pages/shipping-page/shipping-page.js +0 -75
  154. package/dist/pages/shipping-page/shipping-page.module.css.js +0 -3
  155. /package/dist/pages/{cart-page → checkout/cart-page}/cart-page.d.ts +0 -0
  156. /package/dist/pages/{layouts → checkout/layouts}/checkout-page-layout/checkout-page-layout.d.ts +0 -0
  157. /package/dist/pages/{shipping-page → checkout/shipping-page}/shipping-page.d.ts +0 -0
  158. /package/dist/pages/{page-container → components/page-container}/page-container.d.ts +0 -0
  159. /package/dist/pages/{page-container → components/page-container}/page-container.js +0 -0
  160. /package/dist/pages/{layouts → product/layouts}/product-details-page-layout/product-details-page-layout.d.ts +0 -0
  161. /package/dist/pages/{layouts → product/layouts}/product-details-page-layout/product-details-page-layout.js +0 -0
  162. /package/dist/pages/{product-details-page → product/product-details-page}/components/product-details-panel/product-details-panel.d.ts +0 -0
  163. /package/dist/pages/{product-details-page → product/product-details-page}/product-details-page.d.ts +0 -0
  164. /package/dist/pages/{product-listing-page → product/product-listing-page}/no-results/no-results.d.ts +0 -0
  165. /package/dist/pages/{product-listing-page → product/product-listing-page}/product-listing-page-category-carousel/product-listing-page-category-carousel.d.ts +0 -0
  166. /package/dist/pages/{product-listing-page → product/product-listing-page}/product-listing-page-provider/product-listing-page-context.d.ts +0 -0
  167. /package/dist/pages/{product-listing-page → product/product-listing-page}/product-listing-page-provider/product-listing-page-context.js +0 -0
  168. /package/dist/pages/{product-listing-page → product/product-listing-page}/product-listing-page-provider/product-listing-page-provider.d.ts +0 -0
  169. /package/dist/pages/{product-listing-page → product/product-listing-page}/product-listing-page-provider/product-listing-page-provider.js +0 -0
  170. /package/dist/pages/{product-listing-page → product/product-listing-page}/product-listing-page.d.ts +0 -0
  171. /package/dist/pages/{product-listing-page → product/product-listing-page}/product-listing-product-overview/product-listing-product-overview.d.ts +0 -0
  172. /package/dist/pages/{product-listing-page → product/product-listing-page}/product-listing.d.ts +0 -0
  173. /package/dist/pages/{search-result-page → product/search-result-page}/search-result-product-overview/search-result-product-overview.d.ts +0 -0
  174. /package/dist/pages/{search-result-page → product/search-result-page}/search-results-page-category-carousel/search-results-page-category-carousel.d.ts +0 -0
  175. /package/dist/pages/{search-result-page → product/search-result-page}/search-results-page.d.ts +0 -0
@@ -0,0 +1,114 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { useMemo, useEffect, useCallback } from 'react';
3
+ import { Button } from '../../../buttons/button/button.js';
4
+ import { CartTotals } from '../../../cart-totals/cart-totals.js';
5
+ import { CartTotalsSummary } from '../../../cart-totals/cart-totals-summary.js';
6
+ import { FormattedMessage } from '../../../intl/formatted-message.js';
7
+ import { useFormattedMessage } from '../../../intl/use-formatted-message.js';
8
+ import { useIsAuthenticated } from '../../../shared/api/storefront/hooks/authentication/use-is-authenticated.js';
9
+ import { useFetchCurrentCart } from '../../../shared/api/storefront/hooks/cart/use-fetch-current-cart.js';
10
+ import { usePatchCart } from '../../../shared/api/storefront/hooks/cart/use-patch-cart.js';
11
+ import { usePatchBillToAddress } from '../../../shared/api/storefront/hooks/customer/use-patch-bill-to-address.js';
12
+ import { useFetchCountries } from '../../../shared/api/storefront/hooks/website/use-fetch-countries.js';
13
+ import { useNavigate } from '../../../shared/routing/route-provider.js';
14
+ import { hasNo } from '../../../shared/utils/types.js';
15
+ import { Page } from '../../components/page/page.js';
16
+ import { ErrorPage } from '../../error-page/error-page.js';
17
+ import { LoadingPage } from '../../loading-page/loading-page.js';
18
+ import { CheckoutPageLayout } from '../layouts/checkout-page-layout/checkout-page-layout.js';
19
+ import { EDIT_ADDRESS_FORM_ID, EditAddresses } from './components/edit-address.js';
20
+ import { ReadOnlyAddresses } from './components/readonly-address.js';
21
+
22
+ const REVIEW_AND_SUBMIT_PATH = '/CheckoutReviewAndSubmit';
23
+ function usePatchCartAndBillingAddress() {
24
+ const { isError: isPatchingBillToAddressError, isLoading: isPatchBillToAddress, isSuccess: isPatchingBillToAddressSuccess, mutate: patchBillToAddress, } = usePatchBillToAddress();
25
+ const { isError: isPatchCartError, isLoading: isPatchingCart, isSuccess: isPatchCartSuccess, mutate: patchCart, } = usePatchCart();
26
+ const mutate = useCallback(async ({ billTo, cart, notes, }) => {
27
+ await Promise.all([
28
+ billTo &&
29
+ patchBillToAddress({
30
+ billTo,
31
+ }),
32
+ patchCart({ cart: { ...cart, notes } }),
33
+ ].filter(Boolean));
34
+ }, [patchBillToAddress, patchCart]);
35
+ return {
36
+ isError: isPatchingBillToAddressError || isPatchCartError,
37
+ isPatching: isPatchBillToAddress || isPatchingCart,
38
+ isSuccess: isPatchingBillToAddressSuccess || isPatchCartSuccess,
39
+ mutate,
40
+ };
41
+ }
42
+ function ShippingPage() {
43
+ const isAuthenticated = useIsAuthenticated();
44
+ const { data: cart, error, isLoading: isLoadingCart } = useFetchCurrentCart();
45
+ const { data: countries, isLoading: isLoadingCountries } = useFetchCountries({
46
+ enabled: hasNo(cart?.billTo?.address1),
47
+ });
48
+ const { isError, isPatching, isSuccess, mutate: patchCartAndBillingAddress, } = usePatchCartAndBillingAddress();
49
+ const isLoading = isLoadingCart || isLoadingCountries;
50
+ const t = useFormattedMessage();
51
+ const { isNavigating, navigate } = useNavigate();
52
+ const hasBillToAddress = useMemo(() => {
53
+ return Boolean(cart?.billTo?.address1);
54
+ // eslint-disable-next-line react-hooks/exhaustive-deps
55
+ }, [Boolean(cart)]);
56
+ useEffect(() => {
57
+ if (isNavigating)
58
+ return;
59
+ if (isAuthenticated === undefined)
60
+ return;
61
+ if (!isAuthenticated)
62
+ return navigate('/signin?returnUrl=/CheckoutShipping');
63
+ if (hasNo(cart))
64
+ return;
65
+ if (hasNo(cart.cartLines) || cart.cartLines.length === 0)
66
+ return navigate('/cart');
67
+ if (hasNo(cart.billTo))
68
+ return navigate('/signin?returnUrl=/CheckoutShipping');
69
+ }, [cart, navigate, isAuthenticated, isNavigating]);
70
+ useEffect(() => {
71
+ if (isPatching)
72
+ return;
73
+ if (!isSuccess)
74
+ return;
75
+ if (isNavigating)
76
+ return;
77
+ if (isError)
78
+ return location?.reload();
79
+ navigate(REVIEW_AND_SUBMIT_PATH);
80
+ }, [isSuccess, navigate, isNavigating, isPatching, isError]);
81
+ if (error)
82
+ return jsx(ErrorPage, { error: error });
83
+ if (isLoading || isNavigating || isError)
84
+ return jsx(LoadingPage, {});
85
+ if (!isAuthenticated ||
86
+ hasNo(cart) ||
87
+ hasNo(cart.cartLines) ||
88
+ cart.cartLines.length === 0 ||
89
+ hasNo(cart.billTo) ||
90
+ (hasNo(cart.billTo.address1) && hasNo(countries)))
91
+ return null;
92
+ return (jsx(Page, { breadCrumb: [
93
+ { href: '/', label: t('Home') },
94
+ { href: '/CheckoutShipping', label: t('Shipping details') },
95
+ ], 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 && jsx(FormattedMessage, { id: "Updating address" }), type: "submit", children: jsx(FormattedMessage, { id: "Continue shopping" }) })),
97
+ }, mobileSummary: jsx(CartTotalsSummary, { totalAmount: cart.orderGrandTotalDisplay }), overview: jsx(CartTotals, { shippingCost: cart.shippingAndHandlingDisplay, subtotal: cart.orderSubTotalDisplay, tax: cart.totalTaxDisplay, total: cart.orderGrandTotalDisplay, vatPercentage: cart.cartLines[0]?.pricing?.vatRate }), children: hasBillToAddress ? (jsx(ReadOnlyAddresses, { billTo: cart.billTo, isLoading: isPatching, notes: cart.notes, onSubmit: async ({ notes }) => {
98
+ if (!cart.billTo)
99
+ return;
100
+ await patchCartAndBillingAddress({ cart, notes });
101
+ navigate(REVIEW_AND_SUBMIT_PATH);
102
+ }, shipTo: cart.shipTo })) : (jsx(EditAddresses, { countries: countries || [], isLoading: isPatching, onSubmit: async ({ address, notes }) => {
103
+ if (!cart.billTo)
104
+ return;
105
+ await patchCartAndBillingAddress({
106
+ billTo: { ...cart.billTo, ...address },
107
+ cart,
108
+ notes,
109
+ });
110
+ navigate(REVIEW_AND_SUBMIT_PATH);
111
+ } })) }) }));
112
+ }
113
+
114
+ export { ShippingPage };
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { BreadcrumbLink } from '../../breadcrumbs/breadcrumb';
2
+ import { BreadcrumbLink } from '../../../breadcrumbs/breadcrumb';
3
3
  export interface PageProps {
4
4
  breadCrumb: BreadcrumbLink[];
5
5
  children: ReactNode;
@@ -1,15 +1,13 @@
1
1
  "use client";
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import clsx from 'clsx';
4
- import { Breadcrumb } from '../../breadcrumbs/breadcrumb.js';
5
- import { useBreakpoint } from '../../shared/hooks/use-breakpoint.js';
6
- import { Heading } from '../../typography/heading/heading.js';
4
+ import { Breadcrumb } from '../../../breadcrumbs/breadcrumb.js';
5
+ import { Heading } from '../../../typography/heading/heading.js';
7
6
  import { PageContainer } from '../page-container/page-container.js';
8
7
  import styles from './page.module.css.js';
9
8
 
10
9
  function PageTitle({ children }) {
11
- const { lg, xxl } = useBreakpoint();
12
- return (jsx(Heading, { italic: true, uppercase: true, className: styles.title, size: xxl ? 'xl' : lg ? 'm' : 's', tag: "h1", children: children }));
10
+ return (jsx(Heading, { italic: true, uppercase: true, breakpoints: { lg: 'm', xxl: 'xl' }, className: styles.title, size: "s", tag: "h1", children: children }));
13
11
  }
14
12
  function Page({ breadCrumb, children, className, title }) {
15
13
  return (jsxs(PageContainer, { className: clsx(styles.page, className), children: [jsx("div", { className: styles.breadcrumb, children: jsx(Breadcrumb, { links: breadCrumb }) }), title && jsx(PageTitle, { children: title }), children] }));
@@ -0,0 +1,3 @@
1
+ var styles = {"page":"page-module-a5vPb","breadcrumb":"page-module-q0jaH","title":"page-module-K7Gmw"};
2
+
3
+ export { styles as default };
@@ -0,0 +1,3 @@
1
+ var styles = {"page-container":"page-container-module-eFYSe","inner-page-container":"page-container-module-ZhEJP"};
2
+
3
+ export { styles as default };
@@ -0,0 +1,16 @@
1
+ interface PageMetaDataProps {
2
+ alternateLanguageUrls?: Record<string, string> | null;
3
+ canonicalUrl: string;
4
+ meta?: {
5
+ description: string;
6
+ keywords: string;
7
+ };
8
+ openGraph?: {
9
+ image: string;
10
+ title: string;
11
+ url: string;
12
+ };
13
+ title: string;
14
+ }
15
+ export declare function PageMetaData(props: PageMetaDataProps): null;
16
+ export {};
@@ -0,0 +1,95 @@
1
+ function addOrUpdateElement(selector, { attributes, tag, }) {
2
+ const existingElement = document?.querySelector(selector);
3
+ if (existingElement) {
4
+ Object.entries(attributes).forEach(([key, value]) => {
5
+ existingElement.setAttribute(key, value);
6
+ });
7
+ }
8
+ else {
9
+ const newElement = document?.createElement(tag);
10
+ if (!newElement)
11
+ return;
12
+ Object.entries(attributes).forEach(([key, value]) => {
13
+ newElement.setAttribute(key, value);
14
+ });
15
+ document?.head.append(newElement);
16
+ }
17
+ }
18
+ function removeElements(selector) {
19
+ document?.querySelectorAll(selector).forEach(element => element.remove());
20
+ }
21
+ function PageMetaData(props) {
22
+ if (typeof document === 'undefined')
23
+ return null;
24
+ if (props.title) {
25
+ document.title = props.title;
26
+ }
27
+ if (props.canonicalUrl) {
28
+ addOrUpdateElement('link[rel="canonical"]', {
29
+ attributes: { href: props.canonicalUrl, rel: 'canonical' },
30
+ tag: 'link',
31
+ });
32
+ }
33
+ else {
34
+ removeElements('link[rel="canonical"]');
35
+ }
36
+ if (props.alternateLanguageUrls) {
37
+ Object.entries(props.alternateLanguageUrls).forEach(([hreflang, url]) => {
38
+ addOrUpdateElement(`link[rel="alternate"][hreflang="${hreflang}"]`, {
39
+ attributes: { href: url, hreflang, rel: 'alternate' },
40
+ tag: 'link',
41
+ });
42
+ });
43
+ }
44
+ else {
45
+ removeElements('link[rel="alternate"]');
46
+ }
47
+ if (props.meta?.description) {
48
+ addOrUpdateElement('meta[name="description"]', {
49
+ attributes: { content: props.meta.description, name: 'description' },
50
+ tag: 'meta',
51
+ });
52
+ }
53
+ else {
54
+ removeElements('meta[name="description"]');
55
+ }
56
+ if (props.meta?.keywords) {
57
+ addOrUpdateElement('meta[name="keywords"]', {
58
+ attributes: { content: props.meta.keywords, name: 'keywords' },
59
+ tag: 'meta',
60
+ });
61
+ }
62
+ else {
63
+ removeElements('meta[name="keywords"]');
64
+ }
65
+ if (props.openGraph?.title) {
66
+ addOrUpdateElement('meta[property="og:title"]', {
67
+ attributes: { content: props.openGraph.title, property: 'og:title' },
68
+ tag: 'meta',
69
+ });
70
+ }
71
+ else {
72
+ removeElements('meta[property="og:title"]');
73
+ }
74
+ if (props.openGraph?.url) {
75
+ addOrUpdateElement('meta[property="og:url"]', {
76
+ attributes: { content: props.openGraph.url, property: 'og:url' },
77
+ tag: 'meta',
78
+ });
79
+ }
80
+ else {
81
+ removeElements('meta[property="og:url"]');
82
+ }
83
+ if (props.openGraph?.image) {
84
+ addOrUpdateElement('meta[property="og:image"]', {
85
+ attributes: { content: props.openGraph.image, property: 'og:image' },
86
+ tag: 'meta',
87
+ });
88
+ }
89
+ else {
90
+ removeElements('meta[property="og:image"]');
91
+ }
92
+ return null;
93
+ }
94
+
95
+ export { PageMetaData };
@@ -4,7 +4,7 @@ import { useEffect } from 'react';
4
4
  import { isRequestError } from '../../shared/fetch/request.js';
5
5
  import { environment } from '../../shared/utils/environment.js';
6
6
  import { Heading } from '../../typography/heading/heading.js';
7
- import { Page } from '../page/page.js';
7
+ import { Page } from '../components/page/page.js';
8
8
 
9
9
  function ErrorPage({ error }) {
10
10
  useEffect(() => {
@@ -0,0 +1,3 @@
1
+ var styles = {"product-details-page-layout":"product-details-page-layout-module-pPtZX","top":"product-details-page-layout-module-KCKLZ","image-gallery":"product-details-page-layout-module-0uf92","product-information":"product-details-page-layout-module-3-19O","recently-viewed":"product-details-page-layout-module-Cl9u-","included":"product-details-page-layout-module-lfAgH","usp":"product-details-page-layout-module-e8ZNQ"};
2
+
3
+ export { styles as default };
@@ -1,4 +1,4 @@
1
- import { ImageType } from '../../../../shared/model/image';
1
+ import { ImageType } from '../../../../../shared/model/image';
2
2
  interface ProductDetailImagesProps {
3
3
  images: ImageType[];
4
4
  }
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
3
3
  import { useState } from 'react';
4
- import { ImagesGrid } from '../../../../media/image-grid/images-grid.js';
5
- import { ImageLightbox } from '../../../../media/image-lightbox/image-lightbox.js';
6
- import { ZoomImage } from '../../../../media/zoom-image/zoom-image.js';
7
- import { Modal } from '../../../../modals/modal/modal.js';
8
- import { useDisclosure } from '../../../../shared/hooks/use-disclosure.js';
9
- import { useIsBreakpoint } from '../../../../shared/hooks/use-is-breakpoint.js';
4
+ import { ImagesGrid } from '../../../../../media/image-grid/images-grid.js';
5
+ import { ImageLightbox } from '../../../../../media/image-lightbox/image-lightbox.js';
6
+ import { ZoomImage } from '../../../../../media/zoom-image/zoom-image.js';
7
+ import { Modal } from '../../../../../modals/modal/modal.js';
8
+ import { useDisclosure } from '../../../../../shared/hooks/use-disclosure.js';
9
+ import { useIsBreakpoint } from '../../../../../shared/hooks/use-is-breakpoint.js';
10
10
  import styles from './product-detail-images.module.css.js';
11
11
 
12
12
  const MAX_IMAGES = 5;
@@ -1,3 +1,3 @@
1
- var styles = {"image-lightbox-modal":"product-detail-images-module-N3Ms-"};
1
+ var styles = {"image-lightbox-modal":"product-detail-images-module-ERzjA"};
2
2
 
3
3
  export { styles as default };
@@ -1,15 +1,15 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { ConnectedAddToCartButton } from '../../../../buttons/add-to-cart-button/connected-add-to-cart-button.js';
3
- import { ConnectedFavoriteButton } from '../../../../buttons/favorite/connected-favorite-button.js';
4
- import { Accordion } from '../../../../collapsables/accordion/accordion.js';
5
- import { AccordionItem } from '../../../../collapsables/accordion/accordion-item.js';
6
- import { ShowAll } from '../../../../collapsables/show-all/show-all.js';
7
- import { ProductPrice } from '../../../../display/product-price/product-price.js';
8
- import { ProductSku } from '../../../../display/product-sku/product-sku.js';
9
- import { FormattedMessage } from '../../../../intl/formatted-message.js';
10
- import { DownloadDocumentList } from '../../../../lists/download-document-list/download-document-list.js';
11
- import { FeatureList } from '../../../../lists/feature-list/feature-list.js';
12
- import { Heading } from '../../../../typography/heading/heading.js';
2
+ import { ConnectedAddToCartButton } from '../../../../../buttons/add-to-cart-button/connected-add-to-cart-button.js';
3
+ import { ConnectedFavoriteButton } from '../../../../../buttons/favorite/connected-favorite-button.js';
4
+ import { Accordion } from '../../../../../collapsables/accordion/accordion.js';
5
+ import { AccordionItem } from '../../../../../collapsables/accordion/accordion-item.js';
6
+ import { ShowAll } from '../../../../../collapsables/show-all/show-all.js';
7
+ import { ProductPrice } from '../../../../../display/product-price/product-price.js';
8
+ import { ProductSku } from '../../../../../display/product-sku/product-sku.js';
9
+ import { FormattedMessage } from '../../../../../intl/formatted-message.js';
10
+ import { DownloadDocumentList } from '../../../../../lists/download-document-list/download-document-list.js';
11
+ import { FeatureList } from '../../../../../lists/feature-list/feature-list.js';
12
+ import { Heading } from '../../../../../typography/heading/heading.js';
13
13
  import styles from './product-details-panel.module.css.js';
14
14
 
15
15
  function ProductDetailsPanel({ priceComponent, product, }) {
@@ -0,0 +1,3 @@
1
+ var styles = {"product-details-panel":"product-details-panel-module-MXfPm","heading":"product-details-panel-module-rtZYR","price-action-container":"product-details-panel-module-wHZCr","action-container":"product-details-panel-module-QLafW","description":"product-details-panel-module-9L-Nm","feature-list":"product-details-panel-module-NC2nx"};
2
+
3
+ export { styles as default };
@@ -1,4 +1,4 @@
1
- import { ProductSummary } from '../../../../shared/api/bff/model/bff.model';
1
+ import { ProductSummary } from '../../../../../shared/api/bff/model/bff.model';
2
2
  export declare function ProductDetailsRecentlyViewed({ recentlyViewed, }: {
3
3
  recentlyViewed: ProductSummary[];
4
4
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
- import { ConnectedProductCard } from '../../../../cards/product-card/connected-product-card.js';
3
- import { CardCarousel } from '../../../../carousel/card-carousel/card-carousel.js';
4
- import { FormattedMessage } from '../../../../intl/formatted-message.js';
5
- import { Heading } from '../../../../typography/heading/heading.js';
2
+ import { ConnectedProductCard } from '../../../../../cards/product-card/connected-product-card.js';
3
+ import { CardCarousel } from '../../../../../carousel/card-carousel/card-carousel.js';
4
+ import { FormattedMessage } from '../../../../../intl/formatted-message.js';
5
+ import { Heading } from '../../../../../typography/heading/heading.js';
6
6
 
7
7
  function ProductDetailsRecentlyViewed({ recentlyViewed, }) {
8
8
  return (jsxs(Fragment, { children: [jsx(Heading, { size: "s", tag: "h2", children: jsx(FormattedMessage, { id: "Recently viewed" }) }), jsx(CardCarousel, { hasOverflow: true, cards: recentlyViewed.map(product => (jsx(ConnectedProductCard, { href: product.href, id: product.productId, image: {
@@ -0,0 +1,30 @@
1
+ "use client";
2
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
+ import { useCultureCode } from '../../../intl/use-culture-code.js';
4
+ import { useFetchProductDetailsPageData } from '../../../shared/api/bff/hooks/use-fetch-product-details-page-data.js';
5
+ import { PageMetaData } from '../../components/page-meta-data/page-meta-data.js';
6
+ import { ErrorPage } from '../../error-page/error-page.js';
7
+ import { LoadingPage } from '../../loading-page/loading-page.js';
8
+ import { ProductDetails } from './product-details.js';
9
+
10
+ function ProductDetailsPage({ pageUrl }) {
11
+ const cultureCode = useCultureCode();
12
+ const { data, error, isError, isFetching } = useFetchProductDetailsPageData({
13
+ cultureCode,
14
+ pageUrl,
15
+ });
16
+ if (isError)
17
+ return jsx(ErrorPage, { error: error });
18
+ if (!data || isFetching)
19
+ return jsx(LoadingPage, {});
20
+ return (jsxs(Fragment, { children: [data.page && (jsx(PageMetaData, { alternateLanguageUrls: data.page.alternateLanguageUrls, canonicalUrl: data.page.canonicalPath, meta: {
21
+ description: data.page.metaDescription,
22
+ keywords: data.page.metaKeywords,
23
+ }, openGraph: {
24
+ image: data.page.openGraphImage,
25
+ title: data.page.openGraphTitle,
26
+ url: data.page.openGraphUrl,
27
+ }, title: data.page.title })), jsx(ProductDetails, { data: data })] }));
28
+ }
29
+
30
+ export { ProductDetailsPage };
@@ -1,4 +1,4 @@
1
- import { ProductDetailsPageDataResponse } from '../../shared/api/bff/model/bff.model';
1
+ import { ProductDetailsPageDataResponse } from '../../../shared/api/bff/model/bff.model';
2
2
  export declare function ProductDetails({ data, priceComponent, recentlyViewedComponent, }: {
3
3
  data: ProductDetailsPageDataResponse;
4
4
  priceComponent?: React.ReactNode;
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
- import { ConnectedProductCard } from '../../cards/product-card/connected-product-card.js';
4
- import { CardCarousel } from '../../carousel/card-carousel/card-carousel.js';
5
- import { ProductUSPCarousel } from '../../carousel/usp-carousel/product-usp-carousel.js';
6
- import { FormattedMessage } from '../../intl/formatted-message.js';
7
- import { useDataLayer } from '../../shared/ga/use-data-layer.js';
8
- import { Heading } from '../../typography/heading/heading.js';
3
+ import { ConnectedProductCard } from '../../../cards/product-card/connected-product-card.js';
4
+ import { CardCarousel } from '../../../carousel/card-carousel/card-carousel.js';
5
+ import { ProductUSPCarousel } from '../../../carousel/usp-carousel/product-usp-carousel.js';
6
+ import { FormattedMessage } from '../../../intl/formatted-message.js';
7
+ import { useDataLayer } from '../../../shared/ga/use-data-layer.js';
8
+ import { Heading } from '../../../typography/heading/heading.js';
9
+ import { Page } from '../../components/page/page.js';
9
10
  import { ProductDetailsPageLayout } from '../layouts/product-details-page-layout/product-details-page-layout.js';
10
- import { Page } from '../page/page.js';
11
11
  import { ProductDetailImages } from './components/product-details-images/product-detail-images.js';
12
12
  import { ProductDetailsPanel } from './components/product-details-panel/product-details-panel.js';
13
13
  import { ProductDetailsRecentlyViewed } from './components/product-details-recently-viewed/product-details-recently-viewed.js';
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
- import { FormattedMessage } from '../../../intl/formatted-message.js';
4
- import { useBreakpoint } from '../../../shared/hooks/use-breakpoint.js';
5
- import { RouteButton } from '../../../shared/routing/route-button.js';
6
- import { Heading } from '../../../typography/heading/heading.js';
3
+ import { FormattedMessage } from '../../../../intl/formatted-message.js';
4
+ import { useBreakpoint } from '../../../../shared/hooks/use-breakpoint.js';
5
+ import { RouteButton } from '../../../../shared/routing/route-button.js';
6
+ import { Heading } from '../../../../typography/heading/heading.js';
7
7
  import styles from './no-results.module.css.js';
8
8
 
9
9
  function NoResults({ content, title }) {
@@ -0,0 +1,3 @@
1
+ var styles = {"no-results":"no-results-module-HGe-Y","title":"no-results-module-zlHBh","body":"no-results-module-t2hI7","buttons":"no-results-module-nl-AB"};
2
+
3
+ export { styles as default };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { jsx } from 'react/jsx-runtime';
3
3
  import { useRefinementList } from 'react-instantsearch';
4
- import { CategoryCard } from '../../../cards/category-card/category-card.js';
5
- import { CategoryCarousel } from '../../../carousel/category-carousel/category-carousel.js';
6
- import { transformAlgoliaCategoryData } from '../../../shared/model/category.js';
4
+ import { CategoryCard } from '../../../../cards/category-card/category-card.js';
5
+ import { CategoryCarousel } from '../../../../carousel/category-carousel/category-carousel.js';
6
+ import { transformAlgoliaCategoryData } from '../../../../shared/model/category.js';
7
7
 
8
8
  function ProductListingPageCategoryCarousel({ currentCategoryPath, }) {
9
9
  const { items } = useRefinementList({
@@ -1,4 +1,5 @@
1
- import { ImageType, ResponsiveImageType } from '../../shared/model/image';
1
+ import { PageModel } from '../../../shared/api/bff/model/bff.model';
2
+ import { ImageType, ResponsiveImageType } from '../../../shared/model/image';
2
3
  export interface PromoBannerType {
3
4
  href: string;
4
5
  image: ResponsiveImageType;
@@ -17,6 +18,7 @@ export interface ProductListingPageData {
17
18
  category: CategoryType | undefined;
18
19
  categoryPages: string;
19
20
  hierarchicalCategories: string[];
21
+ page?: PageModel;
20
22
  promoBanners?: {
21
23
  top: PromoBannerType[] | undefined;
22
24
  };
@@ -0,0 +1,37 @@
1
+ "use client";
2
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
+ import { createSonicSearchClient } from '../../../algolia/algolia-sonic-searchclient.js';
4
+ import { config } from '../../../config.js';
5
+ import { useCultureCode } from '../../../intl/use-culture-code.js';
6
+ import { useFetchProductListingPageData } from '../../../shared/api/bff/hooks/use-fetch-product-listing-page-data.js';
7
+ import { PageMetaData } from '../../components/page-meta-data/page-meta-data.js';
8
+ import { ErrorPage } from '../../error-page/error-page.js';
9
+ import { LoadingPage } from '../../loading-page/loading-page.js';
10
+ import { ProductListing } from './product-listing.js';
11
+
12
+ const defaultSearchClient = createSonicSearchClient({
13
+ apiKey: config.ALGOLIA_API_KEY,
14
+ appId: config.ALGOLIA_APP_ID,
15
+ host: config.ALGOLIA_HOST,
16
+ });
17
+ function ProductListingPage({ pageUrl, searchClient = defaultSearchClient, }) {
18
+ const cultureCode = useCultureCode();
19
+ const { data, error, isError, isFetching } = useFetchProductListingPageData({
20
+ cultureCode,
21
+ pageUrl,
22
+ });
23
+ if (isError)
24
+ return jsx(ErrorPage, { error: error });
25
+ if (!data || isFetching)
26
+ return jsx(LoadingPage, {});
27
+ return (jsxs(Fragment, { children: [data.page && (jsx(PageMetaData, { alternateLanguageUrls: data.page.alternateLanguageUrls, canonicalUrl: data.page.canonicalPath, meta: {
28
+ description: data.page.metaDescription,
29
+ keywords: data.page.metaKeywords,
30
+ }, openGraph: {
31
+ image: data.page.openGraphImage,
32
+ title: data.page.openGraphTitle,
33
+ url: data.page.openGraphUrl,
34
+ }, title: data.page.title })), jsx(ProductListing, { data: data, searchClient: searchClient })] }));
35
+ }
36
+
37
+ export { ProductListingPage };
@@ -0,0 +1,3 @@
1
+ var styles = {"product-listing":"product-listing-page-module-U0zLZ","header":"product-listing-page-module-9a0ps","promos":"product-listing-page-module-VvYG3","action-bar":"product-listing-page-module-jGACo","sidebar-toggle":"product-listing-page-module-qhR-J","sort":"product-listing-page-module-3LRKg","count":"product-listing-page-module-3Jtw-","categories":"product-listing-page-module-UwMEE","product-grid-container":"product-listing-page-module-cUe4a","product-grid":"product-listing-page-module-dtbXB","pagination":"product-listing-page-module-zKOQv"};
2
+
3
+ export { styles as default };
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import { jsx } from 'react/jsx-runtime';
3
- import { useAlgoliaHits } from '../../../algolia/use-algolia-hits.js';
4
- import { useAlgoliaInsights } from '../../../algolia/use-algolia-insights.js';
5
- import { ConnectedProductCard } from '../../../cards/product-card/connected-product-card.js';
6
- import { ProductOverviewGrid } from '../../../lists/product-overview-grid/product-overview-grid.js';
7
- import { PromoCard } from '../../../promos/promo-card/promo-card.js';
8
- import { isProductHit } from '../../../shared/model/hit.js';
3
+ import { useAlgoliaHits } from '../../../../algolia/use-algolia-hits.js';
4
+ import { useAlgoliaInsights } from '../../../../algolia/use-algolia-insights.js';
5
+ import { ConnectedProductCard } from '../../../../cards/product-card/connected-product-card.js';
6
+ import { ProductOverviewGrid } from '../../../../lists/product-overview-grid/product-overview-grid.js';
7
+ import { PromoCard } from '../../../../promos/promo-card/promo-card.js';
8
+ import { isProductHit } from '../../../../shared/model/hit.js';
9
9
 
10
10
  function ProductHitCard({ hit }) {
11
11
  const { sendAddToCartFromProductListPageEvent, sendAddToWishListFromProductListPageEvent, sendProductClickFromProductListPageEvent, } = useAlgoliaInsights();
@@ -1,21 +1,21 @@
1
1
  "use client";
2
2
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
- import { AlgoliaFilterPanel } from '../../algolia/algolia-filter-panel.js';
4
- import { AlgoliaPagination } from '../../algolia/algolia-pagination.js';
5
- import { AlgoliaProvider } from '../../algolia/algolia-provider.js';
6
- import { AlgoliaResultsCount } from '../../algolia/algolia-results-count.js';
7
- import { offlineSearchClient } from '../../algolia/algolia-searchclient-offline.js';
8
- import { AlgoliaSortBy } from '../../algolia/algolia-sort-by.js';
9
- import { useAlgoliaHits } from '../../algolia/use-algolia-hits.js';
10
- import { FormattedMessage } from '../../intl/formatted-message.js';
11
- import { useFormattedMessage } from '../../intl/use-formatted-message.js';
12
- import { useLanguageCode } from '../../intl/use-language-code.js';
13
- import { LoadingPage } from '../loading-page/loading-page.js';
14
- import { Page } from '../page/page.js';
15
- import { PromoBanners } from '../../promos/promo-banners/promo-banners.js';
16
- import { scrollToTop } from '../../shared/hooks/use-scroll-to.js';
17
- import { Sidebar } from '../../sidebar/sidebar.js';
18
- import { ToggleSidebarButton } from '../../sidebar/toggle-sidebar-button.js';
3
+ import { AlgoliaFilterPanel } from '../../../algolia/algolia-filter-panel.js';
4
+ import { AlgoliaPagination } from '../../../algolia/algolia-pagination.js';
5
+ import { AlgoliaProvider } from '../../../algolia/algolia-provider.js';
6
+ import { AlgoliaResultsCount } from '../../../algolia/algolia-results-count.js';
7
+ import { offlineSearchClient } from '../../../algolia/algolia-searchclient-offline.js';
8
+ import { AlgoliaSortBy } from '../../../algolia/algolia-sort-by.js';
9
+ import { useAlgoliaHits } from '../../../algolia/use-algolia-hits.js';
10
+ import { FormattedMessage } from '../../../intl/formatted-message.js';
11
+ import { useFormattedMessage } from '../../../intl/use-formatted-message.js';
12
+ import { useLanguageCode } from '../../../intl/use-language-code.js';
13
+ import { PromoBanners } from '../../../promos/promo-banners/promo-banners.js';
14
+ import { scrollToTop } from '../../../shared/hooks/use-scroll-to.js';
15
+ import { Sidebar } from '../../../sidebar/sidebar.js';
16
+ import { ToggleSidebarButton } from '../../../sidebar/toggle-sidebar-button.js';
17
+ import { Page } from '../../components/page/page.js';
18
+ import { LoadingPage } from '../../loading-page/loading-page.js';
19
19
  import { NoResults } from './no-results/no-results.js';
20
20
  import { ProductListingPageCategoryCarousel } from './product-listing-page-category-carousel/product-listing-page-category-carousel.js';
21
21
  import { ProductListingProductOverview } from './product-listing-product-overview/product-listing-product-overview.js';
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import { jsx } from 'react/jsx-runtime';
3
- import { useAlgoliaHits } from '../../../algolia/use-algolia-hits.js';
4
- import { useAlgoliaInsights } from '../../../algolia/use-algolia-insights.js';
5
- import { ConnectedProductCard } from '../../../cards/product-card/connected-product-card.js';
6
- import { ProductOverviewGrid } from '../../../lists/product-overview-grid/product-overview-grid.js';
7
- import { PromoCard } from '../../../promos/promo-card/promo-card.js';
8
- import { isProductHit } from '../../../shared/model/hit.js';
3
+ import { useAlgoliaHits } from '../../../../algolia/use-algolia-hits.js';
4
+ import { useAlgoliaInsights } from '../../../../algolia/use-algolia-insights.js';
5
+ import { ConnectedProductCard } from '../../../../cards/product-card/connected-product-card.js';
6
+ import { ProductOverviewGrid } from '../../../../lists/product-overview-grid/product-overview-grid.js';
7
+ import { PromoCard } from '../../../../promos/promo-card/promo-card.js';
8
+ import { isProductHit } from '../../../../shared/model/hit.js';
9
9
 
10
10
  function ProductHitCard({ hit }) {
11
11
  const { sendAddToCartFromSearchResultPageEvent, sendAddToWishListFromSearchResultPageEvent, sendProductClickFromSearchResultPageEvent, } = useAlgoliaInsights();