6201* @param {HTMLElement} snippetContainer - Контейнер сниппета товара6202* @param {string} recid - ID записи6203* @param {CatalogOptions} options - Объект настроек6204* @param {string} [bgColor] - Цвет фона6205*/6206function t_catalog_setProductDescriptionStyles(snippetContainer, recid, options, bgColor) {6207const productDescr = snippetContainer.querySelector('.js-catalog-prod-text');6208if (!productDescr) return;62096210if (options.descr_typo) {6211t_catalog_parseTypoStylesConfig(
recid, '.t-catalog__prod-popup__text', // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046) // @ts-expect-error ST-2949_5 options.descr_typo, 'js-catalog-descr-typo-styles-' + recid ); return; } const productDescrStyle = productDescr.getAttribute('style'); // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046) // @ts-expect-error ST-2949_5 productDescr.setAttribute('style', t_catalog_removeSizesFromStylesLine(productDescrStyle)); if (bgColor) { // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) // @ts-expect-error ST-2949_3 const productDescrColor = options.typo.descrColor; // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046) // @ts-expect-error ST-2949_5 t_catalog_applyContrastColorIfNecessary(productDescr, productDescrColor, bgColor); }}/** * Устанавливает стили для цены товара в сниппете * @param {HTMLElement} snippetContainer - Контейнер сниппета товара * @param {string} recid - ID записи * @param {CatalogOptions} options - Объект настроек * @param {string} [bgColor] - Цвет фона */function t_catalog_setProductPriceStyles(snippetContainer, recid, options, bgColor) { const productPrice = snippetContainer.querySelector('.js-catalog-prod-price'); if (!productPrice) return; if (options.price_typo) { t_catalog_parseTypoStylesConfig( recid, '.t-catalog__prod-popup__price', // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046) // @ts-expect-error ST-2949_5 options.price_typo, 'js-catalog-price-typo-styles-' + recid ); return; } if (bgColor) { // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) // @ts-expect-error ST-2949_3 const productPriceColor = options.price.color; // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046) // @ts-expect-error ST-2949_5 t_catalog_applyContrastColorIfNecessary(productPrice, productPriceColor, bgColor); }}/** * Устанавливает стили для старой цены товара в сниппете * @param {HTMLElement} snippetContainer - Контейнер сниппета товара * @param {string} recid - ID записи * @param {CatalogOptions} options - Объект настроек * @param {string} [bgColor] - Цвет фона */function t_catalog_setProductOldPriceStyles(snippetContainer, recid, options, bgColor) { const productOldPrice = snippetContainer.querySelector('.js-catalog-prod-price-old'); if (!productOldPrice) return; if (options.price_old_typo) { t_catalog_parseTypoStylesConfig( recid, '.t-catalog__prod-popup__price_old', // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046) // @ts-expect-error ST-2949_5 options.price_old_typo, 'js-catalog-old-price-typo-styles-' + recid ); return; } if (bgColor) { // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) // @ts-expect-error ST-2949_3 const productOldPriceColor = options.price.colorOld; // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046) // @ts-expect-error ST-2949_5 t_catalog_applyContrastColorIfNecessary(productOldPrice, productOldPriceColor, bgColor); }