-
Notifications
You must be signed in to change notification settings - Fork 85
Expand file tree
/
Copy pathTable.ts
More file actions
110 lines (85 loc) · 2.41 KB
/
Copy pathTable.ts
File metadata and controls
110 lines (85 loc) · 2.41 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
// (C) 2007-2018 GoodData Corporation
import { AFM } from "@gooddata/typings";
import { ISeparators } from "@gooddata/numberjs";
export interface IAttributeCell {
uri: string;
name: string;
}
export interface IAttributeCellForDrilling {
id: string;
name: string;
}
export type MeasureCell = number | string | null;
export type TableCell = IAttributeCell | MeasureCell;
export type TableCellForDrilling = IAttributeCellForDrilling | MeasureCell;
export type TableRow = TableCell[];
export type TableRowForDrilling = TableCellForDrilling[];
export type Align = "left" | "right";
export type SortDir = "asc" | "desc";
export interface ISortInfo {
sortBy: number;
sortDir: SortDir;
}
export interface IScrollEvent {
name: string;
debounce: number;
}
export interface ISortObj {
dir: SortDir;
nextDir: SortDir;
sortDirClass: string;
}
export interface IAlignPoint {
align: string;
offset: { x: number; y: number };
}
export interface ITableCellStyle {
backgroundColor?: string;
color?: string;
fontWeight?: React.CSSProperties["fontWeight"];
}
export interface ITableCellStyleAndFormattedValue {
style: ITableCellStyle;
formattedValue: string;
}
export interface IPositions {
absoluteTop: number;
defaultTop: number;
edgeTop: number;
fixedTop: number;
}
export interface IHeaderTooltipArrowPosition {
left: string;
}
export interface ITableColumnProperties {
align: Align;
index: number;
width: number;
}
export interface ITableDimensions {
height: number;
top?: number;
bottom?: number;
}
export interface ITotalTypeWithTitle {
type?: AFM.TotalType;
title: string;
role?: string;
}
export interface ITotalsDataSource {
rowsCount: number;
getObjectAt: (index: number) => ITotalTypeWithTitle;
}
export type OnSortChangeWithDir = (dir: SortDir, e: any) => void;
export type OnSortChangeWithItem = (sortItem: AFM.SortItem) => void;
export interface ITableTransformationConfig {
rowsPerPage?: number;
onMore?: (...params: any[]) => any; // TODO: make the types more specific (FET-282)
onLess?: (...params: any[]) => any; // TODO: make the types more specific (FET-282)
sortInTooltip?: boolean;
stickyHeaderOffset?: number;
separators?: ISeparators;
}
export function isAttributeCell(cell: TableCell): cell is IAttributeCell {
return cell && (cell as IAttributeCell).uri !== undefined;
}