{ "version": 3, "sources": ["../javascripts/styled-components/structures/MainSearch/index.tsx", "../javascripts/styled-components/components/RichSearch/index.tsx", "../javascripts/styled-components/structures/MainSearch/useHistory.ts", "../javascripts/styled-components/structures/MainSearch/usePrettyHistory.ts"], "sourcesContent": ["import React, { useEffect, useRef, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { useSelector } from 'react-redux';\nimport { useNavigate } from 'react-router-dom';\n\nimport type { CombinedQuerySuggestion } from '../../../@types/QuerySuggestion';\nimport QueryFilter from '../../../helpers/query-filter';\nimport { useCombinedSuggestion } from '../../../hooks/useSuggestion';\nimport type { RootState } from '../../../reducers';\nimport { requestStatus } from '../../../shared/statuses';\nimport Loader from '../../components/Loader';\nimport RichSearch from '../../components/RichSearch';\nimport usePrettyHistory from './usePrettyHistory';\n\ninterface MainSearchProps {\n queryFilter?: QueryFilter; //Apply query to already existing QueryFilter\n}\n\nconst MainSearch = ({ queryFilter }: MainSearchProps) => {\n const { t } = useTranslation('common');\n const timeout = useRef(undefined);\n const navigate = useNavigate();\n const [querySuggestionQuery, setQuerySuggestionQuery] = useState('');\n const [focusedIndex, setFocusedIndex] = useState(null);\n const [suggestionList, setSuggestionList] = useState();\n const hitCount = useSelector((s) => s.search.hitCount);\n const loadingFacets = useSelector(\n (s) => s.search.requestStatus === requestStatus.FETCHING_LIST,\n );\n const [query, setQuery] = useState('');\n const [suggestions, request] = useCombinedSuggestion(querySuggestionQuery);\n const history = usePrettyHistory();\n\n const onChange = (e: React.ChangeEvent) => setQuery(e.currentTarget.value);\n\n const onClick = () => {\n const qf = queryFilter\n ? new QueryFilter(queryFilter.toString()).setQuery(query).toQueryString()\n : QueryFilter.byQuery(query).toQueryString();\n\n setQuery('');\n setQuerySuggestionQuery('');\n navigate(`/sok${qf}`);\n };\n\n const onKeyDown = (e: React.KeyboardEvent) => {\n if (e.key === 'Enter' && focusedIndex === null) {\n setQuery('');\n setQuerySuggestionQuery('');\n onClick();\n }\n };\n\n const onSuggestionClick = () => {\n setQuery('');\n setQuerySuggestionQuery('');\n };\n\n const onClear = () => {\n setQuery('');\n setQuerySuggestionQuery('');\n };\n\n useEffect(() => {\n clearTimeout(timeout.current);\n timeout.current = setTimeout(() => {\n setQuerySuggestionQuery(query);\n }, 200);\n }, [query]);\n\n useEffect(() => {\n if (!request.isLoading) {\n setSuggestionList(suggestions);\n }\n }, [suggestions, request.isLoading]);\n\n return (\n \n )\n }\n history={history}\n suggestions={suggestionList}\n queryFilter={queryFilter}\n focusedIndex={focusedIndex}\n inputTestId=\"vehicle-search-input\"\n buttonTestId=\"vehicle-search-button\"\n metaTestId=\"vehicle-search-counter\"\n onChange={onChange}\n onKeyDown={onKeyDown}\n onClick={onClick}\n onClear={onClear}\n onSuggestionClick={onSuggestionClick}\n onSetFocusedIndex={setFocusedIndex}\n />\n );\n};\n\nexport default MainSearch;\n", "import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { CombinedQuerySuggestion } from '../../../@types/QuerySuggestion';\nimport QueryFilter from '../../../helpers/query-filter';\nimport type { PrettyHistory } from '../../structures/MainSearch/usePrettyHistory';\n\nimport { resolveArticlesRoute } from '../../../routes/utils';\nimport { Button } from '../Button';\nimport { IconClose } from '../Icon';\nimport { SrOnly } from '../SrOnly';\nimport SuggestionsList from '../SuggestionList';\nimport { ClearButton, Inner, Input, InputWrapper, Meta, Wrapper } from './wrapper';\n\ninterface RichSearchProps {\n placeholder?: string;\n value: string;\n meta?: React.ReactNode | string;\n suggestions?: CombinedQuerySuggestion;\n history?: PrettyHistory[];\n queryFilter?: QueryFilter;\n focusedIndex: number | null;\n inputTestId?: string;\n buttonTestId?: string;\n metaTestId?: string;\n onChange: (e: React.ChangeEvent) => void;\n onKeyDown: (e: React.KeyboardEvent) => void;\n onClick: (e: React.MouseEvent) => void;\n onClear: (e: React.MouseEvent) => void;\n onSuggestionClick?: () => void;\n onSetFocusedIndex: (index: number | null) => void;\n}\n\nconst RichSearch = ({\n placeholder,\n value,\n meta,\n suggestions,\n history,\n queryFilter,\n focusedIndex,\n inputTestId,\n buttonTestId,\n metaTestId,\n onChange: _onChange,\n onKeyDown: _onKeyDown,\n onClick: _onClick,\n onClear: _onClear,\n onSuggestionClick: _onSuggestionClick,\n onSetFocusedIndex,\n}: RichSearchProps) => {\n const { t } = useTranslation(['common']);\n const ref = useRef(null);\n const inputRef = useRef(null);\n const [focus, setFocus] = useState(false);\n\n const onFocus = () => setFocus(true);\n\n useEffect(() => {\n if (focusedIndex) {\n onSetFocusedIndex(focusedIndex);\n }\n }, [focusedIndex]);\n\n useEffect(() => {\n const onDocumentClick = (e: Event) => {\n if (!ref.current?.contains(e.target as unknown as HTMLElement)) {\n setFocus(false);\n }\n };\n\n document.addEventListener('click', onDocumentClick);\n return () => document.removeEventListener('click', onDocumentClick);\n }, []);\n\n const onChange = useCallback(\n (e: React.ChangeEvent) => {\n setFocus(true);\n _onChange?.(e);\n },\n [setFocus, _onChange],\n );\n\n const onClick = useCallback(\n (e: React.MouseEvent) => {\n setFocus(false);\n _onClick(e);\n },\n [setFocus, _onClick],\n );\n\n const onKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === 'Enter' && focusedIndex === null) {\n setFocus(false);\n }\n _onKeyDown(e);\n },\n [focusedIndex, setFocus, _onKeyDown],\n );\n\n const onClear = useCallback(\n (e: React.MouseEvent) => {\n inputRef.current?.focus();\n _onClear(e);\n },\n [setFocus, _onClear],\n );\n\n const onSuggestionClick = useCallback(() => {\n setFocus(false);\n _onSuggestionClick?.();\n }, [setFocus, _onSuggestionClick]);\n\n const slicedHistory = useMemo(() => history?.slice(0, 3), [history]);\n const groups = useMemo(() => {\n const _groups = [];\n\n if (suggestions?.vehicleSuggestions?.length) {\n _groups.push({\n label: t('Search hits', { ns: 'common' }),\n suggestions: suggestions?.vehicleSuggestions.map((item) => ({\n label: item.label,\n hitCount: item.hitCount,\n path: `/sok${(\n queryFilter\n ? QueryFilter.merge(new QueryFilter(item.queryFilter), queryFilter)\n : new QueryFilter(item.queryFilter)\n ).toQueryURL()}`,\n })),\n });\n }\n\n if (suggestions?.contentSuggestions?.length) {\n _groups.push({\n label: t('articles', { ns: 'article' }),\n suggestions: [\n ...suggestions.contentSuggestions.map((s) => ({\n label: s.label,\n path: s.path,\n })),\n {\n label: t('showAllArticlesFor', { ns: 'article', phrase: value }),\n path: `/${resolveArticlesRoute()}/sok?q=${value}`,\n },\n ],\n });\n }\n\n if (slicedHistory?.length) {\n _groups.push({\n label: t('Your recent searches', { ns: 'common' }),\n linkPath: '/sok/historik',\n linkLabel: t('Show all', { ns: 'common' }),\n suggestions: slicedHistory.map((item) => ({\n label: item.displayName.join(', '),\n path: `/sok${item.queryFilter.toQueryURL()}`,\n })),\n });\n }\n return _groups;\n }, [suggestions, slicedHistory, value, t]);\n\n return (\n \n \n \n \n {value && (\n \n \n {t('clearSearchField', { ns: 'common' })}\n \n )}\n {meta && {meta}}\n \n {t('search', { ns: 'common' })}\n \n \n {focus && groups.length > 0 && (\n \n )}\n \n \n );\n};\n\nexport default RichSearch;\n", "import { useSelector } from 'react-redux';\n\nimport type { DocumentList } from '../../../@types/ElasticSearchResponse';\nimport type { ElasticVehicle } from '../../../@types/ElasticVehicle';\nimport type { FilterHistory } from '../../../@types/FilterHistory';\nimport type { SearchHistory } from '../../../@types/SearchHistory';\nimport QueryFilter from '../../../helpers/query-filter';\nimport type { RootState } from '../../../reducers';\n\nconst merge = (list: FilterHistory[]): SearchHistory[] => {\n const cache: { [key: string]: boolean } = {};\n\n return list\n .map((hit) => ({\n query: QueryFilter.create(hit.query)\n .removeAll(['page', 'offset', 'size', 'hits', 'sort'])\n .toString(),\n count: hit.count,\n createdAt: hit.createdAt,\n }))\n .filter((hit) => {\n if (cache[hit.query]) {\n return false;\n }\n\n cache[hit.query] = true;\n return true;\n });\n};\n\nconst localStorageKey = 'wayke-filter-history';\nconst useHistory = (queryFilter?: QueryFilter) => {\n if (process.env.SSR) return [];\n const documentList = useSelector | null>(\n (s) => s.search.documentList,\n );\n const cleanQueryFilter =\n queryFilter && queryFilter.removeAll(['page', 'offset', 'size', 'hits', 'sort']);\n\n const query =\n cleanQueryFilter && !cleanQueryFilter.isEmpty() ? cleanQueryFilter.toString() : false;\n const persistance = merge(\n JSON.parse(localStorage.getItem(localStorageKey) || '[]') as FilterHistory[],\n );\n const index = persistance.findIndex((hit) => hit.query === query);\n\n if (documentList) {\n if (query && index < 0) {\n persistance.unshift({\n query,\n count: documentList.numberOfHits,\n createdAt: new Date().getTime(),\n });\n\n localStorage.setItem(localStorageKey, JSON.stringify(persistance.slice(0, 50)));\n } else if (query && index >= 0 && persistance[index].count !== documentList.numberOfHits) {\n persistance[index] = {\n query,\n count: documentList.numberOfHits,\n createdAt: new Date().getTime(),\n };\n\n localStorage.setItem(localStorageKey, JSON.stringify(persistance.slice(0, 50)));\n }\n }\n\n return persistance;\n};\n\nexport default useHistory;\n", "import QueryFilter from '../../../helpers/query-filter';\nimport { togglableFilters } from '../../../shared/togglable-filters';\nimport useHistory from './useHistory';\n\nconst Ranges = [\n 'leasingPrice',\n 'businessLeasingPrice',\n 'price',\n 'mileage',\n 'enginePower',\n 'modelYear',\n];\nconst RangesTranslation = {\n leasingPrice: 'Privatleasing',\n businessLeasingPrice: 'F\u00F6retagsleasing',\n price: 'Pris',\n mileage: 'M\u00E4tarst\u00E4llning',\n enginePower: 'H\u00E4stkrafter',\n modelYear: 'Modell\u00E5r',\n};\nconst Toggleable = [\n 'deductibleVat',\n 'mrf',\n 'isAuthorizedResellerForManufacturer',\n 'hasManufacturerPackaging',\n 'hasMedia',\n 'ecom',\n 'leasing',\n 'businessLeasing',\n 'isAuctionItem',\n];\n\nexport interface PrettyHistory {\n queryFilter: QueryFilter;\n displayName: string[];\n}\n\nconst usePrettyHistory = (): PrettyHistory[] => {\n const history = useHistory();\n\n return history.map((historyItem) => {\n const queryFilter = new QueryFilter(historyItem.query);\n const spatial = queryFilter.getSpatial();\n const keys = spatial\n ? queryFilter\n .getKeys()\n .filter((x) => !['lat', 'lon', 'position.location', 'position.name'].includes(x))\n : queryFilter.getKeys();\n\n const result = {\n queryFilter,\n displayName: keys.reduce(\n (prev, key) => {\n if (Ranges.includes(key)) {\n const range = queryFilter.getRange(key);\n const rangeTranslation =\n RangesTranslation?.[key as keyof typeof RangesTranslation] ?? key;\n if (range.min && range.max) {\n prev.push(`${rangeTranslation} ${range.min} - ${range.max}`);\n } else if (range.min) {\n prev.push(`${rangeTranslation} ${range.min}`);\n } else if (range.max) {\n prev.push(`${rangeTranslation} ${range.max}`);\n }\n } else if (Toggleable.includes(key)) {\n if (queryFilter.has(key)) {\n prev.push(togglableFilters().find((x) => x.id === key)?.displayName || key);\n }\n } else {\n prev.push(queryFilter.get(key).join(', '));\n }\n return prev;\n },\n spatial?.name ? [spatial.name] : ([] as string[]),\n ),\n };\n\n if (queryFilter.hasQuery()) {\n result.displayName.push(`\"${queryFilter.getQuery()}\"`);\n }\n return result;\n });\n};\n\nexport default usePrettyHistory;\n"], "mappings": "2pBAAA,IAAAA,EAAmD,SCAnD,IAAAC,EAAyE,SAiCzE,IAAMC,GAAa,CAAC,CAClB,YAAAC,EACA,MAAAC,EACA,KAAAC,EACA,YAAAC,EACA,QAAAC,EACA,YAAAC,EACA,aAAAC,EACA,YAAAC,EACA,aAAAC,EACA,WAAAC,EACA,SAAUC,EACV,UAAWC,EACX,QAASC,EACT,QAASC,EACT,kBAAmBC,EACnB,kBAAAC,CACF,IAAuB,CACrB,GAAM,CAAE,EAAAC,CAAE,EAAIC,EAAe,CAAC,QAAQ,CAAC,EACjCC,KAAM,UAA8B,IAAI,EACxCC,KAAW,UAAgC,IAAI,EAC/C,CAACC,EAAOC,CAAQ,KAAI,YAAS,EAAK,EAElCC,EAAU,IAAMD,EAAS,EAAI,KAEnC,aAAU,IAAM,CACVf,GACFS,EAAkBT,CAAY,CAElC,EAAG,CAACA,CAAY,CAAC,KAEjB,aAAU,IAAM,CACd,IAAMiB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B,EAAE,EAC1BmB,EAAQ,EAEZ,EAEMI,EAAoB,IAAM,CAC9BZ,EAAS,EAAE,EACXX,EAAwB,EAAE,CAC5B,EAEMwB,EAAU,IAAM,CACpBb,EAAS,EAAE,EACXX,EAAwB,EAAE,CAC5B,EAEA,sBAAU,IAAM,CACd,aAAaJ,EAAQ,OAAO,EAC5BA,EAAQ,QAAU,WAAW,IAAM,CACjCI,EAAwBU,CAAK,CAC/B,EAAG,GAAG,CACR,EAAG,CAACA,CAAK,CAAC,KAEV,aAAU,IAAM,CACTG,EAAQ,WACXT,EAAkBQ,CAAW,CAEjC,EAAG,CAACA,EAAaC,EAAQ,SAAS,CAAC,EAGjC,EAAAY,QAAA,cAACC,EAAA,CACC,YAAahC,EAAE,SAAU,CAAE,GAAI,QAAS,CAAC,GAAK,OAC9C,MAAOgB,EACP,KACG,CAACjB,GAAa,SAAS,GAAKY,GAAa,CAACG,EACzCd,EAAE,iBAAkB,CAAE,GAAI,SAAU,MAAOW,GAAY,CAAE,CAAC,EAE1D,EAAAoB,QAAA,cAACE,EAAA,CAAO,OAAM,GAAC,EAGnB,QAASZ,EACT,YAAaZ,EACb,YAAaV,EACb,aAAcQ,EACd,YAAY,uBACZ,aAAa,wBACb,WAAW,yBACX,SAAUgB,EACV,UAAWK,EACX,QAASH,EACT,QAASK,EACT,kBAAmBD,EACnB,kBAAmBrB,EACrB,CAEJ,EAEO0B,GAAQpC", "names": ["import_react", "import_react", "RichSearch", "placeholder", "value", "meta", "suggestions", "history", "queryFilter", "focusedIndex", "inputTestId", "buttonTestId", "metaTestId", "_onChange", "_onKeyDown", "_onClick", "_onClear", "_onSuggestionClick", "onSetFocusedIndex", "t", "useTranslation", "ref", "inputRef", "focus", "setFocus", "onFocus", "onDocumentClick", "e", "onChange", "onClick", "onKeyDown", "onClear", "onSuggestionClick", "slicedHistory", "groups", "_groups", "item", "query_filter_default", "s", "resolveArticlesRoute", "React", "Wrapper", "Inner", "InputWrapper", "Input", "ClearButton", "IconClose", "SrOnly", "Meta", "Button", "SuggestionList_default", "RichSearch_default", "merge", "list", "cache", "hit", "query_filter_default", "localStorageKey", "useHistory", "queryFilter", "documentList", "useSelector", "s", "cleanQueryFilter", "query", "persistance", "index", "useHistory_default", "Ranges", "RangesTranslation", "Toggleable", "usePrettyHistory", "useHistory_default", "historyItem", "queryFilter", "query_filter_default", "spatial", "keys", "x", "result", "prev", "key", "range", "rangeTranslation", "togglableFilters", "usePrettyHistory_default", "MainSearch", "queryFilter", "t", "useTranslation", "timeout", "navigate", "useNavigate", "querySuggestionQuery", "setQuerySuggestionQuery", "focusedIndex", "setFocusedIndex", "suggestionList", "setSuggestionList", "hitCount", "useSelector", "s", "loadingFacets", "requestStatus", "query", "setQuery", "suggestions", "request", "useCombinedSuggestion", "history", "usePrettyHistory_default", "onChange", "e", "onClick", "qf", "query_filter_default", "onKeyDown", "onSuggestionClick", "onClear", "React", "RichSearch_default", "Loader_default", "MainSearch_default"] }