@sonic-equipment/ui 1.1.7 → 2.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-hits-provider.js +4 -1
- package/dist/algolia/algolia-insights-provider.js +3 -3
- package/dist/algolia/algolia-provider.d.ts +4 -1
- package/dist/algolia/algolia-provider.js +6 -3
- package/dist/algolia/algolia-search-provider.js +1 -1
- package/dist/algolia/algolia-searchclient-reserved-slots.d.ts +25 -0
- package/dist/algolia/algolia-searchclient-reserved-slots.js +67 -0
- package/dist/algolia/use-algolia-hits.d.ts +5 -2
- package/dist/algolia/use-algolia-hits.js +9 -5
- package/dist/algolia/use-algolia-insights.js +2 -2
- package/dist/algolia/use-algolia-search.js +2 -2
- package/dist/badges/tag/tag.d.ts +2 -1
- package/dist/badges/tag/tag.js +3 -2
- package/dist/base.css +28 -1
- package/dist/breadcrumbs/breadcrumb.d.ts +1 -1
- package/dist/breadcrumbs/breadcrumb.js +2 -2
- package/dist/buttons/button/button.d.ts +2 -1
- package/dist/buttons/button/button.js +10 -2
- package/dist/buttons/icon-button/icon-button.d.ts +8 -1
- package/dist/buttons/icon-button/icon-button.js +4 -5
- package/dist/buttons/invoice-download-buttons/invoice-download-buttons.d.ts +8 -0
- package/dist/buttons/invoice-download-buttons/invoice-download-buttons.js +29 -0
- package/dist/buttons/invoice-download-buttons/invoice-download-buttons.module.css.js +3 -0
- package/dist/buttons/invoice-download-buttons/invoice-download-url.d.ts +5 -0
- package/dist/buttons/invoice-download-buttons/invoice-download-url.js +9 -0
- package/dist/buttons/invoice-download-buttons/invoice-download-url.test.d.ts +1 -0
- package/dist/cards/data-card/data-card.js +1 -1
- package/dist/cards/product-card/product-card.js +2 -1
- package/dist/cards/product-card/product-card.module.css.js +1 -1
- package/dist/cards/table-card/table-card.d.ts +6 -1
- package/dist/cards/table-card/table-card.js +3 -4
- package/dist/carousel/card-carousel/card-carousel.d.ts +3 -1
- package/dist/carousel/card-carousel/card-carousel.js +5 -3
- package/dist/carousel/card-carousel/card-carousel.module.css.js +1 -1
- package/dist/carousel/carousel-navigation-button.d.ts +3 -1
- package/dist/carousel/carousel-navigation-button.js +2 -3
- package/dist/carousel/carousel.js +1 -1
- package/dist/carousel/usp-carousel/product-usp-carousel-slide.js +1 -1
- package/dist/carousel/usp-carousel/usp-carousel.d.ts +0 -1
- package/dist/cart-totals/cart-totals-summary.js +1 -1
- package/dist/cart-totals/cart-totals.d.ts +3 -1
- package/dist/cart-totals/cart-totals.js +9 -3
- package/dist/cart-totals/cart-totals.module.css.js +1 -1
- package/dist/client-case-banner/client-case-banner.d.ts +16 -0
- package/dist/client-case-banner/client-case-banner.js +13 -0
- package/dist/client-case-banner/client-case-banner.module.css.js +3 -0
- package/dist/collapsables/accordion/accordion-item.js +1 -1
- package/dist/collapsables/cascading-component/cascading-component-container-provider.js +1 -1
- package/dist/collapsables/cascading-component/use-cascading-component-container.js +2 -2
- package/dist/collapsables/collapsable/collapsable.d.ts +12 -0
- package/dist/collapsables/collapsable/collapsable.js +31 -0
- package/dist/collapsables/collapsable/collapsable.module.css.js +3 -0
- package/dist/collapsables/unmounter/unmounter.js +3 -3
- package/dist/cookies/cookie-provider.js +1 -1
- package/dist/cookies/use-cookie.js +2 -2
- package/dist/country-language-selection-list/country-language-selection-list.js +1 -1
- package/dist/country-language-selection-list/country-language-selection-list.module.css.js +1 -1
- package/dist/country-language-selector/connected-country-language-selector.d.ts +1 -2
- package/dist/country-language-selector/connected-country-language-selector.js +2 -2
- package/dist/country-language-selector/country-language-selector.d.ts +1 -2
- package/dist/country-language-selector/country-language-selector.js +12 -19
- package/dist/country-language-selector/country-language-selector.module.css.js +1 -1
- package/dist/country-language-selector/fixtures/fixtures.d.ts +13 -0
- package/dist/country-language-selector-button/country-language-selector-button.stories.d.ts +13 -0
- package/dist/display/details/details.d.ts +2 -1
- package/dist/display/details/details.js +2 -2
- package/dist/display/product-sku/product-sku.js +3 -1
- package/dist/exports.d.ts +67 -21
- package/dist/filters/pagination/pagination.d.ts +2 -1
- package/dist/filters/pagination/pagination.js +3 -2
- package/dist/fonts.css +58 -56
- package/dist/footer/fixtures/fixtures.d.ts +3 -0
- package/dist/footer/footer.js +3 -2
- package/dist/footer/footer.module.css.js +1 -1
- package/dist/forms/elements/input/input.js +4 -6
- package/dist/forms/elements/range-slider/range-slider.d.ts +18 -0
- package/dist/forms/elements/range-slider/range-slider.js +31 -0
- package/dist/forms/elements/range-slider/range-slider.module.css.js +3 -0
- package/dist/global-search/global-search.d.ts +6 -1
- package/dist/global-search/global-search.js +3 -2
- package/dist/global-search/search-highlight/highlight.d.ts +7 -7
- package/dist/global-search/search-highlight/highlight.js +9 -9
- package/dist/global-search/search-input/connected-search-input.js +4 -1
- package/dist/global-search/search-result-panel/panel-content.d.ts +3 -1
- package/dist/global-search/search-result-panel/panel-content.js +2 -2
- package/dist/global-search/search-result-panel/search-result-panel.d.ts +3 -1
- package/dist/global-search/search-result-panel/search-result-panel.js +2 -2
- package/dist/global-search/search-result-panel/sections/no-search-results.js +1 -3
- package/dist/global-search/search-result-panel/sections/no-search.d.ts +2 -1
- package/dist/global-search/search-result-panel/sections/no-search.js +7 -14
- package/dist/global-search/search-result-panel/sections/search-content.module.css.js +1 -1
- package/dist/global-search/search-result-panel/sections/section-container.js +2 -2
- package/dist/global-search/search-result-panel/sections/with-results.js +6 -6
- package/dist/header/drawers/desktop-navigation-drawer.js +2 -1
- package/dist/header/drawers/mobile-navigation-drawer.js +2 -1
- package/dist/header/drawers/search-drawer.d.ts +3 -1
- package/dist/header/drawers/search-drawer.js +3 -2
- package/dist/header/drawers/search-drawer.module.css.js +3 -0
- package/dist/header/fixtures/fixtures.d.ts +4 -0
- package/dist/header/header-layout/header-layout.d.ts +1 -1
- package/dist/header/header-layout/header-layout.js +2 -3
- package/dist/header/header-layout/header-layout.module.css.js +1 -1
- package/dist/header/header.d.ts +3 -2
- package/dist/header/header.js +3 -2
- package/dist/header/header.module.css.js +1 -1
- package/dist/hubspot-form/hubspot-form.d.ts +41 -0
- package/dist/hubspot-form/hubspot-form.js +125 -0
- package/dist/hubspot-form/hubspot-form.module.css.js +3 -0
- package/dist/icons/index.d.ts +86 -0
- package/dist/icons/index.js +86 -0
- package/dist/icons/other/media-captionsoff-icon.d.ts +1 -0
- package/dist/icons/other/media-captionsoff-icon.js +7 -0
- package/dist/icons/other/media-captionson-icon.d.ts +1 -0
- package/dist/icons/other/media-captionson-icon.js +7 -0
- package/dist/icons/other/media-chapters-icon.d.ts +1 -0
- package/dist/icons/other/media-chapters-icon.js +7 -0
- package/dist/icons/other/media-enterfullscreen-icon.d.ts +1 -0
- package/dist/icons/other/media-enterfullscreen-icon.js +7 -0
- package/dist/icons/other/media-exitfullscreen-icon.d.ts +1 -0
- package/dist/icons/other/media-exitfullscreen-icon.js +7 -0
- package/dist/icons/other/media-pause-icon.d.ts +1 -0
- package/dist/icons/other/media-pause-icon.js +7 -0
- package/dist/icons/other/media-play-icon.d.ts +1 -0
- package/dist/icons/other/media-play-icon.js +7 -0
- package/dist/icons/other/media-seekbackwards-icon.d.ts +1 -0
- package/dist/icons/other/media-seekbackwards-icon.js +7 -0
- package/dist/icons/other/media-seekforwards-icon.d.ts +1 -0
- package/dist/icons/other/media-seekforwards-icon.js +7 -0
- package/dist/icons/other/media-subsoff-icon.d.ts +1 -0
- package/dist/icons/other/media-subsoff-icon.js +7 -0
- package/dist/icons/other/media-subson-icon.d.ts +1 -0
- package/dist/icons/other/media-subson-icon.js +7 -0
- package/dist/icons/other/media-volumefull-icon.d.ts +1 -0
- package/dist/icons/other/media-volumefull-icon.js +7 -0
- package/dist/icons/other/media-volumelow-icon.d.ts +1 -0
- package/dist/icons/other/media-volumelow-icon.js +7 -0
- package/dist/icons/other/media-volumemedium-icon.d.ts +1 -0
- package/dist/icons/other/media-volumemedium-icon.js +7 -0
- package/dist/icons/other/media-volumemuted-icon.d.ts +1 -0
- package/dist/icons/other/media-volumemuted-icon.js +7 -0
- package/dist/icons/solid/solid-enterfullscreen-icon.d.ts +1 -0
- package/dist/icons/solid/solid-exitfullscreen-icon.d.ts +1 -0
- package/dist/icons/solid/solid-facebook-icon.js +7 -0
- package/dist/icons/solid/solid-instagram-icon.js +7 -0
- package/dist/icons/solid/solid-link-icon.js +7 -0
- package/dist/icons/solid/solid-linkedin-icon.js +7 -0
- package/dist/icons/solid/solid-tiktok-icon.js +7 -0
- package/dist/icons/solid/solid-youtube-icon.js +7 -0
- package/dist/icons/stroke/stroke-business-icon.js +7 -0
- package/dist/icons/stroke/stroke-captions-icon.d.ts +1 -0
- package/dist/icons/stroke/stroke-captions-icon.js +7 -0
- package/dist/icons/stroke/stroke-efficiency-icon.js +7 -0
- package/dist/icons/stroke/stroke-fallback-icon.js +7 -0
- package/dist/icons/stroke/stroke-happy-icon.js +7 -0
- package/dist/icons/stroke/stroke-innovate-icon.js +7 -0
- package/dist/icons/stroke/stroke-list-icon.d.ts +1 -0
- package/dist/icons/stroke/stroke-list-icon.js +7 -0
- package/dist/icons/stroke/stroke-modular-icon.js +7 -0
- package/dist/icons/stroke/stroke-okay-icon.js +7 -0
- package/dist/icons/stroke/stroke-package-icon.js +7 -0
- package/dist/icons/stroke/stroke-proactive-icon.js +7 -0
- package/dist/icons/stroke/stroke-productivity-icon.js +7 -0
- package/dist/icons/stroke/stroke-rating-icon.js +7 -0
- package/dist/icons/stroke/stroke-salecategory-icon.js +7 -0
- package/dist/icons/stroke/stroke-style-icon.js +7 -0
- package/dist/icons/stroke/stroke-support-icon.js +7 -0
- package/dist/icons/stroke/stroke-thumbsup-icon.js +7 -0
- package/dist/icons/stroke/stroke-warranty10y-icon.js +7 -0
- package/dist/icons/stroke/stroke-warranty1y-icon.js +7 -0
- package/dist/icons/stroke/stroke-warranty3y-icon.js +7 -0
- package/dist/icons/stroke/stroke-warranty5y-icon.js +7 -0
- package/dist/icons/stroke/stroke-warrantyconsumable-icon.js +7 -0
- package/dist/icons/stroke/stroke-warrantylifetime-icon.js +7 -0
- package/dist/image-banner/image-banner.d.ts +20 -0
- package/dist/image-banner/image-banner.js +15 -0
- package/dist/image-banner/image-banner.module.css.js +3 -0
- package/dist/index.js +78 -33
- package/dist/intl/intl-provider.js +1 -1
- package/dist/intl/missing-translation-provider.js +1 -1
- package/dist/intl/translation-id.d.ts +1 -1
- package/dist/intl/use-intl.js +2 -2
- package/dist/lists/download-document-list/download-document-list.js +2 -1
- package/dist/lists/menu-list/menu-list-provider.js +1 -1
- package/dist/lists/menu-list/use-menu-list.js +2 -2
- package/dist/lists/product-overview-grid/product-overview-grid.d.ts +17 -2
- package/dist/lists/product-overview-grid/product-overview-grid.js +20 -8
- package/dist/lists/product-overview-grid/product-overview-grid.module.css.js +1 -1
- package/dist/loading/dynamic-loading-overlay.js +1 -23
- package/dist/loading/dynamic-loading-overlay.module.css.js +1 -1
- package/dist/media/image-cdn/image-cdn-profile.d.ts +45 -0
- package/dist/media/image-cdn/image-cdn-profile.js +63 -0
- package/dist/media/image-cdn/image-cdn-profile.test.d.ts +1 -0
- package/dist/media/image-cdn/image-cdn-provider.d.ts +10 -0
- package/dist/media/image-cdn/image-cdn-provider.js +15 -0
- package/dist/media/image-cdn/storyblok-profile.d.ts +3 -0
- package/dist/media/image-cdn/storyblok-profile.js +37 -0
- package/dist/media/image-cdn/storyblok-profile.test.d.ts +1 -0
- package/dist/media/image-lightbox/image-lightbox.module.css.js +1 -1
- package/dist/media/media-controls/media-chapters-control/media-chapters-control.d.ts +8 -0
- package/dist/media/media-controls/media-chapters-control/media-chapters-control.js +63 -0
- package/dist/media/media-controls/media-control/media-control.d.ts +19 -0
- package/dist/media/media-controls/media-control/media-control.js +15 -0
- package/dist/media/media-controls/media-controls.d.ts +12 -0
- package/dist/media/media-controls/media-controls.js +17 -0
- package/dist/media/media-controls/media-controls.module.css.js +3 -0
- package/dist/media/media-controls/media-popover/media-popover.d.ts +12 -0
- package/dist/media/media-controls/media-popover/media-popover.js +67 -0
- package/dist/media/media-controls/media-progress-circle/media-progress-circle.d.ts +20 -0
- package/dist/media/media-controls/media-progress-circle/media-progress-circle.js +31 -0
- package/dist/media/media-controls/media-seek-control/media-seek-control.d.ts +6 -0
- package/dist/media/media-controls/media-seek-control/media-seek-control.js +30 -0
- package/dist/media/media-controls/media-subs-control/media-subs-control.d.ts +8 -0
- package/dist/media/media-controls/media-subs-control/media-subs-control.js +65 -0
- package/dist/media/media-controls/media-volume-control/media-volume-control.d.ts +7 -0
- package/dist/media/media-controls/media-volume-control/media-volume-control.js +103 -0
- package/dist/media/media-utils.d.ts +19 -0
- package/dist/media/media-utils.js +28 -0
- package/dist/media/responsive-image/responsive-image.d.ts +37 -0
- package/dist/media/responsive-image/responsive-image.js +119 -0
- package/dist/media/responsive-image/responsive-image.module.css.js +3 -0
- package/dist/media/responsive-video/responsive-video.d.ts +36 -0
- package/dist/media/responsive-video/responsive-video.js +365 -0
- package/dist/media/responsive-video/responsive-video.module.css.js +3 -0
- package/dist/modals/dialog/dialog.js +1 -1
- package/dist/navigation/panel-navigation/panel-navigation.js +1 -1
- package/dist/notifications/announcements/announcement-list.d.ts +10 -1
- package/dist/notifications/announcements/announcement-list.js +1 -13
- package/dist/notifications/announcements/announcement-list.module.css.js +1 -1
- package/dist/notifications/announcements/announcement.d.ts +13 -2
- package/dist/notifications/announcements/announcement.js +14 -6
- package/dist/notifications/announcements/fixtures/fixtures.d.ts +22 -0
- package/dist/page-layout/fixtures/fixtures.d.ts +15 -0
- package/dist/page-layout/page-layout.d.ts +2 -0
- package/dist/page-layout/page-layout.js +33 -0
- package/dist/page-layout/page-layout.module.css.js +3 -0
- package/dist/page-layout/types.d.ts +52 -0
- package/dist/pages/account/change-password-page/change-password-page.js +6 -2
- package/dist/pages/account/components/change-password-form/change-password-form.js +1 -5
- package/dist/pages/account/components/create-account-form/create-account-form.js +1 -4
- package/dist/pages/account/components/sign-in-form/sign-in-form.js +2 -6
- package/dist/pages/account/create-account-page/create-account-page.d.ts +1 -1
- package/dist/pages/account/create-account-page/create-account-page.js +8 -4
- package/dist/pages/account/sign-in-page/sign-in-page.d.ts +1 -1
- package/dist/pages/account/sign-in-page/sign-in-page.js +6 -4
- package/dist/pages/checkout/cart-page/cart-page.d.ts +1 -1
- package/dist/pages/checkout/cart-page/cart-page.js +35 -68
- package/dist/pages/checkout/components/billing-and-invoice-information.js +1 -1
- package/dist/pages/checkout/components/billing-and-invoice-information.module.css.js +1 -1
- package/dist/pages/checkout/{layouts/checkout-page-layout/components → components}/checkout-page-section-header.d.ts +1 -1
- package/dist/pages/checkout/{layouts/checkout-page-layout/components → components}/checkout-page-section-header.js +2 -2
- package/dist/pages/checkout/components/checkout-page-section.js +12 -0
- package/dist/pages/checkout/components/checkout-page-section.module.css.js +3 -0
- package/dist/pages/checkout/order-confirmation-page/order-confirmation-page-content.js +50 -64
- package/dist/pages/checkout/payment-page/payment-page-content.js +25 -25
- package/dist/pages/checkout/shipping-page/components/edit-checkout-bill-to-address-form.js +2 -2
- package/dist/pages/checkout/shipping-page/components/readonly-address.js +3 -3
- package/dist/pages/checkout/shipping-page/components/readonly-address.module.css.js +1 -1
- package/dist/pages/checkout/shipping-page/shipping-page-content.js +12 -12
- package/dist/pages/components/page/page.js +1 -1
- package/dist/pages/countries-page/countries-page.js +7 -4
- package/dist/pages/error-page/error-page.js +2 -7
- package/dist/pages/my-sonic/navigation/connected-my-sonic-navigation.js +2 -1
- package/dist/pages/my-sonic/pages/create-ship-to-address-details-page/create-ship-to-address-details-page.d.ts +0 -3
- package/dist/pages/my-sonic/pages/create-ship-to-address-details-page/create-ship-to-address-details-page.js +16 -17
- package/dist/pages/my-sonic/pages/edit-bill-to-address-details-page/edit-bill-to-address-details-page.d.ts +0 -3
- package/dist/pages/my-sonic/pages/edit-bill-to-address-details-page/edit-bill-to-address-details-page.js +16 -17
- package/dist/pages/my-sonic/pages/edit-ship-to-address-details-page/edit-ship-to-address-details-page.d.ts +0 -4
- package/dist/pages/my-sonic/pages/edit-ship-to-address-details-page/edit-ship-to-address-details-page.js +16 -17
- package/dist/pages/my-sonic/pages/favorites/favorites-page.d.ts +0 -1
- package/dist/pages/my-sonic/pages/favorites/favorites-page.js +31 -33
- package/dist/pages/my-sonic/pages/favorites/favorites-page.module.css.js +3 -0
- package/dist/pages/my-sonic/pages/my-account/my-account-page.d.ts +0 -1
- package/dist/pages/my-sonic/pages/my-account/my-account-page.js +12 -12
- package/dist/pages/my-sonic/pages/order-details/order-details-content.d.ts +2 -1
- package/dist/pages/my-sonic/pages/order-details/order-details-content.js +4 -4
- package/dist/pages/my-sonic/pages/order-details/order-details-content.module.css.js +1 -1
- package/dist/pages/my-sonic/pages/order-details/order-details-page.d.ts +2 -4
- package/dist/pages/my-sonic/pages/order-details/order-details-page.js +19 -29
- package/dist/pages/my-sonic/pages/order-history/order-history-page.d.ts +0 -1
- package/dist/pages/my-sonic/pages/order-history/order-history-page.js +112 -116
- package/dist/pages/my-sonic/pages/upload-order-page/upload-order-page.d.ts +0 -1
- package/dist/pages/my-sonic/pages/upload-order-page/upload-order-page.js +12 -12
- package/dist/pages/product/components/product-overview.d.ts +11 -3
- package/dist/pages/product/components/product-overview.js +11 -7
- package/dist/pages/product/product-details-page/components/product-details-panel/product-details-panel.js +5 -7
- package/dist/pages/product/product-details-page/components/product-details-panel/product-details-panel.module.css.js +1 -1
- package/dist/pages/product/product-details-page/components/product-details-recently-viewed-section/product-details-recently-viewed-section.d.ts +3 -1
- package/dist/pages/product/product-details-page/components/product-details-recently-viewed-section/product-details-recently-viewed-section.js +9 -10
- package/dist/pages/product/product-details-page/product-details.js +18 -18
- package/dist/pages/product/product-details-page/product-details.module.css.js +3 -0
- package/dist/pages/product/product-listing-page/no-results/no-results.d.ts +3 -5
- package/dist/pages/product/product-listing-page/no-results/no-results.js +2 -4
- package/dist/pages/product/product-listing-page/no-results/no-results.module.css.js +1 -1
- package/dist/pages/product/product-listing-page/product-listing-page-category-carousel/product-listing-page-category-carousel.js +6 -4
- package/dist/pages/product/product-listing-page/product-listing-page-category-carousel/product-listing-page-category-carousel.module.css.js +3 -0
- package/dist/pages/product/product-listing-page/product-listing-page-provider/product-listing-page-provider.js +3 -3
- package/dist/pages/product/product-listing-page/product-listing-page.js +1 -1
- package/dist/pages/product/product-listing-page/product-listing-page.module.css.js +1 -1
- package/dist/pages/product/product-listing-page/product-listing-product-overview/product-listing-product-overview.d.ts +2 -1
- package/dist/pages/product/product-listing-page/product-listing-product-overview/product-listing-product-overview.js +2 -2
- package/dist/pages/product/product-listing-page/product-listing.d.ts +8 -1
- package/dist/pages/product/product-listing-page/product-listing.js +23 -23
- package/dist/pages/product/search-result-page/search-result-product-overview/search-result-product-overview.d.ts +2 -1
- package/dist/pages/product/search-result-page/search-result-product-overview/search-result-product-overview.js +2 -2
- package/dist/pages/product/search-result-page/search-results-page.js +20 -19
- package/dist/promos/promo-banners/promo-banners.js +2 -1
- package/dist/responsive-banner/responsive-banner.d.ts +30 -0
- package/dist/responsive-banner/responsive-banner.js +23 -0
- package/dist/responsive-banner/responsive-banner.module.css.js +3 -0
- package/dist/responsive-carousel/responsive-carousel.d.ts +18 -0
- package/dist/responsive-carousel/responsive-carousel.js +209 -0
- package/dist/responsive-carousel/responsive-carousel.module.css.js +3 -0
- package/dist/rich-text/rich-text.d.ts +7 -0
- package/dist/rich-text/rich-text.js +10 -0
- package/dist/rich-text/rich-text.module.css.js +3 -0
- package/dist/rte-asset/rte-asset.d.ts +8 -0
- package/dist/rte-asset/rte-asset.js +10 -0
- package/dist/rte-asset/rte-asset.module.css.js +3 -0
- package/dist/rte-blockquote/rte-blockquote.d.ts +8 -0
- package/dist/rte-blockquote/rte-blockquote.js +10 -0
- package/dist/rte-blockquote/rte-blockquote.module.css.js +3 -0
- package/dist/rte-details/rte-details.d.ts +7 -0
- package/dist/rte-details/rte-details.js +10 -0
- package/dist/rte-details/rte-details.module.css.js +3 -0
- package/dist/rte-ordered-list/rte-ordered-list.d.ts +14 -0
- package/dist/rte-ordered-list/rte-ordered-list.js +34 -0
- package/dist/rte-ordered-list/rte-ordered-list.module.css.js +3 -0
- package/dist/sections/about-section/about-section.d.ts +13 -0
- package/dist/sections/about-section/about-section.js +13 -0
- package/dist/sections/about-section/about-section.module.css.js +3 -0
- package/dist/sections/about-section/media-contact.d.ts +7 -0
- package/dist/sections/about-section/media-contact.js +12 -0
- package/dist/sections/banner-section/banner-section.d.ts +13 -0
- package/dist/sections/banner-section/banner-section.js +12 -0
- package/dist/sections/banner-section/banner-section.module.css.js +3 -0
- package/dist/sections/banner-section/fixtures/fixtures.d.ts +5 -0
- package/dist/sections/case-studies-listing-section/case-studies-listing-section.constants.d.ts +10 -0
- package/dist/sections/case-studies-listing-section/case-studies-listing-section.constants.js +12 -0
- package/dist/sections/case-studies-listing-section/case-studies-listing-section.d.ts +26 -0
- package/dist/sections/case-studies-listing-section/case-studies-listing-section.js +30 -0
- package/dist/sections/case-studies-listing-section/case-studies-listing-section.module.css.js +3 -0
- package/dist/sections/client-cases-carousel-section/client-cases-carousel-section.d.ts +13 -0
- package/dist/sections/client-cases-carousel-section/client-cases-carousel-section.js +13 -0
- package/dist/sections/client-cases-carousel-section/client-cases-carousel-section.module.css.js +3 -0
- package/dist/sections/downloadable-documents-section/downloadable-documents-section.d.ts +21 -0
- package/dist/sections/downloadable-documents-section/downloadable-documents-section.js +16 -0
- package/dist/sections/downloadable-documents-section/downloadable-documents-section.module.css.js +3 -0
- package/dist/sections/event-info-section/event-info-section.d.ts +9 -0
- package/dist/sections/event-info-section/event-info-section.js +23 -0
- package/dist/sections/event-info-section/event-info-section.module.css.js +3 -0
- package/dist/sections/faq-section/faq-section.d.ts +24 -0
- package/dist/sections/faq-section/faq-section.js +20 -0
- package/dist/sections/faq-section/faq-section.module.css.js +3 -0
- package/dist/sections/hero-section/hero-section.d.ts +22 -0
- package/dist/sections/hero-section/hero-section.js +16 -0
- package/dist/sections/hero-section/hero-section.module.css.js +3 -0
- package/dist/sections/hubspot-form-section/hubspot-form-section.d.ts +18 -0
- package/dist/sections/hubspot-form-section/hubspot-form-section.js +18 -0
- package/dist/sections/hubspot-form-section/hubspot-form-section.module.css.js +3 -0
- package/dist/sections/image-banner-carousel-section/image-banner-carousel-section.d.ts +12 -0
- package/dist/sections/image-banner-carousel-section/image-banner-carousel-section.js +13 -0
- package/dist/sections/image-banner-carousel-section/image-banner-carousel-section.module.css.js +3 -0
- package/dist/sections/image-banner-section/image-banner-section.d.ts +12 -0
- package/dist/sections/image-banner-section/image-banner-section.js +12 -0
- package/dist/sections/image-banner-section/image-banner-section.module.css.js +3 -0
- package/dist/sections/image-hubspot-section/image-hubspot-form-section.d.ts +21 -0
- package/dist/sections/image-hubspot-section/image-hubspot-form-section.js +19 -0
- package/dist/sections/image-hubspot-section/image-hubspot-form-section.module.css.js +3 -0
- package/dist/sections/image-section/image-section.d.ts +25 -0
- package/dist/sections/image-section/image-section.js +14 -0
- package/dist/sections/image-section/image-section.module.css.js +3 -0
- package/dist/sections/image-text-section/image-text-block.d.ts +13 -0
- package/dist/sections/image-text-section/image-text-block.js +13 -0
- package/dist/sections/image-text-section/image-text-section.d.ts +15 -0
- package/dist/sections/image-text-section/image-text-section.js +12 -0
- package/dist/sections/image-text-section/image-text-section.module.css.js +3 -0
- package/dist/sections/legal-section/legal-section.d.ts +10 -0
- package/dist/sections/legal-section/legal-section.js +13 -0
- package/dist/sections/legal-section/legal-section.module.css.js +3 -0
- package/dist/sections/multi-column-section/multi-column-section.d.ts +24 -0
- package/dist/sections/multi-column-section/multi-column-section.js +24 -0
- package/dist/sections/multi-column-section/multi-column-section.module.css.js +3 -0
- package/dist/sections/news-list-section/news-listing-section.d.ts +17 -0
- package/dist/sections/news-list-section/news-listing-section.js +27 -0
- package/dist/sections/news-list-section/news-listing-section.module.css.js +3 -0
- package/dist/sections/numbers-section/numbers-section.d.ts +18 -0
- package/dist/sections/numbers-section/numbers-section.js +15 -0
- package/dist/sections/numbers-section/numbers-section.module.css.js +3 -0
- package/dist/sections/page-meta-section/page-meta-section.d.ts +8 -0
- package/dist/sections/page-meta-section/page-meta-section.js +23 -0
- package/dist/sections/page-meta-section/page-meta-section.module.css.js +3 -0
- package/dist/sections/page-section/page-section.d.ts +297 -0
- package/dist/sections/page-section/page-section.js +23 -0
- package/dist/sections/page-section/page-section.module.css.js +3 -0
- package/dist/sections/percentages-section/percentages-section.d.ts +21 -0
- package/dist/sections/percentages-section/percentages-section.js +18 -0
- package/dist/sections/percentages-section/percentages-section.module.css.js +3 -0
- package/dist/sections/product-comparison-section/product-comparison-section.d.ts +17 -0
- package/dist/sections/product-comparison-section/product-comparison-section.js +19 -0
- package/dist/sections/product-comparison-section/product-comparison-section.module.css.js +3 -0
- package/dist/sections/rich-text-section/rich-text-section.d.ts +11 -0
- package/dist/sections/rich-text-section/rich-text-section.js +12 -0
- package/dist/sections/rich-text-section/rich-text-section.module.css.js +3 -0
- package/dist/sections/social-media-section/social-media-section.d.ts +20 -0
- package/dist/sections/social-media-section/social-media-section.js +27 -0
- package/dist/sections/social-media-section/social-media-section.module.css.js +3 -0
- package/dist/sections/subheadline-section/subheadline-section.d.ts +7 -0
- package/dist/sections/subheadline-section/subheadline-section.js +12 -0
- package/dist/sections/subheadline-section/subheadline-section.module.css.js +3 -0
- package/dist/sections/usp-section/usp-section.d.ts +19 -0
- package/dist/sections/usp-section/usp-section.js +17 -0
- package/dist/sections/usp-section/usp-section.module.css.js +3 -0
- package/dist/sections/video-section/video-section.d.ts +30 -0
- package/dist/sections/video-section/video-section.js +13 -0
- package/dist/sections/video-section/video-section.module.css.js +3 -0
- package/dist/shared/error/default-error-view.d.ts +1 -1
- package/dist/shared/error/default-error-view.js +4 -2
- package/dist/shared/error/default-error-view.module.css.js +1 -1
- package/dist/shared/error/global-unhandled-error-handler.js +3 -3
- package/dist/shared/feature-flags/use-feature-flags.d.ts +1 -0
- package/dist/shared/feature-flags/use-feature-flags.js +3 -2
- package/dist/shared/hooks/use-drag-scroll.d.ts +20 -0
- package/dist/shared/hooks/use-drag-scroll.js +107 -0
- package/dist/shared/local-storage/local-storage-provider.js +1 -1
- package/dist/shared/local-storage/use-local-storage.js +2 -2
- package/dist/shared/local-storage/use-session-storage.js +2 -2
- package/dist/shared/model/announcement.d.ts +1 -0
- package/dist/shared/model/image.d.ts +5 -0
- package/dist/shared/providers/global-state-provider.js +3 -3
- package/dist/shared/routing/route-provider.js +1 -1
- package/dist/shared/routing/use-router.js +2 -2
- package/dist/shared/utils/array.d.ts +1 -0
- package/dist/shared/utils/array.js +9 -1
- package/dist/shared/utils/array.test.d.ts +1 -0
- package/dist/sidebar/sidebar.js +2 -2
- package/dist/site-layout/site-layout.d.ts +15 -0
- package/dist/site-layout/site-layout.js +39 -0
- package/dist/site-layout/site-layout.module.css.js +3 -0
- package/dist/styles.css +10859 -3344
- package/dist/table/elements/table-provider.js +1 -1
- package/dist/table/elements/table-row-provider.js +1 -1
- package/dist/table/elements/table.js +2 -2
- package/dist/table/elements/use-table-row.js +2 -2
- package/dist/table/elements/use-table.js +2 -2
- package/dist/toast/toast.d.ts +6 -1
- package/dist/toast/toast.js +2 -3
- package/dist/typography/heading/heading.d.ts +18 -10
- package/dist/typography/heading/heading.js +28 -14
- package/dist/typography/heading/heading.module.css.js +1 -1
- package/package.json +6 -5
- package/dist/buttons/print-button/print-button.d.ts +0 -2
- package/dist/buttons/print-button/print-button.js +0 -10
- package/dist/footer/connected-footer.d.ts +0 -3
- package/dist/footer/connected-footer.js +0 -21
- package/dist/header/connected-header.d.ts +0 -3
- package/dist/header/connected-header.js +0 -21
- package/dist/notifications/announcements/connected-announcement-list.d.ts +0 -3
- package/dist/notifications/announcements/connected-announcement-list.js +0 -22
- package/dist/notifications/announcements/use-filter-announcements.d.ts +0 -2
- package/dist/notifications/announcements/use-filter-announcements.js +0 -35
- package/dist/pages/account/layouts/sign-in-page-layout/sign-in-page-background-image.d.ts +0 -6
- package/dist/pages/account/layouts/sign-in-page-layout/sign-in-page-background-image.js +0 -9
- package/dist/pages/account/layouts/sign-in-page-layout/sign-in-page-layout.d.ts +0 -9
- package/dist/pages/account/layouts/sign-in-page-layout/sign-in-page-layout.js +0 -12
- package/dist/pages/account/layouts/sign-in-page-layout/sign-in-page-layout.module.css.js +0 -3
- package/dist/pages/checkout/cart-page/components/empty-cart-page.d.ts +0 -1
- package/dist/pages/checkout/cart-page/components/empty-cart-page.js +0 -12
- package/dist/pages/checkout/layouts/checkout-page-layout/checkout-page-layout.d.ts +0 -11
- package/dist/pages/checkout/layouts/checkout-page-layout/checkout-page-layout.js +0 -34
- package/dist/pages/checkout/layouts/checkout-page-layout/checkout-page-layout.module.css.js +0 -3
- package/dist/pages/checkout/layouts/checkout-page-layout/components/checkout-page-section.js +0 -11
- package/dist/pages/checkout/layouts/checkout-page-layout/components/checkout-page-section.module.css.js +0 -3
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout-aside.d.ts +0 -4
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout-aside.js +0 -9
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout-breadcrumb.d.ts +0 -4
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout-breadcrumb.js +0 -9
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout-main.d.ts +0 -4
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout-main.js +0 -9
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout-page.d.ts +0 -5
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout-page.js +0 -10
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout-pre-aside.d.ts +0 -4
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout-pre-aside.js +0 -9
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout-title.d.ts +0 -4
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout-title.js +0 -10
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout.d.ts +0 -5
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout.js +0 -10
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout.module.css.js +0 -3
- package/dist/pages/product/layouts/product-details-page-layout/product-details-page-layout.d.ts +0 -9
- package/dist/pages/product/layouts/product-details-page-layout/product-details-page-layout.js +0 -10
- package/dist/pages/product/layouts/product-details-page-layout/product-details-page-layout.module.css.js +0 -3
- package/dist/pages/product/product-details-page/components/product-details-recently-viewed-section/product-details-recently-viewed-section.module.css.js +0 -3
- package/dist/pages/product/search-result-page/search-results-page.module.css.js +0 -3
- /package/dist/pages/checkout/{layouts/checkout-page-layout/components → components}/checkout-page-section-content.d.ts +0 -0
- /package/dist/pages/checkout/{layouts/checkout-page-layout/components → components}/checkout-page-section-content.js +0 -0
- /package/dist/pages/checkout/{layouts/checkout-page-layout/components → components}/checkout-page-section-link.d.ts +0 -0
- /package/dist/pages/checkout/{layouts/checkout-page-layout/components → components}/checkout-page-section-link.js +0 -0
- /package/dist/pages/checkout/{layouts/checkout-page-layout/components → components}/checkout-page-section.d.ts +0 -0
|
@@ -1,10 +1,18 @@
|
|
|
1
|
+
import { ProductOverviewGridItemSlots, ProductOverviewGridProps } from '../../../lists/product-overview-grid/product-overview-grid';
|
|
1
2
|
import { ProductHit } from '../../../shared/model/hit';
|
|
2
3
|
import { NavigateOptions } from '../../../shared/routing/types';
|
|
3
|
-
interface
|
|
4
|
+
export interface ProductOverviewPromoCard {
|
|
5
|
+
card: React.ReactNode;
|
|
6
|
+
/** Zero-based position of the card on the first page */
|
|
7
|
+
index: number;
|
|
8
|
+
/** Room the card takes up on the first page, see `ProductOverviewGridItemSlots` */
|
|
9
|
+
slots: ProductOverviewGridItemSlots;
|
|
10
|
+
}
|
|
11
|
+
export interface ProductOverviewProps extends Omit<ProductOverviewGridProps, 'children' | 'isLoading'> {
|
|
4
12
|
ProductHitCard: React.ComponentType<{
|
|
5
13
|
hit: ProductHit;
|
|
6
14
|
route?: NavigateOptions;
|
|
7
15
|
}>;
|
|
16
|
+
promoCard?: ProductOverviewPromoCard;
|
|
8
17
|
}
|
|
9
|
-
export declare function ProductOverview({ ProductHitCard }: ProductOverviewProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export {};
|
|
18
|
+
export declare function ProductOverview({ className, ProductHitCard, promoCard, ...rest }: ProductOverviewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs, Fragment
|
|
2
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { usePagination } from 'react-instantsearch';
|
|
4
4
|
import { MAX_QUERY_RESULTS } from '../../../algolia/constants/index.js';
|
|
5
5
|
import { useAlgoliaHits } from '../../../algolia/use-algolia-hits.js';
|
|
6
6
|
import { FormattedMessage } from '../../../intl/formatted-message.js';
|
|
7
|
-
import { ProductOverviewGrid } from '../../../lists/product-overview-grid/product-overview-grid.js';
|
|
7
|
+
import { ProductOverviewGridItem, ProductOverviewGrid } from '../../../lists/product-overview-grid/product-overview-grid.js';
|
|
8
8
|
import { Message } from '../../../message/message.js';
|
|
9
|
-
import { PromoCard } from '../../../promos/promo-card/promo-card.js';
|
|
10
|
-
import { isProductHit } from '../../../shared/model/hit.js';
|
|
11
9
|
|
|
12
|
-
function ProductOverview({ ProductHitCard }) {
|
|
13
|
-
const { hits, isLoading } = useAlgoliaHits();
|
|
10
|
+
function ProductOverview({ className, ProductHitCard, promoCard, ...rest }) {
|
|
11
|
+
const { hits, isLoading, page } = useAlgoliaHits();
|
|
14
12
|
const { currentRefinement, nbHits, nbPages } = usePagination();
|
|
15
13
|
const currentPage = currentRefinement + 1;
|
|
16
14
|
const isLastPage = currentPage === nbPages;
|
|
17
|
-
|
|
15
|
+
// Based on the hits' page, not currentRefinement, which already changes while the previous page's hits are still shown
|
|
16
|
+
const isFirstPage = page === 0;
|
|
17
|
+
const cards = hits.map(hit => (jsx(ProductHitCard, { hit: hit, route: { prefetch: true } }, hit.id)));
|
|
18
|
+
if (isFirstPage && promoCard) {
|
|
19
|
+
cards.splice(promoCard.index, 0, jsx(ProductOverviewGridItem, { slots: promoCard.slots, children: promoCard.card }, "promo-card"));
|
|
20
|
+
}
|
|
21
|
+
return (jsxs(Fragment, { children: [isLastPage && nbHits > MAX_QUERY_RESULTS && (jsx(Message, { type: "info", children: jsx(FormattedMessage, { id: "You have reached the end of the results, but there may be more articles available. Adjust your filters or search to discover more!" }) })), jsx(ProductOverviewGrid, { className: className, isLoading: isLoading, ...rest, children: cards })] }));
|
|
18
22
|
}
|
|
19
23
|
|
|
20
24
|
export { ProductOverview };
|
|
@@ -7,16 +7,16 @@ import { Accordion } from '../../../../../collapsables/accordion/accordion.js';
|
|
|
7
7
|
import { AccordionItem } from '../../../../../collapsables/accordion/accordion-item.js';
|
|
8
8
|
import { ShowAll } from '../../../../../collapsables/show-all/show-all.js';
|
|
9
9
|
import { Price } from '../../../../../display/price/price.js';
|
|
10
|
-
import { ProductSku } from '../../../../../display/product-sku/product-sku.js';
|
|
11
10
|
import { FormattedMessage } from '../../../../../intl/formatted-message.js';
|
|
12
11
|
import { DownloadDocumentList } from '../../../../../lists/download-document-list/download-document-list.js';
|
|
13
12
|
import { FeatureList } from '../../../../../lists/feature-list/feature-list.js';
|
|
13
|
+
import { RichText } from '../../../../../rich-text/rich-text.js';
|
|
14
14
|
import { Heading } from '../../../../../typography/heading/heading.js';
|
|
15
15
|
import styles from './product-details-panel.module.css.js';
|
|
16
16
|
|
|
17
17
|
function ProductDetailsPanel({ priceComponent, product, }) {
|
|
18
18
|
const { sendAddToCartFromProductDetailsPageEvent, sendAddToWishListFromProductDetailsPageEvent, } = useAlgoliaInsights();
|
|
19
|
-
return (jsxs("div", { className: styles['product-details-panel'], children: [jsxs("div", { className: styles
|
|
19
|
+
return (jsxs("div", { className: styles['product-details-panel'], children: [jsxs("div", { className: styles['price-action-container'], children: [priceComponent || (jsx(Price, { className: styles.price, currencyCode: product.currencyCode, "data-test": "productPrice_unitNetPrice", isVatIncluded: product.isVatIncluded, originalPrice: product.originalPrice, price: product.price, variant: "sonic" })), jsxs("div", { className: styles['action-container'], children: [product.canAddToCart && (jsx(ConnectedAddToCartButton, { onAddToCart: ({ cartLine }) => {
|
|
20
20
|
sendAddToCartFromProductDetailsPageEvent({
|
|
21
21
|
cartLine,
|
|
22
22
|
});
|
|
@@ -24,11 +24,9 @@ function ProductDetailsPanel({ priceComponent, product, }) {
|
|
|
24
24
|
sendAddToWishListFromProductDetailsPageEvent({
|
|
25
25
|
objectId: product.productNumber,
|
|
26
26
|
});
|
|
27
|
-
}, productId: product.storefrontId }))] })] }), jsxs("div", { children: [jsx(Heading, { italic: true, className: styles['product-features-heading'], size: "
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
__html: product.content.htmlContent,
|
|
31
|
-
} }) }))] }), jsx("div", { children: jsxs(Accordion, { indented: true, borderType: ['top', 'middle-accentuated'], children: [product.attributeTypes.length > 0 && (jsx(AccordionItem, { id: "specification", title: jsx(FormattedMessage, { id: "Specifications" }), children: jsx(FeatureList, { className: styles['feature-list'], features: product.attributeTypes.map(attribute => ({
|
|
27
|
+
}, productId: product.storefrontId }))] })] }), jsxs("div", { children: [jsx(Heading, { italic: true, className: styles['product-features-heading'], size: "m", children: jsx(FormattedMessage, { id: "Product Features" }) }), product.content.htmlContent && (jsx(ShowAll, { initialHeight: 216, children: jsx(RichText, { className: styles.description, children: jsx("div", { dangerouslySetInnerHTML: {
|
|
28
|
+
__html: product.content.htmlContent,
|
|
29
|
+
} }) }) }))] }), jsx("div", { children: jsxs(Accordion, { indented: true, borderType: ['top', 'middle-accentuated'], children: [product.attributeTypes.length > 0 && (jsx(AccordionItem, { id: "specification", title: jsx(FormattedMessage, { id: "Specifications" }), children: jsx(FeatureList, { className: styles['feature-list'], features: product.attributeTypes.map(attribute => ({
|
|
32
30
|
id: `${attribute.id}`,
|
|
33
31
|
key: { label: attribute.label },
|
|
34
32
|
value: attribute.attributeValues.map(attributeValue => attributeValue.value),
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var styles = {"product-details-panel":"product-details-panel-module-MXfPm","
|
|
1
|
+
var styles = {"product-details-panel":"product-details-panel-module-MXfPm","price-action-container":"product-details-panel-module-wHZCr","price":"product-details-panel-module-dI2JL","action-container":"product-details-panel-module-QLafW","description":"product-details-panel-module-9L-Nm","feature-list":"product-details-panel-module-NC2nx"};
|
|
2
2
|
|
|
3
3
|
export { styles as default };
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { ConnectedProductCard } from '../../../../../cards/product-card/connected-product-card.js';
|
|
4
4
|
import { CardCarousel } from '../../../../../carousel/card-carousel/card-carousel.js';
|
|
5
|
-
import { FormattedMessage } from '../../../../../intl/formatted-message.js';
|
|
6
5
|
import { useCultureCode } from '../../../../../intl/use-culture-code.js';
|
|
6
|
+
import { useFormattedMessage } from '../../../../../intl/use-formatted-message.js';
|
|
7
7
|
import { useFetchRecentlyViewedProducts } from '../../../../../shared/api/bff/hooks/use-fetch-recently-viewed-products.js';
|
|
8
|
-
import { Heading } from '../../../../../typography/heading/heading.js';
|
|
9
|
-
import styles from './product-details-recently-viewed-section.module.css.js';
|
|
10
8
|
|
|
11
|
-
function ProductDetailsRecentlyViewedSection() {
|
|
9
|
+
function ProductDetailsRecentlyViewedSection({ className, }) {
|
|
10
|
+
const t = useFormattedMessage();
|
|
12
11
|
const cultureCode = useCultureCode();
|
|
13
12
|
const { data: products, isLoading } = useFetchRecentlyViewedProducts({
|
|
14
13
|
cultureCode,
|
|
15
14
|
});
|
|
16
15
|
if (isLoading || !products || products.length === 0)
|
|
17
16
|
return null;
|
|
18
|
-
return (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
return (jsx(CardCarousel, { hasOverflow: true, cards: products.map(product => (jsx(ConnectedProductCard, { href: product.href, id: product.productId, image: {
|
|
18
|
+
fit: 'contain',
|
|
19
|
+
image: product.image,
|
|
20
|
+
title: product.image?.altText || product.title,
|
|
21
|
+
}, price: product.price, sku: product.sku, tags: product.tags, title: product.title }, product.productId))), className: className, "data-test-selector": "recentlyViewed", title: t('Recently viewed') }));
|
|
23
22
|
}
|
|
24
23
|
|
|
25
24
|
export { ProductDetailsRecentlyViewedSection };
|
|
@@ -1,23 +1,34 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { useRef, useEffect } from 'react';
|
|
4
|
+
import { Breadcrumb } from '../../../breadcrumbs/breadcrumb.js';
|
|
4
5
|
import { ConnectedProductCard } from '../../../cards/product-card/connected-product-card.js';
|
|
5
6
|
import { CardCarousel } from '../../../carousel/card-carousel/card-carousel.js';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
7
|
+
import { ProductSku } from '../../../display/product-sku/product-sku.js';
|
|
8
|
+
import { useFormattedMessage } from '../../../intl/use-formatted-message.js';
|
|
9
|
+
import { PageLayout } from '../../../page-layout/page-layout.js';
|
|
10
|
+
import { PageSection } from '../../../sections/page-section/page-section.js';
|
|
8
11
|
import { useMarkProductAsRecentlyViewed } from '../../../shared/api/storefront/hooks/product/use-mark-product-as-viewed.js';
|
|
9
12
|
import { useDataLayer } from '../../../shared/ga/use-data-layer.js';
|
|
10
|
-
import { Heading } from '../../../typography/heading/heading.js';
|
|
11
|
-
import { Page } from '../../components/page/page.js';
|
|
12
|
-
import { ProductDetailsPageLayout } from '../layouts/product-details-page-layout/product-details-page-layout.js';
|
|
13
13
|
import { ProductDetailImages } from './components/product-details-images/product-detail-images.js';
|
|
14
14
|
import { ProductDetailsPanel } from './components/product-details-panel/product-details-panel.js';
|
|
15
15
|
import { ProductDetailsRecentlyViewedSection } from './components/product-details-recently-viewed-section/product-details-recently-viewed-section.js';
|
|
16
|
+
import styles from './product-details.module.css.js';
|
|
16
17
|
|
|
17
18
|
function ProductDetails({ data, priceComponent, }) {
|
|
18
|
-
const
|
|
19
|
+
const t = useFormattedMessage();
|
|
20
|
+
const { breadCrumb, included, product } = data;
|
|
19
21
|
const { mutate } = useMarkProductAsRecentlyViewed();
|
|
20
22
|
const isProductMarktedAsViewed = useRef(false);
|
|
23
|
+
const title = product.productTitle || '';
|
|
24
|
+
const header = jsx(ProductSku, { sku: product.productNumber });
|
|
25
|
+
const breadcrumb = jsx(Breadcrumb, { links: breadCrumb });
|
|
26
|
+
const aside = (jsx(PageSection, { children: jsx(ProductDetailImages, { images: product.images }) }));
|
|
27
|
+
const postAside = (jsxs(Fragment, { children: [included.length > 0 && (jsx(CardCarousel, { allowExpandToGrid: true, hasOverflow: true, cards: included.map(product => (jsx(ConnectedProductCard, { href: product.href, id: product.productId, image: {
|
|
28
|
+
fit: 'contain',
|
|
29
|
+
image: product.image,
|
|
30
|
+
title: product.image?.altText || product.title,
|
|
31
|
+
}, price: product.price, sku: product.sku, tags: product.tags, title: product.title }, product.storefrontId))), className: styles['products'], title: t('Includes') })), jsx(ProductDetailsRecentlyViewedSection, { className: styles['products'] })] }));
|
|
21
32
|
useEffect(() => {
|
|
22
33
|
if (typeof window === 'undefined' || isProductMarktedAsViewed.current)
|
|
23
34
|
return;
|
|
@@ -30,18 +41,7 @@ function ProductDetails({ data, priceComponent, }) {
|
|
|
30
41
|
},
|
|
31
42
|
product,
|
|
32
43
|
});
|
|
33
|
-
return (jsx(
|
|
34
|
-
description: page.metaDescription,
|
|
35
|
-
keywords: page.metaKeywords,
|
|
36
|
-
}, openGraph: {
|
|
37
|
-
image: page.openGraphImage,
|
|
38
|
-
title: page.openGraphTitle,
|
|
39
|
-
url: page.openGraphUrl,
|
|
40
|
-
}, windowTitle: page.title, children: jsx(ProductDetailsPageLayout, { imageGallery: jsx(ProductDetailImages, { images: product.images }), included: included.length > 0 && (jsxs(Fragment, { children: [jsx(Heading, { size: "s", tag: "h2", children: jsx(FormattedMessage, { id: "Includes" }) }), jsx(CardCarousel, { allowExpandToGrid: true, hasOverflow: true, cards: included.map(product => (jsx(ConnectedProductCard, { href: product.href, id: product.productId, image: {
|
|
41
|
-
fit: 'contain',
|
|
42
|
-
image: product.image,
|
|
43
|
-
title: product.image?.altText || product.title,
|
|
44
|
-
}, price: product.price, sku: product.sku, tags: product.tags, title: product.title }, product.storefrontId))) })] })), productInformation: jsx(ProductDetailsPanel, { priceComponent: priceComponent, product: product }), recentlyViewedSection: jsx(ProductDetailsRecentlyViewedSection, {}), usp: usps && usps.length > 0 && jsx(ProductUSPCarousel, { usps: usps }) }) }));
|
|
44
|
+
return (jsx(PageLayout, { aside: aside, breadcrumb: breadcrumb, "data-test-selector": "productDetailsPage", header: header, postAside: postAside, title: title, type: "product-details", children: jsx(PageSection, { children: jsx(ProductDetailsPanel, { priceComponent: priceComponent, product: product }) }) }));
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
export { ProductDetails };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
content: ReactNode;
|
|
1
|
+
export interface NoResultsProps {
|
|
2
|
+
children?: React.ReactNode;
|
|
4
3
|
title: string;
|
|
5
4
|
}
|
|
6
|
-
export declare function NoResults({
|
|
7
|
-
export {};
|
|
5
|
+
export declare function NoResults({ children, title }: NoResultsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,15 +2,13 @@
|
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { Button } from '../../../../buttons/button/button.js';
|
|
4
4
|
import { FormattedMessage } from '../../../../intl/formatted-message.js';
|
|
5
|
-
import { useIsBreakpoint } from '../../../../shared/hooks/use-is-breakpoint.js';
|
|
6
5
|
import { usePaths } from '../../../../shared/routing/use-paths.js';
|
|
7
6
|
import { Heading } from '../../../../typography/heading/heading.js';
|
|
8
7
|
import styles from './no-results.module.css.js';
|
|
9
8
|
|
|
10
|
-
function NoResults({
|
|
9
|
+
function NoResults({ children, title }) {
|
|
11
10
|
const paths = usePaths();
|
|
12
|
-
|
|
13
|
-
return (jsxs("div", { className: styles['no-results'], children: [jsx(Heading, { bold: false, className: styles.title, size: isLg ? 's' : 'xs', tag: "h2", children: title }), jsx("p", { className: styles.body, children: content }), jsx("div", { className: styles.buttons, children: jsx(Button, { withArrow: true, "data-test-selector": "buttonContinueShopping", href: paths.HOME, size: "md", children: jsx(FormattedMessage, { id: "Continue shopping" }) }) })] }));
|
|
11
|
+
return (jsxs("div", { className: styles['no-results'], children: [jsx(Heading, { bold: false, className: styles.title, size: "l", tag: "h2", children: title }), children, jsx("div", { className: styles.actions, children: jsx(Button, { withArrow: true, "data-test-selector": "buttonContinueShopping", href: paths.HOME, size: "md", children: jsx(FormattedMessage, { id: "Continue shopping" }) }) })] }));
|
|
14
12
|
}
|
|
15
13
|
|
|
16
14
|
export { NoResults };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var styles = {"no-results":"no-results-module-HGe-Y","title":"no-results-module-zlHBh","
|
|
1
|
+
var styles = {"no-results":"no-results-module-HGe-Y","title":"no-results-module-zlHBh","actions":"no-results-module-hCZGY"};
|
|
2
2
|
|
|
3
3
|
export { styles as default };
|
|
@@ -3,7 +3,9 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { useRefinementList } from 'react-instantsearch';
|
|
4
4
|
import { CategoryCard } from '../../../../cards/category-card/category-card.js';
|
|
5
5
|
import { CategoryCarousel } from '../../../../carousel/category-carousel/category-carousel.js';
|
|
6
|
+
import { PageSection } from '../../../../sections/page-section/page-section.js';
|
|
6
7
|
import { transformAlgoliaCategoryData } from '../../../../shared/model/category.js';
|
|
8
|
+
import styles from './product-listing-page-category-carousel.module.css.js';
|
|
7
9
|
|
|
8
10
|
function ProductListingPageCategoryCarousel({ currentCategoryPath, }) {
|
|
9
11
|
const { items } = useRefinementList({
|
|
@@ -13,10 +15,10 @@ function ProductListingPageCategoryCarousel({ currentCategoryPath, }) {
|
|
|
13
15
|
const categories = transformAlgoliaCategoryData(items).filter(category => currentCategoryPath.every((path, index) => path === category.path[index]));
|
|
14
16
|
if (categories.length === 0)
|
|
15
17
|
return null;
|
|
16
|
-
return (jsx(CategoryCarousel, { categoryCards: categories.map((category, index) => (jsx(CategoryCard, { href: category.href, image: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
return (jsx(PageSection, { className: styles['category-carousel'], layout: "edge", children: jsx(CategoryCarousel, { categoryCards: categories.map((category, index) => (jsx(CategoryCard, { href: category.href, image: {
|
|
19
|
+
image: category.image,
|
|
20
|
+
title: category.name,
|
|
21
|
+
}, route: { prefetch: true }, title: category.name }, category.href || index))) }) }));
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
export { ProductListingPageCategoryCarousel };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { useMemo,
|
|
3
|
+
import { useMemo, use } from 'react';
|
|
4
4
|
import { ProductListingPageContext } from './product-listing-page-context.js';
|
|
5
5
|
|
|
6
6
|
function ProductListingPageProvider({ children, data, error, isError, isLoading, }) {
|
|
7
7
|
const value = useMemo(() => ({ data, error, isError, isLoading }), [data, error, isError, isLoading]);
|
|
8
|
-
return (jsx(ProductListingPageContext
|
|
8
|
+
return (jsx(ProductListingPageContext, { value: value, children: children }));
|
|
9
9
|
}
|
|
10
10
|
function useProductListingPageProvider() {
|
|
11
|
-
return
|
|
11
|
+
return use(ProductListingPageContext);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export { ProductListingPageProvider, useProductListingPageProvider };
|
|
@@ -23,7 +23,7 @@ function ProductListingPage({ pageUrl, searchClient = defaultSearchClient, }) {
|
|
|
23
23
|
return jsx(ErrorPage, { error: error });
|
|
24
24
|
if (!data || isFetching)
|
|
25
25
|
return jsx(LoadingPage, {});
|
|
26
|
-
return jsx(ProductListing, { data: data, searchClient: searchClient });
|
|
26
|
+
return (jsx(ProductListing, { data: data, searchClient: searchClient, title: "Deprecated" }));
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export { ProductListingPage };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var styles = {"product-listing":"product-listing-page-module-U0zLZ","
|
|
1
|
+
var styles = {"product-listing":"product-listing-page-module-U0zLZ","sidebar":"product-listing-page-module-bIfdi","actions":"product-listing-page-module-5cz6m","sidebar-toggle":"product-listing-page-module-qhR-J","sort":"product-listing-page-module-3LRKg","count":"product-listing-page-module-3Jtw-","listing":"product-listing-page-module-BdeOz","pagination":"product-listing-page-module-zKOQv"};
|
|
2
2
|
|
|
3
3
|
export { styles as default };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { ProductOverviewProps } from '../../components/product-overview';
|
|
2
|
+
export declare function ProductListingProductOverview({ className, ...rest }: Omit<ProductOverviewProps, 'ProductHitCard'>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -25,8 +25,8 @@ function ProductHitCard({ hit }) {
|
|
|
25
25
|
price: hit.price,
|
|
26
26
|
}, route: { prefetch: true }, sku: hit.id, tags: hit.labels, title: hit.name }, hit.storefrontId));
|
|
27
27
|
}
|
|
28
|
-
function ProductListingProductOverview() {
|
|
29
|
-
return jsx(ProductOverview, { ProductHitCard: ProductHitCard });
|
|
28
|
+
function ProductListingProductOverview({ className, ...rest }) {
|
|
29
|
+
return (jsx(ProductOverview, { className: className, ProductHitCard: ProductHitCard, ...rest }));
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export { ProductListingProductOverview };
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { SearchClient } from 'algoliasearch';
|
|
2
|
+
import { ProductOverviewPromoCard } from '../components/product-overview';
|
|
2
3
|
import { ProductListingPageData } from './product-listing-page-data-types';
|
|
3
|
-
export declare function ProductListing({ data, searchClient, }: {
|
|
4
|
+
export declare function ProductListing({ breadcrumb, data, hero, postAside, preAside, promoCard, searchClient, title, }: {
|
|
5
|
+
breadcrumb?: React.ReactNode;
|
|
4
6
|
data: ProductListingPageData;
|
|
7
|
+
hero?: React.ReactNode;
|
|
8
|
+
postAside?: React.ReactNode;
|
|
9
|
+
preAside?: React.ReactNode;
|
|
10
|
+
promoCard?: ProductOverviewPromoCard;
|
|
5
11
|
searchClient: SearchClient;
|
|
12
|
+
title: string;
|
|
6
13
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,40 +10,40 @@ import { useAlgoliaHits } from '../../../algolia/use-algolia-hits.js';
|
|
|
10
10
|
import { FormattedMessage } from '../../../intl/formatted-message.js';
|
|
11
11
|
import { useFormattedMessage } from '../../../intl/use-formatted-message.js';
|
|
12
12
|
import { useLanguageCode } from '../../../intl/use-language-code.js';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
13
|
+
import { getReplacedItemCount } from '../../../lists/product-overview-grid/product-overview-grid.js';
|
|
14
|
+
import { PageLayout } from '../../../page-layout/page-layout.js';
|
|
15
|
+
import { PageSection } from '../../../sections/page-section/page-section.js';
|
|
15
16
|
import { Sidebar } from '../../../sidebar/sidebar.js';
|
|
16
17
|
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
18
|
import { NoResults } from './no-results/no-results.js';
|
|
20
|
-
import { ProductListingPageCategoryCarousel } from './product-listing-page-category-carousel/product-listing-page-category-carousel.js';
|
|
21
19
|
import { ProductListingProductOverview } from './product-listing-product-overview/product-listing-product-overview.js';
|
|
22
20
|
import styles from './product-listing-page.module.css.js';
|
|
23
21
|
|
|
24
|
-
function ProductListing({ data, searchClient, }) {
|
|
22
|
+
function ProductListing({ breadcrumb, data, hero, postAside, preAside, promoCard, searchClient, title, }) {
|
|
25
23
|
const languageCode = useLanguageCode();
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
const { hits, isLoading } = useAlgoliaHits();
|
|
25
|
+
/*
|
|
26
|
+
Only switch to the empty-state layout once Algolia has confirmed there are
|
|
27
|
+
no results. Before the first response we assume there will be hits, so the
|
|
28
|
+
first paint already has the final layout. InstantSearch keeps the previous
|
|
29
|
+
hits while a new page/filter/sort is loading, so this never flips during
|
|
30
|
+
pagination.
|
|
31
|
+
*/
|
|
32
|
+
const isEmpty = isLoading === false && hits.length === 0;
|
|
33
|
+
return (jsx(AlgoliaProvider, { categoryPages: data.categoryPages, hierarchicalCategories: data.hierarchicalCategories, languageCode: languageCode, offlineSearchClient: offlineSearchClient, reservedFirstPageSlots: promoCard ? getReplacedItemCount(promoCard.slots) : 0, searchClient: searchClient, children: jsx(PageLayout, { breadcrumb: !isEmpty && breadcrumb, "data-test-selector": "productListingPage", hero: !isEmpty && hero, postAside: !isEmpty && postAside, preAside: !isEmpty && preAside, title: title, titleHidden: isEmpty, type: isEmpty ? 'utility' : 'product-listing', children: jsx(ProductListingPageContent, { promoCard: promoCard }) }) }, data.categoryPages));
|
|
35
34
|
}
|
|
36
|
-
|
|
35
|
+
const scrollToListing = () => {
|
|
36
|
+
const listingElement = document?.querySelector('#listing') ?? null;
|
|
37
|
+
if (listingElement) {
|
|
38
|
+
listingElement.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
|
39
|
+
listingElement.focus({ preventScroll: true });
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
function ProductListingPageContent({ promoCard, }) {
|
|
37
43
|
const { hits, isLoading } = useAlgoliaHits();
|
|
38
44
|
const hasHits = hits.length > 0;
|
|
39
45
|
const t = useFormattedMessage();
|
|
40
|
-
return (jsxs(Fragment, { children: [isLoading
|
|
41
|
-
display: hasHits ? undefined : 'none',
|
|
42
|
-
}, children: [promoBanners?.length && (jsx("section", { className: styles.promos, children: jsx(PromoBanners, { promoBannersData: promoBanners }) })), jsx("section", { className: styles.categories, children: jsx(ProductListingPageCategoryCarousel, { currentCategoryPath: currentCategoryPath }) }), jsxs("section", { className: styles['action-bar'], children: [jsx("div", { className: styles['sidebar-toggle'], children: jsx(ToggleSidebarButton, {}) }), jsx("span", { className: styles.count, children: jsx(AlgoliaResultsCount, {}) }), jsx("div", { className: styles.sort, children: jsx(AlgoliaSortBy, {}) })] }), jsx("section", { children: jsxs("div", { className: styles['product-grid-container'], children: [jsx(Sidebar, { className: styles['sidebar'], children: jsx(AlgoliaFilterPanel, { showActiveCategories: true }) }), jsxs("div", { className: styles['product-grid'], children: [jsx(ProductListingProductOverview, {}), jsx("div", { className: styles.pagination, children: jsx(AlgoliaPagination, { onChange: () => {
|
|
43
|
-
setTimeout(() => {
|
|
44
|
-
scrollToTop();
|
|
45
|
-
}, 100);
|
|
46
|
-
} }) })] })] }) })] })] }));
|
|
46
|
+
return (jsxs(Fragment, { children: [isLoading === false && !hasHits && (jsxs(NoResults, { title: t('Sorry, there are no products found'), children: [jsxs("p", { children: [jsx(FormattedMessage, { id: "You could try exploring our products by category" }), ' '] }), jsx("p", { children: jsx(FormattedMessage, { id: "Try 'Search' and try to find the product you're looking for" }) })] })), hasHits && (jsxs(PageSection, { className: styles['product-listing'], children: [jsxs("section", { className: styles['actions'], children: [jsx("div", { className: styles.count, children: jsx(AlgoliaResultsCount, {}) }), jsx("div", { className: styles['sidebar-toggle'], children: jsx(ToggleSidebarButton, {}) }), jsx("div", { className: styles.sort, children: jsx(AlgoliaSortBy, {}) })] }), jsx(Sidebar, { className: styles['sidebar'], children: jsx(AlgoliaFilterPanel, { showActiveCategories: true }) }), jsx(ProductListingProductOverview, { className: styles['listing'], id: "listing", promoCard: promoCard, tabIndex: -1 }), jsx("nav", { className: styles['pagination'], children: jsx(AlgoliaPagination, { onChange: scrollToListing }) })] }))] }));
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
export { ProductListing };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { ProductOverviewProps } from '../../components/product-overview';
|
|
2
|
+
export declare function SearchResultProductOverview({ className, ...rest }: Omit<ProductOverviewProps, 'ProductHitCard'>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -27,8 +27,8 @@ function ProductHitCard({ hit }) {
|
|
|
27
27
|
price: hit.price,
|
|
28
28
|
}, sku: hit.id, tags: hit.labels, title: hit.name }, hit.storefrontId));
|
|
29
29
|
}
|
|
30
|
-
function SearchResultProductOverview() {
|
|
31
|
-
return jsx(ProductOverview, { ProductHitCard: ProductHitCard });
|
|
30
|
+
function SearchResultProductOverview({ className, ...rest }) {
|
|
31
|
+
return (jsx(ProductOverview, { className: className, ProductHitCard: ProductHitCard, ...rest }));
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
export { SearchResultProductOverview };
|
|
@@ -10,44 +10,45 @@ import { useAlgoliaHits } from '../../../algolia/use-algolia-hits.js';
|
|
|
10
10
|
import { FormattedMessage } from '../../../intl/formatted-message.js';
|
|
11
11
|
import { useFormattedMessage } from '../../../intl/use-formatted-message.js';
|
|
12
12
|
import { useLanguageCode } from '../../../intl/use-language-code.js';
|
|
13
|
-
import {
|
|
13
|
+
import { PageLayout } from '../../../page-layout/page-layout.js';
|
|
14
|
+
import { PageSection } from '../../../sections/page-section/page-section.js';
|
|
14
15
|
import { Sidebar } from '../../../sidebar/sidebar.js';
|
|
15
16
|
import { ToggleSidebarButton } from '../../../sidebar/toggle-sidebar-button.js';
|
|
16
|
-
import { Page } from '../../components/page/page.js';
|
|
17
|
-
import { LoadingPage } from '../../loading-page/loading-page.js';
|
|
18
17
|
import { NoResults } from '../product-listing-page/no-results/no-results.js';
|
|
19
18
|
import { SearchResultProductOverview } from './search-result-product-overview/search-result-product-overview.js';
|
|
20
19
|
import { SearchResultsPageCategoryCarousel } from './search-results-page-category-carousel/search-results-page-category-carousel.js';
|
|
21
|
-
import styles from '
|
|
20
|
+
import styles from '../product-listing-page/product-listing-page.module.css.js';
|
|
22
21
|
|
|
23
22
|
function SearchResultsPage({ location, searchClient, }) {
|
|
24
23
|
const languageCode = useLanguageCode();
|
|
25
24
|
const t = useFormattedMessage();
|
|
25
|
+
const { hits, isLoading } = useAlgoliaHits();
|
|
26
|
+
// See ProductListing: optimistic layout until Algolia confirms zero results.
|
|
27
|
+
const isEmpty = isLoading === false && hits.length === 0;
|
|
26
28
|
const keywords = qs.parse(location.search).keyword;
|
|
27
29
|
const keyword = Array.isArray(keywords) ? keywords.join(' ') : keywords;
|
|
28
30
|
if (!keyword)
|
|
29
31
|
return jsx("h1", { children: t('No search results') });
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
replacementValues: { 0: keyword },
|
|
36
|
-
}), windowTitle: `${t('Search')} - ${t('Sonic Equipment')}`, children: jsx(SearchResultsPageContent, { keyword: keyword }) }) }));
|
|
32
|
+
const title = t("'{0}' in all products", {
|
|
33
|
+
replacementValues: { 0: keyword },
|
|
34
|
+
});
|
|
35
|
+
const preAside = (jsx(PageSection, { layout: "edge", children: jsx(SearchResultsPageCategoryCarousel, {}) }));
|
|
36
|
+
return (jsx(AlgoliaProvider, { languageCode: languageCode, query: keyword, searchClient: searchClient, children: jsx(PageLayout, { "data-test-selector": "searchResultsPage", preAside: !isEmpty && preAside, title: title, titleHidden: isEmpty, type: isEmpty ? 'utility' : 'product-listing', children: jsx(SearchResultsPageContent, { keyword: keyword }) }) }));
|
|
37
37
|
}
|
|
38
|
+
const scrollToListing = () => {
|
|
39
|
+
const listingElement = document?.querySelector('#listing') ?? null;
|
|
40
|
+
if (listingElement) {
|
|
41
|
+
listingElement.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
|
42
|
+
listingElement.focus({ preventScroll: true });
|
|
43
|
+
}
|
|
44
|
+
};
|
|
38
45
|
function SearchResultsPageContent({ keyword }) {
|
|
39
46
|
const { hits, isLoading } = useAlgoliaHits();
|
|
40
47
|
const hasHits = hits.length > 0;
|
|
41
48
|
const t = useFormattedMessage();
|
|
42
|
-
return (jsxs(Fragment, { children: [isLoading
|
|
49
|
+
return (jsxs(Fragment, { children: [isLoading === false && !hasHits && (jsxs(NoResults, { title: t("Unfortnately, We found no articles for your search '{0}'", {
|
|
43
50
|
replacementValues: { 0: keyword },
|
|
44
|
-
}) })), jsxs("div", {
|
|
45
|
-
display: hasHits ? undefined : 'none',
|
|
46
|
-
}, children: [jsx("section", { className: styles.categories, children: jsx(SearchResultsPageCategoryCarousel, {}) }), jsxs("section", { className: styles['action-bar'], children: [jsx("div", { className: styles['sidebar-toggle'], children: jsx(ToggleSidebarButton, {}) }), jsx("span", { className: styles.count, children: jsx(AlgoliaResultsCount, {}) }), jsx("div", { className: styles.sort, children: jsx(AlgoliaSortBy, {}) })] }), jsx("section", { children: jsxs("div", { className: styles['product-grid-container'], children: [jsx(Sidebar, { children: jsx(AlgoliaFilterPanel, { showCategoriesFilters: true }) }), jsxs("div", { className: styles['product-grid'], children: [jsx(SearchResultProductOverview, {}), jsx("div", { className: styles.pagination, children: jsx(AlgoliaPagination, { onChange: () => {
|
|
47
|
-
setTimeout(() => {
|
|
48
|
-
scrollToTop();
|
|
49
|
-
}, 100);
|
|
50
|
-
} }) })] })] }) })] })] }));
|
|
51
|
+
}), children: [jsx("p", { children: jsx(FormattedMessage, { id: "You could try checking the spelling of your search query" }) }), jsx("p", { children: jsx(FormattedMessage, { id: "Try another search" }) }), jsx("p", { children: jsx(FormattedMessage, { id: "Are you looking for information about our service? Please visit our customer support page" }) })] })), hasHits && (jsxs(PageSection, { className: styles['product-listing'], children: [jsxs("section", { className: styles['actions'], children: [jsx("div", { className: styles.count, children: jsx(AlgoliaResultsCount, {}) }), jsx("div", { className: styles['sidebar-toggle'], children: jsx(ToggleSidebarButton, {}) }), jsx("div", { className: styles.sort, children: jsx(AlgoliaSortBy, {}) })] }), jsx(Sidebar, { className: styles['sidebar'], children: jsx(AlgoliaFilterPanel, { showActiveCategories: true }) }), jsx(SearchResultProductOverview, { className: styles['listing'], id: "listing", tabIndex: -1 }), jsx("nav", { className: styles['pagination'], children: jsx(AlgoliaPagination, { onChange: scrollToListing }) })] }))] }));
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
export { SearchResultsPage };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { Carousel } from '../../carousel/carousel.js';
|
|
4
|
+
import { PageSection } from '../../sections/page-section/page-section.js';
|
|
4
5
|
import { useIsBreakpoint } from '../../shared/hooks/use-is-breakpoint.js';
|
|
5
6
|
import { PromoBanner } from '../promo-banner/promo-banner.js';
|
|
6
7
|
import styles from './promo-banners.module.css.js';
|
|
@@ -11,7 +12,7 @@ function PromoBanners({ promoBannersData = defaultPromoBannersData, }) {
|
|
|
11
12
|
const promoBanners = promoBannersData.map((promoBanner, index) => (jsx(PromoBanner, { href: promoBanner.href, image: promoBanner.image, variant: index % 2 === 0 ? 'lg' : 'sm' }, `promo-banner-${promoBanner.href || index}`)));
|
|
12
13
|
if (promoBannersData.length === 0)
|
|
13
14
|
return null;
|
|
14
|
-
return (jsx(
|
|
15
|
+
return (jsx(PageSection, { className: styles.promos, layout: "edge", children: isLg ? (jsx(Fragment, { children: promoBanners })) : (jsx(Carousel, { hasNavigation: false, slides: promoBanners, spaceBetween: 16 })) }));
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
export { PromoBanners };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { FocusPoint } from '../shared/model/image';
|
|
2
|
+
type ImageVariant = 'billboard' | 'double-postcard' | 'leaderboard' | 'postcard' | 'product-card';
|
|
3
|
+
export interface ResponsiveBannerProps {
|
|
4
|
+
bgGradient?: boolean;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
'data-country-gate'?: string;
|
|
8
|
+
'data-test-selector'?: string;
|
|
9
|
+
hAlign?: 'start' | 'center';
|
|
10
|
+
/**
|
|
11
|
+
* Required: a banner's purpose is to lead somewhere, so one without a
|
|
12
|
+
* destination is a mistake rather than a variant. Note this catches the
|
|
13
|
+
* *developer* error only — `''` still satisfies it, and `Link` renders a
|
|
14
|
+
* dead `<button>` for any falsy href, so a caller deriving this from
|
|
15
|
+
* editorial content still has to handle "the editor picked nothing".
|
|
16
|
+
*/
|
|
17
|
+
href: string;
|
|
18
|
+
/** A single point, or one per variant to match an `imageSrc` map. */
|
|
19
|
+
imageFocusPoint?: FocusPoint | Partial<Record<ImageVariant, FocusPoint>>;
|
|
20
|
+
imageSrc?: string | Partial<Record<ImageVariant, string>>;
|
|
21
|
+
shape?: 'billboard' | 'postcard' | 'double-postcard' | 'product-card' | 'leaderboard' | 'filmstrip';
|
|
22
|
+
tag?: 'bestseller' | 'discount' | 'limited' | 'new' | 'onsale' | 'onlineonly' | 'halfprice';
|
|
23
|
+
target?: string;
|
|
24
|
+
textHidden?: boolean;
|
|
25
|
+
theme?: 'light' | 'dark' | 'red' | 'dark-red' | 'steel' | 'dark-steel';
|
|
26
|
+
title?: React.ReactNode;
|
|
27
|
+
vAlign?: 'start' | 'center' | 'end' | 'stretch';
|
|
28
|
+
}
|
|
29
|
+
export declare function ResponsiveBanner({ bgGradient, children, className, 'data-country-gate': dataCountryGate, 'data-test-selector': dataTestSelector, hAlign, href, imageFocusPoint, imageSrc, shape, tag, target, textHidden, theme, title, vAlign, }: ResponsiveBannerProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import { Tag } from '../badges/tag/tag.js';
|
|
5
|
+
import { Link } from '../buttons/link/link.js';
|
|
6
|
+
import { FormattedMessage } from '../intl/formatted-message.js';
|
|
7
|
+
import { ResponsiveImage } from '../media/responsive-image/responsive-image.js';
|
|
8
|
+
import { RichText } from '../rich-text/rich-text.js';
|
|
9
|
+
import { Heading } from '../typography/heading/heading.js';
|
|
10
|
+
import styles from './responsive-banner.module.css.js';
|
|
11
|
+
|
|
12
|
+
/** Banners span from a product-card cell up to the full content width. */
|
|
13
|
+
const RESPONSIVE_BANNER_SIZES = '(min-width: 64rem) 50vw, 100vw';
|
|
14
|
+
function ResponsiveBanner({ bgGradient = false, children, className, 'data-country-gate': dataCountryGate, 'data-test-selector': dataTestSelector, hAlign = 'start', href, imageFocusPoint, imageSrc, shape = 'billboard', tag, target = '_self', textHidden, theme = 'dark', title, vAlign = 'start', }) {
|
|
15
|
+
const focusPointFor = (variant) => imageFocusPoint && 'x' in imageFocusPoint
|
|
16
|
+
? imageFocusPoint
|
|
17
|
+
: imageFocusPoint?.[variant];
|
|
18
|
+
return (jsx("article", { className: clsx(styles['responsive-banner'], styles[`theme-${theme}`], styles[`h-align-${hAlign}`], styles[`v-align-${vAlign}`], styles[`shape-${shape}`], bgGradient && styles['bg-gradient'], textHidden && styles['text-hidden'], 'responsive-banner', className), "data-country-gate": dataCountryGate, "data-test-selector": dataTestSelector, children: jsxs("div", { className: styles['container'], children: [jsxs("div", { className: styles['content'], children: [jsx(Heading, { italic: true, neutral: true, className: styles['title'], tag: "h3", children: jsx(Link, { className: styles['link'], href: href, target: target, children: title }) }), children && (jsx(RichText, { className: styles['body'], children: children })), tag && (jsx(Tag, { className: styles['tag'], children: jsx(FormattedMessage, { noTranslationId: true, fallbackValue: tag, id: `tag.${tag.toLowerCase()}` }) }))] }), imageSrc && typeof imageSrc === 'string' && (jsx(ResponsiveImage, { className: clsx(styles['image'], styles['image-base']), fit: "cover", focusPoint: focusPointFor(), sizes: RESPONSIVE_BANNER_SIZES, src: imageSrc })), imageSrc &&
|
|
19
|
+
typeof imageSrc === 'object' &&
|
|
20
|
+
Object.entries(imageSrc).map(([key, value]) => (jsx(ResponsiveImage, { className: clsx(styles['image'], styles[`image-${key}`]), fit: "cover", focusPoint: focusPointFor(key), sizes: RESPONSIVE_BANNER_SIZES, src: value }, key)))] }) }));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { ResponsiveBanner };
|