@univerjs/sheets-data-validation v0.5.0-beta.1 • Docs


Class: SheetDataValidationModel

Extends

Constructors

new SheetDataValidationModel()

new SheetDataValidationModel(
   _dataValidationModel, 
   _univerInstanceService, 
   _dataValidatorRegistryService, 
   _dataValidationCacheService, 
   _dataValidationFormulaService, 
   _dataValidationCustomFormulaService, 
   _commandService): SheetDataValidationModel

Parameters

ParameterType
_dataValidationModelDataValidationModel
_univerInstanceServiceIUniverInstanceService
_dataValidatorRegistryServiceDataValidatorRegistryService
_dataValidationCacheServiceDataValidationCacheService
_dataValidationFormulaServiceDataValidationFormulaService
_dataValidationCustomFormulaServiceDataValidationCustomFormulaService
_commandServiceICommandService

Returns

SheetDataValidationModel

Overrides

Disposable.constructor

Defined in

sheets-data-validation/src/models/sheet-data-validation-model.ts:47

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedcore/src/shared/lifecycle.ts:93
ruleChange$readonlyObservable<IRuleChange>undefined-sheets-data-validation/src/models/sheet-data-validation-model.ts:44
validStatusChange$readonlyObservable<IValidStatusChange>undefined-sheets-data-validation/src/models/sheet-data-validation-model.ts:45

Methods

deleteUnitRules()

deleteUnitRules(unitId): void

Parameters

ParameterType
unitIdstring

Returns

void

Defined in

sheets-data-validation/src/models/sheet-data-validation-model.ts:300


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


getAll()

getAll(): readonly [string, [string, IDataValidationRule[]][]][]

Returns

readonly [string, [string, IDataValidationRule[]][]][]

Defined in

sheets-data-validation/src/models/sheet-data-validation-model.ts:308


getRuleById()

getRuleById(
   unitId, 
   subUnitId, 
   ruleId): undefined | ISheetDataValidationRule

Parameters

ParameterType
unitIdstring
subUnitIdstring
ruleIdstring

Returns

undefined | ISheetDataValidationRule

Defined in

sheets-data-validation/src/models/sheet-data-validation-model.ts:284


getRuleByLocation()

getRuleByLocation(
   unitId, 
   subUnitId, 
   row, 
   col): undefined | ISheetDataValidationRule

Parameters

ParameterType
unitIdstring
subUnitIdstring
rownumber
colnumber

Returns

undefined | ISheetDataValidationRule

Defined in

sheets-data-validation/src/models/sheet-data-validation-model.ts:197


getRuleIdByLocation()

getRuleIdByLocation(
   unitId, 
   subUnitId, 
   row, 
   col): undefined | string

Parameters

ParameterType
unitIdstring
subUnitIdstring
rownumber
colnumber

Returns

undefined | string

Defined in

sheets-data-validation/src/models/sheet-data-validation-model.ts:192


getRuleIndex()

getRuleIndex(
   unitId, 
   subUnitId, 
   ruleId): number

Parameters

ParameterType
unitIdstring
subUnitIdstring
ruleIdstring

Returns

number

Defined in

sheets-data-validation/src/models/sheet-data-validation-model.ts:288


getRuleObjectMatrix()

getRuleObjectMatrix(unitId, subUnitId): RuleMatrix

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

RuleMatrix

Defined in

sheets-data-validation/src/models/sheet-data-validation-model.ts:280


getRules()

getRules(unitId, subUnitId): ISheetDataValidationRule[]

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

ISheetDataValidationRule[]

Defined in

sheets-data-validation/src/models/sheet-data-validation-model.ts:292


getSubUnitIds()

getSubUnitIds(unitId): string[]

Parameters

ParameterType
unitIdstring

Returns

string[]

Defined in

sheets-data-validation/src/models/sheet-data-validation-model.ts:304


getUnitRules()

getUnitRules(unitId): [string, ISheetDataValidationRule[]][]

Parameters

ParameterType
unitIdstring

Returns

[string, ISheetDataValidationRule[]][]

Defined in

sheets-data-validation/src/models/sheet-data-validation-model.ts:296


getValidator()

getValidator(type): undefined | BaseDataValidator<CellValue>

Parameters

ParameterType
typeDataValidationType

Returns

undefined | BaseDataValidator<CellValue>

Defined in

sheets-data-validation/src/models/sheet-data-validation-model.ts:188


validator()

validator(
   rule, 
   pos, 
   _onCompete?): DataValidationStatus

Parameters

ParameterType
ruleISheetDataValidationRule
posISheetLocation
_onCompete?(status, changed) => void

Returns

DataValidationStatus

Defined in

sheets-data-validation/src/models/sheet-data-validation-model.ts:206