2021-09-17 18:02:45 +02:00
|
|
|
export interface DOMElement
|
2021-08-30 17:42:09 +02:00
|
|
|
{
|
|
|
|
id: string;
|
|
|
|
eltDOM?: HTMLElement;
|
|
|
|
}
|
2021-09-21 17:46:04 +02:00
|
|
|
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;
|
|
|
|
}
|
2021-09-17 18:02:45 +02:00
|
|
|
export interface Selectors
|
2021-08-30 17:42:09 +02:00
|
|
|
{
|
2021-09-17 18:02:45 +02:00
|
|
|
datasViewElt: DOMElement;
|
|
|
|
datasFieldNb: number|undefined;
|
|
|
|
separator?: string|undefined;
|
2021-08-30 17:42:09 +02:00
|
|
|
name?: string;
|
2021-09-09 12:57:23 +02:00
|
|
|
values?: string[];
|
2021-09-17 18:02:45 +02:00
|
|
|
selector2HTML() : void;
|
|
|
|
dataIsOk(data: any) : boolean;
|
2021-09-02 18:15:15 +02:00
|
|
|
}
|
2021-09-20 18:01:09 +02:00
|
|
|
export interface SortingFields
|
2021-09-02 18:15:15 +02:00
|
|
|
{
|
2021-09-20 18:01:09 +02:00
|
|
|
datasFieldNb: number|undefined;
|
2021-09-02 18:15:15 +02:00
|
|
|
order?: "asc"|"desc"|undefined;
|
2021-09-20 18:01:09 +02:00
|
|
|
field2HTML() : void;
|
2021-09-06 17:25:30 +02:00
|
|
|
}
|
2021-09-17 18:02:45 +02:00
|
|
|
export interface SortingFunctions
|
2021-09-06 17:25:30 +02:00
|
|
|
{
|
|
|
|
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
|
2021-08-30 17:42:09 +02:00
|
|
|
}
|