import { ValidatorFn } from "@angular/forms"; import { GridCondition } from "safe-grid/lib/modules/interfaces/grid-condition.interface"; import { GridTitle } from 'safe-grid/lib/modules/interfaces/grid-title.interface'; export interface GenericObjectComponent { fatherTitle?: string; title: string; urlService: string; hiddenFilter?: Array | Function; idRefer: string; titles: Title[]; params: Params; } export interface GenericObjectHelpList { title?: string; urlService: string; idFormRefer?: string; idRefer: string; showField: string; showFieldSecond?: string; titles: Title[]; params: Params; icon: string; oppWidth: string; hiddenFilter?: Array | Function; updateDependents?: UpdateDependents[]; } export interface Title extends GridTitle { max_width?: string; min_width?: string; helpListParameter?: GenericObjectHelpList; helpListFunction?: any; selectOption?: Select; dateOption?: DateGrid; validators?: ValidatorFn[]; value?: any; defaultValue?: any; hasRequired?: boolean; hideField?: boolean; hideForm?: boolean; disabledControl?: boolean; disabledSendId?: boolean; normalCase?: boolean; filterNewName?: string; textArea?: boolean | TextAreaFilter; noShowInVisibility?: boolean; formFieldWidth?: string; sendValueToHelpList?: boolean; destinationHelpListKey?: string; hasDependency?: boolean; idFormReferByDependency?: string; hasCodependency?: string; textAreaFilter?: TextAreaFilter; } export interface TextAreaFilter { minRows: number | null; maxRows: number | null; title?: string | null; normalCase?: boolean; } export interface Filter { condition: string; controlFilter?: ValidatorFn[]; } export interface Params { genericActions: GenericActions[]; actions: Actions[]; widthDialog?: string; paginatorSize: number[]; height: string; width?: string; serverFilter: true; startEmpty?: false; maxHeight?: string; minHeight?: string; minWidthActions?: string; showSelector?: boolean; } export interface GenericActions { labelDialog: string; label: string; disable: boolean; onSelectTitle?: string; } export interface Actions { icon: string; tooltip: string; disabled: boolean; onSelecTitle?: string; } export interface Select { idPetition?: string; id: string; showField?: string; urlPetition?: string; data?: any[]; } export interface DateGrid { maxDate?: Date; minDate?: Date; } export interface UpdateDependents { type: string; nameControl: string; nameField: string; }