Каталог файловtilda-catalog-1.2.js
7901 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)7902 // @ts-expect-error ST-2949_17903 if (product.unit && product.portion > 0) {7904 var str =7905 '<div class="t-catalog__prod__price-portion"><span class="t-catalog__prod__price-portion-slash">/</span>';7906 // @ts-expect-error ST-2949_17907 if (product.portion !== '1') {7908 // @ts-expect-error ST-2949_17909 str += +product.portion + ' ';7910 }7911 // @ts-expect-error ST-2949_1
История файла и сравнение версий
str += window.tCatalogDict[product.unit] + '</div>';
7914 var arrayPriceClasses = [ 7916 '.t-catalog__card__price-currency + .js-product-price', 7917 '.t-catalog__card__price-currency + .js-catalog-prod-price-old-val', 7918 '.js-product-price + .t-catalog__card__price-currency', 7919 '.js-catalog-prod-price-old-val + .t-catalog__card__price-currency', 7921 '.t-catalog__prod-popup__price-currency + .js-product-price', 7922 '.js-product-price + .t-catalog__prod-popup__price-currency', 7923 '.t-catalog__prod-popup__price-currency + .js-catalog-prod-price-old-val', 7924 '.js-catalog-prod-price-old-val + .t-catalog__prod-popup__price-currency', 7926 '.js-product-price-currency + .js-product-price', 7927 '.js-product-price + .js-product-price-currency', 7928 '.js-product-price-currency + .js-catalog-prod-price-old-val', 7929 '.js-catalog-prod-price-old-val + .js-product-price-currency', 7932 Array.prototype.forEach.call(el_product.querySelectorAll(arrayPriceClasses.join(',')), function (selector) { 7933 selector.insertAdjacentHTML('afterend', str); 7937 if (storePriceWrapper) { 7938 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) 7939 // @ts-expect-error ST-2949_1 7940 storePriceWrapper.style.visibility = 'hidden'; 7942 if (storeCardPrice) { 7943 // @ts-expect-error ST-2949_1 7944 storeCardPrice.style.display = 'none'; 7946 if (storeProdPrice) { 7947 // @ts-expect-error ST-2949_1 7948 storeProdPrice.style.display = 'none'; 7950 if (storeProdPriceVal) { 7951 storeProdPriceVal.textContent = ''; 7954 productPrice.setAttribute('data-product-price-def', ''); 7955 productPrice.setAttribute('data-product-price-def-str', ''); 7957 // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046) 7958 // @ts-expect-error ST-2949_5 7959 t_catalog__removeElement(el_product.querySelector('.t-catalog__prod__price-portion')); 7962 var storeProdPriceOld; 7964 var storeProdOldVal; 7967 // Показываем старую цену, только если она не равна новой 7969 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) 7970 // @ts-expect-error ST-2949_1 7972 // @ts-expect-error ST-2949_1 7973 edition.priceold !== '0' && 7974 // @ts-expect-error ST-2949_1 7975 t_catalog__cleanPrice(edition.price) !== t_catalog__cleanPrice(edition.priceold) 7977 // @ts-expect-error ST-2949_1 7978 var formattedPriceOld = t_catalog__getFormattedPrice(options, edition.priceold); 7979 storeProdPriceOld = el_product.querySelector('.js-catalog-prod-price-old'); 7980 if (storeProdPriceOld) { 7981 // @ts-expect-error ST-2949_1 7982 storeProdPriceOld.style.display = ''; 7984 cardPriceOld = el_product.querySelector('.t-catalog__card__price_old'); 7986 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) 7987 // @ts-expect-error ST-2949_1 7988 cardPriceOld.style.display = ''; 7990 storeProdOldVal = el_product.querySelector('.js-catalog-prod-price-old-val'); 7991 if (storeProdOldVal) { 7992 storeProdOldVal.innerHTML = formattedPriceOld; 7995 storeProdPriceOld = el_product.querySelector('.js-catalog-prod-price-old'); 7996 if (storeProdPriceOld) { 7997 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) 7998 // @ts-expect-error ST-2949_1 7999 storeProdPriceOld.style.display = 'none';