(productsArr.length > blocksInRowForRelevant || window.innerWidth <= 960)
2615 var arrowsTplEl = rec.querySelector('.js-catalog-tpl-slider-arrows'); 2616 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) 2617 // @ts-expect-error ST-2949_3 2618 var arrowsTpl = arrowsTplEl.innerHTML; 2620 productsHtml += '</div>'; 2621 productsHtml += '</div>'; 2623 productsHtml += '</div>'; 2624 productsHtml += '</div>'; 2626 if (arrowsTpl && isRelevantsShow) { 2627 productsHtml += arrowsTpl; 2633 // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046) 2634 // @ts-expect-error ST-2949_5 2635 t_catalog_process_appendAndShowProducts(rec, cardList, productsHtml); 2637 // @ts-expect-error ST-2949_5 2638 t_catalog_process_appendAndShowProducts(rec, gridContainer, productsHtml); 2641 // prevent page from horizontal scroll, if grid container has fadeinleft animation 2643 productsHtml.indexOf('data-animate-style="fadeinleft"') !== -1 && 2644 !gridContainer.classList.contains('t-catalog__grid-cont_mobile-one-row') 2646 rec.style.overflowX = 'hidden'; 2649 // init product options and edition options 2650 Array.prototype.forEach.call(productsArr, function (productData) { 2651 var productObj = productData; 2652 var el_product = isRelevantsShow 2653 ? // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) 2654 // @ts-expect-error ST-2949_3 2656 '.t-catalog__relevants__container .js-product.t-item[data-product-gen-uid="' + productObj.uid + '"]' 2658 : // @ts-expect-error ST-2949_3 2660 '.t-catalog__grid-cont .js-product.t-item[data-product-gen-uid="' + productObj.uid + '"]' 2662 // @ts-expect-error ST-2949_3 2663 el_product.setAttribute('data-card-size', 'small'); 2664 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 2665 // @ts-expect-error ST-2949_2 2666 productObj = obj_products[productObj.uid]; 2667 // create quantity input for popup 2668 var isSoldOut = parseInt(productObj.quantity, 10) <= 0; 2669 if (!isSoldOut && (options.showStoreBtnQuantity === 'both' || options.showStoreBtnQuantity === 'list')) { 2670 t_catalog_addProductQuantity(el_product, productObj, options); 2672 // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046) 2673 // @ts-expect-error ST-2949_5 2674 t_catalog_addProductOptions(recid, productObj, el_product, options); 2676 t_catalog_onFuncLoad('t_prod__initProduct', function () { 2677 // TODO ST-2949_4: cannot find name / missing jQuery types (TS2304, TS2592) 2678 // @ts-expect-error ST-2949_4 2679 t_prod__initProduct(el_product, options); 2683 t_catalog__updateBgUpOverlayOffsets(rec); 2685 // после загрузки товаров - меняем опции в соответствии с фильтрами 2688 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) 2689 // @ts-expect-error ST-2949_1 2690 window.tCatalogFilters && 2691 // @ts-expect-error ST-2949_1 2692 typeof window.tCatalogFilters === 'object' && 2693 // @ts-expect-error ST-2949_1 2694 window.tCatalogFilters[recid] && 2695 // @ts-expect-error ST-2949_1 2696 typeof window.tCatalogFilters[recid] === 'object' && 2697 t_catalog__hasRecUrlParams(recid) 2699 const recCustomUrlParams = t_catalog__getRecUrlParams(recid); 2700 Array.prototype.forEach.call(productsArr, function (productObj) {