import { FormArray, FormControl, FormControlOptions, FormGroup, ValidatorFn } from '@angular/forms'; import { TranslocoService } from '@jsverse/transloco'; import { MenuItem } from 'primeng/api'; import { Observable } from 'rxjs'; import { SchemaAwareConstructor } from '../../entities/base-entity'; import { Namebook } from '../../entities/namebook'; import { BaseFormService } from '../../services/base-form.service'; import { BaseEntity } from './../../entities/base-entity'; export interface SpiderlyValidatorFn extends ValidatorFn { hasNotEmptyRule?: boolean; } export declare class SpiderlyFormControl extends FormControl { /** * Control name stored in label because it was easier than really accessing the FormControl's name */ label: string; /** * Translated label */ labelForDisplay: string; required: boolean; parentClassName: string; type: string; private _spiderlyValidator; constructor(value: any, opts?: FormControlOptions, required?: boolean); getRawValue(): T; get validator(): SpiderlyValidatorFn | null; set validator(validator: SpiderlyValidatorFn | null); } type SpiderlyControlsOfType = { [P in keyof TValue]: TValue[P] extends (infer U)[] ? U extends Namebook | string | number | Date | boolean ? SpiderlyFormControl : SpiderlyFormArray : TValue[P] extends Date ? SpiderlyFormControl : TValue[P] extends object ? SpiderlyFormGroup : SpiderlyFormControl; }; export declare class SpiderlyFormGroup extends FormGroup { controls: SpiderlyControlsOfType; constructor(controls: SpiderlyControlsOfType); getRawValue(): TValue; targetClass: SchemaAwareConstructor; trackingId: string; name?: string; saveObservableMethod?: (saveBody: any) => Observable; controlNamesFromHtml?: string[]; getControl: >(formControlName: TKey) => SpiderlyControlsOfType[TKey]; } export declare class SpiderlyFormArray extends FormArray { private translocoService; private baseFormService; constructor(controls: SpiderlyControlsOfType[], translocoService: TranslocoService, baseFormService: BaseFormService); label: string; labelForDisplay: string; value: TValue[]; required: boolean; formGroupInitialValues: Partial; targetClass: SchemaAwareConstructor; lastMenuIconIndexClicked: number; getCrudMenuForOrderedData: () => MenuItem[]; addNewFormGroup: (index: number) => void; getFormGroups: () => SpiderlyFormGroup[]; disableAllFormControls(): void; enableAllFormControls(): void; } export {};