@sonic-equipment/ui 1.1.8 → 2.0.1
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 +25 -11
- package/dist/buttons/button/button.js +41 -17
- package/dist/buttons/icon-button/icon-button.d.ts +8 -1
- package/dist/buttons/icon-button/icon-button.js +4 -5
- 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 +65 -20
- 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 +76 -32
- 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 +135 -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 +367 -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 -63
- 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.js +3 -2
- 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 +0 -3
- package/dist/pages/my-sonic/pages/order-details/order-details-page.js +17 -28
- 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 +10823 -3361
- 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/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
|
@@ -5,44 +5,42 @@ import { Breadcrumb } from '../../../../breadcrumbs/breadcrumb.js';
|
|
|
5
5
|
import { ConnectedProductCard } from '../../../../cards/product-card/connected-product-card.js';
|
|
6
6
|
import { useFormattedMessage } from '../../../../intl/use-formatted-message.js';
|
|
7
7
|
import { ProductOverviewGrid } from '../../../../lists/product-overview-grid/product-overview-grid.js';
|
|
8
|
+
import { PageLayout } from '../../../../page-layout/page-layout.js';
|
|
9
|
+
import { PageSection } from '../../../../sections/page-section/page-section.js';
|
|
8
10
|
import { useFetchFavorites } from '../../../../shared/api/bff/hooks/use-fetch-favorites.js';
|
|
9
|
-
import { DefaultErrorView } from '../../../../shared/error/default-error-view.js';
|
|
10
11
|
import { usePaths } from '../../../../shared/routing/use-paths.js';
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
12
|
+
import { ConnectedMySonicNavigation } from '../../navigation/connected-my-sonic-navigation.js';
|
|
13
|
+
import styles from './favorites-page.module.css.js';
|
|
13
14
|
|
|
14
15
|
function FavoritesPage() {
|
|
15
|
-
const t = useFormattedMessage();
|
|
16
|
-
const { data: favorites, error, isFetching, isLoading } = useFetchFavorites();
|
|
17
|
-
const { sendAddToCartFromFavoritesPageEvent, sendProductClickFromFavoritesPageEvent, } = useAlgoliaInsights();
|
|
18
|
-
if (error)
|
|
19
|
-
return (jsx(MySonicLayoutPage, { title: t('Favorites'), children: jsx(DefaultErrorView, { error: error, title: "" }) }));
|
|
20
|
-
return (jsx(MySonicLayoutPage, { title: t('Favorites'), children: (favorites && favorites.length > 0) || isFetching ? (jsx(ProductOverviewGrid, { isLoading: isLoading, children: favorites?.map(favorite => (jsx(ConnectedProductCard, { href: favorite.storefrontSlug, id: favorite.storefrontId, image: {
|
|
21
|
-
fit: 'contain',
|
|
22
|
-
image: favorite.image,
|
|
23
|
-
title: favorite.name,
|
|
24
|
-
}, onAddToCart: ({ cartLine }) => sendAddToCartFromFavoritesPageEvent({
|
|
25
|
-
cartLine,
|
|
26
|
-
}), onClick: () => {
|
|
27
|
-
sendProductClickFromFavoritesPageEvent({
|
|
28
|
-
objectId: favorite.objectId,
|
|
29
|
-
position: favorite.position,
|
|
30
|
-
});
|
|
31
|
-
}, price: {
|
|
32
|
-
currencyCode: favorite.currencyCode,
|
|
33
|
-
isVatIncluded: favorite.isVatIncluded,
|
|
34
|
-
originalPrice: favorite.originalPrice,
|
|
35
|
-
price: favorite.price,
|
|
36
|
-
}, sku: favorite.id, tags: favorite.labels, title: favorite.name }, favorite.storefrontId))) })) : (jsx("p", { children: t('You have no favorite products yet.') })) }));
|
|
37
|
-
}
|
|
38
|
-
function FavoritesPageBreadcrumb() {
|
|
39
16
|
const t = useFormattedMessage();
|
|
40
17
|
const paths = usePaths();
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
18
|
+
const { data: favorites, isFetching, isLoading } = useFetchFavorites();
|
|
19
|
+
const { sendAddToCartFromFavoritesPageEvent, sendProductClickFromFavoritesPageEvent, } = useAlgoliaInsights();
|
|
20
|
+
const title = t('Favorites');
|
|
21
|
+
const breadcrumb = (jsx(Breadcrumb, { links: [
|
|
22
|
+
{ href: paths.HOME, label: t('Home') },
|
|
23
|
+
{ href: paths.MY_SONIC, label: t('My Sonic') },
|
|
24
|
+
{ href: paths.ACCOUNT_MY_LISTS, label: t('Favorites') },
|
|
25
|
+
] }));
|
|
26
|
+
const aside = jsx(ConnectedMySonicNavigation, {});
|
|
27
|
+
return (jsx(PageLayout, { aside: aside, breadcrumb: breadcrumb, className: styles['favorites-page'], "data-test-selector": "favorites-page", title: title, type: "account", children: jsx(PageSection, { as: "div", children: (favorites && favorites.length > 0) || isFetching ? (jsx(ProductOverviewGrid, { className: styles['listing'], isLoading: isLoading, children: favorites?.map(favorite => (jsx(ConnectedProductCard, { href: favorite.storefrontSlug, id: favorite.storefrontId, image: {
|
|
28
|
+
fit: 'contain',
|
|
29
|
+
image: favorite.image,
|
|
30
|
+
title: favorite.name,
|
|
31
|
+
}, onAddToCart: ({ cartLine }) => sendAddToCartFromFavoritesPageEvent({
|
|
32
|
+
cartLine,
|
|
33
|
+
}), onClick: () => {
|
|
34
|
+
sendProductClickFromFavoritesPageEvent({
|
|
35
|
+
objectId: favorite.objectId,
|
|
36
|
+
position: favorite.position,
|
|
37
|
+
});
|
|
38
|
+
}, price: {
|
|
39
|
+
currencyCode: favorite.currencyCode,
|
|
40
|
+
isVatIncluded: favorite.isVatIncluded,
|
|
41
|
+
originalPrice: favorite.originalPrice,
|
|
42
|
+
price: favorite.price,
|
|
43
|
+
}, sku: favorite.id, tags: favorite.labels, title: favorite.name }, favorite.storefrontId))) })) : (jsx("p", { children: t('You have no favorite products yet.') })) }) }));
|
|
46
44
|
}
|
|
47
45
|
|
|
48
|
-
export { FavoritesPage
|
|
46
|
+
export { FavoritesPage };
|
|
@@ -4,9 +4,10 @@ import { Breadcrumb } from '../../../../breadcrumbs/breadcrumb.js';
|
|
|
4
4
|
import { useFormattedMessage } from '../../../../intl/use-formatted-message.js';
|
|
5
5
|
import { Widget } from '../../../../lists/widget-grid/widget.js';
|
|
6
6
|
import { WidgetGrid } from '../../../../lists/widget-grid/widget-grid.js';
|
|
7
|
+
import { PageLayout } from '../../../../page-layout/page-layout.js';
|
|
8
|
+
import { PageSection } from '../../../../sections/page-section/page-section.js';
|
|
7
9
|
import { usePaths } from '../../../../shared/routing/use-paths.js';
|
|
8
|
-
import {
|
|
9
|
-
import { MySonicLayoutPage } from '../../layouts/my-sonic-layout/my-sonic-layout-page.js';
|
|
10
|
+
import { ConnectedMySonicNavigation } from '../../navigation/connected-my-sonic-navigation.js';
|
|
10
11
|
import { ConnectedAddressBookWidget } from '../../widgets/connected-address-book-widget.js';
|
|
11
12
|
import { ConnectedBillToAddressWidget } from '../../widgets/connected-bill-to-address-widget.js';
|
|
12
13
|
import { ConnectedCustomerInformationWidget } from '../../widgets/connected-customer-information-widget.js';
|
|
@@ -14,17 +15,16 @@ import { ConnectedShipToAddressWidget } from '../../widgets/connected-ship-to-ad
|
|
|
14
15
|
import { ConnectedUserAccountWidget } from '../../widgets/connected-user-account-widget.js';
|
|
15
16
|
|
|
16
17
|
function MyAccountPage() {
|
|
17
|
-
const t = useFormattedMessage();
|
|
18
|
-
return (jsx(MySonicLayoutPage, { title: t('My account'), children: jsxs(WidgetGrid, { children: [jsx(Widget, { children: jsx(ConnectedUserAccountWidget, {}) }), jsx(Widget, { children: jsx(ConnectedCustomerInformationWidget, {}) }), jsx(Widget, { children: jsx(ConnectedBillToAddressWidget, {}) }), jsx(Widget, { children: jsx(ConnectedShipToAddressWidget, {}) }), jsx(Widget, { size: "full", children: jsx(ConnectedAddressBookWidget, {}) })] }) }));
|
|
19
|
-
}
|
|
20
|
-
function MyAccountPageBreadcrumb() {
|
|
21
18
|
const t = useFormattedMessage();
|
|
22
19
|
const paths = usePaths();
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
const title = t('My account');
|
|
21
|
+
const breadcrumb = (jsx(Breadcrumb, { links: [
|
|
22
|
+
{ href: paths.HOME, label: t('Home') },
|
|
23
|
+
{ href: paths.MY_SONIC, label: t('My Sonic') },
|
|
24
|
+
{ href: paths.ACCOUNT, label: t('Account') },
|
|
25
|
+
] }));
|
|
26
|
+
const aside = jsx(ConnectedMySonicNavigation, {});
|
|
27
|
+
return (jsx(PageLayout, { aside: aside, breadcrumb: breadcrumb, "data-test-selector": "my-account-page", title: title, type: "account", children: jsx(PageSection, { as: "div", children: jsxs(WidgetGrid, { children: [jsx(Widget, { children: jsx(ConnectedUserAccountWidget, {}) }), jsx(Widget, { children: jsx(ConnectedCustomerInformationWidget, {}) }), jsx(Widget, { children: jsx(ConnectedBillToAddressWidget, {}) }), jsx(Widget, { children: jsx(ConnectedShipToAddressWidget, {}) }), jsx(Widget, { size: "full", children: jsx(ConnectedAddressBookWidget, {}) })] }) }) }));
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
export { MyAccountPage
|
|
30
|
+
export { MyAccountPage };
|
|
@@ -6,6 +6,7 @@ import { CartTotals } from '../../../../cart-totals/cart-totals.js';
|
|
|
6
6
|
import { FormattedDate } from '../../../../intl/formatted-date.js';
|
|
7
7
|
import { FormattedMessage } from '../../../../intl/formatted-message.js';
|
|
8
8
|
import { OrderLineList } from '../../../../lists/orderline-list/orderline-list.js';
|
|
9
|
+
import { PageSection } from '../../../../sections/page-section/page-section.js';
|
|
9
10
|
import { usePaths } from '../../../../shared/routing/use-paths.js';
|
|
10
11
|
import { ensureNumber } from '../../../../shared/utils/number.js';
|
|
11
12
|
import { StatusText } from '../../../../text/status-text/status-text.js';
|
|
@@ -49,7 +50,7 @@ const getOrderShipToAddress = (order) => ({
|
|
|
49
50
|
function OrderDetailsContent({ invoiceDownloadButtons, order, reorderButton, returnUrl, }) {
|
|
50
51
|
const paths = usePaths();
|
|
51
52
|
const status = statusMap[order.status];
|
|
52
|
-
return (jsxs("div", { className: styles['order-details'], children: [jsxs("
|
|
53
|
+
return (jsxs("div", { className: styles['order-details'], children: [jsxs(PageSection, { as: "header", className: styles['order-header'], children: [jsxs("div", { className: styles['order-header-info'], children: [jsxs(Heading, { size: "xxs", tag: "h2", children: [jsx(FormattedMessage, { id: "Order" }), " ", order.webOrderNumber] }), jsxs("div", { children: [jsx(FormattedMessage, { id: "Status" }), ":", ' ', jsx(StatusText, { "data-test-selector": "order-status", status: status, children: jsx(FormattedMessage, { noTranslationId: true, id: `orderStatus.${order.status}` }) })] })] }), invoiceDownloadButtons, reorderButton] }), jsx(PageSection, { as: "section", className: styles['order-additional-info'], children: jsxs("dl", { children: [jsx("dt", { children: jsx(FormattedMessage, { id: "orderProperty.Date" }) }), jsx("dd", { children: jsx(FormattedDate, { date: order.orderDate }) }), jsx("dt", { children: jsx(FormattedMessage, { id: "orderProperty.PO Number" }) }), jsx("dd", { children: order.customerPO })] }) }), jsx(PageSection, { as: "section", className: styles['order-billing-and-shipping'], children: jsx(BillingAndInvoiceInformation, { billToAddress: getOrderBillToAddress(order), shipToAddress: getOrderShipToAddress(order) }) }), jsx(PageSection, { className: styles['order-top-button'], children: jsx(Button, { color: "secondary", href: returnUrl || paths.ACCOUNT_ORDERS, variant: "outline", children: jsx(FormattedMessage, { id: "Back" }) }) }), jsxs(PageSection, { as: "section", className: styles['order-line-list'], children: [jsx(Heading, { size: "xxs", tag: "h3", children: jsx(FormattedMessage, { id: "Products" }) }), jsx(OrderLineList, { children: order.orderLines?.map(line => (jsx(OrderLineCard, { isReadonly: true, href: line.productUri, image: {
|
|
53
54
|
fit: 'contain',
|
|
54
55
|
image: {
|
|
55
56
|
'1': line.mediumImagePath,
|
|
@@ -63,7 +64,7 @@ function OrderDetailsContent({ invoiceDownloadButtons, order, reorderButton, ret
|
|
|
63
64
|
originalTotalPrice: ensureNumber(line.lineTotal),
|
|
64
65
|
pricePerUnit: line.unitPrice,
|
|
65
66
|
totalPrice: line.lineTotal,
|
|
66
|
-
}, productId: line.productId, quantity: line.qtyOrdered, sku: line.productErpNumber, title: line.shortDescription }, line.id))) })] }), jsx(
|
|
67
|
+
}, productId: line.productId, quantity: line.qtyOrdered, sku: line.productErpNumber, title: line.shortDescription }, line.id))) })] }), jsx(PageSection, { className: styles['order-totals'], children: jsx(CartTotals, { className: styles['totals'], currencyCode: order.currencyCode, shippingCost: order.shippingAndHandling, subtotal: order.orderSubTotal, tax: order.taxAmount, total: order.orderTotal, vatPercentage: undefined }) }), jsx(PageSection, { className: styles['order-bottom-button'], children: jsx(Button, { color: "secondary", href: returnUrl || paths.ACCOUNT_ORDERS, variant: "outline", children: jsx(FormattedMessage, { id: "Back" }) }) })] }));
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
export { OrderDetailsContent, statusMap };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var styles = {"order-details":"order-details-content-module-aU3VQ","order-header":"order-details-content-module-q0QYm","order-header-info":"order-details-content-module-d9sC4","order-additional-info":"order-details-content-module--1w7s","order-
|
|
1
|
+
var styles = {"order-details":"order-details-content-module-aU3VQ","order-header":"order-details-content-module-q0QYm","order-header-info":"order-details-content-module-d9sC4","order-additional-info":"order-details-content-module--1w7s","order-totals":"order-details-content-module-qzGpP","totals":"order-details-content-module-1duSJ","order-top-button":"order-details-content-module-RkRvM","order-bottom-button":"order-details-content-module-o62H3"};
|
|
2
2
|
|
|
3
3
|
export { styles as default };
|
|
@@ -4,6 +4,3 @@ export type OrderDetailsProps = {
|
|
|
4
4
|
returnUrl?: string;
|
|
5
5
|
};
|
|
6
6
|
export declare function OrderDetailsPage({ invoiceNumbers, orderId, returnUrl, }: OrderDetailsProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export declare function OrderDetailsPageBreadcrumb({ orderId }: {
|
|
8
|
-
orderId: string;
|
|
9
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,43 +1,32 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { Breadcrumb } from '../../../../breadcrumbs/breadcrumb.js';
|
|
4
4
|
import { InvoiceDownloadButtons } from '../../../../buttons/invoice-download-buttons/invoice-download-buttons.js';
|
|
5
5
|
import { ConnectedReorderButton } from '../../../../buttons/reorder-button/connected-reorder-button.js';
|
|
6
6
|
import { useFormattedMessage } from '../../../../intl/use-formatted-message.js';
|
|
7
|
-
import {
|
|
7
|
+
import { PageLayout } from '../../../../page-layout/page-layout.js';
|
|
8
8
|
import { useFetchOrderById } from '../../../../shared/api/storefront/hooks/orders/use-fetch-order-by-id.js';
|
|
9
9
|
import { DefaultErrorView } from '../../../../shared/error/default-error-view.js';
|
|
10
10
|
import { usePaths } from '../../../../shared/routing/use-paths.js';
|
|
11
|
-
import {
|
|
12
|
-
import { MySonicLayoutPage } from '../../layouts/my-sonic-layout/my-sonic-layout-page.js';
|
|
11
|
+
import { ConnectedMySonicNavigation } from '../../navigation/connected-my-sonic-navigation.js';
|
|
13
12
|
import { OrderDetailsContent } from './order-details-content.js';
|
|
14
13
|
|
|
15
14
|
function OrderDetailsPage({ invoiceNumbers, orderId, returnUrl, }) {
|
|
16
|
-
const { data: order,
|
|
17
|
-
const t = useFormattedMessage();
|
|
18
|
-
if (isLoading) {
|
|
19
|
-
return (jsx(MySonicLayoutPage, { title: t('Order details'), children: jsx(DynamicLoadingOverlay, { isLoading: isLoading }) }));
|
|
20
|
-
}
|
|
21
|
-
if (error) {
|
|
22
|
-
return (jsx(MySonicLayoutPage, { title: t('Order details'), children: jsx(DefaultErrorView, { error: error, title: "" }) }));
|
|
23
|
-
}
|
|
24
|
-
if (!order) {
|
|
25
|
-
return (jsx(MySonicLayoutPage, { title: t('Order details'), children: jsx(DefaultErrorView, { error: new Error(`Order with ID ${orderId} not found. Please try again later.`), title: "" }) }));
|
|
26
|
-
}
|
|
27
|
-
return (jsx(MySonicLayoutPage, { "data-test-selector": "order-history", title: t('Order details'), children: jsx(OrderDetailsContent, { invoiceDownloadButtons: jsx(InvoiceDownloadButtons, { invoiceNumbers: invoiceNumbers ?? [] }), order: order, reorderButton: jsx(ConnectedReorderButton, { orderId: orderId }), returnUrl: returnUrl }) }));
|
|
28
|
-
}
|
|
29
|
-
function OrderDetailsPageBreadcrumb({ orderId }) {
|
|
15
|
+
const { data: order, isLoading } = useFetchOrderById(orderId);
|
|
30
16
|
const t = useFormattedMessage();
|
|
31
17
|
const paths = usePaths();
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
18
|
+
const title = t('Order details');
|
|
19
|
+
const breadcrumb = (jsx(Breadcrumb, { links: [
|
|
20
|
+
{ href: paths.HOME, label: t('Home') },
|
|
21
|
+
{ href: paths.MY_SONIC, label: t('My Sonic') },
|
|
22
|
+
{ href: paths.ACCOUNT_ORDERS, label: t('Orders') },
|
|
23
|
+
{
|
|
24
|
+
href: `${paths.ACCOUNT_ORDERS}/${orderId}`,
|
|
25
|
+
label: t('Order details'),
|
|
26
|
+
},
|
|
27
|
+
] }));
|
|
28
|
+
const aside = jsx(ConnectedMySonicNavigation, {});
|
|
29
|
+
return (jsxs(PageLayout, { aside: aside, breadcrumb: breadcrumb, "data-test-selector": "order-details-page", title: title, type: "account", children: [!order && !isLoading && (jsx(DefaultErrorView, { error: new Error(`Order with ID ${orderId} not found. Please try again later.`) })), order && (jsx(OrderDetailsContent, { invoiceDownloadButtons: jsx(InvoiceDownloadButtons, { invoiceNumbers: invoiceNumbers ?? [] }), order: order, reorderButton: jsx(ConnectedReorderButton, { orderId: orderId }), returnUrl: returnUrl }))] }));
|
|
41
30
|
}
|
|
42
31
|
|
|
43
|
-
export { OrderDetailsPage
|
|
32
|
+
export { OrderDetailsPage };
|
|
@@ -13,14 +13,14 @@ import { FormattedMessage } from '../../../../intl/formatted-message.js';
|
|
|
13
13
|
import { useFormattedMessage } from '../../../../intl/use-formatted-message.js';
|
|
14
14
|
import { useIntl } from '../../../../intl/use-intl.js';
|
|
15
15
|
import { DynamicLoadingOverlay } from '../../../../loading/dynamic-loading-overlay.js';
|
|
16
|
+
import { PageLayout } from '../../../../page-layout/page-layout.js';
|
|
17
|
+
import { PageSection } from '../../../../sections/page-section/page-section.js';
|
|
16
18
|
import { useFetchOrders } from '../../../../shared/api/storefront/hooks/orders/use-fetch-orders.js';
|
|
17
19
|
import { orderStatuses } from '../../../../shared/api/storefront/model/storefront.model.js';
|
|
18
|
-
import { DefaultErrorView } from '../../../../shared/error/default-error-view.js';
|
|
19
20
|
import { usePaths } from '../../../../shared/routing/use-paths.js';
|
|
20
21
|
import { scrollIntoViewRef } from '../../../../shared/utils/scrolling.js';
|
|
21
22
|
import { DataTable } from '../../../../table/data-table.js';
|
|
22
|
-
import {
|
|
23
|
-
import { MySonicLayoutPage } from '../../layouts/my-sonic-layout/my-sonic-layout-page.js';
|
|
23
|
+
import { ConnectedMySonicNavigation } from '../../navigation/connected-my-sonic-navigation.js';
|
|
24
24
|
import styles from './order-history-page.module.css.js';
|
|
25
25
|
|
|
26
26
|
const dateOptions = {
|
|
@@ -30,9 +30,9 @@ const dateOptions = {
|
|
|
30
30
|
};
|
|
31
31
|
function OrderHistoryPage() {
|
|
32
32
|
const t = useFormattedMessage();
|
|
33
|
+
const paths = usePaths();
|
|
33
34
|
const { cultureCode } = useIntl();
|
|
34
35
|
const orderHistoryRef = useRef(null);
|
|
35
|
-
const paths = usePaths();
|
|
36
36
|
const [status, setStatus] = useState();
|
|
37
37
|
const [search, setSearch] = useState('');
|
|
38
38
|
const [sort, setSort] = useState({
|
|
@@ -40,7 +40,7 @@ function OrderHistoryPage() {
|
|
|
40
40
|
order: 'DESC',
|
|
41
41
|
});
|
|
42
42
|
const [page, setPage] = useState(1);
|
|
43
|
-
const { data,
|
|
43
|
+
const { data, isFetching } = useFetchOrders({
|
|
44
44
|
// Forces Optimizely to return orders for all ShipTo addresses instead of
|
|
45
45
|
// only those without a customer sequence.
|
|
46
46
|
customerSequence: '-1',
|
|
@@ -50,11 +50,16 @@ function OrderHistoryPage() {
|
|
|
50
50
|
sort,
|
|
51
51
|
status,
|
|
52
52
|
});
|
|
53
|
+
const title = t('Order history');
|
|
54
|
+
const breadcrumb = (jsx(Breadcrumb, { links: [
|
|
55
|
+
{ href: paths.HOME, label: t('Home') },
|
|
56
|
+
{ href: paths.MY_SONIC, label: t('My Sonic') },
|
|
57
|
+
{ href: paths.ACCOUNT_ORDERS, label: t('Orders') },
|
|
58
|
+
] }));
|
|
59
|
+
const aside = jsx(ConnectedMySonicNavigation, {});
|
|
53
60
|
useEffect(() => {
|
|
54
61
|
scrollIntoViewRef(orderHistoryRef);
|
|
55
62
|
}, [page]);
|
|
56
|
-
if (error)
|
|
57
|
-
return (jsx(MySonicLayoutPage, { "data-test-selector": "order-history", title: t('Order history'), children: jsx(DefaultErrorView, { error: error, title: "" }) }));
|
|
58
63
|
const { orders, pagination } = data ?? {
|
|
59
64
|
orders: [],
|
|
60
65
|
pagination: {},
|
|
@@ -75,122 +80,113 @@ function OrderHistoryPage() {
|
|
|
75
80
|
...options,
|
|
76
81
|
[status]: t(`orderStatus.${status}`),
|
|
77
82
|
}), { any: t('orderStatus.Any') });
|
|
78
|
-
return (jsx(
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
},
|
|
86
|
-
], columns: [
|
|
87
|
-
{
|
|
88
|
-
header: {
|
|
89
|
-
label: 'orderProperty.Number',
|
|
90
|
-
},
|
|
91
|
-
key: 'webOrderNumber',
|
|
92
|
-
props: {
|
|
93
|
-
cssColumn: 'minmax(15ch, min-content)',
|
|
94
|
-
nowrap: true,
|
|
95
|
-
sticky: true,
|
|
96
|
-
},
|
|
97
|
-
sort: { direction: 'DESC', isEnabled: true },
|
|
98
|
-
value: {
|
|
99
|
-
render: order => (jsx(Link, { hasUnderline: true, color: "secondary", "data-test-selector": "order-history-ordernumber-link", href: `${paths.ACCOUNT_ORDERS}/${order.webOrderNumber}?returnUrl=${encodeURIComponent(`${paths.ACCOUNT_ORDERS}`)}`, children: order.webOrderNumber })),
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
header: { label: 'orderProperty.Date' },
|
|
104
|
-
key: 'orderDate',
|
|
105
|
-
props: {
|
|
106
|
-
cssColumn: 'minmax(13ch, min-content)',
|
|
107
|
-
nowrap: true,
|
|
108
|
-
},
|
|
109
|
-
sort: { isEnabled: true },
|
|
110
|
-
value: {
|
|
111
|
-
render: order => (jsx(FormattedDate, { date: order.orderDate, options: dateOptions })),
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
header: { label: 'orderProperty.Price' },
|
|
116
|
-
key: 'orderTotal',
|
|
117
|
-
props: {
|
|
118
|
-
align: 'end',
|
|
119
|
-
cssColumn: 'minmax(12ch, min-content)',
|
|
120
|
-
nowrap: true,
|
|
121
|
-
},
|
|
122
|
-
sort: {
|
|
123
|
-
columnName: 'orderTotal',
|
|
124
|
-
isEnabled: true,
|
|
125
|
-
},
|
|
126
|
-
value: {
|
|
127
|
-
render: order => (jsx(Price, { currencyCode: order.currencyCode, locale: cultureCode, price: order.orderTotal })),
|
|
83
|
+
return (jsx(PageLayout, { aside: aside, breadcrumb: breadcrumb, "data-test-selector": "order-history-page", title: title, type: "account", children: jsx(PageSection, { as: "div", children: jsxs("section", { ref: orderHistoryRef, className: styles['order-history'], children: [jsx("div", { className: styles['search'], children: jsx(SearchField, { isDebounced: true, "data-test-selector": "order-history-search", label: t('Search orders'), onChange: searchOrders, placeholder: t('Search orders'), showLabel: false, variant: "outline" }) }), jsx("div", { className: styles['filter'], children: jsx(SelectField, { "data-test-selector": "order-history-filter", label: t('Filter order status'), onChange: filterOrders, options: filterOptions, selectedOption: status, showLabel: false }) }), jsx("div", { "aria-label": t('Results'), "aria-live": "polite", className: styles['results'], children: jsx(DynamicLoadingOverlay, { isLoading: isFetching, children: orders && orders.length > 0 ? (jsx(DataTable, { actions: [
|
|
84
|
+
{
|
|
85
|
+
'data-test-selector': 'order-history-reorder',
|
|
86
|
+
isPrimary: false,
|
|
87
|
+
key: 'reorder',
|
|
88
|
+
label: 'Reorder',
|
|
89
|
+
onAction: order => window?.alert(`Reorder ${order.id}`),
|
|
128
90
|
},
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
91
|
+
], columns: [
|
|
92
|
+
{
|
|
93
|
+
header: {
|
|
94
|
+
label: 'orderProperty.Number',
|
|
95
|
+
},
|
|
96
|
+
key: 'webOrderNumber',
|
|
97
|
+
props: {
|
|
98
|
+
cssColumn: 'minmax(15ch, min-content)',
|
|
99
|
+
nowrap: true,
|
|
100
|
+
sticky: true,
|
|
101
|
+
},
|
|
102
|
+
sort: { direction: 'DESC', isEnabled: true },
|
|
103
|
+
value: {
|
|
104
|
+
render: order => (jsx(Link, { hasUnderline: true, color: "secondary", "data-test-selector": "order-history-ordernumber-link", href: `${paths.ACCOUNT_ORDERS}/${order.webOrderNumber}?returnUrl=${encodeURIComponent(`${paths.ACCOUNT_ORDERS}`)}`, children: order.webOrderNumber })),
|
|
105
|
+
},
|
|
136
106
|
},
|
|
137
|
-
|
|
138
|
-
|
|
107
|
+
{
|
|
108
|
+
header: { label: 'orderProperty.Date' },
|
|
109
|
+
key: 'orderDate',
|
|
110
|
+
props: {
|
|
111
|
+
cssColumn: 'minmax(13ch, min-content)',
|
|
112
|
+
nowrap: true,
|
|
113
|
+
},
|
|
114
|
+
sort: { isEnabled: true },
|
|
115
|
+
value: {
|
|
116
|
+
render: order => (jsx(FormattedDate, { date: order.orderDate, options: dateOptions })),
|
|
117
|
+
},
|
|
139
118
|
},
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
119
|
+
{
|
|
120
|
+
header: { label: 'orderProperty.Price' },
|
|
121
|
+
key: 'orderTotal',
|
|
122
|
+
props: {
|
|
123
|
+
align: 'end',
|
|
124
|
+
cssColumn: 'minmax(12ch, min-content)',
|
|
125
|
+
nowrap: true,
|
|
126
|
+
},
|
|
127
|
+
sort: {
|
|
128
|
+
columnName: 'orderTotal',
|
|
129
|
+
isEnabled: true,
|
|
130
|
+
},
|
|
131
|
+
value: {
|
|
132
|
+
render: order => (jsx(Price, { currencyCode: order.currencyCode, locale: cultureCode, price: order.orderTotal })),
|
|
133
|
+
},
|
|
148
134
|
},
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
135
|
+
{
|
|
136
|
+
header: { label: 'orderProperty.Status' },
|
|
137
|
+
key: 'status',
|
|
138
|
+
props: {
|
|
139
|
+
cssColumn: 'minmax(25ch, min-content)',
|
|
140
|
+
nowrap: true,
|
|
141
|
+
},
|
|
142
|
+
value: {
|
|
143
|
+
render: order => t(`orderStatus.${order.status}`),
|
|
144
|
+
},
|
|
156
145
|
},
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
146
|
+
{
|
|
147
|
+
header: { label: 'orderProperty.Shipping Address' },
|
|
148
|
+
key: 'address',
|
|
149
|
+
props: { cssColumn: 'minmax(25ch, 1fr)', truncated: 2 },
|
|
150
|
+
sort: { columnName: 'stAddress1', isEnabled: true },
|
|
151
|
+
value: {
|
|
152
|
+
render: row => `${row.stAddress1} ${row.shipToPostalCode} ${row.shipToCity} ${row.stCountry.toUpperCase()}`,
|
|
153
|
+
},
|
|
164
154
|
},
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
155
|
+
{
|
|
156
|
+
header: { label: 'orderProperty.PO Number' },
|
|
157
|
+
key: 'customerPO',
|
|
158
|
+
props: {
|
|
159
|
+
cssColumn: 'minmax(17ch, min-content)',
|
|
160
|
+
truncated: 1,
|
|
161
|
+
},
|
|
162
|
+
sort: { isEnabled: true },
|
|
163
|
+
value: { propertyName: 'customerPO' },
|
|
170
164
|
},
|
|
171
|
-
|
|
172
|
-
|
|
165
|
+
{
|
|
166
|
+
header: {
|
|
167
|
+
Icon: SolidCartIcon,
|
|
168
|
+
label: 'Reorder',
|
|
169
|
+
},
|
|
170
|
+
key: 'reorder',
|
|
171
|
+
props: {
|
|
172
|
+
align: 'center',
|
|
173
|
+
'data-test-selector': 'reorderButton',
|
|
174
|
+
nowrap: true,
|
|
175
|
+
},
|
|
176
|
+
value: {
|
|
177
|
+
render: order => (jsx(Link, { hasUnderline: true, color: "secondary", "data-test-selector": "order-history-reorder-link", href: `${paths.ACCOUNT_ORDERS}/${order.webOrderNumber}?returnUrl=${encodeURIComponent(`${paths.ACCOUNT_ORDERS}`)}`, children: jsx(FormattedMessage, { id: "Reorder" }) })),
|
|
178
|
+
},
|
|
173
179
|
},
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
'data-test-selector
|
|
184
|
-
} })) : (!isFetching && (jsx("p", { className: styles['no-results'], children: t('No orders found.') }))) }) }), orders && orders.length > 0 && (jsx("nav", { className: styles['paging'], children: jsx(Pagination, { currentPage: pagination?.currentPage || 1, "data-test-selector": "order-history-pagination", onChange: page => setPage(page), totalPages: pagination?.numberOfPages || 1 }) })), jsx("div", { className: styles['sticky-bar'], role: "presentation" })] }) }));
|
|
185
|
-
}
|
|
186
|
-
function OrderHistoryPageBreadcrumb() {
|
|
187
|
-
const t = useFormattedMessage();
|
|
188
|
-
const paths = usePaths();
|
|
189
|
-
return (jsx(MySonicLayoutBreadcrumb, { children: jsx(Breadcrumb, { links: [
|
|
190
|
-
{ href: paths.HOME, label: t('Home') },
|
|
191
|
-
{ href: paths.MY_SONIC, label: t('My Sonic') },
|
|
192
|
-
{ href: paths.ACCOUNT_ORDERS, label: t('Orders') },
|
|
193
|
-
] }) }));
|
|
180
|
+
], data: orders, onSort: (key, direction) => {
|
|
181
|
+
if (direction === 'NONE')
|
|
182
|
+
return;
|
|
183
|
+
setSort({
|
|
184
|
+
name: key,
|
|
185
|
+
order: direction,
|
|
186
|
+
});
|
|
187
|
+
}, row: {
|
|
188
|
+
'data-test-selector': (order, _) => `order-${order.id}`,
|
|
189
|
+
} })) : (!isFetching && (jsx("p", { className: styles['no-results'], children: t('No orders found.') }))) }) }), orders && orders.length > 0 && (jsx("nav", { className: styles['paging'], children: jsx(Pagination, { currentPage: pagination?.currentPage || 1, "data-test-selector": "order-history-pagination", onChange: page => setPage(page), totalPages: pagination?.numberOfPages || 1 }) })), jsx("div", { className: styles['sticky-bar'], role: "presentation" })] }) }) }));
|
|
194
190
|
}
|
|
195
191
|
|
|
196
|
-
export { OrderHistoryPage
|
|
192
|
+
export { OrderHistoryPage };
|
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { Breadcrumb } from '../../../../breadcrumbs/breadcrumb.js';
|
|
4
4
|
import { useFormattedMessage } from '../../../../intl/use-formatted-message.js';
|
|
5
|
+
import { PageLayout } from '../../../../page-layout/page-layout.js';
|
|
6
|
+
import { PageSection } from '../../../../sections/page-section/page-section.js';
|
|
5
7
|
import { usePaths } from '../../../../shared/routing/use-paths.js';
|
|
6
8
|
import { UploadOrder } from '../../actions/upload-order/upload-order.js';
|
|
7
|
-
import {
|
|
8
|
-
import { MySonicLayoutPage } from '../../layouts/my-sonic-layout/my-sonic-layout-page.js';
|
|
9
|
+
import { ConnectedMySonicNavigation } from '../../navigation/connected-my-sonic-navigation.js';
|
|
9
10
|
|
|
10
11
|
function UploadOrderPage({ templatePath }) {
|
|
11
|
-
const t = useFormattedMessage();
|
|
12
|
-
return (jsx(MySonicLayoutPage, { title: t('Upload order'), children: jsx(UploadOrder, { templatePath: templatePath }) }));
|
|
13
|
-
}
|
|
14
|
-
function UploadOrderPageBreadcrumb() {
|
|
15
12
|
const t = useFormattedMessage();
|
|
16
13
|
const paths = usePaths();
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
const title = t('Upload order');
|
|
15
|
+
const breadcrumb = (jsx(Breadcrumb, { links: [
|
|
16
|
+
{ href: paths.HOME, label: t('Home') },
|
|
17
|
+
{ href: paths.MY_SONIC, label: t('My Sonic') },
|
|
18
|
+
{ href: paths.UPLOAD_ORDER, label: t('Upload order') },
|
|
19
|
+
] }));
|
|
20
|
+
const aside = jsx(ConnectedMySonicNavigation, {});
|
|
21
|
+
return (jsx(PageLayout, { aside: aside, breadcrumb: breadcrumb, "data-test-selector": "upload-order-page", title: title, type: "account", children: jsx(PageSection, { as: "div", children: jsx(UploadOrder, { templatePath: templatePath }) }) }));
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
export { UploadOrderPage
|
|
24
|
+
export { UploadOrderPage };
|
|
@@ -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;
|