@univerjssheets-conditional-formattingclassesConditionalformattingformulaservice

@univerjs/sheets-conditional-formatting v0.5.0-beta.1Docs


Class: ConditionalFormattingFormulaService

Extends

Constructors

new ConditionalFormattingFormulaService()

new ConditionalFormattingFormulaService(
   _commandService, 
   _injector, 
   _activeDirtyManagerService, 
   _conditionalFormattingViewModel, 
   _conditionalFormattingRuleModel): ConditionalFormattingFormulaService

Parameters

ParameterType
_commandServiceICommandService
_injectorInjector
_activeDirtyManagerServiceIActiveDirtyManagerService
_conditionalFormattingViewModelConditionalFormattingViewModel
_conditionalFormattingRuleModelConditionalFormattingRuleModel

Returns

ConditionalFormattingFormulaService

Overrides

Disposable.constructor

Defined in

sheets-conditional-formatting/src/services/conditional-formatting-formula.service.ts:68

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedcore/src/shared/lifecycle.ts:93

Methods

createCFormulaId()

createCFormulaId(cfId, formulaText): string

Parameters

ParameterType
cfIdstring
formulaTextstring

Returns

string

Defined in

sheets-conditional-formatting/src/services/conditional-formatting-formula.service.ts:307


dispose()

dispose(): void

Returns

void

Inherited from

Disposable.dispose

Defined in

core/src/shared/lifecycle.ts:106


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

core/src/shared/lifecycle.ts:96


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

core/src/shared/lifecycle.ts:100


getCache()

getCache(
   unitId, 
   subUnitId, 
cfId): undefined | ObjectMatrix<unknown>

Parameters

ParameterType
unitIdstring
subUnitIdstring
cfIdstring

Returns

undefined | ObjectMatrix<unknown>

Defined in

sheets-conditional-formatting/src/services/conditional-formatting-formula.service.ts:230


getFormulaResult()

getFormulaResult(
   unitId, 
   subUnitId, 
   cfId, 
   formulaText, 
   row, 
   col): {
  result: undefined;
  status: FormulaResultStatus.NOT_REGISTER;
 } | {
  result: Nullable<
     | undefined
     | null
     | string
     | number
     | boolean
     | void>;
  status: FormulaResultStatus.SUCCESS;
}

Parameters

ParameterTypeDefault value
unitIdstringundefined
subUnitIdstringundefined
cfIdstringundefined
formulaTextstringundefined
rownumber0
colnumber0

Returns

{ result: undefined; status: FormulaResultStatus.NOT_REGISTER; } | { result: Nullable< | undefined | null | string | number | boolean | void>; status: FormulaResultStatus.SUCCESS; }

Defined in

sheets-conditional-formatting/src/services/conditional-formatting-formula.service.ts:282


getSubUnitFormulaMap()

getSubUnitFormulaMap(unitId, subUnitId): undefined | RefAlias<IFormulaItem, "id" | "formulaId">

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

undefined | RefAlias<IFormulaItem, "id" | "formulaId">

Defined in

sheets-conditional-formatting/src/services/conditional-formatting-formula.service.ts:235


registerFormulaWithRange()

registerFormulaWithRange(
   unitId, 
   subUnitId, 
   cfId, 
   formulaText, 
   ranges): void

Parameters

ParameterType
unitIdstring
subUnitIdstring
cfIdstring
formulaTextstring
rangesIRange[]

Returns

void

Defined in

sheets-conditional-formatting/src/services/conditional-formatting-formula.service.ts:239