@univerjs/sheets-ui 0.2.3 → 0.2.4

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.
Files changed (22) hide show
  1. package/lib/cjs/index.js +15 -15
  2. package/lib/es/index.js +6117 -6093
  3. package/lib/types/commands/commands/__tests__/create-command-test-bed.d.ts +1 -1
  4. package/lib/types/commands/operations/cell-edit.operation.d.ts +2 -0
  5. package/lib/types/controllers/editor/editing.render-controller.d.ts +24 -9
  6. package/lib/types/controllers/hover-render.controller.d.ts +2 -2
  7. package/lib/types/controllers/permission/sheet-permission-interceptor-base.controller.d.ts +2 -0
  8. package/lib/types/controllers/render-controllers/editor-bridge.render-controller.d.ts +7 -5
  9. package/lib/types/controllers/render-controllers/freeze.render-controller.d.ts +2 -2
  10. package/lib/types/controllers/render-controllers/mobile/mobile-scroll.render-controller.d.ts +2 -2
  11. package/lib/types/controllers/render-controllers/scroll.render-controller.d.ts +2 -2
  12. package/lib/types/services/drag-manager.service.d.ts +1 -3
  13. package/lib/types/services/editor-bridge.service.d.ts +6 -3
  14. package/lib/types/services/hover-manager.service.d.ts +1 -3
  15. package/lib/types/services/scroll-manager.service.d.ts +7 -6
  16. package/lib/types/services/selection/base-selection-render.service.d.ts +3 -2
  17. package/lib/types/services/selection/mobile-selection-render.service.d.ts +2 -2
  18. package/lib/types/services/selection/selection-render-model.d.ts +8 -30
  19. package/lib/types/services/sheet-skeleton-manager.service.d.ts +1 -1
  20. package/lib/types/views/status-bar/CopyableStatisticItem.d.ts +1 -1
  21. package/lib/umd/index.js +13 -13
  22. package/package.json +25 -25
@@ -6,4 +6,4 @@ export interface ITestBed {
6
6
  get: Injector['get'];
7
7
  sheet: Workbook;
8
8
  }
9
- export declare function createCommandTestBed(workbookData?: IWorkbookData, dependencies?: Dependency[]): ITestBed;
9
+ export declare function createCommandTestBed(workbookData?: IWorkbookData, dependencies?: Dependency[], renderDependencies?: Dependency[]): ITestBed;
@@ -6,5 +6,7 @@ export declare const SetCellEditVisibleWithF2Operation: IOperation<IEditorBridge
6
6
  /**
7
7
  * When the editor is not clicked to change the cursor,
8
8
  * the arrow keys will exit editing and move the cell.
9
+ *
10
+ * @deprecated Should not use operation as an event.
9
11
  */
10
12
  export declare const SetCellEditVisibleArrowOperation: IOperation<IEditorBridgeServiceVisibleParam>;
@@ -1,4 +1,4 @@
1
- import { ICellData, Workbook, Disposable, ICommandService, IContextService, IUndoRedoService, IUniverInstanceService, LocaleService } from '@univerjs/core';
1
+ import { DocumentDataModel, ICellData, IDocumentData, Workbook, Disposable, ICommandService, IContextService, IResourceLoaderService, IUndoRedoService, IUniverInstanceService, LocaleService } from '@univerjs/core';
2
2
  import { TextSelectionManagerService } from '@univerjs/docs';
3
3
  import { IDocumentLayoutObject, IRenderContext, IRenderModule, IRenderManagerService, ITextSelectionRenderManager } from '@univerjs/engine-render';
4
4
  import { IEditorService } from '@univerjs/ui';
@@ -11,32 +11,39 @@ export declare class EditingRenderController extends Disposable implements IRend
11
11
  private readonly _context;
12
12
  private readonly _undoRedoService;
13
13
  private readonly _contextService;
14
- /** @deprecated This controller should not directly use univerInstanceService. Instead, it should call editor service. */
15
- private readonly _univerInstanceService;
14
+ private readonly _instanceSrv;
16
15
  private readonly _renderManagerService;
