@univerjs/sheets 0.2.1 → 0.2.3
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 +11 -3
- package/lib/cjs/index.js +3 -3
- package/lib/es/index.js +2785 -2829
- package/lib/locale/vi-VN.json +14 -0
- package/lib/locale/zh-TW.json +14 -0
- package/lib/types/basics/__tests__/cell-value.spec.d.ts +16 -0
- package/lib/types/basics/cell-style.d.ts +8 -0
- package/lib/types/basics/cell-type.d.ts +19 -0
- package/lib/types/basics/cell-value.d.ts +22 -0
- package/lib/types/basics/utils.d.ts +2 -1
- package/lib/types/commands/mutations/set-range-values.mutation.d.ts +1 -47
- package/lib/types/commands/operations/selection.operation.d.ts +1 -2
- package/lib/types/commands/utils/selection-command-util.d.ts +4 -0
- package/lib/types/controllers/merge-cell.controller.d.ts +2 -2
- package/lib/types/index.d.ts +3 -1
- package/lib/types/locale/vi-VN.d.ts +4 -0
- package/lib/types/locale/zh-TW.d.ts +4 -0
- package/lib/types/services/ref-range/ref-range.service.d.ts +2 -2
- package/lib/types/services/ref-range/util.d.ts +7 -7
- package/lib/types/services/selections/ref-selections.service.d.ts +9 -0
- package/lib/types/services/selections/selection-manager.service.d.ts +73 -0
- package/lib/umd/index.js +3 -3
- package/package.json +11 -10
- package/lib/types/services/selection-manager.service.d.ts +0 -93
- /package/lib/types/{commands/mutations/__tests__/set-range-values.mutation.spec.d.ts → basics/__tests__/cell-type.spec.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs/sheets",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "UniverSheet normal base-sheets",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -49,12 +49,13 @@
|
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@wendellhu/redi": "0.15.5",
|
|
51
51
|
"rxjs": ">=7.0.0",
|
|
52
|
-
"@univerjs/core": "0.2.
|
|
53
|
-
"@univerjs/engine-
|
|
54
|
-
"@univerjs/
|
|
52
|
+
"@univerjs/core": "0.2.3",
|
|
53
|
+
"@univerjs/engine-numfmt": "0.2.3",
|
|
54
|
+
"@univerjs/engine-formula": "0.2.3",
|
|
55
|
+
"@univerjs/rpc": "0.2.3"
|
|
55
56
|
},
|
|
56
57
|
"dependencies": {
|
|
57
|
-
"@univerjs/protocol": "0.1.38-alpha.
|
|
58
|
+
"@univerjs/protocol": "0.1.38-alpha.18"
|
|
58
59
|
},
|
|
59
60
|
"devDependencies": {
|
|
60
61
|
"@wendellhu/redi": "0.15.5",
|
|
@@ -62,11 +63,11 @@
|
|
|
62
63
|
"typescript": "^5.5.3",
|
|
63
64
|
"vite": "^5.3.3",
|
|
64
65
|
"vitest": "^1.6.0",
|
|
65
|
-
"@univerjs/core": "0.2.
|
|
66
|
-
"@univerjs/
|
|
67
|
-
"@univerjs/
|
|
68
|
-
"@univerjs/
|
|
69
|
-
"@univerjs/
|
|
66
|
+
"@univerjs/core": "0.2.3",
|
|
67
|
+
"@univerjs/engine-formula": "0.2.3",
|
|
68
|
+
"@univerjs/engine-numfmt": "0.2.3",
|
|
69
|
+
"@univerjs/shared": "0.2.3",
|
|
70
|
+
"@univerjs/rpc": "0.2.3"
|
|
70
71
|
},
|
|
71
72
|
"univerSpace": {
|
|
72
73
|
".": {
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { IRange, ISelectionCell, Nullable, ThemeService } from '@univerjs/core';
|
|
2
|
-
import { IDisposable } from '@wendellhu/redi';
|
|
3
|
-
import { ISelectionStyle, ISelectionWithStyle } from '../basics/selection';
|
|
4
|
-
|
|
5
|
-
export declare const NORMAL_SELECTION_PLUGIN_NAME = "normalSelectionPluginName";
|
|
6
|
-
export interface ISelectionManagerSearchParam {
|
|
7
|
-
pluginName: string;
|
|
8
|
-
unitId: string;
|
|
9
|
-
sheetId: string;
|
|
10
|
-
}
|
|
11
|
-
export interface ISelectionManagerInsertParam extends ISelectionManagerSearchParam {
|
|
12
|
-
selectionDatas: ISelectionWithStyle[];
|
|
13
|
-
}
|
|
14
|
-
export type ISelectionInfo = Map<string, Map<string, Map<string, ISelectionWithStyle[]>>>;
|
|
15
|
-
export declare enum SelectionMoveType {
|
|
16
|
-
MOVE_START = 0,
|
|
17
|
-
MOVING = 1,
|
|
18
|
-
MOVE_END = 2
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* This service is responsible for managing the selection data.
|
|
22
|
-
*
|
|
23
|
-
* You can generally modify its data through SetSelectionsOperation.
|
|
24
|
-
*
|
|
25
|
-
* In the same app and sub-table, there will be different functional selection areas,
|
|
26
|
-
* such as charts, formulas, conditional formats, etc.,
|
|
27
|
-
* which are distinguished by the pluginName.
|
|
28
|
-
*
|
|
29
|
-
* The selection data drawn by the user through the SelectionRenderService will be saved to this service.
|
|
30
|
-
*
|
|
31
|
-
* Data changes within the service will also notify the SelectionController to redraw the selection area.
|
|
32
|
-
*
|
|
33
|
-
* Not only will switching sub-tables trigger a redraw, but also changing row and column widths,
|
|
34
|
-
* hiding rows and columns, automatic row height, dragging rows and columns, deleting rows and columns,
|
|
35
|
-
* and so on, will cause the size of the selection area to change.
|
|
36
|
-
*/
|
|
37
|
-
export declare class SelectionManagerService implements IDisposable {
|
|
38
|
-
private readonly _themeService;
|
|
39
|
-
private readonly _selectionInfo;
|
|
40
|
-
private _searchParamForSelection;
|
|
41
|
-
private readonly _selectionMoveStart$;
|
|
42
|
-
readonly selectionMoveStart$: import('rxjs').Observable<Nullable<ISelectionWithStyle[]>>;
|
|
43
|
-
private readonly _selectionMoving$;
|
|
44
|
-
readonly selectionMoving$: import('rxjs').Observable<Nullable<ISelectionWithStyle[]>>;
|
|
45
|
-
private readonly _selectionMoveEnd$;
|
|
46
|
-
readonly selectionMoveEnd$: import('rxjs').Observable<Nullable<ISelectionWithStyle[]>>;
|
|
47
|
-
private readonly _selectionMoveEndBefore$;
|
|
48
|
-
readonly selectionMoveEndBefore$: import('rxjs').Observable<Nullable<ISelectionWithStyle[]>>;
|
|
49
|
-
private _dirty;
|
|
50
|
-
constructor(_themeService: ThemeService);
|
|
51
|
-
getCurrent(): Nullable<ISelectionManagerSearchParam>;
|
|
52
|
-
getLastByPlugin(pluginName: string): Readonly<Nullable<ISelectionWithStyle>>;
|
|
53
|
-
changePlugin(pluginName: string): void;
|
|
54
|
-
changePluginNoRefresh(pluginName: string): void;
|
|
55
|
-
reset(): void;
|
|
56
|
-
resetPlugin(): void;
|
|
57
|
-
dispose(): void;
|
|
58
|
-
makeDirty(dirty?: boolean): void;
|
|
59
|
-
refreshSelection(): void;
|
|
60
|
-
setCurrentSelection(param: ISelectionManagerSearchParam): void;
|
|
61
|
-
setCurrentSelectionNotRefresh(param: ISelectionManagerSearchParam): void;
|
|
62
|
-
getSelectionInfo(): Readonly<ISelectionInfo>;
|
|
63
|
-
getSelectionDatasByParam(param: Nullable<ISelectionManagerSearchParam>): Readonly<Nullable<ISelectionWithStyle[]>>;
|
|
64
|
-
getSelections(): Readonly<Nullable<ISelectionWithStyle[]>>;
|
|
65
|
-
getSelectionRanges(): Nullable<IRange[]>;
|
|
66
|
-
getFirst(): Readonly<Nullable<ISelectionWithStyle>>;
|
|
67
|
-
getLast(): Readonly<Nullable<ISelectionWithStyle & {
|
|
68
|
-
primary: ISelectionCell;
|
|
69
|
-
}>>;
|
|
70
|
-
addNoRefresh(selectionDatas: ISelectionWithStyle[]): void;
|
|
71
|
-
add(selectionDatas: ISelectionWithStyle[]): void;
|
|
72
|
-
replace(selectionDatas: ISelectionWithStyle[], type?: SelectionMoveType): void;
|
|
73
|
-
replaceWithNoRefresh(selectionDatas: ISelectionWithStyle[]): void;
|
|
74
|
-
clear(): void;
|
|
75
|
-
remove(index: number): void;
|
|
76
|
-
createDefaultAutoFillSelection(): ISelectionStyle;
|
|
77
|
-
createCopyPasteSelection(): ISelectionStyle;
|
|
78
|
-
createDefaultSelection(): ISelectionStyle;
|
|
79
|
-
/**
|
|
80
|
-
* Determine whether multiple current selections overlap
|
|
81
|
-
*/
|
|
82
|
-
isOverlapping(): boolean;
|
|
83
|
-
private _getSelectionDatas;
|
|
84
|
-
private _refresh;
|
|
85
|
-
private _refreshStart;
|
|
86
|
-
private _refreshMoving;
|
|
87
|
-
private _getFirstByParam;
|
|
88
|
-
private _getLastByParam;
|
|
89
|
-
private _addByParam;
|
|
90
|
-
private _replaceByParam;
|
|
91
|
-
private _clearByParam;
|
|
92
|
-
private _removeByParam;
|
|
93
|
-
}
|