import { TemplateRef } from '@angular/core'; import { PassThrough, PassThroughOption } from 'primeng/api'; import { InputTextPassThrough } from 'primeng/types/inputtext'; /** * Defines the button layout of the InputNumber component. * @group Types */ type InputNumberButtonLayout = 'stacked' | 'horizontal' | 'vertical'; /** * Defines the mode of the InputNumber component. * @group Types */ type InputNumberMode = 'decimal' | 'currency' | 'percent' | 'unit'; /** * Defines the currency display style of the InputNumber component. * @group Types */ type InputNumberCurrencyDisplay = 'symbol' | 'code' | 'name' | 'narrowSymbol'; /** * Defines the locale matching algorithm of the InputNumber component. * @group Types */ type InputNumberLocaleMatcher = 'lookup' | 'best fit'; /** * Custom pass-through(pt) options. * @template I Type of instance. * * @see {@link InputNumber.pt} * @group Interface */ interface InputNumberPassThroughOptions { /** * Used to pass attributes to the host's DOM element. */ host?: PassThroughOption; /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption; /** * Used to pass attributes to the InputText component. */ pcInputText?: InputTextPassThrough; /** * Used to pass attributes to the clear icon's DOM element. */ clearIcon?: PassThroughOption; /** * Used to pass attributes to the button group's DOM element. */ buttonGroup?: PassThroughOption; /** * Used to pass attributes to the increment button's DOM element. */ incrementButton?: PassThroughOption; /** * Used to pass attributes to the decrement button's DOM element. */ decrementButton?: PassThroughOption; /** * Used to pass attributes to the increment button icon's DOM element. */ incrementButtonIcon?: PassThroughOption; /** * Used to pass attributes to the decrement button icon's DOM element. */ decrementButtonIcon?: PassThroughOption; } /** * Defines valid pass-through options in InputNumber component. * @see {@link InputNumberPassThroughOptions} * * @template I Type of instance. */ type InputNumberPassThrough = PassThrough>; /** * Custom InputNumber input event. * @see {@link onInput} * @group Interface */ interface InputNumberInputEvent { /** * Browser event. */ originalEvent: Event; /** * Input value. */ value: number | null; /** * Formatted value. */ formattedValue: string; } /** * Defines valid templates in InputNumber. * @group Templates */ interface InputNumberTemplates { /** * Custom clear icon template. */ clearicon(): TemplateRef; /** * Custom increment button icon template. */ incrementbuttonicon(): TemplateRef; /** * Custom decrement button icon template. */ decrementbuttonicon(): TemplateRef; } export type { InputNumberButtonLayout, InputNumberCurrencyDisplay, InputNumberInputEvent, InputNumberLocaleMatcher, InputNumberMode, InputNumberPassThrough, InputNumberPassThroughOptions, InputNumberTemplates };