17
16
  private readonly _editorBridgeService;
18
17
  private readonly _cellEditorManagerService;
19
18
  private readonly _textSelectionRenderManager;
20
- private readonly _selectionManagerService;
21
19
  private readonly _lexerTreeBuilder;
22
20
  private readonly _textSelectionManagerService;
23
21
  private readonly _commandService;
24
22
  protected readonly _localService: LocaleService;
25
23
  private readonly _editorService;
24
+ private readonly _resourceLoaderService;
26
25
  /**
27
26
  * It is used to distinguish whether the user has actively moved the cursor in the editor, mainly through mouse clicks.
28
27
  */
29
28
  private _cursorChange;
30
- constructor(_context: IRenderContext<Workbook>, _undoRedoService: IUndoRedoService, _contextService: IContextService,
31
- /** @deprecated This controller should not directly use univerInstanceService. Instead, it should call editor service. */
32
- _univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _editorBridgeService: IEditorBridgeService, _cellEditorManagerService: ICellEditorManagerService, _textSelectionRenderManager: ITextSelectionRenderManager, _selectionManagerService: SheetsSelectionsService, _lexerTreeBuilder: LexerTreeBuilder, _textSelectionManagerService: TextSelectionManagerService, _commandService: ICommandService, _localService: LocaleService, _editorService: IEditorService);
29
+ /** If the corresponding unit is active and prepared for editing. */
30
+ private _isUnitEditing;
31
+ private _workbookSelections;
32
+ private _d;
33
+ constructor(_context: IRenderContext<Workbook>, selectionManagerService: SheetsSelectionsService, _undoRedoService: IUndoRedoService, _contextService: IContextService, _instanceSrv: IUniverInstanceService, _renderManagerService: IRenderManagerService, _editorBridgeService: IEditorBridgeService, _cellEditorManagerService: ICellEditorManagerService, _textSelectionRenderManager: ITextSelectionRenderManager, _lexerTreeBuilder: LexerTreeBuilder, _textSelectionManagerService: TextSelectionManagerService, _commandService: ICommandService, _localService: LocaleService, _editorService: IEditorService, _resourceLoaderService: IResourceLoaderService);
34
+ dispose(): void;
35
+ private _disposeCurrent;
33
36
  private _init;
34
37
  private _initEditorVisibilityListener;
35
38
  private _listenEditorFocus;
36
39
  private _getEditorSkeleton;
37
40
  private _getEditorViewModel;
38
41
  private _initialCursorSync;
39
- private _initialEditFocusListener;
42
+ /**
43
+ * Should update current editing cell info when selection is changed.
44
+ * @param d DisposableCollection
45
+ */
46
+ private _subscribeToCurrentCell;
40
47
  private _fitTextSize;
41
48
  /**
42
49
  * Mainly used to pre-calculate the width of the editor,
@@ -55,6 +62,10 @@ export declare class EditingRenderController extends Disposable implements IRend
55
62
  private _addBackground;
56
63
  private _handleEditorVisible;
57
64
  private _resetBodyStyle;
65
+ /**
66
+ * Should activate the editor when the user inputs text.
67
+ * @param d DisposableCollection
68
+ */
58
69
  private _initialKeyboardListener;
59
70
  private _showEditorByKeyboard;
60
71
  /**
@@ -66,7 +77,11 @@ export declare class EditingRenderController extends Disposable implements IRend
66
77
  private _handleEditorInvisible;
67
78
  private _exitInput;
68
79
  private _moveCursor;
80
+ /**
81
+ * The user's operations follow the sequence of opening the editor and then moving the cursor.
82
+ * The logic here predicts the user's first cursor movement behavior based on this rule
83
+ */
69
84
  private _cursorStateListener;
70
85
  private _moveInEditor;
71
86
  }
