/
slicktypes.ts
42 lines (35 loc) · 1.07 KB
/
slicktypes.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { PropertyItem } from "../base";
import { FormatterContext, FormatterResult, Group } from "@serenity-is/sleekgrid";
export type Format<TItem = any> = (ctx: FormatterContext<TItem>) => FormatterResult;
declare module "@serenity-is/sleekgrid" {
export interface Column<TItem = any> {
referencedFields?: string[];
sourceItem?: PropertyItem;
}
}
export interface Formatter {
format(ctx: FormatterContext): FormatterResult;
}
export interface GroupInfo<TItem> {
getter?: any;
formatter?: (p1: Group<TItem>) => string;
comparer?: (a: Group<TItem>, b: Group<TItem>) => number;
aggregators?: any[];
aggregateCollapsed?: boolean;
lazyTotalsCalculation?: boolean;
}
export interface PagerOptions {
view?: any;
showRowsPerPage?: boolean;
rowsPerPage?: number;
rowsPerPageOptions?: number[],
onChangePage?: (newPage: number) => void;
onRowsPerPageChange?: (n: number) => void;
}
export interface SummaryOptions {
aggregators: any[];
}
export interface PagingOptions {
rowsPerPage?: number;
page?: number;
}