// @flow import uniqBy from 'lodash/uniqBy'; import escapeRegExp from 'lodash/escapeRegExp'; import parseCSV from '../../utils/parseCSV'; import type { Option } from './flowTypes'; // Custom input parser for the PillSelectorDropdownField that automatically maps // a list of comma separated values to their respective Option objects. The parser // will try to find exact but case-insenstive matches using the option's displayText // property. If a token does not match displayText, the parser will also try to match // the string representation of the value property. This last match is useful for country // codes and other similar use cases. function defaultInputParser(inputValue: string, options: Array