@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
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
interface PageLayoutBaseProps {
|
|
2
|
+
children: React.ReactNode;
|
|
3
|
+
className?: string;
|
|
4
|
+
'data-test-selector'?: string;
|
|
5
|
+
mirror?: boolean;
|
|
6
|
+
title: string;
|
|
7
|
+
titleHAlign?: 'start' | 'center';
|
|
8
|
+
titleHidden?: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface PageLayoutSlots {
|
|
11
|
+
aside?: React.ReactNode;
|
|
12
|
+
asideSticky?: boolean;
|
|
13
|
+
bgImageSrc?: string;
|
|
14
|
+
breadcrumb?: React.ReactNode;
|
|
15
|
+
header?: React.ReactNode;
|
|
16
|
+
hero?: React.ReactNode;
|
|
17
|
+
postAside?: React.ReactNode;
|
|
18
|
+
preAside?: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
interface AccountLayoutProps extends PageLayoutBaseProps, Pick<PageLayoutSlots, 'aside' | 'asideSticky' | 'breadcrumb' | 'postAside' | 'preAside'> {
|
|
21
|
+
type: 'account';
|
|
22
|
+
}
|
|
23
|
+
interface GatewayLayoutProps extends PageLayoutBaseProps, Pick<PageLayoutSlots, 'aside' | 'asideSticky' | 'bgImageSrc' | 'breadcrumb'> {
|
|
24
|
+
type: 'gateway';
|
|
25
|
+
}
|
|
26
|
+
interface CheckOutLayoutProps extends PageLayoutBaseProps, Pick<PageLayoutSlots, 'aside' | 'asideSticky' | 'breadcrumb' | 'postAside' | 'preAside'> {
|
|
27
|
+
type: 'check-out';
|
|
28
|
+
}
|
|
29
|
+
interface ContentLayoutProps extends PageLayoutBaseProps, Pick<PageLayoutSlots, 'breadcrumb' | 'hero' | 'postAside'> {
|
|
30
|
+
type?: 'default' | 'text-page';
|
|
31
|
+
}
|
|
32
|
+
interface DualColumnsLayoutProps extends PageLayoutBaseProps, Pick<PageLayoutSlots, 'aside' | 'breadcrumb' | 'hero' | 'postAside'> {
|
|
33
|
+
type: 'dual-columns' | 'dual-columns-wide';
|
|
34
|
+
}
|
|
35
|
+
interface HomepageLayoutProps extends PageLayoutBaseProps, Pick<PageLayoutSlots, 'hero' | 'postAside'> {
|
|
36
|
+
type: 'homepage';
|
|
37
|
+
}
|
|
38
|
+
interface ProductListingLayoutProps extends PageLayoutBaseProps, Pick<PageLayoutSlots, 'breadcrumb' | 'hero' | 'postAside' | 'preAside'> {
|
|
39
|
+
type: 'product-listing';
|
|
40
|
+
}
|
|
41
|
+
interface ProductDetailsLayoutProps extends PageLayoutBaseProps, Pick<PageLayoutSlots, 'aside' | 'asideSticky' | 'breadcrumb' | 'hero' | 'postAside' | 'header'> {
|
|
42
|
+
type: 'product-details';
|
|
43
|
+
}
|
|
44
|
+
interface UtilityLayoutProps extends PageLayoutBaseProps, Pick<PageLayoutSlots, 'postAside'> {
|
|
45
|
+
type: 'utility';
|
|
46
|
+
}
|
|
47
|
+
export type PageLayoutProps = AccountLayoutProps | GatewayLayoutProps | CheckOutLayoutProps | ContentLayoutProps | DualColumnsLayoutProps | HomepageLayoutProps | ProductListingLayoutProps | ProductDetailsLayoutProps | UtilityLayoutProps;
|
|
48
|
+
export type PageLayoutType = NonNullable<PageLayoutProps['type']>;
|
|
49
|
+
export type InternalPageLayoutProps = PageLayoutBaseProps & PageLayoutSlots & {
|
|
50
|
+
type?: PageLayoutType;
|
|
51
|
+
};
|
|
52
|
+
export {};
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useState, useMemo } from 'react';
|
|
4
4
|
import { FormattedMessage } from '../../../intl/formatted-message.js';
|
|
5
|
+
import { useFormattedMessage } from '../../../intl/use-formatted-message.js';
|
|
6
|
+
import { PageLayout } from '../../../page-layout/page-layout.js';
|
|
7
|
+
import { PageSection } from '../../../sections/page-section/page-section.js';
|
|
5
8
|
import { useFetchSession } from '../../../shared/api/storefront/hooks/authentication/use-fetch-session.js';
|
|
6
9
|
import { usePatchSession } from '../../../shared/api/storefront/hooks/authentication/use-patch-session.js';
|
|
7
10
|
import { UserNotFoundError, UnableToChangePasswordError } from '../../../shared/api/storefront/services/authentication-service.js';
|
|
@@ -9,14 +12,15 @@ import { useNavigate } from '../../../shared/routing/use-navigate.js';
|
|
|
9
12
|
import { usePaths } from '../../../shared/routing/use-paths.js';
|
|
10
13
|
import { useToast } from '../../../toast/use-toast.js';
|
|
11
14
|
import { ChangePasswordForm } from '../components/change-password-form/change-password-form.js';
|
|
12
|
-
import { SignInPageLayout } from '../layouts/sign-in-page-layout/sign-in-page-layout.js';
|
|
13
15
|
|
|
14
16
|
function ChangePasswordPage({ reset: isResettingPassword, resetToken, userId, }) {
|
|
15
17
|
const paths = usePaths();
|
|
18
|
+
const t = useFormattedMessage();
|
|
16
19
|
const { navigate } = useNavigate();
|
|
17
20
|
const [isSuccess, setIsSuccess] = useState(false);
|
|
18
21
|
const { data: session } = useFetchSession();
|
|
19
22
|
const { addToast } = useToast();
|
|
23
|
+
const bgImageSrc = 'https://res.cloudinary.com/dkz9eknwh/image/upload/w_1658,h_1008/v1740665245/images/sign-in-page.webp';
|
|
20
24
|
const { error: errorPatchSession, isLoading: isUpdating, mutate: patchSession, } = usePatchSession();
|
|
21
25
|
const handleSubmit = async ({ data }) => {
|
|
22
26
|
if (!resetToken || !userId)
|
|
@@ -51,7 +55,7 @@ function ChangePasswordPage({ reset: isResettingPassword, resetToken, userId, })
|
|
|
51
55
|
return 'Invalid Token';
|
|
52
56
|
return 'Unexpected error';
|
|
53
57
|
}, [errorPatchSession]);
|
|
54
|
-
return (jsx(
|
|
58
|
+
return (jsx(PageLayout, { bgImageSrc: bgImageSrc, "data-test-selector": "changeAccountPage", title: t('Change password'), type: "gateway", children: jsx(PageSection, { as: "div", children: !resetToken || !userId ? (jsx("p", { children: jsx(FormattedMessage, { id: "The link you used for resetting your password is invalid. Please, reset your password again, or contact Customer Support." }) })) : (jsx(ChangePasswordForm, { errorType: errorType, isDisabled: !session || isSuccess, isPendingChangingPassword: isUpdating, onSubmit: handleSubmit, username: undefined })) }) }));
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
export { ChangePasswordPage };
|
|
@@ -7,12 +7,10 @@ import { FormSegmentGroup } from '../../../../forms/layout/form/form-segment-gro
|
|
|
7
7
|
import { useFormattedMessage } from '../../../../intl/use-formatted-message.js';
|
|
8
8
|
import { DynamicLoadingOverlay } from '../../../../loading/dynamic-loading-overlay.js';
|
|
9
9
|
import { voidFunction } from '../../../../shared/model/defaults.js';
|
|
10
|
-
import { Heading } from '../../../../typography/heading/heading.js';
|
|
11
10
|
import { ChangePassword } from '../../../my-sonic/actions/change-password/change-password.js';
|
|
12
11
|
|
|
13
12
|
function ChangePasswordForm({ errorType, isDisabled: _isDisabled = false, isLoading = false, isPendingChangingPassword = false, onSubmit = voidFunction, }) {
|
|
14
13
|
const t = useFormattedMessage();
|
|
15
|
-
const title = t('Change password');
|
|
16
14
|
const isDisabled = isPendingChangingPassword || _isDisabled;
|
|
17
15
|
// form submit handler
|
|
18
16
|
const handleSubmit = ({ formData }) => {
|
|
@@ -39,11 +37,9 @@ function ChangePasswordForm({ errorType, isDisabled: _isDisabled = false, isLoad
|
|
|
39
37
|
return t('An unexpected error occured. Please try again.');
|
|
40
38
|
}
|
|
41
39
|
})(errorType);
|
|
42
|
-
// form header
|
|
43
|
-
const header = (jsx(Heading, { "data-test-selector": "pageTitle", italic: true, size: "m", tag: "h1", uppercase: true, children: title }));
|
|
44
40
|
// form footer
|
|
45
41
|
const footer = (jsx(FormSegment, { children: jsx(Button, { "data-test-selector": "changePassword_submit", isDisabled: isDisabled, isLoading: isPendingChangingPassword && t('Changing password…'), type: "submit", withArrow: true, children: t('Change password') }) }));
|
|
46
|
-
return (jsx(Form, { autoComplete: true, errorMessage: errorMessage, footer: footer,
|
|
42
|
+
return (jsx(Form, { autoComplete: true, errorMessage: errorMessage, footer: footer, onSubmit: handleSubmit, children: jsx(DynamicLoadingOverlay, { isLoading: isLoading, children: jsx(FormSegmentGroup, { children: jsx(ChangePassword, { isDisabled: isDisabled, requireCurrentPassword: false }) }) }) }));
|
|
47
43
|
}
|
|
48
44
|
|
|
49
45
|
export { ChangePasswordForm };
|
|
@@ -13,7 +13,6 @@ import { PasswordValidation } from '../../../../forms/partials/password-validati
|
|
|
13
13
|
import { isCountryCode } from '../../../../intl/types.js';
|
|
14
14
|
import { useFormattedMessage } from '../../../../intl/use-formatted-message.js';
|
|
15
15
|
import { validateEmail } from '../../../../shared/model/address.js';
|
|
16
|
-
import { Heading } from '../../../../typography/heading/heading.js';
|
|
17
16
|
import styles from './create-account-form.module.css.js';
|
|
18
17
|
|
|
19
18
|
function CreateAccountForm({ errorType, isDisabled: _isDisabled = false, isPendingCreateAccount, onSubmit, }) {
|
|
@@ -61,11 +60,9 @@ function CreateAccountForm({ errorType, isDisabled: _isDisabled = false, isPendi
|
|
|
61
60
|
},
|
|
62
61
|
});
|
|
63
62
|
};
|
|
64
|
-
// form header
|
|
65
|
-
const header = (jsx(Heading, { "data-test-selector": "pageTitle", italic: true, size: "m", tag: "h1", uppercase: true, children: title }));
|
|
66
63
|
// form footer
|
|
67
64
|
const footer = (jsx(FormSegment, { children: jsx(Button, { "data-test-selector": "createAccount_createButton", isDisabled: isDisabled, isLoading: isPendingCreateAccount && 'Creating account...', type: "submit", withArrow: true, children: t('Create account') }) }));
|
|
68
|
-
return (jsxs(Form, { "aria-label": title, autoComplete: true, className: styles['create-account-form'], errorMessage: errorType && errorMessages[errorType], footer: footer,
|
|
65
|
+
return (jsxs(Form, { "aria-label": title, autoComplete: true, className: styles['create-account-form'], errorMessage: errorType && errorMessages[errorType], footer: footer, onSubmit: handleSubmit, children: [jsxs(FormSegmentGroup, { children: [jsx(FormSegment, { children: jsx(TextField, { autoComplete: "username", "data-test-selector": "createAccount_email", inputMode: "email", isDisabled: isDisabled, isRequired: true, label: t('Email'), name: "email", type: "email", validate: value => {
|
|
69
66
|
if (!value)
|
|
70
67
|
return value;
|
|
71
68
|
return (validateEmail(value) || t('Please enter a valid email address'));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { Button } from '../../../../buttons/button/button.js';
|
|
4
4
|
import { Link } from '../../../../buttons/link/link.js';
|
|
5
5
|
import { PasswordField } from '../../../../forms/fields/password-field/password-field.js';
|
|
@@ -12,13 +12,11 @@ import { useFormattedMessage } from '../../../../intl/use-formatted-message.js';
|
|
|
12
12
|
import { DynamicLoadingOverlay } from '../../../../loading/dynamic-loading-overlay.js';
|
|
13
13
|
import { validateEmail } from '../../../../shared/model/address.js';
|
|
14
14
|
import { voidFunction } from '../../../../shared/model/defaults.js';
|
|
15
|
-
import { Heading } from '../../../../typography/heading/heading.js';
|
|
16
15
|
import styles from './sign-in-form.module.css.js';
|
|
17
16
|
|
|
18
17
|
const GUEST_SIGN_IN_BUTTON_NAME = 'guestSignin';
|
|
19
18
|
function SignInForm({ allowGuestSignIn = false, createAccountPath, errorType, initialEmail, initialRememberMe, isDisabled: _isDisabled = false, isLoading = false, isPendingGuestSignIn = false, isPendingUserSignIn = false, onRecoverPasswordDialogOpen = voidFunction, onSubmit = voidFunction, }) {
|
|
20
19
|
const t = useFormattedMessage();
|
|
21
|
-
const title = t('Sign in');
|
|
22
20
|
const isDisabled = isPendingUserSignIn || isPendingGuestSignIn || _isDisabled;
|
|
23
21
|
// form submit handler
|
|
24
22
|
const handleSubmit = ({ formData, submitter }) => {
|
|
@@ -62,11 +60,9 @@ function SignInForm({ allowGuestSignIn = false, createAccountPath, errorType, in
|
|
|
62
60
|
return t('An unexpected error occured. Please try again.');
|
|
63
61
|
}
|
|
64
62
|
})(errorType);
|
|
65
|
-
// form header
|
|
66
|
-
const header = (jsx(Heading, { "data-test-selector": "pageTitle", italic: true, size: "m", tag: "h1", uppercase: true, children: title }));
|
|
67
63
|
// form footer
|
|
68
64
|
const footer = (jsxs(Fragment, { children: [jsx(FormSegment, { isFloating: true, children: jsx(SwitchField, { defaultSelected: initialRememberMe, isDisabled: isDisabled, name: "rememberMe", value: "true", children: t('Remember me') }) }), jsx(FormSegment, { children: jsx(Button, { "data-test-selector": "signIn_submit", isDisabled: isDisabled, isLoading: isPendingUserSignIn && t('Signing in…'), type: "submit", withArrow: true, children: t('Sign in') }) }), jsxs(FormSegment, { children: [jsx("p", { className: styles['footer-options'], children: jsx(Link, { color: "primary", "data-test-selector": "signIn_forgotPassword", hasUnderline: true, isDisabled: isDisabled, onClick: onRecoverPasswordDialogOpen, children: t('Forgot password?') }) }), jsx("p", { className: styles['footer-options'], children: jsxs(Fragment, { children: [t('New user?'), ' ', jsx(Link, { "data-test-selector": "signInCreateNewAccount_createNewAccount", hasUnderline: true, href: createAccountPath, isDisabled: isDisabled, children: t('Create account') })] }) })] }), allowGuestSignIn && (jsx(FormSegment, { children: jsx(Button, { color: "secondary", "data-test-selector": "continueAsGuest", isDisabled: isDisabled, isLoading: isPendingGuestSignIn && t('Signing in…'), isValidating: false, name: GUEST_SIGN_IN_BUTTON_NAME, type: "submit", value: "true", variant: "outline", children: t('Or continue as guest') }) }))] }));
|
|
69
|
-
return (jsx(Form, { autoComplete: true, className: styles['sign-in-form'], errorMessage: errorMessage, footer: footer,
|
|
65
|
+
return (jsx(Form, { autoComplete: true, className: styles['sign-in-form'], errorMessage: errorMessage, footer: footer, onSubmit: handleSubmit, children: jsx(DynamicLoadingOverlay, { isLoading: isLoading, children: jsxs(FormSegmentGroup, { children: [jsx(FormSegment, { children: jsx(TextField, { autoComplete: "username", "data-test-selector": "signIn_userName", defaultValue: initialEmail, inputMode: "email", isDisabled: isDisabled, isRequired: true, label: t('Email'), name: "email", showLabel: true, type: "email", validate: value => {
|
|
70
66
|
if (!value)
|
|
71
67
|
return value;
|
|
72
68
|
return (validateEmail(value) ||
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx, jsxs
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
import { Button } from '../../../buttons/button/button.js';
|
|
5
5
|
import { FormattedMessage } from '../../../intl/formatted-message.js';
|
|
6
|
+
import { useFormattedMessage } from '../../../intl/use-formatted-message.js';
|
|
6
7
|
import { Dialog } from '../../../modals/dialog/dialog.js';
|
|
8
|
+
import { PageLayout } from '../../../page-layout/page-layout.js';
|
|
9
|
+
import { PageSection } from '../../../sections/page-section/page-section.js';
|
|
7
10
|
import { useCreateAccount } from '../../../shared/api/storefront/hooks/account/use-create-account.js';
|
|
8
11
|
import { useFetchSession } from '../../../shared/api/storefront/hooks/authentication/use-fetch-session.js';
|
|
9
12
|
import { ExistingAccountError } from '../../../shared/api/storefront/services/account-service.js';
|
|
@@ -11,12 +14,13 @@ import { useNavigate } from '../../../shared/routing/use-navigate.js';
|
|
|
11
14
|
import { usePaths } from '../../../shared/routing/use-paths.js';
|
|
12
15
|
import { LoadingPage } from '../../loading-page/loading-page.js';
|
|
13
16
|
import { CreateAccountForm } from '../components/create-account-form/create-account-form.js';
|
|
14
|
-
import { SignInPageLayout } from '../layouts/sign-in-page-layout/sign-in-page-layout.js';
|
|
15
17
|
|
|
16
|
-
function CreateAccountPage({ returnUrl }
|
|
18
|
+
function CreateAccountPage({ returnUrl }) {
|
|
19
|
+
const t = useFormattedMessage();
|
|
17
20
|
const paths = usePaths();
|
|
18
21
|
const { navigate } = useNavigate();
|
|
19
22
|
const { data: session, isLoading: isLoadingSession } = useFetchSession();
|
|
23
|
+
const bgImageSrc = 'https://res.cloudinary.com/dkz9eknwh/image/upload/w_1658,h_1008/v1740665245/images/sign-in-page.webp';
|
|
20
24
|
const { error: errorCreateAccount, isPending: isPendingCreateAccount, isSuccess, mutate: createAccount, } = useCreateAccount();
|
|
21
25
|
const isExistingAccount = errorCreateAccount instanceof ExistingAccountError;
|
|
22
26
|
const isDisabled = isSuccess || isExistingAccount;
|
|
@@ -45,7 +49,7 @@ function CreateAccountPage({ returnUrl } = {}) {
|
|
|
45
49
|
navigate(continuePath, { reload: true });
|
|
46
50
|
return;
|
|
47
51
|
}
|
|
48
|
-
return (jsxs(
|
|
52
|
+
return (jsxs(PageLayout, { bgImageSrc: bgImageSrc, "data-test-selector": "createAccountPage", title: t('Create account'), type: "gateway", children: [jsx(PageSection, { as: "div", children: jsx(CreateAccountForm, { errorType: errorType, isDisabled: isDisabled, isPendingCreateAccount: isPendingCreateAccount, onSubmit: onSubmit }) }), jsx(Dialog, { footer: jsx(Button, { color: "primary", href: continuePath, route: { reload: true }, size: "md", withArrow: true, children: jsx(FormattedMessage, { id: "Continue" }) }), hasCloseButton: false, isDismissable: false, isKeyboardDismissDisabled: true, isOpen: isSuccess && !isReturnToShipping, title: "Account created", children: jsx("p", { children: jsx(FormattedMessage, { id: "Your new Sonic Equipment account was succesfully created. You should receive an email soon with further instructions on how to activate this account. If you do not receive this email, please contact Customer Support." }) }) }), jsx(Dialog, { footer: jsx(Button, { color: "primary", href: `${paths.SIGN_IN}${returnUrl ? `?returnUrl=${continuePath}` : ''}`, route: { reload: true }, size: "md", withArrow: true, children: jsx(FormattedMessage, { id: "Continue to sign in" }) }), hasCloseButton: false, isDismissable: false, isKeyboardDismissDisabled: true, isOpen: isExistingAccount, title: "Existing account", children: jsx("p", { children: jsx(FormattedMessage, { id: "The email address you entered is already associated with an existing account. Please sign in to this account or contact Customer Support." }) }) })] }));
|
|
49
53
|
}
|
|
50
54
|
|
|
51
55
|
export { CreateAccountPage };
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs,
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useState, useMemo } from 'react';
|
|
4
4
|
import { FormattedMessage } from '../../../intl/formatted-message.js';
|
|
5
5
|
import { useFormattedMessage } from '../../../intl/use-formatted-message.js';
|
|
6
6
|
import { RecoverPasswordDialog } from '../../../modals/recover-password/recover-password-dialog.js';
|
|
7
|
+
import { PageLayout } from '../../../page-layout/page-layout.js';
|
|
8
|
+
import { PageSection } from '../../../sections/page-section/page-section.js';
|
|
7
9
|
import { useCreateGuestAccount } from '../../../shared/api/storefront/hooks/account/use-create-guest-account.js';
|
|
8
10
|
import { useFetchSession } from '../../../shared/api/storefront/hooks/authentication/use-fetch-session.js';
|
|
9
11
|
import { usePatchSession } from '../../../shared/api/storefront/hooks/authentication/use-patch-session.js';
|
|
@@ -16,9 +18,8 @@ import { usePaths } from '../../../shared/routing/use-paths.js';
|
|
|
16
18
|
import { useToast } from '../../../toast/use-toast.js';
|
|
17
19
|
import { ChangePasswordDialog } from '../../my-sonic/actions/change-password/change-password-dialog.js';
|
|
18
20
|
import { SignInForm } from '../components/sign-in-form/sign-in-form.js';
|
|
19
|
-
import { SignInPageLayout } from '../layouts/sign-in-page-layout/sign-in-page-layout.js';
|
|
20
21
|
|
|
21
|
-
function SignInPage({ onSuccess, returnUrl, }
|
|
22
|
+
function SignInPage({ onSuccess, returnUrl, }) {
|
|
22
23
|
const paths = usePaths();
|
|
23
24
|
const { navigate } = useNavigate();
|
|
24
25
|
const [userName, setUserName] = useState();
|
|
@@ -29,6 +30,7 @@ function SignInPage({ onSuccess, returnUrl, } = {}) {
|
|
|
29
30
|
const { data: session, isLoading } = useFetchSession();
|
|
30
31
|
const t = useFormattedMessage();
|
|
31
32
|
const { addToast } = useToast();
|
|
33
|
+
const bgImageSrc = 'https://res.cloudinary.com/dkz9eknwh/image/upload/w_1658,h_1008/v1740665245/images/sign-in-page.webp';
|
|
32
34
|
/* Sign in */
|
|
33
35
|
const { error: errorSignIn, isPending: isPendingSignIn, mutate: signIn, reset: resetSignIn, } = useSignIn();
|
|
34
36
|
const { error: errorCreateGuest, isPending: isPendingCreateGuest, mutate: createGuest, reset: resetCreateGuest, } = useCreateGuestAccount();
|
|
@@ -100,7 +102,7 @@ function SignInPage({ onSuccess, returnUrl, } = {}) {
|
|
|
100
102
|
userName: userName || '',
|
|
101
103
|
}, { onSuccess: onSignInSuccess });
|
|
102
104
|
};
|
|
103
|
-
return (jsxs(
|
|
105
|
+
return (jsxs(PageLayout, { bgImageSrc: bgImageSrc, "data-test-selector": "signInPage", title: t('Sign in'), type: "gateway", children: [jsx(PageSection, { as: "div", children: jsx(SignInForm, { allowGuestSignIn: allowGuestSignIn, createAccountPath: createAccountPath, errorType: signInErrorType, initialEmail: session?.isGuest ? '' : session?.email, initialRememberMe: session?.rememberMe, isDisabled: !session || isSuccess, isLoading: isLoading, isPendingGuestSignIn: isPendingCreateGuest, isPendingUserSignIn: isPendingSignIn, onRecoverPasswordDialogOpen: () => setRecoverPasswordDialogOpen(true), onSubmit: onSignIn }) }), jsx(RecoverPasswordDialog, { isOpen: isRecoverPasswordDialogOpen, onOpenChange: isOpen => setRecoverPasswordDialogOpen(isOpen) }), jsx(ChangePasswordDialog, { allowClose: true, error: errorChangePassword, informationalText: t('You are required to change your password and then sign in again, using your new credentials.'), isOpen: isChangePasswordDialogOpen, isUpdating: isSessionUpdating, onClose: () => setChangePasswordDialogOpen(false), onPasswordChanged: onChangePassword, userName: userName })] }));
|
|
104
106
|
}
|
|
105
107
|
|
|
106
108
|
export { SignInPage };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function CartPage(): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export declare function CartPage(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { Breadcrumb } from '../../../breadcrumbs/breadcrumb.js';
|
|
3
4
|
import { Button } from '../../../buttons/button/button.js';
|
|
4
5
|
import { ConnectedOrderLineCard } from '../../../cards/orderline-card/connected-orderline-card.js';
|
|
5
6
|
import { CartTotals } from '../../../cart-totals/cart-totals.js';
|
|
6
|
-
import { CartTotalsSummary } from '../../../cart-totals/cart-totals-summary.js';
|
|
7
7
|
import { FormattedMessage } from '../../../intl/formatted-message.js';
|
|
8
8
|
import { useFormattedMessage } from '../../../intl/use-formatted-message.js';
|
|
9
9
|
import { OrderLineList } from '../../../lists/orderline-list/orderline-list.js';
|
|
10
|
-
import {
|
|
11
|
-
import { Page } from '../../components/page/page.js';
|
|
10
|
+
import { PageLayout } from '../../../page-layout/page-layout.js';
|
|
12
11
|
import { ErrorPage } from '../../error-page/error-page.js';
|
|
13
12
|
import { LoadingPage } from '../../loading-page/loading-page.js';
|
|
13
|
+
import { PageSection } from '../../../sections/page-section/page-section.js';
|
|
14
14
|
import { useDeleteCartLineById } from '../../../shared/api/storefront/hooks/cart/use-delete-cart-line-by-id.js';
|
|
15
15
|
import { useDeleteCurrentCart } from '../../../shared/api/storefront/hooks/cart/use-delete-current-cart.js';
|
|
16
16
|
import { useFetchCurrentCartLinesWithAtp } from '../../../shared/api/storefront/hooks/cart/use-fetch-current-cart-lines-with-atp.js';
|
|
@@ -19,28 +19,14 @@ import { getCurrencyCodeBySymbol } from '../../../shared/model/currency.js';
|
|
|
19
19
|
import { usePaths } from '../../../shared/routing/use-paths.js';
|
|
20
20
|
import { ensureNumber } from '../../../shared/utils/number.js';
|
|
21
21
|
import { useToast } from '../../../toast/use-toast.js';
|
|
22
|
-
import {
|
|
22
|
+
import { NoResults } from '../../product/product-listing-page/no-results/no-results.js';
|
|
23
23
|
|
|
24
|
-
function
|
|
25
|
-
const paths = usePaths();
|
|
24
|
+
function CartPage() {
|
|
26
25
|
const { addToast } = useToast();
|
|
27
26
|
const { data: currentCart } = useFetchCurrentCartWithAtp();
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
// body: <FormattedMessage id="Unable to save cart for later." />,
|
|
32
|
-
// isUserDismissable: false,
|
|
33
|
-
// messageType: 'danger',
|
|
34
|
-
// })
|
|
35
|
-
// },
|
|
36
|
-
// onSuccess: () => {
|
|
37
|
-
// addToast({
|
|
38
|
-
// body: <FormattedMessage id="Saved cart for later." />,
|
|
39
|
-
// isUserDismissable: false,
|
|
40
|
-
// messageType: 'success',
|
|
41
|
-
// })
|
|
42
|
-
// },
|
|
43
|
-
// })
|
|
27
|
+
const paths = usePaths();
|
|
28
|
+
const t = useFormattedMessage();
|
|
29
|
+
const { data: cartLines, error, isLoading, } = useFetchCurrentCartLinesWithAtp();
|
|
44
30
|
const deleteCurrentCart = useDeleteCurrentCart({
|
|
45
31
|
onError: () => {
|
|
46
32
|
addToast({
|
|
@@ -73,61 +59,42 @@ function CartContent({ cartLines }) {
|
|
|
73
59
|
});
|
|
74
60
|
},
|
|
75
61
|
});
|
|
76
|
-
// const isAuthenticated = useIsAuthenticated()
|
|
77
62
|
if (!currentCart)
|
|
78
|
-
return null;
|
|
63
|
+
return null; // ????
|
|
79
64
|
const currencyCode = getCurrencyCodeBySymbol(currentCart.currencySymbol);
|
|
80
65
|
if (!currencyCode)
|
|
81
66
|
throw new Error(`Currency code not found for symbol ${currentCart.currencySymbol}`);
|
|
82
|
-
return (jsx(CheckoutPageLayout, { actions: {
|
|
83
|
-
primary: (jsx(Button, { withArrow: true, "data-test-selector": "checkoutShippingCartTotalContinueButton", href: paths.CHECKOUT_SHIPPING, children: jsx(FormattedMessage, { id: "Start checkout" }) })),
|
|
84
|
-
// secondary: isAuthenticated ? (
|
|
85
|
-
// <Button
|
|
86
|
-
// color="secondary"
|
|
87
|
-
// data-test-selector="saveCartForLaterButton"
|
|
88
|
-
// onClick={() => {
|
|
89
|
-
// saveCartForLater.mutate({ cart: currentCart })
|
|
90
|
-
// }}
|
|
91
|
-
// variant="outline">
|
|
92
|
-
// <FormattedMessage id="Save order" />
|
|
93
|
-
// </Button>
|
|
94
|
-
// ) : (
|
|
95
|
-
// <Button
|
|
96
|
-
// color="secondary"
|
|
97
|
-
// data-test-selector="saveCartForLaterButton"
|
|
98
|
-
// href={paths.SIGN_IN}
|
|
99
|
-
// variant="outline">
|
|
100
|
-
// <FormattedMessage id="Save order" />
|
|
101
|
-
// </Button>
|
|
102
|
-
// ),
|
|
103
|
-
}, mobileSummary: jsx(CartTotalsSummary, { currencyCode: currencyCode, totalAmount: currentCart.orderGrandTotal }), overview: jsx(CartTotals, { currencyCode: currencyCode, shippingCost: currentCart.shippingAndHandling, subtotal: currentCart.orderSubTotal, tax: currentCart.totalTax, total: currentCart.orderGrandTotal, vatPercentage: cartLines[0]?.pricing?.vatRate || 0 }), children: jsx(OrderLineList, { onRemoveAll: () => deleteCurrentCart.mutate(), children: cartLines.map(cartLine => (jsx(ConnectedOrderLineCard, { deliveryDate: cartLine.atp?.date ?? null, href: cartLine.productUri, image: {
|
|
104
|
-
fit: 'contain',
|
|
105
|
-
image: {
|
|
106
|
-
'1': cartLine.smallImagePath,
|
|
107
|
-
'2': cartLine.smallImagePath,
|
|
108
|
-
'3': cartLine.smallImagePath,
|
|
109
|
-
altText: cartLine.altText,
|
|
110
|
-
},
|
|
111
|
-
title: cartLine.altText,
|
|
112
|
-
}, isReadonly: false, onRemove: () => deleteCartLine.mutate({ cartLineId: cartLine.id }), orderLineId: cartLine.id, price: {
|
|
113
|
-
currencyCode,
|
|
114
|
-
originalTotalPrice: ensureNumber(cartLine.properties.totalListPrice),
|
|
115
|
-
pricePerUnit: cartLine.pricing?.unitNetPrice || 0,
|
|
116
|
-
totalPrice: cartLine.pricing?.extendedUnitNetPrice || 0,
|
|
117
|
-
}, productId: cartLine.productId || '', sku: cartLine.erpNumber || '', tags: [cartLine.properties.label].filter(Boolean), title: cartLine.shortDescription }, cartLine.id))) }) }));
|
|
118
|
-
}
|
|
119
|
-
function CartPage() {
|
|
120
|
-
const paths = usePaths();
|
|
121
|
-
const t = useFormattedMessage();
|
|
122
|
-
const { data: cartLines, error, isLoading, } = useFetchCurrentCartLinesWithAtp();
|
|
123
67
|
if (error)
|
|
124
68
|
return jsx(ErrorPage, { error: error });
|
|
125
69
|
if (isLoading)
|
|
126
70
|
return jsx(LoadingPage, {});
|
|
127
|
-
|
|
71
|
+
const pageLayoutType = cartLines?.length ? 'check-out' : 'utility';
|
|
72
|
+
const pageTitle = t('Shopping cart');
|
|
73
|
+
const pageTitleHidden = !cartLines?.length;
|
|
74
|
+
const breadcrumb = (jsx(Breadcrumb, { links: [
|
|
128
75
|
{ href: paths.HOME, label: 'home' },
|
|
129
76
|
{ href: paths.CART, label: t('Cart') },
|
|
130
|
-
]
|
|
77
|
+
] }));
|
|
78
|
+
const aside = cartLines?.length ? (jsx(PageSection, { children: jsx(CartTotals, { actions: jsx(Fragment, { children: jsx(Button, { withArrow: true, "data-test-selector": "checkoutShippingCartTotalContinueButton", href: paths.CHECKOUT_SHIPPING, children: jsx(FormattedMessage, { id: "Start checkout" }) }) }), currencyCode: currencyCode, shippingCost: currentCart.shippingAndHandling, subtotal: currentCart.orderSubTotal, tax: currentCart.totalTax, total: currentCart.orderGrandTotal, vatPercentage: cartLines[0]?.pricing?.vatRate || 0 }) })) : null;
|
|
79
|
+
return (jsx(PageLayout, { asideSticky: true, aside: aside, breadcrumb: cartLines?.length ? breadcrumb : null, "data-test-selector": "cartPage", title: pageTitle, titleHidden: pageTitleHidden, type: pageLayoutType, children: cartLines?.length ? (
|
|
80
|
+
// Filled cart
|
|
81
|
+
jsx(PageSection, { children: jsx(OrderLineList, { onRemoveAll: () => deleteCurrentCart.mutate(), children: cartLines.map(cartLine => (jsx(ConnectedOrderLineCard, { deliveryDate: cartLine.atp?.date ?? null, href: cartLine.productUri, image: {
|
|
82
|
+
fit: 'contain',
|
|
83
|
+
image: {
|
|
84
|
+
'1': cartLine.smallImagePath,
|
|
85
|
+
'2': cartLine.smallImagePath,
|
|
86
|
+
'3': cartLine.smallImagePath,
|
|
87
|
+
altText: cartLine.altText,
|
|
88
|
+
},
|
|
89
|
+
title: cartLine.altText,
|
|
90
|
+
}, isReadonly: false, onRemove: () => deleteCartLine.mutate({ cartLineId: cartLine.id }), orderLineId: cartLine.id, price: {
|
|
91
|
+
currencyCode,
|
|
92
|
+
originalTotalPrice: ensureNumber(cartLine.properties.totalListPrice),
|
|
93
|
+
pricePerUnit: cartLine.pricing?.unitNetPrice || 0,
|
|
94
|
+
totalPrice: cartLine.pricing?.extendedUnitNetPrice || 0,
|
|
95
|
+
}, productId: cartLine.productId || '', sku: cartLine.erpNumber || '', tags: [cartLine.properties.label].filter(Boolean), title: cartLine.shortDescription }, cartLine.id))) }) })) : (
|
|
96
|
+
// Empty cart
|
|
97
|
+
jsx(PageSection, { as: "article", children: jsxs(NoResults, { title: t('Your shopping cart is still empty'), children: [jsx("p", { children: jsx(FormattedMessage, { id: "There are no products in your shopping cart." }) }), jsx("p", { children: jsx(FormattedMessage, { id: "Click the button below to continue shopping." }) })] }) })) }));
|
|
131
98
|
}
|
|
132
99
|
|
|
133
100
|
export { CartPage };
|
|
@@ -7,7 +7,7 @@ import styles from './billing-and-invoice-information.module.css.js';
|
|
|
7
7
|
|
|
8
8
|
function BillingAndInvoiceInformation({ billToAddress, shipToAddress, }) {
|
|
9
9
|
const t = useFormattedMessage();
|
|
10
|
-
return (jsxs("div", { className: styles['billing-and-invoice-information'], children: [billToAddress && (jsx("section", {
|
|
10
|
+
return (jsxs("div", { className: styles['billing-and-invoice-information'], children: [billToAddress && (jsx("section", { children: jsx(InfoDisplay, { id: "billing-address", label: t('Billing address'), value: jsx(AddressInfoDisplay, { address: billToAddress, "data-test-selector": "orderConfirmationBillingInformation" }) }) })), shipToAddress && (jsx("section", { children: jsx(InfoDisplay, { id: "shipping-address", label: t('Shipping address'), value: jsx(AddressInfoDisplay, { address: shipToAddress, "data-test-selector": "orderConfirmationShippingInformation" }) }) }))] }));
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export { BillingAndInvoiceInformation };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var styles = {"billing-and-invoice-information":"billing-and-invoice-information-module-FXmcK"
|
|
1
|
+
var styles = {"billing-and-invoice-information":"billing-and-invoice-information-module-FXmcK"};
|
|
2
2
|
|
|
3
3
|
export { styles as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { HeadingProps } from '
|
|
2
|
+
import { HeadingProps } from '../../../typography/heading/heading';
|
|
3
3
|
export interface CheckoutPageSectionHeaderProps {
|
|
4
4
|
size?: HeadingProps['size'];
|
|
5
5
|
tag?: HeadingProps['tag'];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { Heading } from '
|
|
3
|
+
import { Heading } from '../../../typography/heading/heading.js';
|
|
4
4
|
import styles from './checkout-page-section.module.css.js';
|
|
5
5
|
|
|
6
6
|
function CheckoutPageSectionHeader({ size = 'xs', tag = 'h2', title, }) {
|
|
7
|
-
return (jsx(Heading, { className: styles['section-header'], size: size, tag: tag, children: title }));
|
|
7
|
+
return (jsx(Heading, { className: styles['section-header'], responsive: false, size: size, tag: tag, children: title }));
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export { CheckoutPageSectionHeader };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { PageSection } from '../../../sections/page-section/page-section.js';
|
|
5
|
+
import { Heading } from '../../../typography/heading/heading.js';
|
|
6
|
+
import styles from './checkout-page-section.module.css.js';
|
|
7
|
+
|
|
8
|
+
function CheckoutPageSection({ children, hasBorder = true, title, }) {
|
|
9
|
+
return (jsxs(PageSection, { className: clsx(styles.section, { [styles['has-border']]: hasBorder }), children: [title && (jsx(Heading, { className: styles['section-header'], responsive: false, size: "xs", tag: "h2", children: title })), children] }));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { CheckoutPageSection };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var styles = {"section":"checkout-page-section-module-ZFeh8","has-border":"checkout-page-section-module-Fs9zb","section-header":"checkout-page-section-module-bluyp","section-link":"checkout-page-section-module-IRu6B","section-content":"checkout-page-section-module-ltLlH","stretch":"checkout-page-section-module-twdO3"};
|
|
2
|
+
|
|
3
|
+
export { styles as default };
|