@univerjs/sheets-ui 0.6.0-experimental.20250125-1d060b9 → 0.6.0-experimental.20250212-dbe9830
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +48 -46
- package/lib/es/facade.js +649 -563
- package/lib/es/index.js +7730 -7572
- package/lib/types/common/keys.d.ts +1 -1
- package/lib/types/components/border-panel/border-line/icons/BorderDashDot.d.ts +1 -1
- package/lib/types/components/border-panel/border-line/icons/BorderDashDotDot.d.ts +1 -1
- package/lib/types/components/border-panel/border-line/icons/BorderDashed.d.ts +1 -1
- package/lib/types/components/border-panel/border-line/icons/BorderDotted.d.ts +1 -1
- package/lib/types/components/border-panel/border-line/icons/BorderHair.d.ts +1 -1
- package/lib/types/components/border-panel/border-line/icons/BorderMedium.d.ts +1 -1
- package/lib/types/components/border-panel/border-line/icons/BorderMediumDashDot.d.ts +1 -1
- package/lib/types/components/border-panel/border-line/icons/BorderMediumDashDotDot.d.ts +1 -1
- package/lib/types/components/border-panel/border-line/icons/BorderMediumDashed.d.ts +1 -1
- package/lib/types/components/border-panel/border-line/icons/BorderThick.d.ts +1 -1
- package/lib/types/components/border-panel/border-line/icons/BorderThin.d.ts +1 -1
- package/lib/types/components/color-picker/index.d.ts +1 -1
- package/lib/types/components/color-picker/interface.d.ts +1 -1
- package/lib/types/components/const.d.ts +1 -1
- package/lib/types/components/font-family/index.d.ts +1 -1
- package/lib/types/components/font-family/interface.d.ts +1 -1
- package/lib/types/components/font-size/index.d.ts +1 -1
- package/lib/types/components/font-size/interface.d.ts +1 -1
- package/lib/types/components/menu-item-input/index.d.ts +1 -1
- package/lib/types/consts/plugin-name.d.ts +1 -1
- package/lib/types/consts/ui-name.d.ts +1 -1
- package/lib/types/controllers/auto-fill.controller.d.ts +1 -1
- package/lib/types/controllers/clipboard/clipboard.controller.d.ts +3 -0
- package/lib/types/controllers/clipboard/const.d.ts +1 -1
- package/lib/types/controllers/editor/utils/{isEmbeddingFormulaEditor.d.ts → is-embedding-formula-editor.d.ts} +1 -1
- package/lib/types/controllers/editor/utils/{isRangeSelector.d.ts → is-range-selector.d.ts} +1 -1
- package/lib/types/controllers/format-painter/format-painter.controller.d.ts +0 -1
- package/lib/types/controllers/render-controllers/clipboard.render-controller.d.ts +13 -0
- package/lib/types/controllers/render-controllers/format-painter.render-controller.d.ts +6 -2
- package/lib/types/controllers/render-controllers/scroll.render-controller.d.ts +1 -0
- package/lib/types/controllers/render-controllers/skeleton.render-controller.d.ts +4 -2
- package/lib/types/controllers/render-controllers/zoom.render-controller.d.ts +1 -1
- package/lib/types/controllers/utils/cell-tools.d.ts +1 -1
- package/lib/types/facade/f-univer.d.ts +1 -4
- package/lib/types/facade/index.d.ts +1 -1
- package/lib/types/index.d.ts +4 -4
- package/lib/types/locale/zh-CN.d.ts +1 -1
- package/lib/types/services/clipboard/clipboard.service.d.ts +4 -0
- package/lib/types/services/editor-bridge.service.d.ts +5 -0
- package/lib/types/services/scroll-manager.service.d.ts +17 -12
- package/lib/types/services/sheet-skeleton-manager.service.d.ts +39 -16
- package/lib/types/services/sheets-render.service.d.ts +1 -1
- package/lib/types/views/cell-alert/index.d.ts +1 -1
- package/lib/types/views/clipboard/ClipboardPopupMenu.d.ts +1 -1
- package/lib/types/views/count-bar/CountBar.d.ts +1 -1
- package/lib/types/views/count-bar/ZoomSlider.d.ts +1 -1
- package/lib/types/views/count-bar/index.d.ts +1 -1
- package/lib/types/views/defined-name/DefinedName.d.ts +1 -1
- package/lib/types/views/defined-name/DefinedNameContainer.d.ts +1 -1
- package/lib/types/views/defined-name/DefinedNameOverlay.d.ts +1 -1
- package/lib/types/views/defined-name/component-name.d.ts +1 -1
- package/lib/types/views/editor-container/index.d.ts +1 -1
- package/lib/types/views/formula-bar/FormulaBar.d.ts +1 -1
- package/lib/types/views/formula-bar/index.d.ts +1 -1
- package/lib/types/views/mobile/sheet-bar/MobileSheetBar.d.ts +1 -1
- package/lib/types/views/operate-container/index.d.ts +1 -1
- package/lib/types/views/permission/error-msg-dialog/index.d.ts +1 -1
- package/lib/types/views/permission/error-msg-dialog/interface.d.ts +1 -1
- package/lib/types/views/permission/extensions/protect-background-img.d.ts +1 -1
- package/lib/types/views/permission/index.d.ts +1 -1
- package/lib/types/views/permission/panel-list/constant.d.ts +1 -1
- package/lib/types/views/permission/panel-list/index.d.ts +1 -1
- package/lib/types/views/permission/permission-dialog/index.d.ts +1 -1
- package/lib/types/views/permission/user-dialog/constant.d.ts +1 -1
- package/lib/types/views/permission/user-dialog/index.d.ts +1 -1
- package/lib/types/views/sheet-bar/SheetBar.d.ts +1 -1
- package/lib/types/views/sheet-bar/sheet-bar-tabs/SheetBarTabs.d.ts +1 -1
- package/lib/types/views/sheet-bar/sheet-bar-tabs/utils/animate.d.ts +1 -1
- package/lib/types/views/sheet-bar/sheet-bar-tabs/utils/slide-tab-bar.d.ts +2 -2
- package/lib/types/views/sheet-container/SheetContainer.d.ts +1 -1
- package/lib/types/views/status-bar/CopyableStatisticItem.d.ts +1 -1
- package/lib/types/views/status-bar/StatusBar.d.ts +1 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +42 -40
- package/package.json +15 -15
- /package/lib/types/hooks/{useHighlightRange.d.ts → use-highlight-range.d.ts} +0 -0
|
@@ -21,7 +21,7 @@ export declare class AutoFillController extends Disposable {
|
|
|
21
21
|
private _initDefaultHook;
|
|
22
22
|
private _initQuitListener;
|
|
23
23
|
private _quit;
|
|
24
|
-
private
|
|
24
|
+
private _initSelectionControlFillChanged;
|
|
25
25
|
private _handleDbClickFill;
|
|
26
26
|
private _detectFillRange;
|
|
27
27
|
private _getApplyData;
|
|
@@ -13,7 +13,10 @@ export declare class SheetClipboardController extends RxDisposable {
|
|
|
13
13
|
private readonly _messageService;
|
|
14
14
|
private readonly _localService;
|
|
15
15
|
protected readonly _uiPartsService: IUIPartsService;
|
|
16
|
+
private _refreshOptionalPaste$;
|
|
17
|
+
refreshOptionalPaste$: import('rxjs').Observable<unknown>;
|
|
16
18
|
constructor(_injector: Injector, _currentUniverSheet: IUniverInstanceService, _renderManagerService: IRenderManagerService, _commandService: ICommandService, _contextService: IContextService, _configService: IConfigService, _sheetClipboardService: ISheetClipboardService, _messageService: IMessageService, _localService: LocaleService, _uiPartsService: IUIPartsService);
|
|
19
|
+
refreshOptionalPaste(): void;
|
|
17
20
|
private _pasteWithDoc;
|
|
18
21
|
private _resolveClipboardFiles;
|
|
19
22
|
private _init;
|
|
@@ -12,7 +12,6 @@ export declare class FormatPainterController extends Disposable {
|
|
|
12
12
|
private readonly _injector;
|
|
13
13
|
constructor(_commandService: ICommandService, _formatPainterService: IFormatPainterService, _univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _selectionManagerService: SheetsSelectionsService, _sheetInterceptorService: SheetInterceptorService, _injector: Injector);
|
|
14
14
|
private _initialize;
|
|
15
|
-
private _commandExecutedListener;
|
|
16
15
|
private _addDefaultHook;
|
|
17
16
|
private _collectSelectionRangeFormat;
|
|
18
17
|
private _getUndoRedoMutationInfo;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Workbook, Disposable } from '@univerjs/core';
|
|
2
|
+
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
3
|
+
import { ISheetClipboardService } from '../../services/clipboard/clipboard.service';
|
|
4
|
+
import { SheetSkeletonManagerService } from '../../services/sheet-skeleton-manager.service';
|
|
5
|
+
import { SheetClipboardController } from '../clipboard/clipboard.controller';
|
|
6
|
+
export declare class ClipboardRenderController extends Disposable implements IRenderModule {
|
|
7
|
+
private readonly _context;
|
|
8
|
+
private readonly _sheetSkeletonManagerService;
|
|
9
|
+
private readonly _sheetClipboardService;
|
|
10
|
+
private readonly _sheetClipboardController;
|
|
11
|
+
constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _sheetClipboardService: ISheetClipboardService, _sheetClipboardController: SheetClipboardController);
|
|
12
|
+
private _initialize;
|
|
13
|
+
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { Workbook, Disposable } from '@univerjs/core';
|
|
1
|
+
import { Workbook, Disposable, ICommandService } from '@univerjs/core';
|
|
2
2
|
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
3
3
|
import { IFormatPainterService } from '../../services/format-painter/format-painter.service';
|
|
4
|
+
import { ISheetSelectionRenderService } from '../../services/selection/base-selection-render.service';
|
|
4
5
|
export declare class FormatPainterRenderController extends Disposable implements IRenderModule {
|
|
5
6
|
private readonly _context;
|
|
6
7
|
private readonly _formatPainterService;
|
|
7
|
-
|
|
8
|
+
private readonly _selectionRenderService;
|
|
9
|
+
private readonly _commandService;
|
|
10
|
+
constructor(_context: IRenderContext<Workbook>, _formatPainterService: IFormatPainterService, _selectionRenderService: ISheetSelectionRenderService, _commandService: ICommandService);
|
|
8
11
|
private _initialize;
|
|
12
|
+
private _commandExecutedListener;
|
|
9
13
|
private _bindFormatPainterStatus;
|
|
10
14
|
}
|
|
@@ -17,6 +17,7 @@ export declare class SheetsScrollRenderController extends Disposable implements
|
|
|
17
17
|
private _wheelEventListener;
|
|
18
18
|
private _scrollBarEventListener;
|
|
19
19
|
private _initSkeletonListener;
|
|
20
|
+
_updateViewportScroll(viewportScrollX?: number, viewportScrollY?: number): void;
|
|
20
21
|
scrollToRange(range: IRange, forceTop?: boolean, forceLeft?: boolean): boolean;
|
|
21
22
|
/**
|
|
22
23
|
* Scroll spreadsheet(viewMain) to cell position. Based on the limitations of viewport and the number of rows and columns, you can only scroll to the maximum scrollable range.
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Workbook, Disposable } from '@univerjs/core';
|
|
2
|
-
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
2
|
+
import { IRenderContext, IRenderModule, IRenderManagerService } from '@univerjs/engine-render';
|
|
3
3
|
import { SheetSkeletonManagerService } from '../../services/sheet-skeleton-manager.service';
|
|
4
4
|
export declare class SheetSkeletonRenderController extends Disposable implements IRenderModule {
|
|
5
5
|
private readonly _context;
|
|
6
6
|
private readonly _sheetSkeletonManagerService;
|
|
7
|
-
|
|
7
|
+
private readonly _renderManagerService;
|
|
8
|
+
constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _renderManagerService: IRenderManagerService);
|
|
9
|
+
private _updateSceneSize;
|
|
8
10
|
}
|
|
@@ -17,7 +17,7 @@ export declare class SheetsZoomRenderController extends Disposable implements IR
|
|
|
17
17
|
private _zoom;
|
|
18
18
|
private _initSkeletonListener;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Triggered when zoom and switch sheet.
|
|
21
21
|
* @param zoomRatio
|
|
22
22
|
*/
|
|
23
23
|
private _updateViewZoom;
|
|
@@ -53,10 +53,7 @@ export interface IFUniverSheetsUIMixin {
|
|
|
53
53
|
}
|
|
54
54
|
export declare class FUniverSheetsUIMixin extends FUniver implements IFUniverSheetsUIMixin {
|
|
55
55
|
private _initSheetUIEvent;
|
|
56
|
-
|
|
57
|
-
* @ignore
|
|
58
|
-
*/
|
|
59
|
-
_initObserverListener(injector: Injector): void;
|
|
56
|
+
private _initObserverListener;
|
|
60
57
|
/**
|
|
61
58
|
* @ignore
|
|
62
59
|
*/
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2023-present DreamNum
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -32,7 +32,7 @@ export { SheetUIController } from './controllers/sheet-ui.controller';
|
|
|
32
32
|
export { whenFormulaEditorActivated, whenSheetEditorFocused } from './controllers/shortcuts/utils';
|
|
33
33
|
export { getCoordByCell, getCoordByOffset, getSheetObject, getTransformCoord, } from './controllers/utils/component-tools';
|
|
34
34
|
export { matchedSelectionByRowColIndex as checkInHeaderRanges } from './controllers/utils/selections-tools';
|
|
35
|
-
export { useHighlightRange } from './hooks/
|
|
35
|
+
export { useHighlightRange } from './hooks/use-highlight-range';
|
|
36
36
|
export { UniverSheetsMobileUIPlugin } from './mobile-plugin';
|
|
37
37
|
export { UniverSheetsUIPlugin } from './plugin';
|
|
38
38
|
export { AutoFillService, IAutoFillService } from './services/auto-fill/auto-fill.service';
|
|
@@ -84,8 +84,8 @@ export { type IUniverSheetsUIConfig } from './controllers/config.schema';
|
|
|
84
84
|
export { getCellRealRange } from './common/utils';
|
|
85
85
|
export { FONT_FAMILY_COMPONENT, FONT_FAMILY_ITEM_COMPONENT } from './components/font-family/interface';
|
|
86
86
|
export { FONT_SIZE_COMPONENT } from './components/font-size/interface';
|
|
87
|
-
export { EMBEDDING_FORMULA_EDITOR, isEmbeddingFormulaEditor } from './controllers/editor/utils/
|
|
88
|
-
export { isRangeSelector, RANGE_SELECTOR_SYMBOLS } from './controllers/editor/utils/
|
|
87
|
+
export { EMBEDDING_FORMULA_EDITOR, isEmbeddingFormulaEditor } from './controllers/editor/utils/is-embedding-formula-editor';
|
|
88
|
+
export { isRangeSelector, RANGE_SELECTOR_SYMBOLS } from './controllers/editor/utils/is-range-selector';
|
|
89
89
|
export { menuSchema as SheetsUIMenuSchema } from './controllers/menu.schema';
|
|
90
90
|
export { SheetCellEditorResizeService } from './services/editor/cell-editor-resize.service';
|
|
91
91
|
export { FormatPainterStatus, IFormatPainterService } from './services/format-painter/format-painter.service';
|
|
@@ -26,7 +26,9 @@ interface ICopyContent {
|
|
|
26
26
|
export interface ISheetClipboardService {
|
|
27
27
|
showMenu$: Observable<boolean>;
|
|
28
28
|
setShowMenu: (show: boolean) => void;
|
|
29
|
+
getPasteMenuVisible: () => boolean;
|
|
29
30
|
pasteOptionsCache$: Observable<IPasteOptionCache | null>;
|
|
31
|
+
getPasteOptionsCache: () => IPasteOptionCache | null;
|
|
30
32
|
updatePasteOptionsCache(cache: IPasteOptionCache | null): void;
|
|
31
33
|
copy(): Promise<boolean>;
|
|
32
34
|
cut(): Promise<boolean>;
|
|
@@ -69,6 +71,8 @@ export declare class SheetClipboardService extends Disposable implements ISheetC
|
|
|
69
71
|
readonly showMenu$: Observable<boolean>;
|
|
70
72
|
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);
|
|
71
73
|
setShowMenu(show: boolean): void;
|
|
74
|
+
getPasteMenuVisible(): boolean;
|
|
75
|
+
getPasteOptionsCache(): IPasteOptionCache | null;
|
|
72
76
|
copyContentCache(): CopyContentCache;
|
|
73
77
|
generateCopyContent(workbookId: string, worksheetId: string, range: IRange): Nullable<ICopyContent>;
|
|
74
78
|
copy(copyType?: COPY_TYPE): Promise<boolean>;
|
|
@@ -50,7 +50,11 @@ export interface IEditorBridgeService {
|
|
|
50
50
|
getEditCellState(): Readonly<Nullable<IEditorBridgeServiceParam>>;
|
|
51
51
|
getEditCellLayout(): Readonly<Nullable<ICellEditorLayout>>;
|
|
52
52
|
getEditLocation(): Readonly<Nullable<ICellEditorState>>;
|
|
53
|
+
updateEditLocation(row: number, col: number): void;
|
|
53
54
|
getLatestEditCellState(): Readonly<Nullable<IEditorBridgeServiceParam>>;
|
|
55
|
+
/**
|
|
56
|
+
* @deprecated do not use it directly, use command SetCellEditVisibleOperation as instead.
|
|
57
|
+
*/
|
|
54
58
|
changeVisible(param: IEditorBridgeServiceVisibleParam): void;
|
|
55
59
|
changeEditorDirty(dirtyStatus: boolean): void;
|
|
56
60
|
getEditorDirty(): boolean;
|
|
@@ -109,6 +113,7 @@ export declare class EditorBridgeService extends Disposable implements IEditorBr
|
|
|
109
113
|
getEditCellState(): Readonly<Nullable<IEditorBridgeServiceParam>>;
|
|
110
114
|
getEditCellLayout(): Readonly<Nullable<ICellEditorLayout>>;
|
|
111
115
|
getEditLocation(): Readonly<Nullable<ICellEditorState>>;
|
|
116
|
+
updateEditLocation(row: number, column: number): void;
|
|
112
117
|
getLatestEditCellState(): {
|
|
113
118
|
position: {
|
|
114
119
|
startX: number;
|
|
@@ -55,7 +55,7 @@ export declare class SheetScrollManagerService implements IRenderModule {
|
|
|
55
55
|
private readonly _context;
|
|
56
56
|
private readonly _sheetSkeletonManagerService;
|
|
57
57
|
/**
|
|
58
|
-
* a map holds all scroll info for each sheet
|
|
58
|
+
* a map holds all scroll info for each sheet(valid value)
|
|
59
59
|
*/
|
|
60
60
|
private readonly _scrollStateMap;
|
|
61
61
|
/**
|
|
@@ -80,27 +80,32 @@ export declare class SheetScrollManagerService implements IRenderModule {
|
|
|
80
80
|
private _searchParamForScroll;
|
|
81
81
|
constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService);
|
|
82
82
|
dispose(): void;
|
|
83
|
+
calcViewportScrollFromRowColOffset(scrollInfo: Nullable<IViewportScrollState>): {
|
|
84
|
+
viewportScrollX: number;
|
|
85
|
+
viewportScrollY: number;
|
|
86
|
+
};
|
|
83
87
|
setSearchParam(param: IScrollStateSearchParam): void;
|
|
84
|
-
|
|
85
|
-
getScrollStateByParam(param: IScrollStateSearchParam): Readonly<IScrollState>;
|
|
88
|
+
getScrollStateByParam(param: IScrollStateSearchParam): Readonly<Nullable<IScrollState>>;
|
|
86
89
|
getCurrentScrollState(): Readonly<IScrollState>;
|
|
90
|
+
setValidScrollState(param: IScrollStateWithSearchParam): void;
|
|
87
91
|
/**
|
|
88
|
-
*
|
|
92
|
+
* emit raw scrollInfo by SetScrollOperation, call by ScrollCommand.id.
|
|
93
|
+
* raw scrollInfo means not handled by limit scroll method.
|
|
89
94
|
* @param param
|
|
90
95
|
*/
|
|
91
|
-
|
|
96
|
+
emitRawScrollParam(param: IScrollStateWithSearchParam): void;
|
|
92
97
|
/**
|
|
93
|
-
* Set _scrollStateMap
|
|
98
|
+
* Set _scrollStateMap
|
|
94
99
|
* @param scroll
|
|
95
100
|
*/
|
|
96
|
-
|
|
101
|
+
setValidScrollStateToCurrSheet(scroll: IViewportScrollState): void;
|
|
97
102
|
clear(): void;
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
103
|
+
/**
|
|
104
|
+
* scroll
|
|
105
|
+
* @param scrollInfo
|
|
106
|
+
*/
|
|
102
107
|
private _setScrollState;
|
|
103
108
|
private _clearByParamAndNotify;
|
|
104
109
|
private _getCurrentScroll;
|
|
105
|
-
private
|
|
110
|
+
private _emitRawScroll;
|
|
106
111
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IRange, IRangeWithCoord, Nullable, Workbook, Disposable, Injector } from '@univerjs/core';
|
|
2
2
|
import { IRender, IRenderContext, IRenderModule, SpreadsheetSkeleton } from '@univerjs/engine-render';
|
|
3
|
+
import { SheetSkeletonService } from '@univerjs/sheets';
|
|
3
4
|
export interface ISheetSkeletonManagerParam {
|
|
4
5
|
unitId: string;
|
|
5
6
|
sheetId: string;
|
|
@@ -12,20 +13,14 @@ export interface ISheetSkeletonManagerSearch {
|
|
|
12
13
|
commandId?: string;
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* Each time there is a content change, it will trigger the viewModel of the render to recalculate.
|
|
18
|
-
*
|
|
19
|
-
* Each application and sub-table has its own viewModel (skeleton).
|
|
20
|
-
*
|
|
21
|
-
* The viewModel is also a temporary storage variable, which does not need to be persisted,
|
|
22
|
-
* so it is managed uniformly through the service.
|
|
16
|
+
* SheetSkeletonManagerService is registered in a render unit
|
|
23
17
|
*/
|
|
24
18
|
export declare class SheetSkeletonManagerService extends Disposable implements IRenderModule {
|
|
25
19
|
private readonly _context;
|
|
26
20
|
private readonly _injector;
|
|
27
|
-
private
|
|
28
|
-
private
|
|
21
|
+
private readonly _sheetSkService;
|
|
22
|
+
private _sheetId;
|
|
23
|
+
private _sheetSkeletonParamStore;
|
|
29
24
|
private readonly _currentSkeleton$;
|
|
30
25
|
readonly currentSkeleton$: import('rxjs').Observable<Nullable<ISheetSkeletonManagerParam>>;
|
|
31
26
|
/**
|
|
@@ -33,29 +28,57 @@ export declare class SheetSkeletonManagerService extends Disposable implements I
|
|
|
33
28
|
*/
|
|
34
29
|
private readonly _currentSkeletonBefore$;
|
|
35
30
|
readonly currentSkeletonBefore$: import('rxjs').Observable<Nullable<ISheetSkeletonManagerParam>>;
|
|
36
|
-
constructor(_context: IRenderContext<Workbook>, _injector: Injector);
|
|
31
|
+
constructor(_context: IRenderContext<Workbook>, _injector: Injector, _sheetSkService: SheetSkeletonService);
|
|
37
32
|
private _initRemoveSheet;
|
|
38
33
|
getCurrentSkeleton(): Nullable<SpreadsheetSkeleton>;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated use `getCurrentSkeleton` instead.
|
|
36
|
+
*/
|
|
39
37
|
getCurrent(): Nullable<ISheetSkeletonManagerParam>;
|
|
40
|
-
getWorksheetSkeleton(sheetId: string): Nullable<ISheetSkeletonManagerParam>;
|
|
41
38
|
/**
|
|
42
|
-
*
|
|
39
|
+
* get ISheetSkeletonManagerParam from _currentSkeletonSearchParam
|
|
40
|
+
* @returns
|
|
41
|
+
*/
|
|
42
|
+
getCurrentParam(): Nullable<ISheetSkeletonManagerParam>;
|
|
43
|
+
/**
|
|
44
|
+
* Get skeleton by sheetId
|
|
45
|
+
* @param sheetId
|
|
46
|
+
*/
|
|
47
|
+
getSkeleton(sheetId: string): Nullable<SpreadsheetSkeleton>;
|
|
48
|
+
/**
|
|
49
|
+
* Get SkeletonParam by sheetId
|
|
50
|
+
* @param sheetId
|
|
43
51
|
*/
|
|
52
|
+
getSkeletonParam(sheetId: string): Nullable<ISheetSkeletonManagerParam>;
|
|
53
|
+
/**
|
|
54
|
+
* @deprecated use `getSkeleton` instead.
|
|
55
|
+
*/
|
|
56
|
+
getWorksheetSkeleton(sheetId: string): Nullable<ISheetSkeletonManagerParam>;
|
|
44
57
|
getUnitSkeleton(unitId: string, sheetId: string): Nullable<ISheetSkeletonManagerParam>;
|
|
58
|
+
/**
|
|
59
|
+
* Command in COMMAND_LISTENER_SKELETON_CHANGE would cause setCurrent, see @packages/sheets-ui/src/controllers/render-controllers/sheet.render-controller.ts
|
|
60
|
+
* @param searchParam
|
|
61
|
+
*/
|
|
45
62
|
setCurrent(searchParam: ISheetSkeletonManagerSearch): Nullable<ISheetSkeletonManagerParam>;
|
|
63
|
+
setSkeletonParam(sheetId: string, skp: ISheetSkeletonManagerParam): void;
|
|
46
64
|
private _setCurrent;
|
|
47
|
-
reCalculate(): void;
|
|
48
|
-
private _reCalculate;
|
|
65
|
+
reCalculate(param?: Nullable<ISheetSkeletonManagerParam>): void;
|
|
49
66
|
/**
|
|
50
67
|
* Make param dirty, if param is dirty, then the skeleton will be makeDirty in _reCalculate()
|
|
51
68
|
* @param searchParm
|
|
52
69
|
* @param state
|
|
53
70
|
*/
|
|
54
71
|
makeDirty(searchParm: ISheetSkeletonManagerSearch, state?: boolean): void;
|
|
72
|
+
/**
|
|
73
|
+
* @deprecated Use function `ensureSkeleton` instead.
|
|
74
|
+
* @param searchParam
|
|
75
|
+
*/
|
|
55
76
|
getOrCreateSkeleton(searchParam: ISheetSkeletonManagerSearch): SpreadsheetSkeleton | undefined;
|
|
56
|
-
|
|
77
|
+
ensureSkeleton(sheetId: string): SpreadsheetSkeleton | undefined;
|
|
78
|
+
disposeSkeleton(sheetId: string): void;
|
|
57
79
|
/** @deprecated Use function `attachRangeWithCoord` instead. */
|
|
58
80
|
attachRangeWithCoord(range: IRange): Nullable<IRangeWithCoord>;
|
|
81
|
+
private _getSkeletonParam;
|
|
59
82
|
private _getSkeleton;
|
|
60
83
|
private _buildSkeleton;
|
|
61
84
|
setColumnHeaderSize(render: Nullable<IRender>, sheetId: string, size: number): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IDisposable, IContextService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
|
2
2
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
3
3
|
/**
|
|
4
|
-
* This controller is responsible for managing units of a specific kind (
|
|
4
|
+
* This controller is responsible for managing units of a specific kind (UniverSheet) to be rendered on the canvas.
|
|
5
5
|
*/
|
|
6
6
|
export declare class SheetsRenderService extends RxDisposable {
|
|
7
7
|
private readonly _contextService;
|