import { ValidatorFn } from '@angular/forms'; import { DatePicker } from '../models/date-picker.model'; import { RadioOption } from '../models/radio-option.model'; import { SearchType } from '../models/search.model'; import { SelectOption, AlignType, CheckboxOption } from '@ieeesa-npm/models'; import { AutoCompleteOption } from '../models/autocomplete-option.model'; import { LinkType } from './link-type.model'; import { SlideToggleOption } from './slide-toggle-options.model'; import { ColorFormat, ColorsAnimation } from './color-format.model'; import { AllowedFileTypes } from './allowed-file-types.model'; import { EditorConfig } from 'ngx-simple-text-editor'; import { AlignBrowsedFiles } from './align-browsed-files.model'; export interface FieldConfig { isSortNeeded?: boolean; disabled?: boolean; label?: string; controlName: string; dropdownOptions?: SelectOption[]; checkboxOptions?: CheckboxOption[]; autoCompleteOptions?: AutoCompleteOption[]; radioOptions?: RadioOption[]; placeholder?: string; type: string; requiredErrorMessage?: string; patternErrorMessage?: string; invalidEmailErrorMessage?: string; minErrorMessage?: string; maxErrorMessage?: string; supportMessage?: string; validation?: ValidatorFn[]; isMultiSelect?: boolean; value?: any; isNumber?: boolean; isEmail?: boolean; min?: number; max?: number; maxLength?: number; minLength?: number; isInteger?: boolean; isResize?: boolean; isReadonly?: boolean; isLabelAlignedLeft?: boolean; datePicker?: DatePicker; searchType?: SearchType; dateRangeControls?: { startDate: string; endDate: string; }; clear?: boolean; ariaLabel?: string; ariaDescribedById?: string; ariaMultiline?: boolean; minSelectionRequired?: number; maxCharCount?: number; remainingCharsLeftMessage?: string; name?: string; maxRangeLimit?: number; hour24?: number; hour12?: number; isSearch?: boolean; invalidDateTimeErrorMessage?: string; pastDateTimeErrorMessage?: string; is24HoursTimeFormat?: boolean; linkType?: LinkType; slideToggleOption?: SlideToggleOption; isMultiFileUpload?: boolean; maxUploadFileSize?: number; allowedFileTypes?: AllowedFileTypes[]; maxFileSizeErrorMessage?: string; isFileSelected?: boolean; allowedFileTypeErrorMessage?: string; invalidDateRangeErrorMessage?: string; invalidColorErrorMessage?: string; palette?: string[]; fileUploadHeading?: string; defaultColor?: string; colorFormat?: ColorFormat; overlayClassName?: string; colorAnimation?: ColorsAnimation; paletteSelectLabel?: string; paletteCancelLabel?: string; isColorCodeLabelNeeded?: boolean; isArrowIconNeeded?: boolean; canHideColorPicker?: boolean; canHideTextInput?: boolean; multiSelectAutoCompleteOptions?: AutoCompleteOption[]; /** * When set, controls the reactive form update/validation strategy for this * field (e.g. 'blur' so validation errors surface only after the user leaves * the field, avoiding an error flash while interacting). */ updateOn?: 'change' | 'blur' | 'submit'; editorConfig?: EditorConfig; isAllowAnyFileType?: boolean; alignBrowsedFiles?: AlignBrowsedFiles; isUploadButtonNeeded?: boolean; actionButtonAlign?: AlignType; alignFileUploadErrorMessageTo?: AlignType; maxFilesUploadedOnce?: number; maxFilesUploadLimitErrorMessage?: string; }