@douglas-serena/ng-inputs
Version:
angular entry library
60 lines (59 loc) • 1.92 kB
TypeScript
import { ChangeDetectorRef } from '@angular/core';
import { EventEmitter, OnInit } from '@angular/core';
import { ControlContainer, ControlValueAccessor, FormControl, FormControlDirective } from '@angular/forms';
import { NgInputConfigService } from '../core/ng-input-config.service';
interface IObject {
[key: string]: string;
}
interface IOnWrite {
(value: any): void;
}
export declare class InputCustomControlValueAccessor implements ControlValueAccessor, OnInit {
private _controlContainer;
private _configService;
private _changeDetectorRef;
formControlDirective: FormControlDirective;
formControl: FormControl;
formControlName: string;
name?: string;
help?: string;
disabled: boolean;
blur: EventEmitter<any>;
focus: EventEmitter<any>;
private _placeholder;
get placeholder(): string;
set placeholder(value: string);
label: string;
_cols: {
default: number;
lg?: number;
md?: number;
sm?: number;
};
set cols(cols: {
default?: number;
lg?: number;
md?: number;
sm?: number;
});
_field: null | 'group' | 'floating';
set field(value: 'group' | 'floating');
get field(): 'group' | 'floating';
readonly: boolean;
required?: boolean;
errors: IObject;
get control(): FormControl;
get classCols(): string;
constructor(_controlContainer: ControlContainer, _configService: NgInputConfigService, _changeDetectorRef: ChangeDetectorRef);
ngOnInit(): void;
protected ngOnInitSuper(): void;
getKeys(errors: IObject): string[];
getError(key: string): boolean;
registerOnTouched(fn: any): void;
onWrite: IOnWrite;
registerOnChange(fn: IOnWrite): void;
time: any;
writeValue(obj: any): void;
setDisabledState(isDisabled: boolean): void;
}
export {};