import { AfterViewChecked, OnChanges, OnInit } from '@angular/core'; import { ControlValueAccessor, FormControl } from '@angular/forms'; import { PriceFormatKeyEventChecker } from '../utils/price-format.key-event-checker'; import { PriceFormatOptions, PriceFormatOptionsModel } from '../utils/price-format.options'; import { PriceFormatTransformer } from '../utils/price-format.transformer'; export declare class BasePriceFormatComponent implements ControlValueAccessor, OnChanges, AfterViewChecked, OnInit { _price: string; disabled: boolean; readonly: string; csserror: string; options: PriceFormatOptionsModel; error: string; disabledModelChanges: boolean; formatter: PriceFormatTransformer; keyEvents: PriceFormatKeyEventChecker; opt: PriceFormatOptions; focusOn: boolean; private doingChanges; private rawValue; touchedChange: any; propagateChange: any; validateFn: any; price: string | number; constructor(); ngOnInit(): void; ngAfterViewChecked(): void; isDisabled(): boolean; focusInEvent(): void; focusOutEvent(): void; handleKeyboardKeyDown(e: KeyboardEvent): void; private isFunctional(code); handleKeyboardKeyUp(e: KeyboardEvent): void; private priceIt(); /*********************************************** **BEGIN implementation of OnChanges interface** ***********************************************/ ngOnChanges(inputs: any): void; private getOptions(inputs); private initOptions(); private updateValidateFn(options); private updatePrice(options); validate(c: FormControl): any; /********************************************************** **BEGIN implementation of ControlValueAccessor interface** **********************************************************/ /** * writeValue(obj: any) is the method that writes a new value from the form model * into the view or (if needed) DOM property. This is where we want to update our * counterValue model, as that’s the thing that is used in the view. */ writeValue(value: any): void; private fillValue(val); /** * registerOnChange(fn: any) is a method that registers a handler that should * be called when something in the view has changed. It gets a function * that tells other form directives and form controls to update their values. * In other words, that’s the handler function we want to call whenever * price changes through the view. */ registerOnChange(fn: Function): void; /** * registerOnTouched(fn: any) Similiar to registerOnChange(), this registers * a handler specifically for when a control receives a touch event. * We don’t need that in our custom control. */ registerOnTouched(fn: Function): void; /** * This function is called when the control status changes to or from 'DISABLED'. * Depending on the value, it will enable or disable the appropriate DOM element. * * @param isDisabled */ setDisabledState(isDisabled: boolean): void; /******************************************************** **END implementation of ControlValueAccessor interface** ********************************************************/ private init(); }