@univerjs/sheets-ui 0.4.0 → 0.4.1-nightly.202410201605
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 +3 -3
- package/lib/es/index.js +1999 -1982
- package/lib/types/commands/commands/__tests__/create-selection-command-test-bed.d.ts +3 -3
- package/lib/types/commands/commands/set-selection.command.d.ts +4 -4
- package/lib/types/services/selection/base-selection-render.service.d.ts +13 -5
- package/lib/types/services/selection/mobile-selection-render.service.d.ts +0 -1
- package/lib/umd/index.js +3 -3
- package/package.json +11 -11
- package/LICENSE +0 -176
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { IWorkbookData } from '@univerjs/core';
|
|
2
|
+
export declare const SELECTION_WITH_EMPTY_CELLS_DATA: IWorkbookData;
|
|
3
|
+
export declare const SELECTION_WITH_MERGED_CELLS_DATA: IWorkbookData;
|
|
4
|
+
export declare const SIMPLE_SELECTION_WORKBOOK_DATA: IWorkbookData;
|
|
2
5
|
export declare function createSelectionCommandTestBed(workbookData?: IWorkbookData): {
|
|
3
6
|
univer: import('@univerjs/core').Univer;
|
|
4
7
|
get: {
|
|
@@ -23,6 +26,3 @@ export declare function createFrozenCommandTestBed(workbookData?: IWorkbookData)
|
|
|
23
26
|
};
|
|
24
27
|
sheet: import('@univerjs/core').Workbook;
|
|
25
28
|
};
|
|
26
|
-
export declare const SELECTION_WITH_EMPTY_CELLS_DATA: IWorkbookData;
|
|
27
|
-
export declare const SELECTION_WITH_MERGED_CELLS_DATA: IWorkbookData;
|
|
28
|
-
export declare const SIMPLE_SELECTION_WORKBOOK_DATA: IWorkbookData;
|
|
@@ -11,14 +11,14 @@ export interface IMoveSelectionCommandParams {
|
|
|
11
11
|
jumpOver?: JumpOver;
|
|
12
12
|
nextStep?: number;
|
|
13
13
|
}
|
|
14
|
-
/**
|
|
15
|
-
* Move selection
|
|
16
|
-
*/
|
|
17
|
-
export declare const MoveSelectionCommand: ICommand<IMoveSelectionCommandParams>;
|
|
18
14
|
export interface IMoveSelectionEnterAndTabCommandParams {
|
|
19
15
|
direction: Direction;
|
|
20
16
|
keycode: KeyCode;
|
|
21
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Move selection (Mainly by keyboard arrow keys, Tab and Enter key see MoveSelectionEnterAndTabCommand)
|
|
20
|
+
*/
|
|
21
|
+
export declare const MoveSelectionCommand: ICommand<IMoveSelectionCommandParams>;
|
|
22
22
|
/**
|
|
23
23
|
* Move selection for enter and tab.
|
|
24
24
|
*/
|
|
@@ -34,6 +34,7 @@ export interface ISheetSelectionRenderService {
|
|
|
34
34
|
attachPrimaryWithCoord(primary: Nullable<Partial<ISelectionCell>>): Nullable<ISelectionCellWithMergeInfo>;
|
|
35
35
|
getSelectionCellByPosition(x: number, y: number): Nullable<ISelectionCellWithMergeInfo>;
|
|
36
36
|
setSingleSelectionEnabled(enabled: boolean): void;
|
|
37
|
+
refreshSelectionMoveEnd(): void;
|
|
37
38
|
}
|
|
38
39
|
export declare const ISheetSelectionRenderService: import('@wendellhu/redi').IdentifierDecorator<ISheetSelectionRenderService>;
|
|
39
40
|
/**
|
|
@@ -70,10 +71,16 @@ export declare class BaseSelectionRenderService extends Disposable implements IS
|
|
|
70
71
|
protected _remainLastEnabled: boolean;
|
|
71
72
|
protected _skipLastEnabled: boolean;
|
|
72
73
|
protected _singleSelectionEnabled: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Mainly emit by pointerup (pointerup is handled in _onPointerdown)
|
|
76
|
+
*/
|
|
73
77
|
protected readonly _selectionMoveEnd$: BehaviorSubject<ISelectionWithCoordAndStyle[]>;
|
|
74
78
|
readonly selectionMoveEnd$: Observable<ISelectionWithCoordAndStyle[]>;
|
|
75
79
|
protected readonly _selectionMoving$: Subject<ISelectionWithCoordAndStyle[]>;
|
|
76
80
|
readonly selectionMoving$: Observable<ISelectionWithCoordAndStyle[]>;
|
|
81
|
+
/**
|
|
82
|
+
* Mainly emit by pointerdown
|
|
83
|
+
*/
|
|
77
84
|
protected readonly _selectionMoveStart$: Subject<ISelectionWithCoordAndStyle[]>;
|
|
78
85
|
readonly selectionMoveStart$: Observable<ISelectionWithCoordAndStyle[]>;
|
|
79
86
|
private _selectionMoving;
|
|
@@ -140,11 +147,12 @@ export declare class BaseSelectionRenderService extends Disposable implements IS
|
|
|
140
147
|
protected _reset(): void;
|
|
141
148
|
resetAndEndSelection(): void;
|
|
142
149
|
/**
|
|
143
|
-
*
|
|
144
|
-
* @param evt
|
|
145
|
-
* @param
|
|
146
|
-
* @param
|
|
147
|
-
* @param
|
|
150
|
+
* Handle pointer down event, then trigger selectionMoveStart$.
|
|
151
|
+
* @param evt
|
|
152
|
+
* @param _zIndex
|
|
153
|
+
* @param rangeType
|
|
154
|
+
* @param viewport
|
|
155
|
+
* @param scrollTimerType
|
|
148
156
|
*/
|
|
149
157
|
protected _onPointerDown(evt: IPointerEvent | IMouseEvent, _zIndex: number | undefined, rangeType: RANGE_TYPE | undefined, viewport: Nullable<Viewport>, scrollTimerType?: ScrollTimerType): void;
|
|
150
158
|
/**
|
|
@@ -48,7 +48,6 @@ export declare class MobileSheetsSelectionRenderService extends BaseSelectionRen
|
|
|
48
48
|
* new selection control for mobile do one more thing: bind event for two control points.
|
|
49
49
|
* @param scene
|
|
50
50
|
* @param rangeType
|
|
51
|
-
* @returns
|
|
52
51
|
*/
|
|
53
52
|
newSelectionControl(scene: Scene, rangeType: RANGE_TYPE): MobileSelectionControl;
|
|
54
53
|
private _getActiveViewport;
|