@univerjs/sheets-data-validation 0.1.13 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +2 -2
- package/lib/es/index.js +1973 -1960
- package/lib/locale/en-US.json +3 -2
- package/lib/locale/ru-RU.json +3 -2
- package/lib/locale/zh-CN.json +2 -1
- package/lib/types/controllers/dv-ref-range.controller.d.ts +2 -8
- package/lib/types/controllers/dv-render.controller.d.ts +10 -12
- package/lib/types/index.d.ts +2 -1
- package/lib/types/locale/zh-CN.d.ts +1 -0
- package/lib/types/models/rule-matrix.d.ts +4 -3
- package/lib/types/models/sheet-data-validation-manager.d.ts +2 -2
- package/lib/types/services/dropdown-manager.service.d.ts +2 -3
- package/lib/types/services/dv-validator-service.d.ts +13 -0
- package/lib/types/validators/checkbox-validator.d.ts +1 -1
- package/lib/types/validators/custom-validator.d.ts +1 -1
- package/lib/types/validators/date-validator.d.ts +2 -2
- package/lib/types/validators/decimal-validator.d.ts +2 -2
- package/lib/types/validators/list-validator.d.ts +3 -2
- package/lib/types/validators/text-length-validator.d.ts +1 -1
- package/lib/types/validators/whole-validator.d.ts +1 -1
- package/lib/umd/index.js +2 -2
- package/package.json +44 -29
package/lib/locale/en-US.json
CHANGED
|
@@ -10,13 +10,14 @@
|
|
|
10
10
|
"list": "Please input options",
|
|
11
11
|
"listInvalid": "The list source must be a delimited list or a reference to a single row or column",
|
|
12
12
|
"checkboxEqual": "Enter different values for ticked and unticked cell contents.",
|
|
13
|
-
"formulaError": "The reference range contains invisible data, please readjust the range"
|
|
13
|
+
"formulaError": "The reference range contains invisible data, please readjust the range",
|
|
14
|
+
"listIntersects": "The selected range cannot intersect with the scope of the rules"
|
|
14
15
|
},
|
|
15
16
|
"panel": {
|
|
16
17
|
"title": "Data validation management",
|
|
17
18
|
"addTitle": "Create new data validation",
|
|
18
19
|
"removeAll": "Remove All",
|
|
19
|
-
"add": "
|
|
20
|
+
"add": "Add Rule",
|
|
20
21
|
"range": "Ranges",
|
|
21
22
|
"type": "Type",
|
|
22
23
|
"options": "Advance options",
|
package/lib/locale/ru-RU.json
CHANGED
|
@@ -10,13 +10,14 @@
|
|
|
10
10
|
"list": "Пожалуйста, введите параметры",
|
|
11
11
|
"listInvalid": "Источник списка должен быть разделенным списком или ссылкой на одну строку или столбец",
|
|
12
12
|
"checkboxEqual": "Для выбранных и не выбранных ячеек введите разные значения",
|
|
13
|
-
"formulaError": "Диапазон ссылок содержит невидимые данные, пожалуйста, пересмотрите диапазон"
|
|
13
|
+
"formulaError": "Диапазон ссылок содержит невидимые данные, пожалуйста, пересмотрите диапазон",
|
|
14
|
+
"listIntersects": "Выбранный диапазон не может пересекаться с диапазоном правила."
|
|
14
15
|
},
|
|
15
16
|
"panel": {
|
|
16
17
|
"title": "Управление проверкой данных",
|
|
17
18
|
"addTitle": "Создать новую проверку данных",
|
|
18
19
|
"removeAll": "Удалить все",
|
|
19
|
-
"add": "
|
|
20
|
+
"add": "добавить правило",
|
|
20
21
|
"range": "Диапазоны",
|
|
21
22
|
"type": "Тип",
|
|
22
23
|
"options": "Дополнительные параметры",
|
package/lib/locale/zh-CN.json
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"list": "请输入至少一个合法选项",
|
|
11
11
|
"listInvalid": "列表源必须是分隔列表或对单行或列的引用。",
|
|
12
12
|
"checkboxEqual": "为勾选和未勾选的单元格内容输入不同的值。",
|
|
13
|
-
"formulaError": "引用范围内包含不可见的数据,请重新调整范围"
|
|
13
|
+
"formulaError": "引用范围内包含不可见的数据,请重新调整范围",
|
|
14
|
+
"listIntersects": "所选范围不能和规则范围相交"
|
|
14
15
|
},
|
|
15
16
|
"panel": {
|
|
16
17
|
"title": "管理数据验证",
|
|
@@ -1,26 +1,20 @@
|
|
|
1
|
-
import { ISheetDataValidationRule, Disposable
|
|
2
|
-
import { SheetSkeletonManagerService } from '@univerjs/sheets-ui';
|
|
1
|
+
import { ISheetDataValidationRule, Disposable } from '@univerjs/core';
|
|
3
2
|
import { RefRangeService } from '@univerjs/sheets';
|
|
4
3
|
import { Injector } from '@wendellhu/redi';
|
|
5
4
|
import { DataValidationModel } from '@univerjs/data-validation';
|
|
6
5
|
import { FormulaRefRangeService } from '@univerjs/sheets-formula';
|
|
7
6
|
import { DataValidationCustomFormulaService } from '../services/dv-custom-formula.service';
|
|
8
7
|
import { DataValidationFormulaService } from '../services/dv-formula.service';
|
|
9
|
-
import { DataValidationCacheService } from '../services/dv-cache.service';
|
|
10
8
|
|
|
11
9
|
export declare class DataValidationRefRangeController extends Disposable {
|
|
12
10
|
private _dataValidationModel;
|
|
13
|
-
private _univerInstanceService;
|
|
14
11
|
private _injector;
|
|
15
|
-
private _sheetSkeletonManagerService;
|
|
16
12
|
private _refRangeService;
|
|
17
13
|
private _dataValidationCustomFormulaService;
|
|
18
14
|
private _dataValidationFormulaService;
|
|
19
15
|
private _formulaRefRangeService;
|
|
20
|
-
private readonly _commandService;
|
|
21
|
-
private readonly _dataValidationCacheService;
|
|
22
16
|
private _disposableMap;
|
|
23
|
-
constructor(_dataValidationModel: DataValidationModel,
|
|
17
|
+
constructor(_dataValidationModel: DataValidationModel, _injector: Injector, _refRangeService: RefRangeService, _dataValidationCustomFormulaService: DataValidationCustomFormulaService, _dataValidationFormulaService: DataValidationFormulaService, _formulaRefRangeService: FormulaRefRangeService);
|
|
24
18
|
private _getIdWithUnitId;
|
|
25
19
|
registerRule: (unitId: string, subUnitId: string, rule: ISheetDataValidationRule) => void;
|
|
26
20
|
registerFormula(unitId: string, subUnitId: string, rule: ISheetDataValidationRule): void;
|
|
@@ -2,7 +2,7 @@ import { ICommandService, IUniverInstanceService, RxDisposable } from '@univerjs
|
|
|
2
2
|
import { DataValidationModel, DataValidatorRegistryService } from '@univerjs/data-validation';
|
|
3
3
|
import { MenuConfig, ComponentManager, IMenuService } from '@univerjs/ui';
|
|
4
4
|
import { Injector } from '@wendellhu/redi';
|
|
5
|
-
import { AutoHeightController, IEditorBridgeService
|
|
5
|
+
import { AutoHeightController, IEditorBridgeService } from '@univerjs/sheets-ui';
|
|
6
6
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
7
7
|
import { SheetInterceptorService } from '@univerjs/sheets';
|
|
8
8
|
import { DataValidationDropdownManagerService } from '../services/dropdown-manager.service';
|
|
@@ -14,23 +14,21 @@ export declare const DefaultSheetsDataValidation: {};
|
|
|
14
14
|
/**
|
|
15
15
|
* @todo RenderUnit
|
|
16
16
|
*/
|
|
17
|
-
export declare class
|
|
17
|
+
export declare class SheetsDataValidationRenderController extends RxDisposable {
|
|
18
18
|
private readonly _config;
|
|
19
|
-
private
|
|
19
|
+
private readonly _commandService;
|
|
20
|
+
private readonly _editorBridgeService;
|
|
20
21
|
private _menuService;
|
|
21
|
-
private readonly _dataValidationModel;
|
|
22
|
-
private readonly _sheetSkeletonManagerService;
|
|
23
22
|
private readonly _renderManagerService;
|
|
24
23
|
private readonly _univerInstanceService;
|
|
25
|
-
private readonly
|
|
26
|
-
private
|
|
24
|
+
private readonly _autoHeightController;
|
|
25
|
+
private _componentManager;
|
|
27
26
|
private readonly _dropdownManagerService;
|
|
28
|
-
private readonly
|
|
27
|
+
private readonly _dataValidationModel;
|
|
28
|
+
private readonly _dataValidatorRegistryService;
|
|
29
29
|
private readonly _injector;
|
|
30
|
-
private readonly
|
|
31
|
-
|
|
32
|
-
constructor(_config: Partial<IUniverSheetsDataValidation>, _componentManager: ComponentManager, _menuService: IMenuService, _dataValidationModel: DataValidationModel, _sheetSkeletonManagerService: SheetSkeletonManagerService, _renderManagerService: IRenderManagerService, _univerInstanceService: IUniverInstanceService, _dataValidatorRegistryService: DataValidatorRegistryService, _editorBridgeService: IEditorBridgeService, _dropdownManagerService: DataValidationDropdownManagerService, _sheetInterceptorService: SheetInterceptorService, _injector: Injector, _autoHeightController: AutoHeightController, _commandService: ICommandService);
|
|
33
|
-
private _init;
|
|
30
|
+
private readonly _sheetInterceptorService;
|
|
31
|
+
constructor(_config: Partial<IUniverSheetsDataValidation>, _commandService: ICommandService, _editorBridgeService: IEditorBridgeService, _menuService: IMenuService, _renderManagerService: IRenderManagerService, _univerInstanceService: IUniverInstanceService, _autoHeightController: AutoHeightController, _componentManager: ComponentManager, _dropdownManagerService: DataValidationDropdownManagerService, _dataValidationModel: DataValidationModel, _dataValidatorRegistryService: DataValidatorRegistryService, _injector: Injector, _sheetInterceptorService: SheetInterceptorService);
|
|
34
32
|
private _initMenu;
|
|
35
33
|
private _initComponents;
|
|
36
34
|
private _initDropdown;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
export { UniverSheetsDataValidationPlugin } from './plugin';
|
|
17
17
|
export type { IAddSheetDataValidationCommandParams, IUpdateSheetDataValidationRangeCommandParams } from './commands/commands/data-validation.command';
|
|
18
18
|
export { ICommandService, LocaleService, Plugin } from '@univerjs/core';
|
|
19
|
-
export {
|
|
19
|
+
export { SheetsDataValidationRenderController } from './controllers/dv-render.controller';
|
|
20
20
|
export { DataValidationController } from './controllers/dv.controller';
|
|
21
21
|
export { SheetDataValidationService } from './services/dv.service';
|
|
22
22
|
export { DataValidationAlertController } from './controllers/dv-alert.controller';
|
|
@@ -31,3 +31,4 @@ export { DataValidationCopyPasteController } from './controllers/dv-copy-paste.c
|
|
|
31
31
|
export { HideDataValidationDropdown, ShowDataValidationDropdown } from './commands/operations/data-validation.operation';
|
|
32
32
|
export { DataValidationRejectInputController } from './controllers/dv-reject-input.controller';
|
|
33
33
|
export { DataValidationFormulaController } from './controllers/dv-formula.controller';
|
|
34
|
+
export { SheetsDataValidationValidatorService } from './services/dv-validator-service';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IRange, ISheetDataValidationRule, ObjectMatrix } from '@univerjs/core';
|
|
1
|
+
import { IRange, ISheetDataValidationRule, Worksheet, ObjectMatrix } from '@univerjs/core';
|
|
2
2
|
|
|
3
3
|
export type RangeMutation = {
|
|
4
4
|
type: 'update';
|
|
@@ -14,12 +14,13 @@ export type RangeMutation = {
|
|
|
14
14
|
rule: ISheetDataValidationRule;
|
|
15
15
|
};
|
|
16
16
|
export declare class RuleMatrix {
|
|
17
|
+
private _worksheet;
|
|
17
18
|
readonly value: ObjectMatrix<string>;
|
|
18
|
-
constructor(value: ObjectMatrix<string
|
|
19
|
+
constructor(value: ObjectMatrix<string>, _worksheet: Worksheet);
|
|
19
20
|
addRule(rule: ISheetDataValidationRule): void;
|
|
20
21
|
removeRange(ranges: IRange[]): void;
|
|
21
22
|
removeRule(rule: ISheetDataValidationRule): void;
|
|
22
|
-
updateRange(ruleId: string,
|
|
23
|
+
updateRange(ruleId: string, _oldRanges: IRange[], _newRanges: IRange[]): void;
|
|
23
24
|
diff(rules: ISheetDataValidationRule[]): RangeMutation[];
|
|
24
25
|
diffWithAddition(rules: ISheetDataValidationRule[], additionRules: IterableIterator<ISheetDataValidationRule>): RangeMutation[];
|
|
25
26
|
clone(): RuleMatrix;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CellValue, ISheetDataValidationRule, Nullable, DataValidationStatus } from '@univerjs/core';
|
|
2
2
|
import { DataValidationManager, IUpdateRulePayload } from '@univerjs/data-validation';
|
|
3
|
-
import {
|
|
3
|
+
import { ISheetLocationBase } from '@univerjs/sheets';
|
|
4
4
|
import { Injector } from '@wendellhu/redi';
|
|
5
5
|
import { RuleMatrix } from './rule-matrix';
|
|
6
6
|
|
|
@@ -23,7 +23,7 @@ export declare class SheetDataValidationManager extends DataValidationManager<IS
|
|
|
23
23
|
removeRule(ruleId: string): void;
|
|
24
24
|
getRuleIdByLocation(row: number, col: number): string | undefined;
|
|
25
25
|
getRuleByLocation(row: number, col: number): ISheetDataValidationRule | undefined;
|
|
26
|
-
validator(cellValue: Nullable<CellValue>, rule: ISheetDataValidationRule, pos:
|
|
26
|
+
validator(cellValue: Nullable<CellValue>, rule: ISheetDataValidationRule, pos: ISheetLocationBase, onCompete: (status: DataValidationStatus, changed: boolean) => void): DataValidationStatus;
|
|
27
27
|
getRuleErrorMsg(ruleId: string): string;
|
|
28
28
|
getRuleObjectMatrix(): RuleMatrix;
|
|
29
29
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Disposable, IUniverInstanceService, Nullable } from '@univerjs/core';
|
|
2
2
|
import { ISheetLocation } from '@univerjs/sheets';
|
|
3
|
-
import { SheetCanvasPopManagerService
|
|
3
|
+
import { SheetCanvasPopManagerService } from '@univerjs/sheets-ui';
|
|
4
4
|
import { DataValidationModel, DataValidatorRegistryService } from '@univerjs/data-validation';
|
|
5
5
|
import { IZenZoneService } from '@univerjs/ui';
|
|
6
6
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
@@ -18,7 +18,6 @@ export interface IDropdownComponentProps {
|
|
|
18
18
|
export declare class DataValidationDropdownManagerService extends Disposable {
|
|
19
19
|
private readonly _canvasPopupManagerService;
|
|
20
20
|
private readonly _univerInstanceService;
|
|
21
|
-
private readonly _sheetSkeletonManagerService;
|
|
22
21
|
private readonly _dataValidatorRegistryService;
|
|
23
22
|
private readonly _zenZoneService;
|
|
24
23
|
private readonly _renderManagerService;
|
|
@@ -29,7 +28,7 @@ export declare class DataValidationDropdownManagerService extends Disposable {
|
|
|
29
28
|
activeDropdown$: import('rxjs').Observable<Nullable<IDropdownParam>>;
|
|
30
29
|
private _zenVisible;
|
|
31
30
|
get activeDropdown(): Nullable<IDropdownParam>;
|
|
32
|
-
constructor(_canvasPopupManagerService: SheetCanvasPopManagerService, _univerInstanceService: IUniverInstanceService,
|
|
31
|
+
constructor(_canvasPopupManagerService: SheetCanvasPopManagerService, _univerInstanceService: IUniverInstanceService, _dataValidatorRegistryService: DataValidatorRegistryService, _zenZoneService: IZenZoneService, _renderManagerService: IRenderManagerService, _dataValidationModel: DataValidationModel);
|
|
33
32
|
private _init;
|
|
34
33
|
showDropdown(param: IDropdownParam): void;
|
|
35
34
|
hideDropdown(): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Nullable, ObjectMatrix, DataValidationStatus, IUniverInstanceService } from '@univerjs/core';
|
|
2
|
+
import { DataValidationModel } from '@univerjs/data-validation';
|
|
3
|
+
import { IDataValidationResCache, DataValidationCacheService } from './dv-cache.service';
|
|
4
|
+
|
|
5
|
+
export declare class SheetsDataValidationValidatorService {
|
|
6
|
+
private readonly _univerInstanceService;
|
|
7
|
+
private readonly _dataValidationModel;
|
|
8
|
+
private readonly _dataValidationCacheService;
|
|
9
|
+
constructor(_univerInstanceService: IUniverInstanceService, _dataValidationModel: DataValidationModel, _dataValidationCacheService: DataValidationCacheService);
|
|
10
|
+
validatorCell(unitId: string, subUnitId: string, row: number, col: number): Promise<DataValidationStatus>;
|
|
11
|
+
validatorWorksheet(unitId: string, subUnitId: string): Promise<ObjectMatrix<Nullable<IDataValidationResCache>>>;
|
|
12
|
+
validatorWorkbook(unitId: string): Promise<Record<string, ObjectMatrix<Nullable<IDataValidationResCache>>>>;
|
|
13
|
+
}
|
|
@@ -14,7 +14,7 @@ export declare class CheckboxValidator extends BaseDataValidator {
|
|
|
14
14
|
canvasRender: CheckboxRender;
|
|
15
15
|
private _formulaService;
|
|
16
16
|
skipDefaultFontRender(rule: ISheetDataValidationRule, cellValue: Nullable<CellValue>, pos: ISheetLocation): boolean;
|
|
17
|
-
validatorFormula(rule:
|
|
17
|
+
validatorFormula(rule: IDataValidationRule, unitId: string, subUnitId: string): IFormulaValidResult;
|
|
18
18
|
parseFormula(rule: IDataValidationRule, unitId: string, subUnitId: string): Promise<IFormulaResult>;
|
|
19
19
|
parseFormulaSync(rule: IDataValidationRule, unitId: string, subUnitId: string): {
|
|
20
20
|
formula1: Nullable<CellValue>;
|
|
@@ -8,7 +8,7 @@ export declare class CustomFormulaValidator extends BaseDataValidator {
|
|
|
8
8
|
scopes: string | string[];
|
|
9
9
|
formulaInput: string;
|
|
10
10
|
private _customFormulaService;
|
|
11
|
-
validatorFormula(rule:
|
|
11
|
+
validatorFormula(rule: IDataValidationRule, unitId: string, subUnitId: string): IFormulaValidResult;
|
|
12
12
|
parseFormula(_rule: IDataValidationRule, _unitId: string, _subUnitId: string): Promise<IFormulaResult>;
|
|
13
13
|
isValidType(cellInfo: IValidatorCellInfo<CellValue>, _formula: IFormulaResult, _rule: IDataValidationRule): Promise<boolean>;
|
|
14
14
|
generateRuleErrorMessage(rule: IDataValidationRuleBase): string;
|
|
@@ -14,7 +14,7 @@ export declare class DateValidator extends BaseDataValidator<Dayjs> {
|
|
|
14
14
|
transformDate: (value: Nullable<CellValue>) => Dayjs | undefined;
|
|
15
15
|
isValidType(info: IValidatorCellInfo): Promise<boolean>;
|
|
16
16
|
private _validatorSingleFormula;
|
|
17
|
-
validatorFormula(rule:
|
|
17
|
+
validatorFormula(rule: IDataValidationRule, unitId: string, subUnitId: string): IFormulaValidResult;
|
|
18
18
|
transform(cellInfo: IValidatorCellInfo<CellValue>, _formula: IFormulaResult, _rule: IDataValidationRule): IValidatorCellInfo<Dayjs>;
|
|
19
19
|
validatorIsEqual(info: IValidatorCellInfo<Dayjs>, formula: IFormulaResult<Dayjs | undefined>, _rule: IDataValidationRule): Promise<boolean>;
|
|
20
20
|
validatorIsNotEqual(info: IValidatorCellInfo<Dayjs>, formula: IFormulaResult<Dayjs | undefined>): Promise<boolean>;
|
|
@@ -24,7 +24,7 @@ export declare class DateValidator extends BaseDataValidator<Dayjs> {
|
|
|
24
24
|
validatorIsGreaterThanOrEqual(info: IValidatorCellInfo<Dayjs>, formula: IFormulaResult<Dayjs | undefined>): Promise<boolean>;
|
|
25
25
|
validatorIsLessThan(info: IValidatorCellInfo<Dayjs>, formula: IFormulaResult<Dayjs | undefined>): Promise<boolean>;
|
|
26
26
|
validatorIsLessThanOrEqual(info: IValidatorCellInfo<Dayjs>, formula: IFormulaResult<Dayjs | undefined>): Promise<boolean>;
|
|
27
|
-
validatorFormulaValue(rule:
|
|
27
|
+
validatorFormulaValue(rule: IDataValidationRule): string | undefined;
|
|
28
28
|
get operatorNames(): string[];
|
|
29
29
|
generateRuleName(rule: IDataValidationRuleBase): string;
|
|
30
30
|
generateRuleErrorMessage(rule: IDataValidationRuleBase): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataValidationOperator, CellValue, IDataValidationRule
|
|
1
|
+
import { DataValidationOperator, CellValue, IDataValidationRule } from '@univerjs/core';
|
|
2
2
|
import { IFormulaResult, IFormulaValidResult, IValidatorCellInfo, BaseDataValidator } from '@univerjs/data-validation';
|
|
3
3
|
|
|
4
4
|
export declare function getCellValueNumber(cellValue: CellValue): number;
|
|
@@ -24,7 +24,7 @@ export declare class DecimalValidator extends BaseDataValidator<number> {
|
|
|
24
24
|
formula1: number;
|
|
25
25
|
formula2: number;
|
|
26
26
|
}>;
|
|
27
|
-
validatorFormula(rule:
|
|
27
|
+
validatorFormula(rule: IDataValidationRule, unitId: string, subUnitId: string): IFormulaValidResult;
|
|
28
28
|
validatorIsEqual(cellInfo: IValidatorCellInfo<CellValue>, formula: IFormulaResult, rule: IDataValidationRule): Promise<boolean>;
|
|
29
29
|
validatorIsNotEqual(cellInfo: IValidatorCellInfo<number>, formula: IFormulaResult, _rule: IDataValidationRule): Promise<boolean>;
|
|
30
30
|
validatorIsBetween(cellInfo: IValidatorCellInfo<number>, formula: IFormulaResult, _rule: IDataValidationRule): Promise<boolean>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CellValue, DataValidationOperator, ICellData, IDataValidationRule,
|
|
1
|
+
import { CellValue, DataValidationOperator, ICellData, IDataValidationRule, ISheetDataValidationRule, Nullable } from '@univerjs/core';
|
|
2
2
|
import { IBaseDataValidationWidget, IFormulaResult, IFormulaValidResult, IValidatorCellInfo, BaseDataValidator } from '@univerjs/data-validation';
|
|
3
3
|
import { LexerTreeBuilder } from '@univerjs/engine-formula';
|
|
4
4
|
import { DataValidationFormulaService } from '../services/dv-formula.service';
|
|
@@ -8,6 +8,7 @@ export declare function isValidListFormula(formula: string, lexer: LexerTreeBuil
|
|
|
8
8
|
export declare class ListValidator extends BaseDataValidator {
|
|
9
9
|
protected formulaService: DataValidationFormulaService;
|
|
10
10
|
private _lexer;
|
|
11
|
+
private _univerInstanceService;
|
|
11
12
|
id: string;
|
|
12
13
|
title: string;
|
|
13
14
|
operators: DataValidationOperator[];
|
|
@@ -17,7 +18,7 @@ export declare class ListValidator extends BaseDataValidator {
|
|
|
17
18
|
dropdown: string | undefined;
|
|
18
19
|
optionsInput: string | undefined;
|
|
19
20
|
skipDefaultFontRender(rule: ISheetDataValidationRule): boolean;
|
|
20
|
-
validatorFormula(rule:
|
|
21
|
+
validatorFormula(rule: IDataValidationRule, unitId: string, subUnitId: string): IFormulaValidResult;
|
|
21
22
|
parseCellValue(cellValue: CellValue): string[];
|
|
22
23
|
parseFormula(rule: IDataValidationRule, unitId: string, subUnitId: string): Promise<IFormulaResult<string[] | undefined>>;
|
|
23
24
|
isValidType(cellInfo: IValidatorCellInfo<Nullable<CellValue>>, formula: IFormulaResult<string[] | undefined>, rule: IDataValidationRule): Promise<boolean>;
|
|
@@ -9,7 +9,7 @@ export declare class TextLengthValidator extends BaseDataValidator<number> {
|
|
|
9
9
|
formulaInput: string;
|
|
10
10
|
private _formulaService;
|
|
11
11
|
private _isFormulaOrInt;
|
|
12
|
-
validatorFormula(rule:
|
|
12
|
+
validatorFormula(rule: IDataValidationRule, unitId: string, subUnitId: string): IFormulaValidResult;
|
|
13
13
|
private _parseNumber;
|
|
14
14
|
private _isValidFormula;
|
|
15
15
|
parseFormula(rule: IDataValidationRule, unitId: string, subUnitId: string): Promise<IFormulaResult<any>>;
|
|
@@ -23,7 +23,7 @@ export declare class WholeValidator extends BaseDataValidator<number> {
|
|
|
23
23
|
formula1: number;
|
|
24
24
|
formula2: number;
|
|
25
25
|
}>;
|
|
26
|
-
validatorFormula(rule: IDataValidationRuleBase): IFormulaValidResult;
|
|
26
|
+
validatorFormula(rule: IDataValidationRuleBase, unitId: string, subUnitId: string): IFormulaValidResult;
|
|
27
27
|
validatorIsEqual(cellInfo: IValidatorCellInfo<CellValue>, formula: IFormulaResult, rule: IDataValidationRule): Promise<boolean>;
|
|
28
28
|
validatorIsNotEqual(cellInfo: IValidatorCellInfo<number>, formula: IFormulaResult, _rule: IDataValidationRule): Promise<boolean>;
|
|
29
29
|
validatorIsBetween(cellInfo: IValidatorCellInfo<number>, formula: IFormulaResult, _rule: IDataValidationRule): Promise<boolean>;
|