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AAmB,2BAA2B,WAAa,qBAAqB,UAAY,oBAAoB,qBAAqB,6BAA6B,iBAAmB,2BAA2B,KAAO,eAAe,SAAW,mBAAmB,sBAAwB,gCAAgC,kBAAoB,4BAA4B,wBAA0B,kCAAkC,iBAAmB,2BAA2B,iBAAmB,2BAA2B,kBAAoB,4BAA4B,wBAA0B,kCAAkC,KAAO,eAAe,gBAAkB,0BAA0B,cAAgB,wBAAwB,mBAAqB,6BAA6B,YAAc,sBAAsB,iBAAmB,2BAA2B,mCAAqC,6CAA6C,qBAAuB,+BAA+B,4BAA8B,sC","sources":["webpack://helloFlexReact/./Themes/Glued/Content/ReactSharedScripts/components/AjaxDropdown/utils.ts","webpack://helloFlexReact/./Themes/Glued/Content/ReactSharedScripts/components/DropdownV2/api.ts","webpack://helloFlexReact/./Themes/Glued/Content/ReactSharedScripts/components/DropdownV2/styles/tools.module.scss","webpack://helloFlexReact/./Themes/Glued/Content/ReactSharedScripts/components/DropdownV2/DropdownSearchTextbox.tsx","webpack://helloFlexReact/./Themes/Glued/Content/ReactSharedScripts/components/DropdownV2/DropdownListItem.tsx","webpack://helloFlexReact/./Themes/Glued/Content/ReactSharedScripts/components/DropdownV2/DropdownListItems.tsx","webpack://helloFlexReact/./Themes/Glued/Content/ReactSharedScripts/components/DropdownV2/DropdownListSwitcher.tsx","webpack://helloFlexReact/./Themes/Glued/Content/ReactSharedScripts/components/DropdownV2/DropdownContainer.tsx","webpack://helloFlexReact/./Themes/Glued/Content/ReactSharedScripts/components/DropdownV2/DropdownSwitchIcon.tsx","webpack://helloFlexReact/./Themes/Glued/Content/ReactSharedScripts/components/DropdownV2/Dropdown.tsx","webpack://helloFlexReact/./Themes/Glued/Content/ReactSharedScripts/components/DropdownV2/const.ts","webpack://helloFlexReact/./Themes/Glued/Content/ReactSharedScripts/components/DropdownV2/utils.tsx","webpack://helloFlexReact/./Themes/Glued/Content/ReactSharedScripts/components/KeyboardNavigationList/KeyboardNavigationList.tsx","webpack://helloFlexReact/./Themes/Glued/Content/ReactSharedScripts/components/KeyboardNavigationList/KeyboardNavigationListWrapper.tsx","webpack://helloFlexReact/./Themes/Glued/Content/ReactSharedScripts/components/KeyboardNavigationList/KeyboardNavigationListWrapperFocusTrap.tsx","webpack://helloFlexReact/./Themes/Glued/Content/ReactSharedScripts/components/KeyboardNavigationList/const.ts","webpack://helloFlexReact/./Themes/Glued/Content/ReactSharedScripts/components/KeyboardNavigationList/hooks.ts","webpack://helloFlexReact/./Themes/Glued/Content/ReactSharedScripts/utils/html.ts","webpack://helloFlexReact/./Themes/Glued/Content/ReactSharedScripts/components/DropdownV2/styles/index.module.scss"],"sourcesContent":["import { DropdownItemsProps } from '../DropdownV2';\r\nimport { KeyIndicators } from './types';\r\nimport { isUndefined } from '../../predicates/type';\r\n\r\nexport function getAsyncIndicatorsRequestIds(items: DropdownItemsProps) {\r\n\treturn items\r\n\t\t.filter((item) => item['keyIndicator'] === null || isUndefined(item['keyIndicator']))\r\n\t\t.map((item) => item.id);\r\n}\r\n\r\nexport function mergeItemsWithIndicators(items: DropdownItemsProps, indicators: KeyIndicators) {\r\n\treturn items.map((item) => {\r\n\t\tconst asyncCountItem = indicators.find((syncIndicator) => syncIndicator.id === item.id);\r\n\r\n\t\tif (typeof asyncCountItem === 'undefined') {\r\n\t\t\treturn item;\r\n\t\t}\r\n\r\n\t\tconst { keyIndicator } = asyncCountItem;\r\n\r\n\t\treturn {\r\n\t\t\t...item,\r\n\t\t\tkeyIndicator,\r\n\t\t};\r\n\t});\r\n}\r\n\r\nexport const removeExtraPipes = (value: string) => {\r\n\tlet sanitizedValue = value;\r\n\r\n\tsanitizedValue = sanitizedValue.replace(/^( *\\| *){1,99}/, '');\r\n\tsanitizedValue = sanitizedValue.replace(/(\\| +){2,99}/g, '| ');\r\n\tsanitizedValue = sanitizedValue.replace(/( *\\| *){1,99}$/, '');\r\n\r\n\treturn sanitizedValue;\r\n};\r\n","export const closeActive = () => {\r\n\tif (typeof window.__REACT__DROPDOWN_TS === 'function') {\r\n\t\twindow.__REACT__DROPDOWN_TS();\r\n\t}\r\n};\r\n","// extracted by mini-css-extract-plugin\nexport default {\"tools\":\"tools_UsAHuBW\",\"toolItem\":\"toolItem_fB0zWAl\"};","import React, { FC, FormEvent, useCallback, useEffect, useRef, useState } from 'react';\r\nimport { Search } from '../Icons/Search';\r\nimport classNames from 'classnames';\r\nimport classes from './styles/index.module.scss';\r\nimport { isMobileAny } from '../../utils/device';\r\nimport { OnSearchApply } from './types';\r\nimport { DROPDOWN_SEARCH_BUTTON_TEST_ID, DROPDOWN_SEARCH_INPUT_TEST_ID } from './const';\r\n\r\ntype DropdownSearchTextboxProps = {\r\n\tvalue: string;\r\n\tonSearchApply: OnSearchApply;\r\n\tonChange: (value: string) => void;\r\n\tdisabled?: boolean;\r\n};\r\n\r\nexport const DropdownSearchTextbox: FC> = ({\r\n\tonChange,\r\n\tonSearchApply,\r\n\tvalue,\r\n\tdisabled,\r\n}) => {\r\n\tconst [hasFocus, setHasFocus] = useState(false);\r\n\tconst inputRef = useRef(null);\r\n\tconst buttonClassName = classNames(classes.searchButton, {\r\n\t\t[classes.searchButton_focus]: hasFocus,\r\n\t});\r\n\tconst handleTextBoxChange = useCallback(\r\n\t\t(e: FormEvent) => {\r\n\t\t\tif (typeof onChange !== 'undefined') {\r\n\t\t\t\tonChange(e.currentTarget.value);\r\n\t\t\t}\r\n\t\t},\r\n\t\t[onChange],\r\n\t);\r\n\r\n\tconst handleTextBoxKeyDown = useCallback(\r\n\t\t(e: React.KeyboardEvent) => {\r\n\t\t\tif (e.key !== 'Enter') {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (typeof onSearchApply !== 'undefined') {\r\n\t\t\t\tonSearchApply(e.currentTarget.value);\r\n\t\t\t}\r\n\r\n\t\t\te.preventDefault();\r\n\t\t},\r\n\t\t[onSearchApply],\r\n\t);\r\n\r\n\tconst handleTextBoxFocus = useCallback(() => {\r\n\t\tsetHasFocus(true);\r\n\t}, []);\r\n\r\n\tconst handleTextBoxBlur = useCallback(() => {\r\n\t\tsetHasFocus(false);\r\n\t}, []);\r\n\r\n\tconst handleButtonClick = useCallback(() => {\r\n\t\tif (typeof onSearchApply !== 'undefined') {\r\n\t\t\tonSearchApply(value);\r\n\t\t}\r\n\t}, [value, onSearchApply]);\r\n\r\n\tuseEffect(() => {\r\n\t\tconst shouldSetFocus = !isMobileAny && inputRef.current !== null;\r\n\r\n\t\tif (!shouldSetFocus) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tinputRef.current!.focus();\r\n\t}, [inputRef]);\r\n\r\n\treturn (\r\n\t\t
\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t
\r\n\t);\r\n};\r\n","import classNames from 'classnames';\r\nimport React, { FC, memo } from 'react';\r\nimport Checkbox from '../Checkbox';\r\nimport { useKeyboardNavigationListContext } from '../KeyboardNavigationList';\r\nimport { DROPDOWN_ITEM_ICON_TEST_ID, DROPDOWN_ITEM_META_TEST_ID, DROPDOWN_ITEM_TAGS_TEST_ID } from './const';\r\nimport classes from './styles/index.module.scss';\r\nimport { DropdownItemProp } from './types';\r\nimport { isMobileAny } from '../../utils/device';\r\nimport { decodeHTMLValue } from '../../utils/html';\r\n\r\nexport const DropdownListItem: FC> = memo(\r\n\t({\r\n\t\tid,\r\n\t\tvalue,\r\n\t\tdisabled,\r\n\t\ticon,\r\n\t\tmeta,\r\n\t\ttags,\r\n\t\tdefaultValueId,\r\n\t\thandleItemClick,\r\n\t\tisSelected,\r\n\t\ttrackSectionClassName,\r\n\t\tformattedValue,\r\n\t\tformattedMeta,\r\n\t\tkeyIndicator,\r\n\t\tdisabledControls,\r\n\t}) => {\r\n\t\tconst { focusedItem } = useKeyboardNavigationListContext();\r\n\t\tconst hasMeta = typeof meta === 'string' && meta.length > 0;\r\n\t\tconst hasFormattedValue = typeof formattedValue !== 'undefined';\r\n\t\tconst hasFormattedMeta = typeof formattedMeta !== 'undefined';\r\n\t\tconst hasTags = tags !== null && typeof tags !== 'undefined' && tags.length > 0;\r\n\t\tconst isKeyboardActiveItem = focusedItem && id === focusedItem.id;\r\n\t\tconst hasKeyIndicator = keyIndicator !== null && typeof keyIndicator !== 'undefined';\r\n\t\tconst itemClasses = classNames([classes.listItem], {\r\n\t\t\t[classes.listItem_desktop]: !isMobileAny,\r\n\t\t\t[classes.listItem_default]: id === defaultValueId,\r\n\t\t\t[classes.listItem_disabled]: disabled || disabledControls,\r\n\t\t\t[classes.listItem_keyboardActive]: isKeyboardActiveItem && !isMobileAny,\r\n\t\t});\r\n\r\n\t\tconst isPreviewMode = disabled;\r\n\t\tconst itemProps = {\r\n\t\t\tclassName: itemClasses,\r\n\t\t\t['aria-labelledby']: value || '',\r\n\t\t\t['data-testid']: `dropdown__item-id_${id}`,\r\n\t\t\tonClick: () => handleItemClick(id),\r\n\t\t};\r\n\r\n\t\treturn (\r\n\t\t\t
  • \r\n\t\t\t\t\r\n\t\t\t\t\t{icon && (\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{icon}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t)}\r\n\t\t\t\t\t{hasFormattedValue && formattedValue}\r\n\t\t\t\t\t{!hasFormattedValue && value}\r\n\t\t\t\t\t{hasKeyIndicator && ` (${keyIndicator})`}\r\n\t\t\t\t\t{hasMeta && (\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{hasFormattedMeta && formattedMeta}\r\n\t\t\t\t\t\t\t{!hasFormattedMeta && decodeHTMLValue(meta)}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t)}\r\n\t\t\t\t\t{hasTags && (\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{tags!.join(' • ')}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t)}\r\n\t\t\t\t\r\n\t\t\t
  • \r\n\t\t);\r\n\t},\r\n);\r\n","import React, { FC, useEffect, useRef } from 'react';\r\nimport { KeyboardNavigationList } from '../KeyboardNavigationList';\r\nimport { DropdownListItem } from './DropdownListItem';\r\nimport CustomScrollBar from '../CustomScrollBar';\r\nimport { DropdownListItemsProps } from './types';\r\nimport { DROPDOWN_ITEMS_SCROLL_TEST_ID, DROPDOWN_LIST_ITEMS_TEST_ID } from './const';\r\nimport classes from './styles/index.module.scss';\r\n\r\nconst DropdownListItems: FC> = ({\r\n\titems,\r\n\ttestId = DROPDOWN_LIST_ITEMS_TEST_ID,\r\n\tonScroll,\r\n\thasSearch,\r\n\tonItemSelect,\r\n\thasSelectedId,\r\n\thandleCloseList,\r\n\tnoItemsPlaceholder,\r\n\tlistScrollBarClasses,\r\n\ttrackSectionClassName,\r\n\tnormalizedDefaultValueId,\r\n\thandleKeyboardListItemSelect,\r\n\tdisabledControls,\r\n}) => {\r\n\tconst listRef = useRef(null);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (!hasSearch && listRef.current !== null) {\r\n\t\t\tlistRef.current.focus();\r\n\t\t}\r\n\t}, [hasSearch]);\r\n\r\n\tconst hasItems = items.length > 0;\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t{hasItems &&\r\n\t\t\t\t\titems.map((item) => {\r\n\t\t\t\t\t\tconst isSelected = hasSelectedId(item.id);\r\n\r\n\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t})}\r\n\t\t\t\t{!hasItems && noItemsPlaceholder}\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport { DropdownListItems };\r\n","import React, { FC } from 'react';\r\nimport classNames from 'classnames';\r\nimport PaddingBox from '../PaddingBox';\r\nimport { codes } from '../../data/translations';\r\nimport {\r\n\tDROPDOWN_LIST_SWITCHER_TEST_ID,\r\n\tDROPDOWN_LIST_SWITCHER_ALL_BUTTON_TEST_ID,\r\n\tDROPDOWN_LIST_SWITCHER_RECENT_BUTTON_TEST_ID,\r\n} from './const';\r\nimport { DropdownListSwitcherProps } from './types';\r\nimport { useTranslationAPI } from '../../modules/translations';\r\nimport classes from './styles/index.module.scss';\r\n\r\nconst DropdownListSwitcher: FC> = ({\r\n\tshowRecentItems,\r\n\thandleToggleRecentItems,\r\n}) => {\r\n\tconst { translate } = useTranslationAPI();\r\n\r\n\tconst leftButtonClasses = classNames(classes.dropdownListSwitcher, {\r\n\t\t[classes.dropdownListSwitcher_active]: showRecentItems,\r\n\t});\r\n\r\n\tconst rightButtonClasses = classNames(classes.dropdownListSwitcher, {\r\n\t\t[classes.dropdownListSwitcher_active]: !showRecentItems,\r\n\t});\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t handleToggleRecentItems(true)}\r\n\t\t\t\t\tclassName={leftButtonClasses}\r\n\t\t\t\t\tdata-testid={DROPDOWN_LIST_SWITCHER_RECENT_BUTTON_TEST_ID}\r\n\t\t\t\t>\r\n\t\t\t\t\t{translate(codes.common.recentItems)}\r\n\t\t\t\t\r\n\t\t\t\t handleToggleRecentItems(false)}\r\n\t\t\t\t\tclassName={rightButtonClasses}\r\n\t\t\t\t\tdata-testid={DROPDOWN_LIST_SWITCHER_ALL_BUTTON_TEST_ID}\r\n\t\t\t\t>\r\n\t\t\t\t\t{translate(codes.common.allItems)}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport { DropdownListSwitcher };\r\n","import React, { FC, useCallback, useEffect, useMemo } from 'react';\r\nimport classNames from 'classnames';\r\nimport classes from './styles/index.module.scss';\r\nimport toolsClasses from './styles/tools.module.scss';\r\nimport { codes } from '../../data/translations';\r\nimport { KeyboardNavigationListWrapperFocusTrap } from '../KeyboardNavigationList';\r\nimport { DropdownContainerProps, DropdownItemProps } from './types';\r\nimport {\r\n\tcontainerDataTestId,\r\n\tDROPDOWN_APPLY_BUTTON_TEST_ID,\r\n\tDROPDOWN_CLEAR_BUTTON_TEST_ID,\r\n\tDROPDOWN_LIST_RECENT_ITEMS_TEST_ID,\r\n\tDROPDOWN_SEARCH_HEADER_TEST_ID,\r\n} from './const';\r\nimport PaddingBox from '../PaddingBox';\r\nimport NoDataPlaceholder from '../NoDataPlaceholder';\r\nimport { useTranslationAPI } from '../../modules/translations';\r\nimport { DropdownSearchTextbox } from './DropdownSearchTextbox';\r\nimport { DropdownListItems } from './DropdownListItems';\r\nimport { DropdownListSwitcher } from './DropdownListSwitcher';\r\nimport { isNull } from '../../predicates/type';\r\nimport { Button } from '../Button';\r\n\r\nexport const DropdownContainer: FC> = ({\r\n\titems,\r\n\tcloseComponent,\r\n\tdisabledControls,\r\n\tonItemSelect,\r\n\tmultiSelect,\r\n\tonContainerScroll,\r\n\thasSearch,\r\n\tonSearchChange,\r\n\ttextBoxSearchValue,\r\n\tonSearchApply,\r\n\tisOpenByKeyboard,\r\n\tdropdownButtonRef,\r\n\thasSelectedId,\r\n\tnormalizedDefaultValueId,\r\n\thandleClearButtonClick,\r\n\ttrackSectionClassName,\r\n\tname,\r\n\trecentItems,\r\n\tshowSearchResult,\r\n\tshowRecentItems,\r\n\thandleToggleRecentItems,\r\n\thasRecentItems,\r\n}) => {\r\n\tconst { translate } = useTranslationAPI();\r\n\r\n\tconst containerClasses = classNames(classes.container, {\r\n\t\t[classes.container_multiselect]: multiSelect,\r\n\t\t[classes.container_default]: !multiSelect,\r\n\t});\r\n\r\n\tconst listScrollBarClasses = classNames(classes.listScrollBar, {\r\n\t\t[classes.listScrollBar_openByKeyboard]: isOpenByKeyboard,\r\n\t});\r\n\r\n\tconst handleKeyboardListItemSelect = useCallback(\r\n\t\t(item) => {\r\n\t\t\tonItemSelect((item as DropdownItemProps).id);\r\n\t\t},\r\n\t\t[onItemSelect],\r\n\t);\r\n\r\n\tconst handleContainerScroll = useCallback(\r\n\t\t(e) => {\r\n\t\t\t!showRecentItems && onContainerScroll && onContainerScroll(e);\r\n\t\t},\r\n\t\t[showRecentItems, onContainerScroll],\r\n\t);\r\n\r\n\tconst dynamicProps = useMemo(() => {\r\n\t\tconst _props = {};\r\n\t\tlet componentWidth = 100;\r\n\r\n\t\tif (!isNull(dropdownButtonRef.current)) {\r\n\t\t\tcomponentWidth = dropdownButtonRef.current.getBoundingClientRect().width;\r\n\t\t}\r\n\r\n\t\tif (typeof componentWidth !== 'undefined') {\r\n\t\t\t_props['style'] = {\r\n\t\t\t\twidth: `${componentWidth}px`,\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\treturn _props;\r\n\t}, [dropdownButtonRef]);\r\n\r\n\tconst handleTrap = useCallback(() => {\r\n\t\tcloseComponent();\r\n\t}, [closeComponent]);\r\n\r\n\tconst dropdownItemsCommonProps = {\r\n\t\thasSearch,\r\n\t\tonItemSelect,\r\n\t\thasSelectedId,\r\n\t\tdisabledControls,\r\n\t\thandleCloseList: closeComponent,\r\n\t\tlistScrollBarClasses,\r\n\t\ttrackSectionClassName,\r\n\t\tnormalizedDefaultValueId,\r\n\t\thandleKeyboardListItemSelect,\r\n\t\tonScroll: handleContainerScroll,\r\n\t};\r\n\r\n\tuseEffect(\r\n\t\t() => () => {\r\n\t\t\tif (dropdownButtonRef.current !== null) {\r\n\t\t\t\tdropdownButtonRef.current.focus();\r\n\t\t\t}\r\n\t\t},\r\n\t\t[dropdownButtonRef],\r\n\t);\r\n\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t{hasSearch && (\r\n\t\t\t\t\t\r\n\t\t\t\t)}\r\n\t\t\t\t{hasRecentItems && !showSearchResult && (\r\n\t\t\t\t\t\r\n\t\t\t\t)}\r\n\t\t\t\t{showSearchResult && (\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{translate(codes.common.searchResults)}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t)}\r\n\t\t\t\t{recentItems && showRecentItems && !showSearchResult && (\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{translate(codes.common.noItemsFound)}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t/>\r\n\t\t\t\t)}\r\n\t\t\t\t{(!showRecentItems || showSearchResult) && (\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t{translate(codes.common.noItemsFound)}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t/>\r\n\t\t\t\t)}\r\n\t\t\t\t{multiSelect && (\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t{translate(codes.clear)}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t closeComponent()}\r\n\t\t\t\t\t\t\ttype='button'\r\n\t\t\t\t\t\t\tdataTestId={DROPDOWN_APPLY_BUTTON_TEST_ID}\r\n\t\t\t\t\t\t\tdisabled={disabledControls}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{translate(codes.apply)}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t)}\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n","import React, { FC } from 'react';\r\nimport classes from './styles/index.module.scss';\r\nimport { HELLOFLEX_DROPDOWN_SWITCH_ICON_CLASS } from './const';\r\nimport { AngleDownSmall } from '../Icons/AngleDownSmall';\r\nimport { AngleUpSmall } from '../Icons/AngleUpSmall';\r\n\r\nconst angle = {\r\n\ttrue: AngleUpSmall,\r\n\tfalse: AngleDownSmall,\r\n};\r\n\r\ntype DropdownSwitchIconProps = {\r\n\tisOpen: boolean;\r\n};\r\n\r\nconst DropdownSwitchIcon: FC> = ({ isOpen }) => {\r\n\tconst Angle = angle[`${isOpen}`];\r\n\r\n\treturn ;\r\n};\r\n\r\nexport { DropdownSwitchIcon };\r\n","import React, { FC, useCallback, useEffect, useMemo, useRef, useState } from 'react';\r\nimport remove from 'lodash/remove';\r\nimport flow from 'lodash/flow';\r\nimport isEqual from 'lodash/isEqual';\r\nimport classNames from 'classnames';\r\nimport OverlayPosition from '../../utils/renderProps/OverlayPosition';\r\nimport merge from 'lodash/merge';\r\nimport keyBy from 'lodash/keyBy';\r\nimport lodashValues from 'lodash/values';\r\nimport { codes } from '../../data/translations';\r\nimport {\r\n\tDropdownFormattedItemProps,\r\n\tDropdownItemId,\r\n\tDropdownItemProps,\r\n\tDropdownProps,\r\n\tNormalizedValues,\r\n} from './types';\r\nimport classes from './styles/index.module.scss';\r\nimport {\r\n\tescapeRegExp,\r\n\tformatItemsByMetaAndValueSearch,\r\n\tformatItemsByValueSearch,\r\n\tgetNormalizedId,\r\n\tgetNormalizedIds,\r\n\tisKeyboardAction,\r\n\tjoinWithPipes,\r\n} from './utils';\r\nimport { useTranslationAPI } from '../../modules/translations';\r\nimport { closeActive } from './api';\r\nimport { DropdownContainer } from './DropdownContainer';\r\nimport {\r\n\tDEFAULT_DROPDOWN_TEST_ID,\r\n\tDROPDOWN_DISPLAY_VALUE_TEST_ID,\r\n\tHELLOFLEX_DROPDOWN_CLASS,\r\n\tHELLOFLEX_DROPDOWN_SWITCH_ICON_CLASS,\r\n\tItemsFilter,\r\n} from './const';\r\nimport { isUndefined } from '../../predicates/type';\r\nimport { removeExtraPipes } from '../AjaxDropdown/utils';\r\nimport { DropdownSwitchIcon } from './DropdownSwitchIcon';\r\n\r\ndeclare global {\r\n\tinterface Window {\r\n\t\t__REACT__DROPDOWN_TS: null | (() => void);\r\n\t}\r\n}\r\n\r\nconst DEFAULT_ITEMS = [];\r\nconst DEFAULT_VALUES = [];\r\n\r\nexport const Dropdown: FC> = ({\r\n\topen,\r\n\tmultiSelect,\r\n\tdisabled,\r\n\tsize,\r\n\tclassName,\r\n\tstyle,\r\n\tvalueClassName,\r\n\tvalues: valuesFromProps = DEFAULT_VALUES,\r\n\tinvalid,\r\n\tdisplayValue,\r\n\tkeysType = 'number',\r\n\tdefaultValueId = -1,\r\n\titems: itemsFromProps = DEFAULT_ITEMS,\r\n\tallItems: allItemsFromProps,\r\n\tplaceholder: placeholderFromProps,\r\n\tdataTestId = DEFAULT_DROPDOWN_TEST_ID,\r\n\thasDefaultValue,\r\n\tallowMetaSearch,\r\n\tonClose,\r\n\tonOpen,\r\n\tonMultiSelectChange,\r\n\tonContainerScroll,\r\n\tonReset,\r\n\tdisabledControls,\r\n\tonChange,\r\n\tforceChangeOnSelect,\r\n\thasSearch,\r\n\ttrackSectionClassName,\r\n\tname,\r\n\trecentItems: recentItemsFromProps,\r\n\tonAllItemsSwitch,\r\n\tselectFirstOrDefault,\r\n\tonFirstOrDefaultChange,\r\n\tonTextBoxSearchApply,\r\n\toverlayPosition,\r\n}) => {\r\n\tconst { translate } = useTranslationAPI();\r\n\tconst [searchValue, setSearchValue] = useState('');\r\n\tconst [showSearchResult, setShowSearchResult] = useState(false);\r\n\tconst [controlledTextBoxSearchValue, setControlledTextBoxSearchValue] = useState('');\r\n\tconst [internalOpen, setInternalOpen] = useState(false);\r\n\tconst [isOpenByKeyboard, setIsOpenByKeyboard] = useState(false);\r\n\tconst [itemsFilter, setItemsFilter] = useState(ItemsFilter.default);\r\n\tconst controlledOpenState = typeof open === 'undefined';\r\n\tconst isOpen = controlledOpenState ? internalOpen : open;\r\n\tconst [showRecentItems, setShowRecentItems] = useState(false);\r\n\tconst setSearchFormValue = useCallback((value) => {\r\n\t\tsetControlledTextBoxSearchValue(value);\r\n\t}, []);\r\n\tconst recentItems = useMemo(() => {\r\n\t\tif (typeof recentItemsFromProps === 'undefined') {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\treturn recentItemsFromProps.map((i) => {\r\n\t\t\tconst normalizedValue = i.value === null ? '' : i.value;\r\n\r\n\t\t\treturn {\r\n\t\t\t\t...i,\r\n\t\t\t\tid: getNormalizedId(i.id, keysType),\r\n\t\t\t\tvalue: normalizedValue,\r\n\t\t\t};\r\n\t\t});\r\n\t}, [recentItemsFromProps, keysType]);\r\n\tconst allItems = useMemo(() => {\r\n\t\tif (isUndefined(allItemsFromProps)) {\r\n\t\t\treturn allItemsFromProps;\r\n\t\t}\r\n\r\n\t\treturn allItemsFromProps.map((item) => ({\r\n\t\t\t...item,\r\n\t\t\tid: getNormalizedId(item.id, keysType),\r\n\t\t}));\r\n\t}, [allItemsFromProps, keysType]);\r\n\tconst hasRecentItems = useMemo(() => recentItems.length > 0, [recentItems]);\r\n\tconst selectedIds = useMemo(() => getNormalizedIds(valuesFromProps, keysType), [keysType, valuesFromProps]);\r\n\tconst prevIdsRef = useRef(selectedIds);\r\n\tconst selectedValueRef = useRef(null);\r\n\tconst resetSearch = useCallback(() => {\r\n\t\tsetItemsFilter(ItemsFilter.default);\r\n\t\tsetSearchValue('');\r\n\t\tsetShowSearchResult(false);\r\n\t\tsetSearchFormValue('');\r\n\t}, [setSearchFormValue]);\r\n\tconst closeComponent = useCallback(\r\n\t\t(skipMultiSelectChange?: boolean) => {\r\n\t\t\tsetIsOpenByKeyboard(false);\r\n\t\t\tresetSearch();\r\n\t\t\tsetShowRecentItems(hasRecentItems);\r\n\r\n\t\t\tif (multiSelect && !skipMultiSelectChange && !isEqual(selectedIds, prevIdsRef.current)) {\r\n\t\t\t\tonMultiSelectChange && onMultiSelectChange(selectedIds);\r\n\t\t\t}\r\n\r\n\t\t\tif (controlledOpenState) {\r\n\t\t\t\tsetInternalOpen(false);\r\n\t\t\t}\r\n\r\n\t\t\treturn new Promise((resolve) => {\r\n\t\t\t\tonClose && onClose();\r\n\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\twindow.__REACT__DROPDOWN_TS = null;\r\n\t\t\t\t\tresolve(skipMultiSelectChange);\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t},\r\n\t\t[controlledOpenState, multiSelect, onClose, onMultiSelectChange, resetSearch, selectedIds, hasRecentItems],\r\n\t);\r\n\tconst closeComponentRef = useRef(closeComponent);\r\n\tconst openComponent = useCallback(() => {\r\n\t\tcloseActive();\r\n\t\tprevIdsRef.current = selectedIds;\r\n\r\n\t\tif (controlledOpenState) {\r\n\t\t\tsetInternalOpen(true);\r\n\t\t} else {\r\n\t\t\tonOpen && onOpen();\r\n\t\t}\r\n\t}, [onOpen, prevIdsRef, controlledOpenState, selectedIds]);\r\n\tconst handleValueWrapperClick = useCallback(\r\n\t\tasync (e) => {\r\n\t\t\tif (disabled) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (isOpen) {\r\n\t\t\t\tsetIsOpenByKeyboard(false);\r\n\t\t\t\tawait closeComponent();\r\n\t\t\t} else {\r\n\t\t\t\tsetIsOpenByKeyboard(isKeyboardAction(e));\r\n\t\t\t\topenComponent();\r\n\t\t\t}\r\n\t\t},\r\n\t\t[disabled, setIsOpenByKeyboard, isOpen, closeComponent, openComponent],\r\n\t);\r\n\tconst normalizedDefaultValueId = useMemo(() => {\r\n\t\treturn getNormalizedId(defaultValueId, keysType);\r\n\t}, [defaultValueId, keysType]);\r\n\tconst items = useMemo(\r\n\t\t() =>\r\n\t\t\titemsFromProps.map((i) => {\r\n\t\t\t\tconst normalizedValue = i.value === null ? '' : i.value;\r\n\r\n\t\t\t\treturn {\r\n\t\t\t\t\t...i,\r\n\t\t\t\t\tid: getNormalizedId(i.id, keysType),\r\n\t\t\t\t\tvalue: normalizedValue,\r\n\t\t\t\t};\r\n\t\t\t}),\r\n\t\t[itemsFromProps, keysType],\r\n\t);\r\n\tconst defaultItem = useMemo(() => {\r\n\t\tconst selectTranslation = translate(codes.select);\r\n\r\n\t\treturn {\r\n\t\t\tvalue: selectTranslation,\r\n\t\t\tdisabled: false,\r\n\t\t\tid: normalizedDefaultValueId,\r\n\t\t};\r\n\t}, [translate, normalizedDefaultValueId]);\r\n\r\n\tconst getItem = useCallback(\r\n\t\t(id: DropdownItemId) => {\r\n\t\t\tif (id === normalizedDefaultValueId) {\r\n\t\t\t\treturn defaultItem;\r\n\t\t\t} else {\r\n\t\t\t\tid = getNormalizedId(id, keysType);\r\n\t\t\t\tconst itemsForSearch = merge(keyBy(allItems || [], 'id'), keyBy(items, 'id'), keyBy(recentItems, 'id'));\r\n\r\n\t\t\t\tconst item = lodashValues(itemsForSearch).find((item) => {\r\n\t\t\t\t\treturn getNormalizedId(item.id, keysType) === id;\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn typeof item === 'undefined' ? null : item;\r\n\t\t\t}\r\n\t\t},\r\n\t\t[normalizedDefaultValueId, defaultItem, keysType, allItems, items, recentItems],\r\n\t);\r\n\r\n\tconst filteredItems = useMemo>(() => {\r\n\t\tif (items.length === 0) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tconst newItems = hasDefaultValue ? [defaultItem] : [];\r\n\r\n\t\tswitch (itemsFilter) {\r\n\t\t\tcase ItemsFilter.search: {\r\n\t\t\t\tconst result = allowMetaSearch\r\n\t\t\t\t\t? formatItemsByMetaAndValueSearch(items, searchValue)\r\n\t\t\t\t\t: formatItemsByValueSearch(items, searchValue);\r\n\t\t\t\treturn newItems.concat(result);\r\n\t\t\t}\r\n\r\n\t\t\tdefault:\r\n\t\t\t\treturn newItems.concat(items);\r\n\t\t}\r\n\t}, [defaultItem, hasDefaultValue, items, allowMetaSearch, itemsFilter, searchValue]);\r\n\tconst componentButtonRef = useRef(null);\r\n\r\n\tconst selected = selectedIds.length > 0;\r\n\tconst componentClasses = classNames(\r\n\t\tclasses.dropdown,\r\n\t\tHELLOFLEX_DROPDOWN_CLASS,\r\n\t\tclasses.valueWrapper,\r\n\t\t{\r\n\t\t\t// [classes.dropdown_focus]: this.isOpen,\r\n\t\t\t[classes.dropdown_multiselect]: multiSelect,\r\n\t\t\t[classes.dropdown_default]: !multiSelect,\r\n\t\t\t[classes.dropdown_disabled]: disabled,\r\n\t\t\t[classes.dropdown_small]: size === 'small',\r\n\t\t\t[classes.dropdown_medium]: size === 'medium',\r\n\t\t\t[classes.dropdown_large]: size === 'large',\r\n\t\t},\r\n\t\tclassName,\r\n\t);\r\n\r\n\tconst itemIcon = useMemo(() => {\r\n\t\tif (selected) {\r\n\t\t\tconst item = getItem(selectedIds[0]);\r\n\r\n\t\t\treturn item && item.icon ? item.icon : null;\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}, [selected, getItem, selectedIds]);\r\n\tconst dropdownValueClasses = classNames(\r\n\t\tclasses.value,\r\n\t\t{\r\n\t\t\t[classes.value_hasValue]: selected,\r\n\t\t\t[classes.dropdown_invalid]: invalid,\r\n\t\t},\r\n\t\tvalueClassName,\r\n\t);\r\n\r\n\t/**\r\n\t * Calculated dropdown title & display value\r\n\t */\r\n\tconst formattedValue = useMemo(() => {\r\n\t\tif (!selected) {\r\n\t\t\tselectedValueRef.current = placeholderFromProps || translate(codes.select);\r\n\r\n\t\t\treturn selectedValueRef.current;\r\n\t\t}\r\n\r\n\t\tlet value: string;\r\n\t\tconst availableValues: Array = [];\r\n\r\n\t\tselectedIds.forEach((id) => {\r\n\t\t\tconst item = getItem(id);\r\n\r\n\t\t\tif (item !== null && item.value !== null) {\r\n\t\t\t\tavailableValues.push(item.value);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif (availableValues.length >= selectedIds.length) {\r\n\t\t\tvalue = joinWithPipes(availableValues);\r\n\t\t} else if (displayValue && Array.isArray(allItems) && allItems.length > 0) {\r\n\t\t\t// workaround for display value to be built properly when it is passed via props\r\n\t\t\t// and initial selected values are missing in allItems (cached items)\r\n\r\n\t\t\t// WARNING: Might lead to unexpected behavior when there are multiple items with the same value\r\n\t\t\tconst nonRepeatingValues = availableValues.filter((value) => {\r\n\t\t\t\tconst includesRegex = new RegExp('(?:^|\\\\| +)' + escapeRegExp(value) + '(?:$| +\\\\|)');\r\n\t\t\t\tconst match = displayValue.match(includesRegex);\r\n\r\n\t\t\t\treturn !match;\r\n\t\t\t});\r\n\r\n\t\t\tconst normalizeDisplayValue = flow(joinWithPipes, removeExtraPipes);\r\n\r\n\t\t\tvalue = normalizeDisplayValue([displayValue, ...nonRepeatingValues]);\r\n\t\t} else {\r\n\t\t\tvalue = displayValue || '';\r\n\t\t}\r\n\r\n\t\tif (value) {\r\n\t\t\tselectedValueRef.current = value;\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}, [selected, selectedIds, getItem, displayValue, placeholderFromProps, translate, allItems]);\r\n\tconst hasSelectedId = useCallback(\r\n\t\t(id: DropdownItemId) => {\r\n\t\t\tid = getNormalizedId(id, keysType);\r\n\t\t\tconst item = selectedIds.find((itemId) => getNormalizedId(itemId, keysType) === id);\r\n\r\n\t\t\treturn typeof item !== 'undefined';\r\n\t\t},\r\n\t\t[keysType, selectedIds],\r\n\t);\r\n\tconst toggleItem = useCallback(\r\n\t\t(id) => {\r\n\t\t\tconst normalizedId = getNormalizedId(id, keysType);\r\n\t\t\tconst isIdSelected = hasSelectedId(normalizedId);\r\n\r\n\t\t\tif (!forceChangeOnSelect && (isIdSelected || (!selected && normalizedId === normalizedDefaultValueId))) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tconst selectedValue = !isIdSelected && normalizedId !== normalizedDefaultValueId ? normalizedId : null;\r\n\r\n\t\t\tonChange && onChange(selectedValue, { originalId: normalizedId });\r\n\t\t},\r\n\t\t[forceChangeOnSelect, hasSelectedId, keysType, normalizedDefaultValueId, onChange, selected],\r\n\t);\r\n\tconst toggleMultiselectItem = useCallback(\r\n\t\t(id: DropdownItemId, on: boolean) => {\r\n\t\t\tlet newValues: NormalizedValues = [];\r\n\r\n\t\t\tif (id !== normalizedDefaultValueId) {\r\n\t\t\t\tnewValues = [...selectedIds];\r\n\r\n\t\t\t\tif (on) {\r\n\t\t\t\t\tnewValues.push(id);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tremove(newValues, (itemId) => getNormalizedId(itemId, keysType) === id);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tonChange && onChange(newValues);\r\n\t\t},\r\n\t\t[keysType, normalizedDefaultValueId, onChange, selectedIds],\r\n\t);\r\n\tconst handleItemSelect = useCallback(\r\n\t\tasync (selectedId: DropdownItemId) => {\r\n\t\t\tif (disabledControls || getItem(selectedId)?.disabled) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (multiSelect) {\r\n\t\t\t\tconst isIdSelected = hasSelectedId(selectedId);\r\n\r\n\t\t\t\ttoggleMultiselectItem(selectedId, !isIdSelected);\r\n\t\t\t} else {\r\n\t\t\t\ttoggleItem(selectedId);\r\n\t\t\t\tawait closeComponent();\r\n\t\t\t}\r\n\t\t},\r\n\t\t[disabledControls, getItem, multiSelect, hasSelectedId, toggleMultiselectItem, toggleItem, closeComponent],\r\n\t);\r\n\r\n\tconst handleSearchApply = useCallback(\r\n\t\tasync (staticValue: string) => {\r\n\t\t\tfunction handleValue(value: unknown) {\r\n\t\t\t\tconst isSearchFilter = typeof value === 'string' && value.length > 0;\r\n\r\n\t\t\t\tsetItemsFilter(isSearchFilter ? ItemsFilter.search : ItemsFilter.default);\r\n\t\t\t\tsetSearchValue(typeof value === 'string' ? value : '');\r\n\t\t\t\tsetShowSearchResult(typeof value === 'string' && value !== '');\r\n\t\t\t}\r\n\r\n\t\t\tif (!isUndefined(onTextBoxSearchApply)) {\r\n\t\t\t\tawait onTextBoxSearchApply(staticValue);\r\n\t\t\t}\r\n\r\n\t\t\thandleValue(staticValue);\r\n\t\t},\r\n\t\t[onTextBoxSearchApply],\r\n\t);\r\n\r\n\tconst handleToggleRecentItems = useCallback(\r\n\t\t(show: boolean) => {\r\n\t\t\tsetShowRecentItems(show);\r\n\r\n\t\t\tif (!show) {\r\n\t\t\t\tonAllItemsSwitch && onAllItemsSwitch();\r\n\t\t\t}\r\n\t\t},\r\n\t\t[onAllItemsSwitch],\r\n\t);\r\n\r\n\tconst reset = useCallback(() => {\r\n\t\tonReset && onReset();\r\n\t\tonChange && onChange(multiSelect ? [] : null);\r\n\r\n\t\tif (multiSelect && typeof onMultiSelectChange !== 'undefined') {\r\n\t\t\tonMultiSelectChange([]);\r\n\t\t}\r\n\t}, [multiSelect, onChange, onMultiSelectChange, onReset]);\r\n\tconst handleClearButtonClick = useCallback(async () => {\r\n\t\tif (prevIdsRef.current.length > 0) {\r\n\t\t\treset();\r\n\t\t} else {\r\n\t\t\tonChange && onChange(multiSelect ? [] : null);\r\n\t\t}\r\n\r\n\t\tawait closeComponent(true);\r\n\t}, [closeComponent, reset, onChange, multiSelect]);\r\n\tconst dropdownContainerComponent = useMemo(() => {\r\n\t\treturn () => (\r\n\t\t\t\r\n\t\t);\r\n\t}, [\r\n\t\tfilteredItems,\r\n\t\tcloseComponent,\r\n\t\tdisabledControls,\r\n\t\thandleItemSelect,\r\n\t\tmultiSelect,\r\n\t\tonContainerScroll,\r\n\t\thasSearch,\r\n\t\tsetSearchFormValue,\r\n\t\thandleSearchApply,\r\n\t\tisOpenByKeyboard,\r\n\t\thasSelectedId,\r\n\t\tnormalizedDefaultValueId,\r\n\t\thandleClearButtonClick,\r\n\t\ttrackSectionClassName,\r\n\t\tcontrolledTextBoxSearchValue,\r\n\t\tname,\r\n\t\trecentItems,\r\n\t\tshowSearchResult,\r\n\t\tshowRecentItems,\r\n\t\thandleToggleRecentItems,\r\n\t\thasRecentItems,\r\n\t]);\r\n\r\n\tuseEffect(() => {\r\n\t\tsetShowRecentItems(hasRecentItems);\r\n\t}, [hasRecentItems]);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (isOpen) {\r\n\t\t\tcloseComponentRef.current = closeComponent;\r\n\t\t\twindow.__REACT__DROPDOWN_TS = closeComponent;\r\n\t\t}\r\n\t}, [closeComponent, isOpen]);\r\n\r\n\tuseEffect(\r\n\t\t() => () => {\r\n\t\t\tif (\r\n\t\t\t\ttypeof window.__REACT__DROPDOWN_TS === 'function' &&\r\n\t\t\t\tcloseComponentRef.current === window.__REACT__DROPDOWN_TS\r\n\t\t\t) {\r\n\t\t\t\twindow.__REACT__DROPDOWN_TS = null;\r\n\t\t\t}\r\n\t\t},\r\n\t\t[],\r\n\t);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (selectFirstOrDefault && items.length > 0) {\r\n\t\t\tonFirstOrDefaultChange && onFirstOrDefaultChange(items[0].id);\r\n\t\t}\r\n\t}, [selectFirstOrDefault, items, onFirstOrDefaultChange]);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t{itemIcon !== null &&
    {itemIcon}
    }\r\n\t\t\t\t\t{formattedValue}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\r\n\t\t\t{isOpen && (\r\n\t\t\t\t\r\n\t\t\t)}\r\n\t\t\r\n\t);\r\n};\r\n\r\nDropdown.displayName = 'Dropdown';\r\n\r\ndocument.body.addEventListener('click', (e: MouseEvent) => {\r\n\tif (typeof window.__REACT__DROPDOWN_TS === 'function') {\r\n\t\tconst target = e.target as HTMLElement;\r\n\r\n\t\tconst isDropdown =\r\n\t\t\ttarget.classList.contains(classes.container) ||\r\n\t\t\ttarget.closest(`.${classes.container}`) !== null ||\r\n\t\t\ttarget.classList.contains(classes.dropdown) ||\r\n\t\t\ttarget.closest(`.${classes.dropdown}`) !== null ||\r\n\t\t\ttarget.closest(`.${HELLOFLEX_DROPDOWN_SWITCH_ICON_CLASS}`) !== null;\r\n\r\n\t\tif (isDropdown) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tcloseActive();\r\n\t}\r\n});\r\n","export const HELLOFLEX_DROPDOWN_CLASS = 'helloflex-dropdown';\r\nexport const HELLOFLEX_DROPDOWN_SWITCH_ICON_CLASS = 'dropdown-switch-icon';\r\nexport const TAGS_SEPARATOR = '•';\r\nexport const selectedKeyAttribute = 'data-selected-id';\r\nexport const containerDataTestId = 'dropdown__container';\r\nexport const DEFAULT_DROPDOWN_TEST_ID = 'dropdown';\r\nexport const DROPDOWN_LIST_ITEMS_TEST_ID = 'dropdown__list-items';\r\nexport const DROPDOWN_LIST_RECENT_ITEMS_TEST_ID = 'dropdown__list-recent-items';\r\nexport const DROPDOWN_LIST_SWITCHER_TEST_ID = 'dropdown__list-switcher';\r\nexport const DROPDOWN_LIST_SWITCHER_ALL_BUTTON_TEST_ID = 'dropdown__list-switcher_all-button';\r\nexport const DROPDOWN_LIST_SWITCHER_RECENT_BUTTON_TEST_ID = 'dropdown__list-switcher_recent-button';\r\nexport const DROPDOWN_ITEM_TEST_ID = 'dropdown__item-id_';\r\nexport const DROPDOWN_ITEM_META_TEST_ID = 'dropdown__item_meta';\r\nexport const DROPDOWN_ITEM_ICON_TEST_ID = 'dropdown__item_icon';\r\nexport const DROPDOWN_ITEM_TAGS_TEST_ID = 'dropdown__item_tags';\r\nexport const DROPDOWN_CLEAR_BUTTON_TEST_ID = 'dropdown__clear-btn';\r\nexport const DROPDOWN_APPLY_BUTTON_TEST_ID = 'dropdown__apply-btn';\r\nexport const DROPDOWN_DISPLAY_VALUE_TEST_ID = 'dropdown__display-value';\r\nexport const DROPDOWN_SEARCH_INPUT_TEST_ID = 'dropdown__search-input';\r\nexport const DROPDOWN_SEARCH_BUTTON_TEST_ID = 'dropdown__search-button';\r\nexport const DROPDOWN_ITEMS_SCROLL_TEST_ID = 'dropdown__items-scroll';\r\nexport const DROPDOWN_SEARCH_HEADER_TEST_ID = 'dropdown__search-header';\r\nexport const DROPDOWN_LIST_ALL_BUTTON_TEST_ID = 'dropdown__list-switcher_all-button';\r\nexport const RECENT_ITEMS_QUANTITY = 5;\r\n\r\nexport enum ItemsFilter {\r\n\tdefault,\r\n\tsearch,\r\n}\r\n","import React from 'react';\r\nimport {\r\n\tDropdownItemId,\r\n\tDropdownItemsProps,\r\n\tFormattableItem,\r\n\tFormattedItem,\r\n\tKeysType,\r\n\tNormalizedValues,\r\n\tValuesFromProps,\r\n} from './types';\r\nimport Typography from '../Typography';\r\nimport { isUndefined } from '../../predicates/type';\r\nimport { decodeHTMLValue } from '../../utils/html';\r\n\r\nexport const getNormalizedIds = (value: ValuesFromProps, keysType: KeysType): NormalizedValues => {\r\n\tif (value === null) {\r\n\t\treturn [];\r\n\t}\r\n\r\n\t// noinspection JSDeprecatedSymbols\r\n\tif (Array.isArray(value)) {\r\n\t\t// some shit with WebStorm IDE happened, so I gonna skip it, fuck you buggy deprecated isArray symbol\r\n\t\t// eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n\t\t// @ts-ignore\r\n\t\treturn value.map((i) => getNormalizedId(i, keysType));\r\n\t}\r\n\r\n\tswitch (typeof value) {\r\n\t\tcase 'string':\r\n\t\t\tif (value.length === 0) {\r\n\t\t\t\treturn [];\r\n\t\t\t}\r\n\r\n\t\t\treturn value.split(',');\r\n\t\tcase 'number':\r\n\t\t\treturn [Number(value)];\r\n\r\n\t\tcase 'boolean':\r\n\t\t\treturn [String(value)];\r\n\r\n\t\tdefault:\r\n\t\t\treturn [];\r\n\t}\r\n};\r\n\r\nexport function getNormalizedId(id: DropdownItemId, keysType: KeysType): DropdownItemId {\r\n\tswitch (keysType) {\r\n\t\tcase 'string':\r\n\t\t\treturn String(id).toLowerCase();\r\n\t\tcase 'stringSensitive':\r\n\t\t\treturn String(id);\r\n\r\n\t\tdefault:\r\n\t\t\treturn Number(id);\r\n\t}\r\n}\r\n\r\nfunction getHighlightedValue(value, startIndex, endIndex) {\r\n\tconst targetValue = value.slice(startIndex, endIndex);\r\n\r\n\treturn {targetValue};\r\n}\r\n\r\nfunction getStartIndex(value, searchValue) {\r\n\treturn value.toLowerCase().indexOf(searchValue.toLowerCase());\r\n}\r\n\r\nexport function getSearchItemValue(value, searchValue) {\r\n\tconst startIndex = getStartIndex(value, searchValue);\r\n\r\n\tconst endIndex = startIndex + searchValue.length;\r\n\tconst leftValue = value.slice(0, startIndex);\r\n\tconst rightValue = value.slice(endIndex);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{leftValue}\r\n\t\t\t{getHighlightedValue(value, startIndex, endIndex)}\r\n\t\t\t{rightValue}\r\n\t\t\r\n\t);\r\n}\r\n\r\nexport function formatItemsByValueSearch(\r\n\titems: Array,\r\n\tsearchValue: string,\r\n): Array {\r\n\tconst newItems: Array = [];\r\n\tsearchValue = searchValue.toLowerCase();\r\n\r\n\titems.forEach((item) => {\r\n\t\tconst value = item.value === null ? '' : item.value;\r\n\r\n\t\tconst containValue = value.toLowerCase().indexOf(searchValue) !== -1;\r\n\r\n\t\tif (!containValue) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst formattedValue = getSearchItemValue(value, searchValue);\r\n\r\n\t\tnewItems.push({\r\n\t\t\t...item,\r\n\t\t\tformattedValue,\r\n\t\t});\r\n\t});\r\n\r\n\treturn newItems;\r\n}\r\n\r\nexport function formatItemsByMetaAndValueSearch(\r\n\titems: Array,\r\n\tsearchValue: string,\r\n): Array {\r\n\tconst newItems: Array = [];\r\n\tsearchValue = searchValue.toLowerCase();\r\n\r\n\titems.forEach((item) => {\r\n\t\tconst newItem: FormattedItem & T = { ...item };\r\n\t\tconst value = item.value === null ? '' : item.value;\r\n\t\tconst metaValue = typeof item.meta !== 'undefined' && item.meta !== null ? item.meta : '';\r\n\r\n\t\tconst containValue = value.toLowerCase().indexOf(searchValue) !== -1;\r\n\t\tconst containMetaValue = metaValue.toLowerCase().indexOf(searchValue) !== -1;\r\n\r\n\t\tif (!containValue && !containMetaValue) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (containValue) {\r\n\t\t\tnewItem.formattedValue = getSearchItemValue(value, searchValue);\r\n\t\t}\r\n\r\n\t\tif (containMetaValue) {\r\n\t\t\tnewItem.formattedMeta = getSearchItemValue(decodeHTMLValue(metaValue), searchValue);\r\n\t\t}\r\n\r\n\t\tnewItems.push(newItem);\r\n\t});\r\n\r\n\treturn newItems;\r\n}\r\n\r\nexport function isKeyboardAction(e: MouseEvent) {\r\n\treturn !(e.clientX > 0 || e.clientY > 0);\r\n}\r\n\r\nexport function mergeItems(oldItems: DropdownItemsProps, nextItems: DropdownItemsProps): DropdownItemsProps {\r\n\treturn oldItems.reduce((memo, oldItem) => {\r\n\t\tconst existedNewItem = memo.find((searchItem) => searchItem.id === oldItem.id);\r\n\r\n\t\treturn isUndefined(existedNewItem) ? [...memo, oldItem] : memo;\r\n\t}, nextItems);\r\n}\r\n\r\nexport const joinWithPipes = (values: string[]) => values.join(' | ');\r\n\r\n/**\r\n * Escapes special characters in a string for use in a regular expression.\r\n */\r\nexport const escapeRegExp = (string) => string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\r\n","import React, { forwardRef, useCallback, useMemo } from 'react';\r\nimport { useKeyboardNavigationList } from './hooks';\r\nimport { KeyboardNavigationListProps } from './types';\r\nimport { KeyboardNavigationListContext } from './const';\r\n\r\nconst KeyboardNavigationList = forwardRef(\r\n\t(\r\n\t\t{\r\n\t\t\titems,\r\n\t\t\ttestId,\r\n\t\t\thandleCloseList,\r\n\t\t\thandleKeyboardListItemSelect,\r\n\t\t\tisFetchingItems,\r\n\t\t\ttagName = 'ul',\r\n\t\t\tchildren,\r\n\t\t\t...props\r\n\t\t},\r\n\t\tref,\r\n\t) => {\r\n\t\tconst { focusedItem, handleListKeyDown, handleListMouseMove, setFocusOnFirstItem } = useKeyboardNavigationList({\r\n\t\t\titems,\r\n\t\t\thandleCloseList,\r\n\t\t\thandleKeyboardListItemSelect,\r\n\t\t\tisFetchingItems,\r\n\t\t});\r\n\r\n\t\tconst providerValue = useMemo(() => {\r\n\t\t\treturn {\r\n\t\t\t\tfocusedItem,\r\n\t\t\t};\r\n\t\t}, [focusedItem]);\r\n\r\n\t\tconst TagName = tagName;\r\n\r\n\t\tconst handleFocus = useCallback(\r\n\t\t\t(e) => {\r\n\t\t\t\tconst isFocusedOnListContainer = ref !== null && 'current' in ref && ref.current === e.target;\r\n\r\n\t\t\t\tif (isFocusedOnListContainer) {\r\n\t\t\t\t\tsetFocusOnFirstItem();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t[ref, setFocusOnFirstItem],\r\n\t\t);\r\n\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t{\r\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n\t\t\t\t\t// @ts-ignore\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t{children}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t);\r\n\t},\r\n);\r\n\r\nexport { KeyboardNavigationList };\r\n","import React, { FC, useCallback } from 'react';\r\nimport { KeyboardNavigationListProviderProps } from './types';\r\n\r\nconst KeyboardNavigationListWrapper: FC> = ({\r\n\tchildren,\r\n\thandleCloseList,\r\n}) => {\r\n\tconst handleContainerListKeyDown = useCallback(\r\n\t\t(event: React.KeyboardEvent) => {\r\n\t\t\tevent.persist();\r\n\t\t\tconst { key } = event;\r\n\r\n\t\t\t// Allow default behaviour (TAB navigation).\r\n\t\t\tif (key === 'Tab') return;\r\n\r\n\t\t\tevent.stopPropagation();\r\n\t\t\tevent.nativeEvent.stopImmediatePropagation();\r\n\r\n\t\t\tif (key === 'Escape') {\r\n\t\t\t\treturn handleCloseList();\r\n\t\t\t}\r\n\t\t},\r\n\t\t[handleCloseList],\r\n\t);\r\n\r\n\treturn
    {children}
    ;\r\n};\r\n\r\nexport { KeyboardNavigationListWrapper };\r\n","import React, { FC } from 'react';\r\nimport { FocusTrap } from '../FocusTrap';\r\nimport { KeyboardNavigationListWrapper } from './KeyboardNavigationListWrapper';\r\nimport { KeyboardNavigationListWithFocusTrapProps } from './types';\r\n\r\nconst KeyboardNavigationListWrapperFocusTrap: FC> = ({\r\n\tchildren,\r\n\thasAutoFocus,\r\n\thandleCloseList,\r\n\tisFocusTrapEnabled = true,\r\n\thandleFocusOnTopTrap,\r\n\thandleFocusOnBottomTrap,\r\n}) => {\r\n\treturn (\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t{children}\r\n\t\t\t\r\n\t\t\r\n\t);\r\n};\r\n\r\nexport { KeyboardNavigationListWrapperFocusTrap };\r\n","import { createContext } from 'react';\r\nimport { KeyboardNavigationListContextProps } from './types';\r\n\r\nexport const KeyboardNavigationListContext = createContext({\r\n\tfocusedItem: null,\r\n});\r\n","import React, { useCallback, useEffect, useLayoutEffect, useRef, useState, useContext } from 'react';\r\nimport { KeyboardNavigationListContext } from './const';\r\nimport { useKeyboardNavigationListParams, Item } from './types';\r\n\r\nexport const useKeyboardNavigationListContext = () => {\r\n\tconst context = useContext(KeyboardNavigationListContext);\r\n\r\n\tif (context === undefined) {\r\n\t\tthrow new Error('useKeyboardNavigationListContext must be used within a KeyboardNavigationListProvider');\r\n\t}\r\n\r\n\treturn context;\r\n};\r\n\r\nexport const useKeyboardNavigationList = ({\r\n\titems,\r\n\tisFetchingItems = false,\r\n\thandleCloseList,\r\n\thandleKeyboardListItemSelect,\r\n}: useKeyboardNavigationListParams) => {\r\n\tconst currentListItemRef = useRef(null);\r\n\tconst [focusedIndex, setFocusedIndex] = useState(-1);\r\n\tconst [focusedItem, setFocusedItem] = useState(null);\r\n\r\n\tconst setCurrentListItemRef = useCallback((element: Element) => {\r\n\t\tcurrentListItemRef.current = element;\r\n\t}, []);\r\n\r\n\tconst resetCurrentListItemRef = useCallback(() => {\r\n\t\tcurrentListItemRef.current = null;\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\treturn () => {\r\n\t\t\tresetCurrentListItemRef();\r\n\t\t};\r\n\t}, [resetCurrentListItemRef]);\r\n\r\n\tuseLayoutEffect(() => {\r\n\t\tif (currentListItemRef.current) {\r\n\t\t\tcurrentListItemRef.current.scrollIntoView({\r\n\t\t\t\tbehavior: 'smooth',\r\n\t\t\t\tblock: 'end',\r\n\t\t\t});\r\n\t\t}\r\n\t}, [focusedIndex]);\r\n\r\n\tconst setFocusOnFirstItem = useCallback(() => {\r\n\t\tif (items.length > 0 && items[0]) {\r\n\t\t\tsetFocusedIndex(0);\r\n\t\t\tsetFocusedItem(items[0]);\r\n\t\t}\r\n\t}, [items, setFocusedIndex, setFocusedItem]);\r\n\r\n\tconst resetFocus = useCallback(() => {\r\n\t\tsetFocusedIndex(-1);\r\n\t\tsetFocusedItem(null);\r\n\t\tresetCurrentListItemRef();\r\n\t}, [setFocusedIndex, setFocusedItem, resetCurrentListItemRef]);\r\n\r\n\tconst setListNavigationData = useCallback(\r\n\t\t(index: number, listItemElement: Element | null) => {\r\n\t\t\tif (listItemElement) {\r\n\t\t\t\tsetCurrentListItemRef(listItemElement);\r\n\t\t\t} else {\r\n\t\t\t\tresetCurrentListItemRef();\r\n\t\t\t}\r\n\r\n\t\t\tsetFocusedItem(items[index]);\r\n\t\t\treturn setFocusedIndex(index);\r\n\t\t},\r\n\t\t[items, setCurrentListItemRef, resetCurrentListItemRef],\r\n\t);\r\n\r\n\tconst getNextNotDisabledItemIndex = useCallback(\r\n\t\t(index: number) => {\r\n\t\t\tif (items[index]?.disabled) {\r\n\t\t\t\tconst nextIndex = index + 1;\r\n\r\n\t\t\t\treturn getNextNotDisabledItemIndex(nextIndex);\r\n\t\t\t}\r\n\r\n\t\t\treturn index;\r\n\t\t},\r\n\t\t[items],\r\n\t);\r\n\r\n\tconst getPreviousNotDisabledItemIndex = useCallback(\r\n\t\t(index: number) => {\r\n\t\t\tif (items[index]?.disabled) {\r\n\t\t\t\tconst previousIndex = index - 1;\r\n\r\n\t\t\t\treturn getPreviousNotDisabledItemIndex(previousIndex);\r\n\t\t\t}\r\n\r\n\t\t\treturn index;\r\n\t\t},\r\n\t\t[items],\r\n\t);\r\n\r\n\tconst isSpaceBar = useCallback((key: string): boolean => {\r\n\t\treturn key === 'Spacebar' || key === ' ';\r\n\t}, []);\r\n\r\n\tconst handleContainerListKeyDown = useCallback(\r\n\t\t(event: React.KeyboardEvent) => {\r\n\t\t\tevent.persist();\r\n\t\t\tconst { key } = event;\r\n\r\n\t\t\t// Allow default behaviour (TAB navigation).\r\n\t\t\tif (key === 'Tab') return;\r\n\r\n\t\t\tevent.stopPropagation();\r\n\t\t\tevent.nativeEvent.stopImmediatePropagation();\r\n\r\n\t\t\tif (key === 'Escape') {\r\n\t\t\t\treturn handleCloseList();\r\n\t\t\t}\r\n\t\t},\r\n\t\t[handleCloseList],\r\n\t);\r\n\r\n\tconst handleListKeyDown = useCallback(\r\n\t\t(event: React.KeyboardEvent) => {\r\n\t\t\tevent.persist();\r\n\t\t\tconst { key, currentTarget } = event;\r\n\r\n\t\t\t// Allow default behaviour (TAB navigation).\r\n\t\t\tif (key === 'Tab') {\r\n\t\t\t\treturn resetFocus();\r\n\t\t\t}\r\n\r\n\t\t\tevent.preventDefault();\r\n\t\t\tevent.stopPropagation();\r\n\t\t\tevent.nativeEvent.stopImmediatePropagation();\r\n\r\n\t\t\tif (key === 'Escape') {\r\n\t\t\t\treturn handleCloseList();\r\n\t\t\t}\r\n\r\n\t\t\tif (key === 'Home') {\r\n\t\t\t\tif (focusedIndex !== 0) {\r\n\t\t\t\t\treturn setListNavigationData(0, currentTarget.firstElementChild);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (key === 'End') {\r\n\t\t\t\tif (focusedIndex !== items.length - 1) {\r\n\t\t\t\t\treturn setListNavigationData(items.length - 1, currentTarget.lastElementChild);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (key === 'ArrowDown' || key === 'PageDown') {\r\n\t\t\t\tif ((focusedIndex === -1 || focusedIndex === items.length - 1) && !isFetchingItems) {\r\n\t\t\t\t\treturn setListNavigationData(0, currentTarget.firstElementChild);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst newIndex = getNextNotDisabledItemIndex(focusedIndex + 1);\r\n\r\n\t\t\t\tif (items[newIndex]) {\r\n\t\t\t\t\treturn setListNavigationData(newIndex, currentTarget.children[newIndex]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (key === 'ArrowUp' || key === 'PageUp') {\r\n\t\t\t\tif (focusedIndex === -1 || focusedIndex === 0) {\r\n\t\t\t\t\treturn setListNavigationData(items.length - 1, currentTarget.lastElementChild);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst newIndex = getPreviousNotDisabledItemIndex(focusedIndex - 1);\r\n\r\n\t\t\t\tif (items[newIndex]) {\r\n\t\t\t\t\treturn setListNavigationData(newIndex, currentTarget.children[newIndex]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ((key === 'Enter' || isSpaceBar(key)) && items[focusedIndex]) {\r\n\t\t\t\thandleKeyboardListItemSelect(items[focusedIndex]);\r\n\t\t\t}\r\n\t\t},\r\n\t\t[\r\n\t\t\titems,\r\n\t\t\tisSpaceBar,\r\n\t\t\tresetFocus,\r\n\t\t\tfocusedIndex,\r\n\t\t\tisFetchingItems,\r\n\t\t\thandleCloseList,\r\n\t\t\tsetListNavigationData,\r\n\t\t\thandleKeyboardListItemSelect,\r\n\t\t\tgetNextNotDisabledItemIndex,\r\n\t\t\tgetPreviousNotDisabledItemIndex,\r\n\t\t],\r\n\t);\r\n\r\n\tconst handleListMouseMove = useCallback(() => {\r\n\t\tif (focusedIndex !== -1) {\r\n\t\t\tresetFocus();\r\n\t\t}\r\n\t}, [resetFocus, focusedIndex]);\r\n\r\n\treturn {\r\n\t\tfocusedItem,\r\n\t\thandleListKeyDown,\r\n\t\thandleListMouseMove,\r\n\t\tsetFocusOnFirstItem,\r\n\t\thandleContainerListKeyDown,\r\n\t};\r\n};\r\n","function decodeHTMLValue(encodedString: string) {\r\n\tconst textarea = document.createElement('textarea');\r\n\ttextarea.innerHTML = encodedString;\r\n\r\n\treturn textarea.value;\r\n}\r\n\r\nexport { decodeHTMLValue };\r\n","// extracted by mini-css-extract-plugin\nexport default {\"searchInput\":\"searchInput_X3G_Xma\",\"value\":\"value_WvEWqLU\",\"dropdown_invalid\":\"dropdown_invalid_iZOvcyA\",\"dropdown_small\":\"dropdown_small_i4gyE9s\",\"dropdown_medium\":\"dropdown_medium_eah3lTY\",\"dropdown_large\":\"dropdown_large_MvCAt4Y\",\"dropdown_disabled\":\"dropdown_disabled_QEYAf1u\",\"valueWrapper\":\"valueWrapper_OMgMwzp\",\"searchButton\":\"searchButton_TvLgk_3\",\"searchButton_focus\":\"searchButton_focus_mjgNjU8\",\"listScrollBar\":\"listScrollBar_t5nLyni\",\"listScrollBar_openByKeyboard\":\"listScrollBar_openByKeyboard_AMuFBgN\",\"dropdown\":\"dropdown_o3mzIOJ\",\"dropdown_default\":\"dropdown_default_o8wajbr\",\"dropdown_multiselect\":\"dropdown_multiselect_WwDFUCs\",\"dropdown_enter\":\"dropdown_enter_WxPCAmS\",\"dropdown_enterActive\":\"dropdown_enterActive_smErU_F\",\"dropdown_exit\":\"dropdown_exit__Wf0omM\",\"dropdown_exitActive\":\"dropdown_exitActive_XASYqub\",\"dropdown_partiallyRequired\":\"dropdown_partiallyRequired_EIbmUeI\",\"value_hasValue\":\"value_hasValue_RQOyXeO\",\"valueInner\":\"valueInner_UZO3XYx\",\"valueSpinner\":\"valueSpinner_vS0JIiZ\",\"wInnerBall\":\"wInnerBall_UXu5eY0\",\"dropdown_readonly\":\"dropdown_readonly_mdWEZif\",\"dropdown--inline\":\"dropdown--inline_raPDpjf\",\"statusIcon\":\"statusIcon_go6kFEf\",\"container\":\"container_tfSpnjM\",\"container--visible\":\"container--visible_KFu2KyM\",\"containerNoItems\":\"containerNoItems_w08vgyl\",\"list\":\"list_qBjwpFo\",\"listItem\":\"listItem_C7EOblN\",\"container_multiselect\":\"container_multiselect_rRwJpDO\",\"container_default\":\"container_default_QkNiVZ8\",\"listItem_keyboardActive\":\"listItem_keyboardActive_fmz1u_C\",\"listItem_desktop\":\"listItem_desktop_bBJqbrW\",\"listItem_default\":\"listItem_default_yTAlsLo\",\"listItem_disabled\":\"listItem_disabled_XGrKslH\",\"listItem__checkboxTrack\":\"listItem__checkboxTrack_pfq9S9j\",\"meta\":\"meta_mhg2yJL\",\"containerPortal\":\"containerPortal_I_hJOXY\",\"searchWrapper\":\"searchWrapper__VbEqXS\",\"searchResultHeader\":\"searchResultHeader_W_xgTvB\",\"displayIcon\":\"displayIcon_lvfRXSq\",\"dropdownItemIcon\":\"dropdownItemIcon_f3F_f_w\",\"dropdownListSwitcherButtonsWrapper\":\"dropdownListSwitcherButtonsWrapper_cW5uYki\",\"dropdownListSwitcher\":\"dropdownListSwitcher_LeST2vn\",\"dropdownListSwitcher_active\":\"dropdownListSwitcher_active_WF90dO7\"};"],"names":["getAsyncIndicatorsRequestIds","items","filter","item","isUndefined","map","id","mergeItemsWithIndicators","indicators","asyncCountItem","find","syncIndicator","keyIndicator","removeExtraPipes","value","sanitizedValue","replace","closeActive","window","__REACT__DROPDOWN_TS","DropdownSearchTextbox","_ref","onChange","onSearchApply","disabled","hasFocus","setHasFocus","useState","inputRef","useRef","buttonClassName","classNames","classes","searchButton","searchButton_focus","handleTextBoxChange","useCallback","e","currentTarget","handleTextBoxKeyDown","key","preventDefault","handleTextBoxFocus","handleTextBoxBlur","handleButtonClick","useEffect","isMobileAny","current","focus","_jsxs","className","searchWrapper","children","_jsx","onFocus","onBlur","onKeyDown","searchInput","DROPDOWN_SEARCH_INPUT_TEST_ID","ref","type","readOnly","onClick","DROPDOWN_SEARCH_BUTTON_TEST_ID","tabIndex","Search","DropdownListItem","memo","icon","meta","tags","defaultValueId","handleItemClick","isSelected","trackSectionClassName","formattedValue","formattedMeta","disabledControls","focusedItem","useKeyboardNavigationListContext","hasMeta","length","hasFormattedValue","hasFormattedMeta","hasTags","isKeyboardActiveItem","hasKeyIndicator","isPreviewMode","itemProps","listItem","listItem_desktop","listItem_default","listItem_disabled","listItem_keyboardActive","Checkbox","trackClassName","listItem__checkboxTrack","checked","previewMode","labelTag","DROPDOWN_ITEM_ICON_TEST_ID","dropdownItemIcon","DROPDOWN_ITEM_META_TEST_ID","decodeHTMLValue","DROPDOWN_ITEM_TAGS_TEST_ID","join","DropdownListItems","testId","DROPDOWN_LIST_ITEMS_TEST_ID","onScroll","hasSearch","onItemSelect","hasSelectedId","handleCloseList","noItemsPlaceholder","listScrollBarClasses","normalizedDefaultValueId","handleKeyboardListItemSelect","listRef","hasItems","CustomScrollBar","dataTestId","DROPDOWN_ITEMS_SCROLL_TEST_ID","KeyboardNavigationList","list","isFetchingItems","_createElement","DropdownListSwitcher","showRecentItems","handleToggleRecentItems","translate","useTranslationAPI","leftButtonClasses","dropdownListSwitcher","dropdownListSwitcher_active","rightButtonClasses","PaddingBox","hrSmall","topSmall","dropdownListSwitcherButtonsWrapper","DROPDOWN_LIST_SWITCHER_TEST_ID","DROPDOWN_LIST_SWITCHER_RECENT_BUTTON_TEST_ID","codes","common","recentItems","DROPDOWN_LIST_SWITCHER_ALL_BUTTON_TEST_ID","allItems","DropdownContainer","closeComponent","multiSelect","onContainerScroll","onSearchChange","textBoxSearchValue","isOpenByKeyboard","dropdownButtonRef","handleClearButtonClick","name","showSearchResult","hasRecentItems","containerClasses","container","container_multiselect","container_default","listScrollBar","listScrollBar_openByKeyboard","handleContainerScroll","dynamicProps","useMemo","_props","componentWidth","isNull","getBoundingClientRect","width","handleTrap","dropdownItemsCommonProps","KeyboardNavigationListWrapperFocusTrap","handleFocusOnTopTrap","handleFocusOnBottomTrap","containerDataTestId","role","searchResultHeader","DROPDOWN_SEARCH_HEADER_TEST_ID","searchResults","DROPDOWN_LIST_RECENT_ITEMS_TEST_ID","NoDataPlaceholder","noItemsFound","Button","toolsClasses","DROPDOWN_CLEAR_BUTTON_TEST_ID","clear","DROPDOWN_APPLY_BUTTON_TEST_ID","apply","angle","true","AngleUpSmall","false","AngleDownSmall","DropdownSwitchIcon","isOpen","Angle","statusIcon","HELLOFLEX_DROPDOWN_SWITCH_ICON_CLASS","DEFAULT_ITEMS","DEFAULT_VALUES","Dropdown","open","size","style","valueClassName","values","valuesFromProps","invalid","displayValue","keysType","itemsFromProps","allItemsFromProps","placeholder","placeholderFromProps","DEFAULT_DROPDOWN_TEST_ID","hasDefaultValue","allowMetaSearch","onClose","onOpen","onMultiSelectChange","onReset","forceChangeOnSelect","recentItemsFromProps","onAllItemsSwitch","selectFirstOrDefault","onFirstOrDefaultChange","onTextBoxSearchApply","overlayPosition","searchValue","setSearchValue","setShowSearchResult","controlledTextBoxSearchValue","setControlledTextBoxSearchValue","internalOpen","setInternalOpen","setIsOpenByKeyboard","itemsFilter","setItemsFilter","ItemsFilter","default","controlledOpenState","setShowRecentItems","setSearchFormValue","i","normalizedValue","getNormalizedId","selectedIds","getNormalizedIds","prevIdsRef","selectedValueRef","resetSearch","skipMultiSelectChange","isEqual","Promise","resolve","setTimeout","closeComponentRef","openComponent","handleValueWrapperClick","async","isKeyboardAction","defaultItem","select","getItem","itemsForSearch","merge","keyBy","lodashValues","filteredItems","newItems","search","result","formatItemsByMetaAndValueSearch","formatItemsByValueSearch","concat","componentButtonRef","selected","componentClasses","dropdown","HELLOFLEX_DROPDOWN_CLASS","valueWrapper","dropdown_multiselect","dropdown_default","dropdown_disabled","dropdown_small","dropdown_medium","dropdown_large","itemIcon","dropdownValueClasses","value_hasValue","dropdown_invalid","availableValues","forEach","push","joinWithPipes","Array","isArray","nonRepeatingValues","includesRegex","RegExp","escapeRegExp","match","flow","normalizeDisplayValue","itemId","toggleItem","normalizedId","isIdSelected","originalId","toggleMultiselectItem","on","newValues","remove","handleItemSelect","_getItem","selectedId","handleSearchApply","staticValue","isSearchFilter","handleValue","show","reset","dropdownContainerComponent","_Fragment","title","DROPDOWN_DISPLAY_VALUE_TEST_ID","displayIcon","valueInner","OverlayPosition","callerComponentRef","render","position","displayName","document","body","addEventListener","target","classList","contains","closest","RECENT_ITEMS_QUANTITY","split","Number","String","toLowerCase","getHighlightedValue","startIndex","endIndex","targetValue","slice","Typography","bold","getSearchItemValue","indexOf","getStartIndex","leftValue","rightValue","newItem","metaValue","containValue","containMetaValue","clientX","clientY","mergeItems","oldItems","nextItems","reduce","oldItem","existedNewItem","searchItem","string","forwardRef","tagName","props","handleListKeyDown","handleListMouseMove","setFocusOnFirstItem","useKeyboardNavigationList","providerValue","TagName","handleFocus","KeyboardNavigationListContext","Provider","onMouseMove","KeyboardNavigationListWrapper","handleContainerListKeyDown","event","persist","stopPropagation","nativeEvent","stopImmediatePropagation","hasAutoFocus","isFocusTrapEnabled","FocusTrap","initialFocusTrapState","createContext","context","useContext","undefined","Error","currentListItemRef","focusedIndex","setFocusedIndex","setFocusedItem","setCurrentListItemRef","element","resetCurrentListItemRef","useLayoutEffect","scrollIntoView","behavior","block","resetFocus","setListNavigationData","index","listItemElement","getNextNotDisabledItemIndex","_items$index","getPreviousNotDisabledItemIndex","_items$index2","isSpaceBar","firstElementChild","lastElementChild","newIndex","encodedString","textarea","createElement","innerHTML"],"sourceRoot":""}