UNPKG

@gooddata/react-components

Version:

GoodData.UI - A powerful JavaScript library for building analytical applications

87 lines (86 loc) 2.38 kB
/// <reference types="react" /> 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 declare type MeasureCell = number | string | null; export declare type TableCell = IAttributeCell | MeasureCell; export declare type TableCellForDrilling = IAttributeCellForDrilling | MeasureCell; export declare type TableRow = TableCell[]; export declare type TableRowForDrilling = TableCellForDrilling[]; export declare type Align = "left" | "right"; export declare 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 declare type OnSortChangeWithDir = (dir: SortDir, e: any) => void; export declare type OnSortChangeWithItem = (sortItem: AFM.SortItem) => void; export interface ITableTransformationConfig { rowsPerPage?: number; onMore?: (...params: any[]) => any; onLess?: (...params: any[]) => any; sortInTooltip?: boolean; stickyHeaderOffset?: number; separators?: ISeparators; } export declare function isAttributeCell(cell: TableCell): cell is IAttributeCell;