@univerjs/core 0.6.3 → 0.6.4-nightly.202503111607
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 +8 -8
- package/lib/es/facade.js +2 -2
- package/lib/es/index.js +1373 -1345
- package/lib/types/facade/f-univer.d.ts +2 -2
- package/lib/types/services/undoredo/undoredo.service.d.ts +6 -0
- package/lib/types/shared/rectangle.d.ts +19 -0
- package/lib/types/sheets/sheet-skeleton.d.ts +2 -1
- package/lib/types/sheets/worksheet.d.ts +1 -1
- package/lib/umd/index.js +9 -9
- package/package.json +6 -6
- package/LICENSE +0 -176
|
@@ -82,7 +82,7 @@ export declare class FUniver extends Disposable {
|
|
|
82
82
|
*
|
|
83
83
|
* @example
|
|
84
84
|
* ```ts
|
|
85
|
-
* univerAPI.undo();
|
|
85
|
+
* await univerAPI.undo();
|
|
86
86
|
* ```
|
|
87
87
|
*/
|
|
88
88
|
undo(): Promise<boolean>;
|
|
@@ -92,7 +92,7 @@ export declare class FUniver extends Disposable {
|
|
|
92
92
|
*
|
|
93
93
|
* @example
|
|
94
94
|
* ```ts
|
|
95
|
-
* univerAPI.redo();
|
|
95
|
+
* await univerAPI.redo();
|
|
96
96
|
* ```
|
|
97
97
|
*/
|
|
98
98
|
redo(): Promise<boolean>;
|
|
@@ -10,6 +10,10 @@ export interface IUndoRedoItem {
|
|
|
10
10
|
unitID: string;
|
|
11
11
|
undoMutations: IMutationInfo[];
|
|
12
12
|
redoMutations: IMutationInfo[];
|
|
13
|
+
/**
|
|
14
|
+
* sometimes we need an id to mark the undo-redo item
|
|
15
|
+
*/
|
|
16
|
+
id?: string;
|
|
13
17
|
}
|
|
14
18
|
export interface IUndoRedoService {
|
|
15
19
|
undoRedoStatus$: Observable<IUndoRedoStatus>;
|
|
@@ -20,6 +24,7 @@ export interface IUndoRedoService {
|
|
|
20
24
|
pitchTopRedoElement(): Nullable<IUndoRedoItem>;
|
|
21
25
|
popUndoToRedo(): void;
|
|
22
26
|
popRedoToUndo(): void;
|
|
27
|
+
rollback(id: string, unitId?: string): void;
|
|
23
28
|
clearUndoRedo(unitId: string): void;
|
|
24
29
|
/**
|
|
25
30
|
* Batch undo redo elements into a single `IUndoRedoItem` util the returned `IDisposable` is called.
|
|
@@ -90,6 +95,7 @@ export declare class LocalUndoRedoService extends Disposable implements IUndoRed
|
|
|
90
95
|
private _pitchRedoElement;
|
|
91
96
|
popUndoToRedo(): void;
|
|
92
97
|
popRedoToUndo(): void;
|
|
98
|
+
rollback(id: string, unitID?: string): void;
|
|
93
99
|
__tempBatchingUndoRedo(unitId: string): IDisposable;
|
|
94
100
|
protected _updateStatus(): void;
|
|
95
101
|
protected _getUndoStack(unitId: string): IUndoRedoItem[] | null;
|
|
@@ -72,6 +72,25 @@ export declare class Rectangle {
|
|
|
72
72
|
* ```
|
|
73
73
|
*/
|
|
74
74
|
static intersects(src: IRange, target: IRange): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Checks if any of the ranges in the target array intersect with any of the ranges in the source array.
|
|
77
|
+
* Attention! Please make sure there is no NaN in the ranges.
|
|
78
|
+
* @param src
|
|
79
|
+
* @param target
|
|
80
|
+
* @example
|
|
81
|
+
* ```typescript
|
|
82
|
+
* const ranges1 = [
|
|
83
|
+
* { startRow: 0, startColumn: 0, endRow: 2, endColumn: 2 },
|
|
84
|
+
* { startRow: 3, startColumn: 3, endRow: 5, endColumn: 5 }
|
|
85
|
+
* ];
|
|
86
|
+
* const ranges2 = [
|
|
87
|
+
* { startRow: 1, startColumn: 1, endRow: 4, endColumn: 4 },
|
|
88
|
+
* { startRow: 6, startColumn: 6, endRow: 8, endColumn: 8 }
|
|
89
|
+
* ];
|
|
90
|
+
* const doIntersect = Rectangle.doAnyRangesIntersect(ranges1, ranges2); // true
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
static doAnyRangesIntersect(src: IRange[], target: IRange[]): boolean;
|
|
75
94
|
/**
|
|
76
95
|
* Gets the intersection range between two ranges
|
|
77
96
|
* @param src
|
|
@@ -44,7 +44,7 @@ export declare class SheetSkeleton extends Skeleton {
|
|
|
44
44
|
protected _skipAutoHeightForMergedCells: boolean;
|
|
45
45
|
constructor(worksheet: Worksheet, _styles: Styles, _localeService: LocaleService, _contextService: IContextService, _configService: IConfigService, _injector: Injector);
|
|
46
46
|
initConfig(): void;
|
|
47
|
-
|
|
47
|
+
resetCache(): void;
|
|
48
48
|
/**
|
|
49
49
|
* @deprecated should never expose a property that is provided by another module!
|
|
50
50
|
*/
|
|
@@ -109,6 +109,7 @@ export declare class SheetSkeleton extends Skeleton {
|
|
|
109
109
|
* @param bounds
|
|
110
110
|
*/
|
|
111
111
|
calculate(): Nullable<SheetSkeleton>;
|
|
112
|
+
resetRangeCache(_ranges: IRange[]): void;
|
|
112
113
|
private _dynamicallyUpdateRowHeaderWidth;
|
|
113
114
|
protected _hasUnMergedCellInRow(rowIndex: number, startColumn: number, endColumn: number): boolean;
|
|
114
115
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { IInterceptor } from '../common/interceptor';
|
|
2
2
|
import { Nullable, ObjectMatrix } from '../shared';
|
|
3
|
+
import { BooleanNumber, HorizontalAlign, TextDirection, VerticalAlign, WrapStrategy, CellValueType } from '../types/enum';
|
|
3
4
|
import { IPaddingData, IStyleData, ITextRotation } from '../types/interfaces';
|
|
4
5
|
import { Styles } from './styles';
|
|
5
6
|
import { CustomData, ICellData, ICellDataForSheetInterceptor, ICellDataWithSpanAndDisplay, IFreeze, IRange, ISelectionCell, IWorksheetData, CellModeEnum } from './typedef';
|
|
6
7
|
import { DocumentDataModel } from '../docs';
|
|
7
|
-
import { BooleanNumber, CellValueType, HorizontalAlign, TextDirection, VerticalAlign, WrapStrategy } from '../types/enum';
|
|
8
8
|
import { ColumnManager } from './column-manager';
|
|
9
9
|
import { Range } from './range';
|
|
10
10
|
import { RowManager } from './row-manager';
|