UNPKG

@koalarx/ui

Version:

Koala UI is a Design System developed in Angular whose objective is to facilitate and make your development faster and simpler, making this framework your greatest ally.

29 lines (28 loc) 2 kB
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms'; import { KoalaDynamicSetValueInterface } from './interfaces/koala.dynamic-set-value.interface'; import { BehaviorSubject, Observable } from 'rxjs'; import { KoalaDynamicAutocompleteOptionsInterface } from './interfaces/koala.dynamic-autocomplete-options.interface'; import { KoalaDynamicFormShowFieldInterface } from './interfaces/koala.dynamic-form-show-field.interface'; import { DynamicFormBuilder } from "./builder/dynamic-form.builder"; import { DeviceDetectorService } from "ngx-device-detector"; import * as i0 from "@angular/core"; export declare type KoalaDynamicFormValidatorType = 'required' | 'min' | 'max'; export declare class KoalaDynamicFormService { protected fb: UntypedFormBuilder; protected deviceService: DeviceDetectorService; constructor(fb: UntypedFormBuilder, deviceService: DeviceDetectorService); build(): DynamicFormBuilder; updateValidator(formGroup: UntypedFormGroup, name: string, type: KoalaDynamicFormValidatorType, value: boolean | number | string): void; disableFields(formGroup: UntypedFormGroup, disabled: boolean, fields: string[]): void; emitData(form: UntypedFormGroup): {}; resetForm(form: UntypedFormGroup): void; setValuesInMoreItemsForm(subject: BehaviorSubject<BehaviorSubject<KoalaDynamicSetValueInterface[]>[]>, values: KoalaDynamicSetValueInterface[][]): void; autocompleteFilterOnServer(request: () => Promise<any[]>, nameConfig: { propsByName: string[]; delimiter: string; }, indexNameByValue?: string): Observable<KoalaDynamicAutocompleteOptionsInterface[]>; showFields(subject: BehaviorSubject<KoalaDynamicFormShowFieldInterface[]>, names: string[], show: boolean, clearCurrentValue?: boolean): void; private getValueByStringPath; static ɵfac: i0.ɵɵFactoryDeclaration<KoalaDynamicFormService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<KoalaDynamicFormService>; }