@univerjsengine-formulaindexclassesDependencymanagerservice

@univerjs/engine-formula v0.5.0-beta.1 • Docs


Class: DependencyManagerService

Passively marked as dirty, register the reference and execution actions of the feature plugin. After execution, a dirty area and calculated data will be returned, causing the formula to be marked dirty again, thereby completing the calculation of the entire dependency tree.

Extends

Implements

Constructors

new DependencyManagerService()

new DependencyManagerService(): DependencyManagerService

Returns

DependencyManagerService

Inherited from

DependencyManagerBaseService.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_allTreeMapprotectedMap<number, IFormulaDependencyTree>undefined-submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:225
_definedNameMapprotectedMap<string, Map<string, Set<number>>>undefinedDependencyManagerBaseService._definedNameMapsubmodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:78
_dependencyRTreeCacheprotectedRTreeundefinedDependencyManagerBaseService._dependencyRTreeCachesubmodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:82
_disposedprotectedbooleanfalseDependencyManagerBaseService._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:93
_featureFormulaDataprotectedMap<string, Map<string, Map<string, Nullable<number>>>>undefinedDependencyManagerBaseService._featureFormulaDatasubmodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:74
_formulaDataprotectedMap<string, Map<string, ObjectMatrix<number>>>undefinedDependencyManagerBaseService._formulaDatasubmodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:76
_otherFormulaDataprotectedMap<string, Map<string, Map<string, ObjectMatrix<number>>>>undefinedDependencyManagerBaseService._otherFormulaDatasubmodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:72
_otherFormulaDataMainDataprotectedSet<string>undefinedDependencyManagerBaseService._otherFormulaDataMainDatasubmodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:80

Methods

_addAllTreeMap()

protected _addAllTreeMap(tree): void

Parameters

ParameterType
treeIFormulaDependencyTree

Returns

void

Overrides

DependencyManagerBaseService._addAllTreeMap

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:650


_addDefinedName()

protected _addDefinedName(
   unitId, 
   definedName, 
   treeId): void

Parameters

ParameterType
unitIdstring
definedNamestring
treeIdnumber

Returns

void

Inherited from

DependencyManagerBaseService._addDefinedName

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:191


_removeAllTreeMap()

protected _removeAllTreeMap(treeId): void

Parameters

ParameterType
treeIdNullable<number>

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:643


_removeDependencyRTreeCacheById()

protected _removeDependencyRTreeCacheById(unitId, sheetId): void

Parameters

ParameterType
unitIdstring
sheetIdstring

Returns

void

Inherited from

DependencyManagerBaseService._removeDependencyRTreeCacheById

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:150


_restDependencyTreeId()

protected _restDependencyTreeId(): void

Returns

void

Inherited from

DependencyManagerBaseService._restDependencyTreeId

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:134


addDependencyRTreeCache()

addDependencyRTreeCache(tree): void

Parameters

ParameterType
treeIFormulaDependencyTree

Returns

void

Implementation of

IDependencyManagerService.addDependencyRTreeCache

Inherited from

DependencyManagerBaseService.addDependencyRTreeCache

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:162


addFeatureFormulaDependency()

addFeatureFormulaDependency(
   unitId, 
   sheetId, 
   featureId, 
   dependencyTree): void

Parameters

ParameterType
unitIdstring
sheetIdstring
featureIdstring
dependencyTreeFormulaDependencyTree

Returns

void

Implementation of

IDependencyManagerService.addFeatureFormulaDependency

Overrides

DependencyManagerBaseService.addFeatureFormulaDependency

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:441


addFormulaDependency()

addFormulaDependency(
   unitId, 
   sheetId, 
   row, 
   column, 
   dependencyTree): void

Parameters

ParameterType
unitIdstring
sheetIdstring
rownumber
columnnumber
dependencyTreeIFormulaDependencyTree

Returns

void

Implementation of

IDependencyManagerService.addFormulaDependency

Overrides

