@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
Parameter | Type |
---|---|
_dataValidationModel | DataValidationModel |
_univerInstanceService | IUniverInstanceService |
_dataValidatorRegistryService | DataValidatorRegistryService |
_dataValidationCacheService | DataValidationCacheService |
_dataValidationFormulaService | DataValidationFormulaService |
_dataValidationCustomFormulaService | DataValidationCustomFormulaService |
_commandService | ICommandService |
Returns
Overrides
Defined in
sheets-data-validation/src/models/sheet-data-validation-model.ts:47
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | core/src/shared/lifecycle.ts:93 |
ruleChange$ | readonly | Observable <IRuleChange > | undefined | - | sheets-data-validation/src/models/sheet-data-validation-model.ts:44 |
validStatusChange$ | readonly | Observable <IValidStatusChange > | undefined | - | sheets-data-validation/src/models/sheet-data-validation-model.ts:45 |
Methods
deleteUnitRules()
deleteUnitRules(unitId): void
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
void
Defined in
sheets-data-validation/src/models/sheet-data-validation-model.ts:300
dispose()
dispose(): void
Returns
void
Inherited from
Defined in
core/src/shared/lifecycle.ts:106
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
core/src/shared/lifecycle.ts:96
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
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
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
ruleId | string |
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
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
row | number |
col | number |
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
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
row | number |
col | number |
Returns
undefined
| string
Defined in
sheets-data-validation/src/models/sheet-data-validation-model.ts:192
getRuleIndex()
getRuleIndex(
unitId,
subUnitId,
ruleId): number
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
ruleId | string |
Returns
number
Defined in
sheets-data-validation/src/models/sheet-data-validation-model.ts:288
getRuleObjectMatrix()
getRuleObjectMatrix(unitId, subUnitId): RuleMatrix
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
Returns
RuleMatrix
Defined in
sheets-data-validation/src/models/sheet-data-validation-model.ts:280
getRules()
getRules(unitId, subUnitId): ISheetDataValidationRule[]
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
Returns
Defined in
sheets-data-validation/src/models/sheet-data-validation-model.ts:292
getSubUnitIds()
getSubUnitIds(unitId): string[]
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
string
[]
Defined in
sheets-data-validation/src/models/sheet-data-validation-model.ts:304
getUnitRules()
getUnitRules(unitId): [string, ISheetDataValidationRule[]][]
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
[string
, ISheetDataValidationRule
[]][]
Defined in
sheets-data-validation/src/models/sheet-data-validation-model.ts:296
getValidator()
getValidator(type): undefined | BaseDataValidator<CellValue>
Parameters
Parameter | Type |
---|---|
type | DataValidationType |
Returns
undefined
| BaseDataValidator
<CellValue
>
Defined in
sheets-data-validation/src/models/sheet-data-validation-model.ts:188
validator()
validator(
rule,
pos,
_onCompete?): DataValidationStatus
Parameters
Parameter | Type |
---|---|
rule | ISheetDataValidationRule |
pos | ISheetLocation |
_onCompete ? | (status , changed ) => void |
Returns
Defined in
sheets-data-validation/src/models/sheet-data-validation-model.ts:206