@univerjs/sheets-data-validation v0.5.4
Class: CheckboxValidator
Defined in: sheets-data-validation/src/validators/checkbox-validator.ts:51
Extends
Constructors
new CheckboxValidator()
new CheckboxValidator(localeService, injector): CheckboxValidator
Defined in: data-validation/src/validators/base-data-validator.ts:79
Parameters
Parameter | Type |
---|---|
localeService | LocaleService |
injector | Injector |
Returns
Inherited from
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:73 |
dropdown | public | undefined | string | undefined | - | BaseDataValidator .dropdown | data-validation/src/validators/base-data-validator.ts:74 |
formulaInput | public | undefined | string | undefined | - | BaseDataValidator .formulaInput | data-validation/src/validators/base-data-validator.ts:72 |
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:81 |
localeService | readonly | LocaleService | undefined | - | BaseDataValidator .localeService | data-validation/src/validators/base-data-validator.ts:80 |
offsetFormulaByRange | readonly | false | false | BaseDataValidator .offsetFormulaByRange | - | sheets-data-validation/src/validators/checkbox-validator.ts:57 |
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:75 |
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[]
Defined in: data-validation/src/validators/base-data-validator.ts:86
Returns
string
[]
Inherited from
BaseDataValidator
.operatorNames
titleStr
Get Signature
get titleStr(): string
Defined in: data-validation/src/validators/base-data-validator.ts:90
Returns
string
Inherited from
Methods
generateRuleErrorMessage()
generateRuleErrorMessage(rule): string
Defined in: sheets-data-validation/src/validators/checkbox-validator.ts:153
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRuleBase |
Returns
string
Overrides
BaseDataValidator
.generateRuleErrorMessage
generateRuleName()
generateRuleName(rule): string
Defined in: data-validation/src/validators/base-data-validator.ts:96
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRuleBase |
Returns
string
Inherited from
BaseDataValidator
.generateRuleName
getExtraStyle()
getExtraStyle(rule, value): {
tb: WrapStrategy;
}
Defined in: sheets-data-validation/src/validators/checkbox-validator.ts:116
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
value | Nullable <CellValue > |
Returns
{
tb: WrapStrategy;
}
Name | Type | Default value | Defined in |
---|---|---|---|
tb | WrapStrategy | WrapStrategy.CLIP | sheets-data-validation/src/validators/checkbox-validator.ts:118 |
Overrides
BaseDataValidator
.getExtraStyle
getRuleFinalError()
getRuleFinalError(rule, position): string
Defined in: data-validation/src/validators/base-data-validator.ts:116
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
position | ISheetLocationBase |
Returns
string
Inherited from
BaseDataValidator
.getRuleFinalError
isEmptyCellValue()
isEmptyCellValue(cellValue): cellValue is undefined | null | void
Defined in: data-validation/src/validators/base-data-validator.ts:124
Parameters
Parameter | Type |
---|---|
cellValue | Nullable <CellValue > |
Returns
cellValue is undefined | null | void
Inherited from
BaseDataValidator
.isEmptyCellValue
isValidType()
isValidType(
cellInfo,
formula,
rule): Promise<boolean>
Defined in: sheets-data-validation/src/validators/checkbox-validator.ts:138
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <CellValue > |
formula | IFormulaResult |
rule | IDataValidationRule |
Returns
Promise
<boolean
>
Overrides
normalizeFormula()
normalizeFormula(
rule,
unitId,
subUnitId): {
formula1: undefined | string;
formula2: undefined | string;
}
Defined in: data-validation/src/validators/base-data-validator.ts:136
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
unitId | string |
subUnitId | string |
Returns
{
formula1: undefined | string;
formula2: undefined | string;
}
Inherited from
BaseDataValidator
.normalizeFormula
parseFormula()
parseFormula(
rule,
unitId,
subUnitId): Promise<ICheckboxFormulaResult>
Defined in: sheets-data-validation/src/validators/checkbox-validator.ts:99
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
unitId | string |
subUnitId | string |
Returns
Promise
<ICheckboxFormulaResult
>
Overrides
BaseDataValidator
.parseFormula
parseFormulaSync()
parseFormulaSync(
rule,
unitId,
subUnitId): ICheckboxFormulaResult
Defined in: sheets-data-validation/src/validators/checkbox-validator.ts:122
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
unitId | string |
subUnitId | string |
Returns
ICheckboxFormulaResult
skipDefaultFontRender()
skipDefaultFontRender(
rule,
cellValue,
pos): boolean
Defined in: sheets-data-validation/src/validators/checkbox-validator.ts:61
Parameters
Parameter | Type |
---|---|
rule | ISheetDataValidationRule |
cellValue | Nullable <CellValue > |
pos | { column : number ; row : number ; subUnitId : string ; unitId : string ; } |
pos.column | number |
pos.row | number |
pos.subUnitId | string |
pos.unitId | string |
Returns
boolean
Overrides
BaseDataValidator.skipDefaultFontRender
transform()
transform(
cellInfo,
formula,
rule): IValidatorCellInfo<number>
Defined in: data-validation/src/validators/base-data-validator.ts:147
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo |
formula | IFormulaResult |
rule | IDataValidationRule |
Returns
IValidatorCellInfo
<number
>
Inherited from
validator()
validator(cellInfo, rule): Promise<boolean>
Defined in: data-validation/src/validators/base-data-validator.ts:224
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo |
rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
validatorFormula()
validatorFormula(
rule,
unitId,
subUnitId): IFormulaValidResult
Defined in: sheets-data-validation/src/validators/checkbox-validator.ts:71
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
unitId | string |
subUnitId | string |
Returns
Overrides
BaseDataValidator
.validatorFormula
validatorIsBetween()
validatorIsBetween(
cellInfo,
formula,
_rule): Promise<boolean>
Defined in: data-validation/src/validators/base-data-validator.ts:170
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <number > |
formula | IFormulaResult |
_rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
BaseDataValidator
.validatorIsBetween
validatorIsEqual()
validatorIsEqual(
cellInfo,
formula,
rule): Promise<boolean>
Defined in: data-validation/src/validators/base-data-validator.ts:151
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <CellValue > |
formula | IFormulaResult |
rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
BaseDataValidator
.validatorIsEqual
validatorIsGreaterThan()
validatorIsGreaterThan(
cellInfo,
formula,
_rule): Promise<boolean>
Defined in: data-validation/src/validators/base-data-validator.ts:191
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <number > |
formula | IFormulaResult |
_rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
BaseDataValidator
.validatorIsGreaterThan
validatorIsGreaterThanOrEqual()
validatorIsGreaterThanOrEqual(
cellInfo,
formula,
_rule): Promise<boolean>
Defined in: data-validation/src/validators/base-data-validator.ts:199
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <number > |
formula | IFormulaResult |
_rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
BaseDataValidator
.validatorIsGreaterThanOrEqual
validatorIsLessThan()
validatorIsLessThan(
cellInfo,
formula,
_rule): Promise<boolean>
Defined in: data-validation/src/validators/base-data-validator.ts:207
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <number > |
formula | IFormulaResult |
_rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
BaseDataValidator
.validatorIsLessThan
validatorIsLessThanOrEqual()
validatorIsLessThanOrEqual(
cellInfo,
formula,
_rule): Promise<boolean>
Defined in: data-validation/src/validators/base-data-validator.ts:215
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <number > |
formula | IFormulaResult |
_rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
BaseDataValidator
.validatorIsLessThanOrEqual
validatorIsNotBetween()
validatorIsNotBetween(
cellInfo,
formula,
_rule): Promise<boolean>
Defined in: data-validation/src/validators/base-data-validator.ts:181
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <number > |
formula | IFormulaResult |
_rule | IDataValidationRule |
Returns
Promise
<boolean
>
Inherited from
BaseDataValidator
.validatorIsNotBetween
validatorIsNotEqual()
validatorIsNotEqual(
cellInfo,
formula,
_rule): Promise<boolean>
Defined in: data-validation/src/validators/base-data-validator.ts:161
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo <number > |
formula | IFormulaResult |
_rule | IDataValidationRule |
Returns
Promise
<boolean
>