@univerjs/sheets-ui 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.
Files changed (51) hide show
  1. package/README.md +11 -4
  2. package/lib/cjs/index.js +12 -12
  3. package/lib/es/index.js +10669 -11574
  4. package/lib/locale/vi-VN.json +613 -0
  5. package/lib/locale/zh-TW.json +613 -0
  6. package/lib/types/controllers/auto-fill.controller.d.ts +3 -5
  7. package/lib/types/controllers/auto-height.controller.d.ts +2 -2
  8. package/lib/types/controllers/defined-name/defined-name.controller.d.ts +15 -0
  9. package/lib/types/controllers/editor/editing.render-controller.d.ts +2 -2
  10. package/lib/types/controllers/format-painter/format-painter.controller.d.ts +4 -4
  11. package/lib/types/controllers/move-range.controller.d.ts +7 -5
  12. package/lib/types/controllers/permission/sheet-permission-init.controller.d.ts +1 -1
  13. package/lib/types/controllers/permission/sheet-permission-interceptor-base.controller.d.ts +2 -2
  14. package/lib/types/controllers/permission/sheet-permission-interceptor-canvas-render.controller.d.ts +3 -3
  15. package/lib/types/controllers/permission/sheet-permission-interceptor-clipboard.controller.d.ts +2 -2
  16. package/lib/types/controllers/render-controllers/contextmenu.render-controller.d.ts +3 -3
  17. package/lib/types/controllers/render-controllers/editor-bridge.render-controller.d.ts +2 -2
  18. package/lib/types/controllers/render-controllers/freeze.render-controller.d.ts +2 -2
  19. package/lib/types/controllers/render-controllers/header-menu.render-controller.d.ts +2 -2
  20. package/lib/types/controllers/render-controllers/header-move.render-controller.d.ts +5 -8
  21. package/lib/types/controllers/render-controllers/mobile/mobile-contextmenu.render-controller.d.ts +3 -3
  22. package/lib/types/controllers/render-controllers/mobile/mobile-scroll.render-controller.d.ts +2 -2
  23. package/lib/types/controllers/render-controllers/scroll.render-controller.d.ts +5 -5
  24. package/lib/types/controllers/status-bar.controller.d.ts +2 -2
  25. package/lib/types/controllers/utils/component-tools.d.ts +1 -5
  26. package/lib/types/controllers/utils/selections-tools.d.ts +3 -0
  27. package/lib/types/index.d.ts +6 -3
  28. package/lib/types/locale/vi-VN.d.ts +4 -0
  29. package/lib/types/locale/zh-TW.d.ts +4 -0
  30. package/lib/types/services/auto-fill/auto-fill.service.d.ts +2 -2
  31. package/lib/types/services/clipboard/clipboard.service.d.ts +4 -3
  32. package/lib/types/services/editor-bridge.service.d.ts +1 -3
  33. package/lib/types/services/format-painter/format-painter.service.d.ts +4 -4
  34. package/lib/types/services/mark-selection/mark-selection.service.d.ts +1 -3
  35. package/lib/types/services/selection/base-selection-render.service.d.ts +173 -0
  36. package/lib/types/services/selection/const.d.ts +9 -0
  37. package/lib/types/services/selection/mobile-selection-render.service.d.ts +44 -150
  38. package/lib/types/services/selection/selection-render-model.d.ts +1 -1
  39. package/lib/types/services/selection/selection-render.service.d.ts +27 -210
  40. package/lib/types/services/selection/selection-shape-extension.d.ts +4 -1
  41. package/lib/types/services/selection/selection-shape.d.ts +3 -5
  42. package/lib/types/services/selection/util.d.ts +6 -0
  43. package/lib/types/services/sheet-skeleton-manager.service.d.ts +5 -2
  44. package/lib/types/services/shortcut-experience.service.d.ts +2 -0
  45. package/lib/types/services/utils/selection-util.d.ts +4 -0
  46. package/lib/umd/index.js +14 -14
  47. package/package.json +20 -20
  48. package/lib/types/controllers/render-controllers/mobile/mobile-selection.render-controller.d.ts +0 -40
  49. package/lib/types/controllers/render-controllers/selection.render-controller.d.ts +0 -37
  50. package/lib/types/services/selection/__test__/create-service-test-bed.d.ts +0 -9
  51. package/lib/types/services/selection/__test__/selection-render.test.d.ts +0 -16
@@ -2,7 +2,7 @@ import { ICellData, Workbook, Disposable, ICommandService, IContextService, IUnd
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';
5
- import { SelectionManagerService } from '@univerjs/sheets';
5
+ import { SheetsSelectionsService } from '@univerjs/sheets';
6
6
  import { LexerTreeBuilder } from '@univerjs/engine-formula';
7
7
  import { IEditorBridgeService } from '../../services/editor-bridge.service';
8
8
  import { ICellEditorManagerService } from '../../services/editor/cell-editor-manager.service';
@@ -29,7 +29,7 @@ export declare class EditingRenderController extends Disposable implements IRend
29
29
  private _cursorChange;
30
30
  constructor(_context: IRenderContext<Workbook>, _undoRedoService: IUndoRedoService, _contextService: IContextService,
31
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: SelectionManagerService, _lexerTreeBuilder: LexerTreeBuilder, _textSelectionManagerService: TextSelectionManagerService, _commandService: ICommandService, _localService: LocaleService, _editorService: IEditorService);
32
+ _univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _editorBridgeService: IEditorBridgeService, _cellEditorManagerService: ICellEditorManagerService, _textSelectionRenderManager: ITextSelectionRenderManager, _selectionManagerService: SheetsSelectionsService, _lexerTreeBuilder: LexerTreeBuilder, _textSelectionManagerService: TextSelectionManagerService, _commandService: ICommandService, _localService: LocaleService, _editorService: IEditorService);
33
33
  private _init;
