{"version":3,"sources":["webpack:///./Scripts/Actions/Rutab/VariantFilter.action.js","webpack:///./Scripts/Components/Rutab/RutabVariantFilter.js","webpack:///../node_modules/multiselect-react-dropdown/dist/index.js","webpack:///../node_modules/multiselect-react-dropdown/dist/multiselect-react-dropdown.cjs.production.min.js"],"names":["url","document","getElementById","dataset","baseproductsystemid","loadError","error","type","VARIANTSFILTER_LOAD_ERROR","payload","receive","data","VARIANTSFILTER_RECIVE","variants","props","dispatch","useDispatch","useSelector","state","variantFilter","filteredVariants","setfilteredVariants","useState","SelectedFilters","setSelectedFilters","onSelect","selectedList","selectedItem","filterTypeIndex","findIndex","e","title","onRemove","removedItem","index","length","splice","useEffect","getState","get","then","response","json","catch","ex","catchError","vars","forEach","variant","shouldRender","filter","some","sl","filterValues","f","value","id","push","className","variantFilterOptions","map","filterOption","i","key","placeholder","showCheckbox","options","displayValue","variantInformationTitles","variantInformation","information","dangerouslySetInnerHTML","__html","module","exports","t","default","n","Object","setPrototypeOf","bind","__proto__","s","ReferenceError","insertAt","head","getElementsByTagName","createElement","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","o","circle","circle2","close","cancel","l","useRef","outsideClick","current","contains","target","addEventListener","removeEventListener","ref","children","r","c","call","this","inputValue","filteredOptions","unfilteredOptions","selectedValues","assign","preSelectedValues","toggleOptionsList","highlightOption","avoidHighlightFirstOption","keepSearchTerm","groupedObject","closeIconType","closeIcon","optionTimeout","searchWrapper","createRef","searchBox","onChange","onKeyPress","onFocus","onBlur","renderMultiselectContainer","renderSelectedList","onRemoveSelectedItem","toggelOptionList","onArrowKeyNavigation","onSelectItem","filterOptionsByInput","removeSelectedValuesFromOptions","isSelectedValue","fadeOutSelection","isDisablePreSelectedValues","renderGroupByOptions","renderNormalOption","listenerCallback","resetSelectedValues","getSelectedItems","getSelectedItemsCount","hideOnClickOutside","onCloseOptionList","isVisible","prototype","create","constructor","a","initialSetValue","groupBy","singleSelect","groupByOptions","Promise","setState","componentDidMount","componentDidUpdate","JSON","stringify","focus","componentWillUnmount","clearTimeout","isObject","p","indexOf","reduce","onSearch","onKeyPressFn","matchValues","caseSensitiveSearch","toLowerCase","toString","keyCode","disablePreSelectedValues","closeOnSelect","selectionLimit","onSingleSelect","renderOptionList","style","emptyRecordMsg","loadingMessage","loading","optionContainer","notFound","keys","Fragment","groupHeading","option","onClick","readOnly","checked","optionValueDecorator","customCloseIcon","chips","selectedValueDecorator","src","setTimeout","offsetWidth","offsetHeight","getClientRects","getElementsByClassName","name","u","hidePlaceholder","d","disable","h","showArrow","C","customArrow","multiselectContainer","hideSelectedList","onKeyDown","inputField","autoComplete","disabled","onMouseDown","preventDefault","render","Component","defaultProps"],"mappings":"iLAIA,MAAMA,EAAM,iBAAmBC,SAASC,eAAe,iBAAiBC,QAAQC,oBAUnEC,EAAaC,IAAD,CACrBC,KAAMC,KACNC,QAAS,CACLH,WAIKI,EAAWC,IAAD,CACnBJ,KAAMK,KACNH,QAAS,CACLI,SAAUF,KCuFlB,EA1GuBG,IACnB,MAAMC,GAAWC,UACXH,GAAWI,SAAaC,GAAUA,EAAMC,cAAcN,YACrDO,EAAkBC,IAAuBC,cAAS,KAClDC,EAAiBC,IAAsBF,cAAS,IAqBvD,SAASG,EAASC,EAAcC,GAC5B,IAAIC,EAAkBL,EAAgBM,WAAUC,GAAKA,EAAEC,OAASJ,EAAaI,QAEzEH,GAAmB,GACnBL,EAAgBK,GAAmB,CAAEG,MAAOJ,EAAaI,MAAOL,gBAChEF,EAAmB,IAAID,KAGvBC,EAAmB,IAAID,EAAiB,CAAEQ,MAAOJ,EAAaI,MAAOL,kBAI7E,SAASM,EAASN,EAAcO,GAC5B,IAAIC,EAAQX,EAAgBM,WAAUC,GAAKA,EAAEC,OAASE,EAAYF,QAElE,OAA4B,IAAxBL,EAAaS,QACbZ,EAAgBa,OAAOF,EAAM,QAC7BV,EAAmB,IAAID,KAIvBW,GAAS,GACTX,EAAgBW,GAAS,CAAEH,MAAOE,EAAYF,MAAOL,qBACrD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,CAAC7B,UAAU,iBAAiB+J,GAAG3J,EAAEyB,cAAc,MAAM,CAACqH,IAAI,8fAA8flJ,UAAU,gCAAgCI,EAAEyB,cAAc,MAAM,CAAC7B,UAAU,wBAAwBmB,EAAE,eAAe,eAAeoJ,YAAY,SAASnM,GAAGA,EAAEoM,mBAAmBlH,KAAK0E,sBAAsB7B,EAAEsE,OAAO,WAAW,OAAOrK,EAAEyB,cAAcY,EAAE,CAACE,aAAaW,KAAKwC,mBAAmBxC,KAAKsB,+BAA+BxB,EAAzqY,CAA4qYhD,EAAEsK,WAAWvH,EAAEwH,aAAa,CAACnK,QAAQ,GAAGoH,0BAAyB,EAAGlE,eAAe,GAAGuD,UAAS,EAAGxG,aAAa,QAAQF,cAAa,EAAGuH,gBAAgB,EAAExH,YAAY,SAAS+F,QAAQ,GAAG4B,MAAM,GAAGC,eAAe,uBAAuBnK,SAAS,aAAaO,SAAS,aAAagJ,aAAa,aAAanD,UAAU,UAAUmC,cAAa,EAAGkB,qBAAoB,EAAG1H,GAAG,GAAG0J,KAAK,GAAG3B,eAAc,EAAG9D,2BAA0B,EAAG2F,iBAAgB,EAAGI,WAAU,EAAG9F,gBAAe,EAAG+E,gBAAgB,GAAG/I,UAAU,GAAGgK,iBAAY,EAAOf,uBAAuB,SAAS7K,GAAG,OAAOA,GAAG0K,qBAAqB,SAAS1K,GAAG,OAAOA,IAA0B4C,EAAQE,QAAQiC","file":"869.0851b738322f0ddbc754.js","sourcesContent":["import { get } from '../../Services/http';\r\nimport { catchError } from '../Error.action';\r\nimport { VARIANTSFILTER_LOAD_ERROR, VARIANTSFILTER_RECIVE } from '../../Rutab/RutabConstants';\r\n\r\nconst url = '/api/variants/' + document.getElementById('variantFilter').dataset.baseproductsystemid;\r\n\r\nexport const loadVariants = () => (dispatch, getState) => {\r\n return (get(url)\r\n .then((response) => response.json())\r\n .then((data) => dispatch(receive(data)))\r\n .catch((ex) => dispatch(catchError(ex, (error) => loadError(error)))\r\n ));\r\n};\r\n\r\nexport const loadError = (error) => ({\r\n type: VARIANTSFILTER_LOAD_ERROR,\r\n payload: {\r\n error,\r\n },\r\n});\r\n\r\nexport const receive = (data) => ({\r\n type: VARIANTSFILTER_RECIVE,\r\n payload: {\r\n variants: data,\r\n },\r\n});\r\n","import React, { useEffect, useState } from 'react';\r\nimport Multiselect from 'multiselect-react-dropdown';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { loadVariants } from '../../Actions/Rutab/VariantFilter.action';\r\n\r\nconst VariantFilter = (props) => {\r\n const dispatch = useDispatch();\r\n const variants = useSelector((state) => state.variantFilter.variants);\r\n const [filteredVariants, setfilteredVariants] = useState([]);\r\n const [SelectedFilters, setSelectedFilters] = useState([]);\r\n\r\n useEffect(() => { \r\n dispatch(loadVariants());\r\n }, []);\r\n\r\n useEffect(() => { \r\n if(SelectedFilters.length === 0){\r\n setfilteredVariants(variants.variants);\r\n return;\r\n }\r\n let vars = []\r\n variants.variants?.forEach((variant => {\r\n if (shouldRender(variant)) {\r\n vars.push(variant)\r\n }\r\n }))\r\n setfilteredVariants(vars);\r\n\r\n }, [SelectedFilters, variants]);\r\n\r\n function onSelect(selectedList, selectedItem) {\r\n let filterTypeIndex = SelectedFilters.findIndex(e => e.title == selectedItem.title)\r\n\r\n if (filterTypeIndex > -1) {\r\n SelectedFilters[filterTypeIndex] = { title: selectedItem.title, selectedList }\r\n setSelectedFilters([...SelectedFilters])\r\n }\r\n else {\r\n setSelectedFilters([...SelectedFilters, { title: selectedItem.title, selectedList }])\r\n }\r\n }\r\n\r\n function onRemove(selectedList, removedItem) {\r\n let index = SelectedFilters.findIndex(e => e.title == removedItem.title)\r\n\r\n if (selectedList.length === 0) {\r\n SelectedFilters.splice(index,1) \r\n setSelectedFilters([...SelectedFilters])\r\n return\r\n }\r\n\r\n if (index > -1) {\r\n SelectedFilters[index] = { title: removedItem.title, selectedList }\r\n setSelectedFilters([...SelectedFilters])\r\n return\r\n }\r\n };\r\n\r\n function shouldRender(variant) {\r\n let shouldRender = true;\r\n SelectedFilters.forEach((filter) => {\r\n if (!filter.selectedList.some(sl => variant.filterValues.some(f => f.value == sl.id && f.title == sl.title))) {\r\n shouldRender = false;\r\n return;\r\n }\r\n })\r\n return shouldRender;\r\n }\r\n\r\n return ( \r\n
{title} | )\r\n )}\r\n
\r\n )}\r\n |