Каталог файловtilda-catalog-1.2.js
3801 `;3802}3803 3804// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)3805// @ts-expect-error ST-2949_23806function t_catalog_get_productCard_getWrapperStylesStr(opts) {3807 var str = '';3808 str += opts.prodCard.bgColor ? 'background-color:' + opts.prodCard.bgColor + ';' : '';3809 3810 var shadowOpacity = opts.prodCard.shadowOpacity;3811 var shadowSize = opts.prodCard.shadowSize;3812
История файла и сравнение версий
var shadow = opts.prodCard.shadow;
3816 shadowCSS = 'box-shadow:' + shadow + ';'; 3817 } else if (shadowOpacity || shadowSize) { 3818 shadowOpacity = shadowOpacity ? parseInt(shadowOpacity, 10) / 100 : 0.3; 3819 shadowSize = shadowSize ? parseInt(shadowSize, 10) : 10; 3820 shadowCSS = 'box-shadow: 0px 0px ' + shadowSize + 'px rgba(0,0,0,' + shadowOpacity + ');'; 3827// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 3828// @ts-expect-error ST-2949_2 3829function t_catalog_get_productCard_img_html(product, options, curImage) { 3830 var isListStyle = options.prodCard.listStyle === 'list'; 3831 if (isListStyle && !options.prodCard.hasImg) { 3836 var mobileNoPaddingClass = 3837 options.hasOriginalAspectRatio && !options.isHorizOnMob ? 't-catalog__card__imgwrapper_original-ratio' : ''; 3838 var wrapperClassStr = 't-catalog__card__imgwrapper '; 3840 wrapperClassStr += options.imageRatioClass; 3842 wrapperClassStr += mobileNoPaddingClass + (options.isFlexCols ? ' ' + options.imageRatioClass : ''); 3846 document.getElementById('allrecords') !== document.querySelector('.t-catalog__product-snippet') && 3847 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) 3848 // @ts-expect-error ST-2949_3 3849 document.getElementById('allrecords').contains(document.querySelector('.t-catalog__product-snippet')); 3850 if (isSnippet && !options.colWidth) { 3857 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 3858 // @ts-expect-error ST-2949_2 3859 options.colWidth = colWidth[options.blocksInRow]; 3863 options.imageHeight && !options.isFlexCols && !isListStyle 3864 ? 'padding-bottom:' + (parseInt(options.imageHeight, 10) * 100) / (options.colWidth || 360) + '%;' 3867 var hoverImgEl = t_catalog_get_productCard_imgElHover_html(product, options, curImage); 3868 var hasHover = options.imageHover && hoverImgEl; 3871 var imgSrc = curImage ? curImage : t_catalog_getProductFirstImg(product); 3872 imgSrc = imgSrc.replace(/&/, '&'); 3874 if (imgSrc !== '') { 3875 if (options.hasOriginalAspectRatio) { 3876 imgEl = document.createElement('img'); 3877 imgEl.classList.add('js-product-img'); 3878 imgEl.classList.add('t-catalog__card__img'); 3880 imgEl.classList.add('t-catalog__card__img_hover'); 3882 var isSafari16_3 = /Version\/16\.3 Safari/.test(navigator.userAgent); 3884 imgEl.style.objectFit = 'contain'; 3886 imgEl.classList.add('t-img'); 3887 imgEl.setAttribute('data-original', imgSrc); 3888 imgEl.src = t_catalog_getLazySrc(options, imgSrc); 3890 imgEl = document.createElement('div'); 3891 imgEl.classList.add('js-product-img'); 3892 imgEl.classList.add('t-catalog__card__bgimg'); 3894 imgEl.classList.add('t-catalog__card__bgimg_hover'); 3896 imgEl.classList.add('t-bgimg'); 3897 imgEl.setAttribute('data-original', imgSrc); 3898 imgEl.style.backgroundImage = 'url("' + t_catalog_getLazyUrl(options, imgSrc) + '")';