@univerjs/sheets-ui 0.5.3 → 0.5.4-nightly.202501131606
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 +34 -32
- package/lib/es/facade.js +493 -117
- package/lib/es/index.js +11397 -11599
- package/lib/index.css +1 -1
- package/lib/types/commands/commands/clipboard.command.d.ts +1 -0
- package/lib/types/commands/commands/set-selection.command.d.ts +5 -0
- package/lib/types/common/keys.d.ts +1 -0
- package/lib/types/components/hook.d.ts +2 -0
- package/lib/types/controllers/clipboard/clipboard.controller.d.ts +4 -2
- package/lib/types/controllers/clipboard/const.d.ts +16 -0
- package/lib/types/controllers/clipboard/utils.d.ts +63 -0
- package/lib/types/controllers/config.schema.d.ts +3 -0
- package/lib/types/controllers/editor/data-sync.controller.d.ts +3 -1
- package/lib/types/controllers/editor/editing.render-controller.d.ts +3 -4
- package/lib/types/controllers/editor/formula-editor.controller.d.ts +4 -2
- package/lib/types/controllers/force-string-alert-render.controller.d.ts +5 -1
- package/lib/types/controllers/permission/sheet-permission-check-ui.controller.d.ts +24 -0
- package/lib/types/controllers/permission/sheet-permission-interceptor-canvas-render.controller.d.ts +0 -1
- package/lib/types/controllers/permission/sheet-permission-interceptor-clipboard.controller.d.ts +3 -4
- package/lib/types/controllers/permission/sheet-permission-interceptor-formula-render.controller.d.ts +0 -1
- package/lib/types/controllers/render-controllers/scroll.render-controller.d.ts +7 -4
- package/lib/types/facade/f-event.d.ts +389 -0
- package/lib/types/facade/f-permission.d.ts +4 -1
- package/lib/types/facade/f-range.d.ts +48 -5
- package/lib/types/facade/f-sheet-hooks.d.ts +50 -12
- package/lib/types/facade/f-univer.d.ts +15 -16
- package/lib/types/facade/f-workbook.d.ts +43 -28
- package/lib/types/facade/f-worksheet.d.ts +24 -11
- package/lib/types/facade/index.d.ts +3 -1
- package/lib/types/index.d.ts +13 -14
- package/lib/types/services/canvas-pop-manager.service.d.ts +10 -5
- package/lib/types/services/clipboard/clipboard.service.d.ts +25 -10
- package/lib/types/services/clipboard/type.d.ts +18 -2
- package/lib/types/services/editor/cell-editor-resize.service.d.ts +3 -2
- package/lib/types/services/editor-bridge.service.d.ts +3 -1
- package/lib/types/services/hover-manager.service.d.ts +6 -0
- package/lib/types/services/scroll-manager.service.d.ts +10 -2
- package/lib/types/services/selection/base-selection-render.service.d.ts +6 -3
- package/lib/types/services/selection/selection-render.service.d.ts +4 -0
- package/lib/types/views/cell-alert/CellAlertPopup.d.ts +6 -1
- package/lib/types/views/clipboard/ClipboardPopupMenu.d.ts +2 -0
- package/lib/types/views/editor-container/hooks.d.ts +8 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +30 -28
- package/package.json +15 -14
- package/LICENSE +0 -176
- package/lib/types/controllers/permission/sheet-permission-init.controller.d.ts +0 -26
- package/lib/types/controllers/permission/sheet-permission-interceptor-base.controller.d.ts +0 -36
- package/lib/types/controllers/permission/sheet-permission-view-model.controller.d.ts +0 -11
|
@@ -1,36 +1,32 @@
|
|
|
1
1
|
import { IDisposable, Nullable } from '@univerjs/core';
|
|
2
|
-
import {
|
|
2
|
+
import { IMouseEvent, IPointerEvent } from '@univerjs/engine-render';
|
|
3
|
+
import { ICellPosWithEvent, IDragCellPosition, IHoverRichTextInfo, IHoverRichTextPosition, IScrollState } from '@univerjs/sheets-ui';
|
|
3
4
|
import { FWorkbook } from '@univerjs/sheets/facade';
|
|
4
5
|
import { IDialogPartMethodOptions, ISidebarMethodOptions } from '@univerjs/ui';
|
|
6
|
+
import { ICellEventParam, IFSheetsUIEventParamConfig } from './f-event';
|
|
5
7
|
export interface IFWorkbookSheetsUIMixin {
|
|
6
8
|
/**
|
|
7
9
|
* Open a sidebar.
|
|
8
|
-
*
|
|
9
10
|
* @deprecated
|
|
10
|
-
*
|
|
11
11
|
* @param params the sidebar options
|
|
12
12
|
* @returns the disposable object
|
|
13
13
|
*/
|
|
14
14
|
openSiderbar(params: ISidebarMethodOptions): IDisposable;
|
|
15
15
|
/**
|
|
16
16
|
* Open a dialog.
|
|
17
|
-
*
|
|
18
17
|
* @deprecated
|
|
19
|
-
*
|
|
20
18
|
* @param dialog the dialog options
|
|
21
19
|
* @returns the disposable object
|
|
22
20
|
*/
|
|
23
21
|
openDialog(dialog: IDialogPartMethodOptions): IDisposable;
|
|
24
22
|
/**
|
|
25
23
|
* Subscribe to cell click events
|
|
26
|
-
*
|
|
27
24
|
* @param callback - The callback function to be called when a cell is clicked
|
|
28
25
|
* @returns A disposable object that can be used to unsubscribe from the event
|
|
29
26
|
*/
|
|
30
27
|
onCellClick(callback: (cell: IHoverRichTextInfo) => void): IDisposable;
|
|
31
28
|
/**
|
|
32
29
|
* Subscribe cell hover events
|
|
33
|
-
*
|
|
34
30
|
* @param callback - The callback function to be called when a cell is hovered
|
|
35
31
|
* @returns A disposable object that can be used to unsubscribe from the event
|
|
36
32
|
*/
|
|
@@ -39,82 +35,101 @@ export interface IFWorkbookSheetsUIMixin {
|
|
|
39
35
|
* Subscribe to pointer move events on workbook. Just like onCellHover, but with event information.
|
|
40
36
|
* @param {function(ICellPosWithEvent): any} callback The callback function accept cell location and event.
|
|
41
37
|
*/
|
|
42
|
-
|
|
38
|
+
onCellPointerMove(callback: (cell: ICellPosWithEvent, event: IPointerEvent | IMouseEvent) => void): IDisposable;
|
|
43
39
|
/**
|
|
44
40
|
* Subscribe to cell pointer down events.
|
|
45
41
|
* @param {function(ICellPosWithEvent): any} callback The callback function accept cell location and event.
|
|
46
42
|
*/
|
|
47
|
-
onCellPointerDown(callback: (cell:
|
|
43
|
+
onCellPointerDown(callback: (cell: ICellPosWithEvent) => void): IDisposable;
|
|
48
44
|
/**
|
|
49
45
|
* Subscribe to cell pointer up events.
|
|
50
46
|
* @param {function(ICellPosWithEvent): any} callback The callback function accept cell location and event.
|
|
51
47
|
*/
|
|
52
|
-
onCellPointerUp(callback: (cell:
|
|
48
|
+
onCellPointerUp(callback: (cell: ICellPosWithEvent) => void): IDisposable;
|
|
49
|
+
onDragOver(callback: (cell: IDragCellPosition) => void): IDisposable;
|
|
50
|
+
onDrop(callback: (cell: IDragCellPosition) => void): IDisposable;
|
|
53
51
|
/**
|
|
54
52
|
* Start the editing process
|
|
55
53
|
* @returns A boolean value
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* univerAPI.getActiveWorkbook().startEditing();
|
|
57
|
+
* ```
|
|
56
58
|
*/
|
|
57
59
|
startEditing(): boolean;
|
|
58
60
|
/**
|
|
59
61
|
* Use endEditingAsync as instead
|
|
60
62
|
* @deprecated
|
|
63
|
+
* End the editing process
|
|
64
|
+
* @async
|
|
65
|
+
* @param save - Whether to save the changes
|
|
66
|
+
* @returns A promise that resolves to a boolean value
|
|
67
|
+
* @example
|
|
68
|
+
* ``` ts
|
|
69
|
+
* univerAPI.getActiveWorkbook().endEditing(true);
|
|
70
|
+
* ```
|
|
61
71
|
*/
|
|
62
72
|
endEditing(save?: boolean): Promise<boolean>;
|
|
63
73
|
/**
|
|
64
74
|
* @async
|
|
65
|
-
* @param save - Whether to save the changes, default is true
|
|
66
|
-
* @returns A promise that resolves to a boolean value
|
|
67
|
-
* @param save
|
|
75
|
+
* @param {boolean} save - Whether to save the changes, default is true
|
|
76
|
+
* @returns {Promise<boolean>} A promise that resolves to a boolean value
|
|
68
77
|
*/
|
|
69
78
|
endEditingAsync(save?: boolean): Promise<boolean>;
|
|
70
79
|
getScrollStateBySheetId(sheetId: string): Nullable<IScrollState>;
|
|
71
80
|
/**
|
|
72
81
|
* Disable selection. After disabled, there would be no response for selection.
|
|
82
|
+
* @returns {FWorkbook} FWorkbook instance
|
|
73
83
|
* @example
|
|
74
|
-
* ```
|
|
84
|
+
* ```ts
|
|
75
85
|
* univerAPI.getActiveWorkbook().disableSelection();
|
|
76
86
|
* ```
|
|
77
87
|
*/
|
|
78
|
-
disableSelection():
|
|
88
|
+
disableSelection(): FWorkbook;
|
|
79
89
|
/**
|
|
80
90
|
* Enable selection. After this you can select range.
|
|
81
91
|
* @example
|
|
82
|
-
* ```
|
|
92
|
+
* ```ts
|
|
83
93
|
* univerAPI.getActiveWorkbook().enableSelection();
|
|
84
94
|
* ```
|
|
85
95
|
*/
|
|
86
|
-
enableSelection():
|
|
96
|
+
enableSelection(): FWorkbook;
|
|
87
97
|
/**
|
|
88
98
|
* Set selection invisible, Unlike disableSelection, selection still works, you just can not see them.
|
|
89
99
|
* @example
|
|
90
|
-
* ```
|
|
100
|
+
* ```ts
|
|
91
101
|
* univerAPI.getActiveWorkbook().transparentSelection();
|
|
92
102
|
* ```
|
|
93
103
|
*/
|
|
94
|
-
transparentSelection():
|
|
104
|
+
transparentSelection(): FWorkbook;
|
|
95
105
|
/**
|
|
96
106
|
* Set selection visible.
|
|
97
107
|
* @example
|
|
98
|
-
* ```
|
|
108
|
+
* ```ts
|
|
99
109
|
* univerAPI.getActiveWorkbook().showSelection();
|
|
100
110
|
* ```
|
|
101
111
|
*/
|
|
102
|
-
showSelection():
|
|
112
|
+
showSelection(): FWorkbook;
|
|
103
113
|
}
|
|
104
114
|
export declare class FWorkbookSheetsUIMixin extends FWorkbook implements IFWorkbookSheetsUIMixin {
|
|
105
115
|
openSiderbar(params: ISidebarMethodOptions): IDisposable;
|
|
106
116
|
openDialog(dialog: IDialogPartMethodOptions): IDisposable;
|
|
107
117
|
private _logDeprecation;
|
|
118
|
+
addUIEvent(event: keyof IFSheetsUIEventParamConfig, _callback: (params: IFSheetsUIEventParamConfig[typeof event]) => void): IDisposable;
|
|
119
|
+
generateCellParams(cell: IHoverRichTextPosition | ICellPosWithEvent): ICellEventParam;
|
|
108
120
|
onCellClick(callback: (cell: IHoverRichTextInfo) => void): IDisposable;
|
|
109
121
|
onCellHover(callback: (cell: IHoverRichTextPosition) => void): IDisposable;
|
|
110
|
-
onCellPointerDown(callback: (cell:
|
|
111
|
-
onCellPointerUp(callback: (cell:
|
|
112
|
-
|
|
122
|
+
onCellPointerDown(callback: (cell: ICellPosWithEvent) => void): IDisposable;
|
|
123
|
+
onCellPointerUp(callback: (cell: ICellPosWithEvent) => void): IDisposable;
|
|
124
|
+
onCellPointerMove(callback: (cell: ICellPosWithEvent, event: IPointerEvent | IMouseEvent) => void): IDisposable;
|
|
125
|
+
onDragOver(callback: (cell: IDragCellPosition) => void): IDisposable;
|
|
126
|
+
onDrop(callback: (cell: IDragCellPosition) => void): IDisposable;
|
|
113
127
|
startEditing(): boolean;
|
|
114
128
|
endEditing(save?: boolean): Promise<boolean>;
|
|
115
129
|
endEditingAsync(save?: boolean): Promise<boolean>;
|
|
116
130
|
/**
|
|
117
131
|
* Get scroll state of specified sheet.
|
|
132
|
+
* @param {string} sheetId - sheet id
|
|
118
133
|
* @returns {IScrollState} scroll state
|
|
119
134
|
* @example
|
|
120
135
|
* ``` ts
|
|
@@ -122,10 +137,10 @@ export declare class FWorkbookSheetsUIMixin extends FWorkbook implements IFWorkb
|
|
|
122
137
|
* ```
|
|
123
138
|
*/
|
|
124
139
|
getScrollStateBySheetId(sheetId: string): Nullable<IScrollState>;
|
|
125
|
-
disableSelection():
|
|
126
|
-
enableSelection():
|
|
127
|
-
transparentSelection():
|
|
128
|
-
showSelection():
|
|
140
|
+
disableSelection(): FWorkbook;
|
|
141
|
+
enableSelection(): FWorkbook;
|
|
142
|
+
transparentSelection(): FWorkbook;
|
|
143
|
+
showSelection(): FWorkbook;
|
|
129
144
|
}
|
|
130
145
|
declare module '@univerjs/sheets/facade' {
|
|
131
146
|
interface FWorkbook extends IFWorkbookSheetsUIMixin {
|
|
@@ -5,7 +5,7 @@ export interface IFWorksheetSkeletonMixin {
|
|
|
5
5
|
/**
|
|
6
6
|
* Refresh the canvas.
|
|
7
7
|
*/
|
|
8
|
-
refreshCanvas():
|
|
8
|
+
refreshCanvas(): FWorksheet;
|
|
9
9
|
/**
|
|
10
10
|
* Set zoom ratio of the worksheet.
|
|
11
11
|
* @param {number} zoomRatio The zoom ratio to set.It should be in the range of 10 to 400.
|
|
@@ -34,15 +34,27 @@ export interface IFWorksheetSkeletonMixin {
|
|
|
34
34
|
getZoom(): number;
|
|
35
35
|
/**
|
|
36
36
|
* Return visible range, sum view range of 4 viewports.
|
|
37
|
-
* @returns IRange
|
|
37
|
+
* @returns {IRange} - visible range
|
|
38
|
+
* @example
|
|
39
|
+
* ``` ts
|
|
40
|
+
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
41
|
+
* const fWorksheet = fWorkbook.getActiveSheet();
|
|
42
|
+
* const visibleRange = fWorksheet.getVisibleRange();
|
|
43
|
+
* ```
|
|
38
44
|
*/
|
|
39
45
|
getVisibleRange(): IRange;
|
|
40
46
|
/**
|
|
41
|
-
* Scroll spreadsheet to cell position.
|
|
42
|
-
*
|
|
43
|
-
* @param
|
|
47
|
+
* Scroll spreadsheet(viewMain) to cell position. Make the cell at topleft of current viewport.
|
|
48
|
+
* Based on the limitations of viewport and the number of rows and columns, you can only scroll to the maximum scrollable range.
|
|
49
|
+
* @param {number} row - Cell row index
|
|
50
|
+
* @param {number} column - Cell column index
|
|
51
|
+
* @returns {FWorksheet} - Current worksheet
|
|
52
|
+
* @example
|
|
53
|
+
* ``` ts
|
|
54
|
+
* univerAPI.getActiveWorkbook().getActiveSheet().scrollToCell(1, 1);
|
|
55
|
+
* ```
|
|
44
56
|
*/
|
|
45
|
-
scrollToCell(row: number, column: number):
|
|
57
|
+
scrollToCell(row: number, column: number): FWorksheet;
|
|
46
58
|
/**
|
|
47
59
|
* Get scroll state of current sheet.
|
|
48
60
|
* @returns {IScrollState} curr scroll state
|
|
@@ -51,10 +63,11 @@ export interface IFWorksheetSkeletonMixin {
|
|
|
51
63
|
* univerAPI.getActiveWorkbook().getActiveSheet().getScrollState()
|
|
52
64
|
* ```
|
|
53
65
|
*/
|
|
54
|
-
getScrollState():
|
|
66
|
+
getScrollState(): IScrollState;
|
|
55
67
|
/**
|
|
56
68
|
* Invoked when scrolling the sheet.
|
|
57
|
-
* @param {function(
|
|
69
|
+
* @param {function(Nullable<IViewportScrollState>): void} callback The scrolling callback function.
|
|
70
|
+
* @returns {IDisposable} The disposable object to remove the event listener.
|
|
58
71
|
* @example
|
|
59
72
|
* ``` ts
|
|
60
73
|
* univerAPI.getActiveWorkbook().getActiveSheet().onScroll((params) => {...})
|
|
@@ -63,12 +76,12 @@ export interface IFWorksheetSkeletonMixin {
|
|
|
63
76
|
onScroll(callback: (params: Nullable<IViewportScrollState>) => void): IDisposable;
|
|
64
77
|
}
|
|
65
78
|
export declare class FWorksheetSkeletonMixin extends FWorksheet implements IFWorksheetSkeletonMixin {
|
|
66
|
-
refreshCanvas():
|
|
79
|
+
refreshCanvas(): FWorksheet;
|
|
67
80
|
zoom(zoomRatio: number): FWorksheet;
|
|
68
81
|
getZoom(): number;
|
|
69
82
|
getVisibleRange(): IRange;
|
|
70
|
-
scrollToCell(row: number, column: number):
|
|
71
|
-
getScrollState():
|
|
83
|
+
scrollToCell(row: number, column: number): FWorksheet;
|
|
84
|
+
getScrollState(): IScrollState;
|
|
72
85
|
onScroll(callback: (params: Nullable<IViewportScrollState>) => void): IDisposable;
|
|
73
86
|
}
|
|
74
87
|
declare module '@univerjs/sheets/facade' {
|
|
@@ -18,8 +18,10 @@ import './f-workbook';
|
|
|
18
18
|
import './f-worksheet';
|
|
19
19
|
import './f-permission';
|
|
20
20
|
import './f-sheet-hooks';
|
|
21
|
-
|
|
21
|
+
import './f-event';
|
|
22
|
+
export type * from './f-event';
|
|
22
23
|
export type * from './f-permission';
|
|
24
|
+
export { type IFComponentKey, transformComponentKey } from './f-range';
|
|
23
25
|
export type * from './f-sheet-hooks';
|
|
24
26
|
export type * from './f-univer';
|
|
25
27
|
export type * from './f-workbook';
|
package/lib/types/index.d.ts
CHANGED
|
@@ -15,23 +15,14 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import './global.css';
|
|
17
17
|
export { getEditorObject } from './basics/editor/get-editor-object';
|
|
18
|
-
export { EMBEDDING_FORMULA_EDITOR_COMPONENT_KEY, RANGE_SELECTOR_COMPONENT_KEY, SHEET_VIEW_KEY } from './common/keys';
|
|
19
18
|
export { useActiveWorkbook, useActiveWorksheet, useWorkbooks } from './components/hook';
|
|
20
19
|
export { SHEET_UI_PLUGIN_NAME } from './consts/plugin-name';
|
|
21
20
|
export { SheetsUIPart } from './consts/ui-name';
|
|
22
21
|
export { AutoFillController } from './controllers/auto-fill.controller';
|
|
23
|
-
export { AFFECT_LAYOUT_STYLES, AutoHeightController } from './controllers/auto-height.controller';
|
|
24
|
-
export { AutoWidthController } from './controllers/auto-width.controller';
|
|
25
22
|
export { CellCustomRenderController } from './controllers/cell-custom-render.controller';
|
|
26
|
-
export { type IUniverSheetsUIConfig } from './controllers/config.schema';
|
|
27
|
-
export { DragRenderController } from './controllers/drag-render.controller';
|
|
28
23
|
export { EditingRenderController } from './controllers/editor/editing.render-controller';
|
|
29
|
-
export { FormulaEditorController } from './controllers/editor/formula-editor.controller';
|
|
30
|
-
export { HoverRenderController } from './controllers/hover-render.controller';
|
|
31
24
|
export { PASTE_SPECIAL_MENU_ID, SheetMenuPosition } from './controllers/menu/menu';
|
|
32
25
|
export { deriveStateFromActiveSheet$, getCurrentExclusiveRangeInterest$, getCurrentRangeDisable$, getObservableWithExclusiveRange$ } from './controllers/menu/menu-util';
|
|
33
|
-
export { SheetPermissionInitController } from './controllers/permission/sheet-permission-init.controller';
|
|
34
|
-
export { SheetPermissionInterceptorBaseController } from './controllers/permission/sheet-permission-interceptor-base.controller';
|
|
35
26
|
export { HeaderFreezeRenderController } from './controllers/render-controllers/freeze.render-controller';
|
|
36
27
|
export { HeaderMoveRenderController } from './controllers/render-controllers/header-move.render-controller';
|
|
37
28
|
export { HeaderResizeRenderController } from './controllers/render-controllers/header-resize.render-controller';
|
|
@@ -39,10 +30,7 @@ export { SheetsScrollRenderController } from './controllers/render-controllers/s
|
|
|
39
30
|
export { SheetRenderController } from './controllers/render-controllers/sheet.render-controller';
|
|
40
31
|
export { SheetUIController } from './controllers/sheet-ui.controller';
|
|
41
32
|
export { whenFormulaEditorActivated, whenSheetEditorFocused } from './controllers/shortcuts/utils';
|
|
42
|
-
export { StatusBarController } from './controllers/status-bar.controller';
|
|
43
33
|
export { getCoordByCell, getCoordByOffset, getSheetObject, getTransformCoord, } from './controllers/utils/component-tools';
|
|
44
|
-
export { discreteRangeToRange, rangeToDiscreteRange, virtualizeDiscreteRanges } from './controllers/utils/range-tools';
|
|
45
|
-
export type { IDiscreteRange } from './controllers/utils/range-tools';
|
|
46
34
|
export { matchedSelectionByRowColIndex as checkInHeaderRanges } from './controllers/utils/selections-tools';
|
|
47
35
|
export { useHighlightRange } from './hooks/useHighlightRange';
|
|
48
36
|
export { UniverSheetsMobileUIPlugin } from './mobile-plugin';
|
|
@@ -55,7 +43,7 @@ export { type ICanvasPopup, SheetCanvasPopManagerService } from './services/canv
|
|
|
55
43
|
export { CellAlertManagerService, CellAlertType, type ICellAlert } from './services/cell-alert-manager.service';
|
|
56
44
|
export { getMatrixPlainText, ISheetClipboardService, PREDEFINED_HOOK_NAME, SheetClipboardService, } from './services/clipboard/clipboard.service';
|
|
57
45
|
export { COPY_TYPE } from './services/clipboard/type';
|
|
58
|
-
export type { ICellDataWithSpanInfo, ICopyPastePayload, ISheetClipboardHook, ISheetDiscreteRangeLocation } from './services/clipboard/type';
|
|
46
|
+
export type { ICellDataWithSpanInfo, ICopyPastePayload, IPasteHookValueType, ISheetClipboardHook, ISheetDiscreteRangeLocation } from './services/clipboard/type';
|
|
59
47
|
export { getRepeatRange, mergeSetRangeValues } from './services/clipboard/utils';
|
|
60
48
|
export { DragManagerService, type IDragCellPosition } from './services/drag-manager.service';
|
|
61
49
|
export { EditorBridgeService, IEditorBridgeService, type IEditorBridgeServiceVisibleParam, } from './services/editor-bridge.service';
|
|
@@ -65,6 +53,16 @@ export { IFormulaEditorManagerService } from './services/editor/formula-editor-m
|
|
|
65
53
|
export { HoverManagerService } from './services/hover-manager.service';
|
|
66
54
|
export type { ICellPosWithEvent, IHoverCellPosition, IHoverRichTextInfo, IHoverRichTextPosition } from './services/hover-manager.service';
|
|
67
55
|
export { IMarkSelectionService, MarkSelectionService } from './services/mark-selection/mark-selection.service';
|
|
56
|
+
export { HoverRenderController } from './controllers/hover-render.controller';
|
|
57
|
+
export { DragRenderController } from './controllers/drag-render.controller';
|
|
58
|
+
export { EMBEDDING_FORMULA_EDITOR_COMPONENT_KEY, RANGE_SELECTOR_COMPONENT_KEY, SHEET_VIEW_KEY } from './common/keys';
|
|
59
|
+
export type { IDiscreteRange } from './controllers/utils/range-tools';
|
|
60
|
+
export { discreteRangeToRange, rangeToDiscreteRange, virtualizeDiscreteRanges } from './controllers/utils/range-tools';
|
|
61
|
+
export { AFFECT_LAYOUT_STYLES, AutoHeightController } from './controllers/auto-height.controller';
|
|
62
|
+
export { AutoWidthController } from './controllers/auto-width.controller';
|
|
63
|
+
export { FormulaEditorController } from './controllers/editor/formula-editor.controller';
|
|
64
|
+
export { StatusBarController } from './controllers/status-bar.controller';
|
|
65
|
+
export { SheetPermissionCheckUIController } from './controllers/permission/sheet-permission-check-ui.controller';
|
|
68
66
|
export { SheetPermissionUserManagerService } from './services/permission/sheet-permission-user-list.service';
|
|
69
67
|
export { SheetPrintInterceptorService } from './services/print-interceptor.service';
|
|
70
68
|
export { SheetScrollManagerService } from './services/scroll-manager.service';
|
|
@@ -82,6 +80,7 @@ export { MobileSheetBar } from './views/mobile/sheet-bar/MobileSheetBar';
|
|
|
82
80
|
export type { IRangeProtectionRenderCellData } from './views/permission/extensions/range-protection.render';
|
|
83
81
|
export { SheetBar } from './views/sheet-bar/SheetBar';
|
|
84
82
|
export { RenderSheetContent, RenderSheetFooter, RenderSheetHeader } from './views/sheet-container/SheetContainer';
|
|
83
|
+
export { type IUniverSheetsUIConfig } from './controllers/config.schema';
|
|
85
84
|
export { getCellRealRange } from './common/utils';
|
|
86
85
|
export { FONT_FAMILY_COMPONENT, FONT_FAMILY_ITEM_COMPONENT } from './components/font-family/interface';
|
|
87
86
|
export { FONT_SIZE_COMPONENT } from './components/font-size/interface';
|
|
@@ -94,7 +93,7 @@ export type { IFormatPainterBeforeApplyHookParams, IFormatPainterHook } from './
|
|
|
94
93
|
export { SELECTION_SHAPE_DEPTH } from './services/selection/const';
|
|
95
94
|
export { type IBaseSheetBarProps } from './views/sheet-bar/sheet-bar-tabs/SheetBarItem';
|
|
96
95
|
export { AutoClearContentCommand, AutoFillCommand } from './commands/commands/auto-fill.command';
|
|
97
|
-
export { type ISheetPasteParams, SheetCopyCommand, SheetCutCommand, SheetPasteBesidesBorderCommand, SheetPasteColWidthCommand, SheetPasteCommand, SheetPasteFormatCommand, SheetPasteShortKeyCommand, SheetPasteValueCommand, } from './commands/commands/clipboard.command';
|
|
96
|
+
export { type ISheetPasteByShortKeyParams, type ISheetPasteParams, SheetCopyCommand, SheetCutCommand, SheetPasteBesidesBorderCommand, SheetPasteColWidthCommand, SheetPasteCommand, SheetPasteFormatCommand, SheetPasteShortKeyCommand, SheetPasteValueCommand, } from './commands/commands/clipboard.command';
|
|
98
97
|
export { DeleteRangeMoveLeftConfirmCommand } from './commands/commands/delete-range-move-left-confirm.command';
|
|
99
98
|
export { DeleteRangeMoveUpConfirmCommand } from './commands/commands/delete-range-move-up-confirm.command';
|
|
100
99
|
export { HideColConfirmCommand, HideRowConfirmCommand } from './commands/commands/hide-row-col-confirm.command';
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { DrawingTypeEnum, ICommandInfo, INeedCheckDisposable, Nullable, Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
|
2
2
|
import { BaseObject, IBoundRectNoAngle, Viewport, IRenderManagerService } from '@univerjs/engine-render';
|
|
3
|
-
import { ISheetLocationBase, RefRangeService } from '@univerjs/sheets';
|
|
3
|
+
import { ISheetLocationBase, RefRangeService, SheetsSelectionsService } from '@univerjs/sheets';
|
|
4
4
|
import { IPopup, ICanvasPopupService } from '@univerjs/ui';
|
|
5
|
+
import { ISheetSelectionRenderService } from './selection/base-selection-render.service';
|
|
5
6
|
export interface ICanvasPopup extends Omit<IPopup, 'anchorRect' | 'anchorRect$' | 'unitId' | 'subUnitId' | 'canvasElement'> {
|
|
6
7
|
mask?: boolean;
|
|
7
8
|
extraProps?: Record<string, unknown>;
|
|
9
|
+
showOnSelectionMoving?: boolean;
|
|
8
10
|
}
|
|
9
11
|
interface IPopupMenuItem {
|
|
10
12
|
label: string;
|
|
@@ -20,8 +22,12 @@ export declare class SheetCanvasPopManagerService extends Disposable {
|
|
|
20
22
|
private readonly _univerInstanceService;
|
|
21
23
|
private readonly _refRangeService;
|
|
22
24
|
private readonly _commandService;
|
|
25
|
+
private readonly _refSelectionsService;
|
|
26
|
+
private readonly _selectionManagerService;
|
|
23
27
|
private _popupMenuFeatureMap;
|
|
24
|
-
constructor(_globalPopupManagerService: ICanvasPopupService, _renderManagerService: IRenderManagerService, _univerInstanceService: IUniverInstanceService, _refRangeService: RefRangeService, _commandService: ICommandService);
|
|
28
|
+
constructor(_globalPopupManagerService: ICanvasPopupService, _renderManagerService: IRenderManagerService, _univerInstanceService: IUniverInstanceService, _refRangeService: RefRangeService, _commandService: ICommandService, _refSelectionsService: ISheetSelectionRenderService, _selectionManagerService: SheetsSelectionsService);
|
|
29
|
+
private _isSelectionMoving;
|
|
30
|
+
private _initMoving;
|
|
25
31
|
/**
|
|
26
32
|
* Register a feature menu callback for a specific drawing type.such as image, chart, etc.
|
|
27
33
|
*/
|
|
@@ -49,7 +55,7 @@ export declare class SheetCanvasPopManagerService extends Disposable {
|
|
|
49
55
|
attachPopupToAbsolutePosition(bound: IBoundRectNoAngle, popup: ICanvasPopup, _unitId?: string, _subUnitId?: string): {
|
|
50
56
|
dispose: () => void;
|
|
51
57
|
canDispose: () => boolean;
|
|
52
|
-
} | null;
|
|
58
|
+
} | null | undefined;
|
|
53
59
|
/**
|
|
54
60
|
*
|
|
55
61
|
* @param row
|
|
@@ -58,10 +64,9 @@ export declare class SheetCanvasPopManagerService extends Disposable {
|
|
|
58
64
|
* @param _unitId
|
|
59
65
|
* @param _subUnitId
|
|
60
66
|
* @param viewport
|
|
61
|
-
* @param showOnSelectionMoving
|
|
62
67
|
* @returns
|
|
63
68
|
*/
|
|
64
|
-
attachPopupToCell(row: number, col: number, popup: ICanvasPopup, _unitId?: string, _subUnitId?: string, viewport?: Viewport
|
|
69
|
+
attachPopupToCell(row: number, col: number, popup: ICanvasPopup, _unitId?: string, _subUnitId?: string, viewport?: Viewport): Nullable<INeedCheckDisposable>;
|
|
65
70
|
private _createCellPositionObserver;
|
|
66
71
|
private _calcCellPositionByCell;
|
|
67
72
|
}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { ICellDataWithSpanAndDisplay, IDisposable, IRange, Nullable, Disposable, ErrorService, ICommandService, ILogService, Injector, IUndoRedoService, IUniverInstanceService, LocaleService, ObjectMatrix, ThemeService } from '@univerjs/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
2
3
|
import { IDiscreteRange } from '../../controllers/utils/range-tools';
|
|
3
|
-
import { ISheetClipboardHook, COPY_TYPE } from './type';
|
|
4
|
+
import { IPasteHookKeyType, IPasteOptionCache, ISheetClipboardHook, COPY_TYPE } from './type';
|
|
4
5
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
5
6
|
import { SheetsSelectionsService } from '@univerjs/sheets';
|
|
6
7
|
import { IClipboardInterfaceService, INotificationService, IPlatformService } from '@univerjs/ui';
|
|
7
8
|
import { IMarkSelectionService } from '../mark-selection/mark-selection.service';
|
|
8
9
|
import { CopyContentCache } from './copy-content-cache';
|
|
9
10
|
export declare const PREDEFINED_HOOK_NAME: {
|
|
10
|
-
DEFAULT_COPY:
|
|
11
|
-
DEFAULT_PASTE:
|
|
12
|
-
SPECIAL_PASTE_VALUE:
|
|
13
|
-
SPECIAL_PASTE_FORMAT:
|
|
14
|
-
SPECIAL_PASTE_COL_WIDTH:
|
|
15
|
-
SPECIAL_PASTE_BESIDES_BORDER:
|
|
16
|
-
SPECIAL_PASTE_FORMULA:
|
|
11
|
+
readonly DEFAULT_COPY: "default-copy";
|
|
12
|
+
readonly DEFAULT_PASTE: "default-paste";
|
|
13
|
+
readonly SPECIAL_PASTE_VALUE: "special-paste-value";
|
|
14
|
+
readonly SPECIAL_PASTE_FORMAT: "special-paste-format";
|
|
15
|
+
readonly SPECIAL_PASTE_COL_WIDTH: "special-paste-col-width";
|
|
16
|
+
readonly SPECIAL_PASTE_BESIDES_BORDER: "special-paste-besides-border";
|
|
17
|
+
readonly SPECIAL_PASTE_FORMULA: "special-paste-formula";
|
|
17
18
|
};
|
|
18
19
|
interface ICopyContent {
|
|
19
20
|
copyId: string;
|
|
@@ -23,10 +24,16 @@ interface ICopyContent {
|
|
|
23
24
|
discreteRange: IDiscreteRange;
|
|
24
25
|
}
|
|
25
26
|
export interface ISheetClipboardService {
|
|
27
|
+
showMenu$: Observable<boolean>;
|
|
28
|
+
setShowMenu: (show: boolean) => void;
|
|
29
|
+
pasteOptionsCache$: Observable<IPasteOptionCache | null>;
|
|
30
|
+
updatePasteOptionsCache(cache: IPasteOptionCache | null): void;
|
|
26
31
|
copy(): Promise<boolean>;
|
|
27
32
|
cut(): Promise<boolean>;
|
|
28
33
|
paste(item: ClipboardItem, pasteType?: string): Promise<boolean>;
|
|
29
34
|
legacyPaste(html?: string, text?: string): Promise<boolean>;
|
|
35
|
+
rePasteWithPasteType(type: IPasteHookKeyType): boolean;
|
|
36
|
+
disposePasteOptionsCache(): void;
|
|
30
37
|
generateCopyContent(workbookId: string, worksheetId: string, range: IRange): Nullable<ICopyContent>;
|
|
31
38
|
copyContentCache(): CopyContentCache;
|
|
32
39
|
addClipboardHook(hook: ISheetClipboardHook): IDisposable;
|
|
@@ -51,18 +58,25 @@ export declare class SheetClipboardService extends Disposable implements ISheetC
|
|
|
51
58
|
private readonly _injector;
|
|
52
59
|
private _clipboardHooks;
|
|
53
60
|
private readonly _clipboardHooks$;
|
|
54
|
-
readonly clipboardHooks$:
|
|
61
|
+
readonly clipboardHooks$: Observable<ISheetClipboardHook[]>;
|
|
55
62
|
private _htmlToUSM;
|
|
56
63
|
private _usmToHtml;
|
|
57
64
|
private _copyContentCache;
|
|
58
65
|
private _copyMarkId;
|
|
66
|
+
private _pasteOptionsCache$;
|
|
67
|
+
readonly pasteOptionsCache$: Observable<IPasteOptionCache | null>;
|
|
68
|
+
private readonly _showMenu$;
|
|
69
|
+
readonly showMenu$: Observable<boolean>;
|
|
59
70
|
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
|
+
setShowMenu(show: boolean): void;
|
|
60
72
|
copyContentCache(): CopyContentCache;
|
|
61
73
|
generateCopyContent(workbookId: string, worksheetId: string, range: IRange): Nullable<ICopyContent>;
|
|
62
74
|
copy(copyType?: COPY_TYPE): Promise<boolean>;
|
|
63
75
|
cut(): Promise<boolean>;
|
|
64
|
-
paste(item: ClipboardItem, pasteType?:
|
|
76
|
+
paste(item: ClipboardItem, pasteType?: "default-paste"): Promise<boolean>;
|
|
65
77
|
legacyPaste(html?: string, text?: string): Promise<boolean>;
|
|
78
|
+
rePasteWithPasteType(type: IPasteHookKeyType): boolean;
|
|
79
|
+
updatePasteOptionsCache(cache: IPasteOptionCache | null): void;
|
|
66
80
|
addClipboardHook(hook: ISheetClipboardHook): IDisposable;
|
|
67
81
|
getClipboardHooks(): ISheetClipboardHook[];
|
|
68
82
|
private _generateCopyContent;
|
|
@@ -127,6 +141,7 @@ export declare class SheetClipboardService extends Disposable implements ISheetC
|
|
|
127
141
|
private _topLeftCellsMatch;
|
|
128
142
|
removeMarkSelection(): void;
|
|
129
143
|
private _initUnitDisposed;
|
|
144
|
+
disposePasteOptionsCache(): void;
|
|
130
145
|
}
|
|
131
146
|
export declare function getMatrixPlainText(matrix: ObjectMatrix<ICellDataWithSpanAndDisplay>): string;
|
|
132
147
|
export declare const escapeSpecialCode: (cellStr: string) => string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ICellData, IDocumentData, IMutationInfo, IRange, ObjectMatrix } from '@univerjs/core';
|
|
2
2
|
import { IDiscreteRange } from '../../controllers/utils/range-tools';
|
|
3
|
+
import { PREDEFINED_HOOK_NAME } from './clipboard.service';
|
|
3
4
|
export declare enum COPY_TYPE {
|
|
4
5
|
COPY = "COPY",
|
|
5
6
|
CUT = "CUT"
|
|
@@ -30,7 +31,7 @@ export interface IParsedCellValueByClipboard {
|
|
|
30
31
|
}
|
|
31
32
|
export interface IUniverSheetCopyDataModel {
|
|
32
33
|
rowProperties?: IClipboardPropertyItem[];
|
|
33
|
-
colProperties?: IClipboardPropertyItem[]
|
|
34
|
+
colProperties?: IClipboardPropertyItem[];
|
|
34
35
|
cellMatrix: ObjectMatrix<ICellDataWithSpanInfo>;
|
|
35
36
|
}
|
|
36
37
|
export interface IPasteTarget {
|
|
@@ -41,7 +42,7 @@ export interface IPasteTarget {
|
|
|
41
42
|
export interface ICopyPastePayload {
|
|
42
43
|
copyType?: COPY_TYPE;
|
|
43
44
|
copyId?: string;
|
|
44
|
-
pasteType:
|
|
45
|
+
pasteType: IPasteHookValueType;
|
|
45
46
|
}
|
|
46
47
|
export interface ISheetDiscreteRangeLocation {
|
|
47
48
|
range: IDiscreteRange;
|
|
@@ -133,3 +134,18 @@ export interface ISheetClipboardHook {
|
|
|
133
134
|
*/
|
|
134
135
|
getFilteredOutRows?(range: IRange): number[];
|
|
135
136
|
}
|
|
137
|
+
export interface IPasteOptionCache {
|
|
138
|
+
target: IPasteTarget;
|
|
139
|
+
source?: IPasteSource;
|
|
140
|
+
cellMatrix: ObjectMatrix<ICellDataWithSpanInfo>;
|
|
141
|
+
rowProperties?: IClipboardPropertyItem[];
|
|
142
|
+
colProperties?: IClipboardPropertyItem[];
|
|
143
|
+
pasteType: IPasteHookValueType;
|
|
144
|
+
}
|
|
145
|
+
export type IPasteSource = ISheetDiscreteRangeLocation & {
|
|
146
|
+
copyId: string;
|
|
147
|
+
copyType: COPY_TYPE;
|
|
148
|
+
};
|
|
149
|
+
export type IPasteHookKeyType = Exclude<keyof typeof PREDEFINED_HOOK_NAME, 'default-copy'>;
|
|
150
|
+
export type IPasteHookValueTypeWithoutDefaultCopy = typeof PREDEFINED_HOOK_NAME[IPasteHookKeyType];
|
|
151
|
+
export type IPasteHookValueType = Exclude<IPasteHookValueTypeWithoutDefaultCopy, 'default-copy'>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Workbook, Disposable } from '@univerjs/core';
|
|
1
|
+
import { Workbook, Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
2
2
|
import { IRenderContext, IRenderModule, IRenderManagerService } from '@univerjs/engine-render';
|
|
3
3
|
import { ILayoutService } from '@univerjs/ui';
|
|
4
4
|
import { IEditorBridgeService } from '../editor-bridge.service';
|
|
@@ -11,7 +11,8 @@ export declare class SheetCellEditorResizeService extends Disposable implements
|
|
|
11
11
|
private readonly _editorBridgeService;
|
|
12
12
|
private readonly _renderManagerService;
|
|
13
13
|
private readonly _sheetSkeletonManagerService;
|
|
14
|
-
|
|
14
|
+
private readonly _univerInstanceService;
|
|
15
|
+
constructor(_context: IRenderContext<Workbook>, _layoutService: ILayoutService, _cellEditorManagerService: ICellEditorManagerService, _editorBridgeService: IEditorBridgeService, _renderManagerService: IRenderManagerService, _sheetSkeletonManagerService: SheetSkeletonManagerService, _univerInstanceService: IUniverInstanceService);
|
|
15
16
|
fitTextSize(callback?: () => void): void;
|
|
16
17
|
/**
|
|
17
18
|
* Mainly used to pre-calculate the width of the editor,
|
|
@@ -42,6 +42,7 @@ export interface IEditorBridgeService {
|
|
|
42
42
|
currentEditCellLayout$: Observable<Nullable<ICellEditorLayout>>;
|
|
43
43
|
currentEditCell$: Observable<Nullable<IEditorBridgeServiceParam>>;
|
|
44
44
|
visible$: Observable<IEditorBridgeServiceVisibleParam>;
|
|
45
|
+
forceKeepVisible$: Observable<boolean>;
|
|
45
46
|
dispose(): void;
|
|
46
47
|
refreshEditCellState(): void;
|
|
47
48
|
refreshEditCellPosition(resetSizeOnly?: boolean): void;
|
|
@@ -68,7 +69,6 @@ export declare class EditorBridgeService extends Disposable implements IEditorBr
|
|
|
68
69
|
private readonly _refSelectionsService;
|
|
69
70
|
private readonly _contextService;
|
|
70
71
|
private _editorUnitId;
|
|
71
|
-
private _isForceKeepVisible;
|
|
72
72
|
private _editorIsDirty;
|
|
73
73
|
private _isDisabled;
|
|
74
74
|
private _visible;
|
|
@@ -99,6 +99,8 @@ export declare class EditorBridgeService extends Disposable implements IEditorBr
|
|
|
99
99
|
readonly visible$: Observable<IEditorBridgeServiceVisibleParam>;
|
|
100
100
|
private readonly _afterVisible$;
|
|
101
101
|
readonly afterVisible$: Observable<IEditorBridgeServiceVisibleParam>;
|
|
102
|
+
private readonly _forceKeepVisible$;
|
|
103
|
+
readonly forceKeepVisible$: Observable<boolean>;
|
|
102
104
|
constructor(_sheetInterceptorService: SheetInterceptorService, _renderManagerService: IRenderManagerService, _themeService: ThemeService, _univerInstanceService: IUniverInstanceService, _editorService: IEditorService, _refSelectionsService: SheetsSelectionsService, _contextService: IContextService);
|
|
103
105
|
refreshEditCellState(): void;
|
|
104
106
|
refreshEditCellPosition(resetSizeOnly?: boolean): void;
|
|
@@ -77,6 +77,12 @@ export declare class HoverManagerService extends Disposable {
|
|
|
77
77
|
triggerPointerDown(unitId: string, event: IPointerEvent | IMouseEvent): void;
|
|
78
78
|
triggerPointerUp(unitId: string, event: IPointerEvent | IMouseEvent): void;
|
|
79
79
|
triggerMouseMove(unitId: string, event: IPointerEvent | IMouseEvent): void;
|
|
80
|
+
/**
|
|
81
|
+
* Trigger by pointerup.
|
|
82
|
+
* @param unitId
|
|
83
|
+
* @param offsetX
|
|
84
|
+
* @param offsetY
|
|
85
|
+
*/
|
|
80
86
|
triggerClick(unitId: string, offsetX: number, offsetY: number): void;
|
|
81
87
|
triggerScroll(): void;
|
|
82
88
|
}
|
|
@@ -12,11 +12,19 @@ export interface IScrollState {
|
|
|
12
12
|
*/
|
|
13
13
|
offsetY: number;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Current start row in viewportMain in canvas, NOT the first row of visible area of current viewport after freeze.
|
|
16
|
+
* e.g. If no freeze, it's the same as startRow in current viewport.
|
|
17
|
+
* If freeze, this value is smaller than the first row of visible area. Just pretend that viewMainTop does not exist.
|
|
18
|
+
*
|
|
19
|
+
* e.g. If row 1 ~ 2 is frozen, the first row if viewMain is 3, but sheetViewStartRow still 0.
|
|
16
20
|
*/
|
|
17
21
|
sheetViewStartRow: number;
|
|
18
22
|
/**
|
|
19
|
-
*
|
|
23
|
+
* Current start column in viewportMain in canvas, NOT the first column of visible area of current viewport after freeze.
|
|
24
|
+
* e.g. If no freeze, it's the same as startColumn in current viewport.
|
|
25
|
+
* If freeze, this value is smaller than the first column of visible area. Just pretend that viewMainLeft does not exist.
|
|
26
|
+
*
|
|
27
|
+
* e.g. If column A ~ C is frozen, the first column of viewMain is D, but sheetViewStartColumn still 0.
|
|
20
28
|
*/
|
|
21
29
|
sheetViewStartColumn: number;
|
|
22
30
|
}
|
|
@@ -57,6 +57,7 @@ export declare class BaseSelectionRenderService extends Disposable implements IS
|
|
|
57
57
|
readonly controlFillConfig$: Observable<IControlFillConfig | null>;
|
|
58
58
|
protected _selectionControls: SelectionControl[];
|
|
59
59
|
protected _startRangeWhenPointerDown: IRangeWithCoord;
|
|
60
|
+
protected _activeControlIndex: number;
|
|
60
61
|
/**
|
|
61
62
|
* the posX of viewport when the pointer down
|
|
62
63
|
*/
|
|
@@ -126,9 +127,9 @@ export declare class BaseSelectionRenderService extends Disposable implements IS
|
|
|
126
127
|
setSingleSelectionEnabled(enabled?: boolean): void;
|
|
127
128
|
newSelectionControl(scene: Scene, skeleton: SpreadsheetSkeleton, selection: ISelectionWithStyle): SelectionControl;
|
|
128
129
|
/**
|
|
129
|
-
* Update the corresponding selectionControl based on selectionsData
|
|
130
|
-
* selectionData[i]
|
|
131
|
-
* @param
|
|
130
|
+
* Update the corresponding selectionControl based on selectionsData from WorkbookSelectionModel
|
|
131
|
+
* selectionData[i] --> selectionControls[i]
|
|
132
|
+
* @param selectionsWithStyleList {ISelectionWithStyle[]} selectionsData from WorkbookSelectionModel
|
|
132
133
|
*/
|
|
133
134
|
resetSelectionsByModelData(selectionsWithStyleList: readonly ISelectionWithStyle[]): void;
|
|
134
135
|
refreshSelectionMoveStart(): void;
|
|
@@ -158,6 +159,8 @@ export declare class BaseSelectionRenderService extends Disposable implements IS
|
|
|
158
159
|
* Returns the selected range in the active sheet, or null if there is no active range. If multiple ranges are selected this method returns only the last selected range.
|
|
159
160
|
*/
|
|
160
161
|
getActiveRange(): Nullable<IRange>;
|
|
162
|
+
setActiveSelectionIndex(index: number): void;
|
|
163
|
+
resetActiveSelectionIndex(): void;
|
|
161
164
|
/**
|
|
162
165
|
* get active(actually last) selection control
|
|
163
166
|
* @returns T extends SelectionControl
|
|
@@ -33,6 +33,10 @@ export declare class SheetSelectionRenderService extends BaseSelectionRenderServ
|
|
|
33
33
|
private _initUserActionSyncListener;
|
|
34
34
|
/**
|
|
35
35
|
* Update selectionData to selectionDataModel (WorkBookSelections) by SetSelectionsOperation.
|
|
36
|
+
*
|
|
37
|
+
* Unlike baseSelectionRenderService@resetSelectionsByModelData, this method is for update WorkbookSelectionModel.
|
|
38
|
+
*
|
|
39
|
+
*
|
|
36
40
|
* @param selectionDataWithStyleList
|
|
37
41
|
* @param type
|
|
38
42
|
*/
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { ICanvasPopup } from '../../services/canvas-pop-manager.service';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @param root0
|
|
6
|
+
* @param root0.popup
|
|
7
|
+
*/
|
|
3
8
|
export declare function CellAlert({ popup }: {
|
|
4
9
|
popup: ICanvasPopup;
|
|
5
10
|
}): React.JSX.Element | null;
|