34
34
  private _initEditorVisibilityListener;
35
35
  private _listenEditorFocus;
@@ -1,18 +1,18 @@
1
1
  import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
2
2
  import { Injector } from '@wendellhu/redi';
3
- import { SelectionManagerService, SheetInterceptorService } from '@univerjs/sheets';
3
+ import { SheetInterceptorService, SheetsSelectionsService } from '@univerjs/sheets';
4
+ import { IRenderManagerService } from '@univerjs/engine-render';
4
5
  import { IFormatPainterService } from '../../services/format-painter/format-painter.service';
5
- import { ISelectionRenderService } from '../../services/selection/selection-render.service';
6
6
 
7
7
  export declare class FormatPainterController extends Disposable {
8
8
  private readonly _commandService;
9
9
  private readonly _formatPainterService;
10
10
  private readonly _univerInstanceService;
11
- private readonly _selectionRenderService;
11
+ private readonly _renderManagerService;
12
12
  private readonly _selectionManagerService;
13
13
  private readonly _sheetInterceptorService;
14
14
  private readonly _injector;
15
- constructor(_commandService: ICommandService, _formatPainterService: IFormatPainterService, _univerInstanceService: IUniverInstanceService, _selectionRenderService: ISelectionRenderService, _selectionManagerService: SelectionManagerService, _sheetInterceptorService: SheetInterceptorService, _injector: Injector);
15
+ constructor(_commandService: ICommandService, _formatPainterService: IFormatPainterService, _univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _selectionManagerService: SheetsSelectionsService, _sheetInterceptorService: SheetInterceptorService, _injector: Injector);
16
16
  private _initialize;
17
17
  private _commandExecutedListener;
18
18
  private _addDefaultHook;
@@ -1,11 +1,13 @@
1
- import { Disposable, ICommandService } from '@univerjs/core';
2
- import { SelectionManagerService } from '@univerjs/sheets';
3
- import { ISelectionRenderService } from '../services/selection/selection-render.service';
1
+ import { Workbook, Disposable, ICommandService } from '@univerjs/core';
2
+ import { SheetsSelectionsService } from '@univerjs/sheets';
3
+ import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
4
+ import { ISheetSelectionRenderService } from '../services/selection/base-selection-render.service';
4
5
 
5
- export declare class MoveRangeController extends Disposable {
6
+ export declare class MoveRangeRenderController extends Disposable implements IRenderModule {
7
+ private readonly _context;
6
8
  private readonly _selectionRenderService;
7
9
  private readonly _selectionManagerService;
8
10
  private readonly _commandService;
9
- constructor(_selectionRenderService: ISelectionRenderService, _selectionManagerService: SelectionManagerService, _commandService: ICommandService);
11
+ constructor(_context: IRenderContext<Workbook>, _selectionRenderService: ISheetSelectionRenderService, _selectionManagerService: SheetsSelectionsService, _commandService: ICommandService);
10
12
  private _initialize;
11
13
  }
@@ -16,7 +16,7 @@ export declare class SheetPermissionInitController extends Disposable {
16
16
  constructor(_univerInstanceService: IUniverInstanceService, _dialogService: IDialogService, _permissionService: IPermissionService, _authzIoService: IAuthzIoService, _rangeProtectionRuleModel: RangeProtectionRuleModel, _worksheetProtectionRuleModel: WorksheetProtectionRuleModel, _userManagerService: UserManagerService, _worksheetProtectionPointRuleModel: WorksheetProtectionPointModel, _sheetInterceptorService: SheetInterceptorService, _selectionProtectionRenderModel: RangeProtectionRenderModel);
17
17
  private _initRangePermissionFromSnapshot;
18
18
  private _initRangePermissionChange;
19
- private _initWorkbookPermissionChange;
19
+ initWorkbookPermissionChange(_unitId?: string): void;
20
20
  private _initWorksheetPermissionChange;
21
21
  private _initWorksheetPermissionPointsChange;
22
22
  private _initWorksheetPermissionFromSnapshot;
@@ -1,5 +1,5 @@
1
1
  import { IPermissionTypes, IRange, Disposable, DisposableCollection, ICommandService, IContextService, IPermissionService, IUniverInstanceService, LocaleService } from '@univerjs/core';
2
- import { RangeProtectionRuleModel, SelectionManagerService, WorksheetProtectionRuleModel } from '@univerjs/sheets';
2
+ import { RangeProtectionRuleModel, SheetsSelectionsService, WorksheetProtectionRuleModel } from '@univerjs/sheets';
3
3
  import { IDialogService } from '@univerjs/ui';
4
4
  import { IDefinedNamesService, LexerTreeBuilder } from '@univerjs/engine-formula';
5
5
  import { IAutoFillService } from '../../services/auto-fill/auto-fill.service';
@@ -19,7 +19,7 @@ export declare class SheetPermissionInterceptorBaseController extends Disposable
19
19
  private readonly _contextService;
20
20
  private readonly _definedNamesService;
21
21
  disposableCollection: DisposableCollection;
22
- constructor(_commandService: ICommandService, _univerInstanceService: IUniverInstanceService, _permissionService: IPermissionService, _selectionManagerService: SelectionManagerService, _dialogService: IDialogService, _rangeProtectionRuleModel: RangeProtectionRuleModel, _worksheetProtectionRuleModel: WorksheetProtectionRuleModel, _autoFillService: IAutoFillService, _localeService: LocaleService, _lexerTreeBuilder: LexerTreeBuilder, _contextService: IContextService, _definedNamesService: IDefinedNamesService);
22
+ 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);
23
23
  haveNotPermissionHandle(errorMsg: string): void;
24
24
  private _getPermissionCheck;
25
25
  private _initialize;
@@ -1,10 +1,10 @@
1
1
  import { Workbook, DisposableCollection, IPermissionService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
2
- import { RangeProtectionRuleModel, SelectionManagerService } from '@univerjs/sheets';
2
+ import { RangeProtectionRuleModel, SheetsSelectionsService } from '@univerjs/sheets';
3
3
  import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
4
4
  import { HeaderMoveRenderController } from '../render-controllers/header-move.render-controller';
5
5
  import { HeaderResizeRenderController } from '../render-controllers/header-resize.render-controller';
6
- import { ISelectionRenderService } from '../../services/selection/selection-render.service';
7
6
  import { HeaderFreezeRenderController } from '../render-controllers/freeze.render-controller';
7
+ import { ISheetSelectionRenderService } from '../../services/selection/base-selection-render.service';
8
8
 
9
9
  export declare const SHEET_PERMISSION_PASTE_PLUGIN = "SHEET_PERMISSION_PASTE_PLUGIN";
10
10
  export declare class SheetPermissionInterceptorCanvasRenderController extends RxDisposable implements IRenderModule {
@@ -18,7 +18,7 @@ export declare class SheetPermissionInterceptorCanvasRenderController extends Rx
18
18
  private _headerFreezeRenderController;
19
19
  private _headerResizeRenderController?;
20
20
  disposableCollection: DisposableCollection;
21
- constructor(_context: IRenderContext<Workbook>, _univerInstanceService: IUniverInstanceService, _permissionService: IPermissionService, _selectionManagerService: SelectionManagerService, _rangeProtectionRuleModel: RangeProtectionRuleModel, _headerMoveRenderController: HeaderMoveRenderController, _selectionRenderService: ISelectionRenderService, _headerFreezeRenderController: HeaderFreezeRenderController, _headerResizeRenderController?: HeaderResizeRenderController | undefined);
21
+ constructor(_context: IRenderContext<Workbook>, _univerInstanceService: IUniverInstanceService, _permissionService: IPermissionService, _selectionManagerService: SheetsSelectionsService, _rangeProtectionRuleModel: RangeProtectionRuleModel, _headerMoveRenderController: HeaderMoveRenderController, _selectionRenderService: ISheetSelectionRenderService, _headerFreezeRenderController: HeaderFreezeRenderController, _headerResizeRenderController?: HeaderResizeRenderController | undefined);
22
22
  private _initHeaderMovePermissionInterceptor;
23
23
  private _initHeaderResizePermissionInterceptor;
24
24
  private _initRangeFillPermissionInterceptor;
@@ -1,5 +1,5 @@
1
1
  import { Disposable, DisposableCollection, IUniverInstanceService, LocaleService } from '@univerjs/core';
2
- import { SelectionManagerService } from '@univerjs/sheets';
2
+ import { SheetsSelectionsService } from '@univerjs/sheets';
3
3
  import { ISheetClipboardService } from '../../services/clipboard/clipboard.service';
4
4
  import { SheetPermissionInterceptorBaseController } from './sheet-permission-interceptor-base.controller';
5
5
 
@@ -11,6 +11,6 @@ export declare class SheetPermissionInterceptorClipboardController extends Dispo
11
11
  private _sheetClipboardService;
12
12
  private readonly _sheetPermissionInterceptorBaseController;
13
13
  disposableCollection: DisposableCollection;
14
- constructor(_univerInstanceService: IUniverInstanceService, _selectionManagerService: SelectionManagerService, _localService: LocaleService, _sheetClipboardService: ISheetClipboardService, _sheetPermissionInterceptorBaseController: SheetPermissionInterceptorBaseController);
14
+ constructor(_univerInstanceService: IUniverInstanceService, _selectionManagerService: SheetsSelectionsService, _localService: LocaleService, _sheetClipboardService: ISheetClipboardService, _sheetPermissionInterceptorBaseController: SheetPermissionInterceptorBaseController);
15
15
  private _initClipboardHook;
16
16
  }
@@ -1,8 +1,8 @@
1
1
  import { Workbook, Disposable } from '@univerjs/core';
2
2
  import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
3
- import { SelectionManagerService } from '@univerjs/sheets';
3
+ import { SheetsSelectionsService } from '@univerjs/sheets';
4
4
  import { IContextMenuService } from '@univerjs/ui';
5
- import { ISelectionRenderService } from '../../services/selection/selection-render.service';
5
+ import { ISheetSelectionRenderService } from '../../services/selection/base-selection-render.service';
6
6
 
7
7
  /**
8
8
  * This controller subscribe to context menu events in sheet rendering views and invoke context menu at a correct
@@ -13,6 +13,6 @@ export declare class SheetContextMenuRenderController extends Disposable impleme
13
13
  private readonly _contextMenuService;
14
14
  private readonly _selectionManagerService;
15
15
  private readonly _selectionRenderService;
16
- constructor(_context: IRenderContext<Workbook>, _contextMenuService: IContextMenuService, _selectionManagerService: SelectionManagerService, _selectionRenderService: ISelectionRenderService);
16
+ constructor(_context: IRenderContext<Workbook>, _contextMenuService: IContextMenuService, _selectionManagerService: SheetsSelectionsService, _selectionRenderService: ISheetSelectionRenderService);
17
17
  private _init;
18
18
  }
@@ -1,6 +1,6 @@
1
1
  import { Workbook, ICommandService, RxDisposable } from '@univerjs/core';
2
2
  import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
3
- import { SelectionManagerService } from '@univerjs/sheets';
3
+ import { SheetsSelectionsService } from '@univerjs/sheets';
4
4
  import { IRangeSelectorService } from '@univerjs/ui';
5
5
  import { IEditorBridgeService } from '../../services/editor-bridge.service';
6
6
 
@@ -10,7 +10,7 @@ export declare class EditorBridgeRenderController extends RxDisposable implement
10
10
  private readonly _editorBridgeService;
11
11
  private readonly _selectionManagerService;
12
12
  private readonly _rangeSelectorService;
13
- constructor(_context: IRenderContext<Workbook>, _commandService: ICommandService, _editorBridgeService: IEditorBridgeService, _selectionManagerService: SelectionManagerService, _rangeSelectorService: IRangeSelectorService);
13
+ constructor(_context: IRenderContext<Workbook>, _commandService: ICommandService, _editorBridgeService: IEditorBridgeService, _selectionManagerService: SheetsSelectionsService, _rangeSelectorService: IRangeSelectorService);
14
14
  private _initialize;
15
15
  private _initSelectionChangeListener;
16
16
  private _updateEditorPosition;
@@ -1,6 +1,6 @@
1
1
  import { Workbook, Disposable, ICommandService, InterceptorManager, ThemeService } from '@univerjs/core';
2
2
  import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
3
- import { SelectionManagerService, SheetInterceptorService } from '@univerjs/sheets';
3
+ import { SheetInterceptorService, SheetsSelectionsService } from '@univerjs/sheets';
4
4
  import { Injector } from '@wendellhu/redi';
5
5
  import { ScrollManagerService } from '../../services/scroll-manager.service';
6
6
  import { SheetSkeletonManagerService } from '../../services/sheet-skeleton-manager.service';
@@ -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: SelectionManagerService, _scrollManagerService: ScrollManagerService, _themeService: ThemeService, _sheetInterceptorService: SheetInterceptorService, _injector: Injector);
40
+ constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _commandService: ICommandService, _selectionManagerService: SheetsSelectionsService, _scrollManagerService: ScrollManagerService, _themeService: ThemeService, _sheetInterceptorService: SheetInterceptorService, _injector: Injector);
41
41
  dispose(): void;
42
42
  private _initialize;
43
43
  private _createFreeze;
@@ -1,6 +1,6 @@
1
1
  import { Workbook, Disposable, ICommandService } from '@univerjs/core';
2
2
  import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
3
- import { SelectionManagerService } from '@univerjs/sheets';
3
+ import { SheetsSelectionsService } from '@univerjs/sheets';
4
4
  import { IContextMenuService } from '@univerjs/ui';
5
5
  import { SheetSkeletonManagerService } from '../../services/sheet-skeleton-manager.service';
6
6
 
@@ -19,7 +19,7 @@ export declare class HeaderMenuRenderController extends Disposable implements IR
19
19
  private _currentColumn;
20
20
  private _headerPointerSubs;
21
21
  private _colHeaderPointerSubs;
22
- constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _contextMenuService: IContextMenuService, _commandService: ICommandService, _selectionManagerService: SelectionManagerService);
22
+ constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _contextMenuService: IContextMenuService, _commandService: ICommandService, _selectionManagerService: SheetsSelectionsService);
23
23
  dispose(): void;
24
24
  private _initialize;
25
25
  private _initialHover;
@@ -1,7 +1,6 @@
1
1
  import { IRange, Workbook, Disposable, ICommandService, InterceptorManager } from '@univerjs/core';
2
2
  import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
3
- import { SelectionManagerService } from '@univerjs/sheets';
4
- import { ISelectionRenderService } from '../../services/selection/selection-render.service';
3
+ import { SheetsSelectionsService } from '@univerjs/sheets';
5
4
  import { SheetSkeletonManagerService } from '../../services/sheet-skeleton-manager.service';
6
5
 
7
6
  export declare const HEADER_MOVE_PERMISSION_CHECK: import('@univerjs/core').IInterceptor<boolean, IRange>;
@@ -9,8 +8,6 @@ export declare class HeaderMoveRenderController extends Disposable implements IR
9
8
  private readonly _context;
10
9
  private readonly _sheetSkeletonManagerService;
11
10
  private readonly _commandService;
12
- private readonly _selectionRenderService;
13
- private readonly _selectionManagerService;
14
11
  private _startOffsetX;
15
12
  private _startOffsetY;
16
13
  private _moveHelperBackgroundShape;
@@ -25,15 +22,15 @@ export declare class HeaderMoveRenderController extends Disposable implements IR
25
22
  private _changeFromRow;
26
23
  private _changeToColumn;
27
24
  private _changeToRow;
28
- interceptor: InterceptorManager<{
25
+ readonly interceptor: InterceptorManager<{
29
26
  HEADER_MOVE_PERMISSION_CHECK: import('@univerjs/core').IInterceptor<boolean, IRange>;
30
27
  }>;
28
+ private readonly _workbookSelections;
29
+ constructor(_context: IRenderContext<Workbook>, selectionManagerService: SheetsSelectionsService, _sheetSkeletonManagerService: SheetSkeletonManagerService, _commandService: ICommandService);
31
30
  dispose(): void;
32
- constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _commandService: ICommandService, _selectionRenderService: ISelectionRenderService, _selectionManagerService: SelectionManagerService);
33
- private _initialize;
31
+ private _init;
34
32
  private _initialRowOrColumn;
35
33
  private _rowColumnMoving;
36
- private _checkInHeaderRange;
37
34
  private _clearObserverEvent;
38
35
  private _newBackgroundAndLine;
39
36
  private _disposeBackgroundAndLine;
@@ -1,8 +1,8 @@
1
1
  import { Workbook, Disposable } from '@univerjs/core';
2
2
  import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
3
+ import { SheetsSelectionsService } from '@univerjs/sheets';
3
4
  import { IContextMenuService, ILayoutService } from '@univerjs/ui';
4
- import { SelectionManagerService } from '@univerjs/sheets';
5
- import { ISelectionRenderService } from '../../../services/selection/selection-render.service';
5
+ import { ISheetSelectionRenderService } from '../../../services/selection/base-selection-render.service';
6
6
 
7
7
  /**
8
8
  * On mobile devices, the context menu would popup when
@@ -15,6 +15,6 @@ export declare class SheetContextMenuMobileRenderController extends Disposable i
15
15
  private readonly _contextMenuService;
16
16
  private readonly _selectionManagerService;
17
17
  private readonly _selectionRenderService;
18
- constructor(_context: IRenderContext<Workbook>, _layoutService: ILayoutService, _contextMenuService: IContextMenuService, _selectionManagerService: SelectionManagerService, _selectionRenderService: ISelectionRenderService);
18
+ constructor(_context: IRenderContext<Workbook>, _layoutService: ILayoutService, _contextMenuService: IContextMenuService, _selectionManagerService: SheetsSelectionsService, _selectionRenderService: ISheetSelectionRenderService);
19
19
  private _init;
20
20
  }
@@ -1,6 +1,6 @@
1
1
  import { IRange, Workbook, Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
2
2
  import { IRenderContext, IRenderModule, IRenderManagerService } from '@univerjs/engine-render';
3
- import { SelectionManagerService } from '@univerjs/sheets';
3
+ import { SheetsSelectionsService } from '@univerjs/sheets';
4
4
  import { ScrollManagerService } from '../../../services/scroll-manager.service';
5
5
  import { SheetSkeletonManagerService } from '../../../services/sheet-skeleton-manager.service';
6
6
 
@@ -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: SelectionManagerService, _scrollManagerService: ScrollManagerService, _univerInstanceService: IUniverInstanceService);
18
+ constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _commandService: ICommandService, _renderManagerService: IRenderManagerService, _selectionManagerService: SheetsSelectionsService, _scrollManagerService: ScrollManagerService, _univerInstanceService: IUniverInstanceService);
19
19
  scrollToRange(range: IRange): boolean;
20
20
  private _init;
21
21
  private _initCommandListener;
@@ -1,6 +1,6 @@
1
- import { IRange, Workbook, Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
1
+ import { IRange, Workbook, Disposable, ICommandService } from '@univerjs/core';
2
2
  import { IRenderContext, IRenderModule, IRenderManagerService } from '@univerjs/engine-render';
3
- import { SelectionManagerService } from '@univerjs/sheets';
3
+ import { Injector } from '@wendellhu/redi';
4
4
  import { ScrollManagerService } from '../../services/scroll-manager.service';
5
5
  import { SheetSkeletonManagerService } from '../../services/sheet-skeleton-manager.service';
6
6
 
@@ -9,13 +9,12 @@ import { SheetSkeletonManagerService } from '../../services/sheet-skeleton-manag
9
9
  */
10
10
  export declare class SheetsScrollRenderController extends Disposable implements IRenderModule {
11
11
  private readonly _context;
12
+ private readonly _injector;
12
13
  private readonly _sheetSkeletonManagerService;
13
14
  private readonly _commandService;
14
15
  private readonly _renderManagerService;
15
- private readonly _selectionManagerService;
16
16
  private readonly _scrollManagerService;
17
- protected readonly _univerInstanceService: IUniverInstanceService;
18
- constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _commandService: ICommandService, _renderManagerService: IRenderManagerService, _selectionManagerService: SelectionManagerService, _scrollManagerService: ScrollManagerService, _univerInstanceService: IUniverInstanceService);
17
+ constructor(_context: IRenderContext<Workbook>, _injector: Injector, _sheetSkeletonManagerService: SheetSkeletonManagerService, _commandService: ICommandService, _renderManagerService: IRenderManagerService, _scrollManagerService: ScrollManagerService);
19
18
  scrollToRange(range: IRange): boolean;
20
19
  private _init;
21
20
  private _initCommandListener;
@@ -28,6 +27,7 @@ export declare class SheetsScrollRenderController extends Disposable implements
28
27
  private _getSheetObject;
29
28
  private _scrollToSelectionByDirection;
30
29
  private _scrollToSelection;
30
+ private _getSelectionsService;
31
31
  private _getViewportBounding;
32
32
  private _scrollToCell;
33
33
  }
@@ -1,6 +1,6 @@
1
1
  import { Disposable, ICommandService, InterceptorManager, IUniverInstanceService } from '@univerjs/core';
2
2
  import { ArrayValueObject, FormulaDataModel, IFunctionService } from '@univerjs/engine-formula';
3
- import { INumfmtService, SelectionManagerService } from '@univerjs/sheets';
3
+ import { INumfmtService, SheetsSelectionsService } from '@univerjs/sheets';
4
4
  import { IStatusBarService } from '../services/status-bar.service';
5
5
 
6
6
  export declare const STATUS_BAR_PERMISSION_CORRECT: import('@univerjs/core').IInterceptor<ArrayValueObject[], ArrayValueObject[]>;
@@ -16,7 +16,7 @@ export declare class StatusBarController extends Disposable {
16
16
  interceptor: InterceptorManager<{
17
17
  STATUS_BAR_PERMISSION_CORRECT: import('@univerjs/core').IInterceptor<ArrayValueObject[], ArrayValueObject[]>;
18
18
  }>;
19
- constructor(_univerInstanceService: IUniverInstanceService, _selectionManagerService: SelectionManagerService, _functionService: IFunctionService, _statusBarService: IStatusBarService, _commandService: ICommandService, _formulaDataModel: FormulaDataModel, _numfmtService: INumfmtService);
19
+ constructor(_univerInstanceService: IUniverInstanceService, _selectionManagerService: SheetsSelectionsService, _functionService: IFunctionService, _statusBarService: IStatusBarService, _commandService: ICommandService, _formulaDataModel: FormulaDataModel, _numfmtService: INumfmtService);
20
20
  private _init;
21
21
  private _registerSelectionListener;
22
22
  private _clearResult;
@@ -13,11 +13,7 @@ export interface ISheetObjectParam {
13
13
  engine: Engine;
14
14
  }
15
15
  /**
16
- * @deprecated
17
- *
18
- * @param univerInstanceService
19
- * @param renderManagerService
20
- * @returns
16
+ * Get render objects of a spreadsheet.
21
17
  */
22
18
  export declare function getSheetObject(univerInstanceService: IUniverInstanceService | Workbook, renderManagerService: IRenderManagerService | IRenderContext): Nullable<ISheetObjectParam>;
23
19
  export declare function getCoordByCell(row: number, col: number, scene: Scene, skeleton: SpreadsheetSkeleton): {
@@ -1,3 +1,6 @@
1
+ import { RANGE_TYPE } from '@univerjs/core';
2
+ import { ISelectionWithStyle } from '@univerjs/sheets';
1
3
  import { IAccessor } from '@wendellhu/redi';
2
4
 
3
5
  export declare function getSheetSelectionsDisabled$(accessor: IAccessor): import('rxjs').Observable<boolean>;
6
+ export declare function checkInHeaderRanges(selections: Readonly<ISelectionWithStyle[]>, num: number, rType: RANGE_TYPE.ROW | RANGE_TYPE.COLUMN): false | ISelectionWithStyle;
@@ -24,6 +24,7 @@ export { CellCustomRenderController } from './controllers/cell-custom-render.con
24
24
  export { PASTE_SPECIAL_MENU_ID } from './controllers/menu/menu';
25
25
  export { whenFormulaEditorActivated } from './controllers/shortcuts/utils';
26
26
  export { getCoordByCell, getCoordByOffset, getSheetObject, getTransformCoord, } from './controllers/utils/component-tools';
27
+ export { checkInHeaderRanges } from './controllers/utils/selections-tools';
27
28
  export { useActiveWorkbook, useActiveWorksheet } from './components/hook';
28
29
  export { whenSheetEditorFocused } from './controllers/shortcuts/utils';
29
30
  export type { IEditorBridgeServiceParam } from './services/editor-bridge.service';
@@ -41,11 +42,12 @@ export { IFormulaEditorManagerService } from './services/editor/formula-editor-m
41
42
  export { EditorBridgeService, IEditorBridgeService, type IEditorBridgeServiceVisibleParam, } from './services/editor-bridge.service';
42
43
  export { MarkSelectionService } from './services/mark-selection/mark-selection.service';
43
44
  export { IMarkSelectionService } from './services/mark-selection/mark-selection.service';
44
- export { ISelectionRenderService } from './services/selection/selection-render.service';
45
- export { SelectionRenderService } from './services/selection/selection-render.service';
45
+ export { SheetSelectionRenderService } from './services/selection/selection-render.service';
46
+ export { getAllSelection, getTopLeftSelection } from './services/selection/base-selection-render.service';
47
+ export { BaseSelectionRenderService, ISheetSelectionRenderService } from './services/selection/base-selection-render.service';
46
48
  export { SelectionControl as SelectionShape } from './services/selection/selection-shape';
47
49
  export type { ISheetSkeletonManagerParam } from './services/sheet-skeleton-manager.service';
48
- export { SheetSkeletonManagerService } from './services/sheet-skeleton-manager.service';
50
+ export { SheetSkeletonManagerService, attachRangeWithCoord } from './services/sheet-skeleton-manager.service';
49
51
  export { UniverSheetsUIPlugin } from './sheets-ui-plugin';
50
52
  export { SheetRenderController } from './controllers/render-controllers/sheet.render-controller';
51
53
  export { HoverManagerService } from './services/hover-manager.service';
@@ -75,6 +77,7 @@ export { SheetPrintInterceptorService } from './services/print-interceptor.servi
75
77
  export { UniverSheetsMobileUIPlugin } from './mobile-sheets-ui-plugin';
76
78
  export { MobileSheetBar } from './views/mobile/sheet-bar/MobileSheetBar';
77
79
  export { expandToContinuousRange } from './commands/commands/utils/selection-utils';
80
+ export { SheetPermissionInitController } from './controllers/permission/sheet-permission-init.controller';
78
81
  export { AddWorksheetMergeCommand, AddWorksheetMergeAllCommand, AddWorksheetMergeVerticalCommand, AddWorksheetMergeHorizontalCommand } from './commands/commands/add-worksheet-merge.command';
79
82
  export { AutoFillCommand, AutoClearContentCommand } from './commands/commands/auto-fill.command';
80
83
  export { SheetCopyCommand, SheetCutCommand, SheetPasteCommand, SheetPasteValueCommand, SheetPasteShortKeyCommand, SheetPasteColWidthCommand, SheetPasteFormatCommand, SheetPasteBesidesBorderCommand, type ISheetPasteParams, } from './commands/commands/clipboard.command';
@@ -0,0 +1,4 @@
1
+ import { default as zhCN } from './zh-CN';
2
+
3
+ declare const locale: typeof zhCN;
4
+ export default locale;
@@ -0,0 +1,4 @@
1
+ import { default as zhCN } from './zh-CN';
2
+
3
+ declare const locale: typeof zhCN;
4
+ export default locale;
@@ -1,5 +1,5 @@
1
1
  import { Nullable, Direction, Disposable, ICommandService, IUndoRedoService, IUniverInstanceService } from '@univerjs/core';
2
- import { SelectionManagerService } from '@univerjs/sheets';
2
+ import { SheetsSelectionsService } from '@univerjs/sheets';
3
3
  import { IDisposable } from '@wendellhu/redi';
4
4
  import { Observable } from 'rxjs';
5
5
  import { IAutoFillLocation, IAutoFillRule, ISheetAutoFillHook, APPLY_TYPE } from './type';
@@ -46,7 +46,7 @@ export declare class AutoFillService extends Disposable implements IAutoFillServ
46
46
  readonly applyType$: Observable<APPLY_TYPE>;
47
47
  private readonly _menu$;
48
48
  readonly menu$: Observable<IApplyMenuItem[]>;
49
- constructor(_univerInstanceService: IUniverInstanceService, _selectionManagerService: SelectionManagerService, _commandService: ICommandService, _undoRedoService: IUndoRedoService);
49
+ constructor(_univerInstanceService: IUniverInstanceService, _selectionManagerService: SheetsSelectionsService, _commandService: ICommandService, _undoRedoService: IUndoRedoService);
50
50
  private _init;
51
51
  private getOneByPriority;
52
52
  addHook(hook: ISheetAutoFillHook): IDisposable;
@@ -1,5 +1,5 @@
1
- import { IRange, Nullable, Disposable, ErrorService, ICommandService, ILogService, IUndoRedoService, IUniverInstanceService, LocaleService, ObjectMatrix } from '@univerjs/core';
2
- import { SelectionManagerService } from '@univerjs/sheets';
1
+ import { IRange, Nullable, Disposable, ErrorService, ICommandService, ILogService, IUndoRedoService, IUniverInstanceService, LocaleService, ObjectMatrix, ThemeService } from '@univerjs/core';
2
+ import { SheetsSelectionsService } from '@univerjs/sheets';
3
3
  import { IClipboardInterfaceService, INotificationService, IPlatformService } from '@univerjs/ui';
4
4
  import { IDisposable, Injector } from '@wendellhu/redi';
5
5
  import { IRenderManagerService } from '@univerjs/engine-render';
@@ -46,6 +46,7 @@ export declare class SheetClipboardService extends Disposable implements ISheetC
46
46
  private readonly _notificationService;
47
47
  private readonly _platformService;
48
48
  private readonly _renderManagerService;
49
+ private readonly _themeService;
49
50
  private readonly _localeService;
50
51
  private readonly _errorService;
51
52
  private readonly _injector;
@@ -56,7 +57,7 @@ export declare class SheetClipboardService extends Disposable implements ISheetC
56
57
  private _usmToHtml;
57
58
  private _copyContentCache;
58
59
  private _copyMarkId;
59
- constructor(_logService: ILogService, _univerInstanceService: IUniverInstanceService, _selectionManagerService: SelectionManagerService, _clipboardInterfaceService: IClipboardInterfaceService, _undoRedoService: IUndoRedoService, _commandService: ICommandService, _markSelectionService: IMarkSelectionService, _notificationService: INotificationService, _platformService: IPlatformService, _renderManagerService: IRenderManagerService, _localeService: LocaleService, _errorService: ErrorService, _injector: Injector);
60
+ constructor(_logService: ILogService, _univerInstanceService: IUniverInstanceService, _selectionManagerService: SheetsSelectionsService, _clipboardInterfaceService: IClipboardInterfaceService, _undoRedoService: IUndoRedoService, _commandService: ICommandService, _markSelectionService: IMarkSelectionService, _notificationService: INotificationService, _platformService: IPlatformService, _renderManagerService: IRenderManagerService, _themeService: ThemeService, _localeService: LocaleService, _errorService: ErrorService, _injector: Injector);
60
61
  copyContentCache(): CopyContentCache;
61
62
  generateCopyContent(workbookId: string, worksheetId: string, range: IRange): Nullable<ICopyContent>;
62
63
  copy(copyType?: COPY_TYPE): Promise<boolean>;
@@ -4,7 +4,6 @@ import { ISheetLocation } from '@univerjs/sheets';
4
4
  import { IEditorService, KeyCode } from '@univerjs/ui';
5
5
  import { IDisposable } from '@wendellhu/redi';
6
6
  import { Observable } from 'rxjs';
7
- import { ISelectionRenderService } from './selection/selection-render.service';
8
7
 
9
8
  export interface IEditorBridgeServiceVisibleParam {
10
9
  visible: boolean;
@@ -61,7 +60,6 @@ export interface IEditorBridgeService {
61
60
  }
62
61
  export declare class EditorBridgeService extends Disposable implements IEditorBridgeService, IDisposable {
63
62
  private readonly _renderManagerService;
64
- private readonly _selectionRenderService;
65
63
  private readonly _themeService;
66
64
  private readonly _univerInstanceService;
67
65
  private readonly _editorService;
@@ -82,7 +80,7 @@ export declare class EditorBridgeService extends Disposable implements IEditorBr
82
80
  AFTER_CELL_EDIT: import('@univerjs/core').IInterceptor<ICellDataForSheetInterceptor, ISheetLocation>;
83
81
  AFTER_CELL_EDIT_ASYNC: import('@univerjs/core').IInterceptor<Promise<Nullable<ICellDataForSheetInterceptor>>, ISheetLocation>;
84
82
  }>;
85
- constructor(_renderManagerService: IRenderManagerService, _selectionRenderService: ISelectionRenderService, _themeService: ThemeService, _univerInstanceService: IUniverInstanceService, _editorService: IEditorService);
83
+ constructor(_renderManagerService: IRenderManagerService, _themeService: ThemeService, _univerInstanceService: IUniverInstanceService, _editorService: IEditorService);
86
84
  refreshEditCellState(): void;
87
85
  setEditCell(param: ICurrentEditCellParam): void;
88
86
  getEditCellState(): Readonly<Nullable<IEditorBridgeServiceParam>>;
@@ -1,5 +1,5 @@
1
- import { IMutationInfo, IRange, IStyleData, Disposable, ICommandService, ILogService, IUndoRedoService, IUniverInstanceService, ObjectMatrix } from '@univerjs/core';
2
- import { SelectionManagerService } from '@univerjs/sheets';
1
+ import { IMutationInfo, IRange, IStyleData, Disposable, ICommandService, ILogService, IUndoRedoService, ObjectMatrix, ThemeService } from '@univerjs/core';
2
+ import { SheetsSelectionsService } from '@univerjs/sheets';
3
3
  import { Observable } from 'rxjs';
4
4
  import { IMarkSelectionService } from '../mark-selection/mark-selection.service';
5
5
 
@@ -35,7 +35,7 @@ export declare enum FormatPainterStatus {
35
35
  export declare const IFormatPainterService: import('@wendellhu/redi').IdentifierDecorator<IFormatPainterService>;
36
36
  export declare class FormatPainterService extends Disposable implements IFormatPainterService {
37
37
  private readonly _selectionManagerService;
38
- private readonly _univerInstanceService;
38
+ private readonly _themeService;
39
39
  private readonly _markSelectionService;
40
40
  private readonly _logService;
41
41
  private readonly _commandService;
@@ -46,7 +46,7 @@ export declare class FormatPainterService extends Disposable implements IFormatP
46
46
  private readonly _status$;
47
47
  private _defaultHook;
48
48
  private _extendHooks;
49
- constructor(_selectionManagerService: SelectionManagerService, _univerInstanceService: IUniverInstanceService, _markSelectionService: IMarkSelectionService, _logService: ILogService, _commandService: ICommandService, _undoRedoService: IUndoRedoService);
49
+ constructor(_selectionManagerService: SheetsSelectionsService, _themeService: ThemeService, _markSelectionService: IMarkSelectionService, _logService: ILogService, _commandService: ICommandService, _undoRedoService: IUndoRedoService);
50
50
  addHook(hook: IFormatPainterHook): void;
51
51
  getHooks(): IFormatPainterHook[];
52
52
  setStatus(status: FormatPainterStatus): void;
@@ -1,7 +1,6 @@
1
1
  import { Disposable, IUniverInstanceService, ThemeService } from '@univerjs/core';
2
2
  import { IRenderManagerService } from '@univerjs/engine-render';
3
3
  import { ISelectionWithStyle } from '@univerjs/sheets';
4
- import { ISelectionRenderService } from '../selection/selection-render.service';
5
4
  import { SelectionControl } from '../selection/selection-shape';
6
5
 
7
6
  export interface IMarkSelectionService {
@@ -23,10 +22,9 @@ export declare const IMarkSelectionService: import('@wendellhu/redi').Identifier
23
22
  export declare class MarkSelectionService extends Disposable implements IMarkSelectionService {
24
23
  private readonly _currentService;
25
24
  private readonly _renderManagerService;
26
- private readonly _selectionRenderService;
27
25
  private readonly _themeService;
28
26
  private _shapeMap;
29
- constructor(_currentService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _selectionRenderService: ISelectionRenderService, _themeService: ThemeService);
27
+ constructor(_currentService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _themeService: ThemeService);
30
28
  addShape(selection: ISelectionWithStyle, exits?: string[], zIndex?: number): string | null;
31
29
  refreshShapes(): void;
32
30
  getShapeMap(): Map<string, IMarkSelectionInfo>;