@univerjs/sheets-data-validation 0.2.7 → 0.2.9
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/README.md +54 -4
- package/lib/cjs/index.js +2 -2
- package/lib/es/index.js +473 -458
- package/lib/locale/en-US.json +10 -9
- package/lib/locale/ru-RU.json +2 -1
- package/lib/locale/vi-VN.json +2 -1
- package/lib/locale/zh-CN.json +10 -9
- package/lib/locale/zh-TW.json +2 -1
- package/lib/types/commands/commands/data-validation.command.d.ts +6 -1
- package/lib/types/commands/operations/data-validation.operation.d.ts +0 -1
- package/lib/types/common/date-text-map.d.ts +0 -1
- package/lib/types/controllers/dv-alert.controller.d.ts +0 -1
- package/lib/types/controllers/dv-auto-fill.controller.d.ts +0 -1
- package/lib/types/controllers/dv-copy-paste.controller.d.ts +0 -1
- package/lib/types/controllers/dv-formula.controller.d.ts +0 -1
- package/lib/types/controllers/dv-model.controller.d.ts +0 -1
- package/lib/types/controllers/dv-permission.controller.d.ts +0 -1
- package/lib/types/controllers/dv-ref-range.controller.d.ts +0 -1
- package/lib/types/controllers/dv-reject-input.controller.d.ts +0 -1
- package/lib/types/controllers/dv-render.controller.d.ts +0 -1
- package/lib/types/controllers/dv.controller.d.ts +1 -5
- package/lib/types/controllers/dv.menu.d.ts +0 -1
- package/lib/types/index.d.ts +5 -11
- package/lib/types/locale/en-US.d.ts +0 -1
- package/lib/types/locale/ru-RU.d.ts +0 -1
- package/lib/types/locale/vi-VN.d.ts +0 -1
- package/lib/types/locale/zh-CN.d.ts +1 -0
- package/lib/types/locale/zh-TW.d.ts +0 -1
- package/lib/types/mobile-plugin.d.ts +0 -1
- package/lib/types/models/rule-matrix.d.ts +0 -1
- package/lib/types/models/sheet-data-validation-manager.d.ts +4 -5
- package/lib/types/plugin.d.ts +0 -1
- package/lib/types/services/data-validation-panel.service.d.ts +0 -1
- package/lib/types/services/dropdown-manager.service.d.ts +5 -3
- package/lib/types/services/dv-cache.service.d.ts +1 -1
- package/lib/types/services/dv-custom-formula.service.d.ts +3 -3
- package/lib/types/services/dv-formula.service.d.ts +0 -1
- package/lib/types/services/dv-validator-service.d.ts +4 -2
- package/lib/types/types/const/operator-text-map.d.ts +0 -1
- package/lib/types/types/const/two-formula-operators.d.ts +0 -1
- package/lib/types/utils/formula.d.ts +1 -1
- package/lib/types/utils/get-cell-data-origin.d.ts +0 -1
- package/lib/types/validators/checkbox-validator.d.ts +0 -1
- package/lib/types/validators/custom-validator.d.ts +0 -1
- package/lib/types/validators/date-validator.d.ts +2 -3
- package/lib/types/validators/decimal-validator.d.ts +5 -2
- package/lib/types/validators/list-multiple-validator.d.ts +0 -1
- package/lib/types/validators/list-validator.d.ts +0 -1
- package/lib/types/validators/text-length-validator.d.ts +5 -2
- package/lib/types/validators/util.d.ts +0 -1
- package/lib/types/validators/whole-validator.d.ts +5 -2
- package/lib/types/views/date-dropdown/index.d.ts +0 -1
- package/lib/types/views/detail/index.d.ts +0 -1
- package/lib/types/views/drop-down/CellDropdown.d.ts +0 -1
- package/lib/types/views/formula-input/base-formula-input.d.ts +0 -1
- package/lib/types/views/formula-input/checkbox-formula-input.d.ts +0 -1
- package/lib/types/views/formula-input/custom-formula-input.d.ts +0 -1
- package/lib/types/views/formula-input/formula-input.d.ts +0 -1
- package/lib/types/views/formula-input/index.d.ts +0 -1
- package/lib/types/views/formula-input/list-formula-input.d.ts +0 -1
- package/lib/types/views/item/index.d.ts +0 -1
- package/lib/types/views/list/index.d.ts +0 -1
- package/lib/types/views/list-dropdown/index.d.ts +0 -1
- package/lib/types/views/options/index.d.ts +0 -1
- package/lib/types/views/panel/index.d.ts +0 -1
- package/lib/types/views/render-mode/index.d.ts +0 -1
- package/lib/types/views/show-time/index.d.ts +0 -1
- package/lib/types/widgets/checkbox-widget.d.ts +0 -1
- package/lib/types/widgets/dropdown-multiple-widget.d.ts +0 -1
- package/lib/types/widgets/dropdown-widget.d.ts +1 -3
- package/lib/types/widgets/shape/dropdown.d.ts +0 -1
- package/lib/types/widgets/shape/layout.d.ts +0 -1
- package/lib/umd/index.js +2 -2
- package/package.json +25 -25
- package/lib/types/services/dv.service.d.ts +0 -20
- package/lib/types/services/dv.tips.d.ts +0 -17
- package/lib/types/utils/date.d.ts +0 -17
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { DataValidationOperator, CellValue, IDataValidationRule, IDataValidationRuleBase } from '@univerjs/core';
|
|
1
|
+
import { DataValidationOperator, CellValue, IDataValidationRule, IDataValidationRuleBase, Nullable } 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;
|
|
@@ -13,10 +12,14 @@ export declare class WholeValidator extends BaseDataValidator<number> {
|
|
|
13
12
|
isValidType(cellInfo: IValidatorCellInfo<CellValue>, formula: IFormulaResult, rule: IDataValidationRule): Promise<boolean>;
|
|
14
13
|
transform(cellInfo: IValidatorCellInfo<CellValue>, formula: IFormulaResult, rule: IDataValidationRule): {
|
|
15
14
|
value: number;
|
|
15
|
+
interceptValue: Nullable<CellValue>;
|
|
16
16
|
row: number;
|
|
17
17
|
column: number;
|
|
18
18
|
unitId: string;
|
|
19
19
|
subUnitId: string;
|
|
20
|
+
worksheet: import('@univerjs/core').Worksheet;
|
|
21
|
+
workbook: import('@univerjs/core').Workbook;
|
|
22
|
+
t: Nullable<import('@univerjs/protocol').CellValueType>;
|
|
20
23
|
};
|
|
21
24
|
private _parseNumber;
|
|
22
25
|
parseFormula(rule: IDataValidationRule, unitId: string, subUnitId: string): Promise<{
|
|
@@ -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";
|
|
@@ -2,7 +2,6 @@ import { IMouseEvent, IPointerEvent, UniverRenderingContext2D } from '@univerjs/
|
|
|
2
2
|
import { ICommandService, ThemeService, ICellRenderContext } from '@univerjs/core';
|
|
3
3
|
import { IBaseDataValidationWidget } from '@univerjs/data-validation';
|
|
4
4
|
import { DataValidationFormulaService } from '../services/dv-formula.service';
|
|
5
|
-
|
|
6
5
|
export declare class CheckboxRender implements IBaseDataValidationWidget {
|
|
7
6
|
private readonly _commandService;
|
|
8
7
|
private readonly _formulaService;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ICommandService, ICellRenderContext } from '@univerjs/core';
|
|
2
2
|
import { IMouseEvent, IPointerEvent, Spreadsheet, SpreadsheetSkeleton, UniverRenderingContext2D } from '@univerjs/engine-render';
|
|
3
3
|
import { IBaseDataValidationWidget } from '@univerjs/data-validation';
|
|
4
|
-
|
|
5
4
|
export declare class DropdownMultipleWidget implements IBaseDataValidationWidget {
|
|
6
5
|
private readonly _commandService;
|
|
7
6
|
zIndex?: number | undefined;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { ICommandService, LocaleService, ICellRenderContext
|
|
1
|
+
import { ICommandService, LocaleService, ICellRenderContext } from '@univerjs/core';
|
|
2
2
|
import { IMouseEvent, IPointerEvent, SpreadsheetSkeleton, UniverRenderingContext2D } from '@univerjs/engine-render';
|
|
3
3
|
import { IBaseDataValidationWidget } from '@univerjs/data-validation';
|
|
4
|
-
|
|
5
4
|
export interface IDropdownInfo {
|
|
6
5
|
top: number;
|
|
7
6
|
left: number;
|
|
@@ -11,7 +10,6 @@ export interface IDropdownInfo {
|
|
|
11
10
|
export declare class DropdownWidget implements IBaseDataValidationWidget {
|
|
12
11
|
private readonly _localeService;
|
|
13
12
|
private readonly _commandService;
|
|
14
|
-
static padding: IPaddingData;
|
|
15
13
|
private _dropdownInfoMap;
|
|
16
14
|
constructor(_localeService: LocaleService, _commandService: ICommandService);
|
|
17
15
|
zIndex?: number | undefined;
|