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W,Q","sources":["webpack://lionwheel/./app/javascript/src/react_components/quick_search/helper.js","webpack://lionwheel/./app/javascript/src/react_components/quick_search/TaskRow.jsx","webpack://lionwheel/./app/javascript/src/react_components/quick_search/SearchTabs.jsx","webpack://lionwheel/./app/javascript/src/react_components/quick_search/DropdownContent.jsx","webpack://lionwheel/./app/javascript/src/react_components/quick_search/search_bar/SearchBarDropdown.jsx","webpack://lionwheel/./app/javascript/src/react_components/quick_search/SearchInput.jsx","webpack://lionwheel/./app/javascript/src/react_components/quick_search/search_bar/SearchBarInput.jsx","webpack://lionwheel/./app/javascript/src/react_components/quick_search/search_bar/SearchBar.jsx","webpack://lionwheel/./app/javascript/src/react_components/quick_search/search_btn/SearchBtnInput.jsx","webpack://lionwheel/./app/javascript/src/react_components/quick_search/search_btn/SearchBtnDropdown.jsx","webpack://lionwheel/./app/javascript/src/react_components/quick_search/search_btn/SearchBtn.jsx","webpack://lionwheel/./app/javascript/src/react_components/quick_search/QuickSearch.jsx","webpack://lionwheel/./app/javascript/src/react_components/quick_search/index.jsx"],"sourcesContent":["export const hasResult = (result) => {\n if (result === null) { return }\n return Object.entries(result).filter((i) => i[1].res.length > 0).length > 0\n}\n","import React from 'react';\nimport PropTypes from \"prop-types\";\nimport { i18n } from \"../../helpers/i18n\";\n\nconst TaskRow = ({ task }) => {\n return (\n \n
\n
\n
\n \"\"/\n
\n
\n
\n {task.name}\n {task.address}\n
\n
\n
\n {task.id}\n \n \n \n
\n
{task.pickup_at}
\n
\n {i18n.t(`models.task.status_enum.${task.status}`)}\n
\n
\n
\n \n );\n};\n\nTaskRow.propTypes = {\n task: PropTypes.shape({\n id: PropTypes.number,\n icon: PropTypes.string,\n name: PropTypes.string,\n address: PropTypes.string,\n status: PropTypes.string,\n pickup_at: PropTypes.string\n })\n}\n\nexport default TaskRow;\n","import React, { useEffect } from 'react';\nimport Nav from 'react-bootstrap/Nav';\nimport TaskRow from './TaskRow';\n\nconst SearchTabs = ({ result, setTotalResults }) => {\n const [activeTab, setActiveTab] = React.useState(null);\n const handleNavClick = ((section) => setActiveTab(section));\n\n useEffect(() => {\n const results = Object.entries(result).filter(([_key, val], _index) => val.res.length > 0);\n\n if(results.length > 0) {\n let sum = 0;\n results.map((arr, index) => {\n if(index == 0) { setActiveTab(arr[0]); }\n sum += arr[1].res.length;\n });\n\n setTotalResults(sum);\n }\n }, [result]);\n\n return (\n <>\n \n
\n {Object.entries(result).map(([key, val], index) => (\n val.res.length > 0 && (\n
\n {val.res.map((task, index) => )}\n
\n )\n ))}\n
\n \n );\n};\n\nexport default SearchTabs;\n","import React from 'react';\nimport { i18n } from \"../../helpers/i18n\";\nimport { hasResult } from \"./helper\";\nimport SearchTabs from \"./SearchTabs\";\nimport PropTypes from \"prop-types\";\n\nconst DropdownContent = ({ error, result, totalResults, setTotalResults }) => {\n return (\n <>\n
\n { hasResult(result) && totalResults && ({i18n.t('models.task.quick_search.found_result', { count: totalResults })}) }\n \n { i18n.t('views.search.advanced_search') }\n \n
\n
\n
\n { error && ({i18n.t('models.task.quick_search.connection_error')}) }\n { !error && (\n (result !== null && !hasResult(result)) && (\n
\n
\n
{i18n.t('models.task.quick_search.no_records')}
\n
\n
\n ) || (\n hasResult(result) && (\n
\n
\n \n
\n
\n )\n )\n )\n }\n
\n
\n \n );\n};\n\nDropdownContent.propTypes = {\n error: PropTypes.bool,\n result: PropTypes.object\n}\n\nexport default DropdownContent;\n","import React, { useEffect } from 'react';\nimport PropTypes from \"prop-types\";\nimport { Dropdown } from \"react-bootstrap\";\nimport DropdownContent from \"../DropdownContent\";\n\nconst SearchBarDropdown = ({ result, error, visible, setVisible }) => {\n const [totalResults, setTotalResults] = React.useState(null);\n\n useEffect(() => {\n (result === null) ? setVisible(false) : setVisible(true);\n }, [result])\n\n return (\n \n \n { visible && }\n \n \n )\n};\n\nSearchBarDropdown.propTypes = {\n result: PropTypes.object,\n error: PropTypes.bool,\n visible: PropTypes.bool,\n setVisible: PropTypes.func\n}\n\nexport default SearchBarDropdown;\n","import React, { forwardRef, useEffect } from 'react';\nimport { csrfToken } from \"../../helpers/utils\";\nimport PropTypes from \"prop-types\";\nimport { i18n } from \"../../helpers/i18n\";\nimport { isRTL } from \"../../helpers/locale\";\n\nconst SearchInput = forwardRef(({ setResult, setError, loading, setLoading, onSearchEnd, className, searchValue, setSearchValue }, ref) => {\n\n const [shortcutVisible, setShortcutVisible] = React.useState(true);\n const [styles, setStyles] = React.useState({right: '10px', position: 'absolute', top: '25%'});\n const [shortcutKey, setShortcutKey] = React.useState('CTRL+B');\n\n useEffect(() => {\n const platform = navigator.platform.toLowerCase();\n if (platform.includes('mac')) setShortcutKey('⌘B');\n }, []);\n\n useEffect(() => {\n (searchValue === '' || searchValue === null) ? setShortcutVisible(true) : setShortcutVisible(false);\n\n if (isRTL()) {\n setStyles({left: '10px', position: 'absolute', top: '25%', direction: 'ltr'});\n }\n }, [searchValue]);\n\n useEffect(() => {\n const keyDownHandler = e => {\n if (e.key === 'Escape') {\n e.preventDefault();\n setResult(null);\n setSearchValue('');\n }\n };\n\n document.addEventListener('keydown', keyDownHandler);\n\n return () => {\n document.removeEventListener('keydown', keyDownHandler);\n };\n }, []);\n\n useEffect(() => {\n document.addEventListener('click', documentClickHandler);\n return () => document.removeEventListener('click', documentClickHandler);\n }, [])\n\n const documentClickHandler = e => {\n const target = e.target;\n if (!$(target).parents('.quick-search-dropdown').length && !$(target).hasClass('header-search')) {\n setResult(null);\n setSearchValue('');\n }\n };\n\n const handleSearch = e => {\n if (loading === true) {\n e.preventDefault()\n return\n }\n if (e.key === 'Enter') { search(e.target.value) }\n }\n\n const search = async (value) => {\n setLoading(true)\n const res = await fetch(`/tasks/quick_search?search=${value}`, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-TOKEN': csrfToken()\n }\n })\n\n setLoading(false)\n\n if (res.status === 200) {\n const data = await res.json()\n setResult(data)\n } else {\n setError(true)\n }\n onSearchEnd()\n }\n\n const onInputChange = (e) => { setSearchValue(e.currentTarget.value) }\n\n return (\n <>\n \n { shortcutVisible && {shortcutKey} }\n \n );\n});\n\nSearchInput.propTypes = {\n setResult: PropTypes.func,\n setError: PropTypes.func,\n loading: PropTypes.bool,\n setLoading: PropTypes.func,\n onSearchEnd: PropTypes.func,\n className: PropTypes.string,\n searchValue: PropTypes.string,\n setSearchValue: PropTypes.func\n}\n\nSearchInput.defaultProps = {\n className: '',\n onSearchEnd: () => {}\n}\n\nSearchInput.displayName = 'SearchInput'\n\nexport default SearchInput;\n","import React from 'react';\nimport SearchInput from \"../SearchInput\";\nimport PropTypes from \"prop-types\"\n\nconst SearchBarInput = ({ setResult, setError, setDropdownVisible }) => {\n const [loading, setLoading] = React.useState(false)\n const [searchValue, setSearchValue] = React.useState('')\n\n return (\n
\n { setDropdownVisible(searchValue.length > 0) }}\n />\n\n
\n { loading && (\n
\n )}\n { (!loading && searchValue !== '') && (\n { setSearchValue(''); setResult(null); setDropdownVisible(false); }}>\n )}\n
\n\n
\n );\n};\n\nSearchBarInput.propTypes = {\n setResult: PropTypes.func,\n setError: PropTypes.func,\n setDropdownVisible: PropTypes.func\n}\n\nexport default SearchBarInput;\n","import React from 'react';\nimport SearchBarDropdown from \"./SearchBarDropdown\";\nimport SearchBarInput from \"./SearchBarInput\";\n\nconst SearchBar = () => {\n const [result, setResult] = React.useState(null)\n const [error, setError] = React.useState(false)\n const [dropdownVisible, setDropdownVisible] = React.useState(false)\n\n return (\n <>\n \n \n \n\n );\n};\n\nexport default SearchBar;\n","import React, { useEffect } from 'react';\nimport SearchInput from \"../SearchInput\";\nimport PropTypes from \"prop-types\";\n\nconst SearchBtnInput = ({ setResult, setError, setTotalResults }) => {\n const [loading, setLoading] = React.useState(false)\n const [searchValue, setSearchValue] = React.useState('')\n const input = React.useRef()\n\n useEffect(() => {\n if (input.current) input.current.focus()\n });\n\n return (\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n
\n \n
\n \n { (!loading && searchValue !== '') && (\n { setSearchValue(''); setResult(null); setTotalResults(null); }}>\n )}\n \n
\n
\n );\n};\n\nSearchBtnInput.propTypes = {\n setResult: PropTypes.func,\n setError: PropTypes.func\n}\n\nexport default SearchBtnInput;\n","import React, { forwardRef } from 'react'\nimport DropdownContent from \"../DropdownContent\";\nimport SearchBtnInput from \"./SearchBtnInput\";\n\nconst SearchBtnDropdown = forwardRef(({ children, style, className, 'aria-labelledby': labeledBy }, ref) => {\n const [result, setResult] = React.useState(null)\n const [error, setError] = React.useState(false)\n const [totalResults, setTotalResults] = React.useState(null);\n\n return (\n \n \n \n \n )\n})\nexport default SearchBtnDropdown\n","import React, {forwardRef} from 'react'\nimport SearchBtnDropdown from \"./SearchBtnDropdown\";\nimport { Dropdown } from \"react-bootstrap\";\nimport {isRTL} from \"../../../helpers/locale\";\n\nconst SearchBtn = () => {\n const CustomToggle = forwardRef(({ children, onClick }, ref) => (\n {\n e.preventDefault();\n onClick(e);\n }}\n >\n {children}\n \n ));\n\n return (\n \n \n \n \n\n \n \n )\n}\nexport default SearchBtn\n","import React from 'react';\nimport SearchBar from \"./search_bar/SearchBar\";\nimport SearchBtn from \"./search_btn/SearchBtn\";\n\nconst QuickSearch = () => {\n return (\n
\n
\n \n
\n
\n \n
\n
\n );\n};\n\nexport default QuickSearch;\n","import React from 'react'\nimport QuickSearch from \"./QuickSearch\";\nimport { createRoot } from \"react-dom/client\";\n\nconst container = document.querySelectorAll('.r-quick-search')\ncontainer.forEach(el => createRoot(el).render())\n"],"names":["hasResult","result","Object","entries","filter","i","res","length","TaskRow","task","React","key","id","href","className","src","icon","alt","name","address","target","class","pickup_at","status","toLowerCase","replace","style","minWidth","i18n","t","SearchTabs","setTotalResults","activeTab","setActiveTab","useEffect","results","_key","val","_index","sum","map","arr","index","Nav","Item","Link","eventKey","toString","onClick","e","preventDefault","stopPropagation","title","display","DropdownContent","error","totalResults","count","letterSpacing","SearchBarDropdown","visible","setVisible","Dropdown","drop","show","Menu","SearchInput","forwardRef","setResult","setError","loading","setLoading","onSearchEnd","searchValue","setSearchValue","ref","shortcutVisible","setShortcutVisible","styles","setStyles","right","position","top","shortcutKey","setShortcutKey","navigator","platform","includes","isRTL","left","direction","keyDownHandler","document","addEventListener","removeEventListener","documentClickHandler","$","parents","hasClass","search","async","fetch","value","method","headers","csrfToken","data","json","type","onKeyDown","onChange","currentTarget","placeholder","defaultProps","displayName","SearchBarInput","setDropdownVisible","SearchBar","dropdownVisible","SearchBtnInput","input","current","focus","borderBottom","paddingBottom","xmlns","xmlnsXlink","width","height","viewBox","version","stroke","strokeWidth","fill","fillRule","x","y","d","opacity","children","labeledBy","SearchBtn","CustomToggle","Toggle","as","align","SearchBtnDropdown","QuickSearch","querySelectorAll","forEach","el","createRoot","render"],"sourceRoot":""}