import * as React from 'react'; import { SelectProps as RcSelectProps, BaseSelectProps } from 'rc-select'; import { OptionProps } from 'rc-select/lib/Option'; import { BaseProps } from '../../wui-core/src/iCore'; import { AnyObject } from '../../wui-tree/src/iTree'; export type RawValue = string | number; export type SizeType = 'small' | 'middle' | 'large' | undefined; export { OptionProps }; export interface LabeledValue { key?: string; value: RawValue; label: React.ReactNode; } export type SelectValue = RawValue | RawValue[] | LabeledValue | LabeledValue[] | undefined; export interface InternalSelectProps extends Omit, 'mode'> { suffixIcon?: React.ReactNode; size?: SizeType; mode?: 'multiple' | 'tags' | 'combobox'; bordered?: boolean; fieldid?: string; } export interface AddEventLReturn { remove: () => void; } export interface SelectProps extends Omit, 'inputIcon' | 'mode' | 'getInputElement' | 'backfill' | 'maxTagCount'> { mode?: 'multiple' | 'tags' | 'combobox'; onRenderRest?: (values: DisplayValueType[]) => void; onTagMouseDown?: (event: React.MouseEvent) => void; multiple?: boolean; supportWrite?: boolean; getSelectAttrs?: () => AnyObject; combobox?: boolean; data?: RcSelectProps['options']; tags?: boolean; locale?: string; itemIcon?: any; dropdownMenuStyle?: React.CSSProperties; dataIndex?: number; filterDropdown?: 'show' | 'hide'; filterDropdownType?: string; filterDropdownIncludeKeys?: string[]; scrollToEnd?: () => void; onFilterChange?: () => void; onFilterClear?: (dataIndex?: string | number) => void; onKeyDown?: () => void; maxTagCount?: number | 'responsive' | 'auto'; } export interface SelectOverflowItem extends BaseProps, DisplayValueType { onDelete: (val: RawValue, option: DisplayValueType) => void; tagRender: BaseSelectProps['tagRender']; } export interface DisplayValueType { key: React.Key; value: RawValue; label: string; disabled?: boolean; title?: string | number; }