@univerjs/data-validation v0.5.4
Class: DataValidationModel
Defined in: data-validation/src/models/data-validation-model.ts:41
Extends
Constructors
new DataValidationModel()
new DataValidationModel(_logService): DataValidationModel
Defined in: data-validation/src/models/data-validation-model.ts:48
Parameters
Parameter | Type |
---|---|
_logService | ILogService |
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$ | 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
Defined in: data-validation/src/models/data-validation-model.ts:156
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
rule | | IDataValidationRule | IDataValidationRule [] |
source | DataValidationChangeSource |
index ? | number |
Returns
void
deleteUnitRules()
deleteUnitRules(unitId): void
Defined in: data-validation/src/models/data-validation-model.ts:243
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: data-validation/src/models/data-validation-model.ts:251
Returns
readonly [string
, [string
, IDataValidationRule
[]][]][]
getRuleById()
getRuleById(
unitId,
subUnitId,
ruleId):
| undefined
| IDataValidationRule
Defined in: data-validation/src/models/data-validation-model.ts:214
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
ruleId | string |
Returns
| undefined
| IDataValidationRule
getRuleIndex()
getRuleIndex(
unitId,
subUnitId,
ruleId): number
Defined in: data-validation/src/models/data-validation-model.ts:219
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
ruleId | string |
Returns
number
getRules()
getRules(unitId, subUnitId): IDataValidationRule[]
Defined in: data-validation/src/models/data-validation-model.ts:224
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
Returns
getSubUnitIds()
getSubUnitIds(unitId): string[]
Defined in: data-validation/src/models/data-validation-model.ts:247
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
string
[]
getUnitRules()
getUnitRules(unitId): [string, IDataValidationRule[]][]
Defined in: data-validation/src/models/data-validation-model.ts:229
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
[string
, IDataValidationRule
[]][]
removeRule()
removeRule(
unitId,
subUnitId,
ruleId,
source): void
Defined in: data-validation/src/models/data-validation-model.ts:195
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
ruleId | string |
source | DataValidationChangeSource |
Returns
void
updateRule()
updateRule(
unitId,
subUnitId,
ruleId,
payload,
source): void
Defined in: data-validation/src/models/data-validation-model.ts:173
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
ruleId | string |
payload | IUpdateRulePayload |
source | DataValidationChangeSource |
Returns
void