@univerjs-pro/sheets-pivot
Version:
Univer Sheets Pivot Table
50 lines (49 loc) • 2.66 kB
TypeScript
import { IAllRuntimeData, IFeatureDirtyRangeType, IRuntimeUnitDataType, GlobalComputingStatusService, IFeatureCalculationManagerService } from '@univerjs/engine-formula';
import { ICurrentDataMatrix, IPivotCellPositionInfo, IUnitRangeNameWithSubUnitId } from '../const/type';
import { Disposable, ICommandService, IConfigService, Injector } from '@univerjs/core';
import { SheetsPivotDataSourceModel } from '../models/sheets-pivot-data-source-model';
interface IPivotDirtyViewInfo {
unitId: string;
subUnitId: string;
token: string;
}
export declare class PivotCalculatorController extends Disposable {
private _sheetsPivotDataSourceModel;
private readonly _configService;
readonly _featureCalculationManagerService: IFeatureCalculationManagerService;
private readonly _commandService;
private readonly _globalComputingSrv;
private readonly _injector;
constructor(_sheetsPivotDataSourceModel: SheetsPivotDataSourceModel, _configService: IConfigService, _featureCalculationManagerService: IFeatureCalculationManagerService, _commandService: ICommandService, _globalComputingSrv: GlobalComputingStatusService, _injector: Injector);
_init(): void;
private _globalSubject;
private _globalComputedStartHelpFunc;
private _globalComputedEndHelpFunc;
private _initGlobalComputed;
private _initPivotDataGetListener;
private _initPivotTextInfo;
_subjectCollectionChange(): void;
private _subjectFieldsCollectionChange;
_subjectViewChange(): void;
/**
* - trigger dirty view for pivot table, it will mark dirty for calc engine
* @param {IPivotDirtyViewInfo[]} dirtyInfos the dirty feature info
*/
triggerDirtyFeature(dirtyInfos: IPivotDirtyViewInfo[]): void;
removeSourceRangeChange(unitId: string, subUnitId: string, token: string): void;
handleSourceRangeChange(token: string, dataRangeInfo: IUnitRangeNameWithSubUnitId, targetInfo: IPivotCellPositionInfo): void;
/**
* GET the runtime real data from runtime data, it use for refresh the data filed used rightly data
* @param {string} sourceUnitId the source unit id of pivot table
* @param {string} sourceSubunitId the source subunit id of pivot table
* @param {IAllRuntimeData} runtimeData the runtime data
* @returns {any} the matrix data
*/
getMatrixFromRunTimeData(sourceUnitId: string, sourceSubunitId: string, runtimeData: IAllRuntimeData): ICurrentDataMatrix;
getDirtyInfo(unitId: string, subUnitId: string, token: string): {
runtimeCellData: IRuntimeUnitDataType;
dirtyRanges: IFeatureDirtyRangeType;
};
dispose(): void;
}
export {};