72
- export declare function getCellDataByInput(cellData: ICellData, documentLayoutObject: IDocumentLayoutObject, lexerTreeBuilder: LexerTreeBuilder): ICellData | null;
87
+ export declare function getCellDataByInput(cellData: ICellData, documentLayoutObject: IDocumentLayoutObject, lexerTreeBuilder: LexerTreeBuilder, getSnapshot: (data: DocumentDataModel) => IDocumentData): ICellData | null;
@@ -2,14 +2,14 @@ import { Workbook, Disposable } from '@univerjs/core';
2
2
  import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
3
3
  import { HoverManagerService } from '../services/hover-manager.service';
4
4
  import { SheetSkeletonManagerService } from '../services/sheet-skeleton-manager.service';
5
- import { ScrollManagerService } from '../services/scroll-manager.service';
5
+ import { SheetScrollManagerService } from '../services/scroll-manager.service';
6
6
 
7
7
  export declare class HoverRenderController extends Disposable implements IRenderModule {
8
8
  private readonly _context;
9
9
  private _hoverManagerService;
10
10
  private _sheetSkeletonManagerService;
11
11
  private _scrollManagerService;
12
- constructor(_context: IRenderContext<Workbook>, _hoverManagerService: HoverManagerService, _sheetSkeletonManagerService: SheetSkeletonManagerService, _scrollManagerService: ScrollManagerService);
12
+ constructor(_context: IRenderContext<Workbook>, _hoverManagerService: HoverManagerService, _sheetSkeletonManagerService: SheetSkeletonManagerService, _scrollManagerService: SheetScrollManagerService);
13
13
  private _initPointerEvent;
14
14
  private _initScrollEvent;
15
15
  }
@@ -19,7 +19,9 @@ export declare class SheetPermissionInterceptorBaseController extends Disposable
19
19
  private readonly _contextService;
20
20
  private readonly _definedNamesService;
21
21
  disposableCollection: DisposableCollection;
22
+ private _showPermissionDialog;
22
23
  constructor(_commandService: ICommandService, _univerInstanceService: IUniverInstanceService, _permissionService: IPermissionService, _selectionManagerService: SheetsSelectionsService, _dialogService: IDialogService, _rangeProtectionRuleModel: RangeProtectionRuleModel, _worksheetProtectionRuleModel: WorksheetProtectionRuleModel, _autoFillService: IAutoFillService, _localeService: LocaleService, _lexerTreeBuilder: LexerTreeBuilder, _contextService: IContextService, _definedNamesService: IDefinedNamesService);
24
+ setShowPermissionDialog(value: boolean): void;
23
25
  haveNotPermissionHandle(errorMsg: string): void;
24
26
  private _getPermissionCheck;
25
27
  private _initialize;
