import AutoNumeric from 'autonumeric'; import * as i0 from '@angular/core'; import { OnInit, OnDestroy, ElementRef, Renderer2, ChangeDetectorRef } from '@angular/core'; import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors } from '@angular/forms'; /** * Custom options to provide to the underlying [AutoNumeric library](https://github.com/autoNumeric/autoNumeric). * The value can be set to `string`, which is an alias that represents * a [set of predefined set of options](https://github.com/autoNumeric/autoNumeric#predefined-options) * for a currency or language, or `Options`, which is a * [custom set of options](https://github.com/autoNumeric/autoNumeric#options) * that override any default options that the `skyAutonumeric` attribute specifies. */ type SkyAutonumericOptions = string | keyof AutoNumeric.PredefinedOptions | AutoNumeric.Options; /** * Provides options to the underlying [AutoNumeric library](https://github.com/autoNumeric/autoNumeric). * This can set global options on multiple input fields. */ declare class SkyAutonumericOptionsProvider { /** * The value for a settings object to pass to the AutoNumeric library. * This overrides any default options specified by the `skyAutonumeric` attribute. */ getConfig(): SkyAutonumericOptions; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * Wraps the [autoNumeric utility](https://github.com/autoNumeric/autoNumeric) to format * any type of number, including currency. */ declare class SkyAutonumericDirective implements OnInit, OnDestroy, ControlValueAccessor, Validator { #private; /** * Assigns the name of a property from `SkyAutonumericOptionsProvider`. */ set skyAutonumeric(value: SkyAutonumericOptions | undefined); /** * @internal */ skyAutonumericFormChangesUnformatted: boolean | undefined; constructor(elementRef: ElementRef, globalConfig: SkyAutonumericOptionsProvider, renderer: Renderer2, changeDetector: ChangeDetectorRef); ngOnInit(): void; ngOnDestroy(): void; /** * Implemented as part of ControlValueAccessor. */ setDisabledState(value: boolean): void; writeValue(value: number | undefined): void; validate(control: AbstractControl): ValidationErrors | null; registerOnChange(fn: (value: number | undefined) => void): void; registerOnTouched(fn: () => void): void; onBlur(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class SkyAutonumericModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { SkyAutonumericModule, SkyAutonumericOptionsProvider, SkyAutonumericDirective as λ1 }; export type { SkyAutonumericOptions };