@univerjs/sheets-drawing-ui 0.2.15 → 0.3.0-alpha.1
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/es/index.js
CHANGED
|
@@ -2,15 +2,15 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value;
|
|
3
3
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key != "symbol" ? key + "" : key, value);
|
|
5
|
-
import { CommandType, ICommandService, IUndoRedoService, LocaleService, IUniverInstanceService, useDependency,
|
|
5
|
+
import { CommandType, ICommandService, IUndoRedoService, LocaleService, IUniverInstanceService, useDependency, OnLifecycle, LifecycleStages, Inject, Injector, RxDisposable, UniverInstanceType, connectInjector, toDisposable, FOCUSING_COMMON_DRAWINGS, IContextService, Disposable, Direction, FOCUSING_FX_BAR_EDITOR, EDITOR_ACTIVATED, Rectangle, DrawingTypeEnum as DrawingTypeEnum$1, DisposableCollection, generateRandomId, Tools, UserManagerService, IPermissionService, LifecycleService, DependentOn, Plugin, IConfigService } from "@univerjs/core";
|
|
6
6
|
import { ImageCropperObject, COMPONENT_IMAGE_POPUP_MENU, OpenImageCropOperation, ImageResetSizeOperation, DrawingCommonPanel, DrawingRenderService, UniverDrawingUIPlugin } from "@univerjs/drawing-ui";
|
|
7
7
|
import { ISheetDrawingService, SetDrawingApplyMutation, DrawingApplyType, SheetDrawingAnchorType, UniverSheetsDrawingPlugin } from "@univerjs/sheets-drawing";
|
|
8
8
|
import { IDrawingManagerService, IImageIoService, DrawingTypeEnum, ArrangeTypeEnum, DRAWING_IMAGE_ALLOW_IMAGE_LIST, DRAWING_IMAGE_COUNT_LIMIT, ImageUploadStatusType, DRAWING_IMAGE_ALLOW_SIZE, getImageSize, DRAWING_IMAGE_WIDTH_LIMIT, DRAWING_IMAGE_HEIGHT_LIMIT, getDrawingShapeKeyByDrawingSearch, UniverDrawingPlugin } from "@univerjs/drawing";
|
|
9
9
|
import { IRenderManagerService, precisionTo, getGroupState, transformObjectOutOfGroup, Rect, DRAWING_OBJECT_LAYER_INDEX, SHEET_VIEWPORT_KEY, RENDER_CLASS_TYPE } from "@univerjs/engine-render";
|
|
10
10
|
import { SheetCanvasPopManagerService, attachRangeWithCoord, SheetSkeletonManagerService, ISheetSelectionRenderService, getCurrentRangeDisable$, SetScrollOperation, SetZoomRatioOperation, SheetPrintInterceptorService, COPY_TYPE, PREDEFINED_HOOK_NAME, virtualizeDiscreteRanges, ISheetClipboardService } from "@univerjs/sheets-ui";
|
|
11
|
-
import { ISidebarService,
|
|
11
|
+
import { ISidebarService, IUIPartsService, BuiltInUIPart, ILocalFileService, IMessageService, MenuItemType, getMenuHiddenObservable, KeyCode, RibbonStartGroup, ComponentManager, IMenuManagerService, IShortcutService, CanvasFloatDomService } from "@univerjs/ui";
|
|
12
12
|
import { takeUntil, Subject, BehaviorSubject, combineLatest, map, filter, distinctUntilChanged } from "rxjs";
|
|
13
|
-
import { getSheetCommandTarget, SheetsSelectionsService, WorkbookEditablePermission, WorksheetEditPermission, RangeProtectionPermissionEditPoint, InsertRowCommand, InsertColCommand, RemoveRowCommand, RemoveColCommand, DeleteRangeMoveLeftCommand, DeleteRangeMoveUpCommand, InsertRangeMoveDownCommand, InsertRangeMoveRightCommand, DeltaRowHeightCommand, SetRowHeightCommand, DeltaColumnWidthCommand, SetColWidthCommand, SetRowHiddenCommand, SetSpecificRowsVisibleCommand, SetSpecificColsVisibleCommand, SetColHiddenCommand, MoveColsCommand, MoveRowsCommand, MoveRangeCommand, SetRowVisibleMutation, SetRowHiddenMutation, SetColVisibleMutation, SetColHiddenMutation, SetWorksheetRowHeightMutation, SetWorksheetColWidthMutation,
|
|
13
|
+
import { getSheetCommandTarget, SheetsSelectionsService, WorkbookEditablePermission, WorksheetEditPermission, RangeProtectionPermissionEditPoint, InsertRowCommand, InsertColCommand, RemoveRowCommand, RemoveColCommand, DeleteRangeMoveLeftCommand, DeleteRangeMoveUpCommand, InsertRangeMoveDownCommand, InsertRangeMoveRightCommand, DeltaRowHeightCommand, SetRowHeightCommand, DeltaColumnWidthCommand, SetColWidthCommand, SetRowHiddenCommand, SetSpecificRowsVisibleCommand, SetSpecificColsVisibleCommand, SetColHiddenCommand, MoveColsCommand, MoveRowsCommand, MoveRangeCommand, SetRowVisibleMutation, SetRowHiddenMutation, SetColVisibleMutation, SetColHiddenMutation, SetWorksheetRowHeightMutation, SetWorksheetColWidthMutation, SheetInterceptorService, SetWorksheetActiveOperation, SetFrozenMutation, WorkbookViewPermission, WorksheetViewPermission } from "@univerjs/sheets";
|
|
14
14
|
import React, { useEffect, forwardRef, useRef, createElement, useState } from "react";
|
|
15
15
|
import { MessageType, RadioGroup, Radio } from "@univerjs/design";
|
|
16
16
|
import clsx from "clsx";
|
|
@@ -1774,15 +1774,15 @@ const calcPosition = /* @__PURE__ */ __name((targetObject, currentRender, skelet
|
|
|
1774
1774
|
right: left + width,
|
|
1775
1775
|
top,
|
|
1776
1776
|
bottom: top + height
|
|
1777
|
-
}, offsetBound = transformBound2DOMBound(bound, scene, skeleton, worksheet);
|
|
1777
|
+
}, offsetBound = transformBound2DOMBound(bound, scene, skeleton, worksheet), { scaleX, scaleY } = scene.getAncestorScale();
|
|
1778
1778
|
return {
|
|
1779
1779
|
startX: offsetBound.left,
|
|
1780
1780
|
endX: offsetBound.right,
|
|
1781
1781
|
startY: offsetBound.top,
|
|
1782
1782
|
endY: offsetBound.bottom,
|
|
1783
1783
|
rotate: angle,
|
|
1784
|
-
width,
|
|
1785
|
-
height,
|
|
1784
|
+
width: width * scaleX,
|
|
1785
|
+
height: height * scaleY,
|
|
1786
1786
|
absolute: offsetBound.absolute
|
|
1787
1787
|
};
|
|
1788
1788
|
}, "calcPosition");
|
package/lib/types/index.d.ts
CHANGED
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
export { UniverSheetsDrawingUIPlugin } from './plugin';
|
|
17
|
-
export {
|
|
17
|
+
export { type ICanvasFloatDom, SheetCanvasFloatDomManagerService } from './services/canvas-float-dom-manager.service';
|
|
18
|
+
export { IMAGE_MENU_ID } from './views/menu/image.menu';
|
|
18
19
|
export { DeleteDrawingsCommand } from './commands/commands/delete-drawings.command';
|
|
19
20
|
export { GroupSheetDrawingCommand } from './commands/commands/group-sheet-drawing.command';
|
|
20
21
|
export { InsertSheetDrawingCommand } from './commands/commands/insert-sheet-drawing.command';
|
|
@@ -25,6 +26,5 @@ export { SetSheetDrawingCommand } from './commands/commands/set-sheet-drawing.co
|
|
|
25
26
|
export { UngroupSheetDrawingCommand } from './commands/commands/ungroup-sheet-drawing.command';
|
|
26
27
|
export { ClearSheetDrawingTransformerOperation } from './commands/operations/clear-drawing-transformer.operation';
|
|
27
28
|
export { EditSheetDrawingOperation } from './commands/operations/edit-sheet-drawing.operation';
|
|
28
|
-
export {
|
|
29
|
+
export { type IInsertImageCommandParams, InsertFloatImageCommand } from './commands/commands/insert-image.command';
|
|
29
30
|
export { SidebarSheetDrawingOperation } from './commands/operations/open-drawing-panel.operation';
|
|
30
|
-
export { IMAGE_MENU_ID } from './views/menu/image.menu';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IDisposable, IPosition, ITransformState, Serializable, Worksheet, Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
|
2
|
-
import { IDrawingManagerService } from '@univerjs/drawing';
|
|
3
2
|
import { IBoundRectNoAngle, Scene, SpreadsheetSkeleton, IRenderManagerService } from '@univerjs/engine-render';
|
|
3
|
+
import { IDrawingManagerService } from '@univerjs/drawing';
|
|
4
4
|
import { ISheetDrawingService } from '@univerjs/sheets-drawing';
|
|
5
5
|
import { CanvasFloatDomService } from '@univerjs/ui';
|
|
6
6
|
export interface ICanvasFloatDom {
|