Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | 14x 15x 3x 3x | import { FormArrayBase } from '../dynamic-form-field/dynamic-form-field-control'; import { DynamicFormFieldAsyncValidatorFn, DynamicFormFieldAsyncValidatorFactory,DynamicFormFieldValidatorFactory, DynamicFormFieldValidatorFn, DynamicFormFieldAsyncValidator, DynamicFormFieldValidator, } from '../dynamic-form-field/dynamic-form-field-validator'; import { DynamicFormArray } from './dynamic-form-array'; export type DynamicFormArrayValidatorFn<Value = any> = DynamicFormFieldValidatorFn<Value[], FormArrayBase<Value>>; export type DynamicFormArrayAsyncValidatorFn<Value = any> = DynamicFormFieldAsyncValidatorFn<Value[], FormArrayBase<Value>>; export type DynamicFormArrayValidatorFactory<Value = any, Model extends Value = Value> = DynamicFormFieldValidatorFactory<Value[], Model[], FormArrayBase<Value>, DynamicFormArray<Value, Model>>; export type DynamicFormArrayAsyncValidatorFactory<Value = any, Model extends Value = Value> = DynamicFormFieldAsyncValidatorFactory<Value[], Model[], FormArrayBase<Value>, DynamicFormArray<Value, Model>>; export class DynamicFormArrayValidator<Value = any, Model extends Value = Value> extends DynamicFormFieldValidator<Value[], Model[], FormArrayBase<Value>, DynamicFormArray<Value, Model>> { constructor(factory: DynamicFormArrayValidatorFactory, key: string, field: DynamicFormArray, deps?: any[]) { super(factory, key, field, deps); } protected getParameters(): any { return this.definition ? this.definition.parameters : this.field.template[this.key]; } } export class DynamicFormArrayAsyncValidator<Value = any, Model extends Value = Value> extends DynamicFormFieldAsyncValidator<Value[], Model[], FormArrayBase<Value>, DynamicFormArray<Value, Model>> { constructor(factory: DynamicFormArrayAsyncValidatorFactory, key: string, field: DynamicFormArray, deps?: any[]) { super(factory, key, field, deps); } protected getParameters(): any { return this.definition ? this.definition.parameters : this.field.template[this.key]; } } |