From 985ba8aeb19eae3c39fce254074645eb8dba5b4c Mon Sep 17 00:00:00 2001 From: egortriston Date: Wed, 2 Jul 2025 16:28:37 +0300 Subject: [PATCH] 0207 --- pravki/about.html | 4 +- pravki/brand.html | 4 +- pravki/card.html | 18 +-- pravki/cart-step-2.html | 18 +-- pravki/cart.html | 18 +-- pravki/catalog.html | 46 +++---- pravki/checkout.html | 4 +- pravki/contacts.html | 4 +- pravki/css/protekproject.webflow.css | 128 ++++++++++++++++-- pravki/detail_category.html | 4 +- pravki/detail_product.html | 4 +- pravki/detail_sku.html | 4 +- pravki/favorite.html | 14 +- pravki/home-new.html | 89 +++++++++--- pravki/index.html | 28 ++-- pravki/js/webflow.js | 4 +- pravki/news-open.html | 4 +- pravki/news.html | 4 +- pravki/order-confirmation.html | 4 +- pravki/payments-method.html | 4 +- pravki/paypal-checkout.html | 4 +- pravki/search-result.html | 8 +- pravki/search.html | 4 +- pravki/test.html | 42 +++--- pravki/thankyoupage.html | 4 +- pravki/vin-knot-c.html | 4 +- pravki/vin-knot.html | 4 +- pravki/vin.html | 4 +- pravki/wholesale.html | 4 +- src/components/BrandWizardSearchSection.tsx | 79 +++++++---- src/components/VehicleSearchResults.tsx | 8 +- src/components/WizardSearchForm.tsx | 29 +++- src/components/vin/KnotIn.tsx | 4 +- src/components/vin/VinCategory.tsx | 4 +- src/components/vin/VinLeftbar.tsx | 34 +++-- src/components/vin/VinQuick.tsx | 2 + .../vehicle-search/[brand]/[vehicleId].tsx | 2 +- src/styles/my.css | 17 ++- 38 files changed, 438 insertions(+), 226 deletions(-) diff --git a/pravki/about.html b/pravki/about.html index 5f7fe5f..e9ac442 100644 --- a/pravki/about.html +++ b/pravki/about.html @@ -1,5 +1,5 @@ - - + + About diff --git a/pravki/brand.html b/pravki/brand.html index 13e31c1..c730390 100644 --- a/pravki/brand.html +++ b/pravki/brand.html @@ -1,5 +1,5 @@ - - + + brand diff --git a/pravki/card.html b/pravki/card.html index fca634f..4c6ff56 100644 --- a/pravki/card.html +++ b/pravki/card.html @@ -1,5 +1,5 @@ - - + + Search result @@ -228,7 +228,7 @@

Аккумуляторная батарея SPEEDMATE AGM 60А/ч

