@sonic-equipment/ui 259.0.2 → 260.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-active-categories.js +2 -2
- package/dist/algolia/algolia-categories-filters.js +2 -2
- package/dist/badges/badge/badge.d.ts +5 -3
- package/dist/badges/badge/badge.js +4 -4
- package/dist/badges/badge/badge.module.css.js +1 -1
- package/dist/badges/badge/icon-with-badge/icon-with-badge.d.ts +11 -6
- package/dist/badges/badge/icon-with-badge/icon-with-badge.js +5 -2
- package/dist/badges/badge/icon-with-badge/icon-with-badge.module.css.js +1 -1
- package/dist/base.css +2 -2
- package/dist/breadcrumbs/breadcrumb.js +3 -4
- package/dist/buttons/add-to-cart-button/add-to-cart-button.js +2 -2
- package/dist/buttons/button/button.js +2 -2
- package/dist/buttons/close-button/close-button.d.ts +12 -0
- package/dist/buttons/close-button/close-button.js +11 -0
- package/dist/buttons/close-button/close-button.module.css.js +3 -0
- package/dist/buttons/favorite/favorite-button.js +3 -3
- package/dist/buttons/icon-button/icon-button.d.ts +13 -5
- package/dist/buttons/icon-button/icon-button.js +6 -5
- package/dist/buttons/icon-button/icon-button.module.css.js +1 -1
- package/dist/buttons/link/link.d.ts +2 -0
- package/dist/buttons/link/link.js +4 -7
- package/dist/cards/orderline-card/connected-remove-button.js +1 -2
- package/dist/carousel/carousel-navigation-button.js +2 -3
- package/dist/collapsables/accordion/accordion-item.js +2 -3
- package/dist/collapsables/show-all/show-all.js +2 -2
- package/dist/collapsables/unmounter/utils.js +4 -1
- package/dist/country-language-selection-list/connected-country-language-selection-list.d.ts +1 -0
- package/dist/country-language-selection-list/connected-country-language-selection-list.js +268 -0
- package/dist/country-language-selection-list/country-language-selection-list.d.ts +18 -0
- package/dist/country-language-selection-list/country-language-selection-list.js +54 -0
- package/dist/country-language-selection-list/country-language-selection-list.module.css.js +3 -0
- package/dist/country-language-selector/connected-country-language-selector.d.ts +10 -0
- package/dist/country-language-selector/connected-country-language-selector.js +129 -0
- package/dist/country-language-selector/country-language-selector.d.ts +18 -0
- package/dist/country-language-selector/country-language-selector.js +52 -0
- package/dist/country-language-selector/country-language-selector.module.css.js +3 -0
- package/dist/country-language-selector-button/connected-country-language-selector-button.d.ts +1 -0
- package/dist/country-language-selector-button/connected-country-language-selector-button.js +22 -0
- package/dist/country-language-selector-button/country-language-selector-button.d.ts +7 -0
- package/dist/country-language-selector-button/country-language-selector-button.js +18 -0
- package/dist/country-language-selector-button/country-language-selector-button.module.css.js +3 -0
- package/dist/country-selector/country-selector-trigger/country-selector-trigger.js +2 -2
- package/dist/country-selector/country-selector-trigger/country-selector-trigger.module.css.js +1 -1
- package/dist/country-selector/use-countries-languages.d.ts +2 -2
- package/dist/country-selector/use-countries-languages.js +1 -1
- package/dist/delivery-time/delivery-time.js +1 -1
- package/dist/display/details/details.js +2 -2
- package/dist/exports.d.ts +71 -3
- package/dist/filters/active-filters/active-filters.js +1 -2
- package/dist/filters/active-filters/active-filters.module.css.js +1 -1
- package/dist/filters/pagination/pagination.js +1 -3
- package/dist/filters/pagination/pagination.module.css.js +1 -1
- package/dist/flag/flag.d.ts +8 -0
- package/dist/flag/flag.js +11 -0
- package/dist/flag/flag.module.css.js +3 -0
- package/dist/flags/flag-ad.d.ts +1 -0
- package/dist/flags/flag-ad.js +7 -0
- package/dist/flags/flag-ae.d.ts +1 -0
- package/dist/flags/flag-ae.js +7 -0
- package/dist/flags/flag-al.d.ts +1 -0
- package/dist/flags/flag-al.js +7 -0
- package/dist/flags/flag-at.d.ts +1 -0
- package/dist/flags/flag-at.js +7 -0
- package/dist/flags/flag-ba.d.ts +1 -0
- package/dist/flags/flag-ba.js +7 -0
- package/dist/flags/flag-be.d.ts +1 -0
- package/dist/flags/flag-be.js +7 -0
- package/dist/flags/flag-bg.d.ts +1 -0
- package/dist/flags/flag-bg.js +7 -0
- package/dist/flags/flag-br.d.ts +1 -0
- package/dist/flags/flag-br.js +7 -0
- package/dist/flags/flag-ca.d.ts +1 -0
- package/dist/flags/flag-ca.js +7 -0
- package/dist/flags/flag-ch.d.ts +1 -0
- package/dist/flags/flag-ch.js +7 -0
- package/dist/flags/flag-cy.d.ts +1 -0
- package/dist/flags/flag-cy.js +7 -0
- package/dist/flags/flag-cz.d.ts +1 -0
- package/dist/flags/flag-cz.js +7 -0
- package/dist/flags/flag-de.d.ts +1 -0
- package/dist/flags/flag-de.js +7 -0
- package/dist/flags/flag-dj.d.ts +1 -0
- package/dist/flags/flag-dj.js +7 -0
- package/dist/flags/flag-dk.d.ts +1 -0
- package/dist/flags/flag-dk.js +7 -0
- package/dist/flags/flag-ec.d.ts +1 -0
- package/dist/flags/flag-ec.js +7 -0
- package/dist/flags/flag-ee.d.ts +1 -0
- package/dist/flags/flag-ee.js +7 -0
- package/dist/flags/flag-es.d.ts +1 -0
- package/dist/flags/flag-es.js +7 -0
- package/dist/flags/flag-eu.d.ts +1 -0
- package/dist/flags/flag-eu.js +7 -0
- package/dist/flags/flag-fi.d.ts +1 -0
- package/dist/flags/flag-fi.js +7 -0
- package/dist/flags/flag-fr.d.ts +1 -0
- package/dist/flags/flag-fr.js +7 -0
- package/dist/flags/flag-gb.d.ts +1 -0
- package/dist/flags/flag-gb.js +7 -0
- package/dist/flags/flag-gr.d.ts +1 -0
- package/dist/flags/flag-gr.js +7 -0
- package/dist/flags/flag-hr.d.ts +1 -0
- package/dist/flags/flag-hr.js +7 -0
- package/dist/flags/flag-hu.d.ts +1 -0
- package/dist/flags/flag-hu.js +7 -0
- package/dist/flags/flag-ie.d.ts +1 -0
- package/dist/flags/flag-ie.js +7 -0
- package/dist/flags/flag-iq.d.ts +1 -0
- package/dist/flags/flag-iq.js +7 -0
- package/dist/flags/flag-is.d.ts +1 -0
- package/dist/flags/flag-is.js +7 -0
- package/dist/flags/flag-it.d.ts +1 -0
- package/dist/flags/flag-it.js +7 -0
- package/dist/flags/flag-kw.d.ts +1 -0
- package/dist/flags/flag-kw.js +7 -0
- package/dist/flags/flag-kz.d.ts +1 -0
- package/dist/flags/flag-kz.js +7 -0
- package/dist/flags/flag-lb.d.ts +1 -0
- package/dist/flags/flag-lb.js +7 -0
- package/dist/flags/flag-lt.d.ts +1 -0
- package/dist/flags/flag-lt.js +7 -0
- package/dist/flags/flag-lu.d.ts +1 -0
- package/dist/flags/flag-lu.js +7 -0
- package/dist/flags/flag-lv.d.ts +1 -0
- package/dist/flags/flag-lv.js +7 -0
- package/dist/flags/flag-ma.d.ts +1 -0
- package/dist/flags/flag-ma.js +7 -0
- package/dist/flags/flag-mc.d.ts +1 -0
- package/dist/flags/flag-mc.js +7 -0
- package/dist/flags/flag-md.d.ts +1 -0
- package/dist/flags/flag-md.js +7 -0
- package/dist/flags/flag-me.d.ts +1 -0
- package/dist/flags/flag-me.js +7 -0
- package/dist/flags/flag-mk.d.ts +1 -0
- package/dist/flags/flag-mk.js +7 -0
- package/dist/flags/flag-mt.d.ts +1 -0
- package/dist/flags/flag-mt.js +7 -0
- package/dist/flags/flag-mx.d.ts +1 -0
- package/dist/flags/flag-mx.js +7 -0
- package/dist/flags/flag-my.d.ts +1 -0
- package/dist/flags/flag-my.js +7 -0
- package/dist/flags/flag-nl.d.ts +1 -0
- package/dist/flags/flag-nl.js +7 -0
- package/dist/flags/flag-no.d.ts +1 -0
- package/dist/flags/flag-no.js +7 -0
- package/dist/flags/flag-pl.d.ts +1 -0
- package/dist/flags/flag-pl.js +7 -0
- package/dist/flags/flag-pt.d.ts +1 -0
- package/dist/flags/flag-pt.js +7 -0
- package/dist/flags/flag-ro.d.ts +1 -0
- package/dist/flags/flag-ro.js +7 -0
- package/dist/flags/flag-rs.d.ts +1 -0
- package/dist/flags/flag-rs.js +7 -0
- package/dist/flags/flag-sa.d.ts +1 -0
- package/dist/flags/flag-sa.js +7 -0
- package/dist/flags/flag-se.d.ts +1 -0
- package/dist/flags/flag-se.js +7 -0
- package/dist/flags/flag-sg.d.ts +1 -0
- package/dist/flags/flag-sg.js +7 -0
- package/dist/flags/flag-si.d.ts +1 -0
- package/dist/flags/flag-si.js +7 -0
- package/dist/flags/flag-sk.d.ts +1 -0
- package/dist/flags/flag-sk.js +7 -0
- package/dist/flags/flag-tr.d.ts +1 -0
- package/dist/flags/flag-tr.js +7 -0
- package/dist/flags/flag-tw.d.ts +1 -0
- package/dist/flags/flag-tw.js +7 -0
- package/dist/flags/flag-ua.d.ts +1 -0
- package/dist/flags/flag-ua.js +7 -0
- package/dist/flags/flag-us.d.ts +1 -0
- package/dist/flags/flag-us.js +7 -0
- package/dist/flags/flag-vn.d.ts +1 -0
- package/dist/flags/flag-vn.js +7 -0
- package/dist/flags/flag-xk.d.ts +1 -0
- package/dist/flags/flag-xk.js +7 -0
- package/dist/flags/flag-za.d.ts +1 -0
- package/dist/flags/flag-za.js +7 -0
- package/dist/flags/index.d.ts +1 -0
- package/dist/flags/index.js +88 -0
- package/dist/footer/connected-footer.d.ts +1 -3
- package/dist/footer/connected-footer.js +3 -5
- package/dist/forms/elements/checkbox/checkbox.module.css.js +1 -1
- package/dist/forms/elements/select/select.js +3 -4
- package/dist/forms/fields/number-field/number-field.js +2 -4
- package/dist/forms/fields/search-field/search-field.js +2 -2
- package/dist/forms/fields/select-field/select-field.d.ts +8 -1
- package/dist/forms/fields/select-field/select-field.js +30 -9
- package/dist/forms/fields/select-field/select-field.module.css.js +1 -1
- package/dist/forms/fields/text-field/password-reveal-toggle/password-reveal-toggle.js +2 -3
- package/dist/forms/layout/form/form.js +1 -1
- package/dist/global-search/search-input/search-input.js +5 -4
- package/dist/global-search/search-result-panel/sections/no-search.js +3 -4
- package/dist/global-search/search-result-panel/sections/with-results.js +4 -4
- package/dist/global-search/search-section/search-list-item.js +1 -2
- package/dist/header/buttons/account/connected-account-button.js +1 -2
- package/dist/header/buttons/cart/connected-cart-button.js +1 -2
- package/dist/header/buttons/favorites/connected-favorites-button.js +1 -3
- package/dist/header/buttons/hamburger/hamburger-button.js +1 -1
- package/dist/header/buttons/hamburger/hamburger-button.module.css.js +1 -1
- package/dist/header/buttons/search/search-button.js +1 -2
- package/dist/header/header.js +1 -1
- package/dist/header/link-list/navigation-link-list.js +2 -2
- package/dist/header/link-list/navigation-link-list.module.css.js +1 -1
- package/dist/header/sonic-logo/sonic-logo.js +7 -2
- package/dist/header/sonic-logo/sonic-logo.module.css.js +1 -1
- package/dist/icon/icon.d.ts +10 -0
- package/dist/icon/icon.js +11 -0
- package/dist/icon/icon.module.css.js +3 -0
- package/dist/icons/glyph/glyphs-arrow-boldcaps-left-icon.js +0 -1
- package/dist/icons/glyph/glyphs-arrow-boldcaps-right-icon.js +0 -1
- package/dist/icons/glyph/glyphs-chevrons-bold-down-icon.js +0 -1
- package/dist/icons/glyph/glyphs-chevrons-bold-left-icon.js +7 -0
- package/dist/icons/glyph/glyphs-chevrons-bold-right-icon.js +0 -1
- package/dist/icons/glyph/glyphs-chevrons-bold-up-icon.js +0 -1
- package/dist/icons/glyph/glyphs-chevrons-slim-down-icon.js +0 -1
- package/dist/icons/glyph/glyphs-chevrons-slim-left-icon.js +0 -1
- package/dist/icons/glyph/glyphs-chevrons-slim-right-icon.js +0 -1
- package/dist/icons/glyph/glyphs-chevrons-slim-up-icon.js +7 -0
- package/dist/icons/index.d.ts +87 -0
- package/dist/icons/index.js +90 -0
- package/dist/icons/solid/solid-attention-icon.js +0 -1
- package/dist/icons/solid/solid-cart-icon.js +0 -1
- package/dist/icons/solid/solid-close-icon.js +0 -1
- package/dist/icons/solid/solid-edit-icon.js +0 -1
- package/dist/icons/solid/solid-favorite-icon.js +0 -1
- package/dist/icons/solid/solid-home-icon.js +0 -1
- package/dist/icons/solid/solid-information-icon.js +0 -1
- package/dist/icons/solid/solid-login-icon.js +0 -1
- package/dist/icons/solid/solid-logout-icon.js +0 -1
- package/dist/icons/solid/solid-news-icon.js +0 -1
- package/dist/icons/solid/solid-notice-icon.js +0 -1
- package/dist/icons/solid/solid-okay-icon.js +0 -1
- package/dist/icons/solid/solid-rating-icon.js +0 -1
- package/dist/icons/solid/solid-salecategory-icon.js +0 -1
- package/dist/icons/solid/solid-tag-icon.js +0 -1
- package/dist/icons/stroke/stroke-arrowdown-icon.d.ts +1 -0
- package/dist/icons/stroke/stroke-arrowleft-icon.d.ts +1 -0
- package/dist/icons/stroke/stroke-arrowleft-icon.js +7 -0
- package/dist/icons/stroke/stroke-arrowright-icon.d.ts +1 -0
- package/dist/icons/stroke/stroke-arrowright-icon.js +7 -0
- package/dist/icons/stroke/stroke-arrowup-icon.d.ts +1 -0
- package/dist/icons/stroke/stroke-categories-icon.js +0 -1
- package/dist/icons/stroke/stroke-checkmark-icon.js +0 -1
- package/dist/icons/stroke/stroke-closebox-icon.js +0 -1
- package/dist/icons/stroke/stroke-dehashed-icon.js +0 -1
- package/dist/icons/stroke/stroke-download-icon.js +0 -1
- package/dist/icons/stroke/stroke-event-icon.js +0 -1
- package/dist/icons/stroke/stroke-favorite-icon.js +0 -1
- package/dist/icons/stroke/stroke-filter-icon.js +0 -1
- package/dist/icons/stroke/stroke-hashed-icon.js +0 -1
- package/dist/icons/stroke/stroke-information-icon.js +0 -1
- package/dist/icons/stroke/stroke-minus-icon.js +0 -1
- package/dist/icons/stroke/stroke-notice-icon.js +7 -0
- package/dist/icons/stroke/stroke-plus-icon.js +0 -1
- package/dist/icons/stroke/stroke-recent-icon.js +0 -1
- package/dist/icons/stroke/stroke-search-icon.js +0 -1
- package/dist/icons/stroke/stroke-trash-icon.js +0 -1
- package/dist/index.js +72 -4
- package/dist/info-icon-tooltip/info-icon-tooltip.d.ts +3 -1
- package/dist/info-icon-tooltip/info-icon-tooltip.js +6 -8
- package/dist/intl/intl-context.d.ts +2 -0
- package/dist/intl/intl-provider.js +5 -0
- package/dist/intl/translation-id.d.ts +1 -1
- package/dist/intl/types.d.ts +3 -0
- package/dist/intl/types.js +6 -1
- package/dist/lists/download-document-list/download-document-list.js +4 -8
- package/dist/lists/download-document-list/download-document-list.module.css.js +1 -1
- package/dist/lists/feature-list/feature-list.js +5 -4
- package/dist/lists/feature-list/feature-list.module.css.js +1 -1
- package/dist/lists/icon-list/icon-list.d.ts +2 -1
- package/dist/lists/icon-list/icon-list.js +3 -2
- package/dist/lists/icon-list/icon-list.module.css.js +1 -1
- package/dist/lists/menu-list/menu-list-back-button.js +2 -2
- package/dist/lists/menu-list/menu-list-header.js +2 -2
- package/dist/lists/menu-list/menu-list-item.js +2 -2
- package/dist/lists/orderline-list/orderline-list.js +2 -2
- package/dist/lists/orderline-list/orderline-list.module.css.js +1 -1
- package/dist/media/image/image.js +1 -1
- package/dist/message/message.js +5 -8
- package/dist/modals/dialog/dialog.js +1 -4
- package/dist/modals/favorite/add-to-favorite-dialog.js +1 -1
- package/dist/modals/modal/modal.js +3 -2
- package/dist/modals/recover-password/recover-password-dialog.js +1 -1
- package/dist/modals/signin/sign-in-dialog.js +2 -2
- package/dist/navigation/mobile-navigation/mobile-navigation.js +2 -4
- package/dist/navigation/mobile-navigation/mobile-navigation.module.css.js +1 -1
- package/dist/notifications/announcements/announcement-list.js +7 -3
- package/dist/notifications/announcements/announcement-list.module.css.js +1 -1
- package/dist/notifications/announcements/announcement.js +12 -18
- package/dist/pages/checkout/payment-page/components/payment.js +1 -1
- package/dist/pages/checkout/shipping-page/components/edit-checkout-bill-to-address-form.js +1 -1
- package/dist/pages/countries-page/countries-page.d.ts +1 -0
- package/dist/pages/countries-page/countries-page.js +18 -0
- package/dist/pages/error-page/error-page.js +1 -1
- package/dist/pages/my-sonic/actions/change-customer/change-customer.js +2 -2
- package/dist/pages/my-sonic/navigation/my-sonic-desktop-navigation.js +2 -1
- package/dist/pages/my-sonic/navigation/my-sonic-navigation-items.d.ts +2 -2
- package/dist/pages/my-sonic/navigation/my-sonic-navigation-items.js +4 -8
- package/dist/pages/my-sonic/pages/order-details/order-details-content.js +1 -1
- package/dist/pages/my-sonic/pages/order-history/order-history-page.js +2 -2
- package/dist/pages/my-sonic/widgets/connected-address-book-widget.js +2 -2
- package/dist/shared/api/storefront/hooks/authentication/use-patch-session.d.ts +4 -1
- package/dist/shared/api/storefront/model/storefront.model.d.ts +4 -1
- package/dist/shared/error/default-error-view.js +2 -2
- package/dist/shared/hooks/use-resize-observer.js +1 -0
- package/dist/sidebar/sidebar.js +3 -2
- package/dist/sidebar/toggle-sidebar-button.js +2 -2
- package/dist/styles.css +1032 -686
- package/dist/table/elements/table-sort-button.js +2 -2
- package/dist/toast/toast.js +8 -10
- package/dist/tooltip/tooltip.js +3 -2
- package/dist/tooltip/tooltip.module.css.js +1 -1
- package/package.json +2 -1
- package/dist/icons/glyph/glyphs-arrow-blackcaps-right-icon.js +0 -8
- package/dist/icons/glyph/glyphs-arrow-semibold-right-icon.js +0 -8
- package/dist/navigation/account-icon/account-icon.d.ts +0 -5
- package/dist/navigation/account-icon/account-icon.js +0 -13
- package/dist/navigation/cart-icon/cart-icon.d.ts +0 -5
- package/dist/navigation/cart-icon/cart-icon.js +0 -13
- package/dist/navigation/favorite-icon/favorite-icon.d.ts +0 -5
- package/dist/navigation/favorite-icon/favorite-icon.js +0 -13
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { ConnectedCountryLanguageSelectionList } from '../../country-language-selection-list/connected-country-language-selection-list.js';
|
|
4
|
+
import { useFormattedMessage } from '../../intl/use-formatted-message.js';
|
|
5
|
+
import { usePaths } from '../../shared/routing/use-paths.js';
|
|
6
|
+
import { Page } from '../components/page/page.js';
|
|
7
|
+
|
|
8
|
+
function CountriesPage() {
|
|
9
|
+
const paths = usePaths();
|
|
10
|
+
const t = useFormattedMessage();
|
|
11
|
+
const title = t('Choose your country or region…');
|
|
12
|
+
return (jsx(Page, { breadcrumb: [
|
|
13
|
+
{ href: paths.HOME, label: 'Home' },
|
|
14
|
+
{ href: '', label: 'Countries' },
|
|
15
|
+
], "data-test-selector": "countriesPage", title: title, children: jsx(ConnectedCountryLanguageSelectionList, {}) }));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { CountriesPage };
|
|
@@ -13,7 +13,7 @@ function ErrorPage({ error, title = 'Something went wrong', }) {
|
|
|
13
13
|
}, [error]);
|
|
14
14
|
return (jsx(Page, { breadcrumb: [
|
|
15
15
|
{ href: paths.HOME, label: 'Home' },
|
|
16
|
-
{ href:
|
|
16
|
+
{ href: '', label: 'Error' },
|
|
17
17
|
], "data-test-selector": "errorPage", title: title, children: jsx(DefaultErrorView, { error: error, title: "" }) }));
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -5,7 +5,7 @@ import { ListBox, ListBoxItem, Text } from 'react-aria-components';
|
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { Checkbox } from '../../../../forms/elements/checkbox/checkbox.js';
|
|
7
7
|
import { SearchField } from '../../../../forms/fields/search-field/search-field.js';
|
|
8
|
-
import {
|
|
8
|
+
import { Icon } from '../../../../icon/icon.js';
|
|
9
9
|
import { FormattedMessage } from '../../../../intl/formatted-message.js';
|
|
10
10
|
import { useFormattedMessage } from '../../../../intl/use-formatted-message.js';
|
|
11
11
|
import { Message } from '../../../../message/message.js';
|
|
@@ -57,7 +57,7 @@ function ChangeCustomer({ allowSetDefault = false, className, data, defaultCusto
|
|
|
57
57
|
if (key === 'ArrowDown') {
|
|
58
58
|
listBoxRef.current?.focus();
|
|
59
59
|
}
|
|
60
|
-
}, placeholder: t('Search for a customer'), showLabel: false, size: "md", value: filter, variant: "outline" }), jsx(ListBox, { ref: listBoxRef, "aria-label": "List of customers", "aria-live": "polite", className: styles['list-box'], id: "filtered-customer-results-list", items: listBoxItems, onAction: key => onCustomerSelected?.(String(key)), onSelectionChange: keys => onCustomerSelectionChanged(String([...keys][0])), renderEmptyState: () => !isLoading && (jsx(Message, { type: "info", children: jsx(FormattedMessage, { id: "No results found. Please refine your search." }) })), selectionBehavior: "replace", selectionMode: "single", children: listBoxItem => 'type' in listBoxItem ? (jsx(ListBoxItem, { isDisabled: true, textValue: listBoxItem.id, children: jsx(Message, { type: listBoxItem.type, children: jsx(Text, { slot: "description", children: listBoxItem.message }) }) }, "marker")) : (jsxs(ListBoxItem, { className: styles['list-box-item'], id: listBoxItem.id, textValue: listBoxItem.id, children: [jsxs(Text, { slot: "label", children: [jsxs("div", { className: styles['company-name'], children: [jsx(HighlightText, { className: styles['company-name-text'], highlightText: filter, text: `${listBoxItem.companyName}` }), defaultCustomerId === listBoxItem.id && (jsx(
|
|
60
|
+
}, placeholder: t('Search for a customer'), showLabel: false, size: "md", value: filter, variant: "outline" }), jsx(ListBox, { ref: listBoxRef, "aria-label": "List of customers", "aria-live": "polite", className: styles['list-box'], id: "filtered-customer-results-list", items: listBoxItems, onAction: key => onCustomerSelected?.(String(key)), onSelectionChange: keys => onCustomerSelectionChanged(String([...keys][0])), renderEmptyState: () => !isLoading && (jsx(Message, { type: "info", children: jsx(FormattedMessage, { id: "No results found. Please refine your search." }) })), selectionBehavior: "replace", selectionMode: "single", children: listBoxItem => 'type' in listBoxItem ? (jsx(ListBoxItem, { isDisabled: true, textValue: listBoxItem.id, children: jsx(Message, { type: listBoxItem.type, children: jsx(Text, { slot: "description", children: listBoxItem.message }) }) }, "marker")) : (jsxs(ListBoxItem, { className: styles['list-box-item'], id: listBoxItem.id, textValue: listBoxItem.id, children: [jsxs(Text, { slot: "label", children: [jsxs("div", { className: styles['company-name'], children: [jsx(HighlightText, { className: styles['company-name-text'], highlightText: filter, text: `${listBoxItem.companyName}` }), defaultCustomerId === listBoxItem.id && (jsx(Icon, { className: styles['selected-icon'], name: "StarSolid" }))] }), jsx(HighlightText, { className: styles['customer-number'], highlightText: filter, text: `${listBoxItem.customerNumber}` })] }), jsxs(Text, { slot: "description", children: [jsx("div", { children: jsx(HighlightText, { highlightText: filter, text: [
|
|
61
61
|
[listBoxItem.firstName, listBoxItem.lastName].join(' '),
|
|
62
62
|
]
|
|
63
63
|
.filter(Boolean)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { Icon } from '../../../icon/icon.js';
|
|
3
4
|
import { FormattedMessage } from '../../../intl/formatted-message.js';
|
|
4
5
|
import { MenuList } from '../../../lists/menu-list/menu-list.js';
|
|
5
6
|
import { MenuListItem } from '../../../lists/menu-list/menu-list-item.js';
|
|
@@ -10,7 +11,7 @@ import styles from './my-sonic-desktop-navigation.module.css.js';
|
|
|
10
11
|
function MySonicDesktopNavigation({ className, currentPath, onSignOut, }) {
|
|
11
12
|
const mySonicNavigationItems = useMySonicNavigationItems();
|
|
12
13
|
const { basePathname } = useLocation();
|
|
13
|
-
return (jsx(MenuList, { collapsible: true, className: className, children: mySonicNavigationItems.map(item => (jsx(MenuListItem, { badge: jsx(
|
|
14
|
+
return (jsx(MenuList, { collapsible: true, className: className, children: mySonicNavigationItems.map(item => (jsx(MenuListItem, { badge: jsx(Icon, { name: item.icon }), "data-test-selector": item['data-test-selector'], ...(item.type === 'action'
|
|
14
15
|
? item.action === 'signout'
|
|
15
16
|
? { onClick: onSignOut }
|
|
16
17
|
: {}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconName } from '../../../icons';
|
|
2
2
|
import { TranslationId } from '../../../intl/translation-id';
|
|
3
3
|
interface MySonicNavigationItemBase {
|
|
4
|
-
Icon: ComponentType;
|
|
5
4
|
'data-test-selector'?: string;
|
|
5
|
+
icon: IconName;
|
|
6
6
|
label: TranslationId;
|
|
7
7
|
type: 'link' | 'action';
|
|
8
8
|
}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { SolidCartIcon } from '../../../icons/solid/solid-cart-icon.js';
|
|
3
|
-
import { SolidFavoriteIcon } from '../../../icons/solid/solid-favorite-icon.js';
|
|
4
|
-
import { SolidLoginIcon } from '../../../icons/solid/solid-login-icon.js';
|
|
5
|
-
import { SolidLogOutIcon } from '../../../icons/solid/solid-logout-icon.js';
|
|
6
2
|
import { usePaths } from '../../../shared/routing/use-paths.js';
|
|
7
3
|
import { isObject } from '../../../shared/utils/types.js';
|
|
8
4
|
|
|
@@ -16,30 +12,30 @@ function useMySonicNavigationItems() {
|
|
|
16
12
|
const paths = usePaths();
|
|
17
13
|
return [
|
|
18
14
|
{
|
|
19
|
-
Icon: SolidLoginIcon,
|
|
20
15
|
'data-test-selector': 'accountLink',
|
|
16
|
+
icon: 'UserSolid',
|
|
21
17
|
label: 'Account',
|
|
22
18
|
path: paths.ACCOUNT,
|
|
23
19
|
type: 'link',
|
|
24
20
|
},
|
|
25
21
|
{
|
|
26
|
-
Icon: SolidFavoriteIcon,
|
|
27
22
|
'data-test-selector': 'favoritesLink',
|
|
23
|
+
icon: 'FavoriteSolid',
|
|
28
24
|
label: 'Favorites',
|
|
29
25
|
path: paths.ACCOUNT_MY_LISTS,
|
|
30
26
|
type: 'link',
|
|
31
27
|
},
|
|
32
28
|
{
|
|
33
|
-
Icon: SolidCartIcon,
|
|
34
29
|
'data-test-selector': 'ordersLink',
|
|
30
|
+
icon: 'CartSolid',
|
|
35
31
|
label: 'Orders',
|
|
36
32
|
path: paths.ACCOUNT_ORDERS,
|
|
37
33
|
type: 'link',
|
|
38
34
|
},
|
|
39
35
|
{
|
|
40
|
-
Icon: SolidLogOutIcon,
|
|
41
36
|
action: 'signout',
|
|
42
37
|
'data-test-selector': 'logoutButton',
|
|
38
|
+
icon: 'SignOutSolid',
|
|
43
39
|
label: 'Log out',
|
|
44
40
|
type: 'action',
|
|
45
41
|
},
|
|
@@ -64,7 +64,7 @@ function OrderDetailsContent({ order, reorderButton, returnUrl, }) {
|
|
|
64
64
|
originalTotalPrice: ensureNumber(line.lineTotal),
|
|
65
65
|
pricePerUnit: line.unitPrice,
|
|
66
66
|
totalPrice: line.lineTotal,
|
|
67
|
-
}, productId: line.productId, quantity: line.qtyOrdered, sku: line.
|
|
67
|
+
}, productId: line.productId, quantity: line.qtyOrdered, sku: line.productErpNumber, title: line.shortDescription }, line.id))) })] }), jsx("section", { className: styles['order-cost-overview'], children: jsx(CartTotals, { currencyCode: order.currencyCode, shippingCost: order.shippingAndHandling, subtotal: order.orderSubTotal, tax: order.taxAmount, total: order.orderTotal, vatPercentage: undefined }) }), jsx("section", { className: styles['order-bottom-button'], children: jsx(Button, { color: "secondary", href: returnUrl || paths.ACCOUNT_ORDERS, variant: "outline", children: jsx(FormattedMessage, { id: "Back" }) }) })] }));
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
export { OrderDetailsContent, statusMap };
|
|
@@ -93,7 +93,7 @@ function OrderHistoryPage() {
|
|
|
93
93
|
},
|
|
94
94
|
sort: { direction: 'DESC', isEnabled: true },
|
|
95
95
|
value: {
|
|
96
|
-
render: order => (jsx(Link, { hasUnderline: true, color: "secondary", "data-test-selector": "order-history-
|
|
96
|
+
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 })),
|
|
97
97
|
},
|
|
98
98
|
},
|
|
99
99
|
{
|
|
@@ -166,7 +166,7 @@ function OrderHistoryPage() {
|
|
|
166
166
|
nowrap: true,
|
|
167
167
|
},
|
|
168
168
|
value: {
|
|
169
|
-
render: order => (jsx(Link, { hasUnderline: true, color: "secondary", "data-test-selector": "order-history-
|
|
169
|
+
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" }) })),
|
|
170
170
|
},
|
|
171
171
|
},
|
|
172
172
|
], data: orders, onSort: (key, direction) => {
|
|
@@ -5,8 +5,8 @@ import { Button } from '../../../buttons/button/button.js';
|
|
|
5
5
|
import { TableCard } from '../../../cards/table-card/table-card.js';
|
|
6
6
|
import { Pagination } from '../../../filters/pagination/pagination.js';
|
|
7
7
|
import { SearchField } from '../../../forms/fields/search-field/search-field.js';
|
|
8
|
+
import { Icon } from '../../../icon/icon.js';
|
|
8
9
|
import { SolidEditIcon } from '../../../icons/solid/solid-edit-icon.js';
|
|
9
|
-
import { SolidRatingIcon } from '../../../icons/solid/solid-rating-icon.js';
|
|
10
10
|
import { useFormattedMessage } from '../../../intl/use-formatted-message.js';
|
|
11
11
|
import { DynamicLoadingOverlay } from '../../../loading/dynamic-loading-overlay.js';
|
|
12
12
|
import { useFetchPagedShipToAddresses } from '../../../shared/api/storefront/hooks/customer/use-fetch-paged-ship-to-addresses.js';
|
|
@@ -73,7 +73,7 @@ function ConnectedAddressBookWidget() {
|
|
|
73
73
|
},
|
|
74
74
|
value: {
|
|
75
75
|
render: address => {
|
|
76
|
-
return (address.isDefault && (jsx(
|
|
76
|
+
return (address.isDefault && (jsx(Icon, { className: styles['default-icon'], "data-test-selector": "default-address", label: `(${t('addressProperty.Default')})`, name: "StarSolid" })));
|
|
77
77
|
},
|
|
78
78
|
},
|
|
79
79
|
},
|
|
@@ -4,11 +4,14 @@ export declare function usePatchSession(): {
|
|
|
4
4
|
isLoading: boolean;
|
|
5
5
|
isSuccess: boolean;
|
|
6
6
|
mutate: (args_0: {
|
|
7
|
-
session: Partial<Omit<import("../../model/storefront.model").SessionModel, "billTo" | "shipTo"> & {
|
|
7
|
+
session: Partial<Omit<import("../../model/storefront.model").SessionModel, "billTo" | "shipTo" | "language"> & {
|
|
8
8
|
billTo?: import("../../model/storefront.model").BillToModel | {
|
|
9
9
|
id: string;
|
|
10
10
|
} | null;
|
|
11
11
|
billToId?: string | null;
|
|
12
|
+
language?: import("../../model/storefront.model").LanguageModel | {
|
|
13
|
+
id: string;
|
|
14
|
+
} | null;
|
|
12
15
|
shipTo?: import("../../model/storefront.model").ShipToModel | {
|
|
13
16
|
id: string;
|
|
14
17
|
} | null;
|
|
@@ -159,11 +159,14 @@ export interface SessionModel extends BaseModel {
|
|
|
159
159
|
userRoles: string;
|
|
160
160
|
userRolesTranslated: string;
|
|
161
161
|
}
|
|
162
|
-
export type PatchSessionModel = Partial<Omit<SessionModel, 'billTo' | 'shipTo'> & {
|
|
162
|
+
export type PatchSessionModel = Partial<Omit<SessionModel, 'billTo' | 'shipTo' | 'language'> & {
|
|
163
163
|
billTo?: BillToModel | {
|
|
164
164
|
id: string;
|
|
165
165
|
} | null;
|
|
166
166
|
billToId?: string | null;
|
|
167
|
+
language?: LanguageModel | {
|
|
168
|
+
id: string;
|
|
169
|
+
} | null;
|
|
167
170
|
shipTo?: ShipToModel | {
|
|
168
171
|
id: string;
|
|
169
172
|
} | null;
|
|
@@ -3,7 +3,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { Button } from '../../buttons/button/button.js';
|
|
5
5
|
import { Details } from '../../display/details/details.js';
|
|
6
|
-
import {
|
|
6
|
+
import { Icon } from '../../icon/icon.js';
|
|
7
7
|
import { useFormattedMessage } from '../../intl/use-formatted-message.js';
|
|
8
8
|
import { Heading } from '../../typography/heading/heading.js';
|
|
9
9
|
import { isProductionEnvironment } from '../utils/environment.js';
|
|
@@ -11,7 +11,7 @@ import styles from './default-error-view.module.css.js';
|
|
|
11
11
|
|
|
12
12
|
function DefaultErrorView({ className, error, errorInfo, resetError, resetLabel, showErrorDetails = !isProductionEnvironment, showReset, title, }) {
|
|
13
13
|
const t = useFormattedMessage();
|
|
14
|
-
return (jsxs("section", { className: clsx(styles['default-error-view'], className), children: [title && (jsx(Heading, { className: styles['title'], size: "s", tag: "h1", children: title || t('Something went wrong') })), jsx("p", { children: error.message || t('An unexpected error occured. Please try again.') }), showErrorDetails && (jsxs(Details, { className: styles['error-details'], lang: "en", summary: "Technical Details (only visible in development mode)", children: [jsx("output", { className: styles['error-kind'], children: error.toString() }), error.stack && (jsxs("div", { className: styles['error-info'], children: [jsx(Heading, { className: styles['error-info-title'], size: "xs", tag: "h2", children: "Stack:" }), jsx("pre", { className: styles['error-info-data'], children: error.stack })] })), errorInfo?.componentStack && (jsxs("div", { className: styles['component-info'], children: [jsx(Heading, { className: styles['error-info-title'], size: "xs", tag: "h2", children: "Component stack:" }), jsx("pre", { className: styles['error-info-data'], children: errorInfo.componentStack })] }))] })), showReset && resetError && (jsx(Button, { light: true, className: styles['reset-button'], color: "secondary", icon: jsx(
|
|
14
|
+
return (jsxs("section", { className: clsx(styles['default-error-view'], className), children: [title && (jsx(Heading, { className: styles['title'], size: "s", tag: "h1", children: title || t('Something went wrong') })), jsx("p", { children: error.message || t('An unexpected error occured. Please try again.') }), showErrorDetails && (jsxs(Details, { className: styles['error-details'], lang: "en", summary: "Technical Details (only visible in development mode)", children: [jsx("output", { className: styles['error-kind'], children: error.toString() }), error.stack && (jsxs("div", { className: styles['error-info'], children: [jsx(Heading, { className: styles['error-info-title'], size: "xs", tag: "h2", children: "Stack:" }), jsx("pre", { className: styles['error-info-data'], children: error.stack })] })), errorInfo?.componentStack && (jsxs("div", { className: styles['component-info'], children: [jsx(Heading, { className: styles['error-info-title'], size: "xs", tag: "h2", children: "Component stack:" }), jsx("pre", { className: styles['error-info-data'], children: errorInfo.componentStack })] }))] })), showReset && resetError && (jsx(Button, { light: true, className: styles['reset-button'], color: "secondary", icon: jsx(Icon, { name: "Refresh", size: "sm" }), onClick: resetError, size: "sm", type: "button", variant: "outline", children: resetLabel || t('Reset') }))] }));
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export { DefaultErrorView };
|
package/dist/sidebar/sidebar.js
CHANGED
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { IconButton } from '../buttons/icon-button/icon-button.js';
|
|
5
|
-
import {
|
|
5
|
+
import { useFormattedMessage } from '../intl/use-formatted-message.js';
|
|
6
6
|
import { useInert } from '../shared/hooks/use-inert.js';
|
|
7
7
|
import { useSidebar } from './use-sidebar.js';
|
|
8
8
|
import styles from './sidebar.module.css.js';
|
|
9
9
|
|
|
10
10
|
function Sidebar({ children, className }) {
|
|
11
|
+
const t = useFormattedMessage();
|
|
11
12
|
const { isDocked, isOpen, toggle, transition } = useSidebar();
|
|
12
13
|
const { ref: sidebarRef } = useInert(isOpen);
|
|
13
14
|
return (jsxs("aside", { ref: sidebarRef, "aria-hidden": !isOpen.toString(), className: clsx(styles.sidebar, {
|
|
@@ -16,7 +17,7 @@ function Sidebar({ children, className }) {
|
|
|
16
17
|
[styles['is-closed']]: !isOpen,
|
|
17
18
|
[styles['is-docked']]: isDocked,
|
|
18
19
|
[styles['is-not-docked']]: !isDocked,
|
|
19
|
-
}, className), children: [jsx(IconButton, { className: styles.close,
|
|
20
|
+
}, className), children: [jsx(IconButton, { className: styles.close, icon: "Close", label: t('Close'), onClick: toggle, size: "lg", theme: "secondary" }), jsx("div", { className: styles['content'], children: children })] }));
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
export { Sidebar };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { Button } from '../buttons/button/button.js';
|
|
4
|
-
import {
|
|
4
|
+
import { Icon } from '../icon/icon.js';
|
|
5
5
|
import { FormattedMessage } from '../intl/formatted-message.js';
|
|
6
6
|
import { useSidebar } from './use-sidebar.js';
|
|
7
7
|
|
|
8
8
|
const ToggleSidebarButton = () => {
|
|
9
9
|
const { isOpen, toggle } = useSidebar();
|
|
10
|
-
return (jsx(Button, { light: true, color: "secondary", icon: jsx(
|
|
10
|
+
return (jsx(Button, { light: true, color: "secondary", icon: jsx(Icon, { name: "Filter", size: "sm" }), onClick: toggle, size: "sm", variant: "outline", children: isOpen ? (jsx(FormattedMessage, { id: "Hide filters" })) : (jsx(FormattedMessage, { id: "Show filters" })) }));
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export { ToggleSidebarButton };
|