DependencyManagerBaseService.addFormulaDependency

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:508


addFormulaDependencyByDefinedName()

addFormulaDependencyByDefinedName(tree, node): void

Parameters

ParameterType
treeIFormulaDependencyTree
nodeNullable<AstRootNode>

Returns

void

Implementation of

IDependencyManagerService.addFormulaDependencyByDefinedName

Inherited from

DependencyManagerBaseService.addFormulaDependencyByDefinedName

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:206


addOtherFormulaDependency()

addOtherFormulaDependency(
   unitId, 
   sheetId, 
   formulaId, 
   dependencyTree): void

Parameters

ParameterType
unitIdstring
sheetIdstring
formulaIdstring
dependencyTreeIFormulaDependencyTree

Returns

void

Implementation of

IDependencyManagerService.addOtherFormulaDependency

Overrides

DependencyManagerBaseService.addOtherFormulaDependency

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:335


addOtherFormulaDependencyMainData()

addOtherFormulaDependencyMainData(formulaId): void

Parameters

ParameterType
formulaIdstring

Returns

void

Implementation of

IDependencyManagerService.addOtherFormulaDependencyMainData

Inherited from

DependencyManagerBaseService.addOtherFormulaDependencyMainData

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:142


buildDependencyTree()

buildDependencyTree(shouldBeBuildTrees, dependencyTrees): IFormulaDependencyTree[]

Parameters

ParameterTypeDefault value
shouldBeBuildTreesIFormulaDependencyTree[]undefined
dependencyTreesIFormulaDependencyTree[][]

Returns

IFormulaDependencyTree[]

Implementation of

IDependencyManagerService.buildDependencyTree

Overrides

DependencyManagerBaseService.buildDependencyTree

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:231


clearDependencyForTree()

clearDependencyForTree(shouldBeClearTree): void

Clear the dependency relationship of the tree. establish the relationship between the parent and the child.

Parameters

ParameterType
shouldBeClearTreeNullable<IFormulaDependencyTree>

Returns

void

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:579


clearFeatureFormulaDependency()

clearFeatureFormulaDependency(unitId, sheetId?): void

Parameters

ParameterType
unitIdstring
sheetId?string

Returns

void

Implementation of

IDependencyManagerService.clearFeatureFormulaDependency

Overrides

DependencyManagerBaseService.clearFeatureFormulaDependency

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:477


clearFormulaDependency()

clearFormulaDependency(unitId, sheetId?): void

Parameters

ParameterType
unitIdstring
sheetId?string

Returns

void

Implementation of

IDependencyManagerService.clearFormulaDependency

Overrides

DependencyManagerBaseService.clearFormulaDependency

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:541


clearOtherFormulaDependency()

clearOtherFormulaDependency(unitId, sheetId?): void

Parameters

ParameterType
unitIdstring
sheetId?string

Returns

void

Implementation of

IDependencyManagerService.clearOtherFormulaDependency

Overrides

DependencyManagerBaseService.clearOtherFormulaDependency

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:390


dispose()

dispose(): void

Returns

void

Implementation of

IDependencyManagerService.dispose

Overrides

DependencyManagerBaseService.dispose

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:227


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

DependencyManagerBaseService.disposeWithMe

Defined in

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


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

DependencyManagerBaseService.ensureNotDisposed

Defined in

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


getAllTree()

getAllTree(): IFormulaDependencyTree[]

Get all FormulaDependencyTree from _otherFormulaData, _featureFormulaData, _formulaData return FormulaDependencyTree[]

Returns

IFormulaDependencyTree[]

Implementation of

IDependencyManagerService.getAllTree

Overrides

DependencyManagerBaseService.getAllTree

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:310


getFeatureFormulaDependency()

getFeatureFormulaDependency(
   unitId, 
   sheetId, 
featureId): Nullable<number>

Parameters

ParameterType
unitIdstring
sheetIdstring
featureIdstring

Returns

Nullable<number>

Implementation of

