2021-10-20 17:32:05 +02:00
|
|
|
export interface DatasRenders
|
2021-09-23 17:19:31 +02:00
|
|
|
{
|
2021-10-20 17:32:05 +02:00
|
|
|
fields: string[];
|
|
|
|
datas: {[index: string]:string}[];
|
|
|
|
rend2HTML(): string;
|
2021-09-23 17:19:31 +02:00
|
|
|
}
|
2021-10-20 17:32:05 +02:00
|
|
|
export interface DatasRendersSettings // interface spécifique à la classe Render par défaut
|
2021-09-23 17:19:31 +02:00
|
|
|
{
|
|
|
|
allBegining: string;
|
|
|
|
allEnding: string;
|
|
|
|
fieldsBegining?: string;
|
|
|
|
fieldsEnding?: string;
|
|
|
|
fieldDisplaying?: string;
|
|
|
|
linesBegining: string;
|
|
|
|
linesEnding: string;
|
|
|
|
lineBegining: string;
|
|
|
|
lineEnding: string;
|
|
|
|
dataDisplaying: string;
|
|
|
|
}
|
2021-09-17 18:02:45 +02:00
|
|
|
export interface DOMElement
|
2021-08-30 17:42:09 +02:00
|
|
|
{
|
|
|
|
id: string;
|
|
|
|
eltDOM?: HTMLElement;
|
|
|
|
}
|
2021-10-20 17:57:34 +02:00
|
|
|
export interface Filters
|
|
|
|
{
|
|
|
|
datasViewElt: DOMElement;
|
|
|
|
filter2HTML() : void;
|
2021-10-21 17:09:57 +02:00
|
|
|
dataIsOk(data: {[index: string]:string}) : boolean;
|
2021-10-20 17:57:34 +02:00
|
|
|
}
|
2021-09-21 17:46:04 +02:00
|
|
|
export interface Paginations
|
|
|
|
{
|
|
|
|
options?: PaginationsOptions;
|
2021-10-20 12:36:09 +02:00
|
|
|
selectedValue: number|undefined;
|
2021-09-21 17:46:04 +02:00
|
|
|
pages: PaginationsPages;
|
2021-10-20 12:36:09 +02:00
|
|
|
options2HTML(): void;
|
2021-10-26 18:01:23 +02:00
|
|
|
pages2HTML() : void;
|
2021-09-21 17:46:04 +02:00
|
|
|
}
|
|
|
|
export interface PaginationsOptions
|
|
|
|
{
|
|
|
|
displayElement: DOMElement;
|
|
|
|
name?: string;
|
|
|
|
values: number[];
|
|
|
|
};
|
|
|
|
export interface PaginationsPages
|
|
|
|
{
|
|
|
|
displayElement: DOMElement;
|
2021-10-20 12:36:09 +02:00
|
|
|
name?: string;
|
2021-09-21 17:46:04 +02:00
|
|
|
values?: number[];
|
|
|
|
selectedValue?: number;
|
|
|
|
}
|
2021-10-06 16:54:20 +02:00
|
|
|
export interface ParseErrors
|
2021-09-29 17:56:10 +02:00
|
|
|
{
|
|
|
|
code?: string;
|
|
|
|
message: string;
|
2021-10-18 11:27:53 +02:00
|
|
|
row: number; // -1 quand bug avant de traiter les lignes
|
2021-09-29 17:56:10 +02:00
|
|
|
type?: string;
|
|
|
|
}
|
|
|
|
export interface ParseResults
|
|
|
|
{
|
2021-10-06 16:54:20 +02:00
|
|
|
datas: {[index: string]:string}[];
|
2021-09-29 17:56:10 +02:00
|
|
|
errors: ParseErrors[];
|
|
|
|
fields: string[];
|
|
|
|
}
|
|
|
|
export interface Parsers
|
|
|
|
{
|
2021-10-13 17:22:02 +02:00
|
|
|
datasRemoteSource: RemoteSources;
|
2021-10-11 16:44:20 +02:00
|
|
|
setRemoteSource(settings : RemoteSourceSettings): void;
|
2021-10-13 12:41:34 +02:00
|
|
|
datas2Parse?: string;
|
|
|
|
document2Parse?: HTMLDocument;
|
2021-10-06 16:54:20 +02:00
|
|
|
parseResults: ParseResults|undefined;
|
|
|
|
parse(): Promise<void>;
|
2021-09-29 17:56:10 +02:00
|
|
|
}
|
2021-10-11 16:44:20 +02:00
|
|
|
export interface RemoteSourceSettings
|
2021-09-29 17:56:10 +02:00
|
|
|
{
|
|
|
|
url: string;
|
2021-10-11 16:44:20 +02:00
|
|
|
headers?: { key:string, value:string }[];
|
|
|
|
withCredentials?: boolean;
|
|
|
|
}
|
2021-10-13 17:22:02 +02:00
|
|
|
export interface RemoteSources extends RemoteSourceSettings
|
2021-10-11 16:44:20 +02:00
|
|
|
{
|
|
|
|
getFetchSettings() : {};
|
2021-09-29 17:56:10 +02:00
|
|
|
}
|
2021-10-20 17:57:34 +02:00
|
|
|
export interface Selectors extends Filters
|
2021-08-30 17:42:09 +02:00
|
|
|
{
|
2021-09-22 17:12:00 +02:00
|
|
|
datasFieldNb: number;
|
2021-10-21 17:09:57 +02:00
|
|
|
name: string;
|
|
|
|
selectedValue: number|undefined;
|
|
|
|
separator: string|undefined;
|
|
|
|
values: string[];
|
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-22 17:36:11 +02:00
|
|
|
datasFieldNb: number;
|
2021-10-19 15:49:10 +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
|
|
|
}
|