@univerjs/sheets-drawing-ui 0.5.5-nightly.202501211606 → 0.5.5
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/LICENSE +176 -0
- package/lib/cjs/index.js +2 -2
- package/lib/es/facade.js +330 -346
- package/lib/es/index.js +2296 -2582
- 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/types/controllers/sheet-drawing-copy-paste.controller.d.ts +5 -11
- package/lib/types/controllers/sheet-drawing-update.controller.d.ts +2 -2
- package/lib/types/controllers/sheet-drawing.controller.d.ts +1 -5
- package/lib/types/facade/f-over-grid-image.d.ts +0 -6
- package/lib/types/facade/f-univer.d.ts +0 -6
- package/lib/types/facade/f-worksheet.d.ts +5 -5
- package/lib/types/index.d.ts +1 -1
- package/lib/types/services/canvas-float-dom-manager.service.d.ts +4 -13
- package/lib/umd/index.js +2 -2
- package/package.json +12 -12
package/lib/es/locale/en-US.js
CHANGED
package/lib/es/locale/fa-IR.js
CHANGED
package/lib/es/locale/fr-FR.js
CHANGED
package/lib/es/locale/ru-RU.js
CHANGED
package/lib/es/locale/vi-VN.js
CHANGED
package/lib/es/locale/zh-CN.js
CHANGED
package/lib/es/locale/zh-TW.js
CHANGED
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
import { Disposable
|
|
2
|
-
import { IDrawingManagerService } from '@univerjs/drawing';
|
|
1
|
+
import { Disposable } from '@univerjs/core';
|
|
3
2
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
3
|
+
import { ISheetDrawingService } from '@univerjs/sheets-drawing';
|
|
4
4
|
import { ISheetClipboardService } from '@univerjs/sheets-ui';
|
|
5
|
-
import { IClipboardInterfaceService } from '@univerjs/ui';
|
|
6
5
|
export declare class SheetsDrawingCopyPasteController extends Disposable {
|
|
7
6
|
private _sheetClipboardService;
|
|
8
7
|
private readonly _renderManagerService;
|
|
9
|
-
private readonly
|
|
10
|
-
private readonly _clipboardInterfaceService;
|
|
11
|
-
private readonly _commandService;
|
|
8
|
+
private readonly _sheetDrawingService;
|
|
12
9
|
private _copyInfo;
|
|
13
|
-
constructor(_sheetClipboardService: ISheetClipboardService, _renderManagerService: IRenderManagerService,
|
|
14
|
-
private get _focusedDrawings();
|
|
10
|
+
constructor(_sheetClipboardService: ISheetClipboardService, _renderManagerService: IRenderManagerService, _sheetDrawingService: ISheetDrawingService);
|
|
15
11
|
private _initCopyPaste;
|
|
16
|
-
private
|
|
17
|
-
private _generateSingleDrawingPasteMutations;
|
|
12
|
+
private _collect;
|
|
18
13
|
private _generateMutations;
|
|
19
|
-
private _generateRangeDrawingsPasteMutations;
|
|
20
14
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IAccessor, Workbook, Disposable, ICommandService, IContextService, Injector, LocaleService } from '@univerjs/core';
|
|
2
|
-
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
3
2
|
import { ISheetLocationBase, SheetsSelectionsService } from '@univerjs/sheets';
|
|
4
3
|
import { IDrawingManagerService, IImageIoService } from '@univerjs/drawing';
|
|
4
|
+
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
5
5
|
import { ISheetDrawingService } from '@univerjs/sheets-drawing';
|
|
6
6
|
import { ISheetSelectionRenderService, SheetSkeletonManagerService } from '@univerjs/sheets-ui';
|
|
7
7
|
import { ILocalFileService, IMessageService } from '@univerjs/ui';
|
|
@@ -35,7 +35,7 @@ export declare class SheetDrawingUpdateController extends Disposable implements
|
|
|
35
35
|
constructor(_context: IRenderContext<Workbook>, _skeletonManagerService: SheetSkeletonManagerService, _commandService: ICommandService, _selectionRenderService: ISheetSelectionRenderService, _imageIoService: IImageIoService, _fileOpenerService: ILocalFileService, _sheetDrawingService: ISheetDrawingService, _drawingManagerService: IDrawingManagerService, _contextService: IContextService, _messageService: IMessageService, _localeService: LocaleService, selectionManagerService: SheetsSelectionsService, _injector: Injector);
|
|
36
36
|
insertFloatImage(): Promise<boolean>;
|
|
37
37
|
insertCellImage(): Promise<boolean>;
|
|
38
|
-
|
|
38
|
+
private _insertFloatImage;
|
|
39
39
|
private _insertCellImage;
|
|
40
40
|
private _getUnitInfo;
|
|
41
41
|
private _getImagePosition;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { Disposable, ICommandService } from '@univerjs/core';
|
|
2
|
-
import { IDrawingManagerService } from '@univerjs/drawing';
|
|
3
|
-
import { SheetsSelectionsService } from '@univerjs/sheets';
|
|
4
2
|
import { ComponentManager, IMenuManagerService, IShortcutService } from '@univerjs/ui';
|
|
5
3
|
export declare class SheetDrawingUIController extends Disposable {
|
|
6
4
|
private readonly _componentManager;
|
|
7
5
|
private readonly _menuManagerService;
|
|
8
6
|
private readonly _commandService;
|
|
9
7
|
private readonly _shortcutService;
|
|
10
|
-
|
|
11
|
-
private readonly _sheetsSelectionsService;
|
|
12
|
-
constructor(_componentManager: ComponentManager, _menuManagerService: IMenuManagerService, _commandService: ICommandService, _shortcutService: IShortcutService, _drawingManagerService: IDrawingManagerService, _sheetsSelectionsService: SheetsSelectionsService);
|
|
8
|
+
constructor(_componentManager: ComponentManager, _menuManagerService: IMenuManagerService, _commandService: ICommandService, _shortcutService: IShortcutService);
|
|
13
9
|
private _initCustomComponents;
|
|
14
10
|
private _initMenus;
|
|
15
11
|
private _initCommands;
|
|
@@ -3,9 +3,6 @@ import { ICellOverGridPosition } from '@univerjs/sheets';
|
|
|
3
3
|
import { ISheetImage, SheetDrawingAnchorType } from '@univerjs/sheets-drawing';
|
|
4
4
|
export interface IFOverGridImage extends Omit<ISheetImage, 'sheetTransform' | 'transform'>, ICellOverGridPosition, IRotationSkewFlipTransform, Required<ISize> {
|
|
5
5
|
}
|
|
6
|
-
/**
|
|
7
|
-
* @hideconstructor
|
|
8
|
-
*/
|
|
9
6
|
export declare class FOverGridImageBuilder {
|
|
10
7
|
protected readonly _injector: Injector;
|
|
11
8
|
private _image;
|
|
@@ -235,9 +232,6 @@ export declare class FOverGridImageBuilder {
|
|
|
235
232
|
setSubUnitId(subUnitId: string): FOverGridImageBuilder;
|
|
236
233
|
buildAsync(): Promise<ISheetImage>;
|
|
237
234
|
}
|
|
238
|
-
/**
|
|
239
|
-
* @hideconstructor
|
|
240
|
-
*/
|
|
241
235
|
export declare class FOverGridImage extends FBase {
|
|
242
236
|
private _image;
|
|
243
237
|
protected readonly _commandService: ICommandService;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { Injector, FUniver } from '@univerjs/core';
|
|
2
|
-
/**
|
|
3
|
-
* @ignore
|
|
4
|
-
*/
|
|
5
2
|
export declare class FUniverDrawingMixin extends FUniver {
|
|
6
|
-
/**
|
|
7
|
-
* @ignore
|
|
8
|
-
*/
|
|
9
3
|
_initialize(injector: Injector): void;
|
|
10
4
|
private _beforeOverGridImageInsert;
|
|
11
5
|
private _overGridImageInserted;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IDisposable, IFBlobSource, Nullable } from '@univerjs/core';
|
|
2
2
|
import { FRange, FWorksheet } from '@univerjs/sheets/facade';
|
|
3
3
|
import { ISheetImage } from '@univerjs/sheets-drawing';
|
|
4
|
-
import { ICanvasFloatDom,
|
|
4
|
+
import { ICanvasFloatDom, IDOMRangeLayout } from '@univerjs/sheets-drawing-ui';
|
|
5
5
|
import { IFComponentKey } from '@univerjs/sheets-ui/facade';
|
|
6
6
|
import { FOverGridImage, FOverGridImageBuilder } from './f-over-grid-image';
|
|
7
7
|
export interface IFICanvasFloatDom extends Omit<ICanvasFloatDom, 'componentKey' | 'unitId' | 'subUnitId'>, IFComponentKey {
|
|
@@ -86,7 +86,7 @@ export interface IFWorksheetLegacy {
|
|
|
86
86
|
|
|
87
87
|
* ```
|
|
88
88
|
*/
|
|
89
|
-
addFloatDomToRange(range: FRange, layer: IFICanvasFloatDom, domLayout:
|
|
89
|
+
addFloatDomToRange(range: FRange, layer: IFICanvasFloatDom, domLayout: IDOMRangeLayout, id?: string): Nullable<{
|
|
90
90
|
id: string;
|
|
91
91
|
dispose: () => void;
|
|
92
92
|
}>;
|
|
@@ -114,7 +114,7 @@ export interface IFWorksheetLegacy {
|
|
|
114
114
|
}
|
|
115
115
|
*```
|
|
116
116
|
*/
|
|
117
|
-
addFloatDomToColumnHeader(column: number, layer: IFICanvasFloatDom, domPos:
|
|
117
|
+
addFloatDomToColumnHeader(column: number, layer: IFICanvasFloatDom, domPos: IDOMRangeLayout, id?: string): Nullable<{
|
|
118
118
|
id: string;
|
|
119
119
|
dispose: () => void;
|
|
120
120
|
}>;
|
|
@@ -240,11 +240,11 @@ export declare class FWorksheetLegacy extends FWorksheet implements IFWorksheetL
|
|
|
240
240
|
id: string;
|
|
241
241
|
dispose: () => void;
|
|
242
242
|
}>;
|
|
243
|
-
addFloatDomToRange(fRange: FRange, layer: IFICanvasFloatDom, domLayout:
|
|
243
|
+
addFloatDomToRange(fRange: FRange, layer: IFICanvasFloatDom, domLayout: IDOMRangeLayout, id?: string): Nullable<{
|
|
244
244
|
id: string;
|
|
245
245
|
dispose: () => void;
|
|
246
246
|
}>;
|
|
247
|
-
addFloatDomToColumnHeader(column: number, layer: IFICanvasFloatDom, domLayout:
|
|
247
|
+
addFloatDomToColumnHeader(column: number, layer: IFICanvasFloatDom, domLayout: IDOMRangeLayout, id?: string): Nullable<{
|
|
248
248
|
id: string;
|
|
249
249
|
dispose: () => void;
|
|
250
250
|
}>;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import './global.css';
|
|
17
17
|
export { UniverSheetsDrawingUIPlugin } from './plugin';
|
|
18
|
-
export { type ICanvasFloatDom, type
|
|
18
|
+
export { type ICanvasFloatDom, type IDOMRangeLayout, SheetCanvasFloatDomManagerService } from './services/canvas-float-dom-manager.service';
|
|
19
19
|
export { SHEETS_IMAGE_MENU_ID } from './views/menu/image.menu';
|
|
20
20
|
export { DeleteDrawingsCommand } from './commands/commands/delete-drawings.command';
|
|
21
21
|
export { GroupSheetDrawingCommand } from './commands/commands/group-sheet-drawing.command';
|
|
@@ -52,9 +52,8 @@ interface ICanvasFloatDomInfo {
|
|
|
52
52
|
subUnitId: string;
|
|
53
53
|
boundsOfViewArea?: IBoundRectNoAngle;
|
|
54
54
|
scrollDirectionResponse?: ScrollDirectionResponse;
|
|
55
|
-
domAnchor?: IDOMAnchor;
|
|
56
55
|
}
|
|
57
|
-
export interface
|
|
56
|
+
export interface IDOMRangeLayout {
|
|
58
57
|
width: number;
|
|
59
58
|
height: number;
|
|
60
59
|
horizonOffsetAlign?: 'left' | 'right';
|
|
@@ -89,12 +88,9 @@ export declare class SheetCanvasFloatDomManagerService extends Disposable {
|
|
|
89
88
|
private readonly _sheetDrawingService;
|
|
90
89
|
protected readonly _lifecycleService: LifecycleService;
|
|
91
90
|
/**
|
|
92
|
-
* for update dom container position when scrolling
|
|
91
|
+
* for update dom container position when scrolling
|
|
93
92
|
*/
|
|
94
93
|
private _domLayerMap;
|
|
95
|
-
/**
|
|
96
|
-
* for update dom container position when scrolling and zoom
|
|
97
|
-
*/
|
|
98
94
|
private _domLayerInfoMap;
|
|
99
95
|
private _transformChange$;
|
|
100
96
|
transformChange$: import('rxjs').Observable<{
|
|
@@ -117,11 +113,6 @@ export declare class SheetCanvasFloatDomManagerService extends Disposable {
|
|
|
117
113
|
private _hooks;
|
|
118
114
|
constructor(_renderManagerService: IRenderManagerService, _univerInstanceService: IUniverInstanceService, _commandService: ICommandService, _drawingManagerService: IDrawingManagerService, _canvasFloatDomService: CanvasFloatDomService, _sheetDrawingService: ISheetDrawingService, _lifecycleService: LifecycleService);
|
|
119
115
|
private _bindScrollEvent;
|
|
120
|
-
/**
|
|
121
|
-
* For scrolling and zoom
|
|
122
|
-
* @param unitId
|
|
123
|
-
* @param subUnitId
|
|
124
|
-
*/
|
|
125
116
|
private _ensureMap;
|
|
126
117
|
getFloatDomInfo(id: string): ICanvasFloatDomInfo | undefined;
|
|
127
118
|
private _getSceneAndTransformerByDrawingSearch;
|
|
@@ -138,11 +129,11 @@ export declare class SheetCanvasFloatDomManagerService extends Disposable {
|
|
|
138
129
|
} | undefined;
|
|
139
130
|
private _removeDom;
|
|
140
131
|
addHook(hook: ISheetCanvasFloatDomHook): IDisposable;
|
|
141
|
-
addFloatDomToRange(range: IRange, config: ICanvasFloatDom,
|
|
132
|
+
addFloatDomToRange(range: IRange, config: ICanvasFloatDom, domPos: IDOMRangeLayout, propId?: string): {
|
|
142
133
|
id: string;
|
|
143
134
|
dispose: () => void;
|
|
144
135
|
} | undefined;
|
|
145
|
-
addFloatDomToColumnHeader(column: number, config: ICanvasFloatDom,
|
|
136
|
+
addFloatDomToColumnHeader(column: number, config: ICanvasFloatDom, domLayout: IDOMRangeLayout, propId?: string): {
|
|
146
137
|
id: string;
|
|
147
138
|
dispose: () => void;
|
|
148
139
|
} | undefined;
|