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Aac,IAAAA,MAAgB,CAC7BpD,KAAMoD,IAAAA,MAAgB,CACtBc,aAAcd,IAAAA,MAAgB,CAC9BZ,MAAOY,IAAAA,GAAa,CACpBP,SAAUO,IAAAA,IAAc,CACxBI,SAAUJ,IAAAA,IAAc,CACxBK,SAAUL,IAAAA,IAAc,CACxBY,SAAUZ,IAAAA,IAAc,CACxBa,SAAUb,IAAAA,MAAgB,CAC1BV,SAAUU,IAAAA,IAAc,CACxBS,OAAQT,IAAAA,MAAgB,CACxBM,MAAON,IAAAA,IAAc,CACrBO,IAAKP,IAAAA,MAAgB,CACrBQ,IAAKR,IAAAA,MAAgB,EAIzB,MAAef,KAAKA","sources":["webpack://_N_E/./components/product/SwatchGroup/SwatchFilter/SwatchFilter.module.scss","webpack://_N_E/./components/icons/IconSearch.jsx","webpack://_N_E/./components/icons/IconInputError.jsx","webpack://_N_E/./components/product/SwatchGroup/SwatchGroup.helpers.js","webpack://_N_E/./components/product/SwatchGroup/SwatchFilter/getSwatchData.helper.js","webpack://_N_E/./components/product/SwatchGroup/SwatchFilter/index.jsx","webpack://_N_E/./components/forms/Input/Input.module.scss","webpack://_N_E/./lib/Utils/removeSpaces.js","webpack://_N_E/./components/forms/Input/index.jsx"],"sourcesContent":["// extracted by mini-css-extract-plugin\nmodule.exports = {\"block\":\"SwatchFilter_block__2LPNk\",\"searchIcon\":\"SwatchFilter_searchIcon__vMd1M\",\"keyword\":\"SwatchFilter_keyword__fprFT\",\"quickShip\":\"SwatchFilter_quickShip__Mpqrh\",\"controls\":\"SwatchFilter_controls__IuuGA\"};","\nexport function IconSearch(props){\n return(\n \n \n \n \n )\n}","\nexport function IconInputError(props){\n return(\n \n \n \n )\n}","import parseOptionLabel from 'components/applications/pip/helpers/parseOptionLabel.helper';;\n\n\n\n// Sort by 1 factor\nexport function sortSwatchesBy(swatches = [], by = \"\"){\n return swatches.sort((a, b) => a[by] > b[by] ? 1 : -1);\n}\n\n\n// Sort and Group by Brand\nexport function sortByBrand(optionData){\n const sorted = {};\n\n optionData.values.forEach(opt => {\n const parsed = parseOptionLabel(opt.label);\n sorted[parsed.brandName] = {};\n });\n\n\n optionData.values.forEach(opt => {\n const parsed = parseOptionLabel(opt.label);\n\n sorted[parsed.brandName] = {\n ...sorted[parsed.brandName],\n [parsed.text]: {\n ...parsed,\n ...opt\n }\n }\n });\n\n return sorted;\n}","import parseOptionLabel from \"components/applications/pip/helpers/parseOptionLabel.helper\";\n\n/**\n * Parse the option label to get the color code\n * @param {array} swatchValues \n * @returns array\n */\n\nexport default function getSwatchData({ sortedOptionDataValues, quickShip = [], specialOrderOptions = [], hideSwatch = []}){\n const swatchSet = sortedOptionDataValues.map((swatch) => {\n const parsed = parseOptionLabel(swatch.label)\n\n return{\n ...swatch,\n ...parsed,\n quickShip: quickShip.includes(parsed?.colorCode),\n specialOrder: specialOrderOptions.includes(parsed?.colorCode),\n hideSwatch: hideSwatch.includes(parsed?.colorCode)\n }\n })\n\n return swatchSet\n}","/* eslint-disable react-hooks/exhaustive-deps */\n\nimport Style from './SwatchFilter.module.scss';\n\nimport PropTypes from \"prop-types\";\nimport Input from \"components/forms/Input\";\nimport React, { useEffect, useId, useMemo, useState } from \"react\";\nimport { sortSwatchesBy } from \"../SwatchGroup.helpers\";\nimport dynamic from 'next/dynamic'\nimport { useSortedValues } from \"custom_hooks/useSortedValues\";\nimport getSwatchData from './getSwatchData.helper';\n\nconst ToolTip = dynamic(() => import('components/help/ToolTip'))\nconst Checkbox = dynamic(() => import('components/forms/Checkbox'))\n\n\nconst SwatchFilter = React.forwardRef(({\n setSorted = () => null, \n quickShip = \"\", \n specialOrderOptions = \"\",\n hideSwatch = \"\",\n optionDataValues = [],\n name\n}, ref ) => {\n\n const id = useId()\n const [ keyword, setKeyword ] = useState(\"\")\n const [ qs, setQuickShip ] = useState(null)\n\n const sortedOptionDataValues = useSortedValues(optionDataValues)\n\n const sorted = useMemo(() => { \n if( qs || keyword ){\n const swatchData = getSwatchData({ sortedOptionDataValues, quickShip, specialOrderOptions, hideSwatch});\n const newKeyword = keyword.toLowerCase()\n\n const filtered = swatchData.filter(val => {\n const newLabel = val.label.toLowerCase();\n\n return (!qs || qs === val.quickShip) &&\n (!newKeyword || newLabel.includes(newKeyword))\n })\n \n const sorted = sortSwatchesBy(filtered, \"label\")\n\n return sorted \n\n }else{\n // set the original values back\n return sortedOptionDataValues\n }\n\n }, [ keyword, qs ])\n\n\n\n useEffect(() => {\n setSorted(sorted)\n\n }, [ sorted ])\n\n \n\n\n return(\n
\n setKeyword(value)}\n type=\"search\"\n canClear\n autoComplete={false}\n className={Style.keyword}\n />\n\n {quickShip && (\n
\n setQuickShip(e.checked ||= null)}\n className={Style.quickShip}\n />\n\n \n
\n )}\n
\n )\n})\n\n\nSwatchFilter.displayName = 'SwatchFilter';\n\n\nSwatchFilter.propType = {\n values: PropTypes.array,\n setSorted: PropTypes.func\n}\n\n\nexport default SwatchFilter;\n\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"control\":\"Input_control__hNWIt\",\"active\":\"Input_active__WYu4O\",\"file\":\"Input_file__iQEKD\",\"label\":\"Input_label__Gql5L\",\"help\":\"Input_help__1zng9\",\"block__select\":\"Input_block__select__cIx0D\",\"block\":\"Input_block__U2yiM\",\"errorIcon\":\"Input_errorIcon__JluuM\",\"flushRightIcon\":\"Input_flushRightIcon__fRr4q\",\"error__label\":\"Input_error__label__YUuBD\",\"error__control\":\"Input_error__control__6LJBw\",\"error__help\":\"Input_error__help__GiGRS\",\"hasUnit\":\"Input_hasUnit__8laLF\",\"controlGroup\":\"Input_controlGroup__4_lzQ\",\"togglePassword\":\"Input_togglePassword__dkWy4\",\"clearInput\":\"Input_clearInput__I9MTa\",\"searchIcon\":\"Input_searchIcon__RQt3P\",\"postFix\":\"Input_postFix__3MhPJ\"};","/**\n * Removes ALL spaces from a string\n * @param {String} string \n * @returns a string with no spaces\n */\n\nexport default function removeSpaces(string = \"\"){\n return string.replace(/\\s/g, '');\n}\n","\"use client\"\n\n/* eslint-disable react-hooks/exhaustive-deps */\nimport PropTypes from 'prop-types';\nimport React, { useEffect, useId, useRef, useState } from 'react';\nimport clsx from 'clsx';\nimport removeSpaces from 'lib/Utils/removeSpaces';\nimport { IconClose } from 'components/icons/IconClose';\nimport { IconInputError } from 'components/icons/IconInputError';\nimport { IconSearch } from 'components/icons/IconSearch';\n\nimport Style from './Input.module.scss';\n\n\n\nconst Input = React.forwardRef(({\n type = \"text\",\n className,\n autoComplete,\n label,\n name,\n required,\n disabled,\n error = false,\n value,\n canClear,\n placeholder,\n min,\n max,\n id,\n accept,\n maxLength,\n minLength,\n readOnly,\n helpText,\n controlClass,\n unitText = null,\n onFocus = () => null,\n onBlur = () => null,\n onChange = () => null,\n onKeyUp = () => null,\n onInput = () => null,\n autoFocus = false,\n clearBtnTabIndex = 0,\n ...other\n}, ref ) => {\n\n const inputRef = useRef()\n const [ newValue, setValue ] = useState(\"\")\n const [ inputType, setType ] = useState(type);\n const [ hasFocus, setHasFocus ] = useState(null)\n const genId = useId()\n\n useEffect(() => {\n if( autoFocus ){ \n inputRef.current.focus() \n }\n \n }, [])\n\n\n useEffect(() => {\n if( value || value === 0 ){\n setValue(value)\n setHasFocus(true)\n }\n \n }, [ value ])\n\n \n \n const togglePassword = () => {\n const newType = inputType === \"text\" ? \"password\" : \"text\"\n setType(newType)\n }\n\n\n const triggerEvents = (event) => {\n const value = inputRef.current.value;\n\n if( onChange ){ onChange(value, inputRef.current, event); }\n if( onKeyUp ){ onKeyUp(value, inputRef.current, event); }\n if( onInput ){ onInput(value, inputRef.current, event); }\n }\n\n\n function checkForValue(e){\n const hasValue = ref?.current?.value.length || e?.target?.value.length;\n const hasCurrentFocus = document.activeElement === inputRef.current;\n\n if( \n ((hasCurrentFocus && hasValue) ||\n (hasCurrentFocus && !hasValue) || \n (!hasCurrentFocus && hasValue)) &&\n e.type === \"focus\"\n ){\n setHasFocus(true)\n\n }else if( (!hasCurrentFocus && !hasValue) ){\n setHasFocus(false)\n onBlur()\n\n }else if ( e.type === \"blur\" ){\n onBlur()\n }\n }\n\n\n const inputChange = (e) => {\n triggerEvents(e)\n setValue(ref?.current?.value ?? e?.target?.value)\n checkForValue(e)\n }\n\n\n const clearInput = () => {\n inputRef.current.value = \"\";\n\n setValue(\"\")\n triggerEvents()\n onBlur()\n }\n\n\n return(\n
\n
\n {\n inputRef.current = node;\n\n if (typeof ref === 'function') {\n ref(node);\n\n } else if (ref) {\n ref.current = node;\n }\n }}\n id={removeSpaces(id ?? genId)}\n autoComplete={!autoComplete && \"new-password\"}\n type={inputType}\n name={name}\n className={clsx(Style.control, controlClass, error && Style.error__control)} \n required={required}\n placeholder={placeholder}\n value={newValue}\n accept={accept}\n disabled={disabled}\n onChange={inputChange}\n onInput={inputChange}\n onKeyUp={inputChange}\n onFocus={() => {\n onFocus()\n setHasFocus(true)\n }}\n onBlur={checkForValue}\n min={min}\n max={max}\n readOnly={readOnly}\n minLength={type === \"password\" ? 8 : minLength}\n maxLength={type === \"password\" ? 20 : maxLength}\n {...other}\n />\n\n {error && (\n \n )}\n\n\n {(canClear && hasFocus && type !== \"password\") && (\n \n )}\n \n\n {type === \"password\" && (\n \n )}\n\n\n {unitText && (\n \n {unitText}\n \n )}\n\n\n inputRef.current.focus()}\n className={clsx(Style.label, error && Style.error__label, !!unitText && Style.hasUnit)} \n htmlFor={removeSpaces(id ?? genId)}\n style={{ width: (!unitText && (type !== \"search\" || type !== \"password\" )) ? \"100%\" : \"80%\" }}\n >\n {label}\n \n\n {type === \"search\" && }\n
\n\n {helpText && \n

\n {helpText}\n

\n }\n
\n )\n})\n\nInput.displayName = 'Input';\n\n\nInput.propTypes = {\n type: PropTypes.oneOf([\"text\", \"email\", \"number\", \"time\", \"url\", \"password\", \"search\", \"tel\" ]),\n label: PropTypes.string,\n placeholder: PropTypes.string,\n name: PropTypes.string,\n controlClass: PropTypes.string,\n value: PropTypes.any,\n onChange: PropTypes.func,\n required: PropTypes.bool,\n disabled: PropTypes.bool,\n readOnly: PropTypes.bool,\n helpText: PropTypes.string,\n canClear: PropTypes.bool,\n accept: PropTypes.string,\n error: PropTypes.bool,\n min: PropTypes.number,\n max: PropTypes.number,\n}\n\n\nexport default Input;"],"names":["IconSearch","props","svg","xmlSpace","viewBox","focusable","aria-label","aria-hidden","title","path","d","IconInputError","ToolTip","dynamic","Checkbox","SwatchFilter","React","ref","setSorted","quickShip","specialOrderOptions","hideSwatch","optionDataValues","name","id","useId","keyword","setKeyword","useState","qs","setQuickShip","sortedOptionDataValues","useSortedValues","sorted","useMemo","swatchData","getSwatchData","map","parsed","parseOptionLabel","swatch","label","includes","colorCode","specialOrder","newKeyword","toLowerCase","sortSwatchesBy","swatches","by","sort","a","b","filter","val","newLabel","useEffect","fieldset","className","Style","Input","placeholder","onKeyUp","value","type","canClear","autoComplete","div","onChange","e","checked","text","displayName","propType","values","PropTypes","removeSpaces","string","replace","required","disabled","error","min","max","accept","maxLength","minLength","readOnly","helpText","controlClass","unitText","onFocus","onBlur","onInput","autoFocus","clearBtnTabIndex","other","inputRef","useRef","newValue","setValue","inputType","setType","hasFocus","setHasFocus","genId","current","focus","triggerEvents","event","checkForValue","hasValue","length","target","hasCurrentFocus","document","activeElement","inputChange","clsx","input","node","button","onClick","clearInput","tabIndex","IconClose","togglePassword","newType","span","htmlFor","style","width","p","propTypes"],"sourceRoot":"","ignoreList":[]}