UNPKG

@asi-ngtools/lib

Version:

This project is a little components library, simple to use, which will help you to simplify your project.

48 lines (47 loc) 1.66 kB
import { DefaultControlValueAccessor } from './../common/default-control-value-accessor'; import { FormControl } from '@angular/forms'; import { ElementRef, OnInit, Renderer2 } from '@angular/core'; import { Subject } from 'rxjs'; export declare class AsiInputNumberComponent extends DefaultControlValueAccessor implements OnInit { private renderer; private elementRef; /** html id */ id: string; /** html name */ name: string; /** Label to display (is translated) */ label: string; /** Label position */ labelPosition: 'top' | 'left' | 'right' | 'bottom' | 'bottom-center' | 'top-center'; /** Increment value when click on + or - */ step: number; /** Increment value when click on + */ stepIncrease: number; /** Decrement value when click on - */ stepDecrease: number; /** Allow you to disable the input */ disableInput: boolean; /** Allow you to hide the action button */ hideAction: boolean; /** Min value */ min: number; /** Max value */ max: number; /** Delay before value change */ delay: number; /** Number regex */ pattern: RegExp; /** pattern used to managed typed value, if this pattern is true the 'value' will be the last valide one */ toleratePattern: RegExp; /** use a non decimal pattern '^-?[0-9]*$' */ noDecimal: boolean; inputElm: ElementRef; inputControl: FormControl; private oldValideValue; outputDelayValue: Subject<number>; constructor(renderer: Renderer2, elementRef: ElementRef); ngOnInit(): void; increase(): void; decrease(): void; writeValue(value: any): void; }