import type { IPivotTableFilterInfo } from '@univerjs-pro/engine-pivot'; import type { IPivotPanelDataInfo, IUnitRangeNameWithSubUnitId } from '@univerjs-pro/sheets-pivot'; import type { ICommandService, IRange, Nullable, Worksheet } from '@univerjs/core'; import { PivotSubtotalTypeEnum, PivotTableFiledAreaEnum, PivotTableValuePositionEnum } from '@univerjs-pro/engine-pivot'; import { PivotFilterStatus } from '../../const'; export declare const PivotDropId = "PivotDropId"; export declare const PivotMultipleValueId = "PivotMultipleValueId"; interface IExecuteRemoveCommandCtx { pivotTableId: string; unitId: string; subUnitId: string; commandService: ICommandService; } export declare enum PivotPanelAreaType { Filter = "filter", Row = "row", Column = "column", Value = "value", Source = "source" } interface IPivotPanelDragCtx { pivotTableInfo: IPivotPanelDataInfo; pivotTableId: string; commandService: ICommandService; unitId: string; subUnitId: string; } export declare enum PivotSourceRangeErrorEnum { EmptyRange = 0, InvalidSize = 1, Valid = 2 } /** * - check if the range is valid for pivot source * @param {Worksheet} sheet - the sheet to check * @param {IRange} range -the range to check * @returns {boolean} - if the range is valid for pivot source */ export declare function isValidPivotSourceRange(sheet: Nullable, range?: IRange): PivotSourceRangeErrorEnum; export declare function handlerDropItemOut(ctx: IPivotPanelDragCtx, dragId: string, from: PivotPanelAreaType): Promise; export declare function handleUpdateSourceRange(commandService: ICommandService, pivotTableId: string, dataRangeInfo: IUnitRangeNameWithSubUnitId, unitId: string, subUnitId: string): Promise; export declare function handlerDragEnd(ctx: IPivotPanelDragCtx, dragId: string, from: PivotPanelAreaType, to: PivotPanelAreaType, index: number): Promise; export declare function executeRemoveCommand(ctx: IExecuteRemoveCommandCtx, fieldIds: string[]): Promise; export declare function executeUpdateValuePositionCommand(ctx: IExecuteRemoveCommandCtx, position: PivotTableValuePositionEnum, index: number): Promise; export declare function openFilterDialog(commandService: ICommandService, unitId: string, subUnitId: string, pivotTableId: string, tableFieldId: string): void; export declare function openFieldSettingDialog(commandService: ICommandService, pivotTableId: string, tableFieldId: string, unitId: string, subUnitId: string, pivotTableInfo: IPivotPanelDataInfo): void; interface ISummarizeListItem { type: PivotSubtotalTypeEnum; textKey: string; } export declare const SummarizeByList: ISummarizeListItem[]; export declare const getDecimalFromPattern: (pattern: string, defaultValue?: number) => number; export declare const getDecimalString: (length: number) => string; export declare const setPatternDecimal: (patterns: string, decimalLength: number) => string; export declare const isPatternHasDecimal: (pattern: string) => boolean; export declare const getCurrencyType: (pattern: string) => string | undefined; export declare const isGeneralPanel: (pattern: string) => boolean; export declare const isAccountingPanel: (pattern: string) => boolean; export declare const isCurrencyPanel: (pattern: string) => boolean; export declare const getDateFormatOptions: () => { label: string; value: string; }[]; export declare const isDatePanel: (pattern: string) => boolean; export declare const getNumberFormatOptions: () => { label: string; value: string; color: string | undefined; }[]; export declare const isThousandthPercentilePanel: (pattern: string) => boolean; export declare const getAreaFieldCount: (pivotTableInfo: IPivotPanelDataInfo, area: PivotTableFiledAreaEnum) => number; export declare const isPrefixName: (baseName: string, name: string, textInfo: Record) => boolean; export declare const getPrefixName: (baseName: string, textInfo: Record, subtotalType: PivotSubtotalTypeEnum) => string; export declare function getPivotFilterStatus(filterInfo: Nullable, additionalParams: { items?: string[]; }): PivotFilterStatus; export {};