export interface DOMElement { id: string; eltDOM?: HTMLElement; } export interface Paginations { options?: PaginationsOptions; selectedValue?: number; // on peut utiliser une Pagination sans proposer d'options à l'utilisateur. pages: PaginationsPages; rend2HTML(): void; creaPageSelector(nbTotal:number) : void; } export interface PaginationsOptions { displayElement: DOMElement; name?: string; values: number[]; }; export interface PaginationsPages { displayElement: DOMElement; name: string; values?: number[]; selectedValue?: number; } export interface Selectors { datasViewElt: DOMElement; datasFieldNb: number|undefined; separator?: string|undefined; name?: string; values?: string[]; selector2HTML() : void; dataIsOk(data: any) : boolean; } export interface SortingFields { datasFieldNb: number|undefined; order?: "asc"|"desc"|undefined; field2HTML() : void; } export interface SortingFunctions { datasFieldNb: number; sort(a: any,b: any, order?: "asc"|"desc"): number; // cf. https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Global_Objects/Array/sort }