@univerjs/sheets-data-validation 0.2.4 → 0.2.6
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 +3467 -3395
- package/lib/types/commands/commands/data-validation.command.d.ts +3 -3
- package/lib/types/controllers/dv-auto-fill.controller.d.ts +1 -2
- package/lib/types/controllers/dv-copy-paste.controller.d.ts +1 -2
- package/lib/types/controllers/dv-model.controller.d.ts +1 -2
- package/lib/types/controllers/dv-ref-range.controller.d.ts +1 -2
- package/lib/types/controllers/dv-render.controller.d.ts +1 -2
- package/lib/types/controllers/dv.controller.d.ts +1 -2
- package/lib/types/controllers/dv.menu.d.ts +1 -1
- package/lib/types/mobile-plugin.d.ts +2 -3
- package/lib/types/models/sheet-data-validation-manager.d.ts +2 -4
- package/lib/types/plugin.d.ts +2 -3
- package/lib/types/services/data-validation-panel.service.d.ts +1 -2
- package/lib/types/services/dropdown-manager.service.d.ts +1 -1
- package/lib/umd/index.js +2 -2
- package/package.json +27 -29
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ICommand, IDataValidationRuleBase, IDataValidationRuleOptions, IMutationInfo, IRange, ISheetDataValidationRule } from '@univerjs/core';
|
|
1
|
+
import { IAccessor, ICommand, IDataValidationRuleBase, IDataValidationRuleOptions, IMutationInfo, IRange, ISheetDataValidationRule } from '@univerjs/core';
|
|
2
|
+
import { DataValidationChangeSource } from '@univerjs/data-validation';
|
|
2
3
|
import { ISheetCommandSharedParams } from '@univerjs/sheets';
|
|
3
|
-
import { IAccessor } from '@wendellhu/redi';
|
|
4
4
|
import { RangeMutation } from '../../models/rule-matrix';
|
|
5
5
|
|
|
6
6
|
export interface IUpdateSheetDataValidationRangeCommandParams {
|
|
@@ -9,7 +9,7 @@ export interface IUpdateSheetDataValidationRangeCommandParams {
|
|
|
9
9
|
ruleId: string;
|
|
10
10
|
ranges: IRange[];
|
|
11
11
|
}
|
|
12
|
-
export declare function getDataValidationDiffMutations(unitId: string, subUnitId: string, diffs: RangeMutation[], accessor: IAccessor): {
|
|
12
|
+
export declare function getDataValidationDiffMutations(unitId: string, subUnitId: string, diffs: RangeMutation[], accessor: IAccessor, source?: DataValidationChangeSource): {
|
|
13
13
|
redoMutations: IMutationInfo<object>[];
|
|
14
14
|
undoMutations: IMutationInfo<object>[];
|
|
15
15
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Disposable } from '@univerjs/core';
|
|
1
|
+
import { Disposable, Injector } from '@univerjs/core';
|
|
2
2
|
import { IAutoFillService } from '@univerjs/sheets-ui';
|
|
3
|
-
import { Injector } from '@wendellhu/redi';
|
|
4
3
|
import { DataValidationModel } from '@univerjs/data-validation';
|
|
5
4
|
|
|
6
5
|
export declare class DataValidationAutoFillController extends Disposable {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Disposable } from '@univerjs/core';
|
|
1
|
+
import { Disposable, Injector } from '@univerjs/core';
|
|
2
2
|
import { ISheetClipboardService } from '@univerjs/sheets-ui';
|
|
3
|
-
import { Injector } from '@wendellhu/redi';
|
|
4
3
|
import { DataValidationModel } from '@univerjs/data-validation';
|
|
5
4
|
|
|
6
5
|
export declare class DataValidationCopyPasteController extends Disposable {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Disposable, IResourceManagerService, IUniverInstanceService } from '@univerjs/core';
|
|
1
|
+
import { Disposable, Injector, IResourceManagerService, IUniverInstanceService } from '@univerjs/core';
|
|
2
2
|
import { DataValidationModel } from '@univerjs/data-validation';
|
|
3
|
-
import { Injector } from '@wendellhu/redi';
|
|
4
3
|
|
|
5
4
|
export declare class DataValidationModelController extends Disposable {
|
|
6
5
|
private readonly _resourceManagerService;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ISheetDataValidationRule, Disposable } from '@univerjs/core';
|
|
1
|
+
import { ISheetDataValidationRule, Disposable, Injector } from '@univerjs/core';
|
|
2
2
|
import { RefRangeService } from '@univerjs/sheets';
|
|
3
|
-
import { Injector } from '@wendellhu/redi';
|
|
4
3
|
import { DataValidationModel } from '@univerjs/data-validation';
|
|
5
4
|
import { FormulaRefRangeService } from '@univerjs/sheets-formula';
|
|
6
5
|
import { DataValidationCustomFormulaService } from '../services/dv-custom-formula.service';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { ICommandService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
|
1
|
+
import { ICommandService, Injector, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
|
2
2
|
import { DataValidationModel, DataValidatorRegistryService } from '@univerjs/data-validation';
|
|
3
3
|
import { MenuConfig, ComponentManager, IMenuService } from '@univerjs/ui';
|
|
4
|
-
import { Injector } from '@wendellhu/redi';
|
|
5
4
|
import { AutoHeightController, IEditorBridgeService } from '@univerjs/sheets-ui';
|
|
6
5
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
7
6
|
import { SheetInterceptorService } from '@univerjs/sheets';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
|
1
|
+
import { Injector, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
|
2
2
|
import { DataValidationModel, DataValidatorRegistryService } from '@univerjs/data-validation';
|
|
3
|
-
import { Injector } from '@wendellhu/redi';
|
|
4
3
|
import { ComponentManager } from '@univerjs/ui';
|
|
5
4
|
import { SheetInterceptorService, SheetsSelectionsService } from '@univerjs/sheets';
|
|
6
5
|
import { SheetDataValidationService } from '../services/dv.service';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IMenuItem } from '@univerjs/ui';
|
|
2
|
-
import { IAccessor } from '@
|
|
2
|
+
import { IAccessor } from '@univerjs/core';
|
|
3
3
|
|
|
4
4
|
export declare const DataValidationIcon = "data-validation-single";
|
|
5
5
|
export declare function dataValidationMenuFactory(accessor: IAccessor): IMenuItem;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ICommandService, LocaleService, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
2
|
-
import { Injector } from '@wendellhu/redi';
|
|
1
|
+
import { ICommandService, LocaleService, Plugin, UniverInstanceType, Injector } from '@univerjs/core';
|
|
3
2
|
import { IUniverSheetsDataValidation } from './controllers/dv-render.controller';
|
|
4
3
|
|
|
5
4
|
export declare class UniverSheetsDataValidationMobilePlugin extends Plugin {
|
|
@@ -10,5 +9,5 @@ export declare class UniverSheetsDataValidationMobilePlugin extends Plugin {
|
|
|
10
9
|
static pluginName: string;
|
|
11
10
|
static type: UniverInstanceType;
|
|
12
11
|
constructor(_config: Partial<IUniverSheetsDataValidation>, _injector: Injector, _commandService: ICommandService, _localeService: LocaleService);
|
|
13
|
-
onStarting(
|
|
12
|
+
onStarting(): void;
|
|
14
13
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { CellValue, ISheetDataValidationRule, Nullable, DataValidationStatus, DataValidationType } from '@univerjs/core';
|
|
1
|
+
import { CellValue, Injector, ISheetDataValidationRule, Nullable, DataValidationStatus, DataValidationType } from '@univerjs/core';
|
|
2
2
|
import { DataValidationManager, IUpdateRulePayload } from '@univerjs/data-validation';
|
|
3
3
|
import { ISheetLocationBase } from '@univerjs/sheets';
|
|
4
|
-
import { Injector } from '@wendellhu/redi';
|
|
5
4
|
import { RuleMatrix } from './rule-matrix';
|
|
6
5
|
|
|
7
6
|
export declare class SheetDataValidationManager extends DataValidationManager<ISheetDataValidationRule> {
|
|
@@ -15,8 +14,7 @@ export declare class SheetDataValidationManager extends DataValidationManager<IS
|
|
|
15
14
|
private _dataValidationFormulaService;
|
|
16
15
|
private _dataValidationCustomFormulaService;
|
|
17
16
|
private _cache;
|
|
18
|
-
|
|
19
|
-
constructor(unitId: string, subUnitId: string, rules: ISheetDataValidationRule[] | undefined, _injector: Injector);
|
|
17
|
+
constructor(unitId: string, subUnitId: string, _injector: Injector);
|
|
20
18
|
private _addRuleSideEffect;
|
|
21
19
|
addRule(rule: ISheetDataValidationRule | ISheetDataValidationRule[], index?: number): void;
|
|
22
20
|
updateRule(ruleId: string, payload: IUpdateRulePayload): ISheetDataValidationRule;
|
package/lib/types/plugin.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ICommandService, LocaleService, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
2
|
-
import { Injector } from '@wendellhu/redi';
|
|
1
|
+
import { ICommandService, LocaleService, Plugin, UniverInstanceType, Injector } from '@univerjs/core';
|
|
3
2
|
import { IUniverSheetsDataValidation } from './controllers/dv-render.controller';
|
|
4
3
|
|
|
5
4
|
export declare class UniverSheetsDataValidationPlugin extends Plugin {
|
|
@@ -10,5 +9,5 @@ export declare class UniverSheetsDataValidationPlugin extends Plugin {
|
|
|
10
9
|
static pluginName: string;
|
|
11
10
|
static type: UniverInstanceType;
|
|
12
11
|
constructor(_config: Partial<IUniverSheetsDataValidation>, _injector: Injector, _commandService: ICommandService, _localeService: LocaleService);
|
|
13
|
-
onStarting(
|
|
12
|
+
onStarting(): void;
|
|
14
13
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { IDataValidationRule, Nullable, Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
1
|
+
import { IDataValidationRule, IDisposable, Nullable, Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
2
2
|
import { ISidebarService } from '@univerjs/ui';
|
|
3
|
-
import { IDisposable } from '@wendellhu/redi';
|
|
4
3
|
|
|
5
4
|
export declare class DataValidationPanelService extends Disposable {
|
|
6
5
|
private readonly _univerInstanceService;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Disposable, IUniverInstanceService
|
|
1
|
+
import { Nullable, Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
2
2
|
import { ISheetLocation } from '@univerjs/sheets';
|
|
3
3
|
import { SheetCanvasPopManagerService } from '@univerjs/sheets-ui';
|
|
4
4
|
import { DataValidationModel, DataValidatorRegistryService } from '@univerjs/data-validation';
|