@@ -1,4 +1,4 @@
1
- import { Workbook, ICommandService, RxDisposable } from '@univerjs/core';
1
+ import { Workbook, ICommandService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
2
2
  import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
3
3
  import { SheetsSelectionsService } from '@univerjs/sheets';
4
4
  import { IRangeSelectorService } from '@univerjs/ui';
@@ -6,17 +6,19 @@ import { IEditorBridgeService } from '../../services/editor-bridge.service';
6
6
 
7
7
  export declare class EditorBridgeRenderController extends RxDisposable implements IRenderModule {
8
8
  private readonly _context;
9
+ private readonly _instanceSrv;
9
10
  private readonly _commandService;
10
11
  private readonly _editorBridgeService;
11
12
  private readonly _selectionManagerService;
12
13
  private readonly _rangeSelectorService;
13
- constructor(_context: IRenderContext<Workbook>, _commandService: ICommandService, _editorBridgeService: IEditorBridgeService, _selectionManagerService: SheetsSelectionsService, _rangeSelectorService: IRangeSelectorService);
14
- private _initialize;
14
+ private _d;
15
+ constructor(_context: IRenderContext<Workbook>, _instanceSrv: IUniverInstanceService, _commandService: ICommandService, _editorBridgeService: IEditorBridgeService, _selectionManagerService: SheetsSelectionsService, _rangeSelectorService: IRangeSelectorService);
16
+ private _init;
17
+ private _disposeCurrent;
15
18
  private _initSelectionChangeListener;
16
19
  private _updateEditorPosition;
17
- private _handleSelectionChange;
18
20
  private _initEventListener;
19
- private _onCanvasPointerDown;
21
+ private _tryHideEditor;
20
22
  private _hideEditor;
21
23
  private _initialRangeSelector;
22
24
  private _rangeSelector;
@@ -2,7 +2,7 @@ import { Workbook, Disposable, ICommandService, InterceptorManager, ThemeService
2
2
  import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
3
3
  import { SheetInterceptorService, SheetsSelectionsService } from '@univerjs/sheets';
4
4
  import { Injector } from '@wendellhu/redi';
5
- import { ScrollManagerService } from '../../services/scroll-manager.service';
5
+ import { SheetScrollManagerService } from '../../services/scroll-manager.service';
6
6
  import { SheetSkeletonManagerService } from '../../services/sheet-skeleton-manager.service';
7
7
 
8
8
  export declare const FREEZE_PERMISSION_CHECK: import('@univerjs/core').IInterceptor<boolean, null>;
@@ -37,7 +37,7 @@ export declare class HeaderFreezeRenderController extends Disposable implements
37
37
  interceptor: InterceptorManager<{
38
38
  FREEZE_PERMISSION_CHECK: import('@univerjs/core').IInterceptor<boolean, null>;
39
39
  }>;
40
- constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _commandService: ICommandService, _selectionManagerService: SheetsSelectionsService, _scrollManagerService: ScrollManagerService, _themeService: ThemeService, _sheetInterceptorService: SheetInterceptorService, _injector: Injector);
40
+ constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _commandService: ICommandService, _selectionManagerService: SheetsSelectionsService, _scrollManagerService: SheetScrollManagerService, _themeService: ThemeService, _sheetInterceptorService: SheetInterceptorService, _injector: Injector);
41
41
  dispose(): void;
42
42
  private _initialize;
43
43
  private _createFreeze;
@@ -1,7 +1,7 @@
1
1
  import { IRange, Workbook, Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
2
2
  import { IRenderContext, IRenderModule, IRenderManagerService } from '@univerjs/engine-render';
3
3
  import { SheetsSelectionsService } from '@univerjs/sheets';
4
- import { ScrollManagerService } from '../../../services/scroll-manager.service';
4
+ import { SheetScrollManagerService } from '../../../services/scroll-manager.service';
5
5
  import { SheetSkeletonManagerService } from '../../../services/sheet-skeleton-manager.service';
6
6
 
7
7
  /**
@@ -15,7 +15,7 @@ export declare class MobileSheetsScrollRenderController extends Disposable imple
15
15
  private readonly _selectionManagerService;
16
16
  private readonly _scrollManagerService;
17
17
  protected readonly _univerInstanceService: IUniverInstanceService;
18
- constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _commandService: ICommandService, _renderManagerService: IRenderManagerService, _selectionManagerService: SheetsSelectionsService, _scrollManagerService: ScrollManagerService, _univerInstanceService: IUniverInstanceService);
18
+ constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _commandService: ICommandService, _renderManagerService: IRenderManagerService, _selectionManagerService: SheetsSelectionsService, _scrollManagerService: SheetScrollManagerService, _univerInstanceService: IUniverInstanceService);
19
19
  scrollToRange(range: IRange): boolean;
20
20
  private _init;
21
21
  private _initCommandListener;
@@ -1,7 +1,7 @@
1
1
  import { IRange, Workbook, Disposable, ICommandService } from '@univerjs/core';
2
2
  import { IRenderContext, IRenderModule, IRenderManagerService } from '@univerjs/engine-render';
3
3
  import { Injector } from '@wendellhu/redi';
4
- import { ScrollManagerService } from '../../services/scroll-manager.service';
4
+ import { SheetScrollManagerService } from '../../services/scroll-manager.service';
5
5
  import { SheetSkeletonManagerService } from '../../services/sheet-skeleton-manager.service';
6
6
 
7
7
  /**
@@ -14,7 +14,7 @@ export declare class SheetsScrollRenderController extends Disposable implements
14
14
  private readonly _commandService;
15
15
  private readonly _renderManagerService;
16
16
  private readonly _scrollManagerService;
17
- constructor(_context: IRenderContext<Workbook>, _injector: Injector, _sheetSkeletonManagerService: SheetSkeletonManagerService, _commandService: ICommandService, _renderManagerService: IRenderManagerService, _scrollManagerService: ScrollManagerService);
17
+ constructor(_context: IRenderContext<Workbook>, _injector: Injector, _sheetSkeletonManagerService: SheetSkeletonManagerService, _commandService: ICommandService, _renderManagerService: IRenderManagerService, _scrollManagerService: SheetScrollManagerService);
18
18
  scrollToRange(range: IRange): boolean;
19
19
  private _init;
20
20
  private _initCommandListener;
@@ -1,6 +1,5 @@
1
1
  import { Nullable, Disposable, IUniverInstanceService } from '@univerjs/core';
2
2
  import { IDragEvent, IRenderManagerService } from '@univerjs/engine-render';
3
- import { ScrollManagerService } from './scroll-manager.service';
4
3
  import { IHoverCellPosition } from './hover-manager.service';
5
4
 
6
5
  export interface IDragCellPosition extends IHoverCellPosition {
@@ -8,13 +7,12 @@ export interface IDragCellPosition extends IHoverCellPosition {
8
7
  }
9
8
  export declare class DragManagerService extends Disposable {
10
9
  private readonly _univerInstanceService;
11
- private readonly _scrollManagerService;
12
10
  private readonly _renderManagerService;
13
11
  private _currentCell$;
14
12
  currentCell$: import('rxjs').Observable<Nullable<IDragCellPosition>>;
15
13
  private _endCell$;
16
14
  endCell$: import('rxjs').Observable<Nullable<IDragCellPosition>>;
17
- constructor(_univerInstanceService: IUniverInstanceService, _scrollManagerService: ScrollManagerService, _renderManagerService: IRenderManagerService);
15
+ constructor(_univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService);
18
16
  dispose(): void;
19
17
  private _initCellDisposableListener;
20
18
  private _calcActiveCell;
@@ -1,6 +1,6 @@
1
- import { ICellDataForSheetInterceptor, IPosition, ISelectionCell, Nullable, Disposable, InterceptorManager, IUniverInstanceService, ThemeService } from '@univerjs/core';
1
+ import { ICellDataForSheetInterceptor, IPosition, ISelectionCell, Nullable, Disposable, IContextService, InterceptorManager, IUniverInstanceService, ThemeService } from '@univerjs/core';
2
2
  import { Engine, IDocumentLayoutObject, Scene, DeviceInputEventType, IRenderManagerService } from '@univerjs/engine-render';
3
- import { ISheetLocation } from '@univerjs/sheets';
3
+ import { ISheetLocation, SheetsSelectionsService } from '@univerjs/sheets';
4
4
  import { IEditorService, KeyCode } from '@univerjs/ui';
5
5
  import { IDisposable } from '@wendellhu/redi';
6
6
  import { Observable } from 'rxjs';
@@ -8,6 +8,7 @@ import { Observable } from 'rxjs';
8
8
  export interface IEditorBridgeServiceVisibleParam {
9
9
  visible: boolean;
10
10
  eventType: DeviceInputEventType;
11
+ unitId: string;
11
12
  keycode?: KeyCode;
12
13
  }
13
14
  export interface ICurrentEditCellParam {
@@ -63,6 +64,8 @@ export declare class EditorBridgeService extends Disposable implements IEditorBr
63
64
  private readonly _themeService;
64
65
  private readonly _univerInstanceService;
65
66
  private readonly _editorService;
67
+ private readonly _refSelectionsService;
68
+ private readonly _contextService;
66
69
  private _editorUnitId;
67
70
  private _isForceKeepVisible;
68
71
  private _editorIsDirty;
@@ -80,7 +83,7 @@ export declare class EditorBridgeService extends Disposable implements IEditorBr
80
83
  AFTER_CELL_EDIT: import('@univerjs/core').IInterceptor<ICellDataForSheetInterceptor, ISheetLocation>;
81
84
  AFTER_CELL_EDIT_ASYNC: import('@univerjs/core').IInterceptor<Promise<Nullable<ICellDataForSheetInterceptor>>, ISheetLocation>;
82
85
  }>;
83
- constructor(_renderManagerService: IRenderManagerService, _themeService: ThemeService, _univerInstanceService: IUniverInstanceService, _editorService: IEditorService);
86
+ constructor(_renderManagerService: IRenderManagerService, _themeService: ThemeService, _univerInstanceService: IUniverInstanceService, _editorService: IEditorService, _refSelectionsService: SheetsSelectionsService, _contextService: IContextService);
84
87
  refreshEditCellState(): void;
85
88
  setEditCell(param: ICurrentEditCellParam): void;
86
89
  getEditCellState(): Readonly<Nullable<IEditorBridgeServiceParam>>;
@@ -1,7 +1,6 @@
1
1
  import { IPosition, Nullable, Disposable, IUniverInstanceService } from '@univerjs/core';
2
2
  import { ISheetLocation } from '@univerjs/sheets';
3
3
  import { IRenderManagerService } from '@univerjs/engine-render';
4
- import { ScrollManagerService } from './scroll-manager.service';
5
4
 
6
5
  export interface IHoverCellPosition {
7
6
  position: IPosition;
@@ -9,13 +8,12 @@ export interface IHoverCellPosition {
9
8
  }
10
9
  export declare class HoverManagerService extends Disposable {
11
10
  private readonly _univerInstanceService;
12
- private readonly _scrollManagerService;
13
11
  private readonly _renderManagerService;
14
12
  private _currentCell$;
15
13
  currentCell$: import('rxjs').Observable<Nullable<IHoverCellPosition>>;
16
14
  currentPosition$: import('rxjs').Observable<Nullable<IHoverCellPosition>>;
17
15
  private _lastPosition;
18
- constructor(_univerInstanceService: IUniverInstanceService, _scrollManagerService: ScrollManagerService, _renderManagerService: IRenderManagerService);
16
+ constructor(_univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService);
19
17
  dispose(): void;
20
18
  private _initCellDisposableListener;
21
19
  private _calcActiveCell;
@@ -1,6 +1,7 @@
1
- import { IUniverInstanceService, Nullable } from '@univerjs/core';
1
+ import { Nullable, Workbook } from '@univerjs/core';
2
2
  import { BehaviorSubject } from 'rxjs';
3
- import { IRenderManagerService } from '@univerjs/engine-render';
3
+ import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
4
+ import { SheetSkeletonManagerService } from './sheet-skeleton-manager.service';
4
5
 
5
6
  export interface IViewportScrollState {
6
7
  scrollX: number;
@@ -49,9 +50,9 @@ export type IScrollInfo = Map<string, Map<string, IScrollManagerParam>>;
49
50
  *
50
51
  * ScrollController subscribes to the changes in service data to refresh the view scrolling.
51
52
  */
52
- export declare class ScrollManagerService {
53
- private readonly _univerInstanceService;
54
- private readonly _renderManagerService;
53
+ export declare class SheetScrollManagerService implements IRenderModule {
54
+ private readonly _context;
55
+ private readonly _sheetSkeletonManagerService;
55
56
  /**
56
57
  * a map holds all scroll info for each sheet
57
58
  */
@@ -74,7 +75,7 @@ export declare class ScrollManagerService {
74
75
  * use this subject not rawScrollInfo$ when get scrolling state of viewport.
75
76
  */
76
77
  private _searchParamForScroll;
77
- constructor(_univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService);
78
+ constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService);
78
79
  dispose(): void;
79
80
  setSearchParam(param: IScrollManagerSearchParam): void;
80
81
  setSearchParamAndRefresh(param: IScrollManagerSearchParam): void;
@@ -33,6 +33,7 @@ export interface ISheetSelectionRenderService {
33
33
  /** @deprecated Use the function `attachPrimaryWithCoord` instead`. */
34
34
  attachPrimaryWithCoord(primary: Nullable<Partial<ISelectionCell>>): Nullable<ISelectionCellWithMergeInfo>;
35
35
  getSelectionCellByPosition(x: number, y: number): Nullable<ISelectionCellWithMergeInfo>;
36
+ setSingleSelectionEnabled(enabled: boolean): void;
36
37
  }
37
38
  export declare const ISheetSelectionRenderService: import('@wendellhu/redi').IdentifierDecorator<ISheetSelectionRenderService>;
38
39
  /**
@@ -90,6 +91,7 @@ export declare class BaseSelectionRenderService extends Disposable implements IS
90
91
  protected _resetStyle(): void;
91
92
  /** @deprecated This should not be provided by the selection render service. */
92
93
  getViewPort(): Viewport;
94
+ setSingleSelectionEnabled(enabled?: boolean): void;
93
95
  /**
94
96
  * add a selection
95
97
  *
@@ -159,8 +161,7 @@ export declare class BaseSelectionRenderService extends Disposable implements IS
159
161
  */
160
162
  protected _moving(offsetX: number, offsetY: number, activeSelectionControl: Nullable<SelectionControl>, rangeType: RANGE_TYPE): false | undefined;
161
163
  protected _updateSelectionControlRange(control: SelectionControl, newSelectionRange: IRangeWithCoord, highlight: Nullable<ISelectionCellWithMergeInfo>): void;
162
- private _clearMove;
163
- protected _clearEndingListeners(): void;
164
+ protected _clearUpdatingListeners(): void;
164
165
  protected _addEndingListeners(): void;
165
166
  protected _getCellRangeByCursorPosition(offsetX: number, offsetY: number, scaleX: number, scaleY: number, scrollXY: {
166
167
  x: number;
@@ -3,7 +3,7 @@ import { IMouseEvent, IPointerEvent, IRenderContext, IRenderModule, Scene, Viewp
3
3
  import { SheetsSelectionsService } from '@univerjs/sheets';
4
4
  import { IShortcutService } from '@univerjs/ui';
5
5
  import { Injector } from '@wendellhu/redi';
6
- import { ScrollManagerService } from '../scroll-manager.service';
6
+ import { SheetScrollManagerService } from '../scroll-manager.service';
7
7
  import { SheetSkeletonManagerService } from '../sheet-skeleton-manager.service';
8
8
  import { BaseSelectionRenderService } from './base-selection-render.service';
9
9
  import { MobileSelectionControl } from './mobile-selection-shape';
@@ -28,7 +28,7 @@ export declare class MobileSheetsSelectionRenderService extends BaseSelectionRen
28
28
  _expandingSelection: boolean;
29
29
  protected _selectionControls: MobileSelectionControl[];
30
30
  expandingControlMode: ExpandingControl;
31
- constructor(_context: IRenderContext<Workbook>, injector: Injector, themeService: ThemeService, shortcutService: IShortcutService, renderManagerService: IRenderManagerService, selectionManagerService: SheetsSelectionsService, _logService: ILogService, _commandService: ICommandService, _contextService: IContextService, _sheetSkeletonManagerService: SheetSkeletonManagerService, _scrollManagerService: ScrollManagerService);
31
+ constructor(_context: IRenderContext<Workbook>, injector: Injector, themeService: ThemeService, shortcutService: IShortcutService, renderManagerService: IRenderManagerService, selectionManagerService: SheetsSelectionsService, _logService: ILogService, _commandService: ICommandService, _contextService: IContextService, _sheetSkeletonManagerService: SheetSkeletonManagerService, _scrollManagerService: SheetScrollManagerService);
32
32
  private _init;
33
33
  private _initSkeletonChangeListener;
34
34
  private _initSelectionChangeListener;
@@ -5,9 +5,6 @@ export declare class SelectionRenderModel implements IRangeWithCoord {
5
5
  private _startRow;
6
6
  private _endColumn;
7
7
  private _endRow;
8
- /**
9
- * value from { startY, endY, startX, endX } = getCellPositionByIndex in basics/tools
10
- */
11
8
  private _startX;
12
9
  private _startY;
13
10
  private _endX;
@@ -17,47 +14,28 @@ export declare class SelectionRenderModel implements IRangeWithCoord {
17
14
  * when there is no merge info
18
15
  * top left cell of current selection (or bottomLeft of current selection)
19
16
  */
20
- private _currentCell;
17
+ private _primary;
21
18
  private _rangeType;
22
19
  get startColumn(): number;
23
20
  get startRow(): number;
24
21
  get endColumn(): number;
25
22
  get endRow(): number;
26
- /**
27
- * value from { startY, endY, startX, endX } = getCellPositionByIndex in basics/tools
28
- */
29
23
  get startX(): number;
30
- /**
31
- * value from { startY, endY, startX, endX } = getCellPositionByIndex in basics/tools
32
- */
33
24
  get startY(): number;
34
- /**
35
- * value from { startY, endY, startX, endX } = getCellPositionByIndex in basics/tools
36
- */
37
25
  get endX(): number;
38
- /**
39
- * value from { startY, endY, startX, endX } = getCellPositionByIndex in basics/tools
40
- */
41
26
  get endY(): number;
42
- /**
43
- * highlight cell of selection
44
- */
45
27
  get currentCell(): Nullable<ISelectionCellWithMergeInfo>;
46
28
  get rangeType(): RANGE_TYPE;
29
+ /**
30
+ * @deprecated, Duplicate with `Rectangle`
31
+ */
47
32
  isEqual(rangeWithCoord: IRangeWithCoord): boolean;
33
+ /**
34
+ * @deprecated, Duplicate with `Rectangle`
35
+ */
48
36
  isInclude(rangeWithCoord: IRangeWithCoord): boolean;
49
37
  highlightToSelection(): IRangeWithCoord | undefined;
50
- getRange(): {
51
- startColumn: number;
52
- startRow: number;
53
- endColumn: number;
54
- endRow: number;
55
- startX: number;
56
- startY: number;
57
- endX: number;
58
- endY: number;
59
- rangeType: RANGE_TYPE;
60
- };
38
+ getRange(): IRangeWithCoord;
61
39
  getCell(): Nullable<ISelectionCellWithMergeInfo>;
62
40
  getRangeType(): RANGE_TYPE;
63
41
  setRangeType(rangeType: RANGE_TYPE): void;
@@ -37,7 +37,7 @@ export declare class SheetSkeletonManagerService extends Disposable implements I
37
37
  readonly currentSkeletonBefore$: import('rxjs').Observable<Nullable<ISheetSkeletonManagerParam>>;
38
38
  constructor(_context: IRenderContext<Workbook>, _injector: Injector);
39
39
  private _initRemoveSheet;
40
- getCurrentSkeleton(): SpreadsheetSkeleton;
40
+ getCurrentSkeleton(): Nullable<SpreadsheetSkeleton>;
41
41
  getCurrent(): Nullable<ISheetSkeletonManagerParam>;
42
42
  getWorksheetSkeleton(sheetId: string): Nullable<ISheetSkeletonManagerParam>;
43
43
  /**
@@ -13,5 +13,5 @@ interface FunctionNameMap {
13
13
  [key: string]: string;
14
14
  }
15
15
  export declare const CopyableStatisticItem: React.FC<IStatisticItem>;
16
- export declare function formatNumber(item: IStatisticItem): string | 0;
16
+ export declare function formatNumber(item: IStatisticItem): any;
17
17
  export {};