import type { ILabelViewHeaderMapItem, IPivotTableSnapshot, IPivotViewInfo, PivotTable, PivotView } from '@univerjs-pro/engine-pivot'; import type { IAccessor, ICellData, IMutationInfo, Injector, IObjectArrayPrimitiveType, IRange, Nullable, Worksheet } from '@univerjs/core'; import type { IMoveRangeMutationParams, ISetRangeValuesMutationParams } from '@univerjs/sheets'; import type { IGetPivotDataLocalMutationParams, IPivotCellPositionInfo, IPivotPanelDataInfo, IPivotRangesInfo, IPivotRenderCache, IPivotTableCellData, IPivotTableConfig } from './const/type'; import { PivotDateGroupFieldDateTypeEnum, PivotExcelDateGroupUnit, PivotSubtotalTypeEnum, PivotTableFiledAreaEnum } from '@univerjs-pro/engine-pivot'; import { DateSystem, ObjectMatrix } from '@univerjs/core'; import { SheetsPivotDataSourceModel } from './models/sheets-pivot-data-source-model'; export declare const generateDefaultEmptyCache: (textOptions: { filter: string; row: string; column: string; values: string; }, startCell: { row: number; col: number; }, direction?: 'ltr' | 'rtl') => { matrixCache: ObjectMatrix; rangesCache: IPivotRangesInfo; }; /** * - Get the auto display name of the value field. * @description - which may use prefix text like excel * - the prefix text is create by subtotal type * @param {string} baseName the name without prefix text * @param {PivotSubtotalTypeEnum} subtotalType the type of subtotal to be displayed for this value field. * @returns {string} the auto display name of the value field. */ export declare function getAutoDisplayName(this: Pick, baseName: string, subtotalType: PivotSubtotalTypeEnum): string; export declare function getPivotCellInfo(row: number, col: number, cellInfo: Nullable, pivotTable: PivotTable, pivotItemRenderCache: IPivotRenderCache): { filterId: string | undefined; info: Nullable; data: Nullable; headerInfo: Nullable; } | undefined; export interface IPivotSheetCellContext { area: keyof IPivotRangesInfo; info: Nullable; rowInfo: Nullable; columnInfo: Nullable; data: Nullable; headerInfo: Nullable; tableFieldId: string | undefined; } export interface IPivotValueFilterTarget { axis: PivotTableFiledAreaEnum.Row | PivotTableFiledAreaEnum.Column; targetFieldId: string; defaultValueFieldId?: string; } export declare function resolvePivotSheetCell(row: number, col: number, cellInfo: Nullable, pivotItemRenderCache: IPivotRenderCache): IPivotSheetCellContext | undefined; export declare function resolvePivotValueFieldId(context: IPivotSheetCellContext, valueFieldIds: string[]): string | undefined; export declare function resolvePivotValueFilterTarget(context: IPivotSheetCellContext, fieldsConfig: IPivotTableSnapshot): IPivotValueFilterTarget | undefined; export declare function getPivotTableInfo(pivotTable: PivotTable, pivotTableId: string, config: IPivotTableConfig): IPivotPanelDataInfo; export declare function flattenObject(inject: Injector, obj: Record, parentKey?: string, result?: Record): Record; export declare const unionPivotViewRange: (rangeInfo: IPivotRangesInfo | undefined) => IRange[]; export declare function getPivotConfigForSnapshot(config: IPivotTableConfig, rangeInfo: IPivotRangesInfo | undefined, blockedByWorksheet?: boolean): IPivotTableConfig; export declare function getPivotWorksheetOutputRanges(config: IPivotTableConfig, rangeInfo?: IPivotRangesInfo): IRange[] | undefined; export declare function limitPivotWorksheetOutputRanges(config: IPivotTableConfig, rangeInfo: IPivotRangesInfo): void; export declare function hasWorksheetCellContent(cell: Nullable): boolean; export declare function captureWorksheetContentWrites(sheet: Nullable, { cellValue, sourceFormulaData, trigger }: ISetRangeValuesMutationParams, previousOutput: IRange[]): (() => ObjectMatrix | undefined) | undefined; export declare function getMovedWorksheetCells(sheet: Worksheet, { from, to }: IMoveRangeMutationParams): ObjectMatrix | undefined; export declare function excludeWorksheetCells(ranges: IRange[], written: ObjectMatrix): IRange[]; export declare function getPivotDrillDownData(injector: Injector, params: IGetPivotDataLocalMutationParams): { indexes: number[]; range: IRange; sourceUnitId: string; sourceSubUnitId: string; formatMap: Record; } | undefined; export declare function canUsePivot(_ls?: string, _pbk?: string): boolean; export declare function getPivotInfoByLicense(_defaultPivotCount: number, ls?: string, pbk?: string): { count: number; timeValid: boolean; }; export declare function generateSetRangeValueMutations(injector: Injector, unitId: string, subUnitId: string, ranges: IRange[]): { setRangeValueUndoMutation: { id: string; params: ISetRangeValuesMutationParams; }; setRangeValueRedoMutation: { id: string; params: ISetRangeValuesMutationParams; }; shouldClear: boolean; }; export declare function getEmptyPivotRanges(cellInfo: IPivotCellPositionInfo, direction?: 'ltr' | 'rtl'): { startRow: number; endRow: number; startColumn: number; endColumn: number; }[]; export declare function getPivotAppliedRanges(cellInfo: IPivotCellPositionInfo, view: PivotView, isEmpty: boolean, direction: 'ltr' | 'rtl'): IRange[]; export declare function getPivotRowColCount(view: PivotView, startCell: { row: number; col: number; }, isEmpty: boolean): { rowCount: number; colCount: number; }; /** Minimum grid dimensions only. The padding is outside the pivot output and must never be cleared or reserved. */ export declare function getPaddedPivotWorksheetCounts(rowCount: number, colCount: number): { rowCount: number; colCount: number; }; export declare function getInsertRowColMutations(accessor: IAccessor, view: PivotView, cellInfo: IPivotCellPositionInfo, isEmpty: boolean): { undos: IMutationInfo[]; redos: IMutationInfo[]; }; export declare function getPivotAutoFitColumnWidthMap(view: PivotView, startColumn: number, direction: 'ltr' | 'rtl', textInfo: Record, measureText: (text: string) => number, valueFieldIds?: string[], dateSystem?: DateSystem): IObjectArrayPrimitiveType; export declare function setConfigToPivotTable(pivotTable: PivotTable, config: IPivotTableSnapshot): void; export declare function resetPivotTable(pivotTable: PivotTable, area?: PivotTableFiledAreaEnum | undefined): void; export declare function findCommonDateType(maxExcelDate: number, minExcelDate: number): PivotDateGroupFieldDateTypeEnum; export declare function setPivotDateSystem(dateSystem: DateSystem | undefined): void; export declare function getDateGroupName(injector: Injector, dateType: PivotDateGroupFieldDateTypeEnum | PivotExcelDateGroupUnit): string;