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Aa7F,eAAc,EACpC,CACJ,CAEI+J,EAAcE,IAAI/L,EAAAA,yBAClBjD,KAAK8K,eAAezI,UAAUU,MAAQ+L,EAAcG,IAChDhM,EAAAA,uBAEJjD,KAAK8K,eAAerI,sBACpBzC,KAAK8K,eAAe/G,iBAGpBoI,GAAcnM,KAAKyK,gBAAgBhD,gBACnCzH,KAAKiK,OAAO1E,YAEpB,E","sources":["webpack://frontendplaceholder/./Src/Scripts/components/JobFilter/Filter.js","webpack://frontendplaceholder/./Src/Scripts/components/JobFilter/FreeTextFilter.js","webpack://frontendplaceholder/./Src/Scripts/components/JobFilter/RegionFilter.js","webpack://frontendplaceholder/./Src/Scripts/components/JobFilter/SelectedFilters.js","webpack://frontendplaceholder/./Src/Scripts/components/JobFilter/constants.js","webpack://frontendplaceholder/./Src/Scripts/components/JobFilter/job-filter.js"],"sourcesContent":["import { CLICK_EVENT } from './constants';\n\nexport default class Filter {\n constructor({\n elm,\n filterDataAttr,\n dropdownDataAttr,\n displayDropdownCallback,\n displayMobileMenuCallback,\n }) {\n const dataAttribute = `[${filterDataAttr}]`;\n const mobileDataAttribute = `[${filterDataAttr}-mobile]`;\n this.mobileFilterBtn = elm?.querySelector(mobileDataAttribute);\n this.displayMobileMenu = displayMobileMenuCallback;\n this.filterBtn = elm?.querySelector(dataAttribute);\n this.dropdown = elm?.querySelector(`[${dropdownDataAttr}]`);\n this.checkboxInputs = this.dropdown\n ? Array.from(this.dropdown.querySelectorAll('input[type=checkbox]'))\n : this.dropdown;\n this.displayDropdown = displayDropdownCallback;\n\n this.mobileFilterBtn?.addEventListener(\n CLICK_EVENT,\n this.displayMobileDropDown.bind(this),\n );\n\n this.filterBtn?.addEventListener(\n CLICK_EVENT,\n this.displayFilterDropdown.bind(this),\n );\n }\n\n setCheckmarkInputsByName(listOfNames) {\n const dict = Object.assign(\n {},\n ...listOfNames.map((idStr) => ({ [idStr]: idStr })),\n );\n const foundInputNodes = [];\n this.checkboxInputs.forEach((checkmarkInput) => {\n if (checkmarkInput?.id in dict) {\n checkmarkInput.checked = true;\n foundInputNodes.push(checkmarkInput);\n }\n });\n return foundInputNodes;\n }\n\n displayFilterDropdown(e) {\n this.displayDropdown(\n e,\n this.filterBtn,\n this.dropdown,\n this.checkboxInputs,\n );\n }\n\n displayMobileDropDown(e) {\n this.displayMobileMenu(\n e,\n this.filterBtn,\n this.dropdown,\n this.checkboxInputs,\n );\n }\n}\n","import {\n CLICK_EVENT,\n INPUT_EVENT,\n FREE_TEXT_FILTER_NAME,\n CLICKED_CSS_CLASS,\n HIDE_CSS_CLASS,\n} from './constants';\n\nexport default class FreeTextFilter {\n constructor({\n elm,\n addToSelectedFilters,\n removeFromSelectedFilters,\n openDropDownCallback,\n }) {\n this.textFilter = elm?.querySelector('[data-text-filter]');\n this.searchSvgClosed =\n this?.textFilter?.querySelector('#text-filter-svg');\n this.searchSvgOpen = this?.textFilter?.querySelector('.circle');\n this.textFilterInputDropdown = elm?.querySelector(\n '[data-text-dropdown]',\n );\n this.textInput = this.textFilterInputDropdown?.querySelector('input');\n this.inputLabel = this.textFilterInputDropdown?.querySelector('label');\n\n this.removeFromSelectedFilters = removeFromSelectedFilters;\n this.addToSelectedFilters = addToSelectedFilters;\n this.openDropDownCallback = openDropDownCallback;\n\n this.textFilter?.addEventListener(\n CLICK_EVENT,\n this.toggleFreeText.bind(this),\n );\n\n this.textInput?.addEventListener(\n INPUT_EVENT,\n this.updateFreeTextInput.bind(this),\n );\n }\n\n dropDownIsOpen() {\n return this.textFilterInputDropdown.classList.contains('clicked');\n }\n\n removeHasValueClass() {\n this.inputLabel.classList.remove('has-value');\n }\n\n updateFreeTextInput() {\n const { value, id } = this.textInput;\n this.removeFromSelectedFilters({\n id,\n filterName: FREE_TEXT_FILTER_NAME,\n updateBadge: false,\n clearInputValue: false,\n });\n if (value) {\n this.inputLabel.classList.add('has-value');\n if (value.length > 2) {\n this.textInput.value = value; // the removeFromSelectedFilter can have a race condition...\n const customSpan = document.createElement('span');\n const innerSpan = document.createElement('span');\n innerSpan.classList.add('text--bold');\n innerSpan.classList.add('text--italic');\n innerSpan.innerText = value;\n customSpan.innerText = 'Fritekst: ';\n customSpan.append(innerSpan);\n this.addToSelectedFilters({\n inputNode: this.textInput,\n customSpan,\n removeKeywordCallback: this.removeHasValueClass.bind(this),\n });\n }\n } else {\n this.removeHasValueClass();\n }\n }\n\n clearInputValue() {\n this.textInput.value = '';\n }\n\n resetFreeText() {\n this.clearInputValue();\n this.removeFromSelectedFilters({\n id: this.textInput.id,\n filterName: FREE_TEXT_FILTER_NAME,\n updateBadge: false,\n });\n }\n\n openDropDown() {\n this.textFilterInputDropdown?.classList.add(CLICKED_CSS_CLASS);\n this.searchSvgOpen?.classList.remove(HIDE_CSS_CLASS);\n this.searchSvgClosed?.classList.add(HIDE_CSS_CLASS);\n this.openDropDownCallback();\n }\n\n closeDropDown() {\n this.textFilterInputDropdown?.classList.remove(CLICKED_CSS_CLASS);\n this.searchSvgClosed?.classList.remove(HIDE_CSS_CLASS);\n this.searchSvgOpen?.classList.add(HIDE_CSS_CLASS);\n this.resetFreeText();\n }\n\n toggleFreeText() {\n this.dropDownIsOpen() ? this.closeDropDown() : this.openDropDown();\n }\n}\n","import Filter from './Filter';\nimport { CHANGE_EVENT, INPUT_EVENT } from './constants';\n\nexport default class RegionFilter extends Filter {\n constructor({\n elm,\n displayDropdownCallback,\n addToSelectedFilters,\n removeFromSelectedFilters,\n displayMobileMenuCallback,\n }) {\n super({\n elm: elm,\n filterDataAttr: 'data-region-filter',\n dropdownDataAttr: 'data-region-dropdown',\n displayDropdownCallback: displayDropdownCallback,\n displayMobileMenuCallback: displayMobileMenuCallback,\n });\n if (this.dropdown) {\n this.zipcodeInput = this.dropdown.querySelector('input[type=text]');\n this.rangeSlider = this.dropdown.querySelector('input[type=range]');\n this.rangeSliderLabel = this.dropdown.querySelector(\n '[data-region-slider-display]',\n );\n this.rangeSliderTextLabel = this.dropdown.querySelector(\n '[data-region-slider-text-display]',\n );\n this.rangeWrapper = this.dropdown.querySelector('.range-wrapper');\n this.removeFromSelectedFilters = removeFromSelectedFilters;\n this.addToSelectedFilters = addToSelectedFilters;\n\n const updateZipcode = this.updateZipcode.bind(this);\n // Region zipcode and slider\n this.zipcodeInput?.addEventListener(CHANGE_EVENT, updateZipcode);\n\n // update range label on input change\n this.rangeSlider?.addEventListener(\n INPUT_EVENT,\n this.setRangeSliderLabel.bind(this),\n );\n // update actual filter input onchange\n this.rangeSlider?.addEventListener(CHANGE_EVENT, updateZipcode);\n\n // on first load\n this.setRangeSliderLabel();\n }\n }\n\n setRangeSliderValue(value) {\n this.rangeSlider.value =\n this.rangeSlider.min < 1 ? this.rangeSlider.min : value;\n }\n\n focusInputField() {\n this.zipcodeInput.focus();\n }\n\n setZipcodeValue(value) {\n this.zipcodeInput.value = value;\n }\n\n updateZipcode(fetchQuery = true) {\n const zipcodeValue = this.zipcodeInput?.value;\n const radiusValue = this.rangeSlider?.value;\n const resetSlider = this.resetSlider.bind(this);\n this.removeFromSelectedFilters(this.zipcodeInput.name, resetSlider);\n this.setZipcodeValue(zipcodeValue);\n this.rangeSlider.value = !zipcodeValue\n ? this.rangeSlider.step\n : radiusValue;\n if (!zipcodeValue) {\n this.setDisabledSlider();\n } else {\n // create an inner span for special rendering of zipcode / range\n const customSpan = document.createElement('span');\n customSpan.innerText = this.zipcodeInput.value;\n const innerSpan = document.createElement('span');\n innerSpan.classList.add('text--bold');\n innerSpan.classList.add('text--italic');\n innerSpan.innerText = ` | Radius: ${this.rangeSlider.value} km`;\n customSpan.append(innerSpan);\n\n this.setDisabledSlider(false);\n this.setRangeSliderLabel();\n this.addToSelectedFilters(\n this.zipcodeInput,\n resetSlider,\n fetchQuery,\n customSpan,\n );\n }\n }\n\n setDisabledSlider(isDisabled = true) {\n this.rangeSlider.disabled = isDisabled;\n if (!isDisabled) {\n this.rangeSliderTextLabel.classList.add('active');\n } else {\n this.rangeSliderTextLabel.classList.remove('active');\n }\n }\n\n resetSlider() {\n this.rangeSlider.value = this.rangeSlider.step;\n this.setRangeSliderLabel();\n this.setDisabledSlider();\n }\n\n setRangeSliderLabel() {\n const min = this.rangeSlider.min;\n const val = this.rangeSlider.value;\n const max = this.rangeSlider.max;\n this.rangeSliderLabel.innerText = `${val}km.`;\n const newPosition = Number((val * 100) / (max - min));\n\n // Sorta magic numbers based on size of the native UI thumb\n this.rangeSliderLabel.style.left = `calc(${newPosition}% - (${\n newPosition * 0.05\n }px))`;\n }\n}\n","import {\n CLICK_EVENT,\n CATEGORY_FILTER_NAME,\n REGION_FILTER_NAME,\n JOBTYPE_FILTER_NAME,\n REGION_ZIPCODE_FILTER_NAME,\n FREE_TEXT_FILTER_NAME,\n URL_PARAMS_SEPERATOR,\n} from './constants';\n\nexport default class SelectedFilters {\n constructor({ elm, updateBadges, onChangeFilters, toggleResetFiltersBtn }) {\n this.selectedFiltersContainer = elm?.querySelector(\n '[data-selected-filters]',\n );\n\n this.selectedFiltersDict = {\n [CATEGORY_FILTER_NAME]: {},\n [REGION_FILTER_NAME]: {},\n [JOBTYPE_FILTER_NAME]: {},\n [FREE_TEXT_FILTER_NAME]: {},\n };\n\n this.updateBadges = updateBadges;\n this.onChangeFilters = onChangeFilters;\n this.toggleResetFiltersBtn = toggleResetFiltersBtn;\n }\n\n getFilterByName(filterName) {\n return this.selectedFiltersDict[filterName];\n }\n\n getValuesCount() {\n return (\n Object.keys(this.selectedFiltersDict[CATEGORY_FILTER_NAME]).length +\n Object.keys(this.selectedFiltersDict[REGION_FILTER_NAME]).length +\n Object.keys(this.selectedFiltersDict[JOBTYPE_FILTER_NAME]).length +\n Object.keys(this.selectedFiltersDict[FREE_TEXT_FILTER_NAME]).length\n );\n }\n\n getCount(filterName) {\n return Object.values(this.getFilterByName(filterName))?.filter(\n ({ includeInCount }) => includeInCount,\n )?.length;\n }\n\n getInputNodeById(id, filterName) {\n return this.selectedFiltersDict[filterName][id];\n }\n\n anySelected() {\n return this.getValuesCount() > 0;\n }\n\n addCheckmarkInputsToUrlParams(urlParams, filterName) {\n const values = [];\n Object.values(this.selectedFiltersDict[filterName])?.forEach(\n ({ inputNode: { name, id } }) => {\n if (name !== REGION_ZIPCODE_FILTER_NAME) {\n values.push(id);\n }\n },\n );\n values.length > 0 &&\n urlParams.append(filterName, values.join(URL_PARAMS_SEPERATOR));\n }\n\n addToSelectedFilters({\n inputNode,\n filterName,\n updateBadge = true,\n includeInCount = true,\n removeKeywordCallback = null,\n fetchQuery = true,\n customSpan = null,\n }) {\n const { id, name, value } = inputNode;\n const wrapper = document.createElement('div');\n const span = customSpan ?? document.createElement('span');\n\n // custom spans allow specialized content inside keyword div\n if (!customSpan) {\n span.innerHTML = inputNode.type === 'checkbox' ? name : value;\n }\n // add remove listener to the newly added keyword\n wrapper.addEventListener(\n CLICK_EVENT,\n function () {\n this.removeFromSelectedFilters({\n id,\n filterName,\n updateBadge,\n callback: removeKeywordCallback,\n });\n }.bind(this),\n );\n\n wrapper.appendChild(span);\n this.selectedFiltersDict[filterName][id] = {\n keywordNode: wrapper,\n innerSpanNode: span,\n inputNode: inputNode,\n includeInCount: includeInCount,\n id: id,\n };\n this.selectedFiltersContainer.appendChild(wrapper);\n if (updateBadge) {\n this.updateBadges(filterName);\n }\n this.onChangeFilters(fetchQuery);\n this.toggleResetFiltersBtn();\n }\n\n removeFromSelectedFilters({\n id,\n filterName,\n updateBadge = true,\n callback = null,\n fetchQuery = true,\n clearInputValue = true,\n }) {\n try {\n const selectedFilterObj = this.getInputNodeById(id, filterName);\n if (selectedFilterObj) {\n const { keywordNode = null, inputNode = null } =\n selectedFilterObj;\n this.selectedFiltersContainer.removeChild(keywordNode);\n delete this.selectedFiltersDict[filterName][id];\n if (inputNode.type === 'checkbox') {\n inputNode.checked = false;\n } else {\n if (clearInputValue) {\n inputNode.value = '';\n }\n }\n\n if (updateBadge) {\n this.updateBadges(filterName);\n }\n if (callback) {\n callback();\n }\n this.onChangeFilters(fetchQuery);\n this.toggleResetFiltersBtn();\n }\n } catch (error) {\n console.warn(error);\n }\n }\n}\n","// delĂ­cious constants\nexport const GET_JOBS_URL = '/umbraco/api/job/jobsv2';\nexport const CLICK_EVENT = 'click';\nexport const CHANGE_EVENT = 'change';\nexport const INPUT_EVENT = 'input';\nexport const HIDE_CSS_CLASS = 'hide';\nexport const DISABLE_CSS_CLASS = 'disable';\nexport const DISPLAY_CSS_CLASS = 'display';\nexport const CLICKED_CSS_CLASS = 'clicked';\nexport const CATEGORY_FILTER_NAME = 'categories';\nexport const REGION_FILTER_NAME = 'regions';\nexport const REGION_ZIPCODE_FILTER_NAME = 'zipCode';\nexport const REGION_DISTANCE_FILTER_NAME = 'distance';\nexport const JOBTYPE_FILTER_NAME = 'types';\nexport const FREE_TEXT_FILTER_NAME = 'query';\nexport const URL_PARAMS_SEPERATOR = ',';\n","import {\n CLICK_EVENT,\n HIDE_CSS_CLASS,\n DISPLAY_CSS_CLASS,\n DISABLE_CSS_CLASS,\n CLICKED_CSS_CLASS,\n CATEGORY_FILTER_NAME,\n REGION_FILTER_NAME,\n REGION_ZIPCODE_FILTER_NAME,\n REGION_DISTANCE_FILTER_NAME,\n JOBTYPE_FILTER_NAME,\n FREE_TEXT_FILTER_NAME,\n URL_PARAMS_SEPERATOR,\n} from './constants';\nimport Filter from './Filter';\nimport RegionFilter from './RegionFilter';\nimport FreeTextFilter from './FreeTextFilter';\nimport SelectedFilters from './SelectedFilters';\n\nexport default class JobFilter {\n constructor(elm, args) {\n this.elm = elm;\n this.desktopBreakpoint =\n window.matchMedia('(min-width:992px)')?.matches;\n\n // callback to get parents current pagination\n this.getPagination = args?.getPagination;\n this.setPagination = args?.setPagination;\n this.onDisplayMobileMenu = args?.onDisplayMobileMenu;\n this.onCloseMobileMenu = args?.onCloseMobileMenu;\n\n // reset callback\n this.onReset = args?.onReset;\n\n this.onChangeFiltersCallback = args?.onChangeFilters;\n\n // external element to fetchMoreJobs\n this.externalFetchMoreBtn = args?.fetchMoreBtn;\n\n // External element to display mobileMenu on click\n this.displayMobileMenuOnClickElement =\n args?.displayMobileMenuOnClickElement;\n const displayDropdownCallback = this.displayDropdown.bind(this);\n const displayMobileMenuCallback = this.displayMobileMenu.bind(this);\n\n this.utils = args.utils;\n this.utils?.setDisableFetchJobs(args?.disableFetch ?? false);\n this.utils?.addCallbackToOnLoading(\n this.toggleLoadingSpinner.bind(this),\n );\n this.utils.addCallbackToOnFetchResult(\n function ({ totalItems = 0 } = {}) {\n this.setSearchBtnText(totalItems);\n }.bind(this),\n );\n\n this.selectedFilters = new SelectedFilters({\n elm,\n updateBadges: this.updateBadges.bind(this),\n onChangeFilters: this.onChangeFilters.bind(this),\n toggleResetFiltersBtn: this.toggleResetFiltersBtn.bind(this),\n });\n\n this.categoryFilter = new Filter({\n elm: elm,\n filterDataAttr: 'data-category-filter',\n dropdownDataAttr: 'data-category-dropdown',\n displayDropdownCallback: displayDropdownCallback,\n displayMobileMenuCallback: displayMobileMenuCallback,\n });\n\n this.regionFilter = new RegionFilter({\n elm: elm,\n displayDropdownCallback: displayDropdownCallback,\n displayMobileMenuCallback: displayMobileMenuCallback,\n addToSelectedFilters: function (\n inputNode,\n removeKeywordCallback,\n fetchQuery = true,\n customSpan,\n ) {\n this.selectedFilters.addToSelectedFilters({\n inputNode,\n filterName: REGION_FILTER_NAME,\n removeKeywordCallback,\n fetchQuery: fetchQuery,\n customSpan: customSpan,\n });\n }.bind(this),\n removeFromSelectedFilters: function (id, callback) {\n this.selectedFilters.removeFromSelectedFilters({\n id,\n filterName: REGION_FILTER_NAME,\n callback: callback,\n });\n }.bind(this),\n });\n\n this.jobTypeFilter = new Filter({\n elm: elm,\n filterDataAttr: 'data-job-type-filter',\n dropdownDataAttr: 'data-job-type-dropdown',\n displayDropdownCallback: displayDropdownCallback,\n displayMobileMenuCallback: displayMobileMenuCallback,\n });\n\n this.freeTextFilter = new FreeTextFilter({\n elm,\n addToSelectedFilters: function ({\n inputNode,\n customSpan,\n removeKeywordCallback,\n }) {\n this.selectedFilters.addToSelectedFilters({\n inputNode,\n filterName: FREE_TEXT_FILTER_NAME,\n removeKeywordCallback,\n updateBadge: false,\n includeInCount: false,\n customSpan,\n });\n }.bind(this),\n removeFromSelectedFilters:\n this.selectedFilters.removeFromSelectedFilters.bind(\n this.selectedFilters,\n ),\n openDropDownCallback: this.cleanupDropdownMenu.bind(this),\n });\n\n this.resetFiltersBtn = elm?.querySelector('[data-btn-reset]');\n this.searchBtn = elm?.querySelector('[data-btn-search]');\n this.searchBtnText =\n this?.searchBtn?.querySelector('[data-search-text]');\n this.searchBtnSpinner = this?.searchBtn?.querySelector(\n '[data-search-spinner]',\n );\n\n this.filtersContainerDiv = elm?.querySelector('[data-filter-menu]');\n this.mobileMenuCloseBtn = this?.filtersContainerDiv?.querySelector(\n '[data-close-menu-btn]',\n );\n this.mobileSearchBtn = elm?.querySelector('[data-mobile-search-btn]');\n\n const fetchJobs = this.utils?.fetchQuery.bind(this.utils);\n const closeMobileMenu = this.closeMobileMenu.bind(this);\n\n this.mobileMenuCloseBtn?.addEventListener(CLICK_EVENT, closeMobileMenu);\n\n this.resetFiltersBtn?.addEventListener(\n CLICK_EVENT,\n this.resetAllFilters.bind(this),\n );\n\n this.searchBtn?.addEventListener(CLICK_EVENT, function () {\n closeMobileMenu();\n args?.onSearchBtnClick();\n });\n this.mobileSearchBtn?.addEventListener(\n CLICK_EVENT,\n args?.onSearchBtnClick,\n );\n\n if (this.displayMobileMenuOnClickElement) {\n this.displayMobileMenuOnClickElement?.addEventListener(\n CLICK_EVENT,\n this.displayMobileMenu.bind(this),\n );\n }\n if (this.externalFetchMoreBtn) {\n this.externalFetchMoreBtn?.addEventListener(\n CLICK_EVENT,\n function () {\n const { page } = this.getPagination();\n this.setPagination(page + 1);\n fetchJobs({ fetchMore: true });\n }.bind(this),\n );\n }\n\n // Close filter dropdown on window click\n window.addEventListener(\n CLICK_EVENT,\n function (e) {\n if (\n (!e.target.closest(\n '.filter-item__dropdown, .filter-item',\n ) ||\n e.target.closest('.filter-item.search-btn')) &&\n this.currentDisplayedDropdown?.classList.contains(\n DISPLAY_CSS_CLASS,\n )\n ) {\n this.cleanupDropdownMenu();\n }\n }.bind(this),\n );\n\n this.setFiltersFromUrlParams({\n forceFetch: args?.fetchOnInit ?? true,\n });\n\n this.body = document.querySelector('[data-body]');\n }\n\n setSearchBtnText(results) {\n if (results >= 0) {\n this.searchBtnText.innerText = `${results} ${this.searchBtnText.attributes['data-text-result'].value}`;\n } else {\n this.searchBtnText.innerText =\n this.searchBtnText.attributes['data-text-val'].value;\n }\n }\n\n displayDropdown(e, clickedFilter, currentDropDown, dropdownInputs) {\n if (e.target.closest('.filter-item__dropdown') === currentDropDown) {\n return;\n }\n const dropdownAlreadyOpen = this.currentClickedFilter === clickedFilter;\n if (this.currentClickedFilter) {\n this.cleanupDropdownMenu();\n }\n if (!dropdownAlreadyOpen) {\n this.currentClickedFilter = clickedFilter;\n this.currentDisplayedDropdown = currentDropDown;\n this.currentDropDownInputs = dropdownInputs;\n this.currentClickedFilter.classList.toggle(CLICKED_CSS_CLASS);\n this.currentDisplayedDropdown.classList.toggle(DISPLAY_CSS_CLASS);\n this.addCheckmarkClickListener()?.bind(this);\n if (\n clickedFilter === this.regionFilter.filterBtn &&\n this.desktopBreakpoint\n ) {\n this.regionFilter.focusInputField();\n }\n }\n }\n\n cleanupDropdownMenu() {\n if (this.currentDisplayedDropdown) {\n this.removeCheckmarkClickListener();\n this.currentDisplayedDropdown?.classList.remove(DISPLAY_CSS_CLASS);\n this.currentDisplayedDropdown = null;\n this.currentClickedFilter?.classList?.toggle(CLICKED_CSS_CLASS);\n this.currentClickedFilter = null;\n }\n }\n\n displayMobileMenu(e, clickedFilter, currentDropDown, dropdownInputs) {\n this.filtersContainerDiv.classList.toggle('show');\n if (clickedFilter) {\n this.displayDropdown(\n e,\n clickedFilter,\n currentDropDown,\n dropdownInputs,\n );\n }\n this.onDisplayMobileMenu?.();\n if (this.filtersContainerDiv.classList.contains('show')) {\n this.body.classList.add('filter-open');\n }\n }\n\n closeMobileMenu() {\n if (this.filtersContainerDiv.classList.contains('show')) {\n this.filtersContainerDiv.classList.remove('show');\n this.body.classList.remove('filter-open');\n this.cleanupDropdownMenu();\n this.onCloseMobileMenu?.();\n }\n }\n\n setOnChangeFiltersCallback(callback) {\n this.onChangeFiltersCallback = callback;\n }\n\n toggleLoadingSpinner() {\n this.searchBtnSpinner?.classList?.toggle(HIDE_CSS_CLASS);\n }\n\n handleCheckmarkContainerClick(e) {\n let currentTarget = e.target;\n\n // avoid empty cell clicks to update inputs\n if (currentTarget.classList.contains('input-container')) {\n return;\n }\n\n const targetWasLabel = currentTarget.nodeName === 'LABEL';\n\n // update input manually if the outer input container has been clicked\n if (currentTarget.nodeName !== 'INPUT') {\n if (currentTarget.nodeName !== 'P') {\n currentTarget = currentTarget?.querySelector('input');\n currentTarget.checked = !currentTarget?.checked;\n }\n if (targetWasLabel) {\n // since the label is wrapped around the input, a click will trigger\n // a second input click as well, which we prevent here\n e.preventDefault();\n }\n }\n\n const filterKey =\n this.currentClickedFilter === this.regionFilter.filterBtn\n ? REGION_FILTER_NAME\n : this.currentClickedFilter === this.categoryFilter.filterBtn\n ? CATEGORY_FILTER_NAME\n : JOBTYPE_FILTER_NAME;\n\n const { checked, id } = currentTarget;\n if (checked) {\n this.selectedFilters.addToSelectedFilters({\n inputNode: currentTarget,\n filterName: filterKey,\n });\n } else {\n this.selectedFilters.removeFromSelectedFilters({\n id: id,\n filterName: filterKey,\n });\n }\n }\n\n addCheckmarkClickListener() {\n this.currentDisplayedInputContainer =\n this.currentDisplayedDropdown.querySelector('.input-container');\n this.boundInputListener = this.handleCheckmarkContainerClick.bind(this);\n this.currentDisplayedInputContainer.addEventListener(\n CLICK_EVENT,\n this.boundInputListener,\n );\n }\n\n removeCheckmarkClickListener() {\n this.currentDisplayedInputContainer.removeEventListener(\n CLICK_EVENT,\n this.boundInputListener,\n );\n }\n\n resetAllFilters() {\n // abort any ongoing fetch\n this.utils?.abortFetch();\n\n // reset all filters\n [CATEGORY_FILTER_NAME, REGION_FILTER_NAME, JOBTYPE_FILTER_NAME].forEach(\n (filterName) => {\n Object.values(\n this.selectedFilters.getFilterByName(filterName),\n ).forEach(({ inputNode: { id } }) =>\n this.selectedFilters.removeFromSelectedFilters({\n id: id,\n filterName: filterName,\n fetchQuery: false,\n }),\n );\n },\n );\n this.utils?.updateURLParams();\n this.regionFilter.resetSlider();\n this.freeTextFilter.closeDropDown();\n this.setSearchBtnText();\n this?.onReset();\n this.utils?.fetchQuery();\n }\n\n toggleResetFiltersBtn() {\n const resetbtnClassList = this.resetFiltersBtn?.classList;\n const divIsHidden = resetbtnClassList.contains(DISABLE_CSS_CLASS);\n if (this.selectedFilters.anySelected()) {\n divIsHidden &&\n this.resetFiltersBtn.classList.remove(DISABLE_CSS_CLASS);\n } else {\n !divIsHidden && resetbtnClassList.add(DISABLE_CSS_CLASS);\n }\n }\n\n onChangeFilters(fetch = true) {\n const selectedFiltersCount = this.selectedFilters.getValuesCount();\n this.onChangeFiltersCallback?.(selectedFiltersCount);\n if (selectedFiltersCount > 0) {\n this.addSelectedFiltersToUrlParams();\n } else {\n this.utils?.updateURLParams();\n this?.onReset();\n }\n fetch && this.utils?.fetchQuery();\n }\n\n updateBadges(filterName) {\n const filter = this.getFilterByName(filterName);\n this.utils?.setFilterBadgeNumbers(\n [filter.filterBtn, filter.mobileFilterBtn],\n this.selectedFilters.getCount(filterName),\n );\n }\n\n getFilterByName(filterName) {\n switch (filterName) {\n case CATEGORY_FILTER_NAME:\n return this.categoryFilter;\n case REGION_FILTER_NAME:\n return this.regionFilter;\n case JOBTYPE_FILTER_NAME:\n return this.jobTypeFilter;\n default:\n return null;\n }\n }\n\n addSelectedFiltersToUrlParams() {\n const urlParams = new URLSearchParams();\n [CATEGORY_FILTER_NAME, REGION_FILTER_NAME, JOBTYPE_FILTER_NAME].forEach(\n (filterName) =>\n this.selectedFilters.addCheckmarkInputsToUrlParams(\n urlParams,\n filterName,\n ),\n );\n const zipcodeValue = this.regionFilter?.zipcodeInput?.value;\n const zipcodeRadiusValue = this.regionFilter?.rangeSlider?.value;\n if (zipcodeValue) {\n urlParams.append(REGION_ZIPCODE_FILTER_NAME, zipcodeValue);\n if (zipcodeRadiusValue) {\n urlParams.append(\n REGION_DISTANCE_FILTER_NAME,\n zipcodeRadiusValue,\n );\n }\n }\n\n const freeTextValue = this.freeTextFilter.textInput.value;\n if (freeTextValue) {\n urlParams.append(FREE_TEXT_FILTER_NAME, freeTextValue);\n }\n this.utils?.updateURLParams(urlParams.toString());\n }\n\n setFilterCheckmarksFromParams(urlSearchParams, filterName) {\n const ids = urlSearchParams\n .getAll(filterName)[0]\n ?.split(URL_PARAMS_SEPERATOR);\n const foundInputNodes =\n this.getFilterByName(filterName)?.setCheckmarkInputsByName(ids);\n foundInputNodes?.forEach((inputNode) => {\n this.selectedFilters.addToSelectedFilters({\n inputNode: inputNode,\n filterName: filterName,\n fetchQuery: false,\n });\n });\n }\n\n setFiltersFromUrlParams({ forceFetch = false }) {\n const currentParams = this.utils?.getUrlParams();\n if (currentParams.has(CATEGORY_FILTER_NAME)) {\n this.setFilterCheckmarksFromParams(\n currentParams,\n CATEGORY_FILTER_NAME,\n );\n }\n if (currentParams.has(REGION_FILTER_NAME)) {\n this.setFilterCheckmarksFromParams(\n currentParams,\n REGION_FILTER_NAME,\n );\n }\n if (currentParams.has(JOBTYPE_FILTER_NAME)) {\n this.setFilterCheckmarksFromParams(\n currentParams,\n JOBTYPE_FILTER_NAME,\n );\n }\n if (currentParams.has(REGION_ZIPCODE_FILTER_NAME)) {\n const zipcodeValue = currentParams.get(REGION_ZIPCODE_FILTER_NAME);\n if (zipcodeValue) {\n this.regionFilter.setZipcodeValue(zipcodeValue);\n if (currentParams.has(REGION_DISTANCE_FILTER_NAME)) {\n const radiusValue = currentParams.get(\n REGION_DISTANCE_FILTER_NAME,\n );\n this.regionFilter.setRangeSliderValue(radiusValue);\n }\n this.regionFilter.updateZipcode(false);\n }\n }\n\n if (currentParams.has(FREE_TEXT_FILTER_NAME)) {\n this.freeTextFilter.textInput.value = currentParams.get(\n FREE_TEXT_FILTER_NAME,\n );\n this.freeTextFilter.updateFreeTextInput();\n this.freeTextFilter.openDropDown();\n }\n\n if (forceFetch || this.selectedFilters.anySelected()) {\n this.utils?.fetchQuery();\n }\n }\n}\n"],"names":["_constants","require","exports","constructor","_ref","elm","filterDataAttr","dropdownDataAttr","displayDropdownCallback","displayMobileMenuCallback","dataAttribute","mobileDataAttribute","this","mobileFilterBtn","querySelector","displayMobileMenu","filterBtn","dropdown","checkboxInputs","Array","from","querySelectorAll","displayDropdown","addEventListener","CLICK_EVENT","displayMobileDropDown","bind","displayFilterDropdown","setCheckmarkInputsByName","listOfNames","dict","Object","assign","map","idStr","foundInputNodes","forEach","checkmarkInput","id","checked","push","e","addToSelectedFilters","removeFromSelectedFilters","openDropDownCallback","textFilter","searchSvgClosed","searchSvgOpen","textFilterInputDropdown","textInput","inputLabel","toggleFreeText","INPUT_EVENT","updateFreeTextInput","dropDownIsOpen","classList","contains","removeHasValueClass","remove","value","filterName","FREE_TEXT_FILTER_NAME","updateBadge","clearInputValue","add","length","customSpan","document","createElement","innerSpan","innerText","append","inputNode","removeKeywordCallback","resetFreeText","openDropDown","CLICKED_CSS_CLASS","HIDE_CSS_CLASS","closeDropDown","obj","_Filter","__esModule","default","RegionFilter","Filter","super","zipcodeInput","rangeSlider","rangeSliderLabel","rangeSliderTextLabel","rangeWrapper","updateZipcode","CHANGE_EVENT","setRangeSliderLabel","setRangeSliderValue","min","focusInputField","focus","setZipcodeValue","fetchQuery","arguments","undefined","zipcodeValue","radiusValue","resetSlider","name","step","setDisabledSlider","isDisabled","disabled","val","max","newPosition","Number","style","left","updateBadges","onChangeFilters","toggleResetFiltersBtn","selectedFiltersContainer","selectedFiltersDict","CATEGORY_FILTER_NAME","REGION_FILTER_NAME","JOBTYPE_FILTER_NAME","getFilterByName","getValuesCount","keys","getCount","values","filter","_ref2","includeInCount","getInputNodeById","anySelected","addCheckmarkInputsToUrlParams","urlParams","_ref3","REGION_ZIPCODE_FILTER_NAME","join","URL_PARAMS_SEPERATOR","_ref4","wrapper","span","innerHTML","type","callback","appendChild","keywordNode","innerSpanNode","_ref5","selectedFilterObj","removeChild","error","console","warn","_interopRequireDefault","_RegionFilter","_FreeTextFilter","_SelectedFilters","args","desktopBreakpoint","window","matchMedia","matches","getPagination","setPagination","onDisplayMobileMenu","onCloseMobileMenu","onReset","onChangeFiltersCallback","externalFetchMoreBtn","fetchMoreBtn","displayMobileMenuOnClickElement","utils","setDisableFetchJobs","disableFetch","addCallbackToOnLoading","toggleLoadingSpinner","addCallbackToOnFetchResult","totalItems","setSearchBtnText","selectedFilters","SelectedFilters","categoryFilter","regionFilter","jobTypeFilter","freeTextFilter","FreeTextFilter","cleanupDropdownMenu","resetFiltersBtn","searchBtn","searchBtnText","searchBtnSpinner","filtersContainerDiv","mobileMenuCloseBtn","mobileSearchBtn","fetchJobs","closeMobileMenu","resetAllFilters","onSearchBtnClick","page","fetchMore","target","closest","currentDisplayedDropdown","DISPLAY_CSS_CLASS","setFiltersFromUrlParams","forceFetch","fetchOnInit","body","results","attributes","clickedFilter","currentDropDown","dropdownInputs","dropdownAlreadyOpen","currentClickedFilter","currentDropDownInputs","toggle","addCheckmarkClickListener","removeCheckmarkClickListener","setOnChangeFiltersCallback","handleCheckmarkContainerClick","currentTarget","targetWasLabel","nodeName","preventDefault","filterKey","currentDisplayedInputContainer","boundInputListener","removeEventListener","abortFetch","updateURLParams","resetbtnClassList","divIsHidden","DISABLE_CSS_CLASS","fetch","selectedFiltersCount","addSelectedFiltersToUrlParams","setFilterBadgeNumbers","URLSearchParams","zipcodeRadiusValue","REGION_DISTANCE_FILTER_NAME","freeTextValue","toString","setFilterCheckmarksFromParams","urlSearchParams","ids","getAll","split","currentParams","getUrlParams","has","get"],"sourceRoot":""}