import { Observable, Subject } from 'rxjs'; import { AsyncValidatorFn, UntypedFormControl, UntypedFormGroup } from '@angular/forms'; export declare enum FieldConfigInputType { INPUT = "input", CHECKBOX = "checkbox", SELECT = "select", LABEL = "label", TEXTAREA = "textarea", NESTED_SELECT = "nested_select", NESTED_GROUP = "nested_group" } export interface FieldConfigInputTypeOptionsModelMap { [FieldConfigInputType.INPUT]: {}; [FieldConfigInputType.CHECKBOX]: {}; [FieldConfigInputType.SELECT]: { type: 'dropdown' | 'pills'; }; [FieldConfigInputType.LABEL]: {}; [FieldConfigInputType.TEXTAREA]: {}; [FieldConfigInputType.NESTED_SELECT]: {}; [FieldConfigInputType.NESTED_GROUP]: {}; } export declare enum FieldConfigValidationType { REQUIRED = "required", MAXLENGTH = "maxLength", REQUIRED_TRUE = "required_true", MINLENGTH = "minLength", PATTERN = "pattern" } export interface DialcodeResponse { isEditable?: Boolean; isValid?: Boolean; statusMsg?: String; } export type FieldConfigOptionsBuilder = (control: UntypedFormControl, context?: UntypedFormControl, notifyLoading?: () => void, notifyLoaded?: () => void) => Observable[]> | Promise[]>; export type AsyncValidatorFactory = (marker: string, trigger: HTMLElement) => AsyncValidatorFn; export interface FieldConfigOption { label: string; value: T; extras?: T; } export interface FieldConfigOptionAssociations { [key: string]: FieldConfigOption[]; } export interface FieldConfigAsyncValidation { marker: string; message?: string; trigger?: string; asyncValidatorFactory?: AsyncValidatorFactory; } export interface FieldConfig { code: string; type?: F; fieldName?: string; default?: any; context?: string; children?: { [key: string]: FieldConfig[]; } | FieldConfig[]; templateOptions?: { inputTypeOptions?: FieldConfigInputTypeOptionsModelMap[F]; type?: string; label?: string; placeHolder?: string; prefix?: string; multiple?: boolean; themeType?: string; autocomplete?: boolean; hidden?: boolean; disabled?: boolean; showIcon?: { show: boolean; image?: { active?: string; inactive?: string; }; direction?: string; }; options?: FieldConfigOption[] | FieldConfigOptionsBuilder | FieldConfigOptionAssociations; labelHtml?: { contents: string; values?: { [key: string]: string; }; }; }; validations?: { type: FieldConfigValidationType; value?: string | boolean | number | RegExp; message?: string; name?: string; validator?: any; }[]; asyncValidation?: FieldConfigAsyncValidation; visible?: boolean; editable?: boolean; dataType?: string; renderingHints?: any; name?: string; description?: string; inputType?: string; index?: number; placeholder?: string; required?: boolean; label?: string; options?: string[]; collections?: any; value?: any; terms?: any; range?: any; depends?: UntypedFormControl[]; dependencyTerms?: any; output?: string; sourceCategory?: string; association?: any; showInfo?: any; disabled?: any; martixType?: any; } export declare enum FilterType { FACET = "facet" } export interface Validator { name?: string; validator?: any; message?: string; type?: string; value?: string; } export type DynamicFieldConfigOptionsBuilder = (control: CustomFormControl, depends?: UntypedFormControl[], formGroup?: UntypedFormGroup, notifyLoading?: () => void, notifyLoaded?: () => void) => Observable[]> | Promise[]>; export interface SectionConfig { name: string; fields: FieldConfig[]; } export interface CustomFormGroup extends UntypedFormGroup { lastChangedField?: any; } export interface CustomFormControl extends UntypedFormControl { termsForDependantFields?: any; sourceCategory?: any; output?: any; customEventHandler$?: Subject; shouldListenToCustomEvent?: Boolean; isVisible?: any; range?: any; options?: any; richTextCharacterCount?: any; } export declare enum ThemeType { MATERIAL = "material" }