Каталог файловtilda-catalog-1.2.js
401 t_catalog_filters_opts_sort(options, recid);402 });403 }404 405 if (options?.breadcrumbs?.hasBreadcrumbs) {406 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)407 // @ts-expect-error ST-2949_3408 rec.addEventListener('controlsDrawn', function () {409 t_catalog_breadcrumbs__init(recid, options);410 });411 }412
История файла и сравнение версий
// Set proper slice if it has been set on URL
416 drawAllProductsGrid(); 419 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 420 // @ts-expect-error ST-2949_2 421 var onDoneGetFilters = function (data) { 422 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) 423 // @ts-expect-error ST-2949_1 424 if (!window.tCatalogFilters) { 425 // @ts-expect-error ST-2949_1 426 window.tCatalogFilters = {}; 428 if (data && ((data.filters && data.filters.length > 0) || data.search || data.sort)) { 429 // @ts-expect-error ST-2949_1 430 window.tCatalogFilters[recid] = data; 432 t_catalog__loadTildaCatalogFilters() 433 .then(() => onLoadFilters()) 434 .catch(() => drawAllProductsGrid()); 436 t_catalog__loadTooltipster(); 438 drawAllProductsGrid(); 442 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 443 // @ts-expect-error ST-2949_2 444 t_catalog_loadFilters(options, onDoneGetFilters, function (error) { 445 t_catalog_changeEndpoint(error, function () { 446 // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046) 447 // @ts-expect-error ST-2949_5 448 t_catalog_loadFilters(options, onDoneGetFilters); 452 if (options.isHorizOnMob && options.prodCard.listStyle === 'tile') { 453 var handIcon = t_catalog_get_handIcon_html(recid, options.horizontalScrollHint); 455 gridPreloader.insertAdjacentHTML('beforebegin', handIcon); 460 t_catalog__loadTildaCatalogTabs(); 463 if (options.showPagination && options.showPagination === 'on') { 464 t_catalog__loadTildaCatalogPagination(); 467 t_onFuncLoad('t_throttle', function () { 468 window.addEventListener( 470 t_throttle(function () { 472 if (options.prodCard.listStyle === 'list') { 473 t_catalog_unifyCardsWidth(recid); 475 t_catalog_loadMoreBtn_display(recid); 476 if (options.sidebar || Object.keys(options.filters || {}).length > 1) { 477 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) 478 // @ts-expect-error ST-2949_1 479 const data = window.tCatalogFilters[recid]; 480 const { shouldShowSearchSort } = t_catalog_filters__getVisibilityFlags(options, data); 481 if (!shouldShowSearchSort) { 482 t_catalog_moveSearhSort(recid, options); 485 if (options.showPagination && options.showPagination === 'on') { 486 t_catalog_onFuncLoad('t_catalog_pagination_display', function () { 487 // TODO ST-2949_4: cannot find name / missing jQuery types (TS2304, TS2592) 488 // @ts-expect-error ST-2949_4 489 t_catalog_pagination_display(recid); 496 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) 497 // @ts-expect-error ST-2949_3 498 var tStore = rec.querySelector('.t-catalog');