UNPKG

@antv/s2

Version:

effective spreadsheet render core lib

47 lines (46 loc) 2.54 kB
import { type CellMeta, type CustomHeaderField, type DataItem, type SimpleData } from '../../../common'; import type { CopyAllDataParams, CopyableList, SheetCopyConstructorParams } from '../../../common/interface/export'; import type { Node } from '../../../facet/layout/node'; import type { SpreadSheet } from '../../../sheet-type'; import { BaseDataCellCopy } from './base-data-cell-copy'; export declare class PivotDataCellCopy extends BaseDataCellCopy { protected leafRowNodes: Node[]; protected leafColNodes: Node[]; constructor(params: SheetCopyConstructorParams); protected getHeaderNodeMatrix(node: Node): SimpleData[]; private getLeafRowNodes; private getLeafColNodes; private getSelectedNode; /** * 兼容 hideMeasureColumn 方案:hideMeasureColumn 的隐藏实现是通过截取掉度量(measure)数据,但是又只截取了 Node 中的,像 pivotMeta 中的又是完整的。导致复制时,无法通过 Node 找出正确路径。 * https://github.com/antvis/S2/issues/1955 */ private compatibleHideMeasureColumn; protected getDataMatrixByHeaderNode: () => DataItem[][]; protected getDataMatrixByHeaderNodeRIC: () => Promise<DataItem[][]>; private getDataCellValue; protected getCustomRowCornerMatrix: (rowMatrix?: SimpleData[][]) => SimpleData[][]; protected getFieldName: (field: CustomHeaderField) => string; protected getCornerMatrix: (rowMatrix?: SimpleData[][]) => SimpleData[][]; protected getColMatrix(): SimpleData[][]; protected getRowMatrix(): SimpleData[][]; getDataMatrixByDataCell: (cellMetaMatrix: CellMeta[][]) => CopyableList; getPivotCopyData(): CopyableList; getAsyncAllPivotCopyData: () => Promise<CopyableList>; getPivotAllCopyData: () => CopyableList; } export declare function processSelectedPivotByHeader(spreadsheet: SpreadSheet, selectedCells: CellMeta[]): CopyableList; export declare const processSelectedAllPivot: (params: CopyAllDataParams) => CopyableList; export declare const asyncProcessSelectedAllPivot: (params: CopyAllDataParams) => Promise<CopyableList>; /** * 刷选单元格数据时使用此方法 * @param {SpreadSheet} spreadsheet * @param {CellMeta[][]} selectedCells * @param {CellMeta[]} headerSelectedCells * @return {CopyableList} */ export declare const processSelectedPivotByDataCell: ({ spreadsheet, selectedCells, headerSelectedCells, }: { spreadsheet: SpreadSheet; selectedCells: CellMeta[][]; headerSelectedCells: CellMeta[]; }) => CopyableList;