import * as React from 'react'; import { IBindableEditorProps } from './PropTypes'; import { FormContext } from './FormContext'; import { Misc, Model, Numeric } from '@singularsystems/neo-core'; import ComponentBase from './ComponentBase'; export interface INumberInputSpecificProps { /** Format string of number */ formatString?: string; /** Pre-defined format */ format?: Misc.NumberFormat; /** Override currency symbol. */ currencySymbol?: string; /** If set to false, the number will not be rounded to the number of decimals in the format string. */ autoRound?: boolean; /** Text to display if the value is zero or null. E.g. '-' */ zeroText?: string; /** Set to true to use the browsers native numeric input control. Note: only decimal place formatting is supported in this mode. */ native?: boolean; /** Pressing up and down on the keyboard won't step the value up and down. */ suppressKeyDownStepping?: boolean; } export interface INumberInputProps extends IBindableEditorProps { numProps?: INumberInputSpecificProps; } export declare class FormatState { isPercent: boolean; hasExternalPercentSymbol: boolean; formatString: string; /** How many decimals the value is allowed. */ allowedDecimals: number; zeroText?: string | undefined; useNative?: boolean | undefined; constructor(isPercent: boolean, hasExternalPercentSymbol: boolean, formatString: string, /** How many decimals the value is allowed. */ allowedDecimals: number, zeroText?: string | undefined, useNative?: boolean | undefined); static create(propertyInfo: Model.PropertyInfo, numericType: Misc.DataType, numProps?: INumberInputSpecificProps, appendText?: string): FormatState; getFormattedValue(value?: number | Numeric.IDecimal | null): string; } export default class NumberInput extends ComponentBase { static contextType: React.Context; context: React.ContextType; private hasFocus; private numericType; private isReadOnly; private inputElement; private recalcFormatState; private formatState; /** Pressing up and down on the keyboard wont step the value up and down. */ static suppressKeyDownStepping?: boolean; constructor(props: INumberInputProps); private onChanged; private onFocus; private getBindValueAsNumber; private setFocusedText; private onBlur; private onKeyDown; componentDidMount(): void; componentWillUnmount(): void; render(): React.JSX.Element; }