@univerjs-prosheets-pivotindexclassesSheetspivottableadaptormodel

@univerjs-pro/sheets-pivot v0.5.0-beta.1 • Docs


Class: SheetsPivotTableAdaptorModel

Extends

Constructors

new SheetsPivotTableAdaptorModel()

new SheetsPivotTableAdaptorModel(
   _localeService, 
   _injector, 
   _sheetsPivotTableConfigModel, 
   _univerInstanceService, 
   _exclusiveRangeService): SheetsPivotTableAdaptorModel

Parameters

ParameterType
_localeServiceLocaleService
_injectorInjector
_sheetsPivotTableConfigModelSheetsPivotTableConfigModel
_univerInstanceServiceIUniverInstanceService
_exclusiveRangeServiceIExclusiveRangeService

Returns

SheetsPivotTableAdaptorModel

Overrides

Disposable.constructor

Defined in

packages/sheets-pivot/src/models/sheets-pivot-table-adaptor-model.ts:24

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:93
markDirty$publicObservable<{ subUnitId: string; unitId: string; }>undefined-packages/sheets-pivot/src/models/sheets-pivot-table-adaptor-model.ts:17
viewUpdate$publicObservable<{ pivotTableId: string; rangesCache: undefined | IPivotRangesInfo; subUnitId: string; type: PivotTableOperationEnum; unitId: string; valueMatrix: ObjectMatrix<Nullable<IPivotTableCellData>>; }>undefined-packages/sheets-pivot/src/models/sheets-pivot-table-adaptor-model.ts:20

Methods

clearRenderCache()

clearRenderCache(config): void

Parameters

ParameterType
configIPivotTableConfigChangeInfo

Returns

void

Defined in

packages/sheets-pivot/src/models/sheets-pivot-table-adaptor-model.ts:148


deleteUnitId()

deleteUnitId(unitId): void

Parameters

ParameterType
unitIdstring

Returns

void

Defined in

packages/sheets-pivot/src/models/sheets-pivot-table-adaptor-model.ts:267


dispose()

dispose(): void

Returns

void

Inherited from

Disposable.dispose

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:106


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:96


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:100


getIntersectsPivotTable()

getIntersectsPivotTable(
   unitId, 
   subUnitId, 
   range): string[]

Get pivot table ids that intersect with the range

Parameters

ParameterTypeDescription
unitIdstringThe test unit id of range
subUnitIdstringThe sub unit id of range
rangeIRangeThe range to check

Returns

string[]

The pivot table ids that intersect with the range

Defined in

packages/sheets-pivot/src/models/sheets-pivot-table-adaptor-model.ts:230


getPivotItemRenderInfoCache()

getPivotItemRenderInfoCache(
   unitId, 
   subUnitId, 
pivotTableId): Nullable<IPivotRenderCache>

Parameters

ParameterType
unitIdstring
subUnitIdstring
pivotTableIdstring

Returns

Nullable<IPivotRenderCache>

Defined in

packages/sheets-pivot/src/models/sheets-pivot-table-adaptor-model.ts:263


getPivotTableCellData()

getPivotTableCellData(
   unitId, 
   subUnitId, 
   row, 
   col): undefined | IPivotTableCellData

Parameters

ParameterType
unitIdstring
subUnitIdstring
rownumber
colnumber

Returns

undefined | IPivotTableCellData

Defined in

packages/sheets-pivot/src/models/sheets-pivot-table-adaptor-model.ts:197


getPivotTableIdByCell()

getPivotTableIdByCell(
   unitId, 
   subUnitId, 
   row, 
col): Nullable<string>

Parameters

ParameterType
unitIdstring
subUnitIdstring
rownumber
colnumber

Returns

Nullable<string>

Defined in

packages/sheets-pivot/src/models/sheets-pivot-table-adaptor-model.ts:205


getSubUnitPivotMatrix()

getSubUnitPivotMatrix(unitId, subUnitId): ObjectMatrix<Nullable<IPivotTableCellData>>

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

ObjectMatrix<Nullable<IPivotTableCellData>>

Defined in

packages/sheets-pivot/src/models/sheets-pivot-table-adaptor-model.ts:259


markDirty()

markDirty(unitId, subUnitId): void

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

void

Defined in

packages/sheets-pivot/src/models/sheets-pivot-table-adaptor-model.ts:272


updateRenderCache()

updateRenderCache(config): undefined | {
  matrix: ObjectMatrix<Nullable<IPivotTableCellData>>;
  rangeCache: undefined | IPivotRangesInfo;
}

Parameters

ParameterType
configIPivotTableConfigChangeInfo

Returns

undefined | { matrix: ObjectMatrix<Nullable<IPivotTableCellData>>; rangeCache: undefined | IPivotRangesInfo; }

Defined in

packages/sheets-pivot/src/models/sheets-pivot-table-adaptor-model.ts:48