InputNumber.d.ts 2.57 KB
/// <reference types="node" />
import React from 'react';
import { InputNumberProps, InputNumberState } from './interface';
declare function noop(): void;
declare class InputNumber extends React.Component<Partial<InputNumberProps>, InputNumberState> {
    static defaultProps: {
        focusOnUpDown: boolean;
        useTouch: boolean;
        prefixCls: string;
        max: number;
        min: number;
        step: number;
        style: {};
        onChange: typeof noop;
        onKeyDown: typeof noop;
        onPressEnter: typeof noop;
        onFocus: typeof noop;
        onBlur: typeof noop;
        parser: (input: string) => string;
        required: boolean;
        autoComplete: string;
    };
    pressingUpOrDown: boolean;
    inputting: boolean;
    rawInput: any;
    cursorStart: number;
    cursorAfter: number | string;
    input: HTMLInputElement;
    lastKeyCode: any;
    currentValue: number | string;
    cursorEnd: number;
    cursorBefore: string;
    autoStepTimer: NodeJS.Timer;
    constructor(props: InputNumberProps);
    componentDidMount(): void;
    componentDidUpdate(prevProps: any): void;
    componentWillUnmount(): void;
    onKeyDown: (e: any, ...args: any[]) => void;
    onKeyUp: (e: any, ...args: any[]) => void;
    onChange: (e: any) => void;
    onMouseUp: (...args: any[]) => void;
    onFocus: (...args: any[]) => void;
    onBlur: (...args: any[]) => void;
    getCurrentValidValue(value: any): any;
    getRatio: (e: any) => number;
    getValueFromEvent(e: any): any;
    getValidValue(value: any, min?: number, max?: number): any;
    setValue(v: any, callback: any): number;
    getFullNum: (num: any) => any;
    getPrecision: (value: any) => number;
    getMaxPrecision(currentValue: any, ratio?: number): number;
    getPrecisionFactor(currentValue: any, ratio?: number): number;
    getInputDisplayValue: (state: any) => any;
    recordCursorPosition: () => void;
    restoreByAfter: (str: any) => boolean;
    partRestoreByAfter: (str: any) => any;
    focus(): void;
    blur(): void;
    select(): void;
    formatWrapper(num: any): any;
    toPrecisionAsStep(num: any): any;
    isNotCompleteNumber: (num: any) => boolean;
    toNumber(num: any): any;
    upStep(val: any, rat: any): any;
    downStep(val: any, rat: any): any;
    step(type: any, e: any, ratio: number, recursive: any): void;
    stop: () => void;
    down: (e: any, ratio: any, recursive: any) => void;
    up: (e: any, ratio: any, recursive: any) => void;
    saveInput: (node: any) => void;
    fixCaret(start: any, end: any): void;
    render(): JSX.Element;
}
export default InputNumber;