import * as React from 'react'; import type { BuildInPlacements, TriggerProps } from 'rc-trigger'; import { SizeType } from '../config-provider/SizeContext'; import { TooltipPlacement } from '../tooltip'; import { CascaderLocaleOmit } from './index'; export interface CascaderFieldNames { value?: string | number; label?: string; children?: string; } export interface FilledFieldNamesType { value: string | number; label: string; children: string; } export type CascaderValueType = (string | number)[]; export type CascaderMultiValueType = (string | number | CascaderValueType)[]; export type CascaderMultiModeType = 'multiple'; export interface CascaderOption { value?: string | number; label?: React.ReactNode; disabled?: boolean; isLeaf?: boolean; loading?: boolean; children?: CascaderOption[]; titlePlacement?: TooltipPlacement; title?: React.ReactNode; [key: string]: any; } export interface CascaderProps extends Pick { value?: CascaderMultiValueType; defaultValue?: CascaderMultiValueType; initialActiveValue?: CascaderMultiValueType; mode?: CascaderMultiModeType; size?: SizeType; options?: CascaderOption[]; originOptions?: CascaderOption[]; keyword?: string; popupVisible?: boolean; disabled?: boolean; virtual?: boolean; transitionName?: string; popupClassName?: string; popupPlacement?: string; prefixCls?: string; dropdownMenuColumnStyle?: React.CSSProperties; dropdownRender?: (menus: React.ReactElement) => React.ReactElement; dropdownMenuRender?: (menu: React.ReactElement, menuIndex: number, hoveredValue: CascaderValueType) => React.ReactNode; builtinPlacements?: BuildInPlacements; loadData?: (selectOptions: CascaderOption[]) => void; changeOnSelect?: boolean; children?: React.ReactElement; expandTrigger?: string; fieldNames?: CascaderFieldNames; expandIcon?: React.ReactNode; loadingIcon?: React.ReactNode; withCheckAll?: boolean; locale?: CascaderLocaleOmit; onKeyDown?: (e: React.KeyboardEvent) => void; onChange?: (value: CascaderMultiValueType, selectOptions: CascaderOption[]) => void; onPopupVisibleChange?: (popupVisible: boolean) => void; onDropdownMenuScroll?: (e: React.UIEvent, menuIndex: number) => void; } interface CascaderState { popupVisible?: boolean; activeValue?: CascaderValueType; hoveredValue?: CascaderValueType; prevProps?: CascaderProps; } declare class Cascader extends React.Component { defaultFieldNames: Record; trigger: any; constructor(props: CascaderProps); static defaultProps: CascaderProps; static getDerivedStateFromProps(nextProps: CascaderProps, prevState: CascaderState): CascaderState; getPopupDOMNode(): any; getFieldName(name: string): string; getFieldNames(): CascaderFieldNames; getActiveOptions(activeValue: CascaderValueType, options?: CascaderOption[]): CascaderOption[]; getCurrentLevelOptions(): CascaderOption[]; getTotalValues(options?: CascaderOption[]): any[][]; getEnableValues(options?: CascaderOption[]): any[][]; getDisabledValues(): any[][]; setPopupVisible: (popupVisible: boolean) => void; handleChange: (options: CascaderOption[], { visible }: { visible: any; }, e: React.KeyboardEvent) => void; handlePopupVisibleChange: (popupVisible: boolean) => void; handleMenuSelect: (targetOption: CascaderOption, menuIndex: number, e: React.KeyboardEvent) => void; handleMenuMultiSelect: (targetOption: CascaderOption, _menuIndex: number, optionKey: CascaderValueType, e: any) => void; handleMenuMultiSelectAll: (e: any) => void; handleActiveValueSet: (activeValue: any) => void; handleItemDoubleClick: () => void; handleKeyDown: (e: React.KeyboardEvent) => void; saveTrigger: (node: any) => void; render(): React.JSX.Element; } export default Cascader;