IDependencyManagerService.getFeatureFormulaDependency

Inherited from

DependencyManagerBaseService.getFeatureFormulaDependency

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:154


getFormulaDependency()

getFormulaDependency(
   unitId, 
   sheetId, 
   row, 
column): Nullable<number>

Parameters

ParameterType
unitIdstring
sheetIdstring
rownumber
columnnumber

Returns

Nullable<number>

Implementation of

IDependencyManagerService.getFormulaDependency

Inherited from

DependencyManagerBaseService.getFormulaDependency

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:158


getLastTreeId()

getLastTreeId(): number

Returns

number

Implementation of

IDependencyManagerService.getLastTreeId

Inherited from

DependencyManagerBaseService.getLastTreeId

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:181


getOtherFormulaDependency()

getOtherFormulaDependency(
   unitId, 
   sheetId, 
formulaId): undefined | ObjectMatrix<number>

Parameters

ParameterType
unitIdstring
sheetIdstring
formulaIdstring

Returns

undefined | ObjectMatrix<number>

Implementation of

IDependencyManagerService.getOtherFormulaDependency

Inherited from

DependencyManagerBaseService.getOtherFormulaDependency

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:138


getTreeById()

getTreeById(treeId): undefined | IFormulaDependencyTree

Parameters

ParameterType
treeIdnumber

Returns

undefined | IFormulaDependencyTree

Implementation of

IDependencyManagerService.getTreeById

Overrides

DependencyManagerBaseService.getTreeById

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:320


hasOtherFormulaDataMainData()

hasOtherFormulaDataMainData(formulaId): boolean

Parameters

ParameterType
formulaIdstring

Returns

boolean

Implementation of

IDependencyManagerService.hasOtherFormulaDataMainData

Inherited from

DependencyManagerBaseService.hasOtherFormulaDataMainData

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:146


removeFeatureFormulaDependency()

removeFeatureFormulaDependency(
   unitId, 
   sheetId, 
   featureIds): void

Parameters

ParameterType
unitIdstring
sheetIdstring
featureIdsstring[]

Returns

void

Implementation of

IDependencyManagerService.removeFeatureFormulaDependency

Overrides

DependencyManagerBaseService.removeFeatureFormulaDependency

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:458


removeFormulaDependency()

removeFormulaDependency(
   unitId, 
   sheetId, 
   row, 
   column): void

Parameters

ParameterType
unitIdstring
sheetIdstring
rownumber
columnnumber

Returns

void

Implementation of

IDependencyManagerService.removeFormulaDependency

Overrides

DependencyManagerBaseService.removeFormulaDependency

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:524


removeFormulaDependencyByDefinedName()

removeFormulaDependencyByDefinedName(unitId, definedName): void

Parameters

ParameterType
unitIdstring
definedNamestring

Returns

void

Implementation of

IDependencyManagerService.removeFormulaDependencyByDefinedName

Overrides

DependencyManagerBaseService.removeFormulaDependencyByDefinedName

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:627


removeOtherFormulaDependency()

removeOtherFormulaDependency(
   unitId, 
   sheetId, 
   formulaIds): void

Parameters

ParameterType
unitIdstring
sheetIdstring
formulaIdsstring[]

Returns

void

Implementation of

IDependencyManagerService.removeOtherFormulaDependency

Overrides

DependencyManagerBaseService.removeOtherFormulaDependency

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:359


reset()

reset(): void

Returns

void

Implementation of

IDependencyManagerService.reset

Overrides

DependencyManagerBaseService.reset

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:324


searchDependency()

searchDependency(search, exceptTreeIds?): Set<number>

Parameters

ParameterType
searchIUnitRange[]
exceptTreeIds?Set<number>

Returns

Set<number>

Implementation of

IDependencyManagerService.searchDependency

Inherited from

DependencyManagerBaseService.searchDependency

Defined in

submodules/univer/packages/engine-formula/src/services/dependency-manager.service.ts:130