@c10t/nice-component-library
Version:
nice-component-library
30 lines (29 loc) • 1.26 kB
TypeScript
import { ElementRef } from '@angular/core';
import { ControlValueAccessor } from '@angular/forms';
import * as i0 from "@angular/core";
export declare class FormatInputDirective implements ControlValueAccessor {
protected element: ElementRef<HTMLInputElement>;
elementInput: any;
control?: any;
inputDirective: any;
constructor(element: ElementRef<HTMLInputElement>);
protected _value: string | null;
get value(): string | null;
set value(value: string | null);
input(value: any): void;
focusout(value: any): void;
_onChange(value: any): void;
/**
* @param value
* apply formatting on value assignment
*/
writeValue(value: any): void;
registerOnChange(fn: (value: any) => void): void;
registerOnTouched(): void;
isLastCharacterDecimalSeparator(value: any): boolean;
private format;
unformatValue(value: any): any;
formatValue(value: any): any;
static ɵfac: i0.ɵɵFactoryDeclaration<FormatInputDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<FormatInputDirective, "[inputDirective]", never, { "inputDirective": { "alias": "inputDirective"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, {}, never, never, false, never>;
}