@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
Parameter | Type |
---|---|
_dataValidationModel | DataValidationModel |
_univerInstanceService | IUniverInstanceService |
_dataValidatorRegistryService | DataValidatorRegistryService |
_dataValidationCacheService | DataValidationCacheService |
_dataValidationFormulaService | DataValidationFormulaService |
_dataValidationCustomFormulaService | DataValidationCustomFormulaService |
_commandService | ICommandService |
Returns
Overrides
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | core/src/shared/lifecycle.ts:96 |
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
Defined in: sheets-data-validation/src/models/sheet-data-validation-model.ts:285
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
void
dispose()
dispose(): void
Defined in: core/src/shared/lifecycle.ts:109
Returns
void
Inherited from
disposeWithMe()
disposeWithMe(disposable): IDisposable
Defined in: core/src/shared/lifecycle.ts:99
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
ensureNotDisposed()
protected ensureNotDisposed(): void
Defined in: core/src/shared/lifecycle.ts:103
Returns
void
Inherited from
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
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
ruleId | string |
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
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
row | number |
col | number |
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
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
row | number |
col | number |
Returns
undefined
| string
getRuleIndex()
getRuleIndex(
unitId,
subUnitId,
ruleId): number
Defined in: sheets-data-validation/src/models/sheet-data-validation-model.ts:273
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
ruleId | string |
Returns
number
getRuleObjectMatrix()
getRuleObjectMatrix(unitId, subUnitId): RuleMatrix
Defined in: sheets-data-validation/src/models/sheet-data-validation-model.ts:265
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
Returns
RuleMatrix
getRules()
getRules(unitId, subUnitId): ISheetDataValidationRule[]
Defined in: sheets-data-validation/src/models/sheet-data-validation-model.ts:277
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
Returns
getSubUnitIds()
getSubUnitIds(unitId): string[]
Defined in: sheets-data-validation/src/models/sheet-data-validation-model.ts:289
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
string
[]
getUnitRules()
getUnitRules(unitId): [string, ISheetDataValidationRule[]][]
Defined in: sheets-data-validation/src/models/sheet-data-validation-model.ts:281
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
[string
, ISheetDataValidationRule
[]][]
getValidator()
getValidator(type):
| undefined
| BaseDataValidator
Defined in: sheets-data-validation/src/models/sheet-data-validation-model.ts:185
Parameters
Parameter | Type |
---|---|
type | string |
Returns
| undefined
| BaseDataValidator
validator()
validator(
rule,
pos,
_onCompete?): DataValidationStatus
Defined in: sheets-data-validation/src/models/sheet-data-validation-model.ts:203
Parameters
Parameter | Type |
---|---|
rule | ISheetDataValidationRule |
pos | ISheetLocation |
_onCompete ? | (status , changed ) => void |