import type { DataField, FieldsCollection, IBaseGroupFieldJSON, IDataFieldManagerBaseJSON, IExcelDateGrouping, IFieldsCollectionJSON, ILabelViewHeaderMapItem, IManualGroup, INumberGrouping, IPivotTableChangeSet, IPivotTableCustomFilter, IPivotTableFilterInfo, IPivotTableLabelFieldJSON, IPivotTableOptions, IPivotTableShowDataAsInfo, IPivotTableSnapshot, IPivotTableSortInfo, IPivotTableValueFieldJSON, IPivotTableValueFilter, IPivotViewInfo, IPivotViewJSON, IPivotViewValueType, PivotCellStyleTypeEnum, PivotDataFieldDataTypeEnum, PivotDateGroupFieldDateTypeEnum, PivotLayoutTypeEnum, PivotSubtotalTypeEnum, PivotTableChangeTypeEnum, PivotTableConditionFilter, PivotTableFiledAreaEnum, PivotTableValuePositionEnum, PivotView } from '@univerjs-pro/engine-pivot'; import type { CellValueType, ICellData, IRange, IStyleData, IUndoRedoCommandInfosByInterceptor, IUnitRangeName, Nullable, ObjectMatrix } from '@univerjs/core'; import type { IMutationPairGroup } from '../commands/command/util'; import type { PivotDisplayDataType, PositionType } from './const'; export interface IPivotPerformCheckParams { cellInfo: IPivotCellPositionInfo; view: PivotView; isEmpty: boolean; } export interface IPivotManualFilterCoordinationParams { unitId: string; subUnitId: string; pivotTableId: string; tableFieldId: string; items: string[]; partialItems?: string[]; isAll?: boolean; clearAllFilters?: boolean; } export interface IPivotManualFilterCoordinationResult { handled: boolean; result: boolean; } export type PivotDateFilterCoordinationParams = { unitId: string; subUnitId: string; tableFieldId: string; filterInfo: IPivotTableCustomFilter | undefined; } & ({ pivotTableId: string; pivotChartId?: never; } | { pivotChartId: string; pivotTableId?: never; }); export declare const PIVOT_PERFORM_CHECK: import("@univerjs/core").IAsyncInterceptor; export declare const PIVOT_MANUAL_FILTER_COORDINATION: import("@univerjs/core").IAsyncInterceptor & { pivotChartId: string; pivotTableId?: never; })>; export declare const PIVOT_DATE_FILTER_COORDINATION: import("@univerjs/core").IAsyncInterceptor; export interface IPivotOptionFilterCoordinationResult extends IUndoRedoCommandInfosByInterceptor { groups: IMutationPairGroup[]; validate: () => void; } export declare const PIVOT_OPTION_FILTER_COORDINATION: import("@univerjs/core").IAsyncInterceptor; export declare const PIVOT_MUTATION_GENERATE: import("@univerjs/core").IInterceptor; export declare const PIVOT_FIELD_REMOVE_COORDINATION: import("@univerjs/core").IInterceptor; export interface IPivotBlockedRange extends IRange { reason?: 'pivot' | 'merge' | 'value'; occupiedAnchor?: IRange; } export interface IPivotTableConfigChangeInfo { unitId: string; subUnitId: string; type: PivotTableOperationEnum; pivotTableId: string; view?: Nullable; blockedRange?: IPivotBlockedRange; blockedByWorksheet?: boolean; direction?: 'ltr' | 'rtl'; } export declare enum CollectionChangeEnum { add = "add", delete = "delete", update = "update" } export type IUnitRangeNameWithSubUnitId = IUnitRangeName & { subUnitId: string; }; export interface IPivotReportScope { unitId: string; subUnitId: string; } export interface IPivotCollectionChange { /** Workbook owning the source collections, which can differ from the report's target workbook. */ unitId: string; pivotTableIds: readonly string[]; } export interface ICollectionChangeInfo { token: string; type: CollectionChangeEnum; dataRangeInfo?: IUnitRangeNameWithSubUnitId; unitId?: string; subUnitId?: string; targetCellInfo?: IPivotCellPositionInfo; oldSourceRangeInfo?: IUnitRangeNameWithSubUnitId; } export interface IAddPivotTableParams { pivotTableConfig: IPivotTableConfig; } export interface IUpdatePivotTableSourceRangeMutationParams { pivotTableId: string; pivotCacheId?: string; preserveCacheId?: boolean; deleteIds: string[]; collectionJSON: IFieldsCollectionJSON; dataRangeInfo: IUnitRangeNameWithSubUnitId; unitId: string; subUnitId: string; } export interface IAddPivotTableMutationParams { unitId: string; subUnitId: string; pivotTableId: string; pivotTableConfig: IPivotTableConfig; collectionConfig: IFieldsCollectionJSON; } export interface IAddPivotGroupCollectionMutationParams { unitId: string; subUnitId: string; pivotTableId: string; fieldJSON: IBaseGroupFieldJSON; } export interface IRemovePivotGroupCollectionMutationParams { unitId: string; subUnitId: string; pivotTableId: string; dataFieldId: string; } export interface IAddPivotFieldMutationParams { unitId: string; subUnitId: string; pivotTableId: string; fieldJson: IPivotTableValueFieldJSON | IPivotTableLabelFieldJSON; area: PivotTableFiledAreaEnum; index: number; } export interface IRemovePivotFieldMutationParams { unitId: string; subUnitId: string; pivotTableId: string; fieldId: string; area: PivotTableFiledAreaEnum; index: number; } export interface IRenamePivotFieldMutationParams { unitId: string; subUnitId: string; pivotTableId: string; name: string; fieldId: string; } export interface ISetPivotSortMutationParams { unitId: string; subUnitId: string; pivotTableId: string; fieldId: string; sortInfo: IPivotTableSortInfo | undefined; } export interface ISetPivotShowDataAsMutationParams { unitId: string; subUnitId: string; pivotTableId: string; fieldId: string; showDataAs: IPivotTableShowDataAsInfo; } export interface ISetPivotOptionMutationParams { unitId: string; subUnitId: string; pivotTableId: string; options: IPivotTableOptions; /** Changeset options are complete snapshots; direct mutation callers still apply patches. */ replace?: boolean; } export interface ISetPivotLayoutMutationParams { unitId: string; subUnitId: string; pivotTableId: string; layout: PivotLayoutTypeEnum; } export interface ISetPivotFieldFormatMutationParams { unitId: string; subUnitId: string; pivotTableId: string; fieldId: string; format: string | undefined; } export interface IUpdateFieldPositionMutationParams { unitId: string; subUnitId: string; pivotTableId: string; fieldId: string; area: PivotTableFiledAreaEnum; index: number; oldArea: PivotTableFiledAreaEnum; oldIndex: number; } export interface IUpdateValuePositionMutationParams { unitId: string; subUnitId: string; pivotTableId: string; valuePosition: PivotTableValuePositionEnum; index: number; } export interface IUpdatePivotFieldSourceInfoMutationParams { unitId: string; subUnitId: string; pivotTableId: string; dataFieldId: string; sourceName: string; tableFieldId: string; } export interface ISetPivotSubtotalTypeMutationParams { unitId: string; subUnitId: string; pivotTableId: string; fieldId: string; subtotalType: PivotSubtotalTypeEnum; } export interface ISetPivotFilterMutationParams { unitId: string; subUnitId: string; pivotTableId: string; fieldId: string; filterInfo: IPivotTableFilterInfo | undefined; conditionFilter?: PivotTableConditionFilter | null; isAll?: boolean; } export interface ISetPivotValueFilterMutationParams { unitId: string; subUnitId: string; pivotTableId: string; fieldId: string; filterInfo: IPivotTableValueFilter | undefined; /** Evaluation index. Legacy mutations without this field keep the current index or append a new rule. */ index?: number; } export interface ISetPivotCollapseMutation { unitId: string; subUnitId: string; pivotTableId: string; fieldId: string; collapse: boolean | Record | undefined; item?: string; } export interface IAdjustPivotTableRes { valueMatrix: ObjectMatrix>; rowInfo: Record; colInfo: Record; cornerInfo: Record; rowHeaderMap: Record; colHeaderMap: Record; } export interface IThemeStyle { rowStyle?: IStyleData; colStyle?: IStyleData; cornerStyle?: IStyleData; pageStyle?: IStyleData; dataStyle?: IStyleData; blankStyle?: IStyleData; subTotalStyle?: IStyleData; leafStyle?: IStyleData; grandTotal?: IStyleData; } export interface IPivotTableFieldsConfig { dim: unknown; } export interface IPivotCellPositionInfo { row: number; col: number; unitId: string; subUnitId: string; sheetName?: string; } export interface IPivotTableConfig { /** User-facing report name. Missing legacy values are normalized to an empty string. */ name?: string; targetCellInfo: IPivotCellPositionInfo; sourceRangeInfo: IUnitRangeNameWithSubUnitId; pivotCacheId?: string; themeId?: string; /** Recheck worksheet occupancy on the first render after clearing imported output or saving a worksheet-blocked report. */ checkWorksheetOccupancyOnLoad?: boolean; /** Worksheet coordinates still eligible to contain legacy pivot output, including across a pending refresh. */ previousOutputRangesOnLoad?: IRange[]; fieldsConfig: IPivotTableSnapshot; isEmpty: boolean; } export type IPivotTableConfigModel = Map>>; export type IPivotWorkerCache = Map>>; export interface IPivotWorkerItemCache { blockedRange?: IPivotBlockedRange; blockedByWorksheet?: boolean; rangeCache?: IPivotRangesInfo; matrix?: ObjectMatrix>; oldRangeCache?: IPivotRangesInfo; oldMatrix?: ObjectMatrix>; } export interface IPivotTableRangeInfo { rangeInfo?: IPivotRangesInfo; oldRangeInfo?: IPivotRangesInfo; blockedByWorksheet?: boolean; } export interface IPivotTableMatrixInfo { matrix: ObjectMatrix>; oldMatrix?: ObjectMatrix>; } /** * The pivot table view change operation type. */ export declare enum PivotTableOperationEnum { /** * A pivot table added to the sheet cells. */ Add = "add", /** * A pivot table updated in the sheet cells, maybe the range of the pivot table changed or the values of the pivot table cell changed. */ Set = "set", /** * A pivot table removed from the sheet cells. */ Delete = "delete" } export interface IPivotTableCellData { v?: IPivotViewValueType; /** * pivot button type */ pbt?: PivotCellStyleTypeEnum; s?: string | IStyleData; /** * filter index */ fi?: number; t?: CellValueType; } export interface IDataFieldManagerJSON extends IDataFieldManagerBaseJSON { dataRanges: Record; } export interface ISheetsPivotCacheSnapshot { pivotCacheId: string; sourceRangeInfo: IUnitRangeNameWithSubUnitId; retainedSource?: boolean; } export interface IPivotTableJson { dataFieldManagerConfig: Record; pivotTableConfigs: Record>>; pivotCacheConfigs?: Record>; } export type IRangePosition = 'row' | 'col' | 'corner' | 'data'; export interface IPivotRenderCache { blockedRange?: IPivotBlockedRange; blockedByWorksheet?: boolean; direction?: 'ltr' | 'rtl'; areaInfo?: IPivotAreaViewInfo; rangesInfo?: IPivotRangesInfo; headerMap?: IPivotHeaderMap; projection?: IPivotSheetProjection; } export interface IPivotSheetProjection { startColumn: number; endColumn: number; direction: 'ltr' | 'rtl'; } export interface IPivotAreaViewInfo { rowInfo: Record; colInfo: Record; cornerInfo: Record; } export interface IPivotRangesInfo { rowRanges: IRange[]; colRanges: IRange[]; cornerRanges: IRange[]; dataRanges: IRange[]; pageRanges: IRange[]; } export interface IPivotHeaderMap { rowHeaderMap: Record; colHeaderMap: Record; } export interface ISetPivotPositionMutationParams { unitId: string; subUnitId: string; pivotTableId: string; targetCellPosition: { row: number; col: number; }; /** Legacy worksheet output carried by the sheet operation. An ordinary pivot move starts with none. */ worksheetOutputRanges?: IRange[]; } export interface IRemovePivotTableMutationParams { unitId: string; subUnitId: string; pivotTableId: string; } export interface IPivotTableViewDirtyMarkOperationParams { [unitId: string]: { [sunUnitId: string]: { [token: string]: boolean; }; }; } export interface ISheetPivotPluginConfig { isPivotTableWorkerMode: boolean; } export interface IPivotMutationDirtyViewInfo { unitId: string; subUnitId: string; token: string; type: PivotTableOperationEnum; pivotConfig?: IPivotTableConfig; } export interface IPivotLocalMutationBaseParams { unitId: string; subUnitId: string; pivotTableId: string; } export interface IGetPivotFilterPanelDataParams { row: number; col: number; tableFieldId?: string; cellData?: IPivotTableCellData; pivotItemRenderInfoCache?: IPivotRenderCache; } export interface IGetPivotPanelDataParams { pivotTableId: string; } export interface IGetAddPivotFieldDataParams { dataFieldId: string; fieldArea: PivotTableFiledAreaEnum; index: number; } export interface IPivotDisplayFilterInfo { conditionFilter?: PivotTableConditionFilter; supportsDateFilter?: boolean; tableFieldId: string; pivotTableId: string; items: string[]; itemTypes: PivotDataFieldDataTypeEnum[]; itemLabels?: Record; checkedItems?: string[]; partialItems?: string[]; filterInfo: IPivotTableFilterInfo | undefined; sortInfo: IPivotTableSortInfo | undefined; format: string | undefined; } export interface IGetAddPivotTableDataParams { sourceRangeInfo: IUnitRangeName & { subUnitId: string; }; pivotTableId: string; fieldsConfig?: IPivotTableSnapshot; } export interface IGetAddPivotTableWithConfigDataParams { sourceRangeInfo: IUnitRangeName & { subUnitId: string; }; pivotTableId: string; pivotTableIndexConfig: { filters?: IPivotFieldConfig[]; rows?: IPivotFieldConfig[]; columns?: IPivotFieldConfig[]; values?: IValueFieldConfig[]; }; } export interface IGetMovePivotFieldDataParams { fieldId: string; area: PivotTableFiledAreaEnum; index: number; } export interface IGetRemovePivotFieldDataParams { fieldIds: string[]; retainFilterFieldIds?: string[]; } export type IGetPivotCollapseDataParams = { tableFieldId: string; collapse: boolean; item?: string; rowLevelFieldId?: never; } | { /** Set the entire row axis depth in one query and changeset collection. */ rowLevelFieldId: string; tableFieldId?: never; collapse?: never; item?: never; }; export interface IGetPivotFilterDataParams { tableFieldId: string; items: string[]; partialItems?: string[]; isAll?: boolean; clearAllFilters?: boolean; } export interface IGetPivotValueFilterDataParams { tableFieldId: string; filterInfo: IPivotTableValueFilter | undefined; } export interface ISetPivotTableConfigDataParams { pivotTableId: string; pivotTableConfig: IPivotTableSnapshot; } export interface IResetPivotTableDataParams { pivotTableId: string; resetArea?: PivotTableFiledAreaEnum; } export interface IGetPivotSortDataParams { tableFieldId: string; info?: IPivotTableSortInfo; } export interface IGetPivotOptionParams { pivotTableId: string; info: IPivotTableOptions; } export interface IGetPivotLayoutParams { pivotTableId: string; layout: PivotLayoutTypeEnum; } export interface IGetPivotDateGroupParams { tableFieldId: string; dateType: PivotDateGroupFieldDateTypeEnum; } export interface IGetPivotExcelDateGroupParams { tableFieldId: string; grouping: IExcelDateGrouping; } export interface IGetPivotNumberGroupParams { tableFieldId: string; grouping: INumberGrouping; } export interface IGetPivotManualGroupsParams { sourceFieldId: string; groups: IManualGroup[]; } export interface IGetPivotDrillDownDataParams { tuple: string[][]; } export interface IGetPivotSettingDataParams { tableFieldId: string; displayName?: string; format?: string; subtotalType?: PivotSubtotalTypeEnum; showDataAs?: IPivotTableShowDataAsInfo; } export interface IGetUpdatePivotSourceDataParams { dataRangeInfo: IUnitRangeNameWithSubUnitId; unitId: string; subUnitId: string; } export interface IGetUpdateValuePositionDataParams { position: PivotTableValuePositionEnum; index: number; } export interface IGetPivotDataLocalMutationParams extends IPivotLocalMutationBaseParams { version: string; params: { type: PivotDisplayDataType; filter?: IGetPivotFilterPanelDataParams; panel?: IGetPivotPanelDataParams; addPivotField?: IGetAddPivotFieldDataParams; addPivotTable?: IGetAddPivotTableDataParams; movePivotField?: IGetMovePivotFieldDataParams; removePivotField?: IGetRemovePivotFieldDataParams; setPivotCollapse?: IGetPivotCollapseDataParams; setPivotFilter?: IGetPivotFilterDataParams; setPivotSort?: IGetPivotSortDataParams; setPivotSetting?: IGetPivotSettingDataParams; updatePivotSource?: IGetUpdatePivotSourceDataParams; updateValuePosition?: IGetUpdateValuePositionDataParams; addPivotTableWithConfig?: IGetAddPivotTableWithConfigDataParams; setPivotTableConfig?: ISetPivotTableConfigDataParams; resetPivotTable?: IResetPivotTableDataParams; drillDown?: IGetPivotDrillDownDataParams; setValuePivotFilter?: IGetPivotValueFilterDataParams; setPivotDateFilter?: { tableFieldId: string; filterInfo: IPivotTableCustomFilter | undefined; }; setOptions?: IGetPivotOptionParams; setPivotLayout?: IGetPivotLayoutParams; setPivotDateGroup?: IGetPivotDateGroupParams; setPivotExcelDateGroup?: IGetPivotExcelDateGroupParams; setPivotNumberGroup?: IGetPivotNumberGroupParams; setPivotManualGroups?: IGetPivotManualGroupsParams; manualGroupMembers?: { sourceFieldId: string; paths: Array<{ path: string; memberKey?: string; tupleKey?: string; }>; }; numberGroupDefaults?: { tableFieldId: string; }; }; } export interface IPivotDisplayResult { filter?: IPivotDisplayFilterInfo; panel?: IPivotPanelDataInfo; addPivotTable?: IPivotAddPivotTableInfo; addPivotField?: IPivotDisplayBaseInfo; movePivotField?: IPivotDisplayBaseInfo; removePivotField?: IPivotDisplayBaseInfo; setPivotCollapse?: IPivotDisplayBaseInfo; setPivotFilter?: IPivotDisplayBaseInfo; setPivotSort?: IPivotDisplayBaseInfo; setPivotSetting?: IPivotDisplayBaseInfo; updatePivotSource?: IPivotUpdatePivotSourceInfo; updateValuePosition?: IPivotDisplayBaseInfo; addPivotTableWithConfig?: IPivotAddPivotTableInfo & { changesets: IPivotTableChangeSet[]; }; drillDown?: IPivotDrillDownInfo; setValuePivotFilter?: IPivotDisplayBaseInfo; setPivotDateFilter?: IPivotDisplayBaseInfo; setPivotTableConfig?: IPivotDisplayBaseInfo; resetPivotTable?: IPivotDisplayBaseInfo; setPivotOption?: IPivotDisplayBaseInfo; setPivotLayout?: IPivotDisplayBaseInfo; setPivotDateGroup?: IPivotDisplayBaseInfo; setPivotExcelDateGroup?: IPivotDisplayBaseInfo; setPivotNumberGroup?: IPivotDisplayBaseInfo; setPivotManualGroups?: IPivotDisplayBaseInfo; manualGroupMembers?: { members: IManualGroup['members']; error?: 'invalidSelection' | 'ambiguousMember'; }; numberGroupDefaults?: INumberGrouping; } export interface IPivotUpdatePivotSourceInfo { pivotCacheId: string; view: IPivotViewJSON; changesets: IPivotTableChangeSet[]; isEmpty: boolean; pivotTableConfig: IPivotTableConfig; collectionConfig: IFieldsCollectionJSON; oldCollectionConfig: IFieldsCollectionJSON; deleteIds?: string[]; createdFieldIds: string[]; } export interface IPivotAddPivotTableInfo { pivotCacheId: string; view: IPivotViewJSON; isEmpty: boolean; fieldsConfig: IPivotTableSnapshot; collectionConfig: IFieldsCollectionJSON; } export interface IPivotDrillDownInfo { indexes: number[]; range: IRange; sourceUnitId: string; sourceSubUnitId: string; formatMap: Record; } export interface IPivotDisplayBaseInfo { view: IPivotViewJSON; changesets: IPivotTableChangeSet[]; isEmpty: boolean; pivotTableConfig: IPivotTableConfig; shouldBeAddedGroupJSON?: IBaseGroupFieldJSON; addedGroupJSON?: IBaseGroupFieldJSON[]; removedGroupJSON?: IBaseGroupFieldJSON[]; } export interface ISendPivotViewItemLocalParams extends IPivotLocalMutationBaseParams { runtimeId?: string; blockedRange?: IPivotBlockedRange; blockedByWorksheet?: boolean; direction?: 'ltr' | 'rtl'; view: IPivotViewJSON; pivotConfig: IPivotTableConfig; type: PivotTableOperationEnum; } export interface ISendPivotViewLocalMutationParams { runtimeIds?: Record; single?: ISendPivotViewItemLocalParams; batch?: ISendPivotViewItemLocalParams[]; collectionConfig?: Record; pivotCacheConfigs?: IPivotTableJson['pivotCacheConfigs']; } export interface ISendPivotConfigLocalMutationParams { runtimeId?: string; runtimeIds?: Record; unitId: string; subUnitId: string; oldSubUnitId: string; pivotTableId: string; pivotTableConfig: IPivotTableConfig; collectionConfig: IDataFieldManagerJSON; pivotCacheConfigs?: IPivotTableJson['pivotCacheConfigs']; } export interface ISendInitPivotTextLocalMutationParams { textInfo: Record; direction: 'ltr' | 'rtl'; } export interface IInitializePivotRuntimeParams { unitId: string; runtimeId: string; sequence: number; } export interface IPivotRuntimeInitializedParams extends IInitializePivotRuntimeParams { error?: 'calculation-failed'; } export interface ISendPivotDataLocalMutationParams extends IPivotLocalMutationBaseParams { version: string; result: IPivotDisplayResult; error?: string; } export interface IPivotTextInfo { subTotal: string; grandTotal: string; blank: string; other: string; value: string; averageName: string; countName: string; countNumsName: string; maxName: string; minName: string; productName: string; stdDevName: string; stdDevpName: string; sumName: string; varName: string; varpName: string; } export interface IPivotPanelTableListItemBase { tableFieldId: string; displayName: string; dataFieldId: string; format?: string; subTotalType?: PivotSubtotalTypeEnum; showDataAs?: IPivotTableShowDataAsInfo; filterInfo?: IPivotTableFilterInfo; } export interface IPivotPanelSourceList { id: string; dataFieldId: string; name: string; type: PivotDataFieldDataTypeEnum; checked: boolean; pivotTableId: string; } export interface IPivotPanelDataInfo { sourceRange: IUnitRangeNameWithSubUnitId; sourceList: IPivotPanelSourceList[]; rowFields: IPivotPanelTableListItemBase[]; columnFields: IPivotPanelTableListItemBase[]; valueFields: IPivotPanelTableListItemBase[]; filterFields: IPivotPanelTableListItemBase[]; hiddenFields?: IPivotPanelTableListItemBase[]; positionInfo: IPivotTableConfig['targetCellInfo']; } export interface ICurrentDataMatrix { arrayFormulaCellDataMatrix: ObjectMatrix> | undefined; unitDataMatrix: ObjectMatrix> | undefined; } export interface IPivotFieldConfig { field: number; selectedItems?: string[]; } export interface IValueFieldConfig { field: number; subTotalType?: PivotSubtotalTypeEnum; formatString?: string; } export interface IAddPivotTableWithConfigCommandParams { sourceDataInfo: { unitId: string; subUnitId: string; range?: IRange; }; pivotTableConfig: { filters?: IPivotFieldConfig[]; rows?: IPivotFieldConfig[]; columns?: IPivotFieldConfig[]; values?: IValueFieldConfig[]; }; } export interface IUpdateInfo { collection: FieldsCollection; updateDataFieldList: { index: number; dataField: DataField; }[]; } export interface IPivotViewUpdateInfo { unitId: string; subUnitId: string; pivotTableId: string; rangesCache: IPivotRangesInfo | undefined; valueMatrix: ObjectMatrix>; type: PivotTableOperationEnum; isEmpty?: boolean; } interface IPivotTableEventParamsBase { /** * The pivot table id.When create a pivot table, the id maybe undefined. */ pivotTableId: string | undefined; /** * The unit id of workbook which the pivot table belongs to. */ unitId: string; } /** * The pivot table added event callback argument. */ export interface IPivotTableAddedEventParams extends IPivotTableEventParamsBase { /** * @property {PositionType} positionType The position type of the pivot table. */ positionType: PositionType; /** * The source range info of the pivot table. */ sourceRangeInfo: { /** * @property {number} startRow The start row of the range. */ startRow: number; /** * @property {number} endRow The end row of the range. */ endRow: number; /** * @property {number} startColumn The start column of the range. */ startColumn: number; /** * @property {number} endColumn The end column of the range. */ endColumn: number; /** * @property {string} unitId The unit id of workbook which the pivot table source range belongs to. */ unitId: string; /** * @property {string} subUnitId The sheet id of workbook which the pivot table source range belongs to. */ subUnitId: string; /** * @property {string} sheetName The sheet name of workbook which the pivot table source range belongs to. */ sheetName?: string; }; /** * The target cell info of the pivot table.Only the PositionType is 'exiting' will have this property. */ targetCellInfo?: { /** * @property {number} row The row of the target cell. */ row: number; /** * @property {number} col The column of the target cell. */ column: number; /** * @property {string} unitId The unit id of workbook which the pivot table target cell belongs to. */ unitId: string; /** * @property {string} subUnitId The sheet id of workbook which the pivot table target cell belongs to. */ subUnitId: string; /** * @property {string} sheetName The sheet name of workbook which the pivot table target cell belongs to. */ sheetName?: string; }; } /** * The pivot table removed event callback argument. */ export interface IPivotTableRemovedEventParams extends IPivotTableEventParamsBase { } /** * The pivot table updated event callback argument. */ export interface IPivotTableUpdatedEventParams extends IPivotTableEventParamsBase { /** * The pivot table change infos, may be a ui drag operation may cause multiple changes. */ changes: { /** * @property {PivotTableChangeTypeEnum} changeType The change type of the pivot table. */ changeType: PivotTableChangeTypeEnum; /** * The pivot table change info. */ changeInfo: IPivotTableChangeSet; }[]; } /** * The pivot table moved event callback argument. */ export interface IPivotTableMovedEventParams extends IPivotTableEventParamsBase { /** * @property {object} originTargetInfo The origin target info of the pivot table. */ originTargetInfo: { /** * @property {string} subUnitId The sheet id of workbook which the pivot table belongs to. */ subUnitId: string; /** * @property {string} unitId The unit id of workbook which the pivot table belongs to. */ unitId: string; /** * @property {number} row The origin row of the pivot table. */ row: number; /** * @property {number} column The origin column of the pivot table. */ column: number; }; /** * @property {object} targetCellInfo The target cell info of the pivot table. */ targetCellInfo: { /** * @property {number} row The row of the target cell. */ row: number; /** * @property {number} col The column of the target cell. */ column: number; /** * @property {string} unitId The unit id of workbook which the pivot table target cell belongs to. */ unitId: string; /** * @property {string} subUnitId The sheet id of workbook which the pivot table target cell belongs to. */ subUnitId: string; }; } /** * The pivot table rendered event callback argument. */ export interface IPivotTableRenderedEventParams extends IPivotTableEventParamsBase { /** * @property {boolean} isEmpty Whether the pivot table is empty. */ isEmpty: boolean; /** * @property {string} subUnitId The sheet id of workbook which the pivot table belongs to. */ subUnitId: string; /** * @property {changeType} changeType The change type of the pivot table. */ changeType: PivotTableOperationEnum; /** * @property {object} rangeInfo The current range info of the pivot table.When the pivot table is empty, the rangeInfo will be undefined. */ rangeInfo?: { /** * @property {Array} rowRanges The row header ranges of the pivot table. */ rowRanges: IRange[]; /** * @property {Array} colRanges The column header ranges of the pivot table. */ colRanges: IRange[]; /** * @property {Array} cornerRanges The cross range of the pivot table row and column header in the left&top. */ cornerRanges: IRange[]; /** * @property {Array} dataRanges The data ranges of the pivot table.Which is the main data of the pivot table. */ dataRanges: IRange[]; /** * @property {Array} pageRanges The page ranges of the pivot table.Which match the pivot table filters area.In excel it is the page field. */ pageRanges: IRange[]; }; } export {};