wickes-css2 2.96.0-develop.2 → 2.96.0-develop.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/css/category-main.css +1 -1
- package/build/css/homepage-main.css +1 -1
- package/build/css/main.css +1 -1
- package/build/css/my-account-main-v2.css +1 -1
- package/build/css/my-account-main.css +1 -1
- package/build/css/pdp-main-before-combine.css +1 -1
- package/build/css/pdp-main-non-critical.css +1 -1
- package/build/css/pdp-main.css +1 -1
- package/build/css/plp-main.css +1 -1
- package/build/css/store-locator-main.css +1 -1
- package/build/js/basket.min.js +2 -2
- package/build/js/bundle.min.js +1 -1
- package/build/js/checkout.min.js +2 -2
- package/build/js/emulation.min.js +436 -0
- package/build/js/general.bundle.min.js +1 -1
- package/build/js/merged-checkout.min.js +2 -2
- package/build/js/page/basket-v2.js +3 -3
- package/build/js/page/components/order-summary.js +0 -1
- package/build/js/page/components/sticky-order-observer.js +7 -7
- package/build/js/pdp.bundle.min.js +1 -1
- package/build/js/plp.bundle.min.js +1 -1
- package/build/js/project-list.min.js +1 -1
- package/package.json +1 -1
- package/src/js/components/general/switchVat.js +4 -1
- package/src/js/emulation/basket-data.js +436 -0
- package/src/js/page/basket-v2.js +3 -3
- package/src/js/page/components/order-summary.js +0 -1
- package/src/js/page/components/sticky-order-observer.js +7 -7
- package/src/scss/components/_back-to-top.scss +45 -0
- package/src/scss/components/_order-summary.scss +0 -31
- package/src/scss/components/_sticky-element-appearance.scss +2 -3
|
@@ -385,9 +385,9 @@ Wick.BasketPage = {
|
|
|
385
385
|
callAction(payload, actionCallback, info)
|
|
386
386
|
} else {
|
|
387
387
|
if (initial) {
|
|
388
|
-
Wick.BasketPage.getCartEntries(Wick.BasketData.
|
|
389
|
-
addClassToSummaryAside(Wick.BasketData.
|
|
390
|
-
const initialTotalPrice = Wick.BasketData.
|
|
388
|
+
Wick.BasketPage.getCartEntries(Wick.BasketData.initialCartState);
|
|
389
|
+
addClassToSummaryAside(Wick.BasketData.initialCartState);
|
|
390
|
+
const initialTotalPrice = Wick.BasketData.initialCartState.totalPrice.value;
|
|
391
391
|
updateClearpayVisibility(initialTotalPrice);
|
|
392
392
|
} else {
|
|
393
393
|
updateBasketDataQuantity();
|
|
@@ -22,8 +22,8 @@ export function initStickyObserver(observedElements, stickyElements, collapseSel
|
|
|
22
22
|
if ('IntersectionObserver' in window) {
|
|
23
23
|
io = new IntersectionObserver(
|
|
24
24
|
entries => {
|
|
25
|
-
const
|
|
26
|
-
toggle(
|
|
25
|
+
const shouldBeHidden = entries.some(e => e.isIntersecting || e.boundingClientRect.y < 0);
|
|
26
|
+
toggle(shouldBeHidden);
|
|
27
27
|
},
|
|
28
28
|
{ rootMargin: '0px 0px -20% 0px', threshold: 0 }
|
|
29
29
|
);
|
|
@@ -31,15 +31,15 @@ export function initStickyObserver(observedElements, stickyElements, collapseSel
|
|
|
31
31
|
} else {
|
|
32
32
|
// Fallback for older browsers
|
|
33
33
|
function check() {
|
|
34
|
-
let
|
|
34
|
+
let anyInViewOrAbove = false;
|
|
35
35
|
$observed.each(function () {
|
|
36
36
|
const r = this.getBoundingClientRect();
|
|
37
|
-
if (r.top < window.innerHeight * 0.8 && r.bottom > 0) {
|
|
38
|
-
|
|
39
|
-
return false;
|
|
37
|
+
if ((r.top < window.innerHeight * 0.8 && r.bottom > 0) || r.bottom < 0) {
|
|
38
|
+
anyInViewOrAbove = true;
|
|
39
|
+
return false;
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
-
toggle(
|
|
42
|
+
toggle(anyInViewOrAbove);
|
|
43
43
|
}
|
|
44
44
|
$(window)
|
|
45
45
|
.off('scroll.sticky resize.sticky')
|