UNPKG

ng-smart-forms

Version:

Zero-config reactive forms with built-in validation, auto-save, and smart error handling for Angular

25 lines (24 loc) 1.13 kB
import { OnInit, OnDestroy, ElementRef, Renderer2 } from '@angular/core'; import { FormGroup } from '@angular/forms'; import { SmartFormConfig } from '../interfaces/smart-form.interface'; import { AutoSaveService } from '../services/auto-save.service'; import * as i0 from "@angular/core"; export declare class SmartFormDirective implements OnInit, OnDestroy { private el; private renderer; private autoSaveService; smartForm: FormGroup; config: SmartFormConfig; private destroy$; private defaultConfig; constructor(el: ElementRef, renderer: Renderer2, autoSaveService: AutoSaveService); ngOnInit(): void; ngOnDestroy(): void; private setupAutoSave; private setupValidation; private updateErrorDisplay; private getErrorMessage; private addStatusIndicator; static ɵfac: i0.ɵɵFactoryDeclaration<SmartFormDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<SmartFormDirective, "[smartForm]", never, { "smartForm": { "alias": "smartForm"; "required": false; }; "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>; }