@univerjs/sheets-data-validation v0.5.4
Class: ListValidator
Defined in: sheets-data-validation/src/validators/list-validator.ts:91
Extends
Extended by
Constructors
new ListValidator()
new ListValidator(localeService, injector): ListValidator
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 |
formulaService | protected | DataValidationFormulaService | undefined | - | - | sheets-data-validation/src/validators/list-validator.ts:92 |
id | public | string | DataValidationType.LIST | BaseDataValidator .id | - | sheets-data-validation/src/validators/list-validator.ts:98 |
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/list-validator.ts:96 |
operators | public | DataValidationOperator [] | [] | BaseDataValidator .operators | - | sheets-data-validation/src/validators/list-validator.ts:100 |
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/list-validator.ts:101 |
title | public | string | 'dataValidation.list.title' | BaseDataValidator .title | - | sheets-data-validation/src/validators/list-validator.ts:99 |
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(): string
Defined in: sheets-data-validation/src/validators/list-validator.ts:176
Returns
string
Overrides
BaseDataValidator
.generateRuleErrorMessage
generateRuleName()
generateRuleName(): string
Defined in: sheets-data-validation/src/validators/list-validator.ts:172
Returns
string
Overrides
BaseDataValidator
.generateRuleName
getExtraStyle()
getExtraStyle(
rule,
value,
__namedParameters): Nullable<IStyleData>
Defined in: sheets-data-validation/src/validators/list-validator.ts:125
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
value | Nullable <CellValue > |
__namedParameters | { style : IStyleData ; } |
__namedParameters.style | IStyleData |
Returns
Overrides
BaseDataValidator
.getExtraStyle
getList()
getList(
rule,
currentUnitId?,
currentSubUnitId?): string[]
Defined in: sheets-data-validation/src/validators/list-validator.ts:180
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
currentUnitId ? | string |
currentSubUnitId ? | string |
Returns
string
[]
getListAsync()
getListAsync(
rule,
currentUnitId?,
currentSubUnitId?): Promise<string[]>
Defined in: sheets-data-validation/src/validators/list-validator.ts:195
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
currentUnitId ? | string |
currentSubUnitId ? | string |
Returns
Promise
<string
[]>
getListWithColor()
getListWithColor(
rule,
currentUnitId?,
currentSubUnitId?): {
color: string;
label: string;
}[]
Defined in: sheets-data-validation/src/validators/list-validator.ts:210
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
currentUnitId ? | string |
currentSubUnitId ? | string |
Returns
{
color
: string
;
label
: string
;
}[]
getListWithColorMap()
getListWithColorMap(
rule,
currentUnitId?,
currentSubUnitId?): Record<string, string>
Defined in: sheets-data-validation/src/validators/list-validator.ts:217
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
currentUnitId ? | string |
currentSubUnitId ? | string |
Returns
Record
<string
, string
>
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/list-validator.ts:163
Parameters
Parameter | Type |
---|---|
cellInfo | IValidatorCellInfo |
formula | IFormulaResult <undefined | string []> |
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
parseCellValue()
parseCellValue(cellValue): string[]
Defined in: sheets-data-validation/src/validators/list-validator.ts:146
Parameters
Parameter | Type |
---|---|
cellValue | CellValue |
Returns
string
[]
parseFormula()
parseFormula(
rule,
unitId,
subUnitId): Promise<IFormulaResult<undefined | number>>
Defined in: sheets-data-validation/src/validators/list-validator.ts:151
Parameters
Parameter | Type |
---|---|
rule | IDataValidationRule |
unitId | string |
subUnitId | string |
Returns
Promise
<IFormulaResult
<undefined
| number
>>
Overrides
BaseDataValidator
.parseFormula
skipDefaultFontRender()
skipDefaultFontRender(rule): boolean
Defined in: sheets-data-validation/src/validators/list-validator.ts:103
Parameters
Parameter | Type |
---|---|
rule | ISheetDataValidationRule |
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/list-validator.ts:107
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
>