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.

55 lines (54 loc) 3.59 kB
import { UntypedFormArray, UntypedFormBuilder, UntypedFormGroup, AbstractControl } from '@angular/forms'; import { KoalaDynamicFormFieldInterface } from './interfaces/koala.dynamic-form-field.interface'; import { DynamicFormTypeFieldEnum } from './enums/dynamic-form-type-field.enum'; import { OnInit } from '@angular/core'; import { FormAbstract } from '../form.abstract'; import { BehaviorSubject } from 'rxjs'; import { KoalaDynamicSetValueInterface } from './interfaces/koala.dynamic-set-value.interface'; import { KoalaDynamicAutocompleteOptionsInterface } from './interfaces/koala.dynamic-autocomplete-options.interface'; import { KoalaDynamicFormShowFieldInterface } from './interfaces/koala.dynamic-form-show-field.interface'; import { KoalaDynamicFormService } from './koala.dynamic-form.service'; import { KoalaDynamicFormMoreItensShowFieldConfigInterface } from './interfaces/koala.dynamic-form-more-itens-show-field-config.interface'; import { ThemePalette } from '@angular/material/core'; import { KoalaDynamicFormAutocompleteMultipleConfigInterface } from './interfaces/koala.dynamic-form-autocomplete-multiple-config.interface'; import { KoalaDynamicFormConfigInterface } from './interfaces/koala.dynamic-form-config.interface'; import { KoalaLanguageHelper } from "@koalarx/ui/core"; import * as i0 from "@angular/core"; export declare class DynamicFormComponent extends FormAbstract implements OnInit { private fb; private dynamicFormService; form: UntypedFormGroup; formConfig: KoalaDynamicFormFieldInterface[]; showFields: BehaviorSubject<KoalaDynamicFormShowFieldInterface[]>; showFieldsMoreItensConfig: KoalaDynamicFormMoreItensShowFieldConfigInterface[]; setValues: BehaviorSubject<KoalaDynamicSetValueInterface[]>; tabIndexStart: number; controls: UntypedFormArray; typeField: typeof DynamicFormTypeFieldEnum; hoursAndMinutesMask: string; errorMessage: typeof KoalaLanguageHelper; formId: string; constructor(fb: UntypedFormBuilder, dynamicFormService: KoalaDynamicFormService); ngOnInit(): void; isValidNewAutocompleteOption(value: any): boolean; hoursAndMinutesApplyMask(index: number, event: KeyboardEvent): void; passwordView(index: number): void; addMoreItem(propIndex: number): void; removeMoreItem(propIndex: number, removeIndex: any): void; clearAutocomplete(propIndex: number): void; display(option?: KoalaDynamicAutocompleteOptionsInterface): string | undefined; removeOptionOnAutocomplete(propIndex: number, option: KoalaDynamicAutocompleteOptionsInterface): void; getColorChip(config: KoalaDynamicFormAutocompleteMultipleConfigInterface): ThemePalette; getAutocompleteOptions(propriedade: AbstractControl): BehaviorSubject<any[]>; getDynamicFormConfig(propriedade: AbstractControl): BehaviorSubject<KoalaDynamicFormConfigInterface>; getRandomString(): string; private newControl; private setValuesOnFields; private changeVisibilityFields; private autocompleteFilter; private setValueByProp; private setConfigDynamicForm; private validateAutocompleteSelect; static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFormComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<DynamicFormComponent, "koala-dynamic-form", never, { "form": "form"; "formConfig": "formConfig"; "showFields": "showFields"; "showFieldsMoreItensConfig": "showFieldsMoreItensConfig"; "setValues": "setValues"; "tabIndexStart": "tabIndexStart"; }, {}, never, ["[btn-submit]"], false>; }