@sonic-equipment/ui 259.0.2 → 259.0.4
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/header/header.js
CHANGED
|
@@ -73,7 +73,7 @@ function Header({ className, headerNavigationSection, sticky, }) {
|
|
|
73
73
|
const mainNavigationSection = headerNavigationSection?.items
|
|
74
74
|
.filter(isNavigationSection)
|
|
75
75
|
.find(item => item.key === 'main-navigation');
|
|
76
|
-
return (jsxs(Fragment, { children: [jsx("header", { ref: headerRef, className: clsx(styles['header'], sticky && styles['sticky'], className), "data-test-selector": "pageHeader", children: jsx(HeaderLayout, { hamburgerButton: jsx(HamburgerButton, { "aria-controls": "mobile-navigation", "data-test-selector": "pageHeaderHamburgerButton", isActive: mobileNavigationOpen, onActiveChange: toggleMobileNavigation }), hasDrawersOpen: hasDrawersOpen, logo: jsx(SonicLogo, { "data-test-selector": "pageHeaderLogo", href: homeLink?.href || undefined, title: t('Home') }), mainNavigation: jsx(NavigationLinkList, { activeLink: activeLinkGroup, "data-test-selector": "pageHeaderMainNavigation", navigationSection: mainNavigationSection, onSubmenuToggle: toggleActiveSubmenu }), navigationActions: jsxs(Fragment, { children: [jsx(ConnectedAccountButton, { "data-test-selector": "pageHeaderAccountButton" }), jsx(ConnectedFavoritesButton, { "data-test-selector": "pageHeaderFavoritesButton", href:
|
|
76
|
+
return (jsxs(Fragment, { children: [jsx("header", { ref: headerRef, className: clsx(styles['header'], sticky && styles['sticky'], className), "data-test-selector": "pageHeader", children: jsx(HeaderLayout, { hamburgerButton: jsx(HamburgerButton, { "aria-controls": "mobile-navigation", "data-test-selector": "pageHeaderHamburgerButton", isActive: mobileNavigationOpen, onActiveChange: toggleMobileNavigation }), hasDrawersOpen: hasDrawersOpen, logo: jsx(SonicLogo, { "data-test-selector": "pageHeaderLogo", href: homeLink?.href || undefined, title: t('Home') }), mainNavigation: jsx(NavigationLinkList, { activeLink: activeLinkGroup, "data-test-selector": "pageHeaderMainNavigation", navigationSection: mainNavigationSection, onSubmenuToggle: toggleActiveSubmenu }), navigationActions: jsxs(Fragment, { children: [jsx(ConnectedAccountButton, { "data-test-selector": "pageHeaderAccountButton" }), jsx(ConnectedFavoritesButton, { "data-test-selector": "pageHeaderFavoritesButton", href: paths.FAVORITES }), jsx(ConnectedCartButton, { "data-test-selector": "pageHeaderCartButton", href: paths.CART })] }), search: jsx(SearchButton, { "aria-controls": "global-search", "data-test-selector": "pageHeaderSearchButton", isActive: searchOpen, onActiveChange: toggleSearch }) }) }), jsx(SearchDrawer, { groupId: searchGroupId, instanceId: searchInstanceId }), !isXl && (jsx(MobileNavigationDrawer, { groupId: mobileNavigationDrawer.groupId, instanceId: mobileNavigationDrawer.instanceId, linkItems: mainNavigationSection?.items.filter(isNavigationLinkItem) })), isXl && (jsx(DesktopNavigationDrawer, { groupId: desktopNavigationDrawer.groupId, instanceId: desktopNavigationDrawer.instanceId, linkGroup: activeLinkGroup, onClosed: () => setActiveLinkGroup(undefined) }))] }));
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
export { Header };
|
|
@@ -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) => {
|