@univerjs/sheets-ui 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 +15 -15
- package/lib/es/index.js +14883 -14458
- package/lib/types/commands/commands/__tests__/create-command-test-bed.d.ts +1 -2
- package/lib/types/commands/commands/__tests__/create-selection-command-test-bed.d.ts +12 -12
- package/lib/types/commands/commands/utils/selection-utils.d.ts +0 -1
- package/lib/types/commands/operations/scroll.operation.d.ts +2 -2
- package/lib/types/common/utils.d.ts +1 -2
- package/lib/types/controllers/auto-fill.controller.d.ts +1 -2
- package/lib/types/controllers/auto-height.controller.d.ts +1 -2
- package/lib/types/controllers/clipboard/clipboard.controller.d.ts +1 -2
- package/lib/types/controllers/clipboard/utils.d.ts +1 -2
- package/lib/types/controllers/editor/__tests__/create-test-bed.d.ts +1 -2
- package/lib/types/controllers/editor/__tests__/mock-function.service.d.ts +6 -0
- package/lib/types/controllers/editor/editing.render-controller.d.ts +4 -3
- package/lib/types/controllers/format-painter/format-painter.controller.d.ts +1 -2
- package/lib/types/controllers/menu/__tests__/create-menu-test-bed.d.ts +6 -6
- package/lib/types/controllers/menu/border.menu.d.ts +1 -1
- package/lib/types/controllers/menu/clear.menu.d.ts +1 -1
- package/lib/types/controllers/menu/delete.menu.d.ts +1 -1
- package/lib/types/controllers/menu/insert.menu.d.ts +1 -1
- package/lib/types/controllers/menu/menu-util.d.ts +1 -2
- package/lib/types/controllers/menu/menu.d.ts +1 -2
- package/lib/types/controllers/menu/merge.menu.d.ts +1 -1
- package/lib/types/controllers/menu/permission-menu-util.d.ts +1 -1
- package/lib/types/controllers/menu/permission.menu.d.ts +1 -1
- package/lib/types/controllers/menu/sheet.menu.d.ts +1 -1
- package/lib/types/controllers/mobile/mobile-sheet-ui.controller.d.ts +1 -2
- package/lib/types/controllers/permission/sheet-permission-interceptor-formula-render.controller.d.ts +1 -2
- package/lib/types/controllers/permission/sheet-permission-render.controller.d.ts +1 -2
- package/lib/types/controllers/render-controllers/freeze.render-controller.d.ts +1 -2
- package/lib/types/controllers/render-controllers/mobile/mobile-contextmenu.render-controller.d.ts +3 -1
- package/lib/types/controllers/render-controllers/mobile/mobile-scroll.render-controller.d.ts +0 -7
- package/lib/types/controllers/render-controllers/scroll.render-controller.d.ts +1 -3
- package/lib/types/controllers/sheet-ui.controller.d.ts +1 -2
- package/lib/types/controllers/utils/char-tools.d.ts +23 -0
- package/lib/types/controllers/utils/range-tools.d.ts +1 -2
- package/lib/types/controllers/utils/selections-tools.d.ts +1 -2
- package/lib/types/index.d.ts +1 -1
- package/lib/types/mobile-sheets-ui-plugin.d.ts +2 -3
- package/lib/types/services/auto-fill/__tests__/tool.spec.d.ts +16 -0
- package/lib/types/services/auto-fill/auto-fill.service.d.ts +2 -3
- package/lib/types/services/auto-fill/tools.d.ts +6 -0
- package/lib/types/services/auto-fill/type.d.ts +1 -2
- package/lib/types/services/canvas-pop-manager.service.d.ts +2 -3
- package/lib/types/services/cell-alert-manager.service.d.ts +2 -2
- package/lib/types/services/clipboard/__tests__/clipboard-test-bed.d.ts +7 -8
- package/lib/types/services/clipboard/clipboard.service.d.ts +2 -3
- package/lib/types/services/editor/cell-editor-manager.service.d.ts +2 -3
- package/lib/types/services/editor/formula-editor-manager.service.d.ts +2 -3
- package/lib/types/services/editor-bridge.service.d.ts +2 -3
- package/lib/types/services/format-painter/format-painter.service.d.ts +1 -1
- package/lib/types/services/mark-selection/mark-selection.service.d.ts +1 -1
- package/lib/types/services/permission/worksheet-permission-render.service.d.ts +1 -1
- package/lib/types/services/scroll-manager.service.d.ts +33 -52
- package/lib/types/services/selection/base-selection-render.service.d.ts +20 -4
- package/lib/types/services/selection/mobile-selection-render.service.d.ts +1 -2
- package/lib/types/services/selection/selection-render.service.d.ts +9 -4
- package/lib/types/services/selection/selection-shape-extension.d.ts +8 -3
- package/lib/types/services/sheet-bar/sheet-bar.service.d.ts +2 -3
- package/lib/types/services/sheet-skeleton-manager.service.d.ts +1 -2
- package/lib/types/services/sheets-render.service.d.ts +1 -2
- package/lib/types/services/shortcut-experience.service.d.ts +1 -2
- package/lib/types/services/status-bar.service.d.ts +2 -3
- package/lib/types/sheets-ui-plugin.d.ts +2 -3
- package/lib/types/views/header-resize-shape.d.ts +2 -1
- package/lib/umd/index.js +15 -15
- package/package.json +23 -25
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IPosition, Nullable } from '@univerjs/core';
|
|
2
|
-
import { IDisposable } from '@wendellhu/redi';
|
|
1
|
+
import { IDisposable, IPosition, Nullable } from '@univerjs/core';
|
|
3
2
|
import { Observable } from 'rxjs';
|
|
4
3
|
|
|
5
4
|
export interface ICellEditorManagerParam extends Partial<IPosition> {
|
|
@@ -40,4 +39,4 @@ export declare class CellEditorManagerService implements ICellEditorManagerServi
|
|
|
40
39
|
setFocus(param?: boolean): void;
|
|
41
40
|
private _refresh;
|
|
42
41
|
}
|
|
43
|
-
export declare const ICellEditorManagerService: import('@
|
|
42
|
+
export declare const ICellEditorManagerService: import('@univerjs/core').IdentifierDecorator<CellEditorManagerService>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Nullable } from '@univerjs/core';
|
|
2
|
-
import { IDisposable } from '@wendellhu/redi';
|
|
1
|
+
import { IDisposable, Nullable } from '@univerjs/core';
|
|
3
2
|
import { Observable } from 'rxjs';
|
|
4
3
|
|
|
5
4
|
export interface IFormulaEditorManagerService {
|
|
@@ -31,4 +30,4 @@ export declare class FormulaEditorManagerService implements IDisposable {
|
|
|
31
30
|
handleFoldBtnClick(params: boolean): void;
|
|
32
31
|
private _refresh;
|
|
33
32
|
}
|
|
34
|
-
export declare const IFormulaEditorManagerService: import('@
|
|
33
|
+
export declare const IFormulaEditorManagerService: import('@univerjs/core').IdentifierDecorator<FormulaEditorManagerService>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ICellDataForSheetInterceptor, IPosition, ISelectionCell, Nullable, Disposable, IContextService, InterceptorManager, IUniverInstanceService, ThemeService } from '@univerjs/core';
|
|
1
|
+
import { ICellDataForSheetInterceptor, IDisposable, IPosition, ISelectionCell, Nullable, Disposable, IContextService, InterceptorManager, IUniverInstanceService, ThemeService } from '@univerjs/core';
|
|
2
2
|
import { Engine, IDocumentLayoutObject, Scene, DeviceInputEventType, IRenderManagerService } from '@univerjs/engine-render';
|
|
3
3
|
import { ISheetLocation, SheetsSelectionsService } from '@univerjs/sheets';
|
|
4
4
|
import { IEditorService, KeyCode } from '@univerjs/ui';
|
|
5
|
-
import { IDisposable } from '@wendellhu/redi';
|
|
6
5
|
import { Observable } from 'rxjs';
|
|
7
6
|
|
|
8
7
|
export interface IEditorBridgeServiceVisibleParam {
|
|
@@ -117,5 +116,5 @@ export declare class EditorBridgeService extends Disposable implements IEditorBr
|
|
|
117
116
|
changeEditorDirty(dirtyStatus: boolean): void;
|
|
118
117
|
getEditorDirty(): boolean;
|
|
119
118
|
}
|
|
120
|
-
export declare const IEditorBridgeService: import('@
|
|
119
|
+
export declare const IEditorBridgeService: import('@univerjs/core').IdentifierDecorator<EditorBridgeService>;
|
|
121
120
|
export {};
|
|
@@ -32,7 +32,7 @@ export declare enum FormatPainterStatus {
|
|
|
32
32
|
ONCE = 1,
|
|
33
33
|
INFINITE = 2
|
|
34
34
|
}
|
|
35
|
-
export declare const IFormatPainterService: import('@
|
|
35
|
+
export declare const IFormatPainterService: import('@univerjs/core').IdentifierDecorator<IFormatPainterService>;
|
|
36
36
|
export declare class FormatPainterService extends Disposable implements IFormatPainterService {
|
|
37
37
|
private readonly _selectionManagerService;
|
|
38
38
|
private readonly _themeService;
|
|
@@ -18,7 +18,7 @@ interface IMarkSelectionInfo {
|
|
|
18
18
|
control: SelectionControl | null;
|
|
19
19
|
exits: string[];
|
|
20
20
|
}
|
|
21
|
-
export declare const IMarkSelectionService: import('@
|
|
21
|
+
export declare const IMarkSelectionService: import('@univerjs/core').IdentifierDecorator<IMarkSelectionService>;
|
|
22
22
|
export declare class MarkSelectionService extends Disposable implements IMarkSelectionService {
|
|
23
23
|
private readonly _currentService;
|
|
24
24
|
private readonly _renderManagerService;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
2
1
|
import { Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
2
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
3
3
|
|
|
4
4
|
export declare class WorksheetProtectionRenderService extends Disposable {
|
|
5
5
|
private _renderManagerService;
|
|
@@ -3,13 +3,7 @@ import { BehaviorSubject } from 'rxjs';
|
|
|
3
3
|
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
4
4
|
import { SheetSkeletonManagerService } from './sheet-skeleton-manager.service';
|
|
5
5
|
|
|
6
|
-
export interface
|
|
7
|
-
scrollX: number;
|
|
8
|
-
scrollY: number;
|
|
9
|
-
viewportScrollX: number;
|
|
10
|
-
viewportScrollY: number;
|
|
11
|
-
}
|
|
12
|
-
export interface IScrollManagerParam {
|
|
6
|
+
export interface IScrollState {
|
|
13
7
|
/**
|
|
14
8
|
* offsetX from startRow, coordinate same as viewport, not scrollbar
|
|
15
9
|
*/
|
|
@@ -26,24 +20,20 @@ export interface IScrollManagerParam {
|
|
|
26
20
|
* current start column in viewport visible area
|
|
27
21
|
*/
|
|
28
22
|
sheetViewStartColumn: number;
|
|
29
|
-
/**
|
|
30
|
-
* overall offsetX from sheet cotent topleft, should be same as startRow * rowHeight + offsetY
|
|
31
|
-
* coordinate same as viewport, not scrollbar
|
|
32
|
-
*/
|
|
33
|
-
viewportScrollX?: number;
|
|
34
|
-
/**
|
|
35
|
-
* overall offsetY from sheet content topleft, should be same as startColumn * columnWidth + offsetX
|
|
36
|
-
* coordinate same as viewport, not scrollbar
|
|
37
|
-
*/
|
|
38
|
-
viewportScrollY?: number;
|
|
39
23
|
}
|
|
40
|
-
export interface
|
|
24
|
+
export interface IViewportScrollState extends IScrollState {
|
|
25
|
+
scrollX: number;
|
|
26
|
+
scrollY: number;
|
|
27
|
+
viewportScrollX: number;
|
|
28
|
+
viewportScrollY: number;
|
|
29
|
+
}
|
|
30
|
+
export interface IScrollStateSearchParam {
|
|
41
31
|
unitId: string;
|
|
42
32
|
sheetId: string;
|
|
43
33
|
}
|
|
44
|
-
export interface
|
|
34
|
+
export interface IScrollStateWithSearchParam extends IScrollStateSearchParam, IScrollState {
|
|
45
35
|
}
|
|
46
|
-
export type
|
|
36
|
+
export type IScrollStateMap = Map<string, Map<string, IScrollState>>;
|
|
47
37
|
/**
|
|
48
38
|
* This service manages and sets the virtual scrolling of the canvas content area.
|
|
49
39
|
* It triggers service changes through SetScrollOperation.
|
|
@@ -56,7 +46,7 @@ export declare class SheetScrollManagerService implements IRenderModule {
|
|
|
56
46
|
/**
|
|
57
47
|
* a map holds all scroll info for each sheet
|
|
58
48
|
*/
|
|
59
|
-
private readonly
|
|
49
|
+
private readonly _scrollStateMap;
|
|
60
50
|
/**
|
|
61
51
|
* a subject for current sheet scrollInfo
|
|
62
52
|
*/
|
|
@@ -64,10 +54,12 @@ export declare class SheetScrollManagerService implements IRenderModule {
|
|
|
64
54
|
/**
|
|
65
55
|
* a subject for current sheet scrollInfo ( events, ex wheel event and point events add deltaXY to rawScrollInfo$)
|
|
66
56
|
*/
|
|
67
|
-
readonly rawScrollInfo$: import('rxjs').Observable<Nullable<
|
|
57
|
+
readonly rawScrollInfo$: import('rxjs').Observable<Nullable<IScrollState>>;
|
|
68
58
|
/**
|
|
69
59
|
* a subject for current valid scrollInfo, viewport@_scrollCore would limit rawScrollInfo$ exclude negative value or over max value.
|
|
70
60
|
* use this subject not rawScrollInfo$ when get scrolling state of viewport.
|
|
61
|
+
* The value of this subject is the same as the value of onScrollAfter$
|
|
62
|
+
*
|
|
71
63
|
*/
|
|
72
64
|
readonly validViewportScrollInfo$: BehaviorSubject<Nullable<IViewportScrollState>>;
|
|
73
65
|
/**
|
|
@@ -77,43 +69,32 @@ export declare class SheetScrollManagerService implements IRenderModule {
|
|
|
77
69
|
private _searchParamForScroll;
|
|
78
70
|
constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService);
|
|
79
71
|
dispose(): void;
|
|
80
|
-
setSearchParam(param:
|
|
81
|
-
setSearchParamAndRefresh(param:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
setScrollInfoToSnapshot(scrollInfo: IScrollManagerParam): void;
|
|
72
|
+
setSearchParam(param: IScrollStateSearchParam): void;
|
|
73
|
+
setSearchParamAndRefresh(param: IScrollStateSearchParam): void;
|
|
74
|
+
getScrollStateByParam(param: IScrollStateSearchParam): Readonly<Nullable<IScrollState>>;
|
|
75
|
+
getCurrentScrollState(): Readonly<Nullable<IScrollState>>;
|
|
85
76
|
/**
|
|
86
|
-
* set scrollInfo by cmd,
|
|
87
|
-
* call _setScrollInfo twice after one scrolling.
|
|
88
|
-
* first time set scrollInfo by scrollOperation, but offsetXY is derived from scroll event.
|
|
89
|
-
* second time set scrollInfo by viewport.scrollTo(scrol.render-controller --> onScrollAfterObserver), this time offsetXY has been limited.
|
|
90
|
-
*
|
|
91
|
-
* wheelevent --> sheetCanvasView --> set-scroll.command('sheet.command.set-scroll-relative') --> scrollOperation --> scrollManagerService.setScrollInfo --> scrollInfo$.next --> scroll.render-controller@viewportMain.scrollTo & notify -->
|
|
92
|
-
* scroll.render-controller@onScrollAfter$ --> this.setScrollInfoToCurrSheetWithoutNotify --> this._setScrollInfo({}, false)
|
|
93
|
-
* call _setScrollInfo again, a loop!, so we should call setScrollInfoToCurrSheetWithoutNotify
|
|
77
|
+
* set scrollInfo by cmd, call by scroll operation
|
|
94
78
|
* @param param
|
|
95
79
|
*/
|
|
96
|
-
setScrollInfoAndEmitEvent(param:
|
|
97
|
-
|
|
80
|
+
setScrollInfoAndEmitEvent(param: IScrollStateWithSearchParam): void;
|
|
81
|
+
/**
|
|
82
|
+
* call by set frozen
|
|
83
|
+
* @param scrollInfo
|
|
84
|
+
*/
|
|
85
|
+
setScrollStateToCurrSheetAndEmitEvent(scrollInfo: IScrollState): void;
|
|
98
86
|
/**
|
|
99
|
-
*
|
|
87
|
+
* set _scrollStateMap but no _scrollInfo$.next
|
|
100
88
|
* @param scroll
|
|
101
89
|
*/
|
|
102
|
-
|
|
90
|
+
setScrollStateToCurrSheet(scroll: IScrollState): void;
|
|
103
91
|
clear(): void;
|
|
104
|
-
calcViewportScrollFromRowColOffset(scrollInfo:
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
overallScrollX?: undefined;
|
|
108
|
-
overallScrollY?: undefined;
|
|
109
|
-
} | {
|
|
110
|
-
overallScrollX: number;
|
|
111
|
-
overallScrollY: number;
|
|
112
|
-
scrollTop?: undefined;
|
|
113
|
-
scrollLeft?: undefined;
|
|
92
|
+
calcViewportScrollFromRowColOffset(scrollInfo: Nullable<IViewportScrollState>): {
|
|
93
|
+
viewportScrollX: number;
|
|
94
|
+
viewportScrollY: number;
|
|
114
95
|
};
|
|
115
|
-
private
|
|
116
|
-
private
|
|
96
|
+
private _setScrollState;
|
|
97
|
+
private _clearByParamAndNotify;
|
|
117
98
|
private _getCurrentScroll;
|
|
118
|
-
private
|
|
99
|
+
private _scrollStateNext;
|
|
119
100
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { IInterceptor, IRange, IRangeWithCoord, ISelectionCell, ISelectionCellWithMergeInfo, ISelectionWithCoord, Nullable, ThemeService, Disposable, InterceptorManager, RANGE_TYPE } from '@univerjs/core';
|
|
1
|
+
import { IInterceptor, Injector, IRange, IRangeWithCoord, ISelectionCell, ISelectionCellWithMergeInfo, ISelectionWithCoord, Nullable, ThemeService, Disposable, InterceptorManager, RANGE_TYPE } from '@univerjs/core';
|
|
2
2
|
import { IMouseEvent, IPointerEvent, IRenderManagerService, IRenderModule, Scene, SpreadsheetSkeleton, Viewport, ScrollTimer, ScrollTimerType } from '@univerjs/engine-render';
|
|
3
3
|
import { ISelectionStyle, ISelectionWithCoordAndStyle, ISelectionWithStyle } from '@univerjs/sheets';
|
|
4
4
|
import { IShortcutService } from '@univerjs/ui';
|
|
5
|
-
import { Injector } from '@wendellhu/redi';
|
|
6
5
|
import { Observable, Subscription, BehaviorSubject, Subject } from 'rxjs';
|
|
7
6
|
import { SelectionControl } from './selection-shape';
|
|
8
7
|
|
|
@@ -15,6 +14,7 @@ export interface ISheetSelectionRenderService {
|
|
|
15
14
|
readonly controlFillConfig$: Observable<IControlFillConfig | null>;
|
|
16
15
|
readonly selectionMoving$: Observable<ISelectionWithCoordAndStyle[]>;
|
|
17
16
|
readonly selectionMoveStart$: Observable<ISelectionWithCoordAndStyle[]>;
|
|
17
|
+
get selectionMoving(): boolean;
|
|
18
18
|
interceptor: InterceptorManager<{
|
|
19
19
|
RANGE_MOVE_PERMISSION_CHECK: IInterceptor<boolean, null>;
|
|
20
20
|
RANGE_FILL_PERMISSION_CHECK: IInterceptor<boolean, {
|
|
@@ -35,7 +35,7 @@ export interface ISheetSelectionRenderService {
|
|
|
35
35
|
getSelectionCellByPosition(x: number, y: number): Nullable<ISelectionCellWithMergeInfo>;
|
|
36
36
|
setSingleSelectionEnabled(enabled: boolean): void;
|
|
37
37
|
}
|
|
38
|
-
export declare const ISheetSelectionRenderService: import('@
|
|
38
|
+
export declare const ISheetSelectionRenderService: import('@univerjs/core').IdentifierDecorator<ISheetSelectionRenderService>;
|
|
39
39
|
/**
|
|
40
40
|
* The basic implementation of selection rendering logics. It is designed to be reused for different purposes.
|
|
41
41
|
*/
|
|
@@ -71,11 +71,18 @@ export declare class BaseSelectionRenderService extends Disposable implements IS
|
|
|
71
71
|
protected _skipLastEnabled: boolean;
|
|
72
72
|
protected _singleSelectionEnabled: boolean;
|
|
73
73
|
protected readonly _selectionMoveEnd$: BehaviorSubject<ISelectionWithCoordAndStyle[]>;
|
|
74
|
+
/**
|
|
75
|
+
* trigger when selection move end(pointerup)
|
|
76
|
+
* and then update selection model in selectionManagerService
|
|
77
|
+
* selectionMoveEnd$ ---> _updateSelections --> selectionOperation@selectionManagerService.setSelections
|
|
78
|
+
*/
|
|
74
79
|
readonly selectionMoveEnd$: Observable<ISelectionWithCoordAndStyle[]>;
|
|
75
80
|
protected readonly _selectionMoving$: Subject<ISelectionWithCoordAndStyle[]>;
|
|
76
81
|
readonly selectionMoving$: Observable<ISelectionWithCoordAndStyle[]>;
|
|
77
82
|
protected readonly _selectionMoveStart$: Subject<ISelectionWithCoordAndStyle[]>;
|
|
78
83
|
readonly selectionMoveStart$: Observable<ISelectionWithCoordAndStyle[]>;
|
|
84
|
+
private _selectionMoving;
|
|
85
|
+
get selectionMoving(): boolean;
|
|
79
86
|
protected _activeViewport: Nullable<Viewport>;
|
|
80
87
|
readonly interceptor: InterceptorManager<{
|
|
81
88
|
RANGE_MOVE_PERMISSION_CHECK: IInterceptor<boolean, null>;
|
|
@@ -87,6 +94,7 @@ export declare class BaseSelectionRenderService extends Disposable implements IS
|
|
|
87
94
|
}>;
|
|
88
95
|
}>;
|
|
89
96
|
constructor(_injector: Injector, _themeService: ThemeService, _shortcutService: IShortcutService, _renderManagerService: IRenderManagerService);
|
|
97
|
+
private _initMoving;
|
|
90
98
|
protected _setStyle(style: ISelectionStyle): void;
|
|
91
99
|
protected _resetStyle(): void;
|
|
92
100
|
/** @deprecated This should not be provided by the selection render service. */
|
|
@@ -116,11 +124,15 @@ export declare class BaseSelectionRenderService extends Disposable implements IS
|
|
|
116
124
|
* selectionManagerService@_emitOnEnd -->
|
|
117
125
|
* _workbookSelections.selectionMoveEnd$ --> _addSelectionControlBySelectionData
|
|
118
126
|
*
|
|
119
|
-
*
|
|
120
127
|
* @param selectionData
|
|
121
128
|
*/
|
|
122
129
|
protected _addSelectionControlBySelectionData(selection: ISelectionWithCoordAndStyle): void;
|
|
123
130
|
newSelectionControl(scene: Scene, _rangeType: RANGE_TYPE): SelectionControl;
|
|
131
|
+
/**
|
|
132
|
+
* Update the corresponding selectionControl based on selectionsData.
|
|
133
|
+
* selectionData[i] ---- selectionControls[i]
|
|
134
|
+
* @param selections
|
|
135
|
+
*/
|
|
124
136
|
updateControlForCurrentByRangeData(selections: ISelectionWithCoordAndStyle[]): void;
|
|
125
137
|
refreshSelectionMoveStart(): void;
|
|
126
138
|
protected _changeRuntime(skeleton: SpreadsheetSkeleton, scene: Scene, viewport?: Viewport): void;
|
|
@@ -140,6 +152,9 @@ export declare class BaseSelectionRenderService extends Disposable implements IS
|
|
|
140
152
|
*/
|
|
141
153
|
getActiveSelectionControl<T extends SelectionControl = SelectionControl>(): Nullable<T>;
|
|
142
154
|
endSelection(): void;
|
|
155
|
+
/**
|
|
156
|
+
* Clear existed selections.
|
|
157
|
+
*/
|
|
143
158
|
protected _reset(): void;
|
|
144
159
|
resetAndEndSelection(): void;
|
|
145
160
|
/**
|
|
@@ -169,6 +184,7 @@ export declare class BaseSelectionRenderService extends Disposable implements IS
|
|
|
169
184
|
}): Nullable<ISelectionWithCoord>;
|
|
170
185
|
protected _checkClearPreviousControls(evt: IPointerEvent | IMouseEvent): void;
|
|
171
186
|
private _performSelectionByTwoCells;
|
|
187
|
+
protected _refreshSelectionControl(selectionsData: readonly ISelectionWithStyle[]): void;
|
|
172
188
|
}
|
|
173
189
|
export declare function getAllSelection(skeleton: SpreadsheetSkeleton): ISelectionWithStyle;
|
|
174
190
|
export declare function getTopLeftSelection(skeleton: SpreadsheetSkeleton): ISelectionWithStyle;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Workbook, ICommandService, IContextService, ILogService, RANGE_TYPE, ThemeService } from '@univerjs/core';
|
|
1
|
+
import { Workbook, ICommandService, IContextService, ILogService, Injector, RANGE_TYPE, ThemeService } from '@univerjs/core';
|
|
2
2
|
import { IMouseEvent, IPointerEvent, IRenderContext, IRenderModule, Scene, Viewport, IRenderManagerService } from '@univerjs/engine-render';
|
|
3
3
|
import { SheetsSelectionsService } from '@univerjs/sheets';
|
|
4
4
|
import { IShortcutService } from '@univerjs/ui';
|
|
5
|
-
import { Injector } from '@wendellhu/redi';
|
|
6
5
|
import { SheetScrollManagerService } from '../scroll-manager.service';
|
|
7
6
|
import { SheetSkeletonManagerService } from '../sheet-skeleton-manager.service';
|
|
8
7
|
import { BaseSelectionRenderService } from './base-selection-render.service';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Workbook, ICommandService, IContextService, ILogService, ThemeService } from '@univerjs/core';
|
|
1
|
+
import { Workbook, ICommandService, IContextService, ILogService, Injector, ThemeService } from '@univerjs/core';
|
|
2
2
|
import { IRenderContext, IRenderModule, IRenderManagerService } from '@univerjs/engine-render';
|
|
3
3
|
import { SheetsSelectionsService } from '@univerjs/sheets';
|
|
4
4
|
import { IShortcutService } from '@univerjs/ui';
|
|
5
|
-
import { Injector } from '@wendellhu/redi';
|
|
6
5
|
import { SheetSkeletonManagerService } from '../sheet-skeleton-manager.service';
|
|
7
6
|
import { BaseSelectionRenderService } from './base-selection-render.service';
|
|
8
7
|
|
|
@@ -12,20 +11,26 @@ import { BaseSelectionRenderService } from './base-selection-render.service';
|
|
|
12
11
|
*/
|
|
13
12
|
export declare class SheetSelectionRenderService extends BaseSelectionRenderService implements IRenderModule {
|
|
14
13
|
private readonly _context;
|
|
14
|
+
private readonly _selectionManagerService;
|
|
15
15
|
private readonly _logService;
|
|
16
16
|
private readonly _commandService;
|
|
17
17
|
private readonly _contextService;
|
|
18
18
|
private readonly _sheetSkeletonManagerService;
|
|
19
19
|
private readonly _workbookSelections;
|
|
20
20
|
private _renderDisposable;
|
|
21
|
-
constructor(_context: IRenderContext<Workbook>, injector: Injector, themeService: ThemeService, shortcutService: IShortcutService, renderManagerService: IRenderManagerService,
|
|
21
|
+
constructor(_context: IRenderContext<Workbook>, injector: Injector, themeService: ThemeService, shortcutService: IShortcutService, renderManagerService: IRenderManagerService, _selectionManagerService: SheetsSelectionsService, _logService: ILogService, _commandService: ICommandService, _contextService: IContextService, _sheetSkeletonManagerService: SheetSkeletonManagerService);
|
|
22
22
|
private _init;
|
|
23
23
|
private _initEventListeners;
|
|
24
24
|
private _initThemeChangeListener;
|
|
25
|
-
private _refreshSelection;
|
|
26
25
|
private _normalSelectionDisabled;
|
|
27
26
|
private _initSelectionChangeListener;
|
|
28
27
|
private _initUserActionSyncListener;
|
|
28
|
+
/**
|
|
29
|
+
* set new selection range in seletion model
|
|
30
|
+
* selectionMoveEnd$ ---> _updateSelections --> selectionOperation@selectionManagerService.setSelections
|
|
31
|
+
* @param selectionDataWithStyleList
|
|
32
|
+
* @param type
|
|
33
|
+
*/
|
|
29
34
|
private _updateSelections;
|
|
30
35
|
private _initSkeletonChangeListener;
|
|
31
36
|
private _getActiveViewport;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { IRangeWithCoord, ThemeService } from '@univerjs/core';
|
|
1
|
+
import { Injector, IRangeWithCoord, ThemeService } from '@univerjs/core';
|
|
2
2
|
import { Scene, SpreadsheetSkeleton } from '@univerjs/engine-render';
|
|
3
|
-
import { Injector } from '@wendellhu/redi';
|
|
4
3
|
import { SelectionControl } from './selection-shape';
|
|
5
4
|
|
|
6
5
|
export interface ISelectionShapeTargetSelection {
|
|
@@ -18,6 +17,7 @@ export declare class SelectionShapeExtension {
|
|
|
18
17
|
private readonly _themeService;
|
|
19
18
|
/** @deprecated injection in extensions should be strictly limited. */
|
|
20
19
|
private readonly _injector;
|
|
20
|
+
private _selectionHooks;
|
|
21
21
|
private _startOffsetX;
|
|
22
22
|
private _startOffsetY;
|
|
23
23
|
private _relativeSelectionPositionRow;
|
|
@@ -34,7 +34,7 @@ export declare class SelectionShapeExtension {
|
|
|
34
34
|
private _fillControlColors;
|
|
35
35
|
constructor(_control: SelectionControl, _skeleton: SpreadsheetSkeleton, _scene: Scene, _themeService: ThemeService,
|
|
36
36
|
/** @deprecated injection in extensions should be strictly limited. */
|
|
37
|
-
_injector: Injector);
|
|
37
|
+
_injector: Injector, _selectionHooks: Record<string, () => void>);
|
|
38
38
|
get isHelperSelection(): boolean;
|
|
39
39
|
dispose(): void;
|
|
40
40
|
private _getFreeze;
|
|
@@ -45,6 +45,11 @@ export declare class SelectionShapeExtension {
|
|
|
45
45
|
private _controlEvent;
|
|
46
46
|
private _initialWidget;
|
|
47
47
|
private _widgetMoving;
|
|
48
|
+
/**
|
|
49
|
+
* Events for 8 control point
|
|
50
|
+
* @param evt
|
|
51
|
+
* @param cursor
|
|
52
|
+
*/
|
|
48
53
|
private _widgetEvent;
|
|
49
54
|
private _initialFill;
|
|
50
55
|
private _fillMoving;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Disposable } from '@univerjs/core';
|
|
2
|
-
import { IDisposable } from '@wendellhu/redi';
|
|
1
|
+
import { Disposable, IDisposable } from '@univerjs/core';
|
|
3
2
|
import { Observable } from 'rxjs';
|
|
4
3
|
import { IScrollState } from '../../views/sheet-bar/sheet-bar-tabs/utils/slide-tab-bar';
|
|
5
4
|
|
|
@@ -20,7 +19,7 @@ export interface ISheetBarService {
|
|
|
20
19
|
triggerSheetBarMenu(): void;
|
|
21
20
|
registerSheetBarMenuHandler(handler: ISheetBarMenuHandler): IDisposable;
|
|
22
21
|
}
|
|
23
|
-
export declare const ISheetBarService: import('@
|
|
22
|
+
export declare const ISheetBarService: import('@univerjs/core').IdentifierDecorator<ISheetBarService>;
|
|
24
23
|
export declare class SheetBarService extends Disposable implements ISheetBarService {
|
|
25
24
|
readonly renameId$: Observable<string>;
|
|
26
25
|
readonly removeId$: Observable<string>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { IRange, IRangeWithCoord, Nullable, Workbook, Disposable } from '@univerjs/core';
|
|
1
|
+
import { IRange, IRangeWithCoord, Nullable, Workbook, Disposable, Injector } from '@univerjs/core';
|
|
2
2
|
import { IRenderContext, IRenderModule, SpreadsheetSkeleton } from '@univerjs/engine-render';
|
|
3
|
-
import { Injector } from '@wendellhu/redi';
|
|
4
3
|
|
|
5
4
|
export interface ISheetSkeletonManagerParam {
|
|
6
5
|
unitId?: string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { IContextService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
|
1
|
+
import { IDisposable, IContextService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
|
2
2
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
3
|
-
import { IDisposable } from '@wendellhu/redi';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* This controller is responsible for managing units of a specific kind to be rendered on the canvas.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ISelection, ITextRangeParam, Nullable, IUniverInstanceService, LocaleService } from '@univerjs/core';
|
|
1
|
+
import { IDisposable, ISelection, ITextRangeParam, Nullable, IUniverInstanceService, LocaleService } from '@univerjs/core';
|
|
2
2
|
import { KeyCode } from '@univerjs/ui';
|
|
3
|
-
import { IDisposable } from '@wendellhu/redi';
|
|
4
3
|
|
|
5
4
|
export interface IShortcutExperienceSearch {
|
|
6
5
|
unitId: string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Nullable } from '@univerjs/core';
|
|
1
|
+
import { IDisposable, Nullable } from '@univerjs/core';
|
|
2
2
|
import { IFunctionNames } from '@univerjs/engine-formula';
|
|
3
|
-
import { IDisposable } from '@wendellhu/redi';
|
|
4
3
|
import { Observable } from 'rxjs';
|
|
5
4
|
|
|
6
5
|
export interface IStatusBarService {
|
|
@@ -31,4 +30,4 @@ export declare class StatusBarService implements IStatusBarService, IDisposable
|
|
|
31
30
|
getFunctions(): Readonly<IStatusBarFunction[]>;
|
|
32
31
|
addFunctions(functions: IStatusBarFunction[]): void;
|
|
33
32
|
}
|
|
34
|
-
export declare const IStatusBarService: import('@
|
|
33
|
+
export declare const IStatusBarService: import('@univerjs/core').IdentifierDecorator<StatusBarService>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IUniverInstanceService, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
2
|
-
import { Injector } from '@wendellhu/redi';
|
|
1
|
+
import { Injector, IUniverInstanceService, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
3
2
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
4
3
|
import { IUniverSheetsUIConfig } from './controllers/sheet-ui.controller';
|
|
5
4
|
|
|
@@ -11,7 +10,7 @@ export declare class UniverSheetsUIPlugin extends Plugin {
|
|
|
11
10
|
static pluginName: string;
|
|
12
11
|
static type: UniverInstanceType;
|
|
13
12
|
constructor(_config: Partial<IUniverSheetsUIConfig>, _injector: Injector, _renderManagerService: IRenderManagerService, _univerInstanceService: IUniverInstanceService);
|
|
14
|
-
onStarting(
|
|
13
|
+
onStarting(): void;
|
|
15
14
|
onReady(): void;
|
|
16
15
|
onRendered(): void;
|
|
17
16
|
private _registerRenderBasics;
|
|
@@ -11,7 +11,8 @@ export declare enum HEADER_RESIZE_SHAPE_TYPE {
|
|
|
11
11
|
}
|
|
12
12
|
export declare const HEADER_MENU_SHAPE_RECT_BACKGROUND_FILL = "rgba(120, 120, 120, 0.01)";
|
|
13
13
|
export declare const HEADER_MENU_SHAPE_RECT_FILL = "rgb(68, 71, 70)";
|
|
14
|
-
export declare const
|
|
14
|
+
export declare const HEADER_MENU_SHAPE_SIZE = 12;
|
|
15
|
+
export declare const MAX_HEADER_MENU_SHAPE_SIZE = 44;
|
|
15
16
|
export declare const HEADER_MENU_SHAPE_THUMB_SIZE = 4;
|
|
16
17
|
export declare class HeaderMenuResizeShape<T extends IHeaderMenuShapeResizeProps = IHeaderMenuShapeResizeProps> extends Shape<T> {
|
|
17
18
|
private _size;
|