import * as React from 'react'; import { OptionInterface } from './Option'; import { OptGroupInterface } from './OptGroup'; import { LocaleProperties } from '../Locale'; interface OptionProps { disabled?: boolean; value?: string | number; title?: string; label?: React.ReactNode; children?: React.ReactNode; className?: string; style?: React.CSSProperties; } interface SelectProps { virtual?: boolean; allowClear?: boolean; children?: React.ReactNode | React.ReactNode[] | React.ReactChildren; className?: string; tagWidth?: string | number; defaultActiveFirstOption?: boolean; defaultValue?: string | number | any[] | object; disabled?: boolean; dropdownClassName?: string; dropdownMatchSelectWidth?: boolean; dropdownStyle?: React.CSSProperties; errorMessage?: string | React.ReactNode; extraOptions?: string | React.ReactNode; filterOption?: boolean | ((inputValue: string, option: React.ReactElement) => boolean); getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement; labelClear?: boolean; labelInValue?: boolean; loading?: boolean; maxCount?: number; maxLabelClearPanelHeight?: string | number; maxScrollHeight?: string | number; mode?: 'multiple' | 'single'; multipleSelectAllText?: string; notFoundContent?: string | React.ReactNode; onChange?: (value?: any) => void; onMouseEnter?: React.MouseEventHandler; onMouseLeave?: React.MouseEventHandler; onPopupScroll?: React.UIEventHandler; onSearch?: (value: any) => void; onSelect?: (value: any) => void; onDeselect?: (value: any) => void; onVisibleChange?: (value: any) => void; placeholder?: string; placement?: 'bottomLeft' | 'bottomCenter' | 'bottomRight' | 'topLeft' | 'topCenter' | 'topRight'; prefixCls?: string; searchInputProps?: object; searchPlaceholder?: string; selectAllText?: string; showArrow?: boolean; showMultipleSelectAll?: boolean; showOptionCheckedIcon?: boolean; showSearch?: boolean; showSelectAll?: boolean; showSingleClear?: boolean; size?: 'default' | 'small' | 'large'; style?: React.CSSProperties; value?: string | number | any[] | object; visible?: boolean; esc?: boolean; required?: boolean; filterInactiveOption?: boolean; customAction?: React.ReactNode | string; } declare type SelectValue = { key: string; label: string; title: string; }; interface SelectState { searchValue?: string; selectValue?: SelectValue[]; selectValueForMultiplePanel?: SelectValue[]; popupVisible?: boolean; activeKey?: undefined | string; dropdownWidth?: string | number; prevProps?: SelectProps; } declare class Select extends React.Component { static Option: OptionInterface; static OptGroup: OptGroupInterface; private listRef; private trigger; private selection; private selectSearch; static contextType: React.Context; static defaultProps: SelectProps; static getOptionFromChildren: (children: any, plainOptionList?: any[], filter?: any) => any[]; static getValueFromProps: (value: any, labelInValue: any, children: any) => any; static getDerivedStateFromProps(nextProps: any, prevState: any): SelectState; constructor(props: any); componentDidMount(): void; componentDidUpdate(): void; setDropdownWidth: () => void; updateSearchValue: (e: any) => void; emptySearchValue: () => void; selectAllOption: () => void; emptySelectValue: () => void; changeVisibleState: (visible: any) => void; visibleChangeFromTrigger: (visible: any) => void; focusEvent: (event: 'focus' | 'blur') => void; focus(): void; blur(): void; onOptionClick: (e: any, obj: any, clickLabelClose: boolean) => void; getProcessedChildren: (children: any, dropdownCls: string) => any; getFilteredChildren: (children: any, ChildrenList?: any[]) => any[]; handleCancelSelect: () => void; handleConfirmSelect: () => void; isSelectAll: (isMultiplePanel?: boolean) => boolean; handleKeyboardEvent: (e: any) => void; setActiveOptionIntoView: (index: number) => void; resizeTrigger: () => void; getDropdownPanel(Locale: LocaleProperties['Select']): JSX.Element; getSelectionPanel(Locale: LocaleProperties['Select']): JSX.Element; render(): JSX.Element; } export default Select;