Каталог файловtilda-catalog-1.2.js
901 } else {902 // @ts-expect-error ST-2949_2903 t_catalog_addRule(baseRules, '--button-after-background-color-hover', styles.bgcolorhover);904 }905 }906 907 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)908 // @ts-expect-error ST-2949_2909 return baseRules;910}911 912/**
История файла и сравнение версий
* Создает массив CSS-правил при наведении
914 * @param {Record<string, string>} styles 915 * @returns {string[]} 917function t_catalog_buildHoverCssRules(styles) { 918 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 919 // @ts-expect-error ST-2949_2 920 const hoverRules = []; 922 if (styles.shadowhover) { 923 // @ts-expect-error ST-2949_2 924 t_catalog_addRule(hoverRules, 'box-shadow', styles.shadowhover); 926 if (styles.bordersize || styles.bordercolorhover) { 927 const sizeH = styles.bordersize || '0'; 928 const colorH = styles.bordercolorhover || styles.bordercolor || 'transparent'; 929 if (/^0($|[^0-9])/i.test(sizeH) || sizeH === '0px') { 930 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 931 // @ts-expect-error ST-2949_2 932 t_catalog_addRule(hoverRules, 'border', 'none'); 934 // @ts-expect-error ST-2949_2 935 t_catalog_addRule(hoverRules, 'border', sizeH + ' solid ' + colorH); 938 if (styles.bgcolorhover) { 939 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 940 // @ts-expect-error ST-2949_2 941 t_catalog_addRule(hoverRules, 'background-color', styles.bgcolorhover); 944 // @ts-expect-error ST-2949_2 949 * Создает массив CSS-правил для мобильных 950 * @param {Record<string, string>} cssPropertiesMap 951 * @param {Record<string, string>} styles 952 * @returns {string[]} 954function t_catalog_buildMobileCssRules(cssPropertiesMap, styles) { 955 const MOBILE_SUFFIX = '_res_480'; 956 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 957 // @ts-expect-error ST-2949_2 958 const mobileRules = []; 960 Object.keys(styles).forEach(function (key) { 961 if (!key.includes(MOBILE_SUFFIX)) return; 962 const baseKey = key.replace(MOBILE_SUFFIX, ''); 963 const cssProp = cssPropertiesMap[baseKey]; 964 if (!cssProp) return; 965 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 966 // @ts-expect-error ST-2949_2 967 t_catalog_addRule(mobileRules, cssProp, styles[key]); 970 // Доп. поля для mobile (gap_res_480 уже обработается через mап выше, т.к. gap в MAP) 971 if (styles.padding_res_480) { 972 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 973 // @ts-expect-error ST-2949_2 974 t_catalog_addRule(mobileRules, 'padding', styles.padding_res_480); 977 // @ts-expect-error ST-2949_2 982 * Создает CSS для текста кнопки 983 * @param {string} recid 984 * @param {string} itemSelector 985 * @param {Record<string, string>} styles 988function t_catalog_createButtonTextCss(recid, itemSelector, styles) { 989 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 990 // @ts-expect-error ST-2949_2 991 const textBaseRules = []; 992 // @ts-expect-error ST-2949_2 993 const textHoverRules = []; 994 // @ts-expect-error ST-2949_2 995 const textMobileRules = []; 998 // @ts-expect-error ST-2949_2 999 t_catalog_addTextColorRule(textBaseRules, styles.color);