@univerjs/sheets-data-validation 0.2.7 → 0.2.8

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.
Files changed (76) hide show
  1. package/README.md +54 -4
  2. package/lib/cjs/index.js +2 -2
  3. package/lib/es/index.js +392 -394
  4. package/lib/locale/en-US.json +10 -9
  5. package/lib/locale/ru-RU.json +2 -1
  6. package/lib/locale/vi-VN.json +2 -1
  7. package/lib/locale/zh-CN.json +10 -9
  8. package/lib/locale/zh-TW.json +2 -1
  9. package/lib/types/commands/commands/data-validation.command.d.ts +6 -1
  10. package/lib/types/commands/operations/data-validation.operation.d.ts +0 -1
  11. package/lib/types/common/date-text-map.d.ts +0 -1
  12. package/lib/types/controllers/dv-alert.controller.d.ts +0 -1
  13. package/lib/types/controllers/dv-auto-fill.controller.d.ts +0 -1
  14. package/lib/types/controllers/dv-copy-paste.controller.d.ts +0 -1
  15. package/lib/types/controllers/dv-formula.controller.d.ts +0 -1
  16. package/lib/types/controllers/dv-model.controller.d.ts +0 -1
  17. package/lib/types/controllers/dv-permission.controller.d.ts +0 -1
  18. package/lib/types/controllers/dv-ref-range.controller.d.ts +0 -1
  19. package/lib/types/controllers/dv-reject-input.controller.d.ts +0 -1
  20. package/lib/types/controllers/dv-render.controller.d.ts +0 -1
  21. package/lib/types/controllers/dv.controller.d.ts +1 -5
  22. package/lib/types/controllers/dv.menu.d.ts +0 -1
  23. package/lib/types/index.d.ts +4 -11
  24. package/lib/types/locale/en-US.d.ts +0 -1
  25. package/lib/types/locale/ru-RU.d.ts +0 -1
  26. package/lib/types/locale/vi-VN.d.ts +0 -1
  27. package/lib/types/locale/zh-CN.d.ts +1 -0
  28. package/lib/types/locale/zh-TW.d.ts +0 -1
  29. package/lib/types/mobile-plugin.d.ts +0 -1
  30. package/lib/types/models/rule-matrix.d.ts +0 -1
  31. package/lib/types/models/sheet-data-validation-manager.d.ts +2 -3
  32. package/lib/types/plugin.d.ts +0 -1
  33. package/lib/types/services/data-validation-panel.service.d.ts +0 -1
  34. package/lib/types/services/dropdown-manager.service.d.ts +0 -1
  35. package/lib/types/services/dv-cache.service.d.ts +0 -1
  36. package/lib/types/services/dv-custom-formula.service.d.ts +0 -1
  37. package/lib/types/services/dv-formula.service.d.ts +0 -1
  38. package/lib/types/services/dv-validator-service.d.ts +4 -2
  39. package/lib/types/types/const/operator-text-map.d.ts +0 -1
  40. package/lib/types/types/const/two-formula-operators.d.ts +0 -1
  41. package/lib/types/utils/formula.d.ts +0 -1
  42. package/lib/types/utils/get-cell-data-origin.d.ts +0 -1
  43. package/lib/types/validators/checkbox-validator.d.ts +0 -1
  44. package/lib/types/validators/custom-validator.d.ts +0 -1
  45. package/lib/types/validators/date-validator.d.ts +0 -1
  46. package/lib/types/validators/decimal-validator.d.ts +2 -1
  47. package/lib/types/validators/list-multiple-validator.d.ts +0 -1
  48. package/lib/types/validators/list-validator.d.ts +0 -1
  49. package/lib/types/validators/text-length-validator.d.ts +2 -1
  50. package/lib/types/validators/util.d.ts +0 -1
  51. package/lib/types/validators/whole-validator.d.ts +2 -1
  52. package/lib/types/views/date-dropdown/index.d.ts +0 -1
  53. package/lib/types/views/detail/index.d.ts +0 -1
  54. package/lib/types/views/drop-down/CellDropdown.d.ts +0 -1
  55. package/lib/types/views/formula-input/base-formula-input.d.ts +0 -1
  56. package/lib/types/views/formula-input/checkbox-formula-input.d.ts +0 -1
  57. package/lib/types/views/formula-input/custom-formula-input.d.ts +0 -1
  58. package/lib/types/views/formula-input/formula-input.d.ts +0 -1
  59. package/lib/types/views/formula-input/index.d.ts +0 -1
  60. package/lib/types/views/formula-input/list-formula-input.d.ts +0 -1
  61. package/lib/types/views/item/index.d.ts +0 -1
  62. package/lib/types/views/list/index.d.ts +0 -1
  63. package/lib/types/views/list-dropdown/index.d.ts +0 -1
  64. package/lib/types/views/options/index.d.ts +0 -1
  65. package/lib/types/views/panel/index.d.ts +0 -1
  66. package/lib/types/views/render-mode/index.d.ts +0 -1
  67. package/lib/types/views/show-time/index.d.ts +0 -1
  68. package/lib/types/widgets/checkbox-widget.d.ts +0 -1
  69. package/lib/types/widgets/dropdown-multiple-widget.d.ts +0 -1
  70. package/lib/types/widgets/dropdown-widget.d.ts +1 -3
  71. package/lib/types/widgets/shape/dropdown.d.ts +0 -1
  72. package/lib/types/widgets/shape/layout.d.ts +0 -1
  73. package/lib/umd/index.js +2 -2
  74. package/package.json +25 -25
  75. package/lib/types/services/dv.service.d.ts +0 -20
  76. package/lib/types/services/dv.tips.d.ts +0 -17
