{"version":3,"sources":["webpack:///./Scripts/Components/RangeSlider.js","webpack:///./Scripts/Components/TireSearchDrawer.js","webpack:///./Scripts/Components/RimSearchDrawer.js","webpack:///./Scripts/Containers/FacetedSearchCompact.container.js"],"names":["AirbnbSlider","styled","Slider","theme","color","height","padding","width","backgroundColor","border","boxShadow","marginLeft","marginRight","palette","mode","opacity","undefined","AirbnbThumbComponent","props","children","other","className","getIntsString","rangeString","split","map","n","parseInt","RangeSlider","filter","onFacetChange","options","option","label","length","find","x","selectedOptions","includes","id","currentValue","range","useState","value","setValue","useEffect","components","Thumb","min","max","onChange","event","newValue","valueLabelDisplay","onChangeCommitted","rangeAsString","push","TireSerachDrawer","diameter","filters","showDrawer","handleCloseSearchDrawer","totalHits","vehicleData","getTireSizeString","tire","profile","isFront","translate","onClick","index","selectedSize","tires","constants","handleChangeVehicleSize","target","findIndex","key","e","tyreTypeFilter","winterFilter","selectedOption","dataset","type","cssValue","quantity","some","price_range","RimSerachDrawer","allseason","isAllSeasonActive","setIsAllSeasonActive","rims","rim","Brand","checked","AllSeason","FacetedSearchCompactContainer","facetFilters","categoryTemplateId","state","showSearchDrawer","drawerOpen","regNo","openedFilter","loading","removeVehicle","bind","getVehicleDataByRegNo","handleRegNoInputChange","handleRegNoInputClick","getVehicleDataByVehicleSelector","handleShowSearchDrawer","getFiltersObject","getCurrentSearchString","displaySearchBar","debouncedFacetSubmit","debounce","submit","callback","isSingleSelect","singleSelect","this","setState","prevState","newFilters","updateFilterOption","onSubmit","dom","container","document","createElement","innerHTML","existingResult","querySelector","tempResult","existingFilter","tempFilter","existingCompleteWheels","tempCompleteWheels","replace","node","newNode","parentNode","replaceChild","window","__litium","bootstrapComponents","prevProps","productViewCached","cache","PRODUCT_VIEW_CACHED","used","productsView","onSearchResultDataChange","previousState","category","isNullOrWhiteSpace","tireCategoryLink","location","href","tireQueryFilters","pathname","rimCategoryLink","rimQueryFilters","selectedVariant","getVehicleDataByVariantId","clearState","selectedWidth","selectedHeight","selectedDiameter","selectedTyreType","toUpperCase","forEach","vehicleFinder","subNavigation","sortCriteria","hidden","every","ele","selectedProducts","rimCategory","selectedRimSize","Fragment","LoadingOverlay","style","marginTop","VehicleData","VehicleFinder","errors","drawerRef","Component","connect","facetedSearch","visibleDropdownMenu","navigationTheme","productsViewCachedId","completeWheels","dispatch","query","q","withHtmlResult","allFilters","submitSearchFacet","toggleVisibleDropdownMenu","group","searchFacetChange","item","vehicleVariantId","showNotification","nodeIdToShowNotification","notificationMessage"],"mappings":"29CAIA,IAAMA,GAAeC,E,SAAAA,IAAOC,KAAPD,EAAe,gBAAGE,EAAH,EAAGA,MAAH,MAAgB,CAChDC,MAAO,UACPC,OAAQ,EACRC,QAAS,SACT,qBAAsB,CACpBD,OAAQ,GACRE,MAAO,GACPC,gBAAiB,OACjBC,OAAQ,yBACR,UAAW,CACTC,UAAW,sCAEb,gBAAiB,CACfL,OAAQ,EACRE,MAAO,EACPC,gBAAiB,eACjBG,WAAY,EACZC,YAAa,IAGjB,qBAAsB,CACpBP,OAAQ,GAEV,oBAAqB,CACnBD,MAA8B,SAAvBD,EAAMU,QAAQC,KAAkB,UAAY,UACnDC,QAAgC,SAAvBZ,EAAMU,QAAQC,UAAkBE,EAAY,EACrDX,OAAQ,OAId,SAASY,EAAqBC,GAAO,IACzBC,EAAuBD,EAAvBC,SAAaC,EADY,EACFF,EADE,cAEjC,OACE,gBAAChB,EAAA,GAAgBkB,EACdD,EACD,wBAAME,UAAU,eAChB,wBAAMA,UAAU,eAChB,wBAAMA,UAAU,gBAKxB,IAAMC,EAAgB,SAACC,GAAD,OAAiBA,aAAjB,EAAiBA,EAAaC,MAAM,KAAKC,KAAI,SAAAC,GAAC,OAAIC,SAASD,OAElE,SAASE,EAAT,GAA8C,QAAxBC,EAAwB,EAAxBA,OAAQC,EAAgB,EAAhBA,cACzC,IAAID,EACF,OAAO,iCAETA,EAAOE,QAAUF,EAAOE,QAAQF,QAAO,SAAAG,GAAM,MAAoB,OAAhBA,EAAO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7B,cAAe4F,KAAK5F,cACpB8B,WAAY8D,KAAKtB,MAAMC,iBACvByF,UAAWpE,KAAKoE,UAChBjI,wBAAyB6D,KAAK7D,wBAC9BC,UAAW4D,KAAKxG,MAAM4C,UACtBC,YAAaA,S,oFAnWGgI,aA8Z5C,SAAeC,SAlDS,SAAC,GAgBnB,QAfFC,cACIlB,EAcF,EAdEA,cACAC,EAaF,EAbEA,aACA9E,EAYF,EAZEA,aACAgG,EAWF,EAXEA,oBACAC,EAUF,EAVEA,gBACAC,EASF,EATEA,qBACA3F,EAQF,EAREA,QACAH,EAOF,EAPEA,WACAxC,EAMF,EANEA,UAGA8F,EAGF,EAJFyC,eACIzC,SAIJ,MAAO,CACHmB,gBACAC,eACA9E,eACAgG,sBACAC,kBACAC,uBACAtB,cARF,EADFA,cAUIlB,WACAnD,UACAH,aACAxC,gBAImB,SAACwI,GACxB,MAAO,CACHC,MAAO,SAACC,EAAGC,GAAJ,OAAuBH,GAASC,QAAMC,EAAGC,KAChD1E,SAAU,SAAC2E,GAAD,OAAgBJ,GAASK,OAAkBD,KACrDE,0BAA2B,SAACC,GAAD,OACvBP,GAASM,QAA0BC,KACvCC,kBAAmB,SAACD,EAAOE,GAAR,OACfT,GAASQ,QAAkBD,EAAOE,KACtCrG,cAAe,kBAAM4F,GAAS5F,YAC9BE,sBAAuB,SAACL,EAAOgB,GAAR,OACnB+E,GAAS1F,QAAsBL,EAAOgB,KAC1C+C,0BAA2B,SAAC0C,EAAkBzF,GAAnB,OACvB+E,GAAShC,QAA0B0C,EAAkBzF,KACzDgD,WAAY,kBAAM+B,GAAS/B,YAC3B0C,iBAAkB,SAACC,EAA0BC,GAA3B,OAAmDb,GAASW,QAAiBC,EAA0BC,QAIjI,CAGElH","file":"302.14f6cb897f07fd79fd10.js","sourcesContent":["import React, {useState, useEffect} from 'react'\r\nimport Slider, { SliderThumb } from '@mui/material/Slider';\r\nimport { styled } from '@mui/material/styles';\r\n\r\nconst AirbnbSlider = styled(Slider)(({ theme }) => ({\r\n color: '#2FB9A7',\r\n height: 3,\r\n padding: '13px 0',\r\n '& .MuiSlider-thumb': {\r\n height: 27,\r\n width: 27,\r\n backgroundColor: '#fff',\r\n border: '1px solid currentColor',\r\n '&:hover': {\r\n boxShadow: '0 0 0 8px rgba(58, 133, 137, 0.16)',\r\n },\r\n '& .airbnb-bar': {\r\n height: 9,\r\n width: 1,\r\n backgroundColor: 'currentColor',\r\n marginLeft: 1,\r\n marginRight: 1,\r\n },\r\n },\r\n '& .MuiSlider-track': {\r\n height: 3,\r\n },\r\n '& .MuiSlider-rail': {\r\n color: theme.palette.mode === 'dark' ? '#bfbfbf' : '#2FB9A7',\r\n opacity: theme.palette.mode === 'dark' ? undefined : 1,\r\n height: 3,\r\n },\r\n}));\r\n\r\nfunction AirbnbThumbComponent(props) {\r\n const { children, ...other } = props;\r\n return (\r\n \r\n {children}\r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nconst getIntsString = (rangeString) => rangeString?.split(\"-\").map(n => parseInt(n))\r\n\r\nexport default function RangeSlider({filter, onFacetChange}) {\r\n if(!filter)\r\n return <>\r\n\r\n filter.options = filter.options.filter(option => option.label != \"0-0\")\r\n\r\n const rangeString = filter?.options?.length > 1 ? \r\n filter?.options.find(x => !filter.selectedOptions?.includes(x.id)).id :\r\n filter?.options[0]?.id\r\n\r\n const currentValue = filter?.selectedOptions[0]\r\n const range = getIntsString(rangeString)\r\n const [value, setValue] = useState(\r\n currentValue == null ? getIntsString(rangeString) : getIntsString(currentValue)\r\n )\r\n\r\n useEffect(() => {\r\n if(range == null || value == null)\r\n return\r\n\r\n // Automatically reset price filter if no hits\r\n if(range[0] == 0 && range[1] == 0 && currentValue) {\r\n onFacetChange(filter, \"0-0\", true, null, true)\r\n return\r\n }\r\n\r\n if((range[1] < value[1] || range[0] > value[1]) && currentValue) {\r\n setValue(range)\r\n onFacetChange(filter, \"0-0\", true, null, true)\r\n return\r\n }\r\n\r\n if(!currentValue) {\r\n setValue(range)\r\n }\r\n }, [filter])\r\n\r\n const handleChange = (event, newValue) => {\r\n setValue(newValue);\r\n };\r\n\r\n const handleChangeCommited = () => {\r\n const rangeAsString = `${value[0]}-${value[1]}`\r\n if(!filter.options.find(x => x.id == rangeAsString)) {\r\n filter.options.push({\r\n label: rangeAsString,\r\n id: rangeAsString\r\n })\r\n }\r\n\r\n onFacetChange(filter, rangeAsString, true, null, true)\r\n }\r\n\r\n if(range == null)\r\n return <>\r\n\r\n return (\r\n
\r\n \r\n
\r\n )\r\n}\r\n\r\n","import React from 'react'\r\nimport RangeSlider from './RangeSlider'\r\nimport { translate } from '../Services/translation'\r\nimport constants from '../constants'\r\n\r\nexport default function TireSerachDrawer({filters, onFacetChange, showDrawer, handleCloseSearchDrawer, totalHits, vehicleData}) {\r\n const handleChangeTyreType = (event, tyreTypeFilter, winterFilter) => {\r\n let selectedOption = event.target.selectedOptions[0]\r\n let type = selectedOption.dataset.type\r\n\r\n if(type === constants.filterTags.tireType) {\r\n let callback = () => onFacetChange(winterFilter, null, true, null, true)\r\n onFacetChange(tyreTypeFilter, selectedOption.value, false, callback, true)\r\n return\r\n }\r\n\r\n let callback = () => {\r\n onFacetChange(tyreTypeFilter, filters[constants.filterTags.tireType].options.find(option => option.cssValue == \"wintertire\").id, true, null, true)\r\n }\r\n onFacetChange(winterFilter, selectedOption.value, false, callback, true)\r\n }\r\n\r\n const handleChangeVehicleSize = (index) => {\r\n const selectedSize = vehicleData.tires[index]\r\n if(selectedSize == null) return\r\n\r\n const width = selectedSize.width\r\n const diameter = selectedSize.diameter\r\n const profile = selectedSize.profile\r\n\r\n onFacetChange(filters[constants.filterTags.widthInMm], width, false, () => {\r\n onFacetChange(filters[constants.filterTags.diameter], diameter, false, () => {\r\n onFacetChange(filters[constants.filterTags.height], profile, true, null, true)\r\n }, true)\r\n }, true)\r\n\r\n }\r\n\r\n const getSelectedSizeIndex = () => {\r\n const width = filters[constants.filterTags.widthInMm]?.selectedOptions[0]\r\n const diameter = filters[constants.filterTags.diameter]?.selectedOptions[0]\r\n const height = filters[constants.filterTags.height]?.selectedOptions[0]\r\n const index = vehicleData.tires.findIndex(tire => \r\n tire.width == width && tire.diameter == diameter && tire.profile == height\r\n )\r\n\r\n return index\r\n }\r\n\r\n const getTireSizeString = (tire) => `${tire?.width}/${tire?.profile}R${tire?.diameter} ${!tire.isFront ? translate(\"facet.onlyrear\") : \"\"}`\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n

{translate(\"facet.header.changesearch\")}

\r\n {!!vehicleData ? \r\n (\r\n
\r\n {translate(\"facet.header.size\")}\r\n \r\n
\r\n ) :\r\n (\r\n
\r\n {[filters[constants.filterTags.widthInMm], filters[constants.filterTags.height], filters[constants.filterTags.diameter]].filter(filter => filter != null).map(filter => \r\n (\r\n
\r\n {filter.label}\r\n \r\n
\r\n )\r\n )}\r\n
\r\n )\r\n }\r\n
\r\n {translate(\"facet.header.tiretype\")}\r\n \r\n
\r\n {[filters[constants.filterTags.brand], filters[constants.filterTags.speedRating], filters[constants.filterTags.loadIndex]].filter(x => x != null).map(filter => (\r\n
\r\n {filter.label}\r\n
\r\n {filter.options.filter(option => option.quantity > 0).map(option => (\r\n \r\n ))}\r\n
\r\n
\r\n ))}\r\n
\r\n {translate(\"facet.header.price\")}\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n )\r\n}","import React, {useState} from 'react'\r\nimport RangeSlider from './RangeSlider'\r\nimport { translate } from '../Services/translation'\r\nimport constants from '../constants'\r\n\r\nexport default function RimSerachDrawer({filters, onFacetChange, showDrawer, handleCloseSearchDrawer, totalHits, vehicleData}) {\r\n const [isAllSeasonActive, setIsAllSeasonActive] = useState(filters.allseason?.selectedOptions?.includes(\"true\"))\r\n const handleSetAllseason = () => {\r\n setIsAllSeasonActive(!isAllSeasonActive)\r\n onFacetChange(filters.AllSeason, \"true\", true, null, false)\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n

{translate(\"facet.header.changesearch\")}

\r\n
\r\n {translate(\"facet.header.size\")}\r\n \r\n
\r\n {filters.Brand && [filters.Brand].map(filter => (\r\n
\r\n {filter.label}\r\n
\r\n {filter.options.filter(option => option.quantity > 0).map(option => (\r\n \r\n ))}\r\n
\r\n
\r\n ))}\r\n
\r\n {translate(\"facet.header.allseason\")}\r\n \r\n
\r\n
\r\n {translate(\"facet.header.price\")}\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n )\r\n}","import React, { Component, Fragment } from 'react'\r\nimport { connect } from 'react-redux'\r\nimport TireSerachDrawer from '../Components/TireSearchDrawer'\r\nimport RimSerachDrawer from '../Components/RimSearchDrawer'\r\nimport VehicleData from '../Components/VehicleData'\r\nimport * as debounce from 'lodash.debounce'\r\nimport {\r\n query,\r\n submitSearchFacet,\r\n toggleVisibleDropdownMenu,\r\n searchFacetChange,\r\n} from '../Actions/FacetedSearch.action'\r\nimport { translate } from '../Services/translation'\r\nimport {\r\n PRODUCT_VIEW_CACHED,\r\n updateFilterOption,\r\n} from '../Actions/FacetedSearch.action'\r\nimport {\r\n getVehicleDataByRegNo,\r\n getVehicleDataByVariantId,\r\n removeVehicle,\r\n clearState,\r\n} from '../Actions/VehicleFinder.action'\r\nimport { show as showNotification } from '../Actions/Notification.action'\r\nimport VehicleFinder from '../Components/VehicleFinder'\r\nimport { isNullOrWhiteSpace } from '../Services/strings'\r\nimport LoadingOverlay from '../Components/LoadingOverlay'\r\nimport constants from \"../constants\"\r\n\r\nclass FacetedSearchCompactContainer extends Component {\r\n constructor(props) {\r\n super(props)\r\n const { facetFilters } = props\r\n\r\n let categoryTemplateId = props.categoryTemplateId\r\n\r\n if(!categoryTemplateId)\r\n categoryTemplateId = facetFilters.some(x => x.id === constants.filterTags.tireType) ?\r\n \"TireCategory\" : \"RimCategory\"\r\n\r\n this.state = {\r\n showSearchDrawer: props.drawerOpen,\r\n regNo: '',\r\n facetFilters,\r\n openedFilter: '',\r\n loading: false,\r\n categoryTemplateId: categoryTemplateId,\r\n }\r\n this.removeVehicle = this.removeVehicle.bind(this)\r\n this.getVehicleDataByRegNo = this.getVehicleDataByRegNo.bind(this)\r\n this.handleRegNoInputChange = this.handleRegNoInputChange.bind(this)\r\n this.handleRegNoInputClick = this.handleRegNoInputClick.bind(this)\r\n this.getVehicleDataByVehicleSelector = this.getVehicleDataByVehicleSelector.bind(\r\n this\r\n )\r\n this.handleShowSearchDrawer = this.handleShowSearchDrawer.bind(this)\r\n this.handleCloseSearchDrawer = this.handleCloseSearchDrawer.bind(this)\r\n this.onFacetChange = this.onFacetChange.bind(this)\r\n this.getFiltersObject = this.getFiltersObject.bind(this)\r\n this.getCurrentSearchString = this.getCurrentSearchString.bind(this)\r\n this.displaySearchBar = this.displaySearchBar.bind(this)\r\n this.debouncedFacetSubmit = debounce((submit, filters) => submit(filters), 1000)\r\n }\r\n\r\n onFacetChange(filter, value, submit, callback, isSingleSelect = false) {\r\n let option = filter.options.find(option => option.id === value)\r\n if(!filter.singleSelect)\r\n filter.singleSelect = isSingleSelect\r\n \r\n this.setState(\r\n (prevState, props) => {\r\n const { facetFilters } = this.state\r\n const newFilters = updateFilterOption(\r\n facetFilters,\r\n filter,\r\n option\r\n )\r\n return {\r\n ...prevState,\r\n facetFilters: newFilters,\r\n }\r\n },\r\n () => {\r\n if (submit) {\r\n this.debouncedFacetSubmit(this.props.onSubmit, this.state.facetFilters)\r\n }\r\n if (callback) {\r\n callback()\r\n }\r\n }\r\n )\r\n }\r\n\r\n onSearchResultDataChange(dom) {\r\n if ([null, undefined].includes(dom)) {\r\n return\r\n }\r\n const container = document.createElement('div')\r\n container.innerHTML = dom\r\n\r\n const existingResult = document.querySelector('#search-result')\r\n const tempResult = container.querySelector('#search-result')\r\n\r\n const existingFilter = existingResult.querySelector('#facetedSearchCompact')\r\n const tempFilter = tempResult.querySelector('#facetedSearchCompact')\r\n\r\n const existingCompleteWheels = existingResult.querySelector('#completeWheels')\r\n const tempCompleteWheels = tempResult.querySelector('#completeWheels')\r\n\r\n const replace = (node, newNode) => node.parentNode.replaceChild(newNode, node)\r\n\r\n // move existingFilter from existingResult to tempResult\r\n replace(tempFilter, existingFilter)\r\n\r\n // replace existingResult with tempResult ( newResult )\r\n replace(existingResult, tempResult)\r\n\r\n // replace complete wheels to avoid re-mounting of container\r\n if(existingCompleteWheels && tempCompleteWheels)\r\n replace(tempCompleteWheels, existingCompleteWheels)\r\n\r\n // bootstrap react components if any exists in the search result\r\n window.__litium.bootstrapComponents(['facetedSearchCompact', 'completeWheels'])\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n if(prevProps == this.props)\r\n return\r\n const productViewCached = window.__litium.cache\r\n ? window.__litium.cache[PRODUCT_VIEW_CACHED] || {}\r\n : {}\r\n if (!productViewCached.used) {\r\n productViewCached.used = true\r\n const dom = productViewCached.productsView\r\n dom && this.onSearchResultDataChange(dom)\r\n }\r\n\r\n this.setState((previousState) => ({\r\n ...previousState,\r\n facetFilters: this.props.facetFilters\r\n }))\r\n\r\n if(this.props.category) {\r\n this.setState((previousState) => ({\r\n ...previousState,\r\n categoryTemplateId: this.props.category,\r\n }))\r\n }\r\n }\r\n\r\n removeVehicle() {\r\n this.props.removeVehicle()\r\n this.setState((previousState) => ({\r\n ...previousState,\r\n regNo: '',\r\n }))\r\n }\r\n\r\n getVehicleDataByRegNo() {\r\n if (\r\n !isNullOrWhiteSpace(this.state.regNo) &&\r\n this.state.regNo.length === 6\r\n ) {\r\n this.setState((previousState) => ({\r\n ...previousState,\r\n loading: true,\r\n }))\r\n this.props.getVehicleDataByRegNo(\r\n this.state.regNo,\r\n (vehicleData) => {\r\n this.setState((previousState) => ({\r\n ...previousState,\r\n loading: false,\r\n }))\r\n if (vehicleData) {\r\n if (this.state.categoryTemplateId === 'TireCategory') {\r\n\r\n if(this.props.tireCategoryLink) {\r\n window.location.href = this.props.tireCategoryLink + vehicleData.tireQueryFilters\r\n } else {\r\n window.location.href = window.location.pathname\r\n }\r\n\r\n } else if (\r\n this.state.categoryTemplateId === 'RimCategory'\r\n ) {\r\n if(this.props.rimCategoryLink) {\r\n window.location.href =\r\n this.props.rimCategoryLink +\r\n vehicleData.rimQueryFilters\r\n } else {\r\n window.location.href = window.location.pathname\r\n\r\n }\r\n }\r\n }\r\n }\r\n )\r\n }\r\n }\r\n\r\n getVehicleDataByVehicleSelector(selectedVariant) {\r\n this.setState((previousState) => ({\r\n ...previousState,\r\n loading: true,\r\n }))\r\n\r\n this.props.getVehicleDataByVariantId(selectedVariant, (vehicleData) => {\r\n this.setState((previousState) => ({\r\n ...previousState,\r\n loading: false,\r\n }))\r\n if (vehicleData) {\r\n if (this.state.categoryTemplateId === 'TireCategory') {\r\n\r\n if(this.props.tireCategoryLink) {\r\n window.location.href = this.props.tireCategoryLink + vehicleData.tireQueryFilters\r\n } else {\r\n window.location.href = window.location.pathname\r\n }\r\n\r\n } else if (\r\n this.state.categoryTemplateId === 'RimCategory'\r\n ) {\r\n if(this.props.rimCategoryLink) {\r\n window.location.href =\r\n this.props.rimCategoryLink +\r\n vehicleData.rimQueryFilters\r\n } else {\r\n window.location.href = window.location.pathname\r\n }\r\n }\r\n }\r\n })\r\n }\r\n\r\n handleRegNoInputChange(regNo) {\r\n this.setState((previousState) => ({\r\n ...previousState,\r\n regNo: regNo,\r\n }))\r\n }\r\n\r\n handleRegNoInputClick() {\r\n this.props.clearState()\r\n }\r\n\r\n handleShowSearchDrawer() {\r\n this.setState({showSearchDrawer: true})\r\n }\r\n\r\n handleCloseSearchDrawer() {\r\n this.setState({showSearchDrawer: false})\r\n }\r\n\r\n getCurrentSearchString() {\r\n const filters = this.getFiltersObject()\r\n if(this.state.categoryTemplateId === \"TireCategory\") {\r\n const selectedWidth = filters[constants.filterTags.widthInMm]?.selectedOptions[0]\r\n const selectedHeight = filters[constants.filterTags.height]?.selectedOptions[0]\r\n const selectedDiameter = filters[constants.filterTags.diameter]?.selectedOptions[0]\r\n const selectedTyreType = filters[constants.filterTags.winterTireType]?.selectedOptions[0] ?? filters[[constants.filterTags.tireType]]?.selectedOptions[0]\r\n if(!selectedWidth || !selectedHeight || !selectedDiameter)\r\n return \"Ingen storlek vald\"\r\n\r\n return `${selectedWidth}/${selectedHeight}R${selectedDiameter} ${selectedTyreType?.toUpperCase() ?? \"\"}`\r\n }\r\n\r\n if(this.state.categoryTemplateId === \"RimCategory\") {\r\n return `${filters[constants.filterTags.diameter]?.selectedOptions[0]}\"`\r\n }\r\n }\r\n\r\n getFiltersObject() {\r\n var filters = {}\r\n this.state.facetFilters?.forEach(filter => {\r\n filters[filter.id] = filter\r\n })\r\n\r\n return filters;\r\n }\r\n\r\n displaySearchBar() {\r\n if(!this.state.facetFilters)\r\n return false\r\n\r\n if(this.state.categoryTemplateId === 'TireCategory')\r\n return true\r\n \r\n return !!this.props?.vehicleFinder?.vehicleData\r\n }\r\n\r\n render() {\r\n const { facetFilters } = this.state\r\n const {\r\n subNavigation = [],\r\n sortCriteria = [],\r\n } = this.props\r\n const filters = this.getFiltersObject()\r\n\r\n const { vehicleFinder } = this.props\r\n var { vehicleData } = vehicleFinder\r\n\r\n const hidden = [subNavigation, facetFilters, sortCriteria].every(\r\n (ele) => !ele || ele.length === 0\r\n )\r\n\r\n // Filter out tire sizes that don't match the selected rim\r\n // Used for complete wheels\r\n if(this.props.category && vehicleData?.selectedProducts?.rimCategory) {\r\n const selectedRimSize = vehicleData.selectedProducts.rimCategory.diameter\r\n vehicleData.tires = vehicleData?.tires.filter(x => x.diameter == selectedRimSize && x.isFront)\r\n }\r\n\r\n return (\r\n \r\n \r\n\r\n
\r\n
\r\n {!vehicleData ? (\r\n
\r\n \r\n
\r\n ) : (\r\n \r\n )}\r\n
\r\n {this.displaySearchBar() && !hidden && \r\n
\r\n

{translate(\"facet.header.search\")}
\r\n {this.getCurrentSearchString()}

\r\n \r\n
\r\n }\r\n
\r\n {this.displaySearchBar() && !hidden && <>\r\n {this.state.categoryTemplateId === 'TireCategory' && (\r\n \r\n )}\r\n {this.state.categoryTemplateId === 'RimCategory' && (\r\n \r\n )}\r\n }\r\n
\r\n )\r\n }\r\n}\r\n\r\nconst mapStateToProps = ({\r\n facetedSearch: {\r\n subNavigation,\r\n sortCriteria,\r\n facetFilters,\r\n visibleDropdownMenu,\r\n navigationTheme,\r\n productsViewCachedId,\r\n loading,\r\n drawerOpen,\r\n totalHits\r\n },\r\n completeWheels: {\r\n category\r\n },\r\n vehicleFinder,\r\n}) => {\r\n return {\r\n subNavigation,\r\n sortCriteria,\r\n facetFilters,\r\n visibleDropdownMenu,\r\n navigationTheme,\r\n productsViewCachedId,\r\n vehicleFinder,\r\n category,\r\n loading,\r\n drawerOpen,\r\n totalHits\r\n }\r\n}\r\n\r\nconst mapDispatchToProps = (dispatch) => {\r\n return {\r\n query: (q, withHtmlResult) => dispatch(query(q, withHtmlResult)),\r\n onSubmit: (allFilters) => dispatch(submitSearchFacet(allFilters)),\r\n toggleVisibleDropdownMenu: (group) =>\r\n dispatch(toggleVisibleDropdownMenu(group)),\r\n searchFacetChange: (group, item) =>\r\n dispatch(searchFacetChange(group, item)),\r\n removeVehicle: () => dispatch(removeVehicle()),\r\n getVehicleDataByRegNo: (regNo, callback) =>\r\n dispatch(getVehicleDataByRegNo(regNo, callback)),\r\n getVehicleDataByVariantId: (vehicleVariantId, callback) =>\r\n dispatch(getVehicleDataByVariantId(vehicleVariantId, callback)),\r\n clearState: () => dispatch(clearState()),\r\n showNotification: (nodeIdToShowNotification, notificationMessage) => dispatch(showNotification(nodeIdToShowNotification, notificationMessage))\r\n }\r\n}\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps\r\n)(FacetedSearchCompactContainer)\r\n"],"sourceRoot":""}