@univerjs/sheets-data-validation v0.4.2 • 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 (opens in a new tab)
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | core/src/shared/lifecycle.ts:93 (opens in a new tab) |
ruleChange$ | readonly | Observable <IRuleChange > | undefined | - | sheets-data-validation/src/models/sheet-data-validation-model.ts:44 (opens in a new tab) |
validStatusChange$ | readonly | Observable <IValidStatusChange > | undefined | - | sheets-data-validation/src/models/sheet-data-validation-model.ts:45 (opens in a new tab) |
Methods
deleteUnitRules()
deleteUnitRules(unitId): void
Parameters
Parameter | Type |
---|---|
unitId | string |
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
Defined in
core/src/shared/lifecycle.ts:106 (opens in a new tab)
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
core/src/shared/lifecycle.ts:96 (opens in a new tab)
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
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
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
ruleId | string |
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
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:199 (opens in a new tab)
getRuleErrorMsg()
getRuleErrorMsg(
unitId,
subUnitId,
ruleId): string
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
ruleId | string |
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
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:194 (opens in a new tab)
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:307 (opens in a new tab)
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:299 (opens in a new tab)
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:311 (opens in a new tab)
getSubUnitIds()
getSubUnitIds(unitId): string[]
Parameters
Parameter | Type |
---|---|
unitId | string |
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
Parameter | Type |
---|---|
unitId | string |
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
Parameter | Type |
---|---|
type | DataValidationType |
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
Parameter | Type |
---|---|
rule | ISheetDataValidationRule |
pos | ISheetLocation |
_onCompete ? | (status , changed ) => void |
Returns
Defined in
sheets-data-validation/src/models/sheet-data-validation-model.ts:208 (opens in a new tab)