Каталог файловtilda-catalog-1.2.js
1601 if (options.sidebar) {1602 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)1603 // @ts-expect-error ST-2949_31604 var tCatalogGridContainer = rec.querySelector('.t-catalog__grid-cont');1605 if (tCatalogGridContainer) {1606 tCatalogGridContainer.classList.remove('t-catalog__grid-cont_hidden');1607 }1608 }1609 1610 // remove cards1611 if (isFirstSlice && gridContainer) {1612
История файла и сравнение версий
const chosenBar = gridContainer.querySelector('.t-catalog__filter__chosen-bar');
1614 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) 1615 // @ts-expect-error ST-2949_3 1616 chosenBar.parentNode.removeChild(chosenBar); 1618 gridContainer.innerHTML = ''; 1620 gridContainer.appendChild(chosenBar); 1624 // check server error 1626 typeof data === 'string' && 1627 data.substring(0, 1) !== '{' && 1628 (data.indexOf('ERROR:') !== -1 || data.indexOf('Wrong') !== -1) 1630 var el_errorBox = t_catalog_get_errorBox(options, data); 1631 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) 1632 // @ts-expect-error ST-2949_3 1633 gridContainer.insertAdjacentHTML('beforeend', el_errorBox); 1634 // @ts-expect-error ST-2949_3 1635 t_catalog__fadeIn(rec.querySelector('.js-catalog-error-msg')); 1642 // try to parse products data 1645 obj = JSON.parse(data); 1647 // links for size chart 1648 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) 1649 // @ts-expect-error ST-2949_1 1650 if (obj.partlinks) { 1651 // @ts-expect-error ST-2949_1 1652 options.linksSizeChart = obj.partlinks; 1655 // @ts-expect-error ST-2949_1 1656 if (obj.breadcrumbs && Array.isArray(obj.breadcrumbs) && obj.breadcrumbs.length > 0) { 1657 // @ts-expect-error ST-2949_1 1658 options.serverBreadcrumbs = obj.breadcrumbs; 1660 // @ts-expect-error ST-2949_1 1661 delete options.serverBreadcrumbs; 1664 console.error(error); 1666 if (typeof obj !== 'object') { 1670 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) 1671 // @ts-expect-error ST-2949_1 1672 var productsArr = showRelevants ? obj.relevants : obj.products; 1674 // store option params 1675 // @ts-expect-error ST-2949_1 1676 if (obj.options && obj.options.length >= 1) { 1677 // @ts-expect-error ST-2949_1 1678 window.tCatalogOptionsList = obj.options; 1681 // @ts-expect-error ST-2949_1 1682 if (!showRelevants && options.hasDynamicCategoryContent && obj.partinfo) { 1683 // @ts-expect-error ST-2949_1 1684 t_catalog_header__updateHeaderFromPartInfo(recid, obj.partinfo); 1687 // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046) 1688 // @ts-expect-error ST-2949_5 1689 t_catalog_process(productsArr, recid, options, !!slice, showRelevants, obj, relevantsOpts); 1691 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) 1692 // @ts-expect-error ST-2949_1 1693 if (options?.breadcrumbs?.hasBreadcrumbs && options.serverBreadcrumbs) { 1694 t_catalog_breadcrumbs__update(recid, options); 1697 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) 1698 // @ts-expect-error ST-2949_1 1699 var isAllPart = obj.parts?.find( 1700 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)