wickes-css2 2.103.0-IC-976-pre-commit-lint.7 → 2.103.0-IC-976-pre-commit-lint.9
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 +0 -1
- package/build/css/category-main.css +1 -1
- package/build/css/components/card-product-banner.css +1 -1
- package/build/css/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/plp-main.css +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 +0 -54
- package/build/js/merged-checkout.min.js +1 -1
- package/build/js/page/plp-cards-v2.js +6 -15
- package/build/js/page/plp-load-more.js +1 -1
- package/build/js/plp.bundle.min.js +1 -1
- package/build/js/project-list.min.js +1 -1
- package/package.json +2 -5
- package/src/components/card_product_v2.hbs +5 -10
- package/src/components/injected-content.hbs +1 -1
- package/src/components/srp-injected.hbs +3 -13
- package/src/data/data_search-results_v2.json +141 -56
- package/src/js/components/product-banner.js +148 -0
- package/src/js/page/plp-cards-v2.js +6 -15
- package/src/js/page/plp-load-more.js +1 -1
- package/src/page_plp_v2.html +7 -16
- package/src/page_search-results.html +2 -12
- package/src/scss/category-main.scss +1 -0
- package/src/scss/components/card-product-banner.scss +3 -91
- package/src/scss/helpers/_colors-semantic.scss +1 -1
- package/src/scss/helpers/_variables.scss +2 -0
- package/src/scss/pages/page_products-list-combined.scss +0 -11
- package/src/scss/pages/page_products-list.scss +0 -8
- package/src/scss/plp-main.scss +1 -0
- package/src/components/card_sponsor_banner.hbs +0 -8
- package/src/components/card_sponsor_product.hbs +0 -6
- package/src/js/components/banner-placement-manager.js +0 -258
- package/src/js/emulation/banner-placement-manager.js +0 -53
|
@@ -303,60 +303,6 @@ Wick.Autocomplete = (function(){
|
|
|
303
303
|
init();
|
|
304
304
|
})();
|
|
305
305
|
|
|
306
|
-
// Simulate prompt for input
|
|
307
|
-
function getInputs() {
|
|
308
|
-
const productBannerPositions = prompt("Enter Product Banner Positions:", "2") || "";
|
|
309
|
-
const sponsorProductPositions = prompt("Enter Sponsor Product Positions (comma-separated):", "6,7,8") || "";
|
|
310
|
-
const sponsorBannerPositions = prompt("Enter Sponsor Banner Positions:", "10") || "";
|
|
311
|
-
|
|
312
|
-
return {
|
|
313
|
-
productBannerPositions: productBannerPositions ? productBannerPositions.split(",").map(Number) : [],
|
|
314
|
-
sponsorProductPositions: sponsorProductPositions ? sponsorProductPositions.split(",").map(Number) : [],
|
|
315
|
-
sponsorBannerPositions: sponsorBannerPositions ? sponsorBannerPositions.split(",").map(Number) : [],
|
|
316
|
-
};
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
function getPositionAttr() {
|
|
320
|
-
const isMobile = Wick.BannerPlacementManager.isMobileResolution();
|
|
321
|
-
return isMobile
|
|
322
|
-
? 'data-mobile-position'
|
|
323
|
-
: 'data-desktop-position';
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
function updatePositions(inputs) {
|
|
327
|
-
const productBannerElements = document.querySelectorAll(".card-product-banner");
|
|
328
|
-
productBannerElements.forEach((el, index) => {
|
|
329
|
-
if (inputs.productBannerPositions[index] !== undefined) {
|
|
330
|
-
el.setAttribute(getPositionAttr(), inputs.productBannerPositions[index]);
|
|
331
|
-
}
|
|
332
|
-
});
|
|
333
|
-
|
|
334
|
-
const sponsorProductElements = document.querySelectorAll(".card-sponsor-product");
|
|
335
|
-
sponsorProductElements.forEach((el, index) => {
|
|
336
|
-
if (inputs.sponsorProductPositions[index] !== undefined) {
|
|
337
|
-
el.setAttribute(getPositionAttr(), inputs.sponsorProductPositions[index]);
|
|
338
|
-
}
|
|
339
|
-
});
|
|
340
|
-
|
|
341
|
-
const sponsorBannerElements = document.querySelectorAll(".card-sponsor-banner");
|
|
342
|
-
sponsorBannerElements.forEach((el, index) => {
|
|
343
|
-
if (inputs.sponsorBannerPositions[index] !== undefined) {
|
|
344
|
-
el.setAttribute(getPositionAttr(), inputs.sponsorBannerPositions[index]);
|
|
345
|
-
}
|
|
346
|
-
});
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
function init() {
|
|
350
|
-
const inputs = getInputs();
|
|
351
|
-
updatePositions(inputs);
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
$(document).ready(function () {
|
|
355
|
-
if ($('.retail-media .products-list.products-list-v2').length) {
|
|
356
|
-
setTimeout(() => init(), 100)
|
|
357
|
-
}
|
|
358
|
-
});
|
|
359
|
-
|
|
360
306
|
var Wick = Wick || {};
|
|
361
307
|
Wick.BasketData = (function () {
|
|
362
308
|
return {
|