UNPKG

coersystem

Version:

Library for Angular projects

45 lines (44 loc) 2.11 kB
import { AfterViewInit } from '@angular/core'; import { FormGroup } from '@angular/forms'; import { CoerAlert } from 'coersystem/tools'; import * as i0 from "@angular/core"; export declare class CoerForm implements AfterViewInit { protected readonly _alert: CoerAlert; protected readonly _isReady: import("@angular/core").WritableSignal<boolean>; formGroup: import("@angular/core").InputSignal<FormGroup<any>>; isLoading: import("@angular/core").InputSignal<boolean>; isDisabled: import("@angular/core").InputSignal<boolean>; isReadonly: import("@angular/core").InputSignal<boolean>; ngAfterViewInit(): void; protected get _isDisabled(): boolean; /** Mark all controls as touched */ TouchForm(): void; /** */ RemoveValidators(exclude?: string[]): void; /** */ IsInvalidControl: (formControlName: string) => boolean; /** */ SetControlValue(formControlName: string, value: any): void; /** */ GetControlValue<T>(formControlName: string, alternative?: T): T; /** */ RemoveControlValidator(formControlName: string): void; /** */ HasControlValue(formControlName: string): boolean; /** Gets the value of the form */ GetValue<T>(): T; /** */ Reset<T>(properties?: T | null): void; /** * Mark all controls as touched. * If form is invalid emit a warning and focus first invalid control. */ IsValid(): { isValid: boolean; formValue: any; }; /** Focuses the specified control, otherwise the first invalid control or first control */ Focus(formControl?: string | null): void; static ɵfac: i0.ɵɵFactoryDeclaration<CoerForm, never>; static ɵcmp: i0.ɵɵComponentDeclaration<CoerForm, "coer-form", never, { "formGroup": { "alias": "formGroup"; "required": true; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "isDisabled": { "alias": "isDisabled"; "required": false; "isSignal": true; }; "isReadonly": { "alias": "isReadonly"; "required": false; "isSignal": true; }; }, {}, never, ["*"], false, never>; }