Каталог файловtilda-cart-1.1.js
6001 return;6002 }6003 6004 var paymentInputs = document.querySelectorAll('.t706 .t-form .t-radio__wrapper-payment input');6005 if (paymentInputs.length) {6006 Array.prototype.forEach.call(paymentInputs, function (paymentInput) {6007 paymentInput.addEventListener('change', function () {6008 // Игнорируем change у ПС, скрытых/отключённых через disablePaySys6009 const paymentControl = paymentInput.closest('.t-radio__control');6010 if (paymentInput.disabled || (paymentControl && paymentControl.style.display === 'none')) return;6011
История файла и сравнение версий
var variantInput = document.querySelector(
6013 '.t706 .t-form .t-radio__wrapper-payment input:checked:not(:disabled)' 6017 variant = variantInput.getAttribute('data-payment-variant-system'); 6022 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) 6023 // @ts-expect-error ST-2949_3 6024 tcart__getCartBlock().setAttribute('data-payment-variant-system', variant); 6025 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 6026 // @ts-expect-error ST-2949_2 6027 window.tcart['system'] = variant; 6028 if (variant && variant !== 'none') { 6029 var selectedDeliveryInput = document.querySelector( 6030 '.t706 .t-form .t-radio__wrapper-delivery input:checked' 6032 // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046) 6033 // @ts-expect-error ST-2949_5 6034 tcart__rememberSelectedPaySys(selectedDeliveryInput, variant); 6035 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) 6036 // @ts-expect-error ST-2949_1 6037 delete window.tcart.force_none; 6041 // Синхронизируем доступность ПС с текущей доставкой до триггера change 6042 tcart__syncPaymentMethodsForDelivery(); 6043 var selectedInput = document.querySelector( 6044 '.t706 .t-form .t-radio__wrapper-payment input:checked:not(:disabled)' 6046 if (selectedInput) t_triggerEvent(selectedInput, 'change'); 6050// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 6051// @ts-expect-error ST-2949_2 6052function tcart__escapeHtml(text) { 6059 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 6060 // @ts-expect-error ST-2949_2 6061 return text.replace(/[<>"']/g, function (m) { 6062 // @ts-expect-error ST-2949_2 6067// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 6068// @ts-expect-error ST-2949_2 6069function tcart__escapeHtmlImg(text) { 6075 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 6076 // @ts-expect-error ST-2949_2 6077 return text.replace(/[<>"]/g, function (m) { 6078 // @ts-expect-error ST-2949_2 6083// Логика форматтеров в src/tilda-cart/domain/format, ST-3202. Глобальные функции остаются для внешних вызовов. 6085 * @param {unknown} price 6087function tcart__cleanPrice(price) { 6088 return t_cart__cleanPrice(price); 6092 * @param {unknown} price 6094function tcart__roundPrice(price) { 6095 return t_cart__roundPrice(price); 6099 * @param {unknown} weight 6100 * @param {unknown} unit