1 | import * as PropTypes from 'prop-types';
|
2 | import * as React from 'react';
|
3 | import CustomInput from './CustomInput';
|
4 | import Input from './Input';
|
5 | import { InputItemPropsType } from './PropsType';
|
6 | import { Omit } from '../_util/types';
|
7 | export declare type HTMLInputProps = Omit<React.HTMLProps<HTMLInputElement>, 'onChange' | 'onFocus' | 'onBlur' | 'value' | 'defaultValue' | 'type'>;
|
8 | export interface InputItemProps extends InputItemPropsType, HTMLInputProps {
|
9 | prefixCls?: string;
|
10 | prefixListCls?: string;
|
11 | className?: string;
|
12 | autoAdjustHeight?: boolean;
|
13 | onErrorClick?: React.MouseEventHandler<HTMLDivElement>;
|
14 | onExtraClick?: React.MouseEventHandler<HTMLDivElement>;
|
15 | }
|
16 | declare function noop(): void;
|
17 | declare class InputItem extends React.Component<InputItemProps, any> {
|
18 | static defaultProps: {
|
19 | prefixCls: string;
|
20 | prefixListCls: string;
|
21 | type: string;
|
22 | editable: boolean;
|
23 | disabled: boolean;
|
24 | placeholder: string;
|
25 | clear: boolean;
|
26 | onChange: typeof noop;
|
27 | onBlur: typeof noop;
|
28 | onFocus: typeof noop;
|
29 | extra: string;
|
30 | onExtraClick: typeof noop;
|
31 | error: boolean;
|
32 | onErrorClick: typeof noop;
|
33 | onVirtualKeyboardConfirm: typeof noop;
|
34 | labelNumber: number;
|
35 | updatePlaceholder: boolean;
|
36 | moneyKeyboardAlign: string;
|
37 | moneyKeyboardWrapProps: {};
|
38 | moneyKeyboardHeader: null;
|
39 | disabledKeys: null;
|
40 | };
|
41 | static contextTypes: {
|
42 | antLocale: PropTypes.Requireable<object>;
|
43 | };
|
44 | inputRef: Input | CustomInput | null;
|
45 | private debounceTimeout;
|
46 | constructor(props: InputItemProps);
|
47 | componentWillReceiveProps(nextProps: InputItemProps): void;
|
48 | componentWillUnmount(): void;
|
49 | onInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
50 | handleOnChange: (value: string, isMutated?: boolean, adjustPos?: Function) => void;
|
51 | onInputFocus: (value: string) => void;
|
52 | onInputBlur: (value: string) => void;
|
53 | clearInput: () => void;
|
54 | focus: () => void;
|
55 | calcPos: (prePos: number, preCtrlVal: string, rawVal: string, ctrlVal: string, placeholderChars: string[], maskReg: RegExp) => number;
|
56 | render(): JSX.Element;
|
57 | }
|
58 | export default InputItem;
|