@univerjs/sheets-data-validation v0.5.0-beta.1 • Docs
Class: CheckboxValidator
Extends
Constructors
new CheckboxValidator()
new CheckboxValidator(localeService, injector): CheckboxValidator
Parameters
Parameter | Type |
---|---|
localeService | LocaleService |
injector | Injector |
Returns
Inherited from
Defined in
data-validation/src/validators/base-data-validator.ts:77
Properties
Property | Modifier | Type | Default value | Overrides | Inherited from | Defined in |
---|---|---|---|---|---|---|
canvasRender | public | Nullable <IBaseDataValidationWidget > | null | - | BaseDataValidator .canvasRender | data-validation/src/validators/base-data-validator.ts:71 |
dropdown | public | undefined | string | undefined | - | BaseDataValidator .dropdown | data-validation/src/validators/base-data-validator.ts:72 |
formulaInput | public | undefined | string | undefined | - | BaseDataValidator .formulaInput | data-validation/src/validators/base-data-validator.ts:70 |
id | public | string | DataValidationType.CHECKBOX | BaseDataValidator .id | - | sheets-data-validation/src/validators/checkbox-validator.ts:52 |
injector | readonly | Injector | undefined | - | BaseDataValidator .injector | data-validation/src/validators/base-data-validator.ts:79 |
localeService | readonly | LocaleService | undefined | - | BaseDataValidator .localeService | data-validation/src/validators/base-data-validator.ts:78 |
operators | public | DataValidationOperator [] | [] | BaseDataValidator .operators | - | sheets-data-validation/src/validators/checkbox-validator.ts:54 |
optionsInput | public | undefined | string | undefined | - | BaseDataValidator .optionsInput | data-validation/src/validators/base-data-validator.ts:73 |
scopes | public | string | string [] | undefined | BaseDataValidator .scopes | - | sheets-data-validation/src/validators/checkbox-validator.ts:55 |
title | public | string | 'dataValidation.checkbox.title' | BaseDataValidator .title | - | sheets-data-validation/src/validators/checkbox-validator.ts:53 |
Accessors
operatorNames
Get Signature
get operatorNames(): string[]
Returns
string
[]
Inherited from
BaseDataValidator
.operatorNames
Defined in
data-validation/src/validators/base-data-validator.ts:84
titleStr
Get Signature
get titleStr(): string
Returns
string
Inherited from
Defined in
data-validation/src/validators/base-data-validator.ts:88
Methods
generateRuleErrorMessage()
generateRuleErrorMessage(rule): string
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRuleBase |
Returns
string
Overrides
BaseDataValidator
.generateRuleErrorMessage
Defined in
sheets-data-validation/src/validators/checkbox-validator.ts:151
generateRuleName()
generateRuleName(rule): string
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRuleBase |
Returns
string
Inherited from
BaseDataValidator
.generateRuleName
Defined in
data-validation/src/validators/base-data-validator.ts:94
getExtraStyle()
getExtraStyle(rule, value): {
tb: WrapStrategy.CLIP;
}
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
value | Nullable <CellValue > |
Returns
{
tb: WrapStrategy.CLIP;
}
Name | Type | Default value | Defined in |
---|---|---|---|
tb | WrapStrategy | WrapStrategy.CLIP | sheets-data-validation/src/validators/checkbox-validator.ts:116 |
Overrides
BaseDataValidator
.getExtraStyle
Defined in
sheets-data-validation/src/validators/checkbox-validator.ts:114
getRuleFinalError()
getRuleFinalError(rule, position): string
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
position | ISheetLocationBase |
Returns
string
Inherited from
BaseDataValidator
.getRuleFinalError
Defined in
data-validation/src/validators/base-data-validator.ts:114
isEmptyCellValue()
isEmptyCellValue(cellValue): cellValue is undefined | null | void
Parameters
Parameter | Type |
---|---|
cellValue | Nullable <CellValue > |
Returns
cellValue is undefined | null | void
Inherited from
BaseDataValidator
.isEmptyCellValue
Defined in
data-validation/src/validators/base-data-validator.ts:122
isValidType()
isValidType(
cellInfo,
formula,
rule): Promise<boolean>
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <CellValue > |
formula | IFormulaResult <any > |
rule | IDataValidationRule |
Returns
Promise
<boolean
>
Overrides
Defined in
sheets-data-validation/src/validators/checkbox-validator.ts:136
normalizeFormula()
normalizeFormula(
rule,
unitId,
subUnitId): {
formula1: rule.formula1;
formula2: rule.formula2;
}
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
unitId | string |
subUnitId | string |
Returns
{
formula1: rule.formula1;
formula2: rule.formula2;
}
Name | Type | Default value | Defined in |
---|---|---|---|
formula1 | undefined | string | rule.formula1 | data-validation/src/validators/base-data-validator.ts:136 |
formula2 | undefined | string | rule.formula2 | data-validation/src/validators/base-data-validator.ts:137 |
Inherited from
BaseDataValidator
.normalizeFormula
Defined in
data-validation/src/validators/base-data-validator.ts:134
parseFormula()
parseFormula(
rule,
unitId,
subUnitId): Promise<ICheckboxFormulaResult>
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
unitId | string |
subUnitId | string |
Returns
Promise
<ICheckboxFormulaResult
>
Overrides
BaseDataValidator
.parseFormula
Defined in
sheets-data-validation/src/validators/checkbox-validator.ts:97
parseFormulaSync()
parseFormulaSync(
rule,
unitId,
subUnitId): ICheckboxFormulaResult
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
unitId | string |
subUnitId | string |
Returns
ICheckboxFormulaResult
Defined in
sheets-data-validation/src/validators/checkbox-validator.ts:120
skipDefaultFontRender()
skipDefaultFontRender(
rule,
cellValue,
pos): boolean
Parameters
Parameter | Type |
---|---|
rule | ISheetDataValidationRule |
cellValue | Nullable <CellValue > |
pos | object |
pos.column | number |
pos.row | number |
pos.subUnitId | string |
pos.unitId | string |
Returns
boolean
Overrides
BaseDataValidator.skipDefaultFontRender
Defined in
sheets-data-validation/src/validators/checkbox-validator.ts:59
transform()
transform(
cellInfo,
formula,
rule): IValidatorCellInfo<CellValue>
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <Nullable <CellValue >> |
formula | IFormulaResult <any > |
rule | IDataValidationRule |
Returns
Inherited from
Defined in
data-validation/src/validators/base-data-validator.ts:145
validator()
validator(cellInfo, rule): Promise<boolean>
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <Nullable <CellValue >> |
rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
Defined in
data-validation/src/validators/base-data-validator.ts:181
validatorFormula()
validatorFormula(
rule,
unitId,
subUnitId): IFormulaValidResult
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
unitId | string |
subUnitId | string |
Returns
Overrides
BaseDataValidator
.validatorFormula
Defined in
sheets-data-validation/src/validators/checkbox-validator.ts:69
validatorIsBetween()
validatorIsBetween(
cellInfo,
formula,
rule): Promise<boolean>
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <CellValue > |
formula | IFormulaResult <any > |
rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
BaseDataValidator
.validatorIsBetween
Defined in
data-validation/src/validators/base-data-validator.ts:157
validatorIsEqual()
validatorIsEqual(
cellInfo,
formula,
rule): Promise<boolean>
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <CellValue > |
formula | IFormulaResult <any > |
rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
BaseDataValidator
.validatorIsEqual
Defined in
data-validation/src/validators/base-data-validator.ts:149
validatorIsGreaterThan()
validatorIsGreaterThan(
cellInfo,
formula,
rule): Promise<boolean>
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <CellValue > |
formula | IFormulaResult <any > |
rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
BaseDataValidator
.validatorIsGreaterThan
Defined in
data-validation/src/validators/base-data-validator.ts:165
validatorIsGreaterThanOrEqual()
validatorIsGreaterThanOrEqual(
cellInfo,
formula,
rule): Promise<boolean>
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <CellValue > |
formula | IFormulaResult <any > |
rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
BaseDataValidator
.validatorIsGreaterThanOrEqual
Defined in
data-validation/src/validators/base-data-validator.ts:169
validatorIsLessThan()
validatorIsLessThan(
cellInfo,
formula,
rule): Promise<boolean>
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <CellValue > |
formula | IFormulaResult <any > |
rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
BaseDataValidator
.validatorIsLessThan
Defined in
data-validation/src/validators/base-data-validator.ts:173
validatorIsLessThanOrEqual()
validatorIsLessThanOrEqual(
cellInfo,
formula,
rule): Promise<boolean>
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <CellValue > |
formula | IFormulaResult <any > |
rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
BaseDataValidator
.validatorIsLessThanOrEqual
Defined in
data-validation/src/validators/base-data-validator.ts:177
validatorIsNotBetween()
validatorIsNotBetween(
cellInfo,
formula,
rule): Promise<boolean>
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <CellValue > |
formula | IFormulaResult <any > |
rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
BaseDataValidator
.validatorIsNotBetween
Defined in
data-validation/src/validators/base-data-validator.ts:161
validatorIsNotEqual()
validatorIsNotEqual(
cellInfo,
formula,
rule): Promise<boolean>
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <CellValue > |
formula | IFormulaResult <any > |
rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
BaseDataValidator
.validatorIsNotEqual
Defined in
data-validation/src/validators/base-data-validator.ts:153