/** * DevExtreme (ui/number_box.d.ts) * Version: 25.1.7 * Build date: Mon Nov 10 2025 * * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ import { EventInfo, NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, InteractionEvent, } from '../events'; import { TextEditorButton, } from '../common'; import dxTextEditor, { dxTextEditorOptions, } from './text_box/ui.text_editor.base'; import { ValueChangedInfo, } from './editor/editor'; import { Format, } from '../localization'; export type NumberBoxPredefinedButton = 'clear' | 'spins'; export type NumberBoxType = 'number' | 'text' | 'tel'; /** * The type of the change event handler's argument. */ export type ChangeEvent = NativeEventInfo; /** * The type of the contentReady event handler's argument. */ export type ContentReadyEvent = EventInfo; /** * The type of the copy event handler's argument. */ export type CopyEvent = NativeEventInfo; /** * The type of the cut event handler's argument. */ export type CutEvent = NativeEventInfo; /** * The type of the disposing event handler's argument. */ export type DisposingEvent = EventInfo; /** * The type of the enterKey event handler's argument. */ export type EnterKeyEvent = NativeEventInfo; /** * The type of the focusIn event handler's argument. */ export type FocusInEvent = NativeEventInfo; /** * The type of the focusOut event handler's argument. */ export type FocusOutEvent = NativeEventInfo; /** * The type of the initialized event handler's argument. */ export type InitializedEvent = InitializedEventInfo; /** * The type of the input event handler's argument. */ export type InputEvent = NativeEventInfo; /** * The type of the keyDown event handler's argument. */ export type KeyDownEvent = NativeEventInfo; export type KeyPressEvent = NativeEventInfo; /** * The type of the keyUp event handler's argument. */ export type KeyUpEvent = NativeEventInfo; /** * The type of the optionChanged event handler's argument. */ export type OptionChangedEvent = EventInfo & ChangedOptionInfo; /** * The type of the paste event handler's argument. */ export type PasteEvent = NativeEventInfo; /** * The type of the valueChanged event handler's argument. */ export type ValueChangedEvent = NativeEventInfo & ValueChangedInfo; /** * * @deprecated * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ export interface dxNumberBoxOptions extends dxTextEditorOptions { /** * Allows you to add custom buttons to the input text field. */ buttons?: Array; /** * Specifies the value's display format and controls user input accordingly. */ format?: Format; /** * Specifies the text of the message displayed if the specified value is not a number. */ invalidValueMessage?: string; /** * The maximum value accepted by the number box. */ max?: number | undefined; /** * The minimum value accepted by the number box. */ min?: number | undefined; /** * Specifies the value to be passed to the type attribute of the underlying `` element. */ mode?: NumberBoxType; /** * Specifies whether to show the buttons that change the value by a step. */ showSpinButtons?: boolean; /** * Specifies how much the UI component's value changes when using the spin buttons, Up/Down arrow keys, or mouse wheel. */ step?: number; /** * Specifies whether to use touch friendly spin buttons. Applies only if showSpinButtons is true. */ useLargeSpinButtons?: boolean; /** * The current number box value. */ value?: number; } /** * The NumberBox is a UI component that displays a numeric value and allows a user to modify it by typing in a value, and incrementing or decrementing it using the keyboard or mouse. */ export default class dxNumberBox extends dxTextEditor { /** * Resets the value property to the value passed as an argument. */ reset(value?: Properties['value']): void; } export type Properties = dxNumberBoxOptions; /** * @deprecated use Properties instead * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ export type Options = dxNumberBoxOptions;