wickes-css2 2.103.0-RG-1742-billie-30-60-90-days.3 → 2.103.0-develop.10
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/Readme.md +5 -1
- package/build/css/category-main.css +1 -1
- package/build/css/components/card-product-banner.css +1 -1
- package/build/css/homepage-main.css +1 -1
- package/build/css/kitchen-plp-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/pages/page_products-list-combined.css +1 -1
- package/build/css/pages/page_products-list.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 +1301 -369
- package/build/js/general.bundle.min.js +1 -1
- package/build/js/merged-checkout.min.js +2 -2
- package/build/js/mini-basket-slider.min.js +1 -0
- package/build/js/page/basket/basket-update-cart-action.js +59 -0
- package/build/js/page/basket/basket-update-cart.js +29 -0
- package/build/js/page/basket/basket-utils.js +50 -0
- package/build/js/page/basket/mini-basket-total.js +97 -0
- package/build/js/page/basket/quantity-change-handler.js +64 -0
- package/build/js/page/basket/update-quantity-operation.js +37 -0
- package/build/js/page/basket/update-quantity.js +65 -0
- package/build/js/page/basket-v2.js +138 -244
- package/build/js/page/checkout-payment-details.js +43 -96
- package/build/js/page/components/discounts.js +6 -6
- package/build/js/page/components/mini-basket-slider.js +569 -0
- package/build/js/page/plp-cards-v2.js +15 -6
- package/build/js/page/plp-load-more.js +1 -1
- 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 +18 -3
- package/src/components/card_product_v2.hbs +10 -5
- package/src/components/card_sponsor_banner.hbs +8 -0
- package/src/components/card_sponsor_product.hbs +6 -0
- package/src/components/checkout-payment-details-v2.hbs +23 -35
- package/src/components/injected-content.hbs +1 -1
- package/src/components/mini-basket/mini-basket-empty.hbs +3 -13
- package/src/components/mini-basket/mini-basket-order-item.hbs +73 -0
- package/src/components/mini-basket/mini-basket.hbs +32 -13
- package/src/components/mini-basket/product-item.hbs +37 -16
- package/src/components/srp-injected.hbs +3 -13
- package/src/data/data_confirmation-summary.json +4 -2
- package/src/data/data_mini-basket.json +4 -80
- package/src/data/data_search-results_v2.json +56 -141
- package/src/js/components/banner-placement-manager.js +267 -0
- package/src/js/components/general/cart-slider.js +4 -0
- package/src/js/components/general/create-popup-slider.js +5 -2
- package/src/js/emulation/account-hub.js +40 -40
- package/src/js/emulation/banner-placement-manager.js +53 -0
- package/src/js/emulation/checkout-payment-details.js +8 -8
- package/src/js/emulation/custom-slider-emulation.js +4 -10
- package/src/js/emulation/forms.js +89 -118
- package/src/js/emulation/mini-basket-data.js +949 -0
- package/src/js/emulation/paymentLoader.js +3 -4
- package/src/js/page/basket/basket-update-cart-action.js +59 -0
- package/src/js/page/basket/basket-update-cart.js +29 -0
- package/src/js/page/basket/basket-utils.js +50 -0
- package/src/js/page/basket/mini-basket-total.js +97 -0
- package/src/js/page/basket/quantity-change-handler.js +64 -0
- package/src/js/page/basket/update-quantity-operation.js +37 -0
- package/src/js/page/basket/update-quantity.js +65 -0
- package/src/js/page/basket-v2.js +138 -244
- package/src/js/page/checkout-payment-details.js +43 -96
- package/src/js/page/components/discounts.js +6 -6
- package/src/js/page/components/mini-basket-slider.js +569 -0
- package/src/js/page/plp-cards-v2.js +15 -6
- package/src/js/page/plp-load-more.js +1 -1
- package/src/layouts/base.hbs +0 -6
- package/src/page_plp_v2.html +17 -6
- package/src/page_search-results.html +12 -2
- package/src/partials/scripts.hbs +1 -0
- package/src/scss/category-main.scss +1 -0
- package/src/scss/components/_custom-slider.scss +131 -3
- package/src/scss/components/_popover-mini-basket.scss +0 -4
- package/src/scss/components/card-product-banner.scss +91 -3
- package/src/scss/emulation.scss +3 -3
- package/src/scss/helpers/_colors-semantic.scss +120 -0
- package/src/scss/helpers/_variables.scss +2 -0
- package/src/scss/main.scss +0 -2
- package/src/scss/pages/_facets.scss +86 -0
- package/src/scss/pages/page_products-list-combined.scss +11 -0
- package/src/scss/pages/page_products-list.scss +8 -0
- package/src/scss/plp-main.scss +1 -0
- package/build/css/components/checkout-chip.css +0 -1
- package/build/css/components/checkout-payment-repayment-terms.css +0 -1
- package/src/components/checkout-chip.hbs +0 -15
- package/src/components/checkout-payment-repayment-terms.hbs +0 -12
- package/src/data/data_billie-terms.json +0 -7
- package/src/js/components/general/mini-basket-slider.js +0 -8
- package/src/js/components/product-banner.js +0 -148
- package/src/js/emulation/repayment-toggle.js +0 -35
- package/src/scss/components/checkout-chip.scss +0 -64
- package/src/scss/components/checkout-payment-repayment-terms.scss +0 -39
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<div class="checkout-chip">
|
|
2
|
-
<input
|
|
3
|
-
class="checkout-chip__input"
|
|
4
|
-
type="radio"
|
|
5
|
-
name="{{name}}"
|
|
6
|
-
id="{{id}}"
|
|
7
|
-
value="{{value}}"
|
|
8
|
-
{{#if checked}}checked{{/if}}
|
|
9
|
-
/>
|
|
10
|
-
|
|
11
|
-
<label class="checkout-chip__label" for="{{id}}">
|
|
12
|
-
<span class="checkout-chip__label-top">{{top}}</span>
|
|
13
|
-
<span class="checkout-chip__label-bottom">{{bottom}}</span>
|
|
14
|
-
</label>
|
|
15
|
-
</div>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<div class="repayment-terms">
|
|
2
|
-
<div class="repayment-terms__title">
|
|
3
|
-
<span class="repayment-terms__asterisk">*</span>
|
|
4
|
-
<span>{{title}}</span>
|
|
5
|
-
</div>
|
|
6
|
-
|
|
7
|
-
<div class="repayment-terms__chips" role="radiogroup">
|
|
8
|
-
{{#each repaymentTerms}}
|
|
9
|
-
{{> checkout-chip name=../name }}
|
|
10
|
-
{{/each}}
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
var Wick = Wick || {};
|
|
2
|
-
Wick.ProductBanner = {
|
|
3
|
-
el: {
|
|
4
|
-
banners: '.card-product-banner',
|
|
5
|
-
bannerInactiveClass: 'card-product-banner--inactive',
|
|
6
|
-
productsWrap: '.products-list-v2',
|
|
7
|
-
$products: $('.product-card'),
|
|
8
|
-
attrPositionDesktop: 'data-desktop-position',
|
|
9
|
-
attrPositionMobile: 'data-mobile-position',
|
|
10
|
-
attrRequiredAmountDesktop: 'data-required-amount-desktop',
|
|
11
|
-
attrRequiredAmountMobile: 'data-required-amount-mobile',
|
|
12
|
-
hide: 'd-none'
|
|
13
|
-
},
|
|
14
|
-
currentBreakpoint: null,
|
|
15
|
-
checkProductsInColumn() {
|
|
16
|
-
Wick.ProductBanner.addInactiveClasses();
|
|
17
|
-
Wick.ProductBanner.arrangeBannersInRightOrder();
|
|
18
|
-
$(Wick.ProductBanner.el.banners).each((index, banner) => {
|
|
19
|
-
Wick.ProductBanner.hideBannerDueLimit(banner, index);
|
|
20
|
-
Wick.ProductBanner.moveBannerToSpecifiedPosition(banner);
|
|
21
|
-
});
|
|
22
|
-
},
|
|
23
|
-
moveBannerToSpecifiedPosition(banner) {
|
|
24
|
-
const $listSlots = Wick.ProductBanner.getListSlots();
|
|
25
|
-
const bannerPosition = Wick.ProductBanner.getBannerPosition(banner) - 2;
|
|
26
|
-
const listSlotsLength = $listSlots.length;
|
|
27
|
-
|
|
28
|
-
if(Wick.ProductBanner.isBannerVisible(banner)) {
|
|
29
|
-
if (bannerPosition <= listSlotsLength) {
|
|
30
|
-
if ($listSlots[bannerPosition]) {
|
|
31
|
-
Wick.ProductBanner.showBanner(banner);
|
|
32
|
-
Wick.ProductBanner.removeInactiveClass(banner);
|
|
33
|
-
Wick.ProductBanner.moveBanner(banner, $listSlots[bannerPosition]);
|
|
34
|
-
} else {
|
|
35
|
-
Wick.ProductBanner.hideBanner(banner);
|
|
36
|
-
Wick.ProductBanner.coverEdgeCases(banner);
|
|
37
|
-
}
|
|
38
|
-
} else {
|
|
39
|
-
Wick.ProductBanner.hideBanner(banner);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
moveBanner(banner, targetElement) {
|
|
44
|
-
$(banner).remove();
|
|
45
|
-
$(targetElement).after(banner);
|
|
46
|
-
},
|
|
47
|
-
hideBanner(banner) {
|
|
48
|
-
$(banner).addClass(Wick.ProductBanner.el.hide);
|
|
49
|
-
},
|
|
50
|
-
showBanner(banner) {
|
|
51
|
-
$(banner).removeClass(Wick.ProductBanner.el.hide);
|
|
52
|
-
},
|
|
53
|
-
isBannerVisible(banner) {
|
|
54
|
-
return !$(banner).hasClass(Wick.ProductBanner.el.hide);
|
|
55
|
-
},
|
|
56
|
-
hideBannerDueLimit(banner) {
|
|
57
|
-
const bannerMinLimit = Wick.ProductBanner.getBannerLimit(banner) - 1;
|
|
58
|
-
const $listSlots = Wick.ProductBanner.getListSlots();
|
|
59
|
-
const listProductsLength = $listSlots.length;
|
|
60
|
-
Wick.ProductBanner.showBanner(banner);
|
|
61
|
-
|
|
62
|
-
if (bannerMinLimit > listProductsLength) {
|
|
63
|
-
Wick.ProductBanner.hideBanner(banner);
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
getBannerPosition(banner) {
|
|
67
|
-
const isMobile = Wick.ProductBanner.isMobileResolution();
|
|
68
|
-
const positionAttribute = isMobile
|
|
69
|
-
? Wick.ProductBanner.el.attrPositionMobile
|
|
70
|
-
: Wick.ProductBanner.el.attrPositionDesktop
|
|
71
|
-
|
|
72
|
-
return banner.hasAttribute(positionAttribute)
|
|
73
|
-
? Number(banner.getAttribute(positionAttribute))
|
|
74
|
-
: Number(Wick.ProductBanner.getListLength() + Wick.ProductBanner.getBannersAmount());
|
|
75
|
-
},
|
|
76
|
-
getBannerLimit(banner) {
|
|
77
|
-
const isMobile = Wick.ProductBanner.isMobileResolution();
|
|
78
|
-
|
|
79
|
-
const limitAttribute = isMobile
|
|
80
|
-
? Wick.ProductBanner.el.attrRequiredAmountMobile
|
|
81
|
-
: Wick.ProductBanner.el.attrRequiredAmountDesktop;
|
|
82
|
-
|
|
83
|
-
return banner.hasAttribute(limitAttribute)
|
|
84
|
-
? Number(banner.getAttribute(limitAttribute))
|
|
85
|
-
: 0;
|
|
86
|
-
},
|
|
87
|
-
isMobileResolution() {
|
|
88
|
-
return Wick.Responsive.getCurrentBreakpoint() !== 'up-lg';
|
|
89
|
-
},
|
|
90
|
-
getListLength() {
|
|
91
|
-
const $listItems = $(Wick.ProductBanner.el.productsWrap).find('.product-card');
|
|
92
|
-
return $listItems.length;
|
|
93
|
-
},
|
|
94
|
-
getBannersAmount() {
|
|
95
|
-
return $(Wick.ProductBanner.el.banners).length;
|
|
96
|
-
},
|
|
97
|
-
getProductsAmount() {
|
|
98
|
-
return Wick.ProductBanner.el.$products.length;
|
|
99
|
-
},
|
|
100
|
-
arrangeBannersInRightOrder() {
|
|
101
|
-
$(Wick.ProductBanner.el.banners).sort((a, b) => {
|
|
102
|
-
let bannerPositionA = Wick.ProductBanner.getBannerPosition(a);
|
|
103
|
-
let bannerPositionB = Wick.ProductBanner.getBannerPosition(b);
|
|
104
|
-
|
|
105
|
-
return bannerPositionA - bannerPositionB
|
|
106
|
-
}).appendTo(Wick.ProductBanner.el.productsWrap);
|
|
107
|
-
},
|
|
108
|
-
addInactiveClasses() {
|
|
109
|
-
$(Wick.ProductBanner.el.banners).addClass(Wick.ProductBanner.el.bannerInactiveClass);
|
|
110
|
-
},
|
|
111
|
-
removeInactiveClass(banner) {
|
|
112
|
-
$(banner).removeClass(Wick.ProductBanner.el.bannerInactiveClass)
|
|
113
|
-
},
|
|
114
|
-
insertFirstBanner(banner) {
|
|
115
|
-
const bannerPosition = Wick.ProductBanner.getBannerPosition(banner);
|
|
116
|
-
|
|
117
|
-
if (bannerPosition === 1) {
|
|
118
|
-
Wick.ProductBanner.showBanner(banner);
|
|
119
|
-
Wick.ProductBanner.removeInactiveClass(banner);
|
|
120
|
-
$(banner).remove();
|
|
121
|
-
$(Wick.ProductBanner.el.productsWrap).prepend(banner);
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
coverEdgeCases(banner) {
|
|
125
|
-
Wick.ProductBanner.insertFirstBanner(banner);
|
|
126
|
-
},
|
|
127
|
-
getListSlots() {
|
|
128
|
-
return $(Wick.ProductBanner.el.productsWrap)
|
|
129
|
-
.find('.product-card, .card-product-banner:not(.card-product-banner--inactive)');
|
|
130
|
-
},
|
|
131
|
-
init() {
|
|
132
|
-
Wick.Responsive.onResize(function () {
|
|
133
|
-
if(Wick.ProductBanner.currentBreakpoint !== Wick.Responsive.getCurrentBreakpoint()) {
|
|
134
|
-
Wick.ProductBanner.currentBreakpoint = Wick.Responsive.getCurrentBreakpoint()
|
|
135
|
-
Wick.ProductBanner.checkProductsInColumn();
|
|
136
|
-
$(window).trigger('productBannerPositionChanged');
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
$(document).ready(function () {
|
|
143
|
-
if (!Wick.ProductBanner.getBannersAmount() || !Wick.ProductBanner.getProductsAmount()) {
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
Wick.ProductBanner.init();
|
|
148
|
-
})
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
var Wick = Wick || {};
|
|
2
|
-
|
|
3
|
-
Wick.RepaymentToggle = (function () {
|
|
4
|
-
const SELECTORS = {
|
|
5
|
-
repaymentRadio: 'input[name="repaymentTerms"]',
|
|
6
|
-
term: '.billie-info .term',
|
|
7
|
-
paymentMethod: '[name="payment-method"]'
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
function updateTerm(value) {
|
|
11
|
-
const $term = $(SELECTORS.term);
|
|
12
|
-
if (!$term.length) return;
|
|
13
|
-
|
|
14
|
-
$term.text(value);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function bindEvents () {
|
|
18
|
-
$(document).on('change', SELECTORS.repaymentRadio, function () {
|
|
19
|
-
const value = $(this).val();
|
|
20
|
-
if (!value) return;
|
|
21
|
-
|
|
22
|
-
updateTerm(value);
|
|
23
|
-
|
|
24
|
-
const currentMethod = $(SELECTORS.paymentMethod + ':checked').val();
|
|
25
|
-
if (currentMethod !== 'billie') return;
|
|
26
|
-
|
|
27
|
-
if (typeof Wick.showPaymentLoader === 'function') {
|
|
28
|
-
Wick.showPaymentLoader('billie');
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
bindEvents();
|
|
35
|
-
})();
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
@import '../helpers/variables';
|
|
2
|
-
|
|
3
|
-
.checkout-chip {
|
|
4
|
-
position: relative;
|
|
5
|
-
flex: 0 0 auto;
|
|
6
|
-
|
|
7
|
-
&__input {
|
|
8
|
-
position: absolute;
|
|
9
|
-
opacity: 0;
|
|
10
|
-
width: 1px;
|
|
11
|
-
height: 1px;
|
|
12
|
-
pointer-events: none;
|
|
13
|
-
|
|
14
|
-
&:checked + .checkout-chip__label {
|
|
15
|
-
border-color: $blue;
|
|
16
|
-
|
|
17
|
-
.checkout-chip__label-top,
|
|
18
|
-
.checkout-chip__label-bottom {
|
|
19
|
-
color: $blue;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&:focus-visible + .checkout-chip__label {
|
|
24
|
-
outline: 2px solid $blue;
|
|
25
|
-
outline-offset: 2px;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&__label {
|
|
30
|
-
background: $white;
|
|
31
|
-
border: 1px solid $gray;
|
|
32
|
-
border-radius: 16px;
|
|
33
|
-
padding: 8px 24px;
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-direction: column;
|
|
36
|
-
align-items: center;
|
|
37
|
-
justify-content: center;
|
|
38
|
-
gap: 4px;
|
|
39
|
-
cursor: pointer;
|
|
40
|
-
user-select: none;
|
|
41
|
-
transition: border-color 0.2s ease;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&__label-top {
|
|
45
|
-
font-family: Roboto, sans-serif;
|
|
46
|
-
font-weight: 700;
|
|
47
|
-
font-size: 1rem;
|
|
48
|
-
line-height: 20px;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
&__label-bottom {
|
|
52
|
-
font-family: Roboto, sans-serif;
|
|
53
|
-
font-weight: 400;
|
|
54
|
-
font-size: 0.87rem;
|
|
55
|
-
line-height: 22px;
|
|
56
|
-
text-align: center;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.form-row_validation-error {
|
|
61
|
-
.checkout-chip__label {
|
|
62
|
-
border: 1px solid $red;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
@import '../helpers/variables';
|
|
2
|
-
|
|
3
|
-
.repayment-terms {
|
|
4
|
-
background: $gray-bg;
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
gap: 16px;
|
|
8
|
-
|
|
9
|
-
&__title {
|
|
10
|
-
display: flex;
|
|
11
|
-
gap: 4px;
|
|
12
|
-
align-items: flex-start;
|
|
13
|
-
font-family: Roboto, sans-serif;
|
|
14
|
-
font-weight: 500;
|
|
15
|
-
font-size: 1rem;
|
|
16
|
-
line-height: 24px;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
&__asterisk {
|
|
20
|
-
color: $red;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&__chips {
|
|
24
|
-
display: flex;
|
|
25
|
-
gap: 8px;
|
|
26
|
-
align-items: center;
|
|
27
|
-
width: 100%;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
&__body {
|
|
31
|
-
display: flex;
|
|
32
|
-
flex-direction: column;
|
|
33
|
-
gap: 20px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
&__divider {
|
|
37
|
-
padding: 10px 0;
|
|
38
|
-
}
|
|
39
|
-
}
|