@sonic-equipment/ui 169.0.0 → 171.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-query-string-routing.js +2 -2
- package/dist/breadcrumbs/breadcrumb.js +4 -4
- package/dist/buttons/button/button.d.ts +5 -2
- package/dist/buttons/button/button.js +19 -11
- package/dist/buttons/icon-button/icon-button.d.ts +7 -3
- package/dist/buttons/icon-button/icon-button.js +9 -5
- package/dist/buttons/link/link.d.ts +2 -0
- package/dist/buttons/link/link.js +10 -9
- package/dist/cards/category-card/category-card.d.ts +3 -1
- package/dist/cards/category-card/category-card.js +4 -4
- package/dist/cards/orderline-card/orderline-card.js +2 -2
- package/dist/cards/product-card/connected-product-card.d.ts +2 -0
- package/dist/cards/product-card/product-card.d.ts +3 -1
- package/dist/cards/product-card/product-card.js +3 -3
- package/dist/carousel/carousel.js +3 -3
- package/dist/carousel/usp-carousel/usp-carousel.js +1 -1
- package/dist/collapsables/show-all/show-all.js +2 -2
- package/dist/drawer/drawer.d.ts +2 -1
- package/dist/drawer/drawer.js +2 -2
- package/dist/drawer/use-drawer.js +1 -0
- package/dist/exports.d.ts +3 -3
- package/dist/filters/active-filters/active-filters.js +2 -2
- package/dist/footer/footer.js +6 -6
- package/dist/forms/select-field/select-field.js +1 -0
- package/dist/global-search/search-result-panel/sections/no-search.js +2 -2
- package/dist/global-search/search-result-panel/sections/with-results.js +5 -6
- package/dist/header/buttons/account/connected-account-button.js +2 -2
- package/dist/header/buttons/cart/connected-cart-button.js +2 -2
- package/dist/header/buttons/favorites/connected-favorites-button.js +2 -2
- package/dist/header/buttons/search/search-button.js +2 -2
- 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.js +1 -1
- package/dist/header/header.js +1 -1
- package/dist/header/link-list/navigation-link-list.d.ts +2 -1
- package/dist/header/link-list/navigation-link-list.js +6 -5
- package/dist/header/sonic-logo/sonic-logo.d.ts +2 -1
- package/dist/header/sonic-logo/sonic-logo.js +4 -4
- package/dist/index.js +3 -3
- package/dist/lists/menu-list/menu-list-back-button.d.ts +2 -1
- package/dist/lists/menu-list/menu-list-back-button.js +2 -2
- package/dist/lists/menu-list/menu-list-header.d.ts +2 -1
- package/dist/lists/menu-list/menu-list-header.js +3 -3
- package/dist/lists/menu-list/menu-list-item.d.ts +2 -1
- package/dist/lists/menu-list/menu-list-item.js +3 -3
- package/dist/lists/menu-list/menu-list.js +1 -1
- package/dist/media/image-lightbox/image-lightbox.js +3 -3
- package/dist/modals/signin/sign-in-dialog.js +2 -2
- package/dist/navigation/cart-icon/cart-icon.js +1 -1
- package/dist/navigation/mobile-navigation/mobile-navigation.js +1 -1
- package/dist/navigation/panel-navigation/panel-navigation.d.ts +2 -1
- package/dist/navigation/panel-navigation/panel-navigation.js +4 -4
- package/dist/node_modules/.pnpm/{swiper@11.2.5 → swiper@11.2.8}/node_modules/swiper/modules/free-mode.js +1 -1
- package/dist/node_modules/.pnpm/{swiper@11.2.5 → swiper@11.2.8}/node_modules/swiper/modules/thumbs.js +1 -1
- package/dist/node_modules/.pnpm/{swiper@11.2.5 → swiper@11.2.8}/node_modules/swiper/shared/swiper-core.js +30 -15
- package/dist/node_modules/.pnpm/{swiper@11.2.5 → swiper@11.2.8}/node_modules/swiper/shared/update-on-virtual-data.js +1 -0
- package/dist/node_modules/.pnpm/{swiper@11.2.5 → swiper@11.2.8}/node_modules/swiper/shared/update-swiper.js +4 -2
- package/dist/node_modules/.pnpm/{swiper@11.2.5 → swiper@11.2.8}/node_modules/swiper/shared/utils.js +13 -1
- package/dist/node_modules/.pnpm/{swiper@11.2.5 → swiper@11.2.8}/node_modules/swiper/swiper-react.js +2 -2
- package/dist/notifications/announcements/announcement-list.js +1 -1
- package/dist/notifications/announcements/announcement.js +3 -3
- package/dist/pages/account/components/sign-in-form/sign-in-form.js +1 -2
- package/dist/pages/account/create-account-page/create-account-page.js +2 -2
- package/dist/pages/checkout/cart-page/cart-page.js +4 -6
- package/dist/pages/checkout/order-confirmation-page/order-confirmation-page-content.js +3 -3
- package/dist/pages/checkout/payment-page/hooks/use-get-adyen-redirect-result.js +1 -0
- package/dist/pages/checkout/shipping-page/components/currency-change-dialog.js +2 -2
- package/dist/pages/checkout/shipping-page/components/readonly-address.js +3 -3
- package/dist/pages/product/components/product-overview.d.ts +2 -0
- package/dist/pages/product/components/product-overview.js +1 -1
- package/dist/pages/product/product-listing-page/no-results/no-results.js +2 -2
- package/dist/pages/product/product-listing-page/product-listing-page-category-carousel/product-listing-page-category-carousel.js +1 -1
- package/dist/pages/product/product-listing-page/product-listing-product-overview/product-listing-product-overview.js +1 -1
- package/dist/promos/promo-banner/promo-banner.js +2 -2
- package/dist/promos/promo-card/promo-card.js +2 -2
- package/dist/shared/api/storefront/hooks/cart/use-fetch-cart-by-id.d.ts +1 -1
- package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart.d.ts +1 -1
- package/dist/shared/api/storefront/hooks/website/use-fetch-countries-with-languages.d.ts +1 -1
- package/dist/shared/hooks/use-debounced-callback.js +1 -0
- package/dist/shared/hooks/use-enable-mobile-zoom.js +1 -0
- package/dist/shared/hooks/use-intersection-observer.js +1 -0
- package/dist/shared/hooks/use-mutation-observer.js +1 -0
- package/dist/shared/hooks/use-resize-observer.js +1 -0
- package/dist/shared/routing/route-provider.d.ts +4 -3
- package/dist/shared/routing/route-provider.js +4 -2
- package/dist/shared/routing/route-utils.d.ts +4 -0
- package/dist/shared/routing/route-utils.js +8 -0
- package/dist/shared/routing/types.d.ts +8 -0
- package/dist/shared/routing/use-route-link-element.d.ts +1 -0
- package/dist/shared/routing/use-route-link-element.js +11 -0
- package/dist/shared/routing/use-route-link.d.ts +8 -0
- package/dist/shared/routing/use-route-link.js +24 -0
- package/dist/shared/routing/with-routing.d.ts +3 -6
- package/dist/shared/routing/with-routing.js +6 -6
- package/dist/shared/utils/price.d.ts +1 -1
- package/dist/styles.css +2 -2
- package/package.json +45 -45
- package/dist/shared/routing/route-button.d.ts +0 -1
- package/dist/shared/routing/route-button.js +0 -7
- package/dist/shared/routing/route-icon-button.d.ts +0 -1
- package/dist/shared/routing/route-icon-button.js +0 -7
- package/dist/shared/routing/route-link.d.ts +0 -1
- package/dist/shared/routing/route-link.js +0 -7
- /package/dist/node_modules/.pnpm/{instantsearch.js@4.78.0_algoliasearch@4.24.0 → instantsearch.js@4.78.3_algoliasearch@4.24.0}/node_modules/instantsearch.js/es/lib/routers/history.js +0 -0
- /package/dist/node_modules/.pnpm/{instantsearch.js@4.78.0_algoliasearch@4.24.0 → instantsearch.js@4.78.3_algoliasearch@4.24.0}/node_modules/instantsearch.js/es/lib/stateMappings/simple.js +0 -0
- /package/dist/node_modules/.pnpm/{instantsearch.js@4.78.0_algoliasearch@4.24.0 → instantsearch.js@4.78.3_algoliasearch@4.24.0}/node_modules/instantsearch.js/es/lib/utils/documentation.js +0 -0
- /package/dist/node_modules/.pnpm/{instantsearch.js@4.78.0_algoliasearch@4.24.0 → instantsearch.js@4.78.3_algoliasearch@4.24.0}/node_modules/instantsearch.js/es/lib/utils/logger.js +0 -0
- /package/dist/node_modules/.pnpm/{instantsearch.js@4.78.0_algoliasearch@4.24.0 → instantsearch.js@4.78.3_algoliasearch@4.24.0}/node_modules/instantsearch.js/es/lib/utils/noop.js +0 -0
- /package/dist/node_modules/.pnpm/{instantsearch.js@4.78.0_algoliasearch@4.24.0 → instantsearch.js@4.78.3_algoliasearch@4.24.0}/node_modules/instantsearch.js/es/lib/utils/safelyRunOnBrowser.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.5 → swiper@11.2.8}/node_modules/swiper/modules/navigation.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.5 → swiper@11.2.8}/node_modules/swiper/shared/create-element-if-not-defined.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.5 → swiper@11.2.8}/node_modules/swiper/shared/ssr-window.esm.js +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as getWindow, g as getDocument } from './ssr-window.esm.js';
|
|
2
|
-
import {
|
|
2
|
+
import { x as extend, v as showWarning, e as elementChildren, n as nextTick, u as animateCSSModeScroll, k as getTranslate, r as elementNextAll, t as elementPrevAll, a as setCSSProperty, q as elementStyle, h as elementOuterSize, i as elementIndex, c as createElement, y as deleteProps, w as elementIsChildOf, f as now, b as elementParents } from './utils.js';
|
|
3
3
|
|
|
4
4
|
let support;
|
|
5
5
|
function calcSupport() {
|
|
@@ -1310,11 +1310,9 @@ function transitionEmit(_ref) {
|
|
|
1310
1310
|
if (activeIndex > previousIndex) dir = 'next';else if (activeIndex < previousIndex) dir = 'prev';else dir = 'reset';
|
|
1311
1311
|
}
|
|
1312
1312
|
swiper.emit(`transition${step}`);
|
|
1313
|
-
if (runCallbacks &&
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
return;
|
|
1317
|
-
}
|
|
1313
|
+
if (runCallbacks && dir === 'reset') {
|
|
1314
|
+
swiper.emit(`slideResetTransition${step}`);
|
|
1315
|
+
} else if (runCallbacks && activeIndex !== previousIndex) {
|
|
1318
1316
|
swiper.emit(`slideChangeTransition${step}`);
|
|
1319
1317
|
if (dir === 'next') {
|
|
1320
1318
|
swiper.emit(`slideNextTransition${step}`);
|
|
@@ -1810,7 +1808,7 @@ var slide = {
|
|
|
1810
1808
|
slideToClickedSlide
|
|
1811
1809
|
};
|
|
1812
1810
|
|
|
1813
|
-
function loopCreate(slideRealIndex) {
|
|
1811
|
+
function loopCreate(slideRealIndex, initial) {
|
|
1814
1812
|
const swiper = this;
|
|
1815
1813
|
const {
|
|
1816
1814
|
params,
|
|
@@ -1858,7 +1856,8 @@ function loopCreate(slideRealIndex) {
|
|
|
1858
1856
|
}
|
|
1859
1857
|
swiper.loopFix({
|
|
1860
1858
|
slideRealIndex,
|
|
1861
|
-
direction: params.centeredSlides ? undefined : 'next'
|
|
1859
|
+
direction: params.centeredSlides ? undefined : 'next',
|
|
1860
|
+
initial
|
|
1862
1861
|
});
|
|
1863
1862
|
}
|
|
1864
1863
|
|
|
@@ -1869,6 +1868,7 @@ function loopFix(_temp) {
|
|
|
1869
1868
|
direction,
|
|
1870
1869
|
setTranslate,
|
|
1871
1870
|
activeSlideIndex,
|
|
1871
|
+
initial,
|
|
1872
1872
|
byController,
|
|
1873
1873
|
byMousewheel
|
|
1874
1874
|
} = _temp === void 0 ? {} : _temp;
|
|
@@ -1883,7 +1883,8 @@ function loopFix(_temp) {
|
|
|
1883
1883
|
params
|
|
1884
1884
|
} = swiper;
|
|
1885
1885
|
const {
|
|
1886
|
-
centeredSlides
|
|
1886
|
+
centeredSlides,
|
|
1887
|
+
initialSlide
|
|
1887
1888
|
} = params;
|
|
1888
1889
|
swiper.allowSlidePrev = true;
|
|
1889
1890
|
swiper.allowSlideNext = true;
|
|
@@ -1919,14 +1920,16 @@ function loopFix(_temp) {
|
|
|
1919
1920
|
loopedSlides += params.loopAdditionalSlides;
|
|
1920
1921
|
swiper.loopedSlides = loopedSlides;
|
|
1921
1922
|
const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;
|
|
1922
|
-
if (slides.length < slidesPerView + loopedSlides) {
|
|
1923
|
-
showWarning('Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled
|
|
1923
|
+
if (slides.length < slidesPerView + loopedSlides || swiper.params.effect === 'cards' && slides.length < slidesPerView + loopedSlides * 2) {
|
|
1924
|
+
showWarning('Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters');
|
|
1924
1925
|
} else if (gridEnabled && params.grid.fill === 'row') {
|
|
1925
1926
|
showWarning('Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`');
|
|
1926
1927
|
}
|
|
1927
1928
|
const prependSlidesIndexes = [];
|
|
1928
1929
|
const appendSlidesIndexes = [];
|
|
1929
|
-
|
|
1930
|
+
const cols = gridEnabled ? Math.ceil(slides.length / params.grid.rows) : slides.length;
|
|
1931
|
+
const isInitialOverflow = initial && cols - initialSlide < slidesPerView && !centeredSlides;
|
|
1932
|
+
let activeIndex = isInitialOverflow ? initialSlide : swiper.activeIndex;
|
|
1930
1933
|
if (typeof activeSlideIndex === 'undefined') {
|
|
1931
1934
|
activeSlideIndex = swiper.getSlideIndex(slides.find(el => el.classList.contains(params.slideActiveClass)));
|
|
1932
1935
|
} else {
|
|
@@ -1936,7 +1939,6 @@ function loopFix(_temp) {
|
|
|
1936
1939
|
const isPrev = direction === 'prev' || !direction;
|
|
1937
1940
|
let slidesPrepended = 0;
|
|
1938
1941
|
let slidesAppended = 0;
|
|
1939
|
-
const cols = gridEnabled ? Math.ceil(slides.length / params.grid.rows) : slides.length;
|
|
1940
1942
|
const activeColIndex = gridEnabled ? slides[activeSlideIndex].column : activeSlideIndex;
|
|
1941
1943
|
const activeColIndexWithShift = activeColIndex + (centeredSlides && typeof setTranslate === 'undefined' ? -slidesPerView / 2 + 0.5 : 0);
|
|
1942
1944
|
// prepend last slides before start
|
|
@@ -1958,6 +1960,9 @@ function loopFix(_temp) {
|
|
|
1958
1960
|
}
|
|
1959
1961
|
} else if (activeColIndexWithShift + slidesPerView > cols - loopedSlides) {
|
|
1960
1962
|
slidesAppended = Math.max(activeColIndexWithShift - (cols - loopedSlides * 2), slidesPerGroup);
|
|
1963
|
+
if (isInitialOverflow) {
|
|
1964
|
+
slidesAppended = Math.max(slidesAppended, slidesPerView - cols + initialSlide + 1);
|
|
1965
|
+
}
|
|
1961
1966
|
for (let i = 0; i < slidesAppended; i += 1) {
|
|
1962
1967
|
const index = i - Math.floor(i / cols) * cols;
|
|
1963
1968
|
if (gridEnabled) {
|
|
@@ -1973,6 +1978,14 @@ function loopFix(_temp) {
|
|
|
1973
1978
|
requestAnimationFrame(() => {
|
|
1974
1979
|
swiper.__preventObserver__ = false;
|
|
1975
1980
|
});
|
|
1981
|
+
if (swiper.params.effect === 'cards' && slides.length < slidesPerView + loopedSlides * 2) {
|
|
1982
|
+
if (appendSlidesIndexes.includes(activeSlideIndex)) {
|
|
1983
|
+
appendSlidesIndexes.splice(appendSlidesIndexes.indexOf(activeSlideIndex), 1);
|
|
1984
|
+
}
|
|
1985
|
+
if (prependSlidesIndexes.includes(activeSlideIndex)) {
|
|
1986
|
+
prependSlidesIndexes.splice(prependSlidesIndexes.indexOf(activeSlideIndex), 1);
|
|
1987
|
+
}
|
|
1988
|
+
}
|
|
1976
1989
|
if (isPrev) {
|
|
1977
1990
|
prependSlidesIndexes.forEach(index => {
|
|
1978
1991
|
slides[index].swiperLoopMoveDOM = true;
|
|
@@ -2329,7 +2342,9 @@ function onTouchMove(event) {
|
|
|
2329
2342
|
data.isMoved = false;
|
|
2330
2343
|
return;
|
|
2331
2344
|
}
|
|
2332
|
-
} else if (pageX
|
|
2345
|
+
} else if (rtl && (pageX > touches.startX && -swiper.translate <= swiper.maxTranslate() || pageX < touches.startX && -swiper.translate >= swiper.minTranslate())) {
|
|
2346
|
+
return;
|
|
2347
|
+
} else if (!rtl && (pageX < touches.startX && swiper.translate <= swiper.maxTranslate() || pageX > touches.startX && swiper.translate >= swiper.minTranslate())) {
|
|
2333
2348
|
return;
|
|
2334
2349
|
}
|
|
2335
2350
|
}
|
|
@@ -3794,7 +3809,7 @@ class Swiper {
|
|
|
3794
3809
|
|
|
3795
3810
|
// Create loop
|
|
3796
3811
|
if (swiper.params.loop) {
|
|
3797
|
-
swiper.loopCreate();
|
|
3812
|
+
swiper.loopCreate(undefined, true);
|
|
3798
3813
|
}
|
|
3799
3814
|
|
|
3800
3815
|
// Attach events
|
|
@@ -122,6 +122,7 @@ const updateOnVirtualData = swiper => {
|
|
|
122
122
|
swiper.updateSlides();
|
|
123
123
|
swiper.updateProgress();
|
|
124
124
|
swiper.updateSlidesClasses();
|
|
125
|
+
swiper.emit('_virtualUpdated');
|
|
125
126
|
if (swiper.parallax && swiper.params.parallax && swiper.params.parallax.enabled) {
|
|
126
127
|
swiper.parallax.setTranslate();
|
|
127
128
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { s as setInnerHTML } from './utils.js';
|
|
2
|
+
|
|
1
3
|
/* underscore in name -> watch for changes */
|
|
2
4
|
const paramsList = ['eventsPrefix', 'injectStyles', 'injectStylesUrls', 'modules', 'init', '_direction', 'oneWayMovement', 'swiperElementNodeName', 'touchEventsTarget', 'initialSlide', '_speed', 'cssMode', 'updateOnWindowResize', 'resizeObserver', 'nested', 'focusableElements', '_enabled', '_width', '_height', 'preventInteractionOnTransition', 'userAgent', 'url', '_edgeSwipeDetection', '_edgeSwipeThreshold', '_freeMode', '_autoHeight', 'setWrapperSize', 'virtualTranslate', '_effect', 'breakpoints', 'breakpointsBase', '_spaceBetween', '_slidesPerView', 'maxBackfaceHiddenSlides', '_grid', '_slidesPerGroup', '_slidesPerGroupSkip', '_slidesPerGroupAuto', '_centeredSlides', '_centeredSlidesBounds', '_slidesOffsetBefore', '_slidesOffsetAfter', 'normalizeSlideIndex', '_centerInsufficientSlides', '_watchOverflow', 'roundLengths', 'touchRatio', 'touchAngle', 'simulateTouch', '_shortSwipes', '_longSwipes', 'longSwipesRatio', 'longSwipesMs', '_followFinger', 'allowTouchMove', '_threshold', 'touchMoveStopPropagation', 'touchStartPreventDefault', 'touchStartForcePreventDefault', 'touchReleaseOnEdges', 'uniqueNavElements', '_resistance', '_resistanceRatio', '_watchSlidesProgress', '_grabCursor', 'preventClicks', 'preventClicksPropagation', '_slideToClickedSlide', '_loop', 'loopAdditionalSlides', 'loopAddBlankSlides', 'loopPreventsSliding', '_rewind', '_allowSlidePrev', '_allowSlideNext', '_swipeHandler', '_noSwiping', 'noSwipingClass', 'noSwipingSelector', 'passiveListeners', 'containerModifierClass', 'slideClass', 'slideActiveClass', 'slideVisibleClass', 'slideFullyVisibleClass', 'slideNextClass', 'slidePrevClass', 'slideBlankClass', 'wrapperClass', 'lazyPreloaderClass', 'lazyPreloadPrevNext', 'runCallbacksOnInit', 'observer', 'observeParents', 'observeSlideChildren',
|
|
3
5
|
// modules
|
|
@@ -192,14 +194,14 @@ function updateSwiper(_ref) {
|
|
|
192
194
|
if (!nextEl || typeof nextEl === 'string') {
|
|
193
195
|
nextEl = document.createElement('div');
|
|
194
196
|
nextEl.classList.add('swiper-button-next');
|
|
195
|
-
nextEl
|
|
197
|
+
setInnerHTML(nextEl, swiper.hostEl.constructor.nextButtonSvg);
|
|
196
198
|
nextEl.part.add('button-next');
|
|
197
199
|
swiper.el.appendChild(nextEl);
|
|
198
200
|
}
|
|
199
201
|
if (!prevEl || typeof prevEl === 'string') {
|
|
200
202
|
prevEl = document.createElement('div');
|
|
201
203
|
prevEl.classList.add('swiper-button-prev');
|
|
202
|
-
prevEl
|
|
204
|
+
setInnerHTML(prevEl, swiper.hostEl.constructor.prevButtonSvg);
|
|
203
205
|
prevEl.part.add('button-prev');
|
|
204
206
|
swiper.el.appendChild(prevEl);
|
|
205
207
|
}
|
package/dist/node_modules/.pnpm/{swiper@11.2.5 → swiper@11.2.8}/node_modules/swiper/shared/utils.js
RENAMED
|
@@ -299,5 +299,17 @@ function elementOuterSize(el, size, includeMargins) {
|
|
|
299
299
|
function makeElementsArray(el) {
|
|
300
300
|
return (Array.isArray(el) ? el : [el]).filter(e => !!e);
|
|
301
301
|
}
|
|
302
|
+
function setInnerHTML(el, html) {
|
|
303
|
+
if (html === void 0) {
|
|
304
|
+
html = '';
|
|
305
|
+
}
|
|
306
|
+
if (typeof trustedTypes !== 'undefined') {
|
|
307
|
+
el.innerHTML = trustedTypes.createPolicy('html', {
|
|
308
|
+
createHTML: s => s
|
|
309
|
+
}).createHTML(html);
|
|
310
|
+
} else {
|
|
311
|
+
el.innerHTML = html;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
302
314
|
|
|
303
|
-
export {
|
|
315
|
+
export { setCSSProperty as a, elementParents as b, createElement as c, elementChildren as e, now as f, elementOuterSize as h, elementIndex as i, classesToTokens as j, getTranslate as k, elementTransitionEnd as l, makeElementsArray as m, nextTick as n, isObject as o, elementStyle as q, elementNextAll as r, setInnerHTML as s, elementPrevAll as t, animateCSSModeScroll as u, showWarning as v, elementIsChildOf as w, extend as x, deleteProps as y };
|
package/dist/node_modules/.pnpm/{swiper@11.2.5 → swiper@11.2.8}/node_modules/swiper/swiper-react.js
RENAMED
|
@@ -4,7 +4,7 @@ import { g as getParams, m as mountSwiper, a as getChangedParams, u as updateOnV
|
|
|
4
4
|
import { d as uniqueClasses, w as wrapperClass, n as needsNavigation, b as needsScrollbar, a as needsPagination, e as extend, u as updateSwiper } from './shared/update-swiper.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Swiper React 11.2.
|
|
7
|
+
* Swiper React 11.2.8
|
|
8
8
|
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
|
9
9
|
* https://swiperjs.com
|
|
10
10
|
*
|
|
@@ -12,7 +12,7 @@ import { d as uniqueClasses, w as wrapperClass, n as needsNavigation, b as needs
|
|
|
12
12
|
*
|
|
13
13
|
* Released under the MIT License
|
|
14
14
|
*
|
|
15
|
-
* Released on:
|
|
15
|
+
* Released on: May 23, 2025
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
|
|
@@ -15,7 +15,7 @@ function AnnouncementList({ announcements, className, onDismiss, sticky, }) {
|
|
|
15
15
|
const height = Math.floor(size.height);
|
|
16
16
|
document?.documentElement.style.setProperty('--announcements-height', `${height}px`);
|
|
17
17
|
});
|
|
18
|
-
return (jsx("section", { ref: announcementRef, className: clsx(styles['announcement-list'], sticky && styles['sticky'], className), children: jsx(TransitionGroup, { className: styles['list'], role: "list", children: filteredAnnouncements.map(announcement => (jsx(CSSTransition, { classNames: {
|
|
18
|
+
return (jsx("section", { ref: announcementRef, className: clsx(styles['announcement-list'], sticky && styles['sticky'], className), "data-test-selector": "announcementList", children: jsx(TransitionGroup, { className: styles['list'], role: "list", children: filteredAnnouncements.map(announcement => (jsx(CSSTransition, { classNames: {
|
|
19
19
|
enter: styles['enter'],
|
|
20
20
|
enterActive: styles['enter-active'],
|
|
21
21
|
exit: styles['exit'],
|
|
@@ -3,6 +3,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { IconButton } from '../../buttons/icon-button/icon-button.js';
|
|
6
|
+
import { Link } from '../../buttons/link/link.js';
|
|
6
7
|
import { GlyphsArrowSemiBoldRightIcon } from '../../icons/glyph/glyphs-arrow-semibold-right-icon.js';
|
|
7
8
|
import { SolidAttentionIcon } from '../../icons/solid/solid-attention-icon.js';
|
|
8
9
|
import { SolidEventIcon } from '../../icons/solid/solid-event-icon.js';
|
|
@@ -12,7 +13,6 @@ import { SolidNoticeIcon } from '../../icons/solid/solid-notice-icon.js';
|
|
|
12
13
|
import { SolidSaleIcon } from '../../icons/solid/solid-sale-icon.js';
|
|
13
14
|
import { SolidTagIcon } from '../../icons/solid/solid-tag-icon.js';
|
|
14
15
|
import { StrokeCloseboxIcon } from '../../icons/stroke/stroke-closebox-icon.js';
|
|
15
|
-
import { RouteLink } from '../../shared/routing/route-link.js';
|
|
16
16
|
import { multiRef } from '../../shared/utils/refs.js';
|
|
17
17
|
import styles from './announcement.module.css.js';
|
|
18
18
|
|
|
@@ -26,8 +26,8 @@ const iconMap = {
|
|
|
26
26
|
sales: jsx(SolidSaleIcon, {}),
|
|
27
27
|
};
|
|
28
28
|
const Announcement = forwardRef(({ announcement: { href, id, subType, text, title, type }, className, onDismiss, }, ref) => {
|
|
29
|
-
return (jsx("div", { ref: multiRef(ref), className: clsx(styles.announcement, styles[type], styles[subType], className), role: "listitem", children: jsxs("div", { className: styles.wrapper, children: [jsx("div", { className: styles.icon, role: "presentation", children: iconMap[subType] }), jsxs("div", { className: styles.content, children: [jsx("h2", { className: styles.title, children: title }), text &&
|
|
30
|
-
(href ? (jsxs(
|
|
29
|
+
return (jsx("div", { ref: multiRef(ref), className: clsx(styles.announcement, styles[type], styles[subType], className), "data-id": id, "data-sub-type": subType, "data-test-selector": "announcement", "data-type": type, role: "listitem", children: jsxs("div", { className: styles.wrapper, children: [jsx("div", { className: styles.icon, role: "presentation", children: iconMap[subType] }), jsxs("div", { className: styles.content, children: [jsx("h2", { className: styles.title, "data-test-selector": "announcementTitle", children: title }), text &&
|
|
30
|
+
(href ? (jsxs(Link, { className: styles.link, "data-test-selector": "announcementLink", href: href, children: [text, jsx(GlyphsArrowSemiBoldRightIcon, {})] })) : (jsx("p", { className: styles.text, children: text })))] }), jsx(IconButton, { className: styles.close, color: "current-color", "data-test-selector": "announcementCloseButton", onClick: () => onDismiss?.(id), children: jsx(StrokeCloseboxIcon, {}) })] }) }));
|
|
31
31
|
});
|
|
32
32
|
Announcement.displayName = 'Announcement';
|
|
33
33
|
|
|
@@ -10,7 +10,6 @@ import { TextField } from '../../../../forms/text-field/text-field.js';
|
|
|
10
10
|
import { useFormattedMessage } from '../../../../intl/use-formatted-message.js';
|
|
11
11
|
import { validateEmail } from '../../../../shared/model/address.js';
|
|
12
12
|
import { voidFunction } from '../../../../shared/model/defaults.js';
|
|
13
|
-
import { RouteLink } from '../../../../shared/routing/route-link.js';
|
|
14
13
|
import { Heading } from '../../../../typography/heading/heading.js';
|
|
15
14
|
import styles from './sign-in-form.module.css.js';
|
|
16
15
|
|
|
@@ -60,7 +59,7 @@ function SignInForm({ allowGuestSignIn = false, createAccountPath, errorType, in
|
|
|
60
59
|
// form header
|
|
61
60
|
const header = (jsx(Heading, { "data-test-selector": "pageTitle", italic: true, size: "m", tag: "h1", uppercase: true, children: title }));
|
|
62
61
|
// form footer
|
|
63
|
-
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(
|
|
62
|
+
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') }) }))] }));
|
|
64
63
|
return (jsx(Form, { autoComplete: true, className: styles['sign-in-form'], errorMessage: errorMessage, footer: footer, header: header, onSubmit: handleSubmit, title: title, 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 => {
|
|
65
64
|
if (!value)
|
|
66
65
|
return value;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
|
+
import { Button } from '../../../buttons/button/button.js';
|
|
4
5
|
import { FormattedMessage } from '../../../intl/formatted-message.js';
|
|
5
6
|
import { Dialog } from '../../../modals/dialog/dialog.js';
|
|
6
7
|
import { useCreateAccount } from '../../../shared/api/storefront/hooks/authentication/use-create-account.js';
|
|
7
8
|
import { useFetchSession } from '../../../shared/api/storefront/hooks/authentication/use-fetch-session.js';
|
|
8
9
|
import { ExistingAccountError } from '../../../shared/api/storefront/services/authentication-service.js';
|
|
9
|
-
import { RouteButton } from '../../../shared/routing/route-button.js';
|
|
10
10
|
import { useNavigate } from '../../../shared/routing/use-navigate.js';
|
|
11
11
|
import { Page } from '../../components/page/page.js';
|
|
12
12
|
import { LoadingPage } from '../../loading-page/loading-page.js';
|
|
@@ -40,7 +40,7 @@ function CreateAccountPage({ returnUrl } = {}) {
|
|
|
40
40
|
navigate(continuePath, { reload: true });
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
|
-
return (jsxs(Page, { fluid: true, fullHeight: true, "data-test-selector": "createAccountPage", children: [jsx(SignInPageLayout, { fullHeight: true, children: jsx(CreateAccountForm, { errorType: errorType, isDisabled: isDisabled, isPendingCreateAccount: isPendingCreateAccount, onSubmit: onSubmit }) }), jsx(Dialog, { footer: jsx(
|
|
43
|
+
return (jsxs(Page, { fluid: true, fullHeight: true, "data-test-selector": "createAccountPage", children: [jsx(SignInPageLayout, { fullHeight: true, 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." }) }) })] }));
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
export { CreateAccountPage };
|
|
@@ -14,8 +14,8 @@ import { useIsAuthenticated } from '../../../shared/api/storefront/hooks/authent
|
|
|
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 { useSaveCartForLater } from '../../../shared/api/storefront/hooks/cart/use-save-cart-for-later.js';
|
|
17
|
-
import { RouteButton } from '../../../shared/routing/route-button.js';
|
|
18
17
|
import { useToast } from '../../../toast/use-toast.js';
|
|
18
|
+
import { Button } from '../../../buttons/button/button.js';
|
|
19
19
|
import { useFetchCurrentCartLinesWithAtp } from '../../../shared/api/storefront/hooks/cart/use-fetch-current-cart-lines-with-atp.js';
|
|
20
20
|
import { useFetchCurrentCartWithAtp } from '../../../shared/api/storefront/hooks/cart/use-fetch-current-cart-with-atp.js';
|
|
21
21
|
import { getCurrencyCodeBySymbol } from '../../../shared/model/currency.js';
|
|
@@ -81,12 +81,10 @@ function CartContent({ cartLines }) {
|
|
|
81
81
|
if (!currencyCode)
|
|
82
82
|
throw new Error(`Currency code not found for symbol ${currentCart.currencySymbol}`);
|
|
83
83
|
return (jsx(CheckoutPageLayout, { actions: {
|
|
84
|
-
primary: (jsx(
|
|
85
|
-
secondary: (jsx(
|
|
86
|
-
if (!isAuthenticated)
|
|
87
|
-
return;
|
|
84
|
+
primary: (jsx(Button, { withArrow: true, "data-test-selector": "checkoutShippingCartTotalContinueButton", href: "/CheckoutShipping", children: jsx(FormattedMessage, { id: "Start checkout" }) })),
|
|
85
|
+
secondary: isAuthenticated ? (jsx(Button, { color: "secondary", "data-test-selector": "saveCartForLaterButton", onClick: () => {
|
|
88
86
|
saveCartForLater.mutate({ cart: currentCart });
|
|
89
|
-
}, variant: "outline", children: jsx(FormattedMessage, { id: "Save order" }) })),
|
|
87
|
+
}, variant: "outline", children: jsx(FormattedMessage, { id: "Save order" }) })) : (jsx(Button, { color: "secondary", "data-test-selector": "saveCartForLaterButton", href: PATHS.SIGN_IN, variant: "outline", children: jsx(FormattedMessage, { id: "Save order" }) })),
|
|
90
88
|
}, 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, href: cartLine.productUri, image: {
|
|
91
89
|
fit: 'contain',
|
|
92
90
|
image: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
|
+
import { Button } from '../../../buttons/button/button.js';
|
|
3
4
|
import { PrintButton } from '../../../buttons/print-button/print-button.js';
|
|
4
5
|
import { OrderLineCard } from '../../../cards/orderline-card/orderline-card.js';
|
|
5
6
|
import { CartTotals } from '../../../cart-totals/cart-totals.js';
|
|
@@ -10,7 +11,6 @@ import { useFormattedMessage } from '../../../intl/use-formatted-message.js';
|
|
|
10
11
|
import { OrderLineList } from '../../../lists/orderline-list/orderline-list.js';
|
|
11
12
|
import { useSaveCartForLater } from '../../../shared/api/storefront/hooks/cart/use-save-cart-for-later.js';
|
|
12
13
|
import { getCurrencyCodeBySymbol } from '../../../shared/model/currency.js';
|
|
13
|
-
import { RouteButton } from '../../../shared/routing/route-button.js';
|
|
14
14
|
import { formatDateToLocaleString } from '../../../shared/utils/date.js';
|
|
15
15
|
import { ensureNumber } from '../../../shared/utils/number.js';
|
|
16
16
|
import { useToast } from '../../../toast/use-toast.js';
|
|
@@ -52,8 +52,8 @@ function OrderConfirmationPageContent({ cart, }) {
|
|
|
52
52
|
label: t('Order confirmation'),
|
|
53
53
|
},
|
|
54
54
|
], "data-test-selector": "orderConfirmationPage", title: t('Order confirmation'), children: jsx(CheckoutPageLayout, { actions: {
|
|
55
|
-
primary: (jsx(
|
|
56
|
-
secondary: (jsxs(Fragment, { children: [cart.canSaveOrder && (jsx(
|
|
55
|
+
primary: (jsx(Button, { withArrow: true, "data-test-selector": "checkoutReviewAndSubmit_continueShopping", href: "/", children: jsx(FormattedMessage, { id: "Continue shopping" }) })),
|
|
56
|
+
secondary: (jsxs(Fragment, { children: [cart.canSaveOrder && (jsx(Button, { color: "secondary", onClick: () => {
|
|
57
57
|
saveCartForLater.mutate({ cart });
|
|
58
58
|
}, variant: "outline", children: jsx(FormattedMessage, { id: "Save order" }) })), jsx(PrintButton, {})] })),
|
|
59
59
|
}, overview: jsx(CartTotals, { currencyCode: currencyCode, fulfillmentMethod: cart.fulfillmentMethod, orderNumber: cart.orderNumber, shippingCost: cart.shippingAndHandling, subtotal: cart.orderSubTotal, tax: cart.totalTax, total: cart.orderGrandTotal, vatPercentage: cart.cartLines?.[0]?.pricing?.vatRate }), children: jsxs("div", { children: [jsx(CheckoutPageSection, { hasBorder: false, title: t('General'), children: jsx(CheckoutPageSectionContent, { children: jsxs("div", { className: styles['general-order-info'], children: [cart.orderDate && (jsx(InfoDisplay, { id: "order-date", label: t('Order date'), value: formatDateToLocaleString(new Date(cart.orderDate), cultureCode) })), cart.requestedDeliveryDateDisplay && (jsx(InfoDisplay, { id: "requested-delivery-date", label: t('Requested delivery date'), value: formatDateToLocaleString(new Date(cart.requestedDeliveryDateDisplay.toString()), cultureCode) })), cart.poNumber && (jsx(InfoDisplay, { id: "po-number", label: t('PO Number'), value: cart.poNumber }))] }) }) }), jsx(CheckoutPageSection, { hasBorder: false, title: t('Billing and shipping information'), children: jsx(CheckoutPageSectionContent, { children: jsx(BillingAndInvoiceInformation, { billToAddress: {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { Link } from '../../../../buttons/link/link.js';
|
|
3
4
|
import { FormattedMessage } from '../../../../intl/formatted-message.js';
|
|
4
5
|
import { useFormattedMessage } from '../../../../intl/use-formatted-message.js';
|
|
5
6
|
import { Dialog } from '../../../../modals/dialog/dialog.js';
|
|
6
|
-
import { RouteLink } from '../../../../shared/routing/route-link.js';
|
|
7
7
|
import { PATHS } from '../../../paths.js';
|
|
8
8
|
|
|
9
9
|
function CurrencyChangeDialog({ isOpen, onOpenChange, onSubmit, }) {
|
|
10
10
|
const t = useFormattedMessage();
|
|
11
|
-
return (jsx(Dialog, { "data-test-selector": "currencyChangeDialog", isOpen: isOpen, onOpenChange: onOpenChange, onSubmit: onSubmit, shouldCloseOnInteractOutside: true, submitLabel: "Continue", title: t('Currency Change'), children: jsxs("p", { children: [jsx(FormattedMessage, { id: "You selected a country where we invoice in a different currency. This will result in your cart being converted to the new currency. If you would like to review your order, " }), jsx(
|
|
11
|
+
return (jsx(Dialog, { "data-test-selector": "currencyChangeDialog", isOpen: isOpen, onOpenChange: onOpenChange, onSubmit: onSubmit, shouldCloseOnInteractOutside: true, submitLabel: "Continue", title: t('Currency Change'), children: jsxs("p", { children: [jsx(FormattedMessage, { id: "You selected a country where we invoice in a different currency. This will result in your cart being converted to the new currency. If you would like to review your order, " }), jsx(Link, { hasUnderline: true, color: "secondary", href: PATHS.CART, onClick: onSubmit, children: jsx(FormattedMessage, { id: "please go back to your cart." }) }), ' ', jsx(FormattedMessage, { id: "If you want to proceed, click the continue button. If you want to change your country, close this message and select a different country." })] }) }));
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export { CurrencyChangeDialog };
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { Form } from 'react-aria-components';
|
|
4
4
|
import { AddressInfoDisplay } from '../../../../address-info-display/address-info-display.js';
|
|
5
|
+
import { Link } from '../../../../buttons/link/link.js';
|
|
5
6
|
import { Checkbox } from '../../../../forms/checkbox/checkbox.js';
|
|
6
7
|
import { TextField } from '../../../../forms/text-field/text-field.js';
|
|
7
8
|
import { FormattedMessage } from '../../../../intl/formatted-message.js';
|
|
8
9
|
import { useFormattedMessage } from '../../../../intl/use-formatted-message.js';
|
|
9
|
-
import { RouteLink } from '../../../../shared/routing/route-link.js';
|
|
10
10
|
import { PATHS } from '../../../paths.js';
|
|
11
11
|
import { CheckoutPageSection } from '../../layouts/checkout-page-layout/components/checkout-page-section.js';
|
|
12
12
|
import { CheckoutPageSectionContent } from '../../layouts/checkout-page-layout/components/checkout-page-section-content.js';
|
|
@@ -25,7 +25,7 @@ function ReadOnlyAddresses({ billTo, isLoading, isPickup, notes, onSubmit, shipT
|
|
|
25
25
|
? undefined
|
|
26
26
|
: formData.get('notes')?.toString() || '',
|
|
27
27
|
});
|
|
28
|
-
}, children: [jsxs(CheckoutPageSection, { title: jsx(FormattedMessage, { id: "Billing address" }), children: [jsx(CheckoutPageSectionLink, { children: jsxs(
|
|
28
|
+
}, children: [jsxs(CheckoutPageSection, { title: jsx(FormattedMessage, { id: "Billing address" }), children: [jsx(CheckoutPageSectionLink, { children: jsxs(Link, { color: "secondary", href: PATHS.ACCOUNT_ADDRESSES, isDisabled: isLoading, children: [jsx(FormattedMessage, { id: "Edit billing address" }), " >"] }) }), jsxs(CheckoutPageSectionContent, { children: [billTo && (jsx(AddressInfoDisplay, { address: {
|
|
29
29
|
address1: billTo.address1,
|
|
30
30
|
address2: billTo.address2,
|
|
31
31
|
address3: billTo.address3,
|
|
@@ -37,7 +37,7 @@ function ReadOnlyAddresses({ billTo, isLoading, isPickup, notes, onSubmit, shipT
|
|
|
37
37
|
lastName: billTo.lastName,
|
|
38
38
|
phone: billTo.phone,
|
|
39
39
|
postalCode: billTo.postalCode,
|
|
40
|
-
}, "data-test-selector": "billToAddress" })), jsx("div", { className: styles.notes, children: jsx(TextField, { defaultValue: notes, isDisabled: isLoading, isMultiline: true, label: t('Add order notes'), name: "notes", rows: 3, showLabel: true }) })] })] }), jsxs(CheckoutPageSection, { title: jsx(FormattedMessage, { id: isPickup ? 'Pickup address' : 'Shipping address' }), children: [!isPickup && (jsx(CheckoutPageSectionLink, { children: jsxs(
|
|
40
|
+
}, "data-test-selector": "billToAddress" })), jsx("div", { className: styles.notes, children: jsx(TextField, { defaultValue: notes, isDisabled: isLoading, isMultiline: true, label: t('Add order notes'), name: "notes", rows: 3, showLabel: true }) })] })] }), jsxs(CheckoutPageSection, { title: jsx(FormattedMessage, { id: isPickup ? 'Pickup address' : 'Shipping address' }), children: [!isPickup && (jsx(CheckoutPageSectionLink, { children: jsxs(Link, { color: "secondary", href: PATHS.ACCOUNT_ADDRESSES, isDisabled: isLoading, children: [jsx(FormattedMessage, { id: "Edit shipping address" }), " >"] }) })), jsx(CheckoutPageSectionContent, { children: isPickup ? (jsx(SonicAddress, {})) : (jsxs(Fragment, { children: [jsx(Checkbox, { className: styles['use-invoice-checkbox'], "data-test-selector": "checkboxUseBillingAddress", isDisabled: true, isSelected: true, children: jsx(FormattedMessage, { id: "Use billing address" }) }), shipTo && (jsx(AddressInfoDisplay, { address: {
|
|
41
41
|
address1: shipTo.address1,
|
|
42
42
|
address2: shipTo.address2,
|
|
43
43
|
address3: shipTo.address3,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { ProductHit } from '../../../shared/model/hit';
|
|
2
|
+
import { NavigateOptions } from '../../../shared/routing/types';
|
|
2
3
|
interface ProductOverviewProps {
|
|
3
4
|
ProductHitCard: React.ComponentType<{
|
|
4
5
|
hit: ProductHit;
|
|
6
|
+
route?: NavigateOptions;
|
|
5
7
|
}>;
|
|
6
8
|
}
|
|
7
9
|
export declare function ProductOverview({ ProductHitCard }: ProductOverviewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -14,7 +14,7 @@ function ProductOverview({ ProductHitCard }) {
|
|
|
14
14
|
const { currentRefinement, nbHits, nbPages } = usePagination();
|
|
15
15
|
const currentPage = currentRefinement + 1;
|
|
16
16
|
const isLastPage = currentPage === nbPages;
|
|
17
|
-
return (jsxs(Fragment, { children: [isLastPage && nbHits > MAX_QUERY_RESULTS && (jsx(Message, { type: "info", children: jsx(FormattedMessage, { id: "You have reached the end of the results, but there may be more articles available. Adjust your filters or search to discover more!" }) })), jsx(ProductOverviewGrid, { isLoading: isLoading, children: hits.map(hit => isProductHit(hit) ? (jsx(ProductHitCard, { hit: hit }, hit.id)) : (jsx(PromoCard, { href: hit.href, image: hit.image }, hit.id))) })] }));
|
|
17
|
+
return (jsxs(Fragment, { children: [isLastPage && nbHits > MAX_QUERY_RESULTS && (jsx(Message, { type: "info", children: jsx(FormattedMessage, { id: "You have reached the end of the results, but there may be more articles available. Adjust your filters or search to discover more!" }) })), jsx(ProductOverviewGrid, { isLoading: isLoading, children: hits.map(hit => isProductHit(hit) ? (jsx(ProductHitCard, { hit: hit, route: { prefetch: true } }, hit.id)) : (jsx(PromoCard, { href: hit.href, image: hit.image }, hit.id))) })] }));
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export { ProductOverview };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { Button } from '../../../../buttons/button/button.js';
|
|
3
4
|
import { FormattedMessage } from '../../../../intl/formatted-message.js';
|
|
4
5
|
import { useIsBreakpoint } from '../../../../shared/hooks/use-is-breakpoint.js';
|
|
5
|
-
import { RouteButton } from '../../../../shared/routing/route-button.js';
|
|
6
6
|
import { Heading } from '../../../../typography/heading/heading.js';
|
|
7
7
|
import styles from './no-results.module.css.js';
|
|
8
8
|
|
|
9
9
|
function NoResults({ content, title }) {
|
|
10
10
|
const isLg = useIsBreakpoint('lg');
|
|
11
|
-
return (jsxs("div", { className: styles['no-results'], children: [jsx(Heading, { bold: false, className: styles.title, size: isLg ? 's' : 'xs', tag: "h2", children: title }), jsx("p", { className: styles.body, children: content }), jsx("div", { className: styles.buttons, children: jsx(
|
|
11
|
+
return (jsxs("div", { className: styles['no-results'], children: [jsx(Heading, { bold: false, className: styles.title, size: isLg ? 's' : 'xs', tag: "h2", children: title }), jsx("p", { className: styles.body, children: content }), jsx("div", { className: styles.buttons, children: jsx(Button, { withArrow: true, "data-test-selector": "buttonContinueShopping", href: "/", size: "md", children: jsx(FormattedMessage, { id: "Continue shopping" }) }) })] }));
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export { NoResults };
|
|
@@ -16,7 +16,7 @@ function ProductListingPageCategoryCarousel({ currentCategoryPath, }) {
|
|
|
16
16
|
return (jsx(CategoryCarousel, { categoryCards: categories.map((category, index) => (jsx(CategoryCard, { href: category.href, image: {
|
|
17
17
|
image: category.image,
|
|
18
18
|
title: category.name,
|
|
19
|
-
}, title: category.name }, category.href || index))) }));
|
|
19
|
+
}, route: { prefetch: true }, title: category.name }, category.href || index))) }));
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export { ProductListingPageCategoryCarousel };
|
|
@@ -23,7 +23,7 @@ function ProductHitCard({ hit }) {
|
|
|
23
23
|
isVatIncluded: hit.isVatIncluded,
|
|
24
24
|
originalPrice: hit.originalPrice,
|
|
25
25
|
price: hit.price,
|
|
26
|
-
}, sku: hit.id, tags: hit.labels, title: hit.name }, hit.storefrontId));
|
|
26
|
+
}, route: { prefetch: true }, sku: hit.id, tags: hit.labels, title: hit.name }, hit.storefrontId));
|
|
27
27
|
}
|
|
28
28
|
function ProductListingProductOverview() {
|
|
29
29
|
return jsx(ProductOverview, { ProductHitCard: ProductHitCard });
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
+
import { Link } from '../../buttons/link/link.js';
|
|
3
4
|
import { Image } from '../../media/image/image.js';
|
|
4
|
-
import { RouteLink } from '../../shared/routing/route-link.js';
|
|
5
5
|
import styles from './promo-banner.module.css.js';
|
|
6
6
|
|
|
7
7
|
function PromoBanner({ href, image, variant }) {
|
|
8
|
-
return (jsx(
|
|
8
|
+
return (jsx(Link, { className: clsx(styles['promo-banner'], styles[variant]), href: href, tabIndex: 0, children: jsx(Image, { fit: "cover", image: image, title: image.altText }) }));
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export { PromoBanner };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { Link } from '../../buttons/link/link.js';
|
|
3
4
|
import { Image } from '../../media/image/image.js';
|
|
4
|
-
import { RouteLink } from '../../shared/routing/route-link.js';
|
|
5
5
|
import styles from './promo-card.module.css.js';
|
|
6
6
|
|
|
7
7
|
function PromoCard({ href, image, onClick }) {
|
|
8
|
-
return (jsx("div", { className: styles['promo-card-container'], children: jsx(
|
|
8
|
+
return (jsx("div", { className: styles['promo-card-container'], children: jsx(Link, { className: styles['promo-card'], href: href, onClick: onClick, children: jsx(Image, { className: styles.image, fit: "cover", image: image, title: image.altText }) }) }));
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export { PromoCard };
|
|
@@ -5,4 +5,4 @@ export interface UseFetchCartByIdArgs<T> {
|
|
|
5
5
|
id: string;
|
|
6
6
|
select?: (data: CartModel) => T;
|
|
7
7
|
}
|
|
8
|
-
export declare function useFetchCartById<T = CartModel>({ enabled, forceRecalculation, id, select, }: UseFetchCartByIdArgs<T>): import("@tanstack/react-query").UseQueryResult<T
|
|
8
|
+
export declare function useFetchCartById<T = CartModel>({ enabled, forceRecalculation, id, select, }: UseFetchCartByIdArgs<T>): import("@tanstack/react-query").UseQueryResult<import("@tanstack/react-query").NoInfer<T>, Error>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CartModel } from '../../model/storefront.model';
|
|
2
2
|
import { UseFetchCartByIdArgs } from './use-fetch-cart-by-id';
|
|
3
|
-
export declare function useFetchCurrentCart<T = CartModel>(args?: Omit<UseFetchCartByIdArgs<T>, 'id'>): import("@tanstack/react-query").UseQueryResult<T
|
|
3
|
+
export declare function useFetchCurrentCart<T = CartModel>(args?: Omit<UseFetchCartByIdArgs<T>, 'id'>): import("@tanstack/react-query").UseQueryResult<import("@tanstack/react-query").NoInfer<T>, Error>;
|
|
@@ -2,4 +2,4 @@ import { Country } from '../../model/storefront.model';
|
|
|
2
2
|
export declare function useFetchCountriesWithLanguages<TReturnType = Country[]>({ enabled, select, }?: {
|
|
3
3
|
enabled?: boolean;
|
|
4
4
|
select?: (data: Country[]) => TReturnType;
|
|
5
|
-
}): import("@tanstack/react-query").UseQueryResult<TReturnType
|
|
5
|
+
}): import("@tanstack/react-query").UseQueryResult<import("@tanstack/react-query").NoInfer<TReturnType>, Error>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { NavigateFunction } from './types';
|
|
1
|
+
import { ElementType, ReactNode } from 'react';
|
|
2
|
+
import { NavigateFunction, RouteLinkElementProps } from './types';
|
|
3
3
|
export interface RouteProviderProps {
|
|
4
|
+
Link?: ElementType<RouteLinkElementProps>;
|
|
4
5
|
basePath?: string;
|
|
5
6
|
children: ReactNode;
|
|
6
7
|
navigate: NavigateFunction;
|
|
7
8
|
}
|
|
8
|
-
export declare function RouteProvider({ basePath, children, navigate, }: RouteProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function RouteProvider({ basePath, children, Link, navigate, }: RouteProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { useGlobalState } from '../providers/global-state-provider.js';
|
|
4
|
+
import { withRouting } from './with-routing.js';
|
|
4
5
|
|
|
5
|
-
function RouteProvider({ basePath, children, navigate, }) {
|
|
6
|
-
useGlobalState('routing', { basePath, navigate });
|
|
6
|
+
function RouteProvider({ basePath, children, Link = FallbackRouteLink, navigate, }) {
|
|
7
|
+
useGlobalState('routing', { Link, basePath, navigate });
|
|
7
8
|
return jsx(Fragment, { children: children });
|
|
8
9
|
}
|
|
10
|
+
const FallbackRouteLink = withRouting('a');
|
|
9
11
|
|
|
10
12
|
export { RouteProvider };
|