@univerjs/sheets-ui 0.5.4-nightly.202501200849 → 0.5.5-experimental.20250122-3362a4a
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 +44 -48
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/facade.js +612 -544
- package/lib/es/index.js +17075 -16674
- package/lib/es/locale/en-US.js +2 -2
- package/lib/es/locale/fa-IR.js +2 -2
- package/lib/es/locale/fr-FR.js +2 -2
- package/lib/es/locale/ru-RU.js +2 -2
- package/lib/es/locale/vi-VN.js +2 -2
- package/lib/es/locale/zh-CN.js +2 -2
- package/lib/es/locale/zh-TW.js +2 -2
- package/lib/index.css +1 -1
- package/lib/types/commands/commands/clipboard.command.d.ts +1 -0
- package/lib/types/components/border-panel/BorderPanel.d.ts +1 -2
- package/lib/types/components/border-panel/border-line/BorderLine.d.ts +1 -2
- package/lib/types/components/border-panel/border-line/icons/BorderDashDot.d.ts +16 -2
- package/lib/types/components/border-panel/border-line/icons/BorderDashDotDot.d.ts +16 -2
- package/lib/types/components/border-panel/border-line/icons/BorderDashed.d.ts +16 -2
- package/lib/types/components/border-panel/border-line/icons/BorderDotted.d.ts +16 -2
- package/lib/types/components/border-panel/border-line/icons/BorderHair.d.ts +16 -2
- package/lib/types/components/border-panel/border-line/icons/BorderMedium.d.ts +16 -2
- package/lib/types/components/border-panel/border-line/icons/BorderMediumDashDot.d.ts +16 -2
- package/lib/types/components/border-panel/border-line/icons/BorderMediumDashDotDot.d.ts +16 -2
- package/lib/types/components/border-panel/border-line/icons/BorderMediumDashed.d.ts +16 -2
- package/lib/types/components/border-panel/border-line/icons/BorderThick.d.ts +16 -2
- package/lib/types/components/border-panel/border-line/icons/BorderThin.d.ts +16 -2
- package/lib/types/components/menu-item-input/MenuItemInput.d.ts +1 -2
- package/lib/types/controllers/clipboard/clipboard.controller.d.ts +1 -0
- package/lib/types/controllers/render-controllers/freeze.render-controller.d.ts +6 -2
- package/lib/types/facade/f-event.d.ts +20 -5
- package/lib/types/facade/f-range.d.ts +24 -5
- package/lib/types/facade/f-univer.d.ts +4 -1
- package/lib/types/facade/f-workbook.d.ts +27 -1
- package/lib/types/facade/f-worksheet.d.ts +7 -2
- package/lib/types/services/clipboard/clipboard.service.d.ts +5 -2
- package/lib/types/services/clipboard/type.d.ts +9 -1
- package/lib/types/services/selection/base-selection-render.service.d.ts +1 -0
- package/lib/types/services/selection/selection-control.d.ts +2 -2
- package/lib/types/services/sheet-skeleton-manager.service.d.ts +2 -1
- package/lib/types/views/cell-alert/CellAlertPopup.d.ts +1 -2
- package/lib/types/views/clipboard/ClipboardPopupMenu.d.ts +16 -2
- package/lib/types/views/count-bar/CountBar.d.ts +16 -2
- package/lib/types/views/count-bar/ZoomSlider.d.ts +16 -2
- package/lib/types/views/defined-name/DefinedName.d.ts +16 -2
- package/lib/types/views/defined-name/DefinedNameContainer.d.ts +16 -2
- package/lib/types/views/defined-name/DefinedNameInput.d.ts +1 -2
- package/lib/types/views/defined-name/DefinedNameOverlay.d.ts +16 -2
- package/lib/types/views/formula-bar/FormulaBar.d.ts +16 -2
- package/lib/types/views/mobile/sheet-bar/MobileSheetBar.d.ts +16 -2
- package/lib/types/views/permission/error-msg-dialog/index.d.ts +16 -2
- package/lib/types/views/permission/panel/index.d.ts +1 -2
- package/lib/types/views/permission/panel-detail/PermissionDetailFooterPart.d.ts +1 -2
- package/lib/types/views/permission/panel-detail/PermissionDetailMainPart.d.ts +1 -1
- package/lib/types/views/permission/panel-detail/PermissionDetailPanel.d.ts +1 -2
- package/lib/types/views/permission/panel-detail/PermissionDetailUserPart.d.ts +1 -2
- package/lib/types/views/permission/panel-list/index.d.ts +16 -2
- package/lib/types/views/permission/permission-dialog/index.d.ts +16 -2
- package/lib/types/views/permission/spin/index.d.ts +1 -1
- package/lib/types/views/permission/user-dialog/index.d.ts +16 -2
- package/lib/types/views/sheet-bar/SheetBar.d.ts +16 -2
- package/lib/types/views/sheet-bar/sheet-bar-button/SheetBarButton.d.ts +1 -1
- package/lib/types/views/sheet-bar/sheet-bar-menu/SheetBarMenu.d.ts +1 -1
- package/lib/types/views/sheet-bar/sheet-bar-tabs/SheetBarItem.d.ts +1 -1
- package/lib/types/views/sheet-bar/sheet-bar-tabs/SheetBarTabs.d.ts +16 -2
- package/lib/types/views/sheet-container/SheetContainer.d.ts +18 -4
- package/lib/types/views/status-bar/StatusBar.d.ts +16 -2
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +44 -48
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +13 -13
|
@@ -236,9 +236,10 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
236
236
|
readonly SheetEditEnded: 'SheetEditEnded';
|
|
237
237
|
/**
|
|
238
238
|
* Event fired when a cell is clicked
|
|
239
|
+
* @see {@link ICellEventParam}
|
|
239
240
|
* @example
|
|
240
241
|
* ```ts
|
|
241
|
-
* univerAPI.
|
|
242
|
+
* univerAPI.addEvent(univerAPI.Event.CellClicked, (params)=> {
|
|
242
243
|
* const { worksheet, workbook, row, column, value, isZenEditor } = params;
|
|
243
244
|
* });
|
|
244
245
|
* ```
|
|
@@ -246,9 +247,10 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
246
247
|
readonly CellClicked: 'CellClicked';
|
|
247
248
|
/**
|
|
248
249
|
* Event fired when a cell is pointer down
|
|
250
|
+
* @see {@link ICellEventParam}
|
|
249
251
|
* @example
|
|
250
252
|
* ```ts
|
|
251
|
-
* univerAPI.
|
|
253
|
+
* univerAPI.addEvent(univerAPI.Event.CellPointerDown, (params)=> {
|
|
252
254
|
* const { worksheet, workbook, row, column } = params;
|
|
253
255
|
* });
|
|
254
256
|
* ```
|
|
@@ -256,9 +258,10 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
256
258
|
readonly CellPointerDown: 'CellPointerDown';
|
|
257
259
|
/**
|
|
258
260
|
* Event fired when a cell is pointer up
|
|
261
|
+
* @see {@link ICellEventParam}
|
|
259
262
|
* @example
|
|
260
263
|
* ```ts
|
|
261
|
-
* univerAPI.
|
|
264
|
+
* univerAPI.addEvent(univerAPI.Event.CellPointerUp, (params)=> {
|
|
262
265
|
* const { worksheet, workbook, row, column } = params;
|
|
263
266
|
* });
|
|
264
267
|
* ```
|
|
@@ -266,9 +269,10 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
266
269
|
readonly CellPointerUp: 'CellPointerUp';
|
|
267
270
|
/**
|
|
268
271
|
* Event fired when a cell is hovered
|
|
272
|
+
* @see {@link ICellEventParam}
|
|
269
273
|
* @example
|
|
270
274
|
* ```ts
|
|
271
|
-
* univerAPI.
|
|
275
|
+
* univerAPI.addEvent(univerAPI.Event.CellHover, (params)=> {
|
|
272
276
|
* const { worksheet, workbook, row, column } = params;
|
|
273
277
|
* });
|
|
274
278
|
* ```
|
|
@@ -276,9 +280,10 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
276
280
|
readonly CellHover: 'CellHover';
|
|
277
281
|
/**
|
|
278
282
|
* Event fired when move on spreadsheet cells
|
|
283
|
+
* @see {@link ICellEventParam}
|
|
279
284
|
* @example
|
|
280
285
|
* ```ts
|
|
281
|
-
* univerAPI.
|
|
286
|
+
* univerAPI.addEvent(univerAPI.Event.CellPointerMove, (params)=> {
|
|
282
287
|
* const { worksheet, workbook, row, column } = params;
|
|
283
288
|
* });
|
|
284
289
|
* ```
|
|
@@ -374,6 +379,7 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
374
379
|
readonly ColumnHeaderHover: 'ColumnHeaderHover';
|
|
375
380
|
/**
|
|
376
381
|
* Event fired when drag over spreadsheet cells
|
|
382
|
+
* @see {@link ICellEventParam}
|
|
377
383
|
* @example
|
|
378
384
|
* ```ts
|
|
379
385
|
* univerAPI.getActiveWorkbook().addEvent(univerAPI.Event.DragOver, (params)=> {
|
|
@@ -384,6 +390,7 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
384
390
|
readonly DragOver: 'DragOver';
|
|
385
391
|
/**
|
|
386
392
|
* Event fired when drop on spreadsheet cells
|
|
393
|
+
* @see {@link ICellEventParam}
|
|
387
394
|
* @example
|
|
388
395
|
* ```ts
|
|
389
396
|
* univerAPI.getActiveWorkbook().addEvent(univerAPI.Event.Drop, (params)=> {
|
|
@@ -394,6 +401,7 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
394
401
|
readonly Drop: 'Drop';
|
|
395
402
|
/**
|
|
396
403
|
* Event fired when scroll spreadsheet.
|
|
404
|
+
* @see {@link IScrollEventParam}
|
|
397
405
|
* @example
|
|
398
406
|
* ```ts
|
|
399
407
|
* univerAPI.addEvent(univerAPI.Event.Scroll, (params)=> {
|
|
@@ -404,6 +412,7 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
404
412
|
readonly Scroll: 'Scroll';
|
|
405
413
|
/**
|
|
406
414
|
* Event fired when selection changed.
|
|
415
|
+
* @see {@link ISelectionEventParam}
|
|
407
416
|
* @example
|
|
408
417
|
* ```ts
|
|
409
418
|
* univerAPI.addEvent(univerAPI.Event.SelectionChanged, (p)=> {
|
|
@@ -414,6 +423,7 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
414
423
|
readonly SelectionChanged: 'SelectionChanged';
|
|
415
424
|
/**
|
|
416
425
|
* Event fired when selection move start
|
|
426
|
+
* @see {@link ISelectionEventParam}
|
|
417
427
|
* @example
|
|
418
428
|
* ```ts
|
|
419
429
|
* univerAPI.addEvent(univerAPI.Event.SelectionMoveStart, (p)=> {
|
|
@@ -424,6 +434,7 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
424
434
|
readonly SelectionMoveStart: 'SelectionMoveStart';
|
|
425
435
|
/**
|
|
426
436
|
* Event fired when selection move end
|
|
437
|
+
* @see {@link ISelectionEventParam}
|
|
427
438
|
* @example
|
|
428
439
|
* ```ts
|
|
429
440
|
* univerAPI.addEvent(univerAPI.Event.SelectionMoving, (p)=> {
|
|
@@ -434,6 +445,7 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
434
445
|
readonly SelectionMoving: 'SelectionMoving';
|
|
435
446
|
/**
|
|
436
447
|
* Event fired when selection move end
|
|
448
|
+
* @see {@link ISelectionEventParam}
|
|
437
449
|
* @example
|
|
438
450
|
* ```ts
|
|
439
451
|
* univerAPI.addEvent(univerAPI.Event.SelectionMoveEnd, (p)=> {
|
|
@@ -444,6 +456,7 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
444
456
|
readonly SelectionMoveEnd: 'SelectionMoveEnd';
|
|
445
457
|
/**
|
|
446
458
|
* Event fired when zoom changed
|
|
459
|
+
* @see {@link ISheetZoomEvent}
|
|
447
460
|
* @example
|
|
448
461
|
* ```ts
|
|
449
462
|
* univerAPI.addEvent(univerAPI.Event.SheetZoomChanged, (p)=> {
|
|
@@ -454,6 +467,7 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
454
467
|
readonly SheetZoomChanged: 'SheetZoomChanged';
|
|
455
468
|
/**
|
|
456
469
|
* Event fired before zoom changed
|
|
470
|
+
* @see {@link ISheetZoomEvent}
|
|
457
471
|
* @example
|
|
458
472
|
* ```ts
|
|
459
473
|
* univerAPI.addEvent(univerAPI.Event.BeforeSheetZoomChange, (p)=> {
|
|
@@ -464,6 +478,7 @@ export interface IFSheetsUIEventNameMixin {
|
|
|
464
478
|
readonly BeforeSheetZoomChange: 'BeforeSheetZoomChange';
|
|
465
479
|
/**
|
|
466
480
|
* Event fired when sheet skeleton changed
|
|
481
|
+
* @see {@link ISheetSkeletonChangedEvent}
|
|
467
482
|
* @example
|
|
468
483
|
* ```ts
|
|
469
484
|
* univerAPI.addEvent(univerAPI.Event.SheetSkeletonChanged, (p)=> {
|
|
@@ -55,12 +55,21 @@ interface IFRangeSheetsUIMixin {
|
|
|
55
55
|
* @returns The disposable object to detach the popup, if the popup is not attached, return `null`.
|
|
56
56
|
* @example
|
|
57
57
|
```
|
|
58
|
+
univerAPI.getComponentManager().register(
|
|
59
|
+
'myPopup',
|
|
60
|
+
() => React.createElement('div', {
|
|
61
|
+
style: {
|
|
62
|
+
color: 'red',
|
|
63
|
+
fontSize: '14px'
|
|
64
|
+
}
|
|
65
|
+
}, 'Custom Popup')
|
|
66
|
+
);
|
|
67
|
+
|
|
58
68
|
let sheet = univerAPI.getActiveWorkbook().getActiveSheet();
|
|
59
69
|
let range = sheet.getRange(2, 2, 3, 3);
|
|
60
70
|
univerAPI.getActiveWorkbook().setActiveRange(range);
|
|
61
71
|
let disposable = range.attachPopup({
|
|
62
|
-
|
|
63
|
-
extraProps: { alert: { type: 0, title: 'This is an Info', message: 'This is an info message' } },
|
|
72
|
+
componentKey: 'myPopup'
|
|
64
73
|
});
|
|
65
74
|
```
|
|
66
75
|
*/
|
|
@@ -78,7 +87,7 @@ interface IFRangeSheetsUIMixin {
|
|
|
78
87
|
*/
|
|
79
88
|
attachAlertPopup(alert: Omit<ICellAlert, 'location'>): IDisposable;
|
|
80
89
|
/**
|
|
81
|
-
* Attach a DOM popup to the
|
|
90
|
+
* Attach a DOM popup to the current range.
|
|
82
91
|
* @param alert The alert to attach
|
|
83
92
|
* @returns The disposable object to detach the alert.
|
|
84
93
|
* @example
|
|
@@ -86,9 +95,19 @@ interface IFRangeSheetsUIMixin {
|
|
|
86
95
|
let sheet = univerAPI.getActiveWorkbook().getActiveSheet();
|
|
87
96
|
let range = sheet.getRange(2, 2, 3, 3);
|
|
88
97
|
univerAPI.getActiveWorkbook().setActiveRange(range);
|
|
98
|
+
|
|
99
|
+
univerAPI.getComponentManager().register(
|
|
100
|
+
'myPopup',
|
|
101
|
+
() => React.createElement('div', {
|
|
102
|
+
style: {
|
|
103
|
+
background: 'red',
|
|
104
|
+
fontSize: '14px'
|
|
105
|
+
}
|
|
106
|
+
}, 'Custom Popup')
|
|
107
|
+
);
|
|
89
108
|
let disposable = range.attachRangePopup({
|
|
90
|
-
|
|
91
|
-
|
|
109
|
+
componentKey: 'myPopup',
|
|
110
|
+
direction: 'top' // 'vertical' | 'horizontal' | 'top' | 'right' | 'left' | 'bottom' | 'bottom-center' | 'top-center';
|
|
92
111
|
});
|
|
93
112
|
* ```
|
|
94
113
|
*/
|
|
@@ -7,7 +7,7 @@ export interface IFUniverSheetsUIMixin {
|
|
|
7
7
|
* @param {IColumnsHeaderCfgParam} cfg The configuration of the column header.
|
|
8
8
|
* @example
|
|
9
9
|
* ```typescript
|
|
10
|
-
* univerAPI.customizeColumnHeader({ headerStyle: { backgroundColor: '
|
|
10
|
+
* univerAPI.customizeColumnHeader({ headerStyle: { fontColor: '#fff', size: 40, backgroundColor: '#4e69ee', fontSize: 9 }, columnsCfg: ['MokaII', undefined, null, { text: 'Size', textAlign: 'left' }] });
|
|
11
11
|
* ```
|
|
12
12
|
*/
|
|
13
13
|
customizeColumnHeader(cfg: IColumnsHeaderCfgParam): void;
|
|
@@ -49,6 +49,9 @@ export interface IFUniverSheetsUIMixin {
|
|
|
49
49
|
export declare class FUniverSheetsUIMixin extends FUniver implements IFUniverSheetsUIMixin {
|
|
50
50
|
private _initSheetUIEvent;
|
|
51
51
|
_initObserverListener(injector: Injector): void;
|
|
52
|
+
/**
|
|
53
|
+
* @ignore
|
|
54
|
+
*/
|
|
52
55
|
_initialize(injector: Injector): void;
|
|
53
56
|
private _generateClipboardCopyParam;
|
|
54
57
|
private _beforeClipboardChange;
|
|
@@ -1,5 +1,6 @@
|
|
|
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 { ICellEventParam } from './f-event';
|
|
4
5
|
import { FWorkbook } from '@univerjs/sheets/facade';
|
|
5
6
|
import { IDialogPartMethodOptions, ISidebarMethodOptions } from '@univerjs/ui';
|
|
@@ -26,6 +27,26 @@ export interface IFWorkbookSheetsUIMixin {
|
|
|
26
27
|
* @deprecated use `univerAPI.addEvent(univerAPI.Event.CellHover, () => {})` instead
|
|
27
28
|
*/
|
|
28
29
|
onCellHover(callback: (cell: IHoverRichTextPosition) => void): IDisposable;
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated use `univerAPI.addEvent(univerAPI.Event.CellPointerMove, () => {})` instead
|
|
32
|
+
*/
|
|
33
|
+
onCellPointerMove(callback: (cell: ICellPosWithEvent, event: IPointerEvent | IMouseEvent) => void): IDisposable;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated use `univerAPI.addEvent(univerAPI.Event.CellPointerDown, () => {})` instead
|
|
36
|
+
*/
|
|
37
|
+
onCellPointerDown(callback: (cell: ICellPosWithEvent) => void): IDisposable;
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated use `univerAPI.addEvent(univerAPI.Event.CellPointerUp, () => {})` instead
|
|
40
|
+
*/
|
|
41
|
+
onCellPointerUp(callback: (cell: ICellPosWithEvent) => void): IDisposable;
|
|
42
|
+
/**
|
|
43
|
+
* @deprecated use `univerAPI.addEvent(univerAPI.Event.DragOver, () => {})` instead
|
|
44
|
+
*/
|
|
45
|
+
onDragOver(callback: (cell: IDragCellPosition) => void): IDisposable;
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated use `univerAPI.addEvent(univerAPI.Event.Drop, () => {})` instead
|
|
48
|
+
*/
|
|
49
|
+
onDrop(callback: (cell: IDragCellPosition) => void): IDisposable;
|
|
29
50
|
/**
|
|
30
51
|
* Start the editing process
|
|
31
52
|
* @returns A boolean value
|
|
@@ -92,6 +113,11 @@ export declare class FWorkbookSheetsUIMixin extends FWorkbook implements IFWorkb
|
|
|
92
113
|
generateCellParams(cell: IHoverRichTextPosition | ICellPosWithEvent): ICellEventParam;
|
|
93
114
|
onCellClick(callback: (cell: IHoverRichTextInfo) => void): IDisposable;
|
|
94
115
|
onCellHover(callback: (cell: IHoverRichTextPosition) => void): IDisposable;
|
|
116
|
+
onCellPointerDown(callback: (cell: ICellPosWithEvent) => void): IDisposable;
|
|
117
|
+
onCellPointerUp(callback: (cell: ICellPosWithEvent) => void): IDisposable;
|
|
118
|
+
onCellPointerMove(callback: (cell: ICellPosWithEvent, event: IPointerEvent | IMouseEvent) => void): IDisposable;
|
|
119
|
+
onDragOver(callback: (cell: IDragCellPosition) => void): IDisposable;
|
|
120
|
+
onDrop(callback: (cell: IDragCellPosition) => void): IDisposable;
|
|
95
121
|
startEditing(): boolean;
|
|
96
122
|
endEditing(save?: boolean): Promise<boolean>;
|
|
97
123
|
endEditingAsync(save?: boolean): Promise<boolean>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IRange, Nullable } from '@univerjs/core';
|
|
1
|
+
import { IDisposable, IRange, Nullable } from '@univerjs/core';
|
|
2
2
|
import { SpreadsheetSkeleton } from '@univerjs/engine-render';
|
|
3
|
-
import { IScrollState } from '@univerjs/sheets-ui';
|
|
3
|
+
import { IScrollState, IViewportScrollState } from '@univerjs/sheets-ui';
|
|
4
4
|
import { FWorksheet } from '@univerjs/sheets/facade';
|
|
5
5
|
export interface IFWorksheetSkeletonMixin {
|
|
6
6
|
/**
|
|
@@ -89,6 +89,10 @@ export interface IFWorksheetSkeletonMixin {
|
|
|
89
89
|
* ```
|
|
90
90
|
*/
|
|
91
91
|
setColumnAutoWidth(columnPosition: number, numColumn: number): FWorksheet;
|
|
92
|
+
/**
|
|
93
|
+
* @deprecated use `univerAPI.addEvent(univerAPI.Event.Scroll, () => {})` instead
|
|
94
|
+
*/
|
|
95
|
+
onScroll(callback: (params: Nullable<IViewportScrollState>) => void): IDisposable;
|
|
92
96
|
}
|
|
93
97
|
export declare class FWorksheetSkeletonMixin extends FWorksheet implements IFWorksheetSkeletonMixin {
|
|
94
98
|
refreshCanvas(): FWorksheet;
|
|
@@ -97,6 +101,7 @@ export declare class FWorksheetSkeletonMixin extends FWorksheet implements IFWor
|
|
|
97
101
|
getVisibleRange(): IRange;
|
|
98
102
|
scrollToCell(row: number, column: number): FWorksheet;
|
|
99
103
|
getScrollState(): IScrollState;
|
|
104
|
+
onScroll(callback: (params: Nullable<IViewportScrollState>) => void): IDisposable;
|
|
100
105
|
getSkeleton(): Nullable<SpreadsheetSkeleton>;
|
|
101
106
|
setColumnAutoWidth(columnPosition: number, numColumn: number): FWorksheet;
|
|
102
107
|
}
|
|
@@ -31,7 +31,7 @@ export interface ISheetClipboardService {
|
|
|
31
31
|
copy(): Promise<boolean>;
|
|
32
32
|
cut(): Promise<boolean>;
|
|
33
33
|
paste(item: ClipboardItem, pasteType?: string): Promise<boolean>;
|
|
34
|
-
legacyPaste(html?: string, text?: string): Promise<boolean>;
|
|
34
|
+
legacyPaste(html?: string, text?: string, files?: File[]): Promise<boolean>;
|
|
35
35
|
rePasteWithPasteType(type: IPasteHookKeyType): boolean;
|
|
36
36
|
disposePasteOptionsCache(): void;
|
|
37
37
|
generateCopyContent(workbookId: string, worksheetId: string, range: IRange): Nullable<ICopyContent>;
|
|
@@ -74,14 +74,17 @@ export declare class SheetClipboardService extends Disposable implements ISheetC
|
|
|
74
74
|
copy(copyType?: COPY_TYPE): Promise<boolean>;
|
|
75
75
|
cut(): Promise<boolean>;
|
|
76
76
|
paste(item: ClipboardItem, pasteType?: "default-paste"): Promise<boolean>;
|
|
77
|
-
legacyPaste(html?: string, text?: string): Promise<boolean>;
|
|
77
|
+
legacyPaste(html?: string, text?: string, files?: File[]): Promise<boolean>;
|
|
78
78
|
rePasteWithPasteType(type: IPasteHookKeyType): boolean;
|
|
79
79
|
updatePasteOptionsCache(cache: IPasteOptionCache | null): void;
|
|
80
80
|
addClipboardHook(hook: ISheetClipboardHook): IDisposable;
|
|
81
81
|
getClipboardHooks(): ISheetClipboardHook[];
|
|
82
82
|
private _generateCopyContent;
|
|
83
83
|
private _notifyClipboardHook;
|
|
84
|
+
private _executePaste;
|
|
85
|
+
private _pasteFiles;
|
|
84
86
|
private _pastePlainText;
|
|
87
|
+
private _pasteUnrecognized;
|
|
85
88
|
private _pasteHTML;
|
|
86
89
|
private _pasteExternal;
|
|
87
90
|
private _pasteInternal;
|
|
@@ -83,7 +83,7 @@ export interface ISheetClipboardHook {
|
|
|
83
83
|
* @param subUnitId
|
|
84
84
|
* @param range
|
|
85
85
|
*/
|
|
86
|
-
onBeforeCopy?(unitId: string, subUnitId: string, range: IRange): void;
|
|
86
|
+
onBeforeCopy?(unitId: string, subUnitId: string, range: IRange, copyType: COPY_TYPE): void;
|
|
87
87
|
/**
|
|
88
88
|
* Properties that would be appended to the td element.
|
|
89
89
|
*
|
|
@@ -177,6 +177,14 @@ export interface ISheetClipboardHook {
|
|
|
177
177
|
undos: IMutationInfo[];
|
|
178
178
|
redos: IMutationInfo[];
|
|
179
179
|
};
|
|
180
|
+
onPasteFiles?(pasteTo: ISheetDiscreteRangeLocation, files: File[], payload: ICopyPastePayload): {
|
|
181
|
+
undos: IMutationInfo[];
|
|
182
|
+
redos: IMutationInfo[];
|
|
183
|
+
};
|
|
184
|
+
onPasteUnrecognized?(pasteTo: ISheetDiscreteRangeLocation): {
|
|
185
|
+
undos: IMutationInfo[];
|
|
186
|
+
redos: IMutationInfo[];
|
|
187
|
+
};
|
|
180
188
|
/**
|
|
181
189
|
* Would be called after paste content has been written into Univer.
|
|
182
190
|
* Features could do some cleaning up jobs here.
|
|
@@ -39,6 +39,7 @@ export interface ISheetSelectionRenderService {
|
|
|
39
39
|
getCellWithCoordByOffset(x: number, y: number, skeleton?: SpreadsheetSkeleton): Nullable<ICellWithCoord>;
|
|
40
40
|
setSingleSelectionEnabled(enabled: boolean): void;
|
|
41
41
|
refreshSelectionMoveEnd(): void;
|
|
42
|
+
resetSelectionsByModelData(selectionsWithStyleList: readonly ISelectionWithStyle[]): void;
|
|
42
43
|
}
|
|
43
44
|
export declare const ISheetSelectionRenderService: import('@wendellhu/redi').IdentifierDecorator<ISheetSelectionRenderService>;
|
|
44
45
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ICellWithCoord, IRangeWithCoord, Nullable, ThemeService, Disposable, RANGE_TYPE } from '@univerjs/core';
|
|
2
|
-
import { Scene, Group, Rect } from '@univerjs/engine-render';
|
|
2
|
+
import { Scene, SpreadsheetSkeleton, Group, Rect } from '@univerjs/engine-render';
|
|
3
3
|
import { ISelectionStyle, ISelectionWidgetConfig, ISelectionWithCoord } from '@univerjs/sheets';
|
|
4
4
|
import { ISelectionShapeExtensionOption, SelectionShapeExtension } from './selection-shape-extension';
|
|
5
5
|
import { Subject } from 'rxjs';
|
|
@@ -175,7 +175,7 @@ export declare class SelectionControl extends Disposable {
|
|
|
175
175
|
* Update range and primary range and style.
|
|
176
176
|
* @param selectionWthCoord
|
|
177
177
|
*/
|
|
178
|
-
updateRangeBySelectionWithCoord(selectionWthCoord: ISelectionWithCoord): void;
|
|
178
|
+
updateRangeBySelectionWithCoord(selectionWthCoord: ISelectionWithCoord, sk?: SpreadsheetSkeleton): void;
|
|
179
179
|
/**
|
|
180
180
|
* Update selection model with new range & primary cell(aka: highlight/current), also update row/col selection size & style.
|
|
181
181
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IRange, IRangeWithCoord, Nullable, Workbook, Disposable, Injector } from '@univerjs/core';
|
|
2
|
-
import { IRenderContext, IRenderModule, SpreadsheetSkeleton } from '@univerjs/engine-render';
|
|
2
|
+
import { IRender, IRenderContext, IRenderModule, SpreadsheetSkeleton } from '@univerjs/engine-render';
|
|
3
3
|
export interface ISheetSkeletonManagerParam {
|
|
4
4
|
unitId: string;
|
|
5
5
|
sheetId: string;
|
|
@@ -58,4 +58,5 @@ export declare class SheetSkeletonManagerService extends Disposable implements I
|
|
|
58
58
|
attachRangeWithCoord(range: IRange): Nullable<IRangeWithCoord>;
|
|
59
59
|
private _getSkeleton;
|
|
60
60
|
private _buildSkeleton;
|
|
61
|
+
setColumnHeaderSize(render: IRender, sheetId: string, size: number): void;
|
|
61
62
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ICanvasPopup } from '../../services/canvas-pop-manager.service';
|
|
2
|
-
import { default as React } from 'react';
|
|
3
2
|
/**
|
|
4
3
|
*
|
|
5
4
|
* @param root0
|
|
@@ -7,4 +6,4 @@ import { default as React } from 'react';
|
|
|
7
6
|
*/
|
|
8
7
|
export declare function CellAlert({ popup }: {
|
|
9
8
|
popup: ICanvasPopup;
|
|
10
|
-
}):
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,2 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export declare const ClipboardPopupMenu: () => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,7 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
2
16
|
interface ICountBarProps {
|
|
3
17
|
changeRatio?: (ratio: string) => void;
|
|
4
18
|
onChange?: (value: string) => void;
|
|
5
19
|
}
|
|
6
|
-
export declare function CountBar(props: ICountBarProps):
|
|
20
|
+
export declare function CountBar(props: ICountBarProps): import("react/jsx-runtime").JSX.Element;
|
|
7
21
|
export {};
|
|
@@ -1,2 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export declare function ZoomSlider(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
2
16
|
export declare function DefinedName({ disable }: {
|
|
3
17
|
disable: boolean;
|
|
4
|
-
}):
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export declare const DefinedNameContainer: () => import("react/jsx-runtime").JSX.Element | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IDefinedNamesServiceParam } from '@univerjs/engine-formula';
|
|
2
|
-
import { default as React } from 'react';
|
|
3
2
|
export interface IDefinedNameInputProps extends Omit<IDefinedNamesServiceParam, 'id'> {
|
|
4
3
|
inputId: string;
|
|
5
4
|
type?: string;
|
|
@@ -8,4 +7,4 @@ export interface IDefinedNameInputProps extends Omit<IDefinedNamesServiceParam,
|
|
|
8
7
|
cancel?: () => void;
|
|
9
8
|
id?: string;
|
|
10
9
|
}
|
|
11
|
-
export declare const DefinedNameInput: (props: IDefinedNameInputProps) =>
|
|
10
|
+
export declare const DefinedNameInput: (props: IDefinedNameInputProps) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
2
16
|
export interface IDefinedNameOverlayProps {
|
|
3
17
|
}
|
|
4
|
-
export declare function DefinedNameOverlay(props: IDefinedNameOverlayProps):
|
|
18
|
+
export declare function DefinedNameOverlay(props: IDefinedNameOverlayProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export declare function FormulaBar(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export declare function MobileSheetBar(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
2
16
|
export declare const AlertDialog: ({ errorMsg }: {
|
|
3
17
|
errorMsg: string;
|
|
4
|
-
}) =>
|
|
18
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { IPermissionPanelRule } from '../../../services/permission/sheet-permission-panel.model';
|
|
2
|
-
import { default as React } from 'react';
|
|
3
2
|
interface ISheetPermissionPanelProps {
|
|
4
3
|
showDetail: boolean;
|
|
5
4
|
fromSheetBar: boolean;
|
|
6
5
|
rule?: IPermissionPanelRule;
|
|
7
6
|
oldRule?: IPermissionPanelRule;
|
|
8
7
|
}
|
|
9
|
-
export declare const SheetPermissionPanel: ({ showDetail, fromSheetBar, rule, oldRule }: ISheetPermissionPanelProps) =>
|
|
8
|
+
export declare const SheetPermissionPanel: ({ showDetail, fromSheetBar, rule, oldRule }: ISheetPermissionPanelProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
10
9
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IRange } from '@univerjs/core';
|
|
2
2
|
import { IPermissionPanelRule } from '../../../services/permission/sheet-permission-panel.model';
|
|
3
3
|
import { EditStateEnum, ViewStateEnum } from '@univerjs/sheets';
|
|
4
|
-
import { default as React } from 'react';
|
|
5
4
|
interface IPermissionDetailFooterPartProps {
|
|
6
5
|
permissionId: string;
|
|
7
6
|
id: string;
|
|
@@ -12,5 +11,5 @@ interface IPermissionDetailFooterPartProps {
|
|
|
12
11
|
viewState: ViewStateEnum;
|
|
13
12
|
oldRule?: IPermissionPanelRule;
|
|
14
13
|
}
|
|
15
|
-
export declare const PermissionDetailFooterPart: (props: IPermissionDetailFooterPartProps) =>
|
|
14
|
+
export declare const PermissionDetailFooterPart: (props: IPermissionDetailFooterPartProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
16
15
|
export {};
|
|
@@ -11,5 +11,5 @@ interface IPermissionDetailMainPartProps {
|
|
|
11
11
|
rangeSelectorRef: React.MutableRefObject<any>;
|
|
12
12
|
onFocus: () => void;
|
|
13
13
|
}
|
|
14
|
-
export declare const PermissionDetailMainPart: (props: IPermissionDetailMainPartProps) =>
|
|
14
|
+
export declare const PermissionDetailMainPart: (props: IPermissionDetailMainPartProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
15
15
|
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { IPermissionPanelRule } from '../../../services/permission/sheet-permission-panel.model';
|
|
2
|
-
import { default as React } from 'react';
|
|
3
2
|
interface ISheetPermissionPanelDetailProps {
|
|
4
3
|
fromSheetBar: boolean;
|
|
5
4
|
rule?: IPermissionPanelRule;
|
|
6
5
|
oldRule?: IPermissionPanelRule;
|
|
7
6
|
}
|
|
8
|
-
export declare const SheetPermissionPanelDetail: (props: ISheetPermissionPanelDetailProps) =>
|
|
7
|
+
export declare const SheetPermissionPanelDetail: (props: ISheetPermissionPanelDetailProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export {};
|