@gooddata/react-components
Version:
GoodData.UI - A powerful JavaScript library for building analytical applications
33 lines (32 loc) • 3.12 kB
TypeScript
import { AFM } from "@gooddata/typings";
import { IntlShape } from "react-intl";
import { IMappingHeader } from "../../../../interfaces/MappingHeader";
import { IIndexedTotalItem, ITotalWithData } from "../../../../interfaces/Totals";
import { IAlignPoint, ITotalsDataSource } from "../../../../interfaces/Table";
export declare const AVAILABLE_TOTALS: AFM.TotalType[];
export declare const isNativeTotal: (total: AFM.ITotalItem) => boolean;
export declare const getAttributeDimension: (attributeIdentifier: string, resultSpec: AFM.IResultSpec) => AFM.IDimension;
export declare const getNativeTotals: (totals: AFM.ITotalItem[], resultSpec: AFM.IResultSpec) => AFM.INativeTotalItem[];
export declare const getTotalsFromResultSpec: (resultSpec: AFM.IResultSpec) => AFM.ITotalItem[];
export declare function getTotalsDataSource(usedTotals: ITotalWithData[], intl: IntlShape): ITotalsDataSource;
export declare function createTotalItem(type: AFM.TotalType, outputMeasureIndexes?: number[], values?: number[]): ITotalWithData;
export declare function orderTotals(totalsUnordered: IIndexedTotalItem[]): IIndexedTotalItem[];
export declare function toggleCellClass(parentReference: Element, tableColumnIndex: number, isHighlighted: boolean, className: string): void;
export declare function resetRowClass(parentReference: Element, className: string, selector: string, rowIndexToBeSet?: number): void;
export declare function removeTotalsRow(totals: ITotalWithData[], totalItemTypeToRemove: AFM.TotalType): ITotalWithData[];
export declare function isTotalUsed(totals: ITotalWithData[], totalItemType: AFM.TotalType): boolean;
export declare function addTotalsRow(totals: ITotalWithData[], totalItemTypeToAdd: AFM.TotalType): ITotalWithData[];
export declare function updateTotalsRemovePosition(tableBoundingRect: ClientRect, totals: ITotalWithData[], isTotalsEditAllowed: boolean, totalsAreVisible: boolean, removeWrapper: HTMLElement): void;
export declare function getAddTotalDropdownAlignPoints(isLastColumn?: boolean): IAlignPoint[];
export declare function shouldShowAddTotalButton(header: IMappingHeader, isFirstColumn: boolean, addingMoreTotalsEnabled: boolean): boolean;
export declare function getFirstMeasureIndex(headers: IMappingHeader[]): number;
export declare function hasTableColumnTotalEnabled(outputMeasureIndexes: number[], tableColumnIndex: number, firstMeasureIndex: number): boolean;
export declare function addMeasureIndex(totals: ITotalWithData[], headers: IMappingHeader[], totalType: AFM.TotalType, tableColumnIndex: number): ITotalWithData[];
export declare function removeMeasureIndex(totals: ITotalWithData[], headers: IMappingHeader[], totalType: AFM.TotalType, tableColumnIndex: number): ITotalWithData[];
export declare function getTotalsDefinition(totalsWithValues: ITotalWithData[]): IIndexedTotalItem[];
export declare function shouldShowTotals(headers: IMappingHeader[]): boolean;
export declare const getColumnTotalsFromResultSpec: (source: AFM.IResultSpec) => any;
declare const _default: {
getColumnTotalsFromResultSpec: (source: AFM.IResultSpec) => any;
};
export default _default;