@univerjs/data-validation v0.5.0-beta.1 • Docs
Class: DataValidationModel
Extends
Constructors
new DataValidationModel()
new DataValidationModel(_logService): DataValidationModel
Parameters
Parameter | Type |
---|---|
_logService | ILogService |
Returns
Overrides
Defined in
data-validation/src/models/data-validation-model.ts:48
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | core/src/shared/lifecycle.ts:93 |
ruleChange$ | public | Observable <IRuleChange > | undefined | - | data-validation/src/models/data-validation-model.ts:45 |
ruleChangeDebounce$ | public | Observable <IRuleChange > | undefined | - | data-validation/src/models/data-validation-model.ts:46 |
Methods
addRule()
addRule(
unitId,
subUnitId,
rule,
source,
index?): void
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
rule | IDataValidationRule | IDataValidationRule [] |
source | DataValidationChangeSource |
index ? | number |
Returns
void
Defined in
data-validation/src/models/data-validation-model.ts:156
deleteUnitRules()
deleteUnitRules(unitId): void
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
void
Defined in
data-validation/src/models/data-validation-model.ts:243
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
data-validation/src/models/data-validation-model.ts:251
getRuleById()
getRuleById(
unitId,
subUnitId,
ruleId): undefined | IDataValidationRule
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
ruleId | string |
Returns
undefined
| IDataValidationRule
Defined in
data-validation/src/models/data-validation-model.ts:214
getRuleIndex()
getRuleIndex(
unitId,
subUnitId,
ruleId): number
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
ruleId | string |
Returns
number
Defined in
data-validation/src/models/data-validation-model.ts:219
getRules()
getRules(unitId, subUnitId): IDataValidationRule[]
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
Returns
Defined in
data-validation/src/models/data-validation-model.ts:224
getSubUnitIds()
getSubUnitIds(unitId): string[]
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
string
[]
Defined in
data-validation/src/models/data-validation-model.ts:247
getUnitRules()
getUnitRules(unitId): [string, IDataValidationRule[]][]
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
[string
, IDataValidationRule
[]][]
Defined in
data-validation/src/models/data-validation-model.ts:229
removeRule()
removeRule(
unitId,
subUnitId,
ruleId,
source): void
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
ruleId | string |
source | DataValidationChangeSource |
Returns
void
Defined in
data-validation/src/models/data-validation-model.ts:195
updateRule()
updateRule(
unitId,
subUnitId,
ruleId,
payload,
source): void
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
ruleId | string |
payload | IUpdateRulePayload |
source | DataValidationChangeSource |
Returns
void
Defined in
data-validation/src/models/data-validation-model.ts:173