@sonic-equipment/ui 128.0.0 → 130.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-query-string-routing.js +2 -2
- package/dist/carousel/carousel.js +3 -3
- package/dist/carousel/pagination/transitions.js +1 -1
- package/dist/carousel/usp-carousel/usp-carousel.js +1 -1
- package/dist/cart-totals/cart-totals.d.ts +3 -1
- package/dist/cart-totals/cart-totals.js +6 -3
- package/dist/checkout/payment.d.ts +1 -2
- package/dist/checkout/payment.js +5 -22
- package/dist/exports.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/intl/translation-id.d.ts +1 -1
- package/dist/media/image-lightbox/image-lightbox.js +3 -3
- package/dist/node_modules/.pnpm/{instantsearch.js@4.75.4_algoliasearch@4.24.0 → instantsearch.js@4.77.3_algoliasearch@4.24.0}/node_modules/instantsearch.js/es/lib/routers/history.js +22 -22
- package/dist/node_modules/.pnpm/{instantsearch.js@4.75.4_algoliasearch@4.24.0 → instantsearch.js@4.77.3_algoliasearch@4.24.0}/node_modules/instantsearch.js/es/lib/stateMappings/simple.js +5 -5
- package/dist/node_modules/.pnpm/{instantsearch.js@4.75.4_algoliasearch@4.24.0 → instantsearch.js@4.77.3_algoliasearch@4.24.0}/node_modules/instantsearch.js/es/lib/utils/documentation.js +1 -1
- package/dist/node_modules/.pnpm/{instantsearch.js@4.75.4_algoliasearch@4.24.0 → instantsearch.js@4.77.3_algoliasearch@4.24.0}/node_modules/instantsearch.js/es/lib/utils/logger.js +1 -1
- package/dist/node_modules/.pnpm/qs@6.9.7/node_modules/qs/lib/stringify.js +1 -1
- package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/modules/thumbs.js +1 -1
- package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/shared/ssr-window.esm.js +2 -2
- package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/shared/swiper-core.js +46 -44
- package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/shared/update-on-virtual-data.js +2 -2
- package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/shared/update-swiper.js +6 -6
- package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/shared/utils.js +25 -9
- package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/swiper-react.js +5 -5
- package/dist/pages/checkout/cart-page/cart-page.js +1 -1
- package/dist/pages/checkout/payment-page/payment-page.js +3 -5
- package/dist/pages/checkout/shipping-page/components/edit-address.d.ts +2 -1
- package/dist/pages/checkout/shipping-page/components/edit-address.js +3 -2
- package/dist/pages/checkout/shipping-page/components/readonly-address.d.ts +2 -1
- package/dist/pages/checkout/shipping-page/components/readonly-address.js +4 -3
- package/dist/pages/checkout/shipping-page/components/sonic-address.d.ts +1 -0
- package/dist/pages/checkout/shipping-page/components/sonic-address.js +9 -0
- package/dist/pages/checkout/shipping-page/components/sonic-address.module.css.js +3 -0
- package/dist/pages/checkout/shipping-page/shipping-page.js +43 -19
- package/dist/pages/checkout/shipping-page/shipping-page.module.css.js +3 -0
- package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart-lines-with-atp.d.ts +31 -5
- package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart-with-atp.d.ts +31 -5
- package/dist/shared/api/storefront/services/website-service.js +7 -7
- package/dist/shared/fetch/request.js +4 -4
- package/dist/shared/providers/global-state-provider.js +2 -2
- package/dist/shared/utils/event-emitter.js +1 -1
- package/dist/styles.css +35 -15
- package/package.json +54 -54
- package/dist/checkout/payment-details.d.ts +0 -8
- package/dist/checkout/payment-details.js +0 -71
- /package/dist/node_modules/.pnpm/{instantsearch.js@4.75.4_algoliasearch@4.24.0 → instantsearch.js@4.77.3_algoliasearch@4.24.0}/node_modules/instantsearch.js/es/lib/utils/noop.js +0 -0
- /package/dist/node_modules/.pnpm/{instantsearch.js@4.75.4_algoliasearch@4.24.0 → instantsearch.js@4.77.3_algoliasearch@4.24.0}/node_modules/instantsearch.js/es/lib/utils/safelyRunOnBrowser.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/modules/free-mode.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/modules/navigation.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/shared/create-element-if-not-defined.js +0 -0
|
@@ -21,7 +21,7 @@ let deviceCached;
|
|
|
21
21
|
function calcDevice(_temp) {
|
|
22
22
|
let {
|
|
23
23
|
userAgent
|
|
24
|
-
} = _temp ===
|
|
24
|
+
} = _temp === undefined ? {} : _temp;
|
|
25
25
|
const support = getSupport();
|
|
26
26
|
const window = getWindow();
|
|
27
27
|
const platform = window.navigator.platform;
|
|
@@ -61,7 +61,7 @@ function calcDevice(_temp) {
|
|
|
61
61
|
return device;
|
|
62
62
|
}
|
|
63
63
|
function getDevice(overrides) {
|
|
64
|
-
if (overrides ===
|
|
64
|
+
if (overrides === undefined) {
|
|
65
65
|
overrides = {};
|
|
66
66
|
}
|
|
67
67
|
if (!deviceCached) {
|
|
@@ -182,7 +182,7 @@ function Observer(_ref) {
|
|
|
182
182
|
const observers = [];
|
|
183
183
|
const window = getWindow();
|
|
184
184
|
const attach = function (target, options) {
|
|
185
|
-
if (options ===
|
|
185
|
+
if (options === undefined) {
|
|
186
186
|
options = {};
|
|
187
187
|
}
|
|
188
188
|
const ObserverFunc = window.MutationObserver || window.WebkitMutationObserver;
|
|
@@ -719,7 +719,7 @@ const toggleSlideClasses$1 = (slideEl, condition, className) => {
|
|
|
719
719
|
}
|
|
720
720
|
};
|
|
721
721
|
function updateSlidesProgress(translate) {
|
|
722
|
-
if (translate ===
|
|
722
|
+
if (translate === undefined) {
|
|
723
723
|
translate = this && this.translate || 0;
|
|
724
724
|
}
|
|
725
725
|
const swiper = this;
|
|
@@ -861,9 +861,9 @@ function updateSlidesClasses() {
|
|
|
861
861
|
}
|
|
862
862
|
} else {
|
|
863
863
|
if (gridEnabled) {
|
|
864
|
-
activeSlide = slides.
|
|
865
|
-
nextSlide = slides.
|
|
866
|
-
prevSlide = slides.
|
|
864
|
+
activeSlide = slides.find(slideEl => slideEl.column === activeIndex);
|
|
865
|
+
nextSlide = slides.find(slideEl => slideEl.column === activeIndex + 1);
|
|
866
|
+
prevSlide = slides.find(slideEl => slideEl.column === activeIndex - 1);
|
|
867
867
|
} else {
|
|
868
868
|
activeSlide = slides[activeIndex];
|
|
869
869
|
}
|
|
@@ -1028,7 +1028,7 @@ function updateActiveIndex(newActiveIndex) {
|
|
|
1028
1028
|
if (swiper.virtual && params.virtual.enabled && params.loop) {
|
|
1029
1029
|
realIndex = getVirtualRealIndex(activeIndex);
|
|
1030
1030
|
} else if (gridEnabled) {
|
|
1031
|
-
const firstSlideInColumn = swiper.slides.
|
|
1031
|
+
const firstSlideInColumn = swiper.slides.find(slideEl => slideEl.column === activeIndex);
|
|
1032
1032
|
let activeSlideIndex = parseInt(firstSlideInColumn.getAttribute('data-swiper-slide-index'), 10);
|
|
1033
1033
|
if (Number.isNaN(activeSlideIndex)) {
|
|
1034
1034
|
activeSlideIndex = Math.max(swiper.slides.indexOf(firstSlideInColumn), 0);
|
|
@@ -1117,7 +1117,7 @@ var update = {
|
|
|
1117
1117
|
};
|
|
1118
1118
|
|
|
1119
1119
|
function getSwiperTranslate(axis) {
|
|
1120
|
-
if (axis ===
|
|
1120
|
+
if (axis === undefined) {
|
|
1121
1121
|
axis = this.isHorizontal() ? 'x' : 'y';
|
|
1122
1122
|
}
|
|
1123
1123
|
const swiper = this;
|
|
@@ -1195,16 +1195,16 @@ function maxTranslate() {
|
|
|
1195
1195
|
}
|
|
1196
1196
|
|
|
1197
1197
|
function translateTo(translate, speed, runCallbacks, translateBounds, internal) {
|
|
1198
|
-
if (translate ===
|
|
1198
|
+
if (translate === undefined) {
|
|
1199
1199
|
translate = 0;
|
|
1200
1200
|
}
|
|
1201
|
-
if (speed ===
|
|
1201
|
+
if (speed === undefined) {
|
|
1202
1202
|
speed = this.params.speed;
|
|
1203
1203
|
}
|
|
1204
|
-
if (runCallbacks ===
|
|
1204
|
+
if (runCallbacks === undefined) {
|
|
1205
1205
|
runCallbacks = true;
|
|
1206
1206
|
}
|
|
1207
|
-
if (translateBounds ===
|
|
1207
|
+
if (translateBounds === undefined) {
|
|
1208
1208
|
translateBounds = true;
|
|
1209
1209
|
}
|
|
1210
1210
|
const swiper = this;
|
|
@@ -1325,7 +1325,7 @@ function transitionEmit(_ref) {
|
|
|
1325
1325
|
}
|
|
1326
1326
|
|
|
1327
1327
|
function transitionStart(runCallbacks, direction) {
|
|
1328
|
-
if (runCallbacks ===
|
|
1328
|
+
if (runCallbacks === undefined) {
|
|
1329
1329
|
runCallbacks = true;
|
|
1330
1330
|
}
|
|
1331
1331
|
const swiper = this;
|
|
@@ -1345,7 +1345,7 @@ function transitionStart(runCallbacks, direction) {
|
|
|
1345
1345
|
}
|
|
1346
1346
|
|
|
1347
1347
|
function transitionEnd(runCallbacks, direction) {
|
|
1348
|
-
if (runCallbacks ===
|
|
1348
|
+
if (runCallbacks === undefined) {
|
|
1349
1349
|
runCallbacks = true;
|
|
1350
1350
|
}
|
|
1351
1351
|
const swiper = this;
|
|
@@ -1370,10 +1370,10 @@ var transition = {
|
|
|
1370
1370
|
};
|
|
1371
1371
|
|
|
1372
1372
|
function slideTo(index, speed, runCallbacks, internal, initial) {
|
|
1373
|
-
if (index ===
|
|
1373
|
+
if (index === undefined) {
|
|
1374
1374
|
index = 0;
|
|
1375
1375
|
}
|
|
1376
|
-
if (runCallbacks ===
|
|
1376
|
+
if (runCallbacks === undefined) {
|
|
1377
1377
|
runCallbacks = true;
|
|
1378
1378
|
}
|
|
1379
1379
|
if (typeof index === 'string') {
|
|
@@ -1523,10 +1523,10 @@ function slideTo(index, speed, runCallbacks, internal, initial) {
|
|
|
1523
1523
|
}
|
|
1524
1524
|
|
|
1525
1525
|
function slideToLoop(index, speed, runCallbacks, internal) {
|
|
1526
|
-
if (index ===
|
|
1526
|
+
if (index === undefined) {
|
|
1527
1527
|
index = 0;
|
|
1528
1528
|
}
|
|
1529
|
-
if (runCallbacks ===
|
|
1529
|
+
if (runCallbacks === undefined) {
|
|
1530
1530
|
runCallbacks = true;
|
|
1531
1531
|
}
|
|
1532
1532
|
if (typeof index === 'string') {
|
|
@@ -1548,7 +1548,7 @@ function slideToLoop(index, speed, runCallbacks, internal) {
|
|
|
1548
1548
|
let targetSlideIndex;
|
|
1549
1549
|
if (gridEnabled) {
|
|
1550
1550
|
const slideIndex = newIndex * swiper.params.grid.rows;
|
|
1551
|
-
targetSlideIndex = swiper.slides.
|
|
1551
|
+
targetSlideIndex = swiper.slides.find(slideEl => slideEl.getAttribute('data-swiper-slide-index') * 1 === slideIndex).column;
|
|
1552
1552
|
} else {
|
|
1553
1553
|
targetSlideIndex = swiper.getSlideIndexByData(newIndex);
|
|
1554
1554
|
}
|
|
@@ -1583,7 +1583,7 @@ function slideToLoop(index, speed, runCallbacks, internal) {
|
|
|
1583
1583
|
}
|
|
1584
1584
|
if (gridEnabled) {
|
|
1585
1585
|
const slideIndex = newIndex * swiper.params.grid.rows;
|
|
1586
|
-
newIndex = swiper.slides.
|
|
1586
|
+
newIndex = swiper.slides.find(slideEl => slideEl.getAttribute('data-swiper-slide-index') * 1 === slideIndex).column;
|
|
1587
1587
|
} else {
|
|
1588
1588
|
newIndex = swiper.getSlideIndexByData(newIndex);
|
|
1589
1589
|
}
|
|
@@ -1597,7 +1597,7 @@ function slideToLoop(index, speed, runCallbacks, internal) {
|
|
|
1597
1597
|
|
|
1598
1598
|
/* eslint no-unused-vars: "off" */
|
|
1599
1599
|
function slideNext(speed, runCallbacks, internal) {
|
|
1600
|
-
if (runCallbacks ===
|
|
1600
|
+
if (runCallbacks === undefined) {
|
|
1601
1601
|
runCallbacks = true;
|
|
1602
1602
|
}
|
|
1603
1603
|
const swiper = this;
|
|
@@ -1638,7 +1638,7 @@ function slideNext(speed, runCallbacks, internal) {
|
|
|
1638
1638
|
|
|
1639
1639
|
/* eslint no-unused-vars: "off" */
|
|
1640
1640
|
function slidePrev(speed, runCallbacks, internal) {
|
|
1641
|
-
if (runCallbacks ===
|
|
1641
|
+
if (runCallbacks === undefined) {
|
|
1642
1642
|
runCallbacks = true;
|
|
1643
1643
|
}
|
|
1644
1644
|
const swiper = this;
|
|
@@ -1706,7 +1706,7 @@ function slidePrev(speed, runCallbacks, internal) {
|
|
|
1706
1706
|
|
|
1707
1707
|
/* eslint no-unused-vars: "off" */
|
|
1708
1708
|
function slideReset(speed, runCallbacks, internal) {
|
|
1709
|
-
if (runCallbacks ===
|
|
1709
|
+
if (runCallbacks === undefined) {
|
|
1710
1710
|
runCallbacks = true;
|
|
1711
1711
|
}
|
|
1712
1712
|
const swiper = this;
|
|
@@ -1719,10 +1719,10 @@ function slideReset(speed, runCallbacks, internal) {
|
|
|
1719
1719
|
|
|
1720
1720
|
/* eslint no-unused-vars: "off" */
|
|
1721
1721
|
function slideToClosest(speed, runCallbacks, internal, threshold) {
|
|
1722
|
-
if (runCallbacks ===
|
|
1722
|
+
if (runCallbacks === undefined) {
|
|
1723
1723
|
runCallbacks = true;
|
|
1724
1724
|
}
|
|
1725
|
-
if (threshold ===
|
|
1725
|
+
if (threshold === undefined) {
|
|
1726
1726
|
threshold = 0.5;
|
|
1727
1727
|
}
|
|
1728
1728
|
const swiper = this;
|
|
@@ -1865,7 +1865,7 @@ function loopFix(_temp) {
|
|
|
1865
1865
|
activeSlideIndex,
|
|
1866
1866
|
byController,
|
|
1867
1867
|
byMousewheel
|
|
1868
|
-
} = _temp ===
|
|
1868
|
+
} = _temp === undefined ? {} : _temp;
|
|
1869
1869
|
const swiper = this;
|
|
1870
1870
|
if (!swiper.params.loop) return;
|
|
1871
1871
|
swiper.emit('beforeLoopFix');
|
|
@@ -1922,7 +1922,7 @@ function loopFix(_temp) {
|
|
|
1922
1922
|
const appendSlidesIndexes = [];
|
|
1923
1923
|
let activeIndex = swiper.activeIndex;
|
|
1924
1924
|
if (typeof activeSlideIndex === 'undefined') {
|
|
1925
|
-
activeSlideIndex = swiper.getSlideIndex(slides.
|
|
1925
|
+
activeSlideIndex = swiper.getSlideIndex(slides.find(el => el.classList.contains(params.slideActiveClass)));
|
|
1926
1926
|
} else {
|
|
1927
1927
|
activeIndex = activeSlideIndex;
|
|
1928
1928
|
}
|
|
@@ -2129,7 +2129,7 @@ var grabCursor = {
|
|
|
2129
2129
|
|
|
2130
2130
|
// Modified from https://stackoverflow.com/questions/54520554/custom-element-getrootnode-closest-function-crossing-multiple-parent-shadowd
|
|
2131
2131
|
function closestElement(selector, base) {
|
|
2132
|
-
if (base ===
|
|
2132
|
+
if (base === undefined) {
|
|
2133
2133
|
base = this;
|
|
2134
2134
|
}
|
|
2135
2135
|
function __closestFrom(el) {
|
|
@@ -2282,7 +2282,7 @@ function onTouchMove(event) {
|
|
|
2282
2282
|
}
|
|
2283
2283
|
let targetTouch;
|
|
2284
2284
|
if (e.type === 'touchmove') {
|
|
2285
|
-
targetTouch = [...e.changedTouches].
|
|
2285
|
+
targetTouch = [...e.changedTouches].find(t => t.identifier === data.touchId);
|
|
2286
2286
|
if (!targetTouch || targetTouch.identifier !== data.touchId) return;
|
|
2287
2287
|
} else {
|
|
2288
2288
|
targetTouch = e;
|
|
@@ -2423,7 +2423,6 @@ function onTouchMove(event) {
|
|
|
2423
2423
|
}
|
|
2424
2424
|
swiper.emit('sliderFirstMove', e);
|
|
2425
2425
|
}
|
|
2426
|
-
let loopFixed;
|
|
2427
2426
|
new Date().getTime();
|
|
2428
2427
|
if (data.isMoved && data.allowThresholdMove && prevTouchesDirection !== swiper.touchesDirection && isLoop && allowLoopFix && Math.abs(diff) >= 1) {
|
|
2429
2428
|
Object.assign(touches, {
|
|
@@ -2446,7 +2445,7 @@ function onTouchMove(event) {
|
|
|
2446
2445
|
resistanceRatio = 0;
|
|
2447
2446
|
}
|
|
2448
2447
|
if (diff > 0) {
|
|
2449
|
-
if (isLoop && allowLoopFix &&
|
|
2448
|
+
if (isLoop && allowLoopFix && true && data.allowThresholdMove && data.currentTranslate > (params.centeredSlides ? swiper.minTranslate() - swiper.slidesSizesGrid[swiper.activeIndex + 1] - (params.slidesPerView !== 'auto' && swiper.slides.length - params.slidesPerView >= 2 ? swiper.slidesSizesGrid[swiper.activeIndex + 1] + swiper.params.spaceBetween : 0) - swiper.params.spaceBetween : swiper.minTranslate())) {
|
|
2450
2449
|
swiper.loopFix({
|
|
2451
2450
|
direction: 'prev',
|
|
2452
2451
|
setTranslate: true,
|
|
@@ -2460,7 +2459,7 @@ function onTouchMove(event) {
|
|
|
2460
2459
|
}
|
|
2461
2460
|
}
|
|
2462
2461
|
} else if (diff < 0) {
|
|
2463
|
-
if (isLoop && allowLoopFix &&
|
|
2462
|
+
if (isLoop && allowLoopFix && true && data.allowThresholdMove && data.currentTranslate < (params.centeredSlides ? swiper.maxTranslate() + swiper.slidesSizesGrid[swiper.slidesSizesGrid.length - 1] + swiper.params.spaceBetween + (params.slidesPerView !== 'auto' && swiper.slides.length - params.slidesPerView >= 2 ? swiper.slidesSizesGrid[swiper.slidesSizesGrid.length - 1] + swiper.params.spaceBetween : 0) : swiper.maxTranslate())) {
|
|
2464
2463
|
swiper.loopFix({
|
|
2465
2464
|
direction: 'next',
|
|
2466
2465
|
setTranslate: true,
|
|
@@ -2533,7 +2532,7 @@ function onTouchEnd(event) {
|
|
|
2533
2532
|
if (e.pointerId !== data.pointerId) return;
|
|
2534
2533
|
targetTouch = e;
|
|
2535
2534
|
} else {
|
|
2536
|
-
targetTouch = [...e.changedTouches].
|
|
2535
|
+
targetTouch = [...e.changedTouches].find(t => t.identifier === data.touchId);
|
|
2537
2536
|
if (!targetTouch || targetTouch.identifier !== data.touchId) return;
|
|
2538
2537
|
}
|
|
2539
2538
|
if (['pointercancel', 'pointerout', 'pointerleave', 'contextmenu'].includes(e.type)) {
|
|
@@ -2907,9 +2906,12 @@ function setBreakpoint() {
|
|
|
2907
2906
|
} = swiper;
|
|
2908
2907
|
const breakpoints = params.breakpoints;
|
|
2909
2908
|
if (!breakpoints || breakpoints && Object.keys(breakpoints).length === 0) return;
|
|
2909
|
+
const document = getDocument();
|
|
2910
2910
|
|
|
2911
|
-
// Get breakpoint for window width and update parameters
|
|
2912
|
-
const
|
|
2911
|
+
// Get breakpoint for window/container width and update parameters
|
|
2912
|
+
const breakpointsBase = params.breakpointsBase === 'window' || !params.breakpointsBase ? params.breakpointsBase : 'container';
|
|
2913
|
+
const breakpointContainer = ['window', 'container'].includes(params.breakpointsBase) || !params.breakpointsBase ? swiper.el : document.querySelector(params.breakpointsBase);
|
|
2914
|
+
const breakpoint = swiper.getBreakpoint(breakpoints, breakpointsBase, breakpointContainer);
|
|
2913
2915
|
if (!breakpoint || swiper.currentBreakpoint === breakpoint) return;
|
|
2914
2916
|
const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined;
|
|
2915
2917
|
const breakpointParams = breakpointOnlyParams || swiper.originalParams;
|
|
@@ -2983,7 +2985,7 @@ function setBreakpoint() {
|
|
|
2983
2985
|
}
|
|
2984
2986
|
|
|
2985
2987
|
function getBreakpoint(breakpoints, base, containerEl) {
|
|
2986
|
-
if (base ===
|
|
2988
|
+
if (base === undefined) {
|
|
2987
2989
|
base = 'window';
|
|
2988
2990
|
}
|
|
2989
2991
|
if (!breakpoints || base === 'container' && !containerEl) return undefined;
|
|
@@ -3251,7 +3253,7 @@ var defaults = {
|
|
|
3251
3253
|
|
|
3252
3254
|
function moduleExtendParams(params, allModulesParams) {
|
|
3253
3255
|
return function extendParams(obj) {
|
|
3254
|
-
if (obj ===
|
|
3256
|
+
if (obj === undefined) {
|
|
3255
3257
|
obj = {};
|
|
3256
3258
|
}
|
|
3257
3259
|
const moduleParamName = Object.keys(obj)[0];
|
|
@@ -3485,7 +3487,7 @@ class Swiper {
|
|
|
3485
3487
|
return elementIndex(slideEl) - firstSlideIndex;
|
|
3486
3488
|
}
|
|
3487
3489
|
getSlideIndexByData(index) {
|
|
3488
|
-
return this.getSlideIndex(this.slides.
|
|
3490
|
+
return this.getSlideIndex(this.slides.find(slideEl => slideEl.getAttribute('data-swiper-slide-index') * 1 === index));
|
|
3489
3491
|
}
|
|
3490
3492
|
recalcSlides() {
|
|
3491
3493
|
const swiper = this;
|
|
@@ -3553,10 +3555,10 @@ class Swiper {
|
|
|
3553
3555
|
swiper.emit('_slideClasses', updates);
|
|
3554
3556
|
}
|
|
3555
3557
|
slidesPerViewDynamic(view, exact) {
|
|
3556
|
-
if (view ===
|
|
3558
|
+
if (view === undefined) {
|
|
3557
3559
|
view = 'current';
|
|
3558
3560
|
}
|
|
3559
|
-
if (exact ===
|
|
3561
|
+
if (exact === undefined) {
|
|
3560
3562
|
exact = false;
|
|
3561
3563
|
}
|
|
3562
3564
|
const swiper = this;
|
|
@@ -3658,7 +3660,7 @@ class Swiper {
|
|
|
3658
3660
|
swiper.emit('update');
|
|
3659
3661
|
}
|
|
3660
3662
|
changeDirection(newDirection, needUpdate) {
|
|
3661
|
-
if (needUpdate ===
|
|
3663
|
+
if (needUpdate === undefined) {
|
|
3662
3664
|
needUpdate = true;
|
|
3663
3665
|
}
|
|
3664
3666
|
const swiper = this;
|
|
@@ -3816,10 +3818,10 @@ class Swiper {
|
|
|
3816
3818
|
return swiper;
|
|
3817
3819
|
}
|
|
3818
3820
|
destroy(deleteInstance, cleanStyles) {
|
|
3819
|
-
if (deleteInstance ===
|
|
3821
|
+
if (deleteInstance === undefined) {
|
|
3820
3822
|
deleteInstance = true;
|
|
3821
3823
|
}
|
|
3822
|
-
if (cleanStyles ===
|
|
3824
|
+
if (cleanStyles === undefined) {
|
|
3823
3825
|
cleanStyles = true;
|
|
3824
3826
|
}
|
|
3825
3827
|
const swiper = this;
|
|
@@ -2,10 +2,10 @@ import { e as extend, p as paramsList, i as isObject, n as needsNavigation, a as
|
|
|
2
2
|
import { d as defaults } from './swiper-core.js';
|
|
3
3
|
|
|
4
4
|
function getParams(obj, splitEvents) {
|
|
5
|
-
if (obj ===
|
|
5
|
+
if (obj === undefined) {
|
|
6
6
|
obj = {};
|
|
7
7
|
}
|
|
8
|
-
if (splitEvents ===
|
|
8
|
+
if (splitEvents === undefined) {
|
|
9
9
|
splitEvents = true;
|
|
10
10
|
}
|
|
11
11
|
const params = {
|
|
@@ -17,25 +17,25 @@ function extend(target, src) {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
function needsNavigation(params) {
|
|
20
|
-
if (params ===
|
|
20
|
+
if (params === undefined) {
|
|
21
21
|
params = {};
|
|
22
22
|
}
|
|
23
23
|
return params.navigation && typeof params.navigation.nextEl === 'undefined' && typeof params.navigation.prevEl === 'undefined';
|
|
24
24
|
}
|
|
25
25
|
function needsPagination(params) {
|
|
26
|
-
if (params ===
|
|
26
|
+
if (params === undefined) {
|
|
27
27
|
params = {};
|
|
28
28
|
}
|
|
29
29
|
return params.pagination && typeof params.pagination.el === 'undefined';
|
|
30
30
|
}
|
|
31
31
|
function needsScrollbar(params) {
|
|
32
|
-
if (params ===
|
|
32
|
+
if (params === undefined) {
|
|
33
33
|
params = {};
|
|
34
34
|
}
|
|
35
35
|
return params.scrollbar && typeof params.scrollbar.el === 'undefined';
|
|
36
36
|
}
|
|
37
37
|
function uniqueClasses(classNames) {
|
|
38
|
-
if (classNames ===
|
|
38
|
+
if (classNames === undefined) {
|
|
39
39
|
classNames = '';
|
|
40
40
|
}
|
|
41
41
|
const classes = classNames.split(' ').map(c => c.trim()).filter(c => !!c);
|
|
@@ -46,7 +46,7 @@ function uniqueClasses(classNames) {
|
|
|
46
46
|
return unique.join(' ');
|
|
47
47
|
}
|
|
48
48
|
function wrapperClass(className) {
|
|
49
|
-
if (className ===
|
|
49
|
+
if (className === undefined) {
|
|
50
50
|
className = '';
|
|
51
51
|
}
|
|
52
52
|
if (!className) return 'swiper-wrapper';
|
|
@@ -82,7 +82,7 @@ function updateSwiper(_ref) {
|
|
|
82
82
|
let loopNeedDestroy;
|
|
83
83
|
let loopNeedEnable;
|
|
84
84
|
let loopNeedReloop;
|
|
85
|
-
if (changedParams.includes('thumbs') && passedParams.thumbs && passedParams.thumbs.swiper && currentParams.thumbs && !currentParams.thumbs.swiper) {
|
|
85
|
+
if (changedParams.includes('thumbs') && passedParams.thumbs && passedParams.thumbs.swiper && !passedParams.thumbs.swiper.destroyed && currentParams.thumbs && (!currentParams.thumbs.swiper || currentParams.thumbs.swiper.destroyed)) {
|
|
86
86
|
needThumbsInit = true;
|
|
87
87
|
}
|
|
88
88
|
if (changedParams.includes('controller') && passedParams.controller && passedParams.controller.control && currentParams.controller && !currentParams.controller.control) {
|
package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/shared/utils.js
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as getWindow } from './ssr-window.esm.js';
|
|
2
2
|
|
|
3
3
|
function classesToTokens(classes) {
|
|
4
|
-
if (classes ===
|
|
4
|
+
if (classes === undefined) {
|
|
5
5
|
classes = '';
|
|
6
6
|
}
|
|
7
7
|
return classes.trim().split(' ').filter(c => !!c.trim());
|
|
@@ -23,7 +23,7 @@ function deleteProps(obj) {
|
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
function nextTick(callback, delay) {
|
|
26
|
-
if (delay ===
|
|
26
|
+
if (delay === undefined) {
|
|
27
27
|
delay = 0;
|
|
28
28
|
}
|
|
29
29
|
return setTimeout(callback, delay);
|
|
@@ -46,7 +46,7 @@ function getComputedStyle(el) {
|
|
|
46
46
|
return style;
|
|
47
47
|
}
|
|
48
48
|
function getTranslate(el, axis) {
|
|
49
|
-
if (axis ===
|
|
49
|
+
if (axis === undefined) {
|
|
50
50
|
axis = 'x';
|
|
51
51
|
}
|
|
52
52
|
const window = getWindow();
|
|
@@ -178,11 +178,12 @@ function animateCSSModeScroll(_ref) {
|
|
|
178
178
|
animate();
|
|
179
179
|
}
|
|
180
180
|
function elementChildren(element, selector) {
|
|
181
|
-
if (selector ===
|
|
181
|
+
if (selector === undefined) {
|
|
182
182
|
selector = '';
|
|
183
183
|
}
|
|
184
|
+
const window = getWindow();
|
|
184
185
|
const children = [...element.children];
|
|
185
|
-
if (element instanceof HTMLSlotElement) {
|
|
186
|
+
if (window.HTMLSlotElement && element instanceof HTMLSlotElement) {
|
|
186
187
|
children.push(...element.assignedElements());
|
|
187
188
|
}
|
|
188
189
|
if (!selector) {
|
|
@@ -190,11 +191,26 @@ function elementChildren(element, selector) {
|
|
|
190
191
|
}
|
|
191
192
|
return children.filter(el => el.matches(selector));
|
|
192
193
|
}
|
|
194
|
+
function elementIsChildOfSlot(el, slot) {
|
|
195
|
+
// Breadth-first search through all parent's children and assigned elements
|
|
196
|
+
const elementsQueue = [slot];
|
|
197
|
+
while (elementsQueue.length > 0) {
|
|
198
|
+
const elementToCheck = elementsQueue.shift();
|
|
199
|
+
if (el === elementToCheck) {
|
|
200
|
+
return true;
|
|
201
|
+
}
|
|
202
|
+
elementsQueue.push(...elementToCheck.children, ...(elementToCheck.shadowRoot?.children || []), ...(elementToCheck.assignedElements?.() || []));
|
|
203
|
+
}
|
|
204
|
+
}
|
|
193
205
|
function elementIsChildOf(el, parent) {
|
|
194
|
-
const
|
|
195
|
-
|
|
206
|
+
const window = getWindow();
|
|
207
|
+
let isChild = parent.contains(el);
|
|
208
|
+
if (!isChild && window.HTMLSlotElement && parent instanceof HTMLSlotElement) {
|
|
196
209
|
const children = [...parent.assignedElements()];
|
|
197
|
-
|
|
210
|
+
isChild = children.includes(el);
|
|
211
|
+
if (!isChild) {
|
|
212
|
+
isChild = elementIsChildOfSlot(el, parent);
|
|
213
|
+
}
|
|
198
214
|
}
|
|
199
215
|
return isChild;
|
|
200
216
|
}
|
|
@@ -207,7 +223,7 @@ function showWarning(text) {
|
|
|
207
223
|
}
|
|
208
224
|
}
|
|
209
225
|
function createElement(tag, classes) {
|
|
210
|
-
if (classes ===
|
|
226
|
+
if (classes === undefined) {
|
|
211
227
|
classes = [];
|
|
212
228
|
}
|
|
213
229
|
const el = document.createElement(tag);
|
package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/swiper-react.js
RENAMED
|
@@ -4,15 +4,15 @@ 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.1
|
|
7
|
+
* Swiper React 11.2.1
|
|
8
8
|
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
|
9
9
|
* https://swiperjs.com
|
|
10
10
|
*
|
|
11
|
-
* Copyright 2014-
|
|
11
|
+
* Copyright 2014-2025 Vladimir Kharlampidi
|
|
12
12
|
*
|
|
13
13
|
* Released under the MIT License
|
|
14
14
|
*
|
|
15
|
-
* Released on:
|
|
15
|
+
* Released on: January 10, 2025
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
|
|
@@ -130,7 +130,7 @@ const Swiper = /*#__PURE__*/forwardRef(function (_temp, externalElRef) {
|
|
|
130
130
|
children,
|
|
131
131
|
onSwiper,
|
|
132
132
|
...rest
|
|
133
|
-
} = _temp ===
|
|
133
|
+
} = _temp === undefined ? {} : _temp;
|
|
134
134
|
let eventsAssigned = false;
|
|
135
135
|
const [containerClasses, setContainerClasses] = useState('swiper');
|
|
136
136
|
const [virtualData, setVirtualData] = useState(null);
|
|
@@ -317,7 +317,7 @@ const SwiperSlide = /*#__PURE__*/forwardRef(function (_temp, externalRef) {
|
|
|
317
317
|
virtualIndex,
|
|
318
318
|
swiperSlideIndex,
|
|
319
319
|
...rest
|
|
320
|
-
} = _temp ===
|
|
320
|
+
} = _temp === undefined ? {} : _temp;
|
|
321
321
|
const slideElRef = useRef(null);
|
|
322
322
|
const [slideClasses, setSlideClasses] = useState('swiper-slide');
|
|
323
323
|
const [lazyLoaded, setLazyLoaded] = useState(false);
|
|
@@ -78,7 +78,7 @@ function CartContent({ cartLines }) {
|
|
|
78
78
|
if (!currentCart)
|
|
79
79
|
return null;
|
|
80
80
|
return (jsx(CheckoutPageLayout, { actions: {
|
|
81
|
-
primary: (jsx(RouteButton, { withArrow: true, href: "/CheckoutShipping", children: jsx(FormattedMessage, { id: "Continue shopping" }) })),
|
|
81
|
+
primary: (jsx(RouteButton, { withArrow: true, "data-test-selector": "checkoutShippingCartTotalContinueButton", href: "/CheckoutShipping", children: jsx(FormattedMessage, { id: "Continue shopping" }) })),
|
|
82
82
|
secondary: (jsx(RouteButton, { color: "secondary", href: isAuthenticated ? undefined : '/signin', onClick: () => {
|
|
83
83
|
if (!isAuthenticated)
|
|
84
84
|
return;
|
|
@@ -12,7 +12,6 @@ import { OrderLineList } from '../../../lists/orderline-list/orderline-list.js';
|
|
|
12
12
|
import { useIsAuthenticated } from '../../../shared/api/storefront/hooks/authentication/use-is-authenticated.js';
|
|
13
13
|
import { useFetchCurrentCheckoutAtp } from '../../../shared/api/storefront/hooks/cart/use-fetch-current-cart-checkout-atp.js';
|
|
14
14
|
import { useFetchCurrentCartWithAtp } from '../../../shared/api/storefront/hooks/cart/use-fetch-current-cart-with-atp.js';
|
|
15
|
-
import { useFetchFulfillmentMethodsForCurrentCart } from '../../../shared/api/storefront/hooks/customer/use-fetch-fulfillment-methods-for-current-cart.js';
|
|
16
15
|
import { useNavigate } from '../../../shared/routing/route-provider.js';
|
|
17
16
|
import { hasNo } from '../../../shared/utils/types.js';
|
|
18
17
|
import { Page } from '../../components/page/page.js';
|
|
@@ -30,8 +29,8 @@ function PaymentPage() {
|
|
|
30
29
|
forceRecalculation: !hasReturnedFromAdyen,
|
|
31
30
|
});
|
|
32
31
|
const { data: atp, isLoading: isAtpLoading } = useFetchCurrentCheckoutAtp();
|
|
33
|
-
const
|
|
34
|
-
const isLoading = isLoadingCart || isAtpLoading
|
|
32
|
+
const hasAtp = atp && atp.length > 0 && atp[0]?.date !== null;
|
|
33
|
+
const isLoading = isLoadingCart || isAtpLoading;
|
|
35
34
|
const t = useFormattedMessage();
|
|
36
35
|
const [isProcessing, setIsProcessing] = useState(false);
|
|
37
36
|
const [isValidating, setIsValidating] = useState(false);
|
|
@@ -60,7 +59,6 @@ function PaymentPage() {
|
|
|
60
59
|
if (!isAuthenticated ||
|
|
61
60
|
hasNo(atp) ||
|
|
62
61
|
hasNo(cart) ||
|
|
63
|
-
hasNo(fulfillmentMethods) ||
|
|
64
62
|
hasNo(cart.cartLines) ||
|
|
65
63
|
cart.cartLines.length === 0 ||
|
|
66
64
|
hasNo(cart.billTo?.address1))
|
|
@@ -70,7 +68,7 @@ function PaymentPage() {
|
|
|
70
68
|
{ href: '/CheckoutReviewAndSubmit', label: t('Review and payment') },
|
|
71
69
|
], title: t('Review and payment'), children: jsxs(CheckoutPageLayout, { actions: {
|
|
72
70
|
primary: (jsx(Button, { withArrow: true, "data-test-selector": "checkoutShippingCartTotalContinueButton", form: PAYMENT_FORM_ID, isDisabled: isProcessing, isLoading: isProcessing ? (jsx(FormattedMessage, { id: "Processing" })) : isValidating ? (jsx(FormattedMessage, { id: "Validating" })) : (false), type: "submit", children: jsx(FormattedMessage, { id: "Pay" }) })),
|
|
73
|
-
}, mobileSummary: jsx(CartTotalsSummary, { totalAmount: cart.orderGrandTotalDisplay }), overview: jsx(CartTotals, { fulfillmentMethod: cart.fulfillmentMethod, shippingCost: cart.shippingAndHandlingDisplay, subtotal: cart.orderSubTotalDisplay, tax: cart.totalTaxDisplay, total: cart.orderGrandTotalDisplay, vatPercentage: cart.cartLines[0]?.pricing?.vatRate || 0 }), children: [jsx(CheckoutPageSection, { hasBorder: false, title: jsx(FormattedMessage, { id: "Payment" }), children: jsx(CheckoutPageSectionContent, { children: jsx(Payment, { atp: atp, cart: cart, form: PAYMENT_FORM_ID,
|
|
71
|
+
}, mobileSummary: jsx(CartTotalsSummary, { totalAmount: cart.orderGrandTotalDisplay }), overview: jsx(CartTotals, { deliveryDate: hasAtp ? undefined : cart.requestedDeliveryDate, fulfillmentMethod: cart.fulfillmentMethod, shippingCost: cart.shippingAndHandlingDisplay, subtotal: cart.orderSubTotalDisplay, tax: cart.totalTaxDisplay, total: cart.orderGrandTotalDisplay, vatPercentage: cart.cartLines[0]?.pricing?.vatRate || 0 }), children: [jsx(CheckoutPageSection, { hasBorder: false, title: jsx(FormattedMessage, { id: "Payment" }), children: jsx(CheckoutPageSectionContent, { children: jsx(Payment, { atp: atp, cart: cart, form: PAYMENT_FORM_ID, onPaymentComplete: onPaymentComplete, onProcessing: setIsProcessing, onValidating: setIsValidating }) }) }), jsx(CheckoutPageSection, { hasBorder: false, title: jsx(FormattedMessage, { id: "Order" }), children: jsx(CheckoutPageSectionContent, { stretch: true, children: jsx(OrderLineList, { children: cart.cartLines.map(cartLine => (jsx(OrderLineCard, { deliveryDate: cartLine.atp?.date, href: cartLine.productUri, image: {
|
|
74
72
|
fit: 'contain',
|
|
75
73
|
image: {
|
|
76
74
|
'1': cartLine.smallImagePath,
|
|
@@ -13,9 +13,10 @@ interface Address {
|
|
|
13
13
|
phone: string;
|
|
14
14
|
postalCode: string;
|
|
15
15
|
}
|
|
16
|
-
export declare function EditAddresses({ countries, isLoading, onSubmit, }: {
|
|
16
|
+
export declare function EditAddresses({ countries, isLoading, isPickup, onSubmit, }: {
|
|
17
17
|
countries: CountryModel[];
|
|
18
18
|
isLoading: boolean;
|
|
19
|
+
isPickup: boolean;
|
|
19
20
|
onSubmit: (event: {
|
|
20
21
|
address: Address;
|
|
21
22
|
notes: string;
|
|
@@ -10,10 +10,11 @@ import { validatePhone, validateEmail } from '../../../../shared/model/address.j
|
|
|
10
10
|
import { Tooltip } from '../../../../tooltip/tooltip.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';
|
|
13
|
+
import { SonicAddress } from './sonic-address.js';
|
|
13
14
|
import styles from './edit-address.module.css.js';
|
|
14
15
|
|
|
15
16
|
const EDIT_ADDRESS_FORM_ID = 'billToForm';
|
|
16
|
-
function EditAddresses({ countries, isLoading, onSubmit, }) {
|
|
17
|
+
function EditAddresses({ countries, isLoading, isPickup, onSubmit, }) {
|
|
17
18
|
const t = useFormattedMessage();
|
|
18
19
|
const [companyName, setCompanyName] = useState('');
|
|
19
20
|
const [lastName, setLastName] = useState('');
|
|
@@ -48,7 +49,7 @@ function EditAddresses({ countries, isLoading, onSubmit, }) {
|
|
|
48
49
|
if (!value)
|
|
49
50
|
return value;
|
|
50
51
|
return validateEmail(value) || 'Vul een geldig emailadres in';
|
|
51
|
-
} }) }), jsx("div", { className: styles['span-2'], children: jsx(TextField, { isDisabled: isLoading, isMultiline: true, label: t('Add order notes'), name: "notes", rows: 3, showLabel: true }) })] }) }) }), jsx(CheckoutPageSection, { title: jsx(FormattedMessage, { id:
|
|
52
|
+
} }) }), jsx("div", { className: styles['span-2'], children: jsx(TextField, { isDisabled: isLoading, isMultiline: true, label: t('Add order notes'), name: "notes", rows: 3, showLabel: true }) })] }) }) }), jsx(CheckoutPageSection, { title: jsx(FormattedMessage, { id: isPickup ? 'Pickup address' : 'Shipping address' }), children: jsx(CheckoutPageSectionContent, { children: jsx(Fragment, { children: isPickup ? (jsx(SonicAddress, {})) : (jsxs("div", { className: styles['use-invoice-checkbox'], children: [jsx(Checkbox, { isDisabled: true, isSelected: true, children: jsx(FormattedMessage, { id: "Use billing address" }) }), jsx(Tooltip, { text: t('Changing your address is currently not possible. Please contact customer support to change your address.') })] })) }) }) })] }));
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
export { EDIT_ADDRESS_FORM_ID, EditAddresses };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { BillToModel, ShipToModel } from '../../../../shared/api/storefront/model/storefront.model';
|
|
2
|
-
export declare function ReadOnlyAddresses({ billTo, isLoading, notes, onSubmit, shipTo, }: {
|
|
2
|
+
export declare function ReadOnlyAddresses({ billTo, isLoading, isPickup, notes, onSubmit, shipTo, }: {
|
|
3
3
|
billTo: BillToModel | undefined | null;
|
|
4
4
|
isLoading: boolean;
|
|
5
|
+
isPickup: boolean;
|
|
5
6
|
notes: string;
|
|
6
7
|
onSubmit: ({ notes }: {
|
|
7
8
|
notes: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { Form } from 'react-aria-components';
|
|
3
3
|
import { Address } from '../../../../address/address.js';
|
|
4
4
|
import { Checkbox } from '../../../../forms/checkbox/checkbox.js';
|
|
@@ -10,10 +10,11 @@ import { CheckoutPageSection } from '../../layouts/checkout-page-layout/componen
|
|
|
10
10
|
import { CheckoutPageSectionContent } from '../../layouts/checkout-page-layout/components/checkout-page-section-content.js';
|
|
11
11
|
import { CheckoutPageSectionLink } from '../../layouts/checkout-page-layout/components/checkout-page-section-link.js';
|
|
12
12
|
import { EDIT_ADDRESS_FORM_ID } from './edit-address.js';
|
|
13
|
+
import { SonicAddress } from './sonic-address.js';
|
|
13
14
|
import styles from './readonly-address.module.css.js';
|
|
14
15
|
|
|
15
16
|
const ACCOUNT_ADDRESSES_PATH = '/MyAccount/Addresses';
|
|
16
|
-
function ReadOnlyAddresses({ billTo, isLoading, notes, onSubmit, shipTo, }) {
|
|
17
|
+
function ReadOnlyAddresses({ billTo, isLoading, isPickup, notes, onSubmit, shipTo, }) {
|
|
17
18
|
const t = useFormattedMessage();
|
|
18
19
|
return (jsxs(Form, { "data-test-selector": "billToAddressForm", id: EDIT_ADDRESS_FORM_ID, onSubmit: e => {
|
|
19
20
|
e.preventDefault();
|
|
@@ -21,7 +22,7 @@ function ReadOnlyAddresses({ billTo, isLoading, notes, onSubmit, shipTo, }) {
|
|
|
21
22
|
onSubmit({
|
|
22
23
|
notes: formData.get('notes')?.toString() || '',
|
|
23
24
|
});
|
|
24
|
-
}, children: [jsxs(CheckoutPageSection, { title: jsx(FormattedMessage, { id: "Billing address" }), children: [jsx(CheckoutPageSectionLink, { children: jsxs(RouteLink, { color: "secondary", href: ACCOUNT_ADDRESSES_PATH, isDisabled: isLoading, children: [jsx(FormattedMessage, { id: "Edit billing address" }), " >"] }) }), jsxs(CheckoutPageSectionContent, { children: [billTo && (jsx(Address, { address1: billTo.address1, address2: billTo.address2, address3: billTo.address3, city: billTo.city, companyName: billTo.companyName, country: billTo.country?.name, email: billTo.email, firstName: billTo.firstName, lastName: billTo.lastName, phone: billTo.phone, postalCode: billTo.postalCode })), 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:
|
|
25
|
+
}, children: [jsxs(CheckoutPageSection, { title: jsx(FormattedMessage, { id: "Billing address" }), children: [jsx(CheckoutPageSectionLink, { children: jsxs(RouteLink, { color: "secondary", href: ACCOUNT_ADDRESSES_PATH, isDisabled: isLoading, children: [jsx(FormattedMessage, { id: "Edit billing address" }), " >"] }) }), jsxs(CheckoutPageSectionContent, { children: [billTo && (jsx(Address, { address1: billTo.address1, address2: billTo.address2, address3: billTo.address3, city: billTo.city, companyName: billTo.companyName, country: billTo.country?.name, email: billTo.email, firstName: billTo.firstName, lastName: billTo.lastName, phone: billTo.phone, postalCode: billTo.postalCode })), 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(RouteLink, { color: "secondary", href: ACCOUNT_ADDRESSES_PATH, 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'], isDisabled: true, isSelected: true, children: jsx(FormattedMessage, { id: "Use billing address" }) }), shipTo && (jsx(Address, { address1: shipTo.address1, address2: shipTo.address2, address3: shipTo.address3, city: shipTo.city, companyName: shipTo.companyName, country: shipTo.country?.name, email: shipTo.email, firstName: shipTo.firstName, lastName: shipTo.lastName, phone: shipTo.phone, postalCode: shipTo.postalCode }))] })) })] })] }));
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
export { ReadOnlyAddresses };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SonicAddress(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { FormattedMessage } from '../../../../intl/formatted-message.js';
|
|
3
|
+
import styles from './sonic-address.module.css.js';
|
|
4
|
+
|
|
5
|
+
function SonicAddress() {
|
|
6
|
+
return (jsx("div", { className: styles['sonic-address'], children: jsx(FormattedMessage, { id: "Sonic address" }) }));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { SonicAddress };
|