@univerjs/sheets-data-validation v0.5.4


Class: SheetDataValidationModel

Defined in: sheets-data-validation/src/models/sheet-data-validation-model.ts:39

Extends

Constructors

new SheetDataValidationModel()

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

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

Parameters

ParameterType
_dataValidationModelDataValidationModel
_univerInstanceServiceIUniverInstanceService
_dataValidatorRegistryServiceDataValidatorRegistryService
_dataValidationCacheServiceDataValidationCacheService
_dataValidationFormulaServiceDataValidationFormulaService
_dataValidationCustomFormulaServiceDataValidationCustomFormulaService
_commandServiceICommandService

Returns

SheetDataValidationModel

Overrides

Disposable.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedcore/src/shared/lifecycle.ts:96
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

Defined in: sheets-data-validation/src/models/sheet-data-validation-model.ts:285

Parameters

ParameterType
unitIdstring

Returns

void


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


getAll()

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

Defined in: sheets-data-validation/src/models/sheet-data-validation-model.ts:293

Returns

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


getRuleById()

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

Defined in: sheets-data-validation/src/models/sheet-data-validation-model.ts:269

Parameters

ParameterType
unitIdstring
subUnitIdstring
ruleIdstring

Returns

| undefined | ISheetDataValidationRule


getRuleByLocation()

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

Defined in: sheets-data-validation/src/models/sheet-data-validation-model.ts:194

Parameters

ParameterType
unitIdstring
subUnitIdstring
rownumber
colnumber

Returns

| undefined | ISheetDataValidationRule


getRuleIdByLocation()

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

Defined in: sheets-data-validation/src/models/sheet-data-validation-model.ts:189

Parameters

ParameterType
unitIdstring
subUnitIdstring
rownumber
colnumber

Returns

undefined | string


getRuleIndex()

getRuleIndex(
   unitId, 
   subUnitId, 
   ruleId): number

Defined in: sheets-data-validation/src/models/sheet-data-validation-model.ts:273

Parameters

ParameterType
unitIdstring
subUnitIdstring
ruleIdstring

Returns

number


getRuleObjectMatrix()

getRuleObjectMatrix(unitId, subUnitId): RuleMatrix

Defined in: sheets-data-validation/src/models/sheet-data-validation-model.ts:265

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

RuleMatrix


getRules()

getRules(unitId, subUnitId): ISheetDataValidationRule[]

Defined in: sheets-data-validation/src/models/sheet-data-validation-model.ts:277

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

ISheetDataValidationRule[]


getSubUnitIds()

getSubUnitIds(unitId): string[]

Defined in: sheets-data-validation/src/models/sheet-data-validation-model.ts:289

Parameters

ParameterType
unitIdstring

Returns

string[]


getUnitRules()

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

Defined in: sheets-data-validation/src/models/sheet-data-validation-model.ts:281

Parameters

ParameterType
unitIdstring

Returns

[string, ISheetDataValidationRule[]][]


getValidator()

getValidator(type): 
  | undefined
  | BaseDataValidator

Defined in: sheets-data-validation/src/models/sheet-data-validation-model.ts:185

Parameters

ParameterType
typestring

Returns

| undefined | BaseDataValidator


validator()

validator(
   rule, 
   pos, 
   _onCompete?): DataValidationStatus

Defined in: sheets-data-validation/src/models/sheet-data-validation-model.ts:203

Parameters

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

Returns

DataValidationStatus