@@ -89,14 +89,14 @@
89
89
  "notBetween": "is not between {FORMULA1}"
90
90
  },
91
91
  "errorMsg": {
92
- "between": "Value must be between {FORMULA1} and {FORMULA2}",
93
- "greaterThan": "Value must be after {FORMULA1}",
94
- "greaterThanOrEqual": "Value must be on or after {FORMULA1}",
95
- "lessThan": "Value must be before {FORMULA1}",
96
- "lessThanOrEqual": "Value must be on or before {FORMULA1}",
97
- "equal": "Value must be {FORMULA1}",
98
- "notEqual": "Value must be not {FORMULA1}",
99
- "notBetween": "Value must be not between {FORMULA1}"
92
+ "between": "Value must be a legal date and between {FORMULA1} and {FORMULA2}",
93
+ "greaterThan": "Value must be a legal date and after {FORMULA1}",
94
+ "greaterThanOrEqual": "Value must be a legal date and on or after {FORMULA1}",
95
+ "lessThan": "Value must be a legal date and before {FORMULA1}",
96
+ "lessThanOrEqual": "Value must be a legal date and on or before {FORMULA1}",
97
+ "equal": "Value must be a legal date and {FORMULA1}",
98
+ "notEqual": "Value must be a legal date and not {FORMULA1}",
99
+ "notBetween": "Value must be a legal date and not between {FORMULA1}"
100
100
  }
101
101
  },
102
102
  "list": {
@@ -109,7 +109,8 @@
109
109
  "options": "Options",
110
110
  "customOptions": "Custom",
111
111
  "refOptions": "From a range",
112
- "formulaError": "The list source must be a delimited list of data, or a reference to a single row or column."
112
+ "formulaError": "The list source must be a delimited list of data, or a reference to a single row or column.",
113
+ "edit": "Edit"
113
114
  },
114
115
  "listMultiple": {
115
116
  "title": "Dropdown-Multiple",
@@ -109,7 +109,8 @@
109
109
  "options": "Параметры",
110
110
  "customOptions": "Пользовательские",
111
111
  "refOptions": "Из диапазона",
112
- "formulaError": "Источник списка должен быть разделенным списком данных или ссылкой на одну строку или столбец."
112
+ "formulaError": "Источник списка должен быть разделенным списком данных или ссылкой на одну строку или столбец.",
113
+ "edit": "Редактировать"
113
114
  },
114
115
  "listMultiple": {
115
116
  "title": "Выпадающий список - Множественный",
@@ -109,7 +109,8 @@
109
109
  "options": "Nguồn tùy chọn",
110
110
  "customOptions": "Tùy chỉnh",
111
111
  "refOptions": "Tham chiếu dữ liệu",
112
- "formulaError": "Nguồn danh sách phải là danh sách dữ liệu đã được phân chia rõ ràng, hoặc là tham chiếu đến một hàng hoặc cột đơn."
112
+ "formulaError": "Nguồn danh sách phải là danh sách dữ liệu đã được phân chia rõ ràng, hoặc là tham chiếu đến một hàng hoặc cột đơn.",
113
+ "edit": "Biên tập"
113
114
  },
114
115
  "listMultiple": {
115
116
  "title": "Danh sách thả xuống - Chọn nhiều",
@@ -89,14 +89,14 @@
89
89
  "notBetween": "在 {FORMULA1} 和 {FORMULA2} 范围之外"
90
90
  },
91
91
  "errorMsg": {
92
- "between": "日期必须介于 {FORMULA1} 和 {FORMULA2} 之间",
93
- "greaterThan": "日期必须晚于 {FORMULA1}",
94
- "greaterThanOrEqual": "日期必须晚于或等于 {FORMULA1}",
95
- "lessThan": "日期必须早于 {FORMULA1}",
96
- "lessThanOrEqual": "早于或等于 {FORMULA1}",
97
- "equal": "日期必须等于 {FORMULA1}",
98
- "notEqual": "日期必须不等于 {FORMULA1}",
99
- "notBetween": "日期必须在 {FORMULA1} 和 {FORMULA2} 范围之外"
92
+ "between": "必须为有效日期且介于 {FORMULA1} 和 {FORMULA2} 之间",
93
+ "greaterThan": "必须为有效日期且晚于 {FORMULA1}",
94
+ "greaterThanOrEqual": "必须为有效日期且晚于或等于 {FORMULA1}",
95
+ "lessThan": "必须为有效日期且早于 {FORMULA1}",
96
+ "lessThanOrEqual": "必须为有效日期且早于或等于 {FORMULA1}",
97
+ "equal": "必须为有效日期且等于 {FORMULA1}",
98
+ "notEqual": "必须为有效日期且不等于 {FORMULA1}",
99
+ "notBetween": "必须为有效日期且在 {FORMULA1} 和 {FORMULA2} 范围之外"
100
100
  }