- +
@@ -439,7 +439,7 @@
- +
@@ -468,7 +468,7 @@
- +
@@ -497,7 +497,7 @@
- +
@@ -526,7 +526,7 @@
- +
@@ -555,7 +555,7 @@
- +
@@ -584,7 +584,7 @@
- +
diff --git a/pravki/cart-step-2.html b/pravki/cart-step-2.html index 063e940..e992101 100644 --- a/pravki/cart-step-2.html +++ b/pravki/cart-step-2.html @@ -1,5 +1,5 @@ - - + + Cart Step 2 @@ -214,7 +214,7 @@
- +
Избранное
@@ -829,7 +829,7 @@
- +
@@ -858,7 +858,7 @@
- +
@@ -887,7 +887,7 @@
- +
@@ -916,7 +916,7 @@
- +
@@ -945,7 +945,7 @@
- +
@@ -974,7 +974,7 @@
- +
diff --git a/pravki/cart.html b/pravki/cart.html index c3e5ef5..8c5bccc 100644 --- a/pravki/cart.html +++ b/pravki/cart.html @@ -1,5 +1,5 @@ - - + + Cart @@ -214,7 +214,7 @@
- +
Избранное
@@ -1123,7 +1123,7 @@
- +
@@ -1152,7 +1152,7 @@
- +
@@ -1181,7 +1181,7 @@
- +
@@ -1210,7 +1210,7 @@
- +
@@ -1239,7 +1239,7 @@
- +
@@ -1268,7 +1268,7 @@
- +
diff --git a/pravki/catalog.html b/pravki/catalog.html index 25a7253..d5c4246 100644 --- a/pravki/catalog.html +++ b/pravki/catalog.html @@ -1,5 +1,5 @@ - - + + Catalog @@ -214,7 +214,7 @@
- +
Избранное
@@ -478,7 +478,7 @@
- +
@@ -507,7 +507,7 @@
- +
@@ -536,7 +536,7 @@
- +
@@ -565,7 +565,7 @@
- +
@@ -594,7 +594,7 @@
- +
@@ -623,7 +623,7 @@
- +
@@ -652,7 +652,7 @@
- +
@@ -681,7 +681,7 @@
- +
@@ -710,7 +710,7 @@
- +
@@ -739,7 +739,7 @@
- +
@@ -768,7 +768,7 @@
- +
@@ -797,7 +797,7 @@
- +
@@ -826,7 +826,7 @@
- +
@@ -855,7 +855,7 @@
- +
@@ -884,7 +884,7 @@
- +
@@ -913,7 +913,7 @@
- +
@@ -942,7 +942,7 @@
- +
@@ -971,7 +971,7 @@
- +
@@ -1000,7 +1000,7 @@
- +
@@ -1029,7 +1029,7 @@
- +
diff --git a/pravki/checkout.html b/pravki/checkout.html index 2aad7eb..ab561b4 100644 --- a/pravki/checkout.html +++ b/pravki/checkout.html @@ -1,5 +1,5 @@ - - + + Protek diff --git a/pravki/contacts.html b/pravki/contacts.html index c1beabf..3124441 100644 --- a/pravki/contacts.html +++ b/pravki/contacts.html @@ -1,5 +1,5 @@ - - + + contacts diff --git a/pravki/css/protekproject.webflow.css b/pravki/css/protekproject.webflow.css index ae54a52..c904530 100644 --- a/pravki/css/protekproject.webflow.css +++ b/pravki/css/protekproject.webflow.css @@ -4601,7 +4601,6 @@ body { justify-content: flex-start; align-self: auto; align-items: flex-start; - margin-bottom: 80px; display: flex; } @@ -6533,6 +6532,14 @@ body { margin-left: 30px; } +.flex-block-108-copy { + grid-column-gap: 18px; + grid-row-gap: 18px; + justify-content: space-between; + align-items: flex-start; + overflow: scroll; +} + @media screen and (min-width: 1440px) { .body { --_fonts---font-family: Onest, sans-serif; @@ -6838,6 +6845,10 @@ body { margin-top: 0; } + .ci1:hover { + background-color: var(--light-blue); + } + .vinleftbar { width: 320px; } @@ -6855,18 +6866,32 @@ body { max-width: none; } + .flex-block-118 { + grid-column-gap: 0px; + grid-row-gap: 0px; + } + .heading-20 { font-size: 48px; } .flex-block-119 { - width: 520px; + width: 480px; } .bestpriceitem.end { display: flex; } + .flex-block-121 { + grid-column-gap: 15px; + grid-row-gap: 15px; + } + + .ci2:hover, .ci3:hover, .ci4:hover, .ci5:hover, .ci6:hover, .ci7:hover, .ci8:hover, .ci9:hover { + background-color: var(--light-blue); + } + .flex-block-124 { width: 540px; } @@ -7251,6 +7276,7 @@ body { } .slider { + align-self: stretch; height: auto; display: flex; } @@ -7348,6 +7374,8 @@ body { flex-flow: column; justify-content: space-between; align-items: flex-start; + padding-top: 40px; + padding-bottom: 40px; } .div-block-12, .div-block-12.small { @@ -8032,8 +8060,12 @@ body { margin-top: 0; } + .code-embed-15 { + width: 160px; + } + .topnav { - margin-left: 0; + margin-left: 190px; } .topmenub { @@ -8061,6 +8093,10 @@ body { padding-bottom: 40px; } + .div-block-128 { + background-position: 0%; + } + .catnav { padding-left: 30px; padding-right: 30px; @@ -8089,10 +8125,19 @@ body { flex-flow: row; } + .supportheading { + font-size: 30px; + } + .image-5-copy { object-fit: contain; } + .image-27 { + margin-bottom: -280px; + margin-left: 530px; + } + .container-copy, .container-copy.nav, .container-copy.info { padding-left: 0; padding-right: 0; @@ -8324,6 +8369,10 @@ body { align-items: center; } + .flex-block-26 { + min-width: 120px; + } + .container2 { padding: 20px 30px; } @@ -8976,6 +9025,18 @@ body { padding-bottom: 90px; } + .div-block-129 { + justify-content: flex-start; + align-self: stretch; + align-items: center; + } + + .flex-block-108 { + flex-flow: column; + justify-content: space-between; + align-items: center; + } + .container-vin { padding-top: 20px; } @@ -8989,7 +9050,24 @@ body { padding-bottom: 90px; } - .inbt, .news-index-block-copy { + .inbt { + grid-column-gap: 20px; + grid-row-gap: 20px; + } + + .flex-block-123 { + flex-flow: column; + } + + .flex-block-124 { + flex: 1; + } + + .image-27 { + margin-left: 330px; + } + + .news-index-block-copy { grid-column-gap: 20px; grid-row-gap: 20px; } @@ -9349,7 +9427,7 @@ body { } .heading_news { - line-height: 28px; + line-height: 20px; } .text-block-20 { @@ -9881,6 +9959,10 @@ body { padding-bottom: 5px; } + .icon-setting { + border: 0 #000; + } + .section-3 { padding-left: 15px; padding-right: 15px; @@ -10246,11 +10328,16 @@ body { } .favcardcat { + border-style: none; width: 30px; height: 30px; margin-top: 0; } + .code-embed-15 { + display: none; + } + .topnav { margin-left: 0; top: 58px; @@ -10319,6 +10406,17 @@ body { padding: 40px 0 90px; } + .div-block-129 { + justify-content: flex-start; + align-items: flex-start; + width: 100%; + height: auto; + } + + .flex-block-109 { + margin-bottom: 10px; + } + .saletag { padding-top: 3px; padding-bottom: 3px; @@ -10326,6 +10424,15 @@ body { top: -15px; } + .flex-block-110 { + grid-column-gap: 10px; + grid-row-gap: 10px; + flex-flow: column-reverse; + justify-content: flex-start; + align-items: flex-start; + margin-bottom: 20px; + } + .catnav { padding-left: 15px; padding-right: 15px; @@ -10452,16 +10559,17 @@ body { } .submit-button-copy { - align-self: stretch; - padding: 15px 30px; + align-self: auto; + padding: 15px 25px; } .supportheading { font-size: var(--_fonts---font-size--heading-2); + width: 220px; } .image-5-copy { - width: 100%; + width: 60%; height: 100%; min-height: auto; } @@ -10470,6 +10578,10 @@ body { margin-bottom: 10px; } + .image-27 { + display: none; + } + .container-copy { max-width: 100%; margin-left: 0; diff --git a/pravki/detail_category.html b/pravki/detail_category.html index a7dbae8..a41bc27 100644 --- a/pravki/detail_category.html +++ b/pravki/detail_category.html @@ -1,5 +1,5 @@ - - + + Protek diff --git a/pravki/detail_product.html b/pravki/detail_product.html index f8ec99e..39ac207 100644 --- a/pravki/detail_product.html +++ b/pravki/detail_product.html @@ -1,5 +1,5 @@ - - + + Protek diff --git a/pravki/detail_sku.html b/pravki/detail_sku.html index 8931c5e..3f3b6f8 100644 --- a/pravki/detail_sku.html +++ b/pravki/detail_sku.html @@ -1,5 +1,5 @@ - - + + Protek diff --git a/pravki/favorite.html b/pravki/favorite.html index 76a2af0..13dcc2c 100644 --- a/pravki/favorite.html +++ b/pravki/favorite.html @@ -1,5 +1,5 @@ - - + + Favorite @@ -605,7 +605,7 @@
- +
@@ -634,7 +634,7 @@
- +
@@ -663,7 +663,7 @@
- +
@@ -692,7 +692,7 @@
- +
@@ -721,7 +721,7 @@
- +
diff --git a/pravki/home-new.html b/pravki/home-new.html index 1c5f7e5..810b3b2 100644 --- a/pravki/home-new.html +++ b/pravki/home-new.html @@ -1,5 +1,5 @@ - - + + Home New @@ -20,7 +20,7 @@
-
+
Детали для ТО
@@ -456,7 +456,7 @@
- +
@@ -482,7 +482,7 @@
- +
@@ -508,7 +508,7 @@
- +
@@ -534,7 +534,7 @@
- +
@@ -560,7 +560,7 @@
- +
@@ -597,7 +597,7 @@
- +
@@ -626,7 +626,7 @@
- +
@@ -655,7 +655,7 @@
- +
@@ -684,7 +684,7 @@
- +
@@ -713,7 +713,7 @@
- +
@@ -742,7 +742,7 @@
- +
@@ -791,7 +791,7 @@
- +
@@ -820,7 +820,7 @@
- +
@@ -849,7 +849,7 @@
- +
@@ -878,7 +878,7 @@
- +
@@ -907,7 +907,7 @@
- +
@@ -936,7 +936,7 @@
- +
@@ -970,7 +970,7 @@
-

МЫ ВСЕГДА РАДЫ ПОМОЧЬ

+

МЫ ВСЕГДА РАДЫ ПОМОЧЬ

Если вам нужна помощь с подбором автозапчастей, то воспользуйтесь формой VIN-запроса. Введите идентификационный номер (VIN) вашего автомобиля — и мы найдём нужную деталь.
Отправить VIN-запрос @@ -1173,6 +1173,51 @@
+ diff --git a/pravki/index.html b/pravki/index.html index 67c76ce..278d0a9 100644 --- a/pravki/index.html +++ b/pravki/index.html @@ -1,5 +1,5 @@ - - + + Protek @@ -491,7 +491,7 @@
- +
@@ -520,7 +520,7 @@
- +
@@ -549,7 +549,7 @@
- +
@@ -578,7 +578,7 @@
- +
@@ -607,7 +607,7 @@
- +
@@ -636,7 +636,7 @@
- +
@@ -690,7 +690,7 @@
- +
@@ -719,7 +719,7 @@
- +
@@ -748,7 +748,7 @@
- +
@@ -777,7 +777,7 @@
- +
@@ -806,7 +806,7 @@
- +
@@ -835,7 +835,7 @@
- +
diff --git a/pravki/js/webflow.js b/pravki/js/webflow.js index 9cd535c..42cda22 100644 --- a/pravki/js/webflow.js +++ b/pravki/js/webflow.js @@ -273,7 +273,7 @@ spurious results.`)}}return!1};class z{constructor(e,t="GraphQL request",n={line count product { id - f_name_: name + f_name_ } sku { id @@ -285,7 +285,7 @@ spurious results.`)}}return!1};class z{constructor(e,t="GraphQL request",n={line } } } -`,w=(e,t)=>e.query({query:N,variables:{finalizedOrder:t}}).then(e=>e?.data?.database?.commerceOrder),R=(e,t)=>{if("undefined"==typeof fbq&&"undefined"==typeof gtag)return;let n={};try{let e=window.localStorage.getItem("wf-seen-orders");e&&(n=JSON.parse(e))}catch(e){return}n[t.orderId]||w(e,t).then(e=>{if(!e)return;let{decimalValue:r,unit:i}=e.total;"undefined"!=typeof fbq&&"function"==typeof fbq&&fbq("track","Purchase",{value:r,currency:i,content_ids:(e.userItems||[]).map(e=>e.sku.id),content_type:"product",contents:(e.userItems||[]).map(e=>({id:e.sku.id,quantity:e.count,item_price:e.price.decimalValue}))}),"undefined"!=typeof gtag&&"function"==typeof gtag&>ag("event","purchase",{transaction_id:e.id,value:r,currency:i,items:(e.userItems||[]).map(e=>({id:e.sku.id,name:e.product.f_name_,quantity:e.count,price:e.price.decimalValue}))}),n[t.orderId]=!0;try{window.localStorage.setItem("wf-seen-orders",JSON.stringify(n))}catch(e){return}})}},14155:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PillGroups",{enumerable:!0,get:function(){return a}});let r=n(10873),i=Object.freeze({RETURN:13,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40});class a{form;pillGroups;onSelect;static hasPillGroups(e){return e.querySelectorAll(`[${r.DATA_ATTR_NODE_TYPE}="${r.NODE_TYPE_COMMERCE_ADD_TO_CART_PILL_GROUP}"]`).length>0}constructor(e,t){this.form=e,this.pillGroups={},this.onSelect=t}init(){for(let e of this.form.querySelectorAll(`[${r.DATA_ATTR_NODE_TYPE}="${r.NODE_TYPE_COMMERCE_ADD_TO_CART_PILL_GROUP}"]`)){let t=new o(e,this.onSelect,this);t.init(),this.pillGroups[t.optionSetId]=t}}setSelectedPillsForSkuValues(e){for(let t of Object.keys(e)){let n=e[t],r=this.pillGroups[t];if(r){let e=r.findPillById(String(n));r.updatePillsWithNewSelected(e)}}}}class o{node;optionSetId;onSelect;pills;groups;constructor(e,t,n){this.node=e,this.optionSetId=String(e.getAttribute(r.DATA_ATTR_COMMERCE_OPTION_SET_ID)),this.onSelect=t,this.pills=[],this.groups=n}get firstEnabledPill(){return this.pills.find(e=>!1===e.disabled)}get value(){let e=this.pills.find(e=>!0===e.checked);return e?e.value:""}get options(){return this.pills}set selectedIndex(e){let t=this.pills[e]||null;this.emitSelected(t)}getAttribute(e){if(e===r.DATA_ATTR_COMMERCE_OPTION_SET_ID)return this.optionSetId;throw Error(`PillGroup: Attempted to fetch unsupported attribute ${e}`)}init(){let e=this.node.querySelectorAll(`[${r.DATA_ATTR_NODE_TYPE}="${r.NODE_TYPE_COMMERCE_ADD_TO_CART_PILL}"]`);this.pills=Array.from(e).map(e=>{let t=new s(e,this);return t.init(),t}),this.firstEnabledPill&&(this.firstEnabledPill.tabIndex=0),this.node._wfPillGroup=this}findPillById(e){return this.pills.find(t=>t.optionId===e)}updatePillsWithNewSelected(e){for(let e of this.pills)e.tabIndex=-1,e.checked=!1;e instanceof s?(e.tabIndex=0,e.checked=!0):this.firstEnabledPill&&(this.firstEnabledPill.tabIndex=0)}emitSelected(e){this.onSelect({optionId:e.optionId,optionSetId:this.optionSetId,groups:Object.values(this.groups.pillGroups)})}traverseAndEmitSelected(e,t){let n,r=this.pills.indexOf(e),i=!1,a=r;for(;!i;){if("previous"===t)(n=a-1)<0&&(n=this.pills.length-1);else if("next"===t)(n=a+1)===this.pills.length&&(n=0);else throw Error(`Unknown pill traversal direction "${t}", use "previous" or "next"`);if(n===r)break;let e=this.pills[n];e.disabled?a=n:(this.emitSelected(e),e.focus(),i=!0)}}}class s{node;optionId;group;constructor(e,t){this.node=e,this.optionId=String(this.node.getAttribute("data-option-id")),this.group=t}init(){this.tabIndex=-1,this.checked=!1,this.node.addEventListener("keydown",this.handleKeyDown),this.node.addEventListener("click",this.handleClick)}get tabIndex(){return this.node.tabIndex}set tabIndex(e){this.node.tabIndex=e}get value(){return this.optionId}get checked(){return"true"===this.node.getAttribute("aria-checked")}set checked(e){this.node.setAttribute("aria-checked",String(e)),e?this.node.classList.add("w--ecommerce-pill-selected"):this.node.classList.remove("w--ecommerce-pill-selected")}get disabled(){return"true"===this.node.getAttribute("aria-disabled")}set disabled(e){this.node.setAttribute("aria-disabled",String(e)),e?(this.node.classList.add("w--ecommerce-pill-disabled"),this.checked=!1,this.tabIndex=-1):this.node.classList.remove("w--ecommerce-pill-disabled")}get enabled(){return!this.disabled}set enabled(e){this.disabled=!e}focus(){this.node.focus()}handleKeyDown=e=>{let t=!1;if(!e.altKey&&!e.metaKey){switch(e.keyCode){case i.RETURN:case i.SPACE:this.handleClick(),t=!0;break;case i.UP:case i.LEFT:this.group.traverseAndEmitSelected(this,"previous"),t=!0;break;case i.DOWN:case i.RIGHT:this.group.traverseAndEmitSelected(this,"next"),t=!0}t&&(e.stopPropagation(),e.preventDefault())}};handleClick=()=>{this.disabled||this.checked||(this.focus(),this.group.emitSelected(this))}}},85986:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n}});let n={log:(...e)=>{},error:(...e)=>{}}},48873:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let n=(e,t=[])=>null==e?t:t.concat(n(Object.getPrototypeOf(e))).concat(Object.keys(e)),r=(e,t)=>{let r=n(e).filter(e=>"currentTarget"!==e).reduce((t,n)=>(t[n]="function"==typeof e[n]?{value:(...t)=>e[n](...t)}:{get:()=>e[n]},t),{});return Object.create(e,{currentTarget:{value:t},...r})};class i{apolloClient;stripeStore;eventHandlers;constructor(e,t){this.eventHandlers={},this.apolloClient=e,this.stripeStore=t}on=(e,t,n)=>{let r=this.eventHandlers[e]instanceof Array?this.eventHandlers[e]:[];return this.eventHandlers[e]=[...r,this.createHandlerProxy(e,t,n)],this};createHandlerProxy=(e,t,n)=>e=>{let i=t(e),a=i instanceof Element?r(e,i):e;i&&n(a,this.apolloClient,this.stripeStore)};attachHandlers=e=>(Object.keys(this.eventHandlers).forEach(t=>{this.eventHandlers[t].forEach(n=>e.addEventListener(t,n,!0))}),this);removeHandlers=e=>(Object.keys(this.eventHandlers).forEach(t=>{this.eventHandlers[t].forEach(n=>e.removeEventListener(t,n,!0))}),this)}},2330:function(e,t,n){"use strict";let r,i,a;Object.defineProperty(t,"__esModule",{value:!0});var o={design:function(){return L},destroy:function(){return O},init:function(){return E},preview:function(){return v}};for(var s in o)Object.defineProperty(t,s,{enumerable:!0,get:o[s]});n(84037),n(68259),n(60033),n(9246),n(67321),n(52897),n(233),n(49754),n(30971),n(62374),n(55152),n(35273),n(30172),n(65723),n(48258),n(89433);let c=n(25195),u=b(n(48873)),l=b(n(84303)),d=b(n(82150)),f=b(n(82333)),p=b(n(45870)),m=b(n(94492)),_=n(5841),h=n(54556);n(67304),n(14362);let M=n(17696),y=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=A(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}(n(86365));function b(e){return e&&e.__esModule?e:{default:e}}function A(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(A=function(e){return e?n:t})(e)}function g(){r&&r.attachHandlers(window)}function T(){r&&r.removeHandlers(window)}function E({siteId:e}){i=(0,c.createApolloClient)({path:window.Webflow.env("design")||window.Webflow.env("preview")?`/api/v2/sites/${e}/apollo`:"/.wf_graphql/apollo",retryConfig:{maxAttempts:5},useCsrf:!0}),a=new _.StripeStore(document),r=new u.default(i,a),l.default.register(r),d.default.register(r),f.default.register(r),p.default.register(r),m.default.register(r),y.default.register(r),(0,M.initializeStripeElements)(a),T(),g(),(0,h.triggerRender)(null,!0),window.Webflow.env()||window.Webflow.load((0,y.renderPaypalButtons)(i))}function v(){T(),g(),(0,h.triggerRender)(null,!0)}function L(){T(),i&&i.store&&i.resetStore()}function O(){T()}},45870:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={default:function(){return m},register:function(){return p}};for(var i in r)Object.defineProperty(t,i,{enumerable:!0,get:r[i]});let a=l(n(28160)),o=l(n(26882)),s=n(54556),c=n(91898),u=n(10873);function l(e){return e&&e.__esModule?e:{default:e}}let d=(e,t)=>{(0,c.renderTree)(e,t)},f=(e,t)=>{if(window.Webflow.env("design")||window.Webflow.env("preview")||!(e instanceof CustomEvent&&e.type===u.RENDER_TREE_EVENT))return;let n=[],{detail:r}=e;null!=r&&r.error&&n.push(r.error);let i=(0,s.findElementByNodeType)(u.NODE_TYPE_COMMERCE_ORDER_CONFIRMATION_WRAPPER);if(!i)return;let{orderId:c,token:l}=o.default.parse(window.location.search.substring(1));if(!c||!l)return;let f={orderId:c,token:l};(0,s.trackOrder)(t,f);let p=(0,s.findAllElementsByNodeType)(u.NODE_TYPE_COMMERCE_ORDER_CONFIRMATION_WRAPPER);t.query({query:(0,a.default)` +`,w=(e,t)=>e.query({query:N,variables:{finalizedOrder:t}}).then(e=>e?.data?.database?.commerceOrder),R=(e,t)=>{if("undefined"==typeof fbq&&"undefined"==typeof gtag)return;let n={};try{let e=window.localStorage.getItem("wf-seen-orders");e&&(n=JSON.parse(e))}catch(e){return}n[t.orderId]||w(e,t).then(e=>{if(!e)return;let{decimalValue:r,unit:i}=e.total;"undefined"!=typeof fbq&&"function"==typeof fbq&&fbq("track","Purchase",{value:r,currency:i,content_ids:(e.userItems||[]).map(e=>e.sku.id),content_type:"product",contents:(e.userItems||[]).map(e=>({id:e.sku.id,quantity:e.count,item_price:e.price.decimalValue}))}),"undefined"!=typeof gtag&&"function"==typeof gtag&>ag("event","purchase",{transaction_id:e.id,value:r,currency:i,items:(e.userItems||[]).map(e=>({id:e.sku.id,name:e.product.f_name_,quantity:e.count,price:e.price.decimalValue}))}),n[t.orderId]=!0;try{window.localStorage.setItem("wf-seen-orders",JSON.stringify(n))}catch(e){return}})}},14155:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PillGroups",{enumerable:!0,get:function(){return a}});let r=n(10873),i=Object.freeze({RETURN:13,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40});class a{form;pillGroups;onSelect;static hasPillGroups(e){return e.querySelectorAll(`[${r.DATA_ATTR_NODE_TYPE}="${r.NODE_TYPE_COMMERCE_ADD_TO_CART_PILL_GROUP}"]`).length>0}constructor(e,t){this.form=e,this.pillGroups={},this.onSelect=t}init(){for(let e of this.form.querySelectorAll(`[${r.DATA_ATTR_NODE_TYPE}="${r.NODE_TYPE_COMMERCE_ADD_TO_CART_PILL_GROUP}"]`)){let t=new o(e,this.onSelect,this);t.init(),this.pillGroups[t.optionSetId]=t}}setSelectedPillsForSkuValues(e){for(let t of Object.keys(e)){let n=e[t],r=this.pillGroups[t];if(r){let e=r.findPillById(String(n));r.updatePillsWithNewSelected(e)}}}}class o{node;optionSetId;onSelect;pills;groups;constructor(e,t,n){this.node=e,this.optionSetId=String(e.getAttribute(r.DATA_ATTR_COMMERCE_OPTION_SET_ID)),this.onSelect=t,this.pills=[],this.groups=n}get firstEnabledPill(){return this.pills.find(e=>!1===e.disabled)}get value(){let e=this.pills.find(e=>!0===e.checked);return e?e.value:""}get options(){return this.pills}set selectedIndex(e){let t=this.pills[e]||null;this.emitSelected(t)}getAttribute(e){if(e===r.DATA_ATTR_COMMERCE_OPTION_SET_ID)return this.optionSetId;throw Error(`PillGroup: Attempted to fetch unsupported attribute ${e}`)}init(){let e=this.node.querySelectorAll(`[${r.DATA_ATTR_NODE_TYPE}="${r.NODE_TYPE_COMMERCE_ADD_TO_CART_PILL}"]`);this.pills=Array.from(e).map(e=>{let t=new s(e,this);return t.init(),t}),this.firstEnabledPill&&(this.firstEnabledPill.tabIndex=0),this.node._wfPillGroup=this}findPillById(e){return this.pills.find(t=>t.optionId===e)}updatePillsWithNewSelected(e){for(let e of this.pills)e.tabIndex=-1,e.checked=!1;e instanceof s?(e.tabIndex=0,e.checked=!0):this.firstEnabledPill&&(this.firstEnabledPill.tabIndex=0)}emitSelected(e){this.onSelect({optionId:e.optionId,optionSetId:this.optionSetId,groups:Object.values(this.groups.pillGroups)})}traverseAndEmitSelected(e,t){let n,r=this.pills.indexOf(e),i=!1,a=r;for(;!i;){if("previous"===t)(n=a-1)<0&&(n=this.pills.length-1);else if("next"===t)(n=a+1)===this.pills.length&&(n=0);else throw Error(`Unknown pill traversal direction "${t}", use "previous" or "next"`);if(n===r)break;let e=this.pills[n];e.disabled?a=n:(this.emitSelected(e),e.focus(),i=!0)}}}class s{node;optionId;group;constructor(e,t){this.node=e,this.optionId=String(this.node.getAttribute("data-option-id")),this.group=t}init(){this.tabIndex=-1,this.checked=!1,this.node.addEventListener("keydown",this.handleKeyDown),this.node.addEventListener("click",this.handleClick)}get tabIndex(){return this.node.tabIndex}set tabIndex(e){this.node.tabIndex=e}get value(){return this.optionId}get checked(){return"true"===this.node.getAttribute("aria-checked")}set checked(e){this.node.setAttribute("aria-checked",String(e)),e?this.node.classList.add("w--ecommerce-pill-selected"):this.node.classList.remove("w--ecommerce-pill-selected")}get disabled(){return"true"===this.node.getAttribute("aria-disabled")}set disabled(e){this.node.setAttribute("aria-disabled",String(e)),e?(this.node.classList.add("w--ecommerce-pill-disabled"),this.checked=!1,this.tabIndex=-1):this.node.classList.remove("w--ecommerce-pill-disabled")}get enabled(){return!this.disabled}set enabled(e){this.disabled=!e}focus(){this.node.focus()}handleKeyDown=e=>{let t=!1;if(!e.altKey&&!e.metaKey){switch(e.keyCode){case i.RETURN:case i.SPACE:this.handleClick(),t=!0;break;case i.UP:case i.LEFT:this.group.traverseAndEmitSelected(this,"previous"),t=!0;break;case i.DOWN:case i.RIGHT:this.group.traverseAndEmitSelected(this,"next"),t=!0}t&&(e.stopPropagation(),e.preventDefault())}};handleClick=()=>{this.disabled||this.checked||(this.focus(),this.group.emitSelected(this))}}},85986:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n}});let n={log:(...e)=>{},error:(...e)=>{}}},48873:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let n=(e,t=[])=>null==e?t:t.concat(n(Object.getPrototypeOf(e))).concat(Object.keys(e)),r=(e,t)=>{let r=n(e).filter(e=>"currentTarget"!==e).reduce((t,n)=>(t[n]="function"==typeof e[n]?{value:(...t)=>e[n](...t)}:{get:()=>e[n]},t),{});return Object.create(e,{currentTarget:{value:t},...r})};class i{apolloClient;stripeStore;eventHandlers;constructor(e,t){this.eventHandlers={},this.apolloClient=e,this.stripeStore=t}on=(e,t,n)=>{let r=this.eventHandlers[e]instanceof Array?this.eventHandlers[e]:[];return this.eventHandlers[e]=[...r,this.createHandlerProxy(e,t,n)],this};createHandlerProxy=(e,t,n)=>e=>{let i=t(e),a=i instanceof Element?r(e,i):e;i&&n(a,this.apolloClient,this.stripeStore)};attachHandlers=e=>(Object.keys(this.eventHandlers).forEach(t=>{this.eventHandlers[t].forEach(n=>e.addEventListener(t,n,!0))}),this);removeHandlers=e=>(Object.keys(this.eventHandlers).forEach(t=>{this.eventHandlers[t].forEach(n=>e.removeEventListener(t,n,!0))}),this)}},2330:function(e,t,n){"use strict";let r,i,a;Object.defineProperty(t,"__esModule",{value:!0});var o={design:function(){return L},destroy:function(){return O},init:function(){return E},preview:function(){return v}};for(var s in o)Object.defineProperty(t,s,{enumerable:!0,get:o[s]});n(84037),n(68259),n(60033),n(9246),n(67321),n(52897),n(233),n(49754),n(30971),n(62374),n(55152),n(35273),n(30172),n(65723),n(48258),n(89433);let c=n(25195),u=b(n(48873)),l=b(n(84303)),d=b(n(82150)),f=b(n(82333)),p=b(n(45870)),m=b(n(94492)),_=n(5841),h=n(54556);n(67304),n(14362);let M=n(17696),y=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=A(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}(n(86365));function b(e){return e&&e.__esModule?e:{default:e}}function A(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(A=function(e){return e?n:t})(e)}function g(){r&&r.attachHandlers(window)}function T(){r&&r.removeHandlers(window)}function E({siteId:e}){let t=window.Webflow.env("design")||window.Webflow.env("preview");i=(0,c.createApolloClient)({path:t?`/api/v2/sites/${e}/apollo`:"/.wf_graphql/apollo",retryConfig:{maxAttempts:5},useCsrf:!0,disableBatching:!t}),a=new _.StripeStore(document),r=new u.default(i,a),l.default.register(r),d.default.register(r),f.default.register(r),p.default.register(r),m.default.register(r),y.default.register(r),(0,M.initializeStripeElements)(a),T(),g(),(0,h.triggerRender)(null,!0),window.Webflow.env()||window.Webflow.load((0,y.renderPaypalButtons)(i))}function v(){T(),g(),(0,h.triggerRender)(null,!0)}function L(){T(),i&&i.store&&i.resetStore()}function O(){T()}},45870:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={default:function(){return m},register:function(){return p}};for(var i in r)Object.defineProperty(t,i,{enumerable:!0,get:r[i]});let a=l(n(28160)),o=l(n(26882)),s=n(54556),c=n(91898),u=n(10873);function l(e){return e&&e.__esModule?e:{default:e}}let d=(e,t)=>{(0,c.renderTree)(e,t)},f=(e,t)=>{if(window.Webflow.env("design")||window.Webflow.env("preview")||!(e instanceof CustomEvent&&e.type===u.RENDER_TREE_EVENT))return;let n=[],{detail:r}=e;null!=r&&r.error&&n.push(r.error);let i=(0,s.findElementByNodeType)(u.NODE_TYPE_COMMERCE_ORDER_CONFIRMATION_WRAPPER);if(!i)return;let{orderId:c,token:l}=o.default.parse(window.location.search.substring(1));if(!c||!l)return;let f={orderId:c,token:l};(0,s.trackOrder)(t,f);let p=(0,s.findAllElementsByNodeType)(u.NODE_TYPE_COMMERCE_ORDER_CONFIRMATION_WRAPPER);t.query({query:(0,a.default)` ${i.getAttribute(u.ORDER_QUERY)} `,variables:{finalizedOrder:f},fetchPolicy:"network-only",errorPolicy:"all"}).then(e=>{p.forEach(t=>{d(t,{...e,errors:n.concat(e.errors).filter(Boolean)})})}).catch(e=>{n.push(e),p.forEach(e=>{d(e,{errors:n})})})},p=e=>{e.on(u.RENDER_TREE_EVENT,Boolean,f)},m={register:p}},86365:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i={default:function(){return T},renderPaypalButtons:function(){return g}};for(var a in i)Object.defineProperty(t,a,{enumerable:!0,get:i[a]});let o=n(54556),s=n(17696),c=n(69773),u=(r=n(85986))&&r.__esModule?r:{default:r},l=n(94797),d=n(10873),f=({target:e})=>!!((0,o.findClosestElementByNodeType)(d.NODE_TYPE_COMMERCE_CHECKOUT_PLACE_ORDER_BUTTON,e)&&e instanceof Element)&&e,p=!1,m=(e,t)=>{if(window.Webflow.env("design")||window.Webflow.env("preview")||!(e instanceof CustomEvent&&e.type===d.RENDER_TREE_EVENT))return;let n=(0,o.findAllElementsByNodeType)(d.NODE_TYPE_COMMERCE_PAYPAL_CHECKOUT_FORM_CONTAINER);if(!n||0===n.length)return;let r=[],{detail:i}=e;null!=i&&i.error&&r.push(i.error);let a=window.document.activeElement,c=(0,o.findClosestElementByNodeType)(d.NODE_TYPE_COMMERCE_PAYPAL_CHECKOUT_FORM_CONTAINER,a),u=null;a instanceof HTMLInputElement&&c&&((u=a.id)||(u=a.getAttribute("data-wf-bindings")),u=u?null:u),(p?Promise.resolve():t.mutate({mutation:l.syncPayPalOrderInfo})).then(()=>{p=!0,(0,s.renderCheckoutFormContainers)(n,r,t,void 0,u)})},_=!1,h=e=>{_=!0,window.addEventListener("beforeunload",s.beforeUnloadHandler);let t=e.innerHTML,n=e.getAttribute(d.DATA_ATTR_LOADING_TEXT);return e.innerHTML=n||d.CHECKOUT_PLACE_ORDER_LOADING_TEXT_DEFAULT,(n=!1)=>{n||(_=!1),window.removeEventListener("beforeunload",s.beforeUnloadHandler),e.innerHTML=t||d.CHECKOUT_PLACE_ORDER_BUTTON_TEXT_DEFAULT}},M=({shippingInfo:e,additionalInfo:t,requiresShipping:n})=>!HTMLFormElement.prototype.reportValidity||!(n&&!e.reportValidity()||t&&t instanceof HTMLFormElement&&!t.reportValidity()),y=(e,t)=>{if(window.Webflow.env("design")||window.Webflow.env("preview")||_)return;let{currentTarget:n}=e;if(!(n instanceof Element))return;let r=(0,o.findClosestElementByNodeType)(d.NODE_TYPE_COMMERCE_PAYPAL_CHECKOUT_FORM_CONTAINER,n);if(!(r instanceof Element))return;let i=(0,o.findElementByNodeType)(d.NODE_TYPE_COMMERCE_PAYPAL_CHECKOUT_ERROR_STATE,r),a=(0,o.findElementByNodeType)(d.NODE_TYPE_COMMERCE_CHECKOUT_SHIPPING_METHODS_WRAPPER,r),c=(0,o.findElementByNodeType)(d.NODE_TYPE_COMMERCE_CHECKOUT_PLACE_ORDER_BUTTON,r),l=(0,o.findElementByNodeType)(d.NODE_TYPE_COMMERCE_CHECKOUT_ADDITIONAL_INFO,r);if(!(i instanceof HTMLElement)||!(a instanceof HTMLFormElement)||!(c instanceof Element))return;let f=i.querySelector(d.CART_CHECKOUT_ERROR_MESSAGE_SELECTOR);if(f&&f.hasAttribute(d.NEEDS_REFRESH))return;let p=l&&l instanceof HTMLElement,m=h(c);i.style.setProperty("display","none"),(0,o.fetchOrderStatusFlags)(t).then(({requiresShipping:e})=>{if(!M({shippingInfo:a,additionalInfo:l,requiresShipping:e}))return void m();let n="";if(e&&a.elements["shipping-method-choice"]){let e=a.querySelector('input[name="shipping-method-choice"]:checked');e&&(n=e.value)}let r=p?(0,o.customDataFormToArray)(l):[];Promise.all([e?(0,s.createOrderShippingMethodMutation)(t,n):Promise.resolve(),p?(0,s.createCustomDataMutation)(t,r):Promise.resolve()]).then(()=>(0,s.createAttemptSubmitOrderRequest)(t,{checkoutType:"paypal"})).then(e=>{u.default.log(e);let t=(0,s.getOrderDataFromGraphQLResponse)(e);t.ok&&(m(!0),(0,s.redirectToOrderConfirmation)(t,!0))}).catch(e=>{if(m(),u.default.error(e),i.style.removeProperty("display"),(0,s.updateErrorMessage)(i,e),e.graphQLErrors&&e.graphQLErrors[0]&&e.graphQLErrors[0].message){let t=(0,o.safeParseJson)(e.graphQLErrors[0].message);t&&t.details&&t.details[0]&&"INSTRUMENT_DECLINED"===t.details[0].issue&&window.parent.postMessage(JSON.stringify({isWebflow:!0,type:"error",detail:t}),window.location.origin)}})})},b=` display: block; diff --git a/pravki/news-open.html b/pravki/news-open.html index bd06e67..081484d 100644 --- a/pravki/news-open.html +++ b/pravki/news-open.html @@ -1,5 +1,5 @@ - - + + news open diff --git a/pravki/news.html b/pravki/news.html index 60c524f..4c8233f 100644 --- a/pravki/news.html +++ b/pravki/news.html @@ -1,5 +1,5 @@ - - + + News diff --git a/pravki/order-confirmation.html b/pravki/order-confirmation.html index f71e636..4646560 100644 --- a/pravki/order-confirmation.html +++ b/pravki/order-confirmation.html @@ -1,5 +1,5 @@ - - + + Protek diff --git a/pravki/payments-method.html b/pravki/payments-method.html index 562c6f9..ae23e0c 100644 --- a/pravki/payments-method.html +++ b/pravki/payments-method.html @@ -1,5 +1,5 @@ - - + + Payments method diff --git a/pravki/paypal-checkout.html b/pravki/paypal-checkout.html index 335f71f..0f66d0f 100644 --- a/pravki/paypal-checkout.html +++ b/pravki/paypal-checkout.html @@ -1,5 +1,5 @@ - - + + diff --git a/pravki/search-result.html b/pravki/search-result.html index 755a734..21dc11e 100644 --- a/pravki/search-result.html +++ b/pravki/search-result.html @@ -1,5 +1,5 @@ - - + + Search result @@ -214,7 +214,7 @@
- +
Избранное
@@ -251,7 +251,7 @@
INA 530059210
- +
diff --git a/pravki/search.html b/pravki/search.html index 9b4f48f..d516615 100644 --- a/pravki/search.html +++ b/pravki/search.html @@ -1,5 +1,5 @@ - - + + Search Results diff --git a/pravki/test.html b/pravki/test.html index 253e85e..73125ae 100644 --- a/pravki/test.html +++ b/pravki/test.html @@ -1,5 +1,5 @@ - - + + Test @@ -214,7 +214,7 @@
- +
Избранное
@@ -478,7 +478,7 @@
- +
@@ -507,7 +507,7 @@
- +
@@ -536,7 +536,7 @@
- +
@@ -565,7 +565,7 @@
- +
@@ -594,7 +594,7 @@
- +
@@ -623,7 +623,7 @@
- +
@@ -652,7 +652,7 @@
- +
@@ -681,7 +681,7 @@
- +
@@ -710,7 +710,7 @@
- +
@@ -739,7 +739,7 @@
- +
@@ -768,7 +768,7 @@
- +
@@ -797,7 +797,7 @@
- +
@@ -826,7 +826,7 @@
- +
@@ -855,7 +855,7 @@
- +
@@ -884,7 +884,7 @@
- +
@@ -913,7 +913,7 @@
- +
@@ -942,7 +942,7 @@
- +
@@ -971,7 +971,7 @@
- +
diff --git a/pravki/thankyoupage.html b/pravki/thankyoupage.html index d2789db..13fdbb1 100644 --- a/pravki/thankyoupage.html +++ b/pravki/thankyoupage.html @@ -1,5 +1,5 @@ - - + + thankyoupage diff --git a/pravki/vin-knot-c.html b/pravki/vin-knot-c.html index 0d22fb7..a35fc2e 100644 --- a/pravki/vin-knot-c.html +++ b/pravki/vin-knot-c.html @@ -1,5 +1,5 @@ - - + + VIN knot diff --git a/pravki/vin-knot.html b/pravki/vin-knot.html index 9922d2d..93a6812 100644 --- a/pravki/vin-knot.html +++ b/pravki/vin-knot.html @@ -1,5 +1,5 @@ - - + + VIN knot diff --git a/pravki/vin.html b/pravki/vin.html index 5e9e98e..18d90d4 100644 --- a/pravki/vin.html +++ b/pravki/vin.html @@ -1,5 +1,5 @@ - - + + VIN diff --git a/pravki/wholesale.html b/pravki/wholesale.html index 2b3b9c7..095f0bd 100644 --- a/pravki/wholesale.html +++ b/pravki/wholesale.html @@ -1,5 +1,5 @@ - - + + wholesale diff --git a/src/components/BrandWizardSearchSection.tsx b/src/components/BrandWizardSearchSection.tsx index 0e503c5..d4c04ae 100644 --- a/src/components/BrandWizardSearchSection.tsx +++ b/src/components/BrandWizardSearchSection.tsx @@ -14,6 +14,8 @@ const BrandWizardSearchSection: React.FC = () => { const [vehicles, setVehicles] = useState(null); const [brandQuery, setBrandQuery] = useState(''); const buttonRef = useRef(null); + const inputRef = useRef(null); + const [isOpen, setIsOpen] = useState(false); // Получение информации о каталоге через useQuery const { @@ -68,7 +70,7 @@ const BrandWizardSearchSection: React.FC = () => { const catalogInfo = catalogData?.laximoCatalogInfo; return ( -
+
{/*
Подбор автомобиля по параметрам
*/} {/* Combobox бренда */}
@@ -82,45 +84,64 @@ const BrandWizardSearchSection: React.FC = () => {
+ {/* Невидимая кнопка поверх инпута */} +
@@ -152,7 +173,7 @@ const BrandWizardSearchSection: React.FC = () => { )} {catalogInfo && !catalogInfo.supportparameteridentification2 && ( -
+
Для выбранного бренда подбор по параметрам недоступен.
)} diff --git a/src/components/VehicleSearchResults.tsx b/src/components/VehicleSearchResults.tsx index d5c51f0..8a2b9df 100644 --- a/src/components/VehicleSearchResults.tsx +++ b/src/components/VehicleSearchResults.tsx @@ -63,7 +63,7 @@ const VehicleSearchResults: React.FC = ({ {results.map((vehicle, index) => (
handleSelectVehicle(vehicle)} >
@@ -100,15 +100,15 @@ const VehicleSearchResults: React.FC = ({
{vehicle.notes && ( -
+
- +
-

+

Примечание: {vehicle.notes}

diff --git a/src/components/WizardSearchForm.tsx b/src/components/WizardSearchForm.tsx index 183e2c9..8bb34ef 100644 --- a/src/components/WizardSearchForm.tsx +++ b/src/components/WizardSearchForm.tsx @@ -20,6 +20,7 @@ const WizardSearchForm: React.FC = ({ const [error, setError] = useState(''); const [queries, setQueries] = useState>({}); const buttonRefs = useRef>>({}); + const inputRefs = useRef>>({}); const [showSearchButton, setShowSearchButton] = React.useState(true); const [getWizard2] = useLazyQuery(GET_LAXIMO_WIZARD2, { @@ -220,14 +221,18 @@ const WizardSearchForm: React.FC = ({ ? options.filter(option => option.value.toLowerCase().includes(query.toLowerCase())) : options; const buttonRef = buttonRefs.current[step.conditionid]; + // Создаём ref для инпута, если его ещё нет + if (!inputRefs.current[step.conditionid]) { + inputRefs.current[step.conditionid] = React.createRef(); + } + const inputRef = inputRefs.current[step.conditionid]; // Определяем выбранный ключ const selectedKey = selectedParams[step.conditionid]?.key || (step.determined ? options.find(o => o.value === step.value)?.key : ''); // Определяем отображаемый label const selectedLabel = options.find(o => o.key === selectedKey)?.value || selectedParams[step.conditionid]?.value || - step.value || - ''; + step.value || ''; // Если единственный вариант уже выбран — не рендерим селект if (options.length === 1 && (selectedKey === options[0].key || step.determined)) { @@ -252,7 +257,21 @@ const WizardSearchForm: React.FC = ({ disabled={isLoading || options.length === 0} >
+ {/* Невидимая кнопка поверх инпута */} + + {/* */}