@univerjs/sheets-ui 0.5.4 → 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.
Files changed (97) hide show
  1. package/lib/cjs/facade.js +1 -1
  2. package/lib/cjs/index.js +44 -48
  3. package/lib/cjs/locale/en-US.js +1 -1
  4. package/lib/cjs/locale/fa-IR.js +1 -1
  5. package/lib/cjs/locale/fr-FR.js +1 -1
  6. package/lib/cjs/locale/ru-RU.js +1 -1
  7. package/lib/cjs/locale/vi-VN.js +1 -1
  8. package/lib/cjs/locale/zh-CN.js +1 -1
  9. package/lib/cjs/locale/zh-TW.js +1 -1
  10. package/lib/es/facade.js +798 -474
  11. package/lib/es/index.js +17244 -16473
  12. package/lib/es/locale/en-US.js +2 -2
  13. package/lib/es/locale/fa-IR.js +2 -2
  14. package/lib/es/locale/fr-FR.js +2 -2
  15. package/lib/es/locale/ru-RU.js +2 -2
  16. package/lib/es/locale/vi-VN.js +2 -2
  17. package/lib/es/locale/zh-CN.js +2 -2
  18. package/lib/es/locale/zh-TW.js +2 -2
  19. package/lib/index.css +1 -1
  20. package/lib/types/commands/commands/clipboard.command.d.ts +1 -0
  21. package/lib/types/commands/commands/set-selection.command.d.ts +5 -0
  22. package/lib/types/common/keys.d.ts +1 -0
  23. package/lib/types/components/border-panel/BorderPanel.d.ts +1 -2
  24. package/lib/types/components/border-panel/border-line/BorderLine.d.ts +1 -2
  25. package/lib/types/components/border-panel/border-line/icons/BorderDashDot.d.ts +16 -2
  26. package/lib/types/components/border-panel/border-line/icons/BorderDashDotDot.d.ts +16 -2
  27. package/lib/types/components/border-panel/border-line/icons/BorderDashed.d.ts +16 -2
  28. package/lib/types/components/border-panel/border-line/icons/BorderDotted.d.ts +16 -2
  29. package/lib/types/components/border-panel/border-line/icons/BorderHair.d.ts +16 -2
  30. package/lib/types/components/border-panel/border-line/icons/BorderMedium.d.ts +16 -2
  31. package/lib/types/components/border-panel/border-line/icons/BorderMediumDashDot.d.ts +16 -2
  32. package/lib/types/components/border-panel/border-line/icons/BorderMediumDashDotDot.d.ts +16 -2
  33. package/lib/types/components/border-panel/border-line/icons/BorderMediumDashed.d.ts +16 -2
  34. package/lib/types/components/border-panel/border-line/icons/BorderThick.d.ts +16 -2
  35. package/lib/types/components/border-panel/border-line/icons/BorderThin.d.ts +16 -2
  36. package/lib/types/components/menu-item-input/MenuItemInput.d.ts +1 -2
  37. package/lib/types/controllers/clipboard/clipboard.controller.d.ts +1 -0
  38. package/lib/types/controllers/clipboard/utils.d.ts +0 -11
  39. package/lib/types/controllers/editor/data-sync.controller.d.ts +3 -1
  40. package/lib/types/controllers/editor/editing.render-controller.d.ts +3 -4
  41. package/lib/types/controllers/editor/formula-editor.controller.d.ts +4 -2
  42. package/lib/types/controllers/render-controllers/freeze.render-controller.d.ts +6 -2
  43. package/lib/types/facade/f-event.d.ts +279 -11
  44. package/lib/types/facade/f-range.d.ts +39 -2
  45. package/lib/types/facade/f-univer.d.ts +5 -1
  46. package/lib/types/facade/f-workbook.d.ts +18 -24
  47. package/lib/types/facade/f-worksheet.d.ts +26 -5
  48. package/lib/types/index.d.ts +2 -1
  49. package/lib/types/services/auto-fill/tools.d.ts +5 -0
  50. package/lib/types/services/canvas-pop-manager.service.d.ts +41 -6
  51. package/lib/types/services/clipboard/clipboard.service.d.ts +5 -2
  52. package/lib/types/services/clipboard/type.d.ts +69 -5
  53. package/lib/types/services/editor/cell-editor-resize.service.d.ts +3 -2
  54. package/lib/types/services/editor-bridge.service.d.ts +3 -1
  55. package/lib/types/services/hover-manager.service.d.ts +41 -0
  56. package/lib/types/services/selection/base-selection-render.service.d.ts +4 -0
  57. package/lib/types/services/selection/selection-control.d.ts +2 -2
  58. package/lib/types/services/sheet-skeleton-manager.service.d.ts +2 -1
  59. package/lib/types/views/cell-alert/CellAlertPopup.d.ts +1 -2
  60. package/lib/types/views/clipboard/ClipboardPopupMenu.d.ts +16 -2
  61. package/lib/types/views/count-bar/CountBar.d.ts +16 -2
  62. package/lib/types/views/count-bar/ZoomSlider.d.ts +16 -2
  63. package/lib/types/views/defined-name/DefinedName.d.ts +16 -2
  64. package/lib/types/views/defined-name/DefinedNameContainer.d.ts +16 -2
  65. package/lib/types/views/defined-name/DefinedNameInput.d.ts +1 -2
  66. package/lib/types/views/defined-name/DefinedNameOverlay.d.ts +16 -2
  67. package/lib/types/views/editor-container/hooks.d.ts +8 -0
  68. package/lib/types/views/formula-bar/FormulaBar.d.ts +16 -2
  69. package/lib/types/views/mobile/sheet-bar/MobileSheetBar.d.ts +16 -2
  70. package/lib/types/views/permission/error-msg-dialog/index.d.ts +16 -2
  71. package/lib/types/views/permission/panel/index.d.ts +1 -2
  72. package/lib/types/views/permission/panel-detail/PermissionDetailFooterPart.d.ts +1 -2
  73. package/lib/types/views/permission/panel-detail/PermissionDetailMainPart.d.ts +1 -1
  74. package/lib/types/views/permission/panel-detail/PermissionDetailPanel.d.ts +1 -2
  75. package/lib/types/views/permission/panel-detail/PermissionDetailUserPart.d.ts +1 -2
  76. package/lib/types/views/permission/panel-list/index.d.ts +16 -2
  77. package/lib/types/views/permission/permission-dialog/index.d.ts +16 -2
  78. package/lib/types/views/permission/spin/index.d.ts +1 -1
  79. package/lib/types/views/permission/user-dialog/index.d.ts +16 -2
  80. package/lib/types/views/sheet-bar/SheetBar.d.ts +16 -2
  81. package/lib/types/views/sheet-bar/sheet-bar-button/SheetBarButton.d.ts +1 -1
  82. package/lib/types/views/sheet-bar/sheet-bar-menu/SheetBarMenu.d.ts +1 -1
  83. package/lib/types/views/sheet-bar/sheet-bar-tabs/SheetBarItem.d.ts +1 -1
  84. package/lib/types/views/sheet-bar/sheet-bar-tabs/SheetBarTabs.d.ts +16 -2
  85. package/lib/types/views/sheet-container/SheetContainer.d.ts +18 -4
  86. package/lib/types/views/status-bar/StatusBar.d.ts +16 -2
  87. package/lib/umd/facade.js +1 -1
  88. package/lib/umd/index.js +44 -48
  89. package/lib/umd/locale/en-US.js +1 -1
  90. package/lib/umd/locale/fa-IR.js +1 -1
  91. package/lib/umd/locale/fr-FR.js +1 -1
  92. package/lib/umd/locale/ru-RU.js +1 -1
  93. package/lib/umd/locale/vi-VN.js +1 -1
  94. package/lib/umd/locale/zh-CN.js +1 -1
  95. package/lib/umd/locale/zh-TW.js +1 -1
  96. package/package.json +13 -13
  97. package/LICENSE +0 -176
