@studiohyperdrive/ngx-forms
Version:
An Angular package to help with complex forms and their validation.
55 lines (54 loc) • 2.35 kB
TypeScript
import { QueryList, OnDestroy } from '@angular/core';
import { AbstractControl } from '@angular/forms';
import { Subject } from 'rxjs';
import { DataFormAccessor } from '../data-form/data-form.accessor';
import { FormAccessor } from '../form/form.accessor';
import { FormStateOptionsEntity } from '../../interfaces';
import * as i0 from "@angular/core";
export declare class FormAccessorContainer implements OnDestroy {
/**
* A list of all DataFormAccessors en FormAccessors of this component
*/
accessors: QueryList<DataFormAccessor | FormAccessor>;
/**
* Destroyed state of the component
*/
protected readonly destroyed$: Subject<unknown>;
/**
* @deprecated This method should no longer be used, use the markAsDirty on the form itself instead
*
* Marks the form and all the inputs of every subsequent form-accessors as dirty
*
* @param form - The form used in the component
* @param options - Options passed to the form state changer
*/
markAllAsDirty(form: AbstractControl, options?: FormStateOptionsEntity): void;
/**
* @deprecated This method should no longer be used, use the markAsTouched on the form itself instead
*
* Marks the form and all the inputs of every subsequent form-accessors as touched
*
* @param form - The form used in the component
* @param options - Options passed to the form state changer
*/
markAllAsTouched(form: AbstractControl, options?: FormStateOptionsEntity): void;
/**
* Updates the value and validity of the form and all the inputs of every subsequent form-accessors
*
* @param form - The provided forms
* @param options - Options passed to the updateValueAndValidity
*/
updateAllValueAndValidity(form: AbstractControl, options?: FormStateOptionsEntity): void;
/**
* Handle the destroy state of the component
*/
ngOnDestroy(): void;
/**
* Handle the accessors action of the FormContainer and throw a warning if no accessors are provided
*
* @param action - The provided action
*/
private handleAccessorsAction;
static ɵfac: i0.ɵɵFactoryDeclaration<FormAccessorContainer, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<FormAccessorContainer, never, never, {}, {}, never, never, true, never>;
}