@univerjs/sheets-ui 0.2.2 → 0.2.4-alpha.0
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/README.md +11 -4
- package/lib/cjs/index.js +15 -15
- package/lib/es/index.js +11191 -12072
- package/lib/locale/vi-VN.json +613 -0
- package/lib/locale/zh-TW.json +613 -0
- package/lib/types/commands/commands/__tests__/create-command-test-bed.d.ts +2 -3
- package/lib/types/commands/commands/__tests__/create-selection-command-test-bed.d.ts +12 -12
- package/lib/types/commands/operations/cell-edit.operation.d.ts +2 -0
- package/lib/types/common/utils.d.ts +1 -2
- package/lib/types/controllers/auto-fill.controller.d.ts +4 -7
- package/lib/types/controllers/auto-height.controller.d.ts +3 -4
- 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/defined-name/defined-name.controller.d.ts +15 -0
- package/lib/types/controllers/editor/__tests__/create-test-bed.d.ts +1 -2
- package/lib/types/controllers/editor/editing.render-controller.d.ts +25 -10
- package/lib/types/controllers/format-painter/format-painter.controller.d.ts +5 -6
- package/lib/types/controllers/hover-render.controller.d.ts +2 -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/move-range.controller.d.ts +7 -5
- package/lib/types/controllers/permission/sheet-permission-init.controller.d.ts +1 -1
- package/lib/types/controllers/permission/sheet-permission-interceptor-base.controller.d.ts +4 -2
- package/lib/types/controllers/permission/sheet-permission-interceptor-canvas-render.controller.d.ts +3 -3
- package/lib/types/controllers/permission/sheet-permission-interceptor-clipboard.controller.d.ts +2 -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/contextmenu.render-controller.d.ts +3 -3
- package/lib/types/controllers/render-controllers/editor-bridge.render-controller.d.ts +8 -6
- package/lib/types/controllers/render-controllers/freeze.render-controller.d.ts +4 -5
- package/lib/types/controllers/render-controllers/header-menu.render-controller.d.ts +2 -2
- package/lib/types/controllers/render-controllers/header-move.render-controller.d.ts +5 -8
- package/lib/types/controllers/render-controllers/mobile/mobile-contextmenu.render-controller.d.ts +3 -3
- package/lib/types/controllers/render-controllers/mobile/mobile-scroll.render-controller.d.ts +3 -3
- package/lib/types/controllers/render-controllers/scroll.render-controller.d.ts +5 -6
- package/lib/types/controllers/sheet-ui.controller.d.ts +1 -2
- package/lib/types/controllers/status-bar.controller.d.ts +2 -2
- package/lib/types/controllers/utils/component-tools.d.ts +1 -5
- package/lib/types/controllers/utils/range-tools.d.ts +1 -2
- package/lib/types/controllers/utils/selections-tools.d.ts +3 -1
- package/lib/types/index.d.ts +6 -3
- package/lib/types/locale/vi-VN.d.ts +4 -0
- package/lib/types/locale/zh-TW.d.ts +4 -0
- package/lib/types/mobile-sheets-ui-plugin.d.ts +1 -2
- package/lib/types/services/auto-fill/auto-fill.service.d.ts +4 -5
- package/lib/types/services/auto-fill/type.d.ts +1 -2
- package/lib/types/services/canvas-pop-manager.service.d.ts +1 -2
- package/lib/types/services/cell-alert-manager.service.d.ts +1 -1
- package/lib/types/services/clipboard/__tests__/clipboard-test-bed.d.ts +7 -8
- package/lib/types/services/clipboard/clipboard.service.d.ts +5 -5
- package/lib/types/services/drag-manager.service.d.ts +1 -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 +7 -7
- package/lib/types/services/format-painter/format-painter.service.d.ts +5 -5
- package/lib/types/services/hover-manager.service.d.ts +1 -3
- package/lib/types/services/mark-selection/mark-selection.service.d.ts +2 -4
- package/lib/types/services/permission/worksheet-permission-render.service.d.ts +1 -1
- package/lib/types/services/scroll-manager.service.d.ts +7 -6
- package/lib/types/services/selection/base-selection-render.service.d.ts +173 -0
- package/lib/types/services/selection/const.d.ts +9 -0
- package/lib/types/services/selection/mobile-selection-render.service.d.ts +44 -151
- package/lib/types/services/selection/selection-render-model.d.ts +9 -31
- package/lib/types/services/selection/selection-render.service.d.ts +27 -211
- package/lib/types/services/selection/selection-shape-extension.d.ts +5 -3
- package/lib/types/services/selection/selection-shape.d.ts +3 -5
- package/lib/types/services/selection/util.d.ts +6 -0
- package/lib/types/services/sheet-bar/sheet-bar.service.d.ts +2 -3
- package/lib/types/services/sheet-skeleton-manager.service.d.ts +6 -4
- package/lib/types/services/sheets-render.service.d.ts +1 -2
- package/lib/types/services/shortcut-experience.service.d.ts +3 -2
- package/lib/types/services/status-bar.service.d.ts +2 -3
- package/lib/types/services/utils/selection-util.d.ts +4 -0
- package/lib/types/sheets-ui-plugin.d.ts +1 -2
- package/lib/umd/index.js +15 -15
- package/package.json +23 -25
- package/lib/types/controllers/render-controllers/mobile/mobile-selection.render-controller.d.ts +0 -40
- package/lib/types/controllers/render-controllers/selection.render-controller.d.ts +0 -37
- package/lib/types/services/selection/__test__/create-service-test-bed.d.ts +0 -9
- package/lib/types/services/selection/__test__/selection-render.test.d.ts +0 -16
package/lib/types/controllers/render-controllers/mobile/mobile-contextmenu.render-controller.d.ts
CHANGED
|
@@ -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 {
|
|
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:
|
|
18
|
+
constructor(_context: IRenderContext<Workbook>, _layoutService: ILayoutService, _contextMenuService: IContextMenuService, _selectionManagerService: SheetsSelectionsService, _selectionRenderService: ISheetSelectionRenderService);
|
|
19
19
|
private _init;
|
|
20
20
|
}
|
package/lib/types/controllers/render-controllers/mobile/mobile-scroll.render-controller.d.ts
CHANGED
|
@@ -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
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { SheetsSelectionsService } from '@univerjs/sheets';
|
|
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:
|
|
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,6 @@
|
|
|
1
|
-
import { IRange, Workbook, Disposable, ICommandService,
|
|
1
|
+
import { IRange, Workbook, Disposable, ICommandService, Injector } from '@univerjs/core';
|
|
2
2
|
import { IRenderContext, IRenderModule, IRenderManagerService } from '@univerjs/engine-render';
|
|
3
|
-
import {
|
|
4
|
-
import { ScrollManagerService } from '../../services/scroll-manager.service';
|
|
3
|
+
import { SheetScrollManagerService } from '../../services/scroll-manager.service';
|
|
5
4
|
import { SheetSkeletonManagerService } from '../../services/sheet-skeleton-manager.service';
|
|
6
5
|
|
|
7
6
|
/**
|
|
@@ -9,13 +8,12 @@ import { SheetSkeletonManagerService } from '../../services/sheet-skeleton-manag
|
|
|
9
8
|
*/
|
|
10
9
|
export declare class SheetsScrollRenderController extends Disposable implements IRenderModule {
|
|
11
10
|
private readonly _context;
|
|
11
|
+
private readonly _injector;
|
|
12
12
|
private readonly _sheetSkeletonManagerService;
|
|
13
13
|
private readonly _commandService;
|
|
14
14
|
private readonly _renderManagerService;
|
|
15
|
-
private readonly _selectionManagerService;
|
|
16
15
|
private readonly _scrollManagerService;
|
|
17
|
-
|
|
18
|
-
constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _commandService: ICommandService, _renderManagerService: IRenderManagerService, _selectionManagerService: SelectionManagerService, _scrollManagerService: ScrollManagerService, _univerInstanceService: IUniverInstanceService);
|
|
16
|
+
constructor(_context: IRenderContext<Workbook>, _injector: Injector, _sheetSkeletonManagerService: SheetSkeletonManagerService, _commandService: ICommandService, _renderManagerService: IRenderManagerService, _scrollManagerService: SheetScrollManagerService);
|
|
19
17
|
scrollToRange(range: IRange): boolean;
|
|
20
18
|
private _init;
|
|
21
19
|
private _initCommandListener;
|
|
@@ -28,6 +26,7 @@ export declare class SheetsScrollRenderController extends Disposable implements
|
|
|
28
26
|
private _getSheetObject;
|
|
29
27
|
private _scrollToSelectionByDirection;
|
|
30
28
|
private _scrollToSelection;
|
|
29
|
+
private _getSelectionsService;
|
|
31
30
|
private _getViewportBounding;
|
|
32
31
|
private _scrollToCell;
|
|
33
32
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Disposable, ICommandService } from '@univerjs/core';
|
|
1
|
+
import { Disposable, ICommandService, Injector } from '@univerjs/core';
|
|
2
2
|
import { MenuConfig, ComponentManager, ILayoutService, IMenuService, IShortcutService, IUIPartsService } from '@univerjs/ui';
|
|
3
|
-
import { Injector } from '@wendellhu/redi';
|
|
4
3
|
|
|
5
4
|
export interface IUniverSheetsUIConfig {
|
|
6
5
|
menu: MenuConfig;
|
|
@@ -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,
|
|
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:
|
|
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
|
-
*
|
|
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,5 +1,4 @@
|
|
|
1
|
-
import { IAccessor } from '@
|
|
2
|
-
import { ICellData, IObjectMatrixPrimitiveType, IRange } from '@univerjs/core';
|
|
1
|
+
import { IAccessor, ICellData, IObjectMatrixPrimitiveType, IRange } from '@univerjs/core';
|
|
3
2
|
|
|
4
3
|
export interface IDiscreteRange {
|
|
5
4
|
rows: number[];
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import { IAccessor } from '@
|
|
1
|
+
import { IAccessor, RANGE_TYPE } from '@univerjs/core';
|
|
2
|
+
import { ISelectionWithStyle } from '@univerjs/sheets';
|
|
2
3
|
|
|
3
4
|
export declare function getSheetSelectionsDisabled$(accessor: IAccessor): import('rxjs').Observable<boolean>;
|
|
5
|
+
export declare function checkInHeaderRanges(selections: Readonly<ISelectionWithStyle[]>, num: number, rType: RANGE_TYPE.ROW | RANGE_TYPE.COLUMN): false | ISelectionWithStyle;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -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 {
|
|
45
|
-
export {
|
|
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';
|
|
@@ -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
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Nullable, Direction, Disposable, ICommandService, IUndoRedoService, IUniverInstanceService } from '@univerjs/core';
|
|
2
|
-
import {
|
|
3
|
-
import { IDisposable } from '@wendellhu/redi';
|
|
1
|
+
import { IDisposable, Nullable, Direction, Disposable, ICommandService, IUndoRedoService, IUniverInstanceService } from '@univerjs/core';
|
|
2
|
+
import { SheetsSelectionsService } from '@univerjs/sheets';
|
|
4
3
|
import { Observable } from 'rxjs';
|
|
5
4
|
import { IAutoFillLocation, IAutoFillRule, ISheetAutoFillHook, APPLY_TYPE } from './type';
|
|
6
5
|
|
|
@@ -46,7 +45,7 @@ export declare class AutoFillService extends Disposable implements IAutoFillServ
|
|
|
46
45
|
readonly applyType$: Observable<APPLY_TYPE>;
|
|
47
46
|
private readonly _menu$;
|
|
48
47
|
readonly menu$: Observable<IApplyMenuItem[]>;
|
|
49
|
-
constructor(_univerInstanceService: IUniverInstanceService, _selectionManagerService:
|
|
48
|
+
constructor(_univerInstanceService: IUniverInstanceService, _selectionManagerService: SheetsSelectionsService, _commandService: ICommandService, _undoRedoService: IUndoRedoService);
|
|
50
49
|
private _init;
|
|
51
50
|
private getOneByPriority;
|
|
52
51
|
addHook(hook: ISheetAutoFillHook): IDisposable;
|
|
@@ -67,4 +66,4 @@ export declare class AutoFillService extends Disposable implements IAutoFillServ
|
|
|
67
66
|
setShowMenu(show: boolean): void;
|
|
68
67
|
fillData(triggerUnitId: string, triggerSubUnitId: string): boolean;
|
|
69
68
|
}
|
|
70
|
-
export declare const IAutoFillService: import('@
|
|
69
|
+
export declare const IAutoFillService: import('@univerjs/core').IdentifierDecorator<AutoFillService>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Direction, ICellData, IMutationInfo, Nullable } from '@univerjs/core';
|
|
2
|
-
import { IAccessor } from '@wendellhu/redi';
|
|
1
|
+
import { Direction, IAccessor, ICellData, IMutationInfo, Nullable } from '@univerjs/core';
|
|
3
2
|
import { IDiscreteRange } from '../../controllers/utils/range-tools';
|
|
4
3
|
|
|
5
4
|
export declare enum AutoFillHookType {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Nullable, Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
|
1
|
+
import { IDisposable, Nullable, Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
|
2
2
|
import { IRenderManagerService, BaseObject, Viewport } from '@univerjs/engine-render';
|
|
3
3
|
import { IPopup, ICanvasPopupService } from '@univerjs/ui';
|
|
4
|
-
import { IDisposable } from '@wendellhu/redi';
|
|
5
4
|
import { RefRangeService } from '@univerjs/sheets';
|
|
6
5
|
|
|
7
6
|
export interface ICanvasPopup extends Pick<IPopup, 'direction' | 'excludeOutside' | 'closeOnSelfTarget' | 'componentKey' | 'offset' | 'onClickOutside'> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IDisposable } from '@
|
|
1
|
+
import { IDisposable } from '@univerjs/core';
|
|
2
2
|
import { ISheetLocation } from '@univerjs/sheets';
|
|
3
3
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
4
4
|
import { SheetCanvasPopManagerService } from './canvas-pop-manager.service';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IWorkbookData, Univer } from '@univerjs/core';
|
|
2
|
-
import { Dependency, IDisposable } from '@wendellhu/redi';
|
|
1
|
+
import { Dependency, IDisposable, IWorkbookData, Univer } from '@univerjs/core';
|
|
3
2
|
|
|
4
3
|
export declare class testMarkSelectionService {
|
|
5
4
|
addShape(): string | null;
|
|
@@ -19,12 +18,12 @@ export declare class testPlatformService {
|
|
|
19
18
|
export declare function clipboardTestBed(workbookData?: IWorkbookData, dependencies?: Dependency[]): {
|
|
20
19
|
univer: Univer;
|
|
21
20
|
get: {
|
|
22
|
-
<T>(id: import('@
|
|
23
|
-
<T>(id: import('@
|
|
24
|
-
<T>(id: import('@
|
|
25
|
-
<T>(id: import('@
|
|
26
|
-
<T>(id: import('@
|
|
27
|
-
<T>(id: import('@
|
|
21
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, lookUp?: import('@univerjs/core').LookUp): T;
|
|
22
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.MANY, lookUp?: import('@univerjs/core').LookUp): T[];
|
|
23
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.OPTIONAL, lookUp?: import('@univerjs/core').LookUp): T | null;
|
|
24
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.REQUIRED, lookUp?: import('@univerjs/core').LookUp): T;
|
|
25
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity?: import('@univerjs/core').Quantity, lookUp?: import('@univerjs/core').LookUp): T[] | T | null;
|
|
26
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantityOrLookup?: import('@univerjs/core').Quantity | import('@univerjs/core').LookUp, lookUp?: import('@univerjs/core').LookUp): T[] | T | null;
|
|
28
27
|
};
|
|
29
28
|
sheet: import('@univerjs/core').Workbook;
|
|
30
29
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { IRange, Nullable, Disposable, ErrorService, ICommandService, ILogService, IUndoRedoService, IUniverInstanceService, LocaleService, ObjectMatrix } from '@univerjs/core';
|
|
2
|
-
import {
|
|
1
|
+
import { IDisposable, IRange, Nullable, Disposable, ErrorService, ICommandService, ILogService, Injector, IUndoRedoService, IUniverInstanceService, LocaleService, ObjectMatrix, ThemeService } from '@univerjs/core';
|
|
2
|
+
import { SheetsSelectionsService } from '@univerjs/sheets';
|
|
3
3
|
import { IClipboardInterfaceService, INotificationService, IPlatformService } from '@univerjs/ui';
|
|
4
|
-
import { IDisposable, Injector } from '@wendellhu/redi';
|
|
5
4
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
6
5
|
import { IMarkSelectionService } from '../mark-selection/mark-selection.service';
|
|
7
6
|
import { IDiscreteRange } from '../../controllers/utils/range-tools';
|
|
@@ -34,7 +33,7 @@ export interface ISheetClipboardService {
|
|
|
34
33
|
addClipboardHook(hook: ISheetClipboardHook): IDisposable;
|
|
35
34
|
getClipboardHooks(): ISheetClipboardHook[];
|
|
36
35
|
}
|
|
37
|
-
export declare const ISheetClipboardService: import('@
|
|
36
|
+
export declare const ISheetClipboardService: import('@univerjs/core').IdentifierDecorator<ISheetClipboardService>;
|
|
38
37
|
export declare class SheetClipboardService extends Disposable implements ISheetClipboardService {
|
|
39
38
|
private readonly _logService;
|
|
40
39
|
private readonly _univerInstanceService;
|
|
@@ -46,6 +45,7 @@ export declare class SheetClipboardService extends Disposable implements ISheetC
|
|
|
46
45
|
private readonly _notificationService;
|
|
47
46
|
private readonly _platformService;
|
|
48
47
|
private readonly _renderManagerService;
|
|
48
|
+
private readonly _themeService;
|
|
49
49
|
private readonly _localeService;
|
|
50
50
|
private readonly _errorService;
|
|
51
51
|
private readonly _injector;
|
|
@@ -56,7 +56,7 @@ export declare class SheetClipboardService extends Disposable implements ISheetC
|
|
|
56
56
|
private _usmToHtml;
|
|
57
57
|
private _copyContentCache;
|
|
58
58
|
private _copyMarkId;
|
|
59
|
-
constructor(_logService: ILogService, _univerInstanceService: IUniverInstanceService, _selectionManagerService:
|
|
59
|
+
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
60
|
copyContentCache(): CopyContentCache;
|
|
61
61
|
generateCopyContent(workbookId: string, worksheetId: string, range: IRange): Nullable<ICopyContent>;
|
|
62
62
|
copy(copyType?: COPY_TYPE): Promise<boolean>;
|
|
@@ -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,
|
|
15
|
+
constructor(_univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService);
|
|
18
16
|
dispose(): void;
|
|
19
17
|
private _initCellDisposableListener;
|
|
20
18
|
private _calcActiveCell;
|
|
@@ -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,14 +1,13 @@
|
|
|
1
|
-
import { ICellDataForSheetInterceptor, IPosition, ISelectionCell, Nullable, Disposable, 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
|
-
import { ISheetLocation } from '@univerjs/sheets';
|
|
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
|
-
import { ISelectionRenderService } from './selection/selection-render.service';
|
|
8
6
|
|
|
9
7
|
export interface IEditorBridgeServiceVisibleParam {
|
|
10
8
|
visible: boolean;
|
|
11
9
|
eventType: DeviceInputEventType;
|
|
10
|
+
unitId: string;
|
|
12
11
|
keycode?: KeyCode;
|
|
13
12
|
}
|
|
14
13
|
export interface ICurrentEditCellParam {
|
|
@@ -61,10 +60,11 @@ 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;
|
|
66
|
+
private readonly _refSelectionsService;
|
|
67
|
+
private readonly _contextService;
|
|
68
68
|
private _editorUnitId;
|
|
69
69
|
private _isForceKeepVisible;
|
|
70
70
|
private _editorIsDirty;
|
|
@@ -82,7 +82,7 @@ export declare class EditorBridgeService extends Disposable implements IEditorBr
|
|
|
82
82
|
AFTER_CELL_EDIT: import('@univerjs/core').IInterceptor<ICellDataForSheetInterceptor, ISheetLocation>;
|
|
83
83
|
AFTER_CELL_EDIT_ASYNC: import('@univerjs/core').IInterceptor<Promise<Nullable<ICellDataForSheetInterceptor>>, ISheetLocation>;
|
|
84
84
|
}>;
|
|
85
|
-
constructor(_renderManagerService: IRenderManagerService,
|
|
85
|
+
constructor(_renderManagerService: IRenderManagerService, _themeService: ThemeService, _univerInstanceService: IUniverInstanceService, _editorService: IEditorService, _refSelectionsService: SheetsSelectionsService, _contextService: IContextService);
|
|
86
86
|
refreshEditCellState(): void;
|
|
87
87
|
setEditCell(param: ICurrentEditCellParam): void;
|
|
88
88
|
getEditCellState(): Readonly<Nullable<IEditorBridgeServiceParam>>;
|
|
@@ -116,5 +116,5 @@ export declare class EditorBridgeService extends Disposable implements IEditorBr
|
|
|
116
116
|
changeEditorDirty(dirtyStatus: boolean): void;
|
|
117
117
|
getEditorDirty(): boolean;
|
|
118
118
|
}
|
|
119
|
-
export declare const IEditorBridgeService: import('@
|
|
119
|
+
export declare const IEditorBridgeService: import('@univerjs/core').IdentifierDecorator<EditorBridgeService>;
|
|
120
120
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IMutationInfo, IRange, IStyleData, Disposable, ICommandService, ILogService, IUndoRedoService,
|
|
2
|
-
import {
|
|
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
|
|
|
@@ -32,10 +32,10 @@ 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
|
-
private readonly
|
|
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:
|
|
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 { 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,
|
|
16
|
+
constructor(_univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService);
|
|
19
17
|
dispose(): void;
|
|
20
18
|
private _initCellDisposableListener;
|
|
21
19
|
private _calcActiveCell;
|
|
@@ -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 {
|
|
@@ -19,14 +18,13 @@ interface IMarkSelectionInfo {
|
|
|
19
18
|
control: SelectionControl | null;
|
|
20
19
|
exits: string[];
|
|
21
20
|
}
|
|
22
|
-
export declare const IMarkSelectionService: import('@
|
|
21
|
+
export declare const IMarkSelectionService: import('@univerjs/core').IdentifierDecorator<IMarkSelectionService>;
|
|
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,
|
|
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>;
|
|
@@ -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;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Nullable, Workbook } from '@univerjs/core';
|
|
2
2
|
import { BehaviorSubject } from 'rxjs';
|
|
3
|
-
import {
|
|
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
|
|
53
|
-
private readonly
|
|
54
|
-
private readonly
|
|
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(
|
|
78
|
+
constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService);
|
|
78
79
|
dispose(): void;
|
|
79
80
|
setSearchParam(param: IScrollManagerSearchParam): void;
|
|
80
81
|
setSearchParamAndRefresh(param: IScrollManagerSearchParam): void;
|