@visactor/vtable
Version:
canvas table width high performance
47 lines (46 loc) • 1.68 kB
TypeScript
export declare class FlatDataToObjects {
dataConfig: {
rows: string[];
columns: string[];
indicators: string[];
indicatorsAsCol: boolean;
indicatorDimensionKey: string | number;
};
records: any[];
tree: Record<string, Record<string, Record<string, any>>>;
beforeChangedTree: Record<string, Record<string, {
record: any;
value: string;
}>>;
private colFlatKeys;
private rowFlatKeys;
stringJoinChar: string;
private rowsIsTotal;
private colsIsTotal;
private colGrandTotalLabel;
private colSubTotalLabel;
private rowGrandTotalLabel;
private rowSubTotalLabel;
constructor(dataConfig: {
rows: string[];
columns: string[];
indicators: string[];
indicatorsAsCol: boolean;
indicatorDimensionKey: string | number;
}, records?: any[]);
changeDataConfig(dataConfig: {
rows: string[];
columns: string[];
indicators: string[];
indicatorsAsCol: boolean;
indicatorDimensionKey: string | number;
}): void;
setRecords(records: any[]): void;
processRecords(): void;
processRecord(record: any): void;
getTreeNode(rowKey: string[] | string, colKey: string[] | string, indicator: string, ifChangedValue?: boolean): Record<string, any>;
changeTreeNodeValue(rowKey: string[], colKey: string[], indicator: string, newValue: any): void;
_buildRecord(rowKey: string[], colKey: string[], indicator: string, value: any): {};
addRecords(records: any[]): void;
changeRecordFieldValue(fieldName: string, oldValue: string | number, value: string | number): void;
}