@univerjssheets-conditional-formattingindexclassesConditionalformattingformulaservice

@univerjs/sheets-conditional-formatting v0.5.4


Class: ConditionalFormattingFormulaService

Defined in: sheets-conditional-formatting/src/services/conditional-formatting-formula.service.ts:64

Extends

Constructors

new ConditionalFormattingFormulaService()

new ConditionalFormattingFormulaService(
   _commandService, 
   _activeDirtyManagerService, 
   _conditionalFormattingRuleModel): ConditionalFormattingFormulaService

Defined in: sheets-conditional-formatting/src/services/conditional-formatting-formula.service.ts:71

Parameters

ParameterType
_commandServiceICommandService
_activeDirtyManagerServiceIActiveDirtyManagerService
_conditionalFormattingRuleModelConditionalFormattingRuleModel

Returns

ConditionalFormattingFormulaService

Overrides

Disposable.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedcore/src/shared/lifecycle.ts:96
result$publicObservable<IFormulaItem & { isAllFinished: boolean; }>undefined-sheets-conditional-formatting/src/services/conditional-formatting-formula.service.ts:69

Methods

createCFormulaId()

createCFormulaId(cfId, formulaText): string

Defined in: sheets-conditional-formatting/src/services/conditional-formatting-formula.service.ts:295

A conditional formatting may have multiple formulas;if the formulas are identical,then the results will be consistent.

Parameters

ParameterType
cfIdstring
formulaTextstring

Returns

string


deleteCache()

deleteCache(
   unitId, 
   subUnitId, 
   cfId, 
   formulaText?): IFormulaItem[]

Defined in: sheets-conditional-formatting/src/services/conditional-formatting-formula.service.ts:258

If formulaText is not provided, then all caches related to cfId will be deleted.

Parameters

ParameterType
unitIdstring
subUnitIdstring
cfIdstring
formulaText?string

Returns

IFormulaItem[]


dispose()

dispose(): void

Defined in: core/src/shared/lifecycle.ts:109

Returns

void

Inherited from

Disposable.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe


ensureNotDisposed()

protected ensureNotDisposed(): void

Defined in: core/src/shared/lifecycle.ts:103

Returns

void

Inherited from

Disposable.ensureNotDisposed


getFormulaMatrix()

getFormulaMatrix(
   unitId, 
   subUnitId, 
   cfId, 
   formulaText): 
  | undefined
  | {
  result: undefined;
  status: FormulaResultStatus;
 }
  | {
  result: ObjectMatrix<undefined | null | string | number | boolean | void>;
  status: FormulaResultStatus;
}

Defined in: sheets-conditional-formatting/src/services/conditional-formatting-formula.service.ts:240

Parameters

ParameterType
unitIdstring
subUnitIdstring
cfIdstring
formulaTextstring

Returns

| undefined | { result: undefined; status: FormulaResultStatus; } | { result: ObjectMatrix<undefined | null | string | number | boolean | void>; status: FormulaResultStatus; }


getFormulaResultWithCoords()

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

Defined in: sheets-conditional-formatting/src/services/conditional-formatting-formula.service.ts:219

Parameters

ParameterTypeDefault value
unitIdstringundefined
subUnitIdstringundefined
cfIdstringundefined
formulaTextstringundefined
rownumber0
colnumber0

Returns

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


getSubUnitFormulaMap()

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

Defined in: sheets-conditional-formatting/src/services/conditional-formatting-formula.service.ts:174

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

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


registerFormulaWithRange()

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

Defined in: sheets-conditional-formatting/src/services/conditional-formatting-formula.service.ts:178

Parameters

ParameterType
unitIdstring
subUnitIdstring
cfIdstring
formulaTextstring
rangesIRange[]

Returns

void