wickes-css2 2.117.0-gift-cards.2 → 2.117.1-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/Readme.md +1 -0
- package/build/css/category-main.css +1 -1
- package/build/css/components/checkout-payment-details-v2.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/checkout-new.css +1 -1
- package/build/css/pages/checkout.css +1 -1
- package/build/css/pages/page_my-order.css +1 -1
- package/build/css/pages/page_wismo-details.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-members.min.js +1 -1
- package/build/js/add-project-list-id.min.js +1 -1
- package/build/js/address-book.min.js +1 -1
- package/build/js/basket.min.js +2 -2
- package/build/js/bundle.min.js +1 -1
- package/build/js/change-password.min.js +1 -1
- package/build/js/checkout.min.js +2 -2
- package/build/js/emulation.min.js +83 -425
- package/build/js/general.bundle.min.js +1 -1
- package/build/js/gift-cards.min.js +1 -1
- package/build/js/merged-checkout.min.js +2 -2
- package/build/js/page/bloomreach-widget/bloomreach-widget-core.js +3 -1
- package/build/js/page/checkout-payment-details.js +10 -114
- package/build/js/page/components/gift-cards.js +115 -524
- package/build/js/page/ripple/bulk-add.js +2 -2
- package/build/js/page/ripple/thumb-gallery.js +8 -14
- package/build/js/page/utils/validation.js +1 -54
- package/build/js/pdp.bundle.min.js +2 -2
- package/build/js/personal-details.min.js +1 -1
- package/build/js/plp.bundle.min.js +1 -1
- package/build/js/postcode-checker.min.js +1 -1
- package/build/js/project-list.min.js +2 -57
- package/build/js/quiz.min.js +1 -1
- package/build/js/track-my-order.min.js +1 -1
- package/package.json +1 -5
- package/src/components/checkout-payment-details-v2.hbs +0 -1
- package/src/components/checkout_order-summary-new.hbs +0 -6
- package/src/components/checkout_payment-new.hbs +8 -35
- package/src/components/gift-cards.hbs +15 -8
- package/src/components/payments.hbs +6 -7
- package/src/components/wismo-payment.hbs +0 -10
- package/src/data/data_delivery-address-v2.json +0 -4
- package/src/data/data_payments-checkout.json +0 -4
- package/src/data/data_wismo.json +1 -46
- package/src/data/footer_menu.json +0 -4
- package/src/elements/input.hbs +1 -3
- package/src/js/components/general/footer.js +56 -63
- package/src/js/emulation/checkout-payment-details.js +0 -2
- package/src/js/emulation/gift-cards.js +1 -23
- package/src/js/emulation/mock.js +20 -21
- package/src/js/emulation/postcode-checker.js +1 -1
- package/src/js/page/bloomreach-widget/bloomreach-widget-core.js +3 -1
- package/src/js/page/checkout-payment-details.js +10 -114
- package/src/js/page/components/gift-cards.js +115 -524
- package/src/js/page/ripple/bulk-add.js +2 -2
- package/src/js/page/ripple/thumb-gallery.js +8 -14
- package/src/js/page/utils/validation.js +1 -54
- package/src/page_product-details-billie.html +0 -2
- package/src/page_product-details-clearpay.html +0 -1
- package/src/scss/common/_CTAs.scss +0 -4
- package/src/scss/components/_gift-cards.scss +9 -66
- package/src/scss/components/_payments-checkout.scss +2 -2
- package/src/scss/components/_payments-v2.scss +7 -5
- package/src/scss/components/checkout-payment-details-v2.scss +0 -1
- package/src/scss/helpers/_CTAs.scss +0 -26
- package/src/scss/helpers/_variables.scss +0 -2
- package/src/scss/pages/_checkout-confirmation-new.scss +3 -96
- package/src/scss/pages/page_wismo-details.scss +0 -29
- package/src/sitemap.html +0 -24
- package/build/img/payment/checkout/giftcard.svg +0 -28
- package/build/img/payment/footer/giftcard.svg +0 -28
- package/build/js/page/components/postcode-lookup/postcode-lookup-api.js +0 -56
- package/build/js/page/components/postcode-lookup/postcode-lookup-render.js +0 -98
- package/build/js/page/components/postcode-lookup/postcode-lookup-validation.js +0 -81
- package/build/js/page/components/postcode-lookup.js +0 -503
- package/build/js/page/utils/address-utils.js +0 -32
- package/src/components/order-address.hbs +0 -28
- package/src/components/postcode-lookup-v2.hbs +0 -85
- package/src/components/wismo-giftcard-payment-item.hbs +0 -29
- package/src/data/data_checkout-giftcards.json +0 -7
- package/src/data/data_postcode-lookup.json +0 -200
- package/src/img/payment/checkout/giftcard.svg +0 -28
- package/src/img/payment/footer/giftcard.svg +0 -28
- package/src/js/emulation/postcode-lookup.js +0 -122
- package/src/js/page/components/postcode-lookup/postcode-lookup-api.js +0 -56
- package/src/js/page/components/postcode-lookup/postcode-lookup-render.js +0 -98
- package/src/js/page/components/postcode-lookup/postcode-lookup-validation.js +0 -81
- package/src/js/page/components/postcode-lookup.js +0 -503
- package/src/js/page/utils/address-utils.js +0 -32
- package/src/page_checkout_confirmation-gift-card-split-payment.html +0 -339
- package/src/page_checkout_confirmation-gift-card.html +0 -339
- package/src/page_my_account_payment_info_gift_cards.html +0 -96
- package/src/page_my_account_payment_info_gift_cards_split_payment.html +0 -96
- package/src/scss/components/_postcode-lookup-v2.scss +0 -164
|
@@ -29,9 +29,9 @@ export function createBulkAddHelper({ productCodeSelector }) {
|
|
|
29
29
|
|
|
30
30
|
function addProductToCart(postcode) {
|
|
31
31
|
const item = { productCode: getProductCode(), quantity: QUANTITY };
|
|
32
|
-
|
|
32
|
+
|
|
33
33
|
const payload = {
|
|
34
|
-
entries: [item]
|
|
34
|
+
entries: [item]
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
if (postcode) {
|
|
@@ -39,8 +39,9 @@ Wick.ThumbGallery = (function () {
|
|
|
39
39
|
return [];
|
|
40
40
|
}
|
|
41
41
|
const trimmed = hybrisString.trim();
|
|
42
|
-
const content =
|
|
43
|
-
|
|
42
|
+
const content = trimmed.startsWith('[') && trimmed.endsWith(']')
|
|
43
|
+
? trimmed.slice(1, -1)
|
|
44
|
+
: trimmed;
|
|
44
45
|
|
|
45
46
|
return content
|
|
46
47
|
.split(',')
|
|
@@ -67,8 +68,7 @@ Wick.ThumbGallery = (function () {
|
|
|
67
68
|
|
|
68
69
|
function generateCloudinaryMainSlide(publicId, baseUrl) {
|
|
69
70
|
const sourcesHtml = IMG_BREAKPOINTS.map(
|
|
70
|
-
(bp) =>
|
|
71
|
-
`<source srcset="${buildCloudinaryUrl(publicId, bp.w, bp.h, baseUrl)}" media="${bp.media}">`
|
|
71
|
+
(bp) => `<source srcset="${buildCloudinaryUrl(publicId, bp.w, bp.h, baseUrl)}" media="${bp.media}">`
|
|
72
72
|
).join('\n ');
|
|
73
73
|
const fallbackSrc = buildCloudinaryUrl(publicId, MAIN_DEFAULT.w, MAIN_DEFAULT.h, baseUrl);
|
|
74
74
|
return renderMainSlide(fallbackSrc, sourcesHtml);
|
|
@@ -208,15 +208,9 @@ Wick.ThumbGallery = (function () {
|
|
|
208
208
|
|
|
209
209
|
const swiper = new Swiper(
|
|
210
210
|
$container[0],
|
|
211
|
-
getMainSwiperConfig(
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
thumbsSwiper,
|
|
215
|
-
() => {
|
|
216
|
-
updateActiveThumbnail(swiper, thumbsSwiper);
|
|
217
|
-
},
|
|
218
|
-
total
|
|
219
|
-
)
|
|
211
|
+
getMainSwiperConfig($nextBtn, $prevBtn, thumbsSwiper, () => {
|
|
212
|
+
updateActiveThumbnail(swiper, thumbsSwiper);
|
|
213
|
+
}, total)
|
|
220
214
|
);
|
|
221
215
|
|
|
222
216
|
$thumbContainer
|
|
@@ -229,7 +223,7 @@ Wick.ThumbGallery = (function () {
|
|
|
229
223
|
function init(hybrisString, options = {}) {
|
|
230
224
|
const ids = parseIdentifiers(hybrisString);
|
|
231
225
|
|
|
232
|
-
const opts = typeof options === 'string' ? { mediaDomain: options } : options || {};
|
|
226
|
+
const opts = typeof options === 'string' ? { mediaDomain: options } : (options || {});
|
|
233
227
|
const baseUrl = getBaseUrl(opts.mediaDomain);
|
|
234
228
|
const missingImage = opts.missingImage || '';
|
|
235
229
|
|
|
@@ -12,22 +12,10 @@ const formElements = {
|
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
const patterns = {
|
|
15
|
-
antiXssPattern: new RegExp("^[\\w()/&.,'`-]+[\\w ()/&.,'`-]*[\\w()/&.,'`-]+$|^[\\w()/&.,'`-]$"),
|
|
16
15
|
guidPattern: /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i,
|
|
17
16
|
userFriendlyIdPattern: /^[A-Za-z]{2,3}\d{6}$/,
|
|
18
|
-
lookupPostcodePattern: new RegExp(
|
|
19
|
-
'^(GIR 0AA)$|^((([A-PR-UWYZ][0-9][0-9]?)|([A-PR-UWYZ][A-HK-Y][0-9][0-9]?)|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY])) [0-9][A-BD-HJLNP-UW-Z]{2})$'
|
|
20
|
-
),
|
|
21
17
|
};
|
|
22
18
|
|
|
23
|
-
export function isValidLookupPostcode(value) {
|
|
24
|
-
return patterns.lookupPostcodePattern.test(value);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export function isAntiXssValid(value) {
|
|
28
|
-
return patterns.antiXssPattern.test(value);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
19
|
export function addFieldValidation(fieldSelector, validationFunction) {
|
|
32
20
|
$(fieldSelector).each(function (index, element) {
|
|
33
21
|
$(element).blur(function () {
|
|
@@ -256,14 +244,6 @@ export function removeErrorStyling(element) {
|
|
|
256
244
|
element.find('.form-row__error').remove();
|
|
257
245
|
}
|
|
258
246
|
|
|
259
|
-
export function removeErrorStylingForElement(element) {
|
|
260
|
-
removeErrorStyling($(element).closest('.form-row'));
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
export function isFieldRowVisible(element) {
|
|
264
|
-
return $(element).closest('.form-row').is(':visible');
|
|
265
|
-
}
|
|
266
|
-
|
|
267
247
|
export function wrapWithError(element) {
|
|
268
248
|
$(element).addClass('form-row_validation-error');
|
|
269
249
|
}
|
|
@@ -297,7 +277,7 @@ export function showValidationErrors(form, errorMsg) {
|
|
|
297
277
|
}
|
|
298
278
|
}
|
|
299
279
|
|
|
300
|
-
|
|
280
|
+
function isElementInViewport(el) {
|
|
301
281
|
if (typeof jQuery === 'function' && el instanceof jQuery) {
|
|
302
282
|
el = el[0];
|
|
303
283
|
}
|
|
@@ -386,36 +366,3 @@ function validateByPredicate(
|
|
|
386
366
|
export function validateExactDigits($input, n, message, cfg) {
|
|
387
367
|
return validateByPredicate($input, (v) => hasExactDigits(v, n), message, cfg);
|
|
388
368
|
}
|
|
389
|
-
|
|
390
|
-
export function validateFieldByRule($field, { required, validate, message }) {
|
|
391
|
-
if (!$field.length || !isFieldRowVisible($field)) return true;
|
|
392
|
-
|
|
393
|
-
const value = ($field.val() || '').trim();
|
|
394
|
-
const isValid = value ? validate(value) : !required;
|
|
395
|
-
|
|
396
|
-
updateStylingErrorForElement($field, isValid, message);
|
|
397
|
-
return isValid;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
const blurredFields = new WeakSet();
|
|
401
|
-
|
|
402
|
-
export function bindBlurValidation(selector, validate, { namespace = '', onChange } = {}) {
|
|
403
|
-
$(document)
|
|
404
|
-
.on(`change${namespace}`, selector, function () {
|
|
405
|
-
updateInputValueBeforeValidation(this);
|
|
406
|
-
validate(this);
|
|
407
|
-
if (onChange) onChange(this);
|
|
408
|
-
})
|
|
409
|
-
.on(`blur${namespace}`, selector, function () {
|
|
410
|
-
blurredFields.add(this);
|
|
411
|
-
updateInputValueBeforeValidation(this);
|
|
412
|
-
validate(this);
|
|
413
|
-
})
|
|
414
|
-
.on(`input${namespace}`, selector, function () {
|
|
415
|
-
if (blurredFields.has(this)) validate(this);
|
|
416
|
-
});
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
export function resetBlurValidation(field) {
|
|
420
|
-
$(field).each((_, el) => blurredFields.delete(el));
|
|
421
|
-
}
|