@@ -106,3 +106,8 @@ export declare function getAutoFillRepeatRange(sourceRange: IRange, targetRange:
106
106
  * @returns
107
107
  */
108
108
  export declare function needsUpdateCellValue(cell: ICellData): boolean;
109
+ /**
110
+ * Remove cell.custom
111
+ * @param cell
112
+ */
113
+ export declare function removeCellCustom(cell: Nullable<ICellData>): void;
@@ -1,10 +1,12 @@
1
- import { DrawingTypeEnum, ICommandInfo, INeedCheckDisposable, Nullable, Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
1
+ import { DrawingTypeEnum, ICommandInfo, INeedCheckDisposable, IRange, 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,20 +55,49 @@ 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
+ * Bind popup to the right part of cell at(row, col).
61
+ * This popup would move with the cell.
55
62
  * @param row
56
63
  * @param col
57
64
  * @param popup
58
65
  * @param _unitId
59
66
  * @param _subUnitId
60
67
  * @param viewport
68
+ * @returns
69
+ */
70
+ attachPopupToCell(row: number, col: number, popup: ICanvasPopup, _unitId?: string, _subUnitId?: string, viewport?: Viewport): Nullable<INeedCheckDisposable>;
71
+ /**
72
+ * attach Comp to floatDOM
73
+ * @param range
74
+ * @param popup
75
+ * @param _unitId
76
+ * @param _subUnitId
77
+ * @param viewport
61
78
  * @param showOnSelectionMoving
62
79
  * @returns
63
80
  */
64
- attachPopupToCell(row: number, col: number, popup: ICanvasPopup, _unitId?: string, _subUnitId?: string, viewport?: Viewport, showOnSelectionMoving?: boolean): Nullable<INeedCheckDisposable>;
81
+ attachRangePopup(range: IRange, popup: ICanvasPopup, _unitId?: string, _subUnitId?: string, viewport?: Viewport, showOnSelectionMoving?: boolean): Nullable<INeedCheckDisposable>;
82
+ /**
83
+ *
84
+ * @param initialRow
85
+ * @param initialCol
86
+ * @param currentRender
87
+ * @param skeleton
88
+ * @param activeViewport
89
+ * @returns
90
+ */
65
91
  private _createCellPositionObserver;
66
92
  private _calcCellPositionByCell;
93
+ /**
94
+ * Unlike _createCellPositionObserver, this accept a range not a single cell.
95
+ * @param initialRow
96
+ * @param initialCol
97
+ * @param currentRender
98
+ * @param skeleton
99
+ * @param activeViewport
100
+ */
101
+ private _createRangePositionObserver;
67
102
  }
68
103
  export {};
@@ -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;
@@ -56,20 +56,36 @@ export interface ISpecialPasteInfo {
56
56
  /**
57
57
  * `ClipboardHook` could:
58
58
  * 1. Before copy/cut/paste, decide whether to execute the command and prepare caches if necessary.
59
- * 1. When copying, decide what content could be written into clipboard.
60
- * 1. When pasting, get access to the clipboard content and append mutations to the paste command.
59
+ * 2. When copying, decide what content could be written into clipboard.
60
+ * 3. When pasting, get access to the clipboard content and append mutations to the paste command.
61
61
  */
62
62
  export interface ISheetClipboardHook {
63
+ /**
64
+ * The unique id of the hook.
65
+ */
63
66
  id: string;
67
+ /**
68
+ * Whether this hook is the default hook.
69
+ */
64
70
  isDefaultHook?: boolean;
71
+ /**
72
+ * Only special paste info should be provided, which will replace the default hook.
73
+ */
65
74
  specialPasteInfo?: ISpecialPasteInfo;
75
+ /**
76
+ * The priority of the hook. The higher the priority, the earlier the hook would be called.
77
+ */
66
78
  priority?: number;
67
79
  /**
68
80
  * The callback would be called after the clipboard service has decided what region need to be copied.
69
81
  * Features could use this hook to build copying cache or any other pre-copy jobs.
82
+ * @param unitId
83
+ * @param subUnitId
84
+ * @param range
70
85
  */
71
- onBeforeCopy?(unitId: string, subUnitId: string, range: IRange): void;
86
+ onBeforeCopy?(unitId: string, subUnitId: string, range: IRange, copyType: COPY_TYPE): void;
72
87
  /**
88
+ * Properties that would be appended to the td element.
73
89
  *
74
90
  * @param row
75
91
  * @param col
@@ -82,16 +98,21 @@ export interface ISheetClipboardHook {
82
98
  * @deprecated should be merged with `onCopyCellContent` to `onCopyCell`
83
99
  * @param row row of the the copied cell
84
100
  * @param col col of the the copied cell
101
+ * @param rowSpan row span of the the copied cell
102
+ * @param colSpan col span of the the copied cell
103
+ * @return content
85
104
  */
86
105
  onCopyCellStyle?(row: number, col: number, rowSpan?: number, colSpan?: number): IClipboardPropertyItem | null;
87
106
  /**
88
107
  * Properties that would be appended to the tr element.
89
108
  * @param row each row of the the copied range
109
+ * @return content
90
110
  */
91
111
  onCopyRow?(row: number): IClipboardPropertyItem | null;
92
112
  /**
93
113
  * Properties that would be appended to the col element.
94
114
  * @param col each col of the copied range
115
+ * @return content
95
116
  */
96
117
  onCopyColumn?(col: number): IClipboardPropertyItem | null;
97
118
  /**
@@ -103,30 +124,73 @@ export interface ISheetClipboardHook {
103
124
  * The callback would be called after the clipboard service has decided what region need to be pasted.
104
125
  * Features could use this hook to build copying cache or any other pre-copy jobs.
105
126
  *
127
+ * @param pasteTo
106
128
  * @returns if it block copying it should return false
107
129
  */
108
130
  onBeforePaste?(pasteTo: ISheetDiscreteRangeLocation): boolean;
109
131
  /**
132
+ * Handles pasting cells, it needs to return Undo Mutations & Redo Mutations that handle the cell contents
110
133
  *
111
- * @param row
112
- * @param col
134
+ * @param pasteFrom
135
+ * @param pasteTo
136
+ * @param data
137
+ * @param payload
138
+ * @returns undo and redo mutations
113
139
  */
114
140
  onPasteCells?(pasteFrom: ISheetDiscreteRangeLocation | null, pasteTo: ISheetDiscreteRangeLocation, data: ObjectMatrix<ICellDataWithSpanInfo>, payload: ICopyPastePayload): {
115
141
  undos: IMutationInfo[];
116
142
  redos: IMutationInfo[];
117
143
  };
144
+ /**
145
+ * Handle the pasted row properties, it needs to return the Undo Mutations & Redo Mutations that handle the row properties
146
+ *
147
+ * @param pasteTo
148
+ * @param rowProperties
149
+ * @param payload
150
+ * @returns undo and redo mutations
151
+ */
118
152
  onPasteRows?(pasteTo: ISheetDiscreteRangeLocation, rowProperties: IClipboardPropertyItem[], payload: ICopyPastePayload): {
119
153
  undos: IMutationInfo[];
120
154
  redos: IMutationInfo[];
121
155
  };
156
+ /**
157
+ * Handle the pasted column properties, it needs to return the Undo Mutations & Redo Mutations that handle the column properties
158
+ *
159
+ * @param pasteTo
160
+ * @param colProperties
161
+ * @param payload
162
+ * @returns undo and redo mutations
163
+ */
122
164
  onPasteColumns?(pasteTo: ISheetDiscreteRangeLocation, colProperties: IClipboardPropertyItem[], payload: ICopyPastePayload): {
123
165
  undos: IMutationInfo[];
124
166
  redos: IMutationInfo[];
125
167
  };
168
+ /**
169
+ * Hanle the pasted plain text, it needs to return the Undo Mutations & Redo Mutations that handle the plain text
170
+ *
171
+ * @param pasteTo
172
+ * @param text
173
+ * @param payload
174
+ * @returns undo and redo mutations
175
+ */
126
176
  onPastePlainText?(pasteTo: ISheetDiscreteRangeLocation, text: string, payload: ICopyPastePayload): {
127
177
  undos: IMutationInfo[];
128
178
  redos: IMutationInfo[];
129
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
+ };
188
+ /**
189
+ * Would be called after paste content has been written into Univer.
190
+ * Features could do some cleaning up jobs here.
191
+ *
192
+ * @param success whether the paste operation is successful
193
+ */
130
194
  onAfterPaste?(success: boolean): void;
131
195
  /**
132
196
  * The callback would be called before the clipboard service decides what region need to be copied from or pasted to.
@@ -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
- constructor(_context: IRenderContext<Workbook>, _layoutService: ILayoutService, _cellEditorManagerService: ICellEditorManagerService, _editorBridgeService: IEditorBridgeService, _renderManagerService: IRenderManagerService, _sheetSkeletonManagerService: SheetSkeletonManagerService);
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;
@@ -45,6 +45,11 @@ export interface IHoverRichTextPosition extends ISheetLocationBase {
45
45
  drawing?: Nullable<string>;
46
46
  event?: IMouseEvent | IPointerEvent;
47
47
  }
48
+ export interface IHoverHeaderPosition {
49
+ unitId: string;
50
+ subUnitId: string;
51
+ index: number;
52
+ }
48
53
  export declare function getLocationBase(location: ISheetLocation): {
49
54
  unitId: string;
50
55
  subUnitId: string;
@@ -57,9 +62,20 @@ export declare class HoverManagerService extends Disposable {
57
62
  private _currentCell$;
58
63
  private _currentRichText$;
59
64
  private _currentClickedCell$;
65
+ private _currentDbClickedCell$;
60
66
  private _currentCellWithEvent$;
61
67
  private _currentPointerDownCell$;
62
68
  private _currentPointerUpCell$;
69
+ private _currentHoveredRowHeader$;
70
+ private _currentHoveredColHeader$;
71
+ private _currentRowHeaderClick$;
72
+ private _currentColHeaderClick$;
73
+ private _currentRowHeaderDbClick$;
74
+ private _currentColHeaderDbClick$;
75
+ private _currentRowHeaderPointerDown$;
76
+ private _currentColHeaderPointerDown$;
77
+ private _currentRowHeaderPointerUp$;
78
+ private _currentColHeaderPointerUp$;
63
79
  currentCell$: import('rxjs').Observable<Nullable<IHoverCellPosition>>;
64
80
  currentRichText$: import('rxjs').Observable<void | IHoverRichTextPosition | null | undefined>;
65
81
  /**
@@ -68,12 +84,26 @@ export declare class HoverManagerService extends Disposable {
68
84
  currentCellPosWithEvent$: import('rxjs').Observable<void | ICellPosWithEvent | null | undefined>;
69
85
  currentPosition$: import('rxjs').Observable<Nullable<IHoverCellPosition>>;
70
86
  currentClickedCell$: import('rxjs').Observable<IHoverRichTextInfo>;
87
+ currentDbClickedCell$: import('rxjs').Observable<IHoverRichTextInfo>;
71
88
  currentPointerDownCell$: import('rxjs').Observable<ICellPosWithEvent>;
72
89
  currentPointerUpCell$: import('rxjs').Observable<ICellPosWithEvent>;
90
+ currentHoveredRowHeader$: import('rxjs').Observable<Nullable<IHoverHeaderPosition>>;
91
+ currentHoveredColHeader$: import('rxjs').Observable<Nullable<IHoverHeaderPosition>>;
92
+ currentRowHeaderClick$: import('rxjs').Observable<IHoverHeaderPosition>;
93
+ currentColHeaderClick$: import('rxjs').Observable<IHoverHeaderPosition>;
94
+ currentRowHeaderDbClick$: import('rxjs').Observable<IHoverHeaderPosition>;
95
+ currentColHeaderDbClick$: import('rxjs').Observable<IHoverHeaderPosition>;
96
+ currentRowHeaderPointerDown$: import('rxjs').Observable<IHoverHeaderPosition>;
97
+ currentColHeaderPointerDown$: import('rxjs').Observable<IHoverHeaderPosition>;
98
+ currentRowHeaderPointerUp$: import('rxjs').Observable<IHoverHeaderPosition>;
99
+ currentColHeaderPointerUp$: import('rxjs').Observable<IHoverHeaderPosition>;
73
100
  constructor(_univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService);
74
101
  dispose(): void;
75
102
  private _initCellDisposableListener;
103
+ private _getCalcDeps;
76
104
  private _calcActiveCell;
105
+ private _calcActiveRowHeader;
106
+ private _calcActiveColHeader;
77
107
  triggerPointerDown(unitId: string, event: IPointerEvent | IMouseEvent): void;
78
108
  triggerPointerUp(unitId: string, event: IPointerEvent | IMouseEvent): void;
79
109
  triggerMouseMove(unitId: string, event: IPointerEvent | IMouseEvent): void;
@@ -84,5 +114,16 @@ export declare class HoverManagerService extends Disposable {
84
114
  * @param offsetY
85
115
  */
86
116
  triggerClick(unitId: string, offsetX: number, offsetY: number): void;
117
+ triggerDbClick(unitId: string, offsetX: number, offsetY: number): void;
87
118
  triggerScroll(): void;
119
+ triggerRowHeaderClick(unitId: string, offsetX: number, offsetY: number): void;
120
+ triggerColHeaderClick(unitId: string, offsetX: number, offsetY: number): void;
121
+ triggerRowHeaderDbClick(unitId: string, offsetX: number, offsetY: number): void;
122
+ triggerColHeaderDbClick(unitId: string, offsetX: number, offsetY: number): void;
123
+ triggerRowHeaderMouseMove(unitId: string, offsetX: number, offsetY: number): void;
124
+ triggerColHeaderMouseMove(unitId: string, offsetX: number, offsetY: number): void;
125
+ triggerRowHeaderPoniterDown(unitId: string, offsetX: number, offsetY: number): void;
126
+ triggerColHeaderPoniterDown(unitId: string, offsetX: number, offsetY: number): void;
127
+ triggerRowHeaderPoniterUp(unitId: string, offsetX: number, offsetY: number): void;
128
+ triggerColHeaderPoniterUp(unitId: string, offsetX: number, offsetY: number): void;
88
129
  }
@@ -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
  /**
@@ -57,6 +58,7 @@ export declare class BaseSelectionRenderService extends Disposable implements IS
57
58
  readonly controlFillConfig$: Observable<IControlFillConfig | null>;
58
59
  protected _selectionControls: SelectionControl[];
59
60
  protected _startRangeWhenPointerDown: IRangeWithCoord;
61
+ protected _activeControlIndex: number;
60
62
  /**
61
63
  * the posX of viewport when the pointer down
62
64
  */
@@ -158,6 +160,8 @@ export declare class BaseSelectionRenderService extends Disposable implements IS
158
160
  * 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
161
  */
160
162
  getActiveRange(): Nullable<IRange>;
163
+ setActiveSelectionIndex(index: number): void;
164
+ resetActiveSelectionIndex(): void;
161
165
  /**
162
166
  * get active(actually last) selection control
163
167
  * @returns T extends SelectionControl
@@ -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
- }): React.JSX.Element | null;
9
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -1,2 +1,16 @@
1
- import { default as React } from 'react';
2
- export declare const ClipboardPopupMenu: () => React.JSX.Element | null;
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
- import { default as React } from 'react';
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): React.JSX.Element;
20
+ export declare function CountBar(props: ICountBarProps): import("react/jsx-runtime").JSX.Element;
7
21
  export {};
@@ -1,2 +1,16 @@
1
- import { default as React } from 'react';
2
- export declare function ZoomSlider(): React.JSX.Element;
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
- import { default as React } from 'react';
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
- }): React.JSX.Element;
18
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,16 @@
1
- import { default as React } from 'react';
2
- export declare const DefinedNameContainer: () => React.JSX.Element | undefined;
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) => React.JSX.Element | undefined;
10
+ export declare const DefinedNameInput: (props: IDefinedNameInputProps) => import("react/jsx-runtime").JSX.Element | undefined;
@@ -1,4 +1,18 @@
1
- import { default as React } from 'react';
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): React.JSX.Element;
18
+ export declare function DefinedNameOverlay(props: IDefinedNameOverlayProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { KeyCode } from '@univerjs/ui';
2
+ export declare function useKeyEventConfig(isRefSelecting: React.MutableRefObject<0 | 1 | 2>, unitId: string): {
3
+ keyCodes: {
4
+ keyCode: KeyCode;
5
+ }[];
6
+ handler: (keycode: KeyCode) => void;
7
+ };
8
+ export declare function useIsFocusing(editorId: string): boolean | undefined;
@@ -1,2 +1,16 @@
1
- import { default as React } from 'react';
2
- export declare function FormulaBar(): React.JSX.Element;
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
- import { default as React } from 'react';
2
- export declare function MobileSheetBar(): React.JSX.Element | null;
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;