@univerjs-pro/sheets-pivot
Version:
Pivot table integration for Univer Sheets.
65 lines (64 loc) • 3.85 kB
TypeScript
import type { IFieldsCollectionJSON } from '@univerjs-pro/engine-pivot';
import type { Nullable, ObjectMatrix } from '@univerjs/core';
import type { IDataFieldManagerJSON, IPivotCellPositionInfo, IPivotRangesInfo, IPivotTableCellData, IPivotTableConfig, IPivotTableMatrixInfo, IPivotTableRangeInfo } from '../const/type';
import { Disposable, ICommandService, IConfigService, Injector, IResourceManagerService, IUniverInstanceService } from '@univerjs/core';
export declare class SheetsPivotTableConfigModel extends Disposable {
private _injector;
private _commandService;
private _univerInstanceService;
private _resourceManagerService;
private readonly _configService;
private _model;
private _collectionConfigModel;
private _pivotTableRangeInfo;
private _pivotTableMatrixInfo;
private _configVersion$;
private _pivotInitCompleted$;
pivotInitCompleted$: import("rxjs").Observable<boolean>;
private _pivotConfigChange$;
pivotConfigChange$: import("rxjs").Observable<{
unitId: string;
subUnitId: string;
pivotTableId: string;
pivotTableConfig: Nullable<IPivotTableConfig>;
}>;
private _textInfo;
configVersion$: import("rxjs").Observable<number>;
constructor(_injector: Injector, _commandService: ICommandService, _univerInstanceService: IUniverInstanceService, _resourceManagerService: IResourceManagerService, _configService: IConfigService);
private _initUnitDisposed;
setPivotInitCompleted(): void;
private _initLocale;
getTextInfo(): Record<string, string>;
updateViewInfo(unitId: string, subUnitId: string, pivotTableId: string, valueMatrix: ObjectMatrix<Nullable<IPivotTableCellData>>, rangesCache: IPivotRangesInfo | undefined): void;
getPivotTableConfig(unitId: string, subUnitId: string, pivotTableId: string): Nullable<IPivotTableConfig>;
getTargetByPivotTableId(unitId: string, pivotTableId: string): IPivotCellPositionInfo | undefined;
getTargetByPivotId(unitId: string, subUnitId: string, pivotTableId: string): Nullable<IPivotCellPositionInfo>;
getSubUnitPivotConfigs(unitId: string, subUnitId: string): Map<string, IPivotTableConfig> | undefined;
updateConfigCache(unitId: string, subUnitId: string, pivotTableId: string, pivotTableConfig: Nullable<IPivotTableConfig>): void;
getCollection(unitId: string, pivotTableId: string): IFieldsCollectionJSON | undefined;
updateCollectionConfig(unitId: string, collectionConfig: IDataFieldManagerJSON): void;
private _ensurePivotMap;
private _ensurePivotTableRangeInfo;
private _ensurePivotTableMatrixInfo;
updatePivotTableRangeInfo(unitId: string, subUnitId: string, pivotTableId: string, rangeInfo: IPivotRangesInfo | undefined): void;
updatePivotTableMatrixInfo(unitId: string, subUnitId: string, pivotTableId: string, matrixInfo: ObjectMatrix<Nullable<IPivotTableCellData>>): void;
/**
* - get the pivot table range info for sheet or calc engine
* @param {string} unitId - the unit id
* @param {string} subUnitId - the sub unit id
* @param {string} pivotTableId - the pivot table id
* @returns {IPivotTableRangeInfo} - the pivot table range info
*/
getPivotTableRangeInfo(unitId: string, subUnitId: string, pivotTableId: string): IPivotTableRangeInfo | undefined;
/**
* - get the pivot table matrix info for sheet or calc engine
* @param {string} unitId - the unit id
* @param {string} subUnitId - the sub unit id
* @param {string} pivotTableId - the pivot table id
* @returns {IPivotTableMatrixInfo} - the pivot table matrix info
*/
getPivotTableMatrixInfo(unitId: string, subUnitId: string, pivotTableId: string): IPivotTableMatrixInfo | undefined;
deleteUnitId(unitId: string): void;
private _toJSON;
private _initSnapshot;
}