API Reference
@univerjs
@univerjs/sheets-data-validation
classes
Sheetdatavalidationmodel

@univerjs/sheets-data-validation v0.4.2Docs


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 (opens in a new tab)

Properties

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

Methods

deleteUnitRules()

deleteUnitRules(unitId): void

Parameters

ParameterType
unitIdstring

Returns

void

Defined in

sheets-data-validation/src/models/sheet-data-validation-model.ts:319 (opens in a new tab)


dispose()

dispose(): void

Returns

void

Inherited from

Disposable.dispose

Defined in

core/src/shared/lifecycle.ts:106 (opens in a new tab)


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

core/src/shared/lifecycle.ts:96 (opens in a new tab)


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

core/src/shared/lifecycle.ts:100 (opens in a new tab)


getAll()

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

Returns

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

Defined in

sheets-data-validation/src/models/sheet-data-validation-model.ts:327 (opens in a new tab)


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:303 (opens in a new tab)


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:199 (opens in a new tab)


getRuleErrorMsg()

getRuleErrorMsg(
   unitId, 
   subUnitId, 
   ruleId): string

Parameters

ParameterType
unitIdstring
subUnitIdstring
ruleIdstring

Returns

string

Defined in

sheets-data-validation/src/models/sheet-data-validation-model.ts:282 (opens in a new tab)


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:194 (opens in a new tab)


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:307 (opens in a new tab)


getRuleObjectMatrix()

getRuleObjectMatrix(unitId, subUnitId): RuleMatrix

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

RuleMatrix

Defined in

sheets-data-validation/src/models/sheet-data-validation-model.ts:299 (opens in a new tab)


getRules()

getRules(unitId, subUnitId): ISheetDataValidationRule[]

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

ISheetDataValidationRule[]

Defined in

sheets-data-validation/src/models/sheet-data-validation-model.ts:311 (opens in a new tab)


getSubUnitIds()

getSubUnitIds(unitId): string[]

Parameters

ParameterType
unitIdstring

Returns

string[]

Defined in

sheets-data-validation/src/models/sheet-data-validation-model.ts:323 (opens in a new tab)


getUnitRules()

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

Parameters

ParameterType
unitIdstring

Returns

[string, ISheetDataValidationRule[]][]

Defined in

sheets-data-validation/src/models/sheet-data-validation-model.ts:315 (opens in a new tab)


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:190 (opens in a new tab)


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:208 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.