101
101
  },
102
102
  "list": {
@@ -109,7 +109,8 @@
109
109
  "options": "选项来源",
110
110
  "customOptions": "自定义",
111
111
  "refOptions": "引用数据",
112
- "formulaError": "列表源必须是划定分界后的数据列表,或是对单一行或一列的引用。"
112
+ "formulaError": "列表源必须是划定分界后的数据列表,或是对单一行或一列的引用。",
113
+ "edit": "编辑"
113
114
  },
114
115
  "listMultiple": {
115
116
  "title": "下拉菜单-多选",
@@ -109,7 +109,8 @@
109
109
  "options": "選項來源",
110
110
  "customOptions": "自訂",
111
111
  "refOptions": "引用資料",
112
- "formulaError": "列表來源必須是劃定分界後的資料列表,或是對單一行或一列的引用。 "
112
+ "formulaError": "列表來源必須是劃定分界後的資料列表,或是對單一行或一列的引用。 ",
113
+ "edit": "編輯"
113
114
  },
114
115
  "listMultiple": {
115
116
  "title": "下拉式選單-多選",
@@ -2,7 +2,6 @@ import { IAccessor, ICommand, IDataValidationRuleBase, IDataValidationRuleOption
2
2
  import { DataValidationChangeSource } from '@univerjs/data-validation';
3
3
  import { ISheetCommandSharedParams } from '@univerjs/sheets';
4
4
  import { RangeMutation } from '../../models/rule-matrix';
5
-
6
5
  export interface IUpdateSheetDataValidationRangeCommandParams {
7
6
  unitId: string;
8
7
  subUnitId: string;
@@ -31,3 +30,9 @@ export interface IUpdateSheetDataValidationOptionsCommandParams extends ISheetCo
31
30
  options: IDataValidationRuleOptions;
32
31
  }
33
32
  export declare const UpdateSheetDataValidationOptionsCommand: ICommand<IUpdateSheetDataValidationOptionsCommandParams>;
33
+ export interface IClearRangeDataValidationCommandParams {
34
+ unitId: string;
35
+ subUnitId: string;
36
+ ranges: IRange[];
37
+ }
38
+ export declare const ClearRangeDataValidationCommand: ICommand<IClearRangeDataValidationCommandParams>;
@@ -1,5 +1,4 @@
1
1
  import { ICommand } from '@univerjs/core';
2
-
3
2
  export declare const DATA_VALIDATION_PANEL = "DataValidationPanel";
4
3
  export interface IOpenValidationPanelOperationParams {
5
4
  ruleId?: string;
@@ -1,5 +1,4 @@
1
1
  import { DataValidationOperator } from '@univerjs/core';
2
-
3
2
  export declare const DateOperatorNameMap: Record<DataValidationOperator, string>;
4
3
  export declare const DateOperatorTextMap: Record<DataValidationOperator, string>;
5
4
  export declare const DateOperatorTitleMap: Record<DataValidationOperator, string>;
@@ -1,6 +1,5 @@
1
1
  import { Disposable, IUniverInstanceService, LocaleService } from '@univerjs/core';
2
2
  import { CellAlertManagerService, HoverManagerService } from '@univerjs/sheets-ui';
3
-
4
3
  export declare class DataValidationAlertController extends Disposable {
5
4
  private readonly _hoverManagerService;
6
5
  private readonly _cellAlertManagerService;
@@ -1,7 +1,6 @@
1
1
  import { Disposable, Injector } from '@univerjs/core';
2
2
  import { IAutoFillService } from '@univerjs/sheets-ui';
3
3
  import { DataValidationModel } from '@univerjs/data-validation';
4
-
5
4
  export declare class DataValidationAutoFillController extends Disposable {
6
5
  private readonly _autoFillService;
7
6
  private readonly _dataValidationModel;
@@ -1,7 +1,6 @@
1
1
  import { Disposable, Injector } from '@univerjs/core';
2
2
  import { ISheetClipboardService } from '@univerjs/sheets-ui';
3
3
  import { DataValidationModel } from '@univerjs/data-validation';
4
-
5
4
  export declare class DataValidationCopyPasteController extends Disposable {
6
5
  private _sheetClipboardService;
7
6
  private _dataValidationModel;
@@ -1,6 +1,5 @@
1
1
  import { Disposable, IPermissionService, IUniverInstanceService } from '@univerjs/core';
2
2
  import { LexerTreeBuilder } from '@univerjs/engine-formula';
3
-
4
3
  export declare class DataValidationFormulaController extends Disposable {
5
4
  private readonly _univerInstanceService;
6
5
  private readonly _permissionService;
@@ -1,6 +1,5 @@
1
1
  import { Disposable, Injector, IResourceManagerService, IUniverInstanceService } from '@univerjs/core';
2
2
  import { DataValidationModel } from '@univerjs/data-validation';
3
-
4
3
  export declare class DataValidationModelController extends Disposable {
5
4
  private readonly _resourceManagerService;
6
5
  private readonly _univerInstanceService;
@@ -1,6 +1,5 @@
1
1
  import { Disposable, ICommandService, LocaleService } from '@univerjs/core';
2
2
  import { SheetPermissionInterceptorBaseController } from '@univerjs/sheets-ui';
3
-
4
3
  export declare class DataValidationPermissionController extends Disposable {
5
4
  private _localeService;
6
5
  private readonly _commandService;
@@ -4,7 +4,6 @@ import { DataValidationModel } from '@univerjs/data-validation';
4
4
  import { FormulaRefRangeService } from '@univerjs/sheets-formula';
5
5
  import { DataValidationCustomFormulaService } from '../services/dv-custom-formula.service';
6
6
  import { DataValidationFormulaService } from '../services/dv-formula.service';
7
-
8
7
  export declare class DataValidationRefRangeController extends Disposable {
9
8
  private _dataValidationModel;
10
9
  private _injector;
@@ -2,7 +2,6 @@ import { Disposable, LocaleService } from '@univerjs/core';
2
2
  import { DataValidationModel, DataValidatorRegistryService } from '@univerjs/data-validation';
3
3
  import { IEditorBridgeService } from '@univerjs/sheets-ui';
4
4
  import { IDialogService } from '@univerjs/ui';
5
-
6
5
  export declare class DataValidationRejectInputController extends Disposable {
7
6
  private readonly _editorBridgeService;
8
7
  private readonly _dataValidationModel;
@@ -5,7 +5,6 @@ import { AutoHeightController, IEditorBridgeService } from '@univerjs/sheets-ui'
5
5
  import { IRenderManagerService } from '@univerjs/engine-render';
6
6
  import { SheetInterceptorService } from '@univerjs/sheets';
7
7
  import { DataValidationDropdownManagerService } from '../services/dropdown-manager.service';
8
-
9
8
  export interface IUniverSheetsDataValidation {
10
9
  menu?: MenuConfig;
11
10
  }
@@ -2,21 +2,17 @@ import { Injector, IUniverInstanceService, RxDisposable } from '@univerjs/core';
2
2
  import { DataValidationModel, DataValidatorRegistryService } from '@univerjs/data-validation';
3
3
  import { ComponentManager } from '@univerjs/ui';
4
4
  import { SheetInterceptorService, SheetsSelectionsService } from '@univerjs/sheets';
5
- import { SheetDataValidationService } from '../services/dv.service';
6
-
7
5
  export declare class DataValidationController extends RxDisposable {
8
6
  private readonly _univerInstanceService;
9
- private readonly _sheetDataValidationService;
10
7
  private readonly _dataValidatorRegistryService;
11
8
  private readonly _injector;
12
9
  private readonly _componentManger;
13
10
  private _selectionManagerService;
14
11
  private readonly _sheetInterceptorService;
15
12
  private readonly _dataValidationModel;
16
- constructor(_univerInstanceService: IUniverInstanceService, _sheetDataValidationService: SheetDataValidationService, _dataValidatorRegistryService: DataValidatorRegistryService, _injector: Injector, _componentManger: ComponentManager, _selectionManagerService: SheetsSelectionsService, _sheetInterceptorService: SheetInterceptorService, _dataValidationModel: DataValidationModel);
13
+ constructor(_univerInstanceService: IUniverInstanceService, _dataValidatorRegistryService: DataValidatorRegistryService, _injector: Injector, _componentManger: ComponentManager, _selectionManagerService: SheetsSelectionsService, _sheetInterceptorService: SheetInterceptorService, _dataValidationModel: DataValidationModel);
17
14
  private _init;
18
15
  private _registerValidators;
19
- private _initInstanceChange;
20
16
  private _initCommandInterceptor;
21
17
  private _initComponents;
22
18
  }
@@ -1,6 +1,5 @@
1
1
  import { IMenuItem } from '@univerjs/ui';
2
2
  import { IAccessor } from '@univerjs/core';
3
-
4
3
  export declare const DataValidationIcon = "data-validation-single";
5
4
  export declare function dataValidationMenuFactory(accessor: IAccessor): IMenuItem;
6
5
  export declare function openDataValidationMenuFactory(_accessor: IAccessor): IMenuItem;
@@ -15,20 +15,13 @@
15
15
  */
16
16
  export { UniverSheetsDataValidationPlugin } from './plugin';
17
17
  export { UniverSheetsDataValidationMobilePlugin } from './mobile-plugin';
18
- export { ICommandService, LocaleService, Plugin } from '@univerjs/core';
19
- export { SheetsDataValidationRenderController } from './controllers/dv-render.controller';
20
- export { DataValidationController } from './controllers/dv.controller';
21
- export { SheetDataValidationService } from './services/dv.service';
22
- export { DataValidationAlertController } from './controllers/dv-alert.controller';
23
18
  export { DataValidationCacheService } from './services/dv-cache.service';
24
19
  export { DataValidationFormulaService } from './services/dv-formula.service';
25
20
  export { DataValidationCustomFormulaService } from './services/dv-custom-formula.service';
26
- export { DataValidationRefRangeController } from './controllers/dv-ref-range.controller';
27
21
  export { DATA_VALIDATION_PLUGIN_NAME } from './common/const';
28
- export { DataValidationAutoFillController } from './controllers/dv-auto-fill.controller';
29
- export { DataValidationCopyPasteController } from './controllers/dv-copy-paste.controller';
30
- export { DataValidationRejectInputController } from './controllers/dv-reject-input.controller';
31
- export { DataValidationFormulaController } from './controllers/dv-formula.controller';
32
22
  export { SheetsDataValidationValidatorService } from './services/dv-validator-service';
33
- export { UpdateSheetDataValidationRangeCommand, AddSheetDataValidationCommand, AddSheetDataValidationAndOpenCommand, type IAddSheetDataValidationCommandParams, type IUpdateSheetDataValidationRangeCommandParams, } from './commands/commands/data-validation.command';
23
+ export { DataValidationModel } from '@univerjs/data-validation';
24
+ export { SheetDataValidationManager } from './models/sheet-data-validation-manager';
25
+ export { RemoveDataValidationCommand as RemoveSheetDataValidationCommand, type IRemoveDataValidationCommandParams as IRemoveSheetDataValidationCommandParams, } from '@univerjs/data-validation';
26
+ export { UpdateSheetDataValidationRangeCommand, UpdateSheetDataValidationOptionsCommand, UpdateSheetDataValidationSettingCommand, AddSheetDataValidationCommand, AddSheetDataValidationAndOpenCommand, ClearRangeDataValidationCommand, type IAddSheetDataValidationCommandParams, type IUpdateSheetDataValidationRangeCommandParams, type IUpdateSheetDataValidationOptionsCommandParams, type IUpdateSheetDataValidationSettingCommandParams, type IClearRangeDataValidationCommandParams, } from './commands/commands/data-validation.command';
34
27
  export { OpenValidationPanelOperation, CloseValidationPanelOperation, ToggleValidationPanelOperation, ShowDataValidationDropdown, HideDataValidationDropdown, } from './commands/operations/data-validation.operation';
@@ -1,4 +1,3 @@
1
1
  import { default as zhCN } from './zh-CN';
2
-
3
2
  declare const locale: typeof zhCN;
4
3
  export default locale;
@@ -1,4 +1,3 @@
1
1
  import { default as zhCN } from './zh-CN';
2
-
3
2
  declare const locale: typeof zhCN;
4
3
  export default locale;
@@ -1,4 +1,3 @@
1
1
  import { default as zhCN } from './zh-CN';
2
-
3
2
  declare const locale: typeof zhCN;
4
3
  export default locale;
@@ -125,6 +125,7 @@ declare const locale: {
125
125
  customOptions: string;
126
126
  refOptions: string;
127
127
  formulaError: string;
128
+ edit: string;
128
129
  };
129
130
  listMultiple: {
130
131
  title: string;
@@ -1,4 +1,3 @@
1
1
  import { default as zhCN } from './zh-CN';
2
-
3
2
  declare const locale: typeof zhCN;
4
3
  export default locale;
@@ -1,6 +1,5 @@
1
1
  import { ICommandService, LocaleService, Plugin, UniverInstanceType, Injector } from '@univerjs/core';
2
2
  import { IUniverSheetsDataValidation } from './controllers/dv-render.controller';
3
-
4
3
  export declare class UniverSheetsDataValidationMobilePlugin extends Plugin {
5
4
  private _config;
6
5
  protected _injector: Injector;
@@ -1,5 +1,4 @@
1
1
  import { IRange, ISheetDataValidationRule, Worksheet, ObjectMatrix } from '@univerjs/core';
2
-
3
2
  export type RangeMutation = {
4
3
  type: 'update';
5
4
  ruleId: string;
@@ -1,8 +1,7 @@
1
1
  import { CellValue, Injector, ISheetDataValidationRule, Nullable, DataValidationStatus, DataValidationType } from '@univerjs/core';
2
2
  import { DataValidationManager, IUpdateRulePayload } from '@univerjs/data-validation';
3
- import { ISheetLocationBase } from '@univerjs/sheets';
3
+ import { ISheetLocation } from '@univerjs/sheets';
4
4
  import { RuleMatrix } from './rule-matrix';
5
-
6
5
  export declare class SheetDataValidationManager extends DataValidationManager<ISheetDataValidationRule> {
7
6
  private readonly _injector;
8
7
  /**
@@ -22,7 +21,7 @@ export declare class SheetDataValidationManager extends DataValidationManager<IS
22
21
  getValidator(type: DataValidationType): import('@univerjs/data-validation').BaseDataValidator<CellValue> | undefined;
23
22
  getRuleIdByLocation(row: number, col: number): string | undefined;
24
23
  getRuleByLocation(row: number, col: number): ISheetDataValidationRule | undefined;
25
- validator(cellValue: Nullable<CellValue>, rule: ISheetDataValidationRule, pos: ISheetLocationBase, onCompete: (status: DataValidationStatus, changed: boolean) => void): DataValidationStatus;
24
+ validator(cellValue: Nullable<CellValue>, rule: ISheetDataValidationRule, pos: ISheetLocation, onCompete: (status: DataValidationStatus, changed: boolean) => void): DataValidationStatus;
26
25
  getRuleErrorMsg(ruleId: string): string;
27
26
  getRuleObjectMatrix(): RuleMatrix;
28
27
  }
@@ -1,6 +1,5 @@
1
1
  import { ICommandService, LocaleService, Plugin, UniverInstanceType, Injector } from '@univerjs/core';
2
2
  import { IUniverSheetsDataValidation } from './controllers/dv-render.controller';
3
-
4
3
  export declare class UniverSheetsDataValidationPlugin extends Plugin {
5
4
  private _config;
6
5
  protected _injector: Injector;
@@ -1,6 +1,5 @@
1
1
  import { IDataValidationRule, IDisposable, Nullable, Disposable, IUniverInstanceService } from '@univerjs/core';
2
2
  import { ISidebarService } from '@univerjs/ui';
3
-
4
3
  export declare class DataValidationPanelService extends Disposable {
5
4
  private readonly _univerInstanceService;
6
5
  private readonly _sidebarService;
@@ -4,7 +4,6 @@ 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';
7
-
8
7
  export interface IDropdownParam {
9
8
  location: ISheetLocation;
10
9
  onHide?: () => void;
@@ -1,5 +1,4 @@
1
1
  import { ObjectMatrix, CellValue, DataValidationStatus, IRange, ISheetDataValidationRule, Nullable } from '@univerjs/core';
2
-
3
2
  export interface IDataValidationResCache {
4
3
  value: Nullable<CellValue>;
5
4
  status: DataValidationStatus;
@@ -3,7 +3,6 @@ import { LexerTreeBuilder } from '@univerjs/engine-formula';
3
3
  import { DataValidationModel } from '@univerjs/data-validation';
4
4
  import { RegisterOtherFormulaService } from '@univerjs/sheets-formula';
5
5
  import { DataValidationCacheService } from './dv-cache.service';
6
-
7
6
  interface IFormulaData {
8
7
  formula: string;
9
8
  originRow: number;
@@ -2,7 +2,6 @@ import { Nullable, Disposable, IUniverInstanceService } from '@univerjs/core';
2
2
  import { DataValidationModel } from '@univerjs/data-validation';
3
3
  import { IFormulaInfo, IOtherFormulaResult, RegisterOtherFormulaService } from '@univerjs/sheets-formula';
4
4
  import { DataValidationCacheService } from './dv-cache.service';
5
-
6
5
  export declare class DataValidationFormulaService extends Disposable {
7
6
  private readonly _instanceService;
8
7
  private _registerOtherFormulaService;
@@ -1,13 +1,15 @@
1
- import { Nullable, ObjectMatrix, DataValidationStatus, IUniverInstanceService } from '@univerjs/core';
1
+ import { IDataValidationRule, IRange, Nullable, ObjectMatrix, DataValidationStatus, IUniverInstanceService } from '@univerjs/core';
2
2
  import { DataValidationModel } from '@univerjs/data-validation';
3
3
  import { IDataValidationResCache, DataValidationCacheService } from './dv-cache.service';
4
-
5
4
  export declare class SheetsDataValidationValidatorService {
6
5
  private readonly _univerInstanceService;
7
6
  private readonly _dataValidationModel;
8
7
  private readonly _dataValidationCacheService;
9
8
  constructor(_univerInstanceService: IUniverInstanceService, _dataValidationModel: DataValidationModel, _dataValidationCacheService: DataValidationCacheService);
10
9
  validatorCell(unitId: string, subUnitId: string, row: number, col: number): Promise<DataValidationStatus>;
10
+ validatorRanges(unitId: string, subUnitId: string, ranges: IRange[]): Promise<Promise<DataValidationStatus>[][]>;
11
11
  validatorWorksheet(unitId: string, subUnitId: string): Promise<ObjectMatrix<Nullable<IDataValidationResCache>>>;
12
12
  validatorWorkbook(unitId: string): Promise<Record<string, ObjectMatrix<Nullable<IDataValidationResCache>>>>;
13
+ getDataValidations(unitId: string, subUnitId: string, ranges: IRange[]): IDataValidationRule[];
14
+ getDataValidation(unitId: string, subUnitId: string, ranges: IRange[]): Nullable<IDataValidationRule>;
13
15
  }
@@ -1,5 +1,4 @@
1
1
  import { DataValidationOperator } from '@univerjs/core';
2
-
3
2
  export declare const OperatorTextMap: Record<DataValidationOperator, string>;
4
3
  export declare const OperatorTitleMap: Record<DataValidationOperator, string>;
5
4
  export declare const OperatorErrorTitleMap: Record<DataValidationOperator, string>;
@@ -1,3 +1,2 @@
1
1
  import { DataValidationOperator } from '@univerjs/core';
2
-
3
2
  export declare const TWO_FORMULA_OPERATOR_COUNT: DataValidationOperator[];
@@ -1,3 +1,2 @@
1
1
  import { ICellData, Nullable } from '@univerjs/core';
2
-
3
2
  export declare function getFormulaResult(result: Nullable<Nullable<ICellData>[][]>): Nullable<import('@univerjs/core').CellValue>;
@@ -1,4 +1,3 @@
1
1
  import { ICellData, Nullable } from '@univerjs/core';
2
-
3
2
  export declare function getCellValueOrigin(cell: Nullable<ICellData>): Nullable<import('@univerjs/core').CellValue>;
4
3
  export declare function getStringCellValue(cell: Nullable<ICellData>): string;
@@ -1,7 +1,6 @@
1
1
  import { CellValue, DataValidationOperator, IDataValidationRule, IDataValidationRuleBase, ISheetDataValidationRule, Nullable } from '@univerjs/core';
2
2
  import { BaseDataValidator, IFormulaResult, IFormulaValidResult, IValidatorCellInfo } from '@univerjs/data-validation';
3
3
  import { CheckboxRender } from '../widgets/checkbox-widget';
4
-
5
4
  export declare const CHECKBOX_FORMULA_1 = 1;
6
5
  export declare const CHECKBOX_FORMULA_2 = 0;
7
6
  export declare class CheckboxValidator extends BaseDataValidator {
@@ -1,6 +1,5 @@
1
1
  import { CellValue, DataValidationOperator, IDataValidationRule, IDataValidationRuleBase } from '@univerjs/core';
2
2
  import { IFormulaResult, IFormulaValidResult, IValidatorCellInfo, BaseDataValidator } from '@univerjs/data-validation';
3
-
4
3
  export declare class CustomFormulaValidator extends BaseDataValidator {
5
4
  id: string;
6
5
  title: string;
@@ -1,6 +1,5 @@
1
1
  import { DataValidationOperator, CellValue, IDataValidationRule, IDataValidationRuleBase } from '@univerjs/core';
2
2
  import { IFormulaResult, IFormulaValidResult, IValidatorCellInfo, BaseDataValidator } from '@univerjs/data-validation';
3
-
4
3
  export declare class DateValidator extends BaseDataValidator<number> {
5
4
  id: string;
6
5
  title: string;
@@ -1,6 +1,5 @@
1
1
  import { DataValidationOperator, CellValue, IDataValidationRule } from '@univerjs/core';
2
2
  import { IFormulaResult, IFormulaValidResult, IValidatorCellInfo, BaseDataValidator } from '@univerjs/data-validation';
3
-
4
3
  export declare function getCellValueNumber(cellValue: CellValue): number;
5
4
  export declare class DecimalValidator extends BaseDataValidator<number> {
6
5
  private _formulaService;
@@ -18,6 +17,8 @@ export declare class DecimalValidator extends BaseDataValidator<number> {
18
17
  column: number;
19
18
  unitId: string;
20
19
  subUnitId: string;
20
+ worksheet: import('@univerjs/core').Worksheet;
21
+ workbook: import('@univerjs/core').Workbook;
21
22
  };
22
23
  private _parseNumber;
23
24
  parseFormula(rule: IDataValidationRule, unitId: string, subUnitId: string): Promise<{
@@ -1,6 +1,5 @@
1
1
  import { DropdownMultipleWidget } from '../widgets/dropdown-multiple-widget';
2
2
  import { ListValidator } from './list-validator';
3
-
4
3
  export declare class ListMultipleValidator extends ListValidator {
5
4
  id: string;
6
5
  title: string;
@@ -2,7 +2,6 @@ import { CellValue, DataValidationOperator, ICellData, IDataValidationRule, IShe
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';
5
-
6
5
  export declare function getRuleFormulaResultSet(result: Nullable<Nullable<ICellData>[][]>): string[];
7
6
  export declare function isValidListFormula(formula: string, lexer: LexerTreeBuilder): boolean | undefined;
8
7
  export declare class ListValidator extends BaseDataValidator {
@@ -1,6 +1,5 @@
1
1
  import { DataValidationOperator, CellValue, IDataValidationRule, IDataValidationRuleBase } from '@univerjs/core';
2
2
  import { IFormulaResult, IFormulaValidResult, IValidatorCellInfo, BaseDataValidator } from '@univerjs/data-validation';
3
-
4
3
  export declare class TextLengthValidator extends BaseDataValidator<number> {
5
4
  id: string;
6
5
  title: string;
@@ -19,6 +18,8 @@ export declare class TextLengthValidator extends BaseDataValidator<number> {
19
18
  column: number;
20
19
  unitId: string;
21
20
  subUnitId: string;
21
+ worksheet: import('@univerjs/core').Worksheet;
22
+ workbook: import('@univerjs/core').Workbook;
22
23
  };
23
24
  isValidType(cellInfo: IValidatorCellInfo<number>, formula: IFormulaResult, rule: IDataValidationRule): Promise<boolean>;
24
25
  validatorIsEqual(cellInfo: IValidatorCellInfo<number>, formula: IFormulaResult, rule: IDataValidationRule): Promise<boolean>;
@@ -1,5 +1,4 @@
1
1
  import { ICellData, IUnitRangeName, IUniverInstanceService, Nullable } from '@univerjs/core';
2
-
3
2
  export declare function getSheetRangeValueSet(grid: IUnitRangeName, univerInstanceService: IUniverInstanceService, currUnitId: string, currSubUnitId: string): string[];
4
3
  export declare function serializeListOptions(options: string[]): string;
5
4
  export declare function deserializeListOptions(optionsStr: string): string[];
@@ -1,6 +1,5 @@
1
1
  import { DataValidationOperator, CellValue, IDataValidationRule, IDataValidationRuleBase } from '@univerjs/core';
2
2
  import { IFormulaResult, IFormulaValidResult, IValidatorCellInfo, BaseDataValidator } from '@univerjs/data-validation';
3
-
4
3
  export declare class WholeValidator extends BaseDataValidator<number> {
5
4
  private _formulaService;
6
5
  id: string;
@@ -17,6 +16,8 @@ export declare class WholeValidator extends BaseDataValidator<number> {
17
16
  column: number;
18
17
  unitId: string;
19
18
  subUnitId: string;
19
+ worksheet: import('@univerjs/core').Worksheet;
20
+ workbook: import('@univerjs/core').Workbook;
20
21
  };
21
22
  private _parseNumber;
22
23
  parseFormula(rule: IDataValidationRule, unitId: string, subUnitId: string): Promise<{
@@ -1,4 +1,3 @@
1
1
  import { default as React } from 'react';
2
2
  import { IDropdownComponentProps } from '../../services/dropdown-manager.service';
3
-
4
3
  export declare function DateDropdown(props: IDropdownComponentProps): React.JSX.Element | undefined;
@@ -1,3 +1,2 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export declare function DataValidationDetail(): React.JSX.Element | null;
@@ -1,3 +1,2 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export declare function CellDropdown(): React.JSX.Element | null;
@@ -1,4 +1,3 @@
1
1
  import { IFormulaInputProps } from '@univerjs/data-validation';
2
2
  import { default as React } from 'react';
3
-
4
3
  export declare const BaseFormulaInput: (props: IFormulaInputProps) => React.JSX.Element;
@@ -1,4 +1,3 @@
1
1
  import { IFormulaInputProps } from '@univerjs/data-validation';
2
2
  import { default as React } from 'react';
3
-
4
3
  export declare function CheckboxFormulaInput(props: IFormulaInputProps): React.JSX.Element;
@@ -1,4 +1,3 @@
1
1
  import { default as React } from 'react';
2
2
  import { IFormulaInputProps } from '@univerjs/data-validation';
3
-
4
3
  export declare function CustomFormulaInput(props: IFormulaInputProps): React.JSX.Element;
@@ -1,5 +1,4 @@
1
1
  import { FormulaInputType } from '@univerjs/data-validation';
2
-
3
2
  export declare const BASE_FORMULA_INPUT_NAME = "data-validation.formula-input";
4
3
  export declare const LIST_FORMULA_INPUT_NAME = "data-validation.list-formula-input";
5
4
  export declare const FORMULA_INPUTS: [string, FormulaInputType][];
@@ -1,5 +1,4 @@
1
1
  import { FormulaInputType } from '@univerjs/data-validation';
2
-
3
2
  export declare const CUSTOM_FORMULA_INPUT_NAME = "data-validation.custom-formula-input";
4
3
  export declare const BASE_FORMULA_INPUT_NAME = "data-validation.formula-input";
5
4
  export declare const LIST_FORMULA_INPUT_NAME = "data-validation.list-formula-input";
@@ -1,4 +1,3 @@
1
1
  import { default as React } from 'react';
2
2
  import { IFormulaInputProps } from '@univerjs/data-validation';
3
-
4
3
  export declare function ListFormulaInput(props: IFormulaInputProps): React.JSX.Element;
@@ -1,6 +1,5 @@
1
1
  import { ISheetDataValidationRule } from '@univerjs/core';
2
2
  import { default as React } from 'react';
3
-
4
3
  export interface IDataValidationDetailProps {
5
4
  rule: ISheetDataValidationRule;
6
5
  onClick: () => void;
@@ -1,3 +1,2 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export declare function DataValidationList(): React.JSX.Element | null;