import { Data } from '@angular/router'; import { Observable } from 'rxjs'; import { SubTypeSelectColumn } from '../../enums/columns/SubTypeSelectColumn.enum'; import { Column } from './column'; /** * Column general select */ export interface SelectColumn extends Column { /** * subtype of column select */ subType?: SubTypeSelectColumn | (({ data, column }: { data: any; column: any; }) => SubTypeSelectColumn); } /** * List column */ export interface ListColumn extends SelectColumn { /** * List of values */ listValues: Array<{ text: string; value: string; color?: string; }>; /** * reference flag to the background color */ hasBackgroundColor?: boolean; } /** * Entity column */ export interface EntityColumn extends SelectColumn { /** * Url to request an get list */ url?: string | ((column: any) => string); /** * custom http subscriber */ httpSubscribe?: ({ page, pageSize, filters, column }: { page: any; pageSize: any; filters: any; column: any; }) => Observable; /** * custom map to http subscriber */ mapHttpSubscribe?: ({ page, pageSize, filters, response, column }: { page: any; pageSize: any; filters: any; response: any; column: any; }) => any; /** * value to send data */ attributeValue?: string; /** * list to keys attributes */ listAttributtes?: Array; } /** * Tree entity column */ export interface TreeEntityColumn extends SelectColumn { /** * Url to request an get list */ url?: string | ((column: any) => string); /** * tree data */ data?: Data; /** * value to send data */ attributeId?: string; /** * custom http subscriber */ httpSubscribe?: ({ column }: { column: any; }) => Observable; /** * custom map to http subscriber */ mapHttpSubscribe?: (response: any) => any; } /** * All export types selects */ export declare type TypeSelects = EntityColumn | ListColumn | TreeEntityColumn;