wickes-css2 2.111.0-complete-your-project.7 → 2.111.0-develop.1
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/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_personal-details.css +1 -1
- package/build/css/pages/page_product-details-v2.css +1 -1
- package/build/css/pdp-main-before-combine.css +1 -1
- package/build/css/pdp-main-critical.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/account-hub.min.js +1 -1
- package/build/js/basket.min.js +1 -1
- package/build/js/bundle.min.js +1 -1
- package/build/js/checkout.min.js +1 -1
- package/build/js/emulation.min.js +60 -2868
- package/build/js/general.bundle.min.js +1 -1
- package/build/js/merged-checkout.min.js +1 -1
- package/build/js/page/utils/create-count-stepper.js +9 -30
- package/build/js/pdp-count-stepper.min.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/build/js/saving-shopping-list.min.js +1 -1
- package/package.json +1 -1
- package/src/components/base/button.hbs +5 -23
- package/src/components/gift-cards.hbs +1 -1
- package/src/elements/checkbox.hbs +1 -8
- package/src/js/components/general/cart-slider.js +6 -19
- package/src/js/emulation/mock.js +1 -3097
- package/src/js/emulation/notify-me.js +1 -1
- package/src/js/page/utils/create-count-stepper.js +9 -30
- package/src/page_product-details-banner.html +1 -0
- package/src/page_product-details-big-wins-disabled-delivery.html +1 -0
- package/src/page_product-details-big-wins-non-registered.html +1 -0
- package/src/page_product-details-big-wins-out-nearest.html +1 -0
- package/src/page_product-details-big-wins-unhappy.html +1 -0
- package/src/page_product-details-big-wins.html +1 -0
- package/src/page_product-details-billie.html +1 -0
- package/src/page_product-details-calculator.html +1 -0
- package/src/page_product-details-cashback-v2.html +1 -0
- package/src/page_product-details-clearpay.html +1 -0
- package/src/page_product-details-cnc-error-notification.html +1 -0
- package/src/page_product-details-cnc-success-notification-vat.html +1 -0
- package/src/page_product-details-cnc-success-notification.html +1 -0
- package/src/page_product-details-default-store.html +1 -0
- package/src/page_product-details-energy-efficiency.html +1 -0
- package/src/page_product-details-flooring-with-pr-placeholder.html +1 -0
- package/src/page_product-details-flooring.html +1 -0
- package/src/page_product-details-gallery-actual.html +1 -0
- package/src/page_product-details-mfe-calculator.html +1 -0
- package/src/page_product-details-minimum-v2.html +1 -0
- package/src/page_product-details-mtm-doors.html +1 -0
- package/src/page_product-details-only-clearpay.html +1 -0
- package/src/page_product-details-paint-mixing.html +1 -0
- package/src/page_product-details-saved-pl.html +1 -0
- package/src/page_product-details-tile-steps-klarna-widget-with-method-ids.html +1 -0
- package/src/page_product-details-tile-steps-logout.html +1 -0
- package/src/page_product-details-tile-steps-no-new-project-list.html +1 -0
- package/src/page_product-details-tile-steps-with-klarna.html +1 -0
- package/src/page_product-details-tile-steps.html +1 -0
- package/src/page_product-details-v2.html +1 -0
- package/src/page_product-details-vat.html +1 -0
- package/src/page_product-details-wisdom-mcfc-registered.html +1 -0
- package/src/page_product-details-wisdom-mcfc.html +1 -0
- package/src/page_product-details-wisdom-oos-registered.html +1 -0
- package/src/page_product-details-wisdom-oos.html +1 -0
- package/src/page_product-details-wisdom-registered.html +1 -0
- package/src/page_product-details-wisdom.html +1 -0
- package/src/page_product-details-with-favourite.html +1 -0
- package/src/page_product-details-with-global-search-v2.html +1 -7
- package/src/page_product-details_no-previous-default.html +1 -0
- package/src/page_track-my-order-result.html +0 -1
- package/src/partials/scripts.hbs +0 -1
- package/src/scss/common/_common.scss +0 -1
- package/src/scss/common/_elements.scss +1 -13
- package/src/scss/components/_notifications.scss +5 -86
- package/src/scss/components/_pdp-action-v2-critical.scss +27 -0
- package/src/scss/components/_pdp-action-v2.scss +27 -0
- package/src/scss/helpers/_variables.scss +0 -1
- package/src/scss/pages/page_product-details-v2.scss +2 -45
- package/src/scss/pdp-main-critical.scss +1 -0
- package/src/scss/pdp-main.scss +1 -1
- package/src/sitemap.html +0 -6
- package/build/js/bloomreach-widget.min.js +0 -1
- package/build/js/page/bloomreach-widget.js +0 -1187
- package/build/js/page/utils/create-loading-button.js +0 -37
- package/build/js/page/utils/create-toast.js +0 -79
- package/build/js/page/utils/custom-dropdown.js +0 -80
- package/src/components/bloomreach/complete-card-dropdown.hbs +0 -47
- package/src/components/bloomreach/complete-card-skeleton.hbs +0 -19
- package/src/components/bloomreach/complete-card.hbs +0 -138
- package/src/components/bloomreach/complete-divider.hbs +0 -3
- package/src/components/bloomreach/complete-summary-skeleton.hbs +0 -12
- package/src/components/bloomreach/complete-summary.hbs +0 -43
- package/src/components/bloomreach/complete-wrapper.hbs +0 -1
- package/src/components/bloomreach/complete-your-project.hbs +0 -21
- package/src/js/emulation/bloomreach-widget-calculations.js +0 -140
- package/src/js/emulation/bloomreach-widget-loading.js +0 -11
- package/src/js/page/bloomreach-widget.js +0 -1187
- package/src/js/page/utils/create-loading-button.js +0 -37
- package/src/js/page/utils/create-toast.js +0 -79
- package/src/js/page/utils/custom-dropdown.js +0 -80
- package/src/page_product-details-bloomreach.html +0 -130
- package/src/scss/common/_loading-button.scss +0 -49
- package/src/scss/components/bloomreach/_bloomreach.scss +0 -3
- package/src/scss/components/bloomreach/_complete-card-dropdown.scss +0 -174
- package/src/scss/components/bloomreach/_complete-card.scss +0 -402
- package/src/scss/components/bloomreach/_complete-your-project.scss +0 -207
|
@@ -18,8 +18,7 @@ function normalizeOptions(options) {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
function toInt(value) {
|
|
21
|
-
const n = parseInt(
|
|
22
|
-
|
|
21
|
+
const n = parseInt(String(value || '').trim(), 10);
|
|
23
22
|
return Number.isFinite(n) ? n : NaN;
|
|
24
23
|
}
|
|
25
24
|
|
|
@@ -29,7 +28,6 @@ function clampMin(n, min) {
|
|
|
29
28
|
|
|
30
29
|
function ensureQty(value, fallback) {
|
|
31
30
|
const n = toInt(value);
|
|
32
|
-
|
|
33
31
|
return Number.isFinite(n) ? n : fallback;
|
|
34
32
|
}
|
|
35
33
|
|
|
@@ -60,15 +58,12 @@ function updateButtons($input, opt) {
|
|
|
60
58
|
|
|
61
59
|
const $minus = getMinusBtn($wrap);
|
|
62
60
|
|
|
63
|
-
if ($minus.length)
|
|
64
|
-
$minus.prop('disabled', qty <= opt.min);
|
|
65
|
-
}
|
|
61
|
+
if ($minus.length) $minus.prop('disabled', qty <= opt.min);
|
|
66
62
|
}
|
|
67
63
|
|
|
68
64
|
function setQty($input, opt, qty) {
|
|
69
65
|
const next = clampMin(qty, opt.min);
|
|
70
|
-
|
|
71
|
-
$input.val(`${next}`);
|
|
66
|
+
$input.val(String(next));
|
|
72
67
|
updateButtons($input, opt);
|
|
73
68
|
|
|
74
69
|
if (typeof opt.onChange === 'function') {
|
|
@@ -88,13 +83,11 @@ function ensureButtons($input, opt) {
|
|
|
88
83
|
if (!hasMinus) {
|
|
89
84
|
$input.before(buildBtn('minus', true));
|
|
90
85
|
}
|
|
91
|
-
|
|
92
86
|
if (!hasPlus) {
|
|
93
87
|
$input.after(buildBtn('plus', false));
|
|
94
88
|
}
|
|
95
89
|
|
|
96
90
|
const initial = ensureQty($input.val(), opt.min);
|
|
97
|
-
|
|
98
91
|
setQty($input, opt, initial);
|
|
99
92
|
}
|
|
100
93
|
|
|
@@ -102,24 +95,16 @@ function getInputs($root, inputSel) {
|
|
|
102
95
|
const $scope = $root && $root.length ? $root : $(document);
|
|
103
96
|
const $self = $scope.is(inputSel) ? $scope : $();
|
|
104
97
|
const $found = $scope.find(inputSel);
|
|
105
|
-
|
|
106
98
|
return $self.add($found);
|
|
107
99
|
}
|
|
108
100
|
|
|
109
|
-
function getNamespace(inputSel) {
|
|
110
|
-
return `.countStepper_${inputSel.replace(/[^a-zA-Z0-9_-]/g, '')}`;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
101
|
// ===== FACTORY =====
|
|
114
102
|
|
|
115
103
|
export function createCountStepper(options = {}) {
|
|
116
104
|
const OPT = normalizeOptions(options);
|
|
105
|
+
if (!OPT.inputSel) throw new Error('[createCountStepper] Missing inputSel');
|
|
117
106
|
|
|
118
|
-
|
|
119
|
-
throw new Error('[createCountStepper] Missing inputSel');
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
const NS = getNamespace(OPT.inputSel);
|
|
107
|
+
const NS = `.cnt_${Math.random().toString(16).slice(2)}`;
|
|
123
108
|
|
|
124
109
|
function init($root) {
|
|
125
110
|
getInputs($root, OPT.inputSel).each(function () {
|
|
@@ -127,6 +112,7 @@ export function createCountStepper(options = {}) {
|
|
|
127
112
|
});
|
|
128
113
|
}
|
|
129
114
|
|
|
115
|
+
// +/- click
|
|
130
116
|
$(document)
|
|
131
117
|
.off(`click${NS}`, '[data-count-btn]')
|
|
132
118
|
.on(`click${NS}`, '[data-count-btn]', function (e) {
|
|
@@ -134,22 +120,15 @@ export function createCountStepper(options = {}) {
|
|
|
134
120
|
const $parent = $btn.parent();
|
|
135
121
|
const $input = $parent.find(OPT.inputSel).first();
|
|
136
122
|
|
|
137
|
-
if (!$input.length)
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
123
|
+
if (!$input.length) return;
|
|
140
124
|
|
|
141
125
|
e.preventDefault();
|
|
142
126
|
|
|
143
127
|
const type = ($btn.attr('data-count-type') || '').toLowerCase();
|
|
144
128
|
const current = ensureQty($input.val(), OPT.min);
|
|
145
129
|
|
|
146
|
-
if (type === 'plus')
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
if (type === 'minus') {
|
|
151
|
-
setQty($input, OPT, current - 1);
|
|
152
|
-
}
|
|
130
|
+
if (type === 'plus') setQty($input, OPT, current + 1);
|
|
131
|
+
if (type === 'minus') setQty($input, OPT, current - 1);
|
|
153
132
|
});
|
|
154
133
|
|
|
155
134
|
$(document)
|
|
@@ -63,17 +63,11 @@ switch-vat=true
|
|
|
63
63
|
cc=true
|
|
64
64
|
delivery=true
|
|
65
65
|
}}
|
|
66
|
+
{{> fulfilment-accordions }}
|
|
66
67
|
</div>
|
|
67
68
|
<div class="pdp__description">
|
|
68
69
|
{{> product-main-info-v2 isProductSaved=true}}
|
|
69
70
|
</div>
|
|
70
|
-
<div
|
|
71
|
-
class="pdp__widget"
|
|
72
|
-
data-complete-widget
|
|
73
|
-
data-context-key="completeYourProject3Recomendations"
|
|
74
|
-
>
|
|
75
|
-
{{> bloomreach/complete-your-project title="Complete your project"}}
|
|
76
|
-
</div>
|
|
77
71
|
{{> fulfilment-accordions }}
|
|
78
72
|
</div>
|
|
79
73
|
</div>
|
|
@@ -36,7 +36,6 @@ mainClass="track-order"
|
|
|
36
36
|
<h2 class="my-order__title">Order {{track_order.order.number}}</h2>
|
|
37
37
|
<p class="my-order__placed">Order placed on <span class="date">{{track_order.order.orderDate}}</span></p>
|
|
38
38
|
{{> button
|
|
39
|
-
primary="true"
|
|
40
39
|
full=true
|
|
41
40
|
modification="btn--print"
|
|
42
41
|
text="Print"
|
package/src/partials/scripts.hbs
CHANGED
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
<script defer src="https://kit.fontawesome.com/b73abc6840.js" crossorigin="anonymous"></script>
|
|
24
24
|
{{#if pagePdp}}
|
|
25
25
|
<script defer src="./js/saving-shopping-list.min.js"></script>
|
|
26
|
-
<script defer src="./js/bloomreach-widget.min.js"></script>
|
|
27
26
|
<script async src="https://static.addtoany.com/menu/page.js"></script>
|
|
28
27
|
{{/if}}
|
|
29
28
|
|
|
@@ -258,7 +258,7 @@
|
|
|
258
258
|
color: $gray-border;
|
|
259
259
|
|
|
260
260
|
.inactive-message {
|
|
261
|
-
font-size:
|
|
261
|
+
font-size: .75rem;
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
264
|
}
|
|
@@ -266,18 +266,6 @@
|
|
|
266
266
|
&-round {
|
|
267
267
|
@include checkbox-round;
|
|
268
268
|
}
|
|
269
|
-
|
|
270
|
-
&--action {
|
|
271
|
-
input {
|
|
272
|
-
&:checked,
|
|
273
|
-
&.fake-checked {
|
|
274
|
-
&:not(:disabled) + ins {
|
|
275
|
-
background: $green;
|
|
276
|
-
border-color: $green;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
269
|
}
|
|
282
270
|
|
|
283
271
|
.file-loader {
|