@univerjs/drawing-ui 1.0.0-alpha.7 → 1.0.0-alpha.8
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/index.js +21 -17
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +16 -16
- package/lib/cjs/locale/vi-VN.js +16 -16
- package/lib/es/index.js +25 -21
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/ru-RU.js +16 -16
- package/lib/es/locale/vi-VN.js +16 -16
- package/lib/index.js +25 -21
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/ru-RU.js +16 -16
- package/lib/locale/vi-VN.js +16 -16
- package/lib/umd/index.js +2 -2
- 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/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -627,7 +627,7 @@ const menuSchema = { [_univerjs_ui.ContextMenuPosition.DRAWING]: { [_univerjs_ui
|
|
|
627
627
|
//#endregion
|
|
628
628
|
//#region package.json
|
|
629
629
|
var name = "@univerjs/drawing-ui";
|
|
630
|
-
var version = "1.0.0-alpha.
|
|
630
|
+
var version = "1.0.0-alpha.8";
|
|
631
631
|
|
|
632
632
|
//#endregion
|
|
633
633
|
//#region src/config/config.ts
|
|
@@ -901,7 +901,7 @@ function DocChartFloatingToolbar(props) {
|
|
|
901
901
|
}
|
|
902
902
|
|
|
903
903
|
//#endregion
|
|
904
|
-
//#region \0@oxc-project+runtime@0.
|
|
904
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/decorateParam.js
|
|
905
905
|
function __decorateParam(paramIndex, decorator) {
|
|
906
906
|
return function(target, key) {
|
|
907
907
|
decorator(target, key, paramIndex);
|
|
@@ -909,7 +909,7 @@ function __decorateParam(paramIndex, decorator) {
|
|
|
909
909
|
}
|
|
910
910
|
|
|
911
911
|
//#endregion
|
|
912
|
-
//#region \0@oxc-project+runtime@0.
|
|
912
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/decorate.js
|
|
913
913
|
function __decorate(decorators, target, key, desc) {
|
|
914
914
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
915
915
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -964,7 +964,7 @@ let ComponentsController = class ComponentsController extends _univerjs_core.Dis
|
|
|
964
964
|
ComponentsController = __decorate([__decorateParam(0, (0, _univerjs_core.Inject)(_univerjs_ui.ComponentManager)), __decorateParam(1, (0, _univerjs_core.Inject)(_univerjs_ui.IconManager))], ComponentsController);
|
|
965
965
|
|
|
966
966
|
//#endregion
|
|
967
|
-
//#region \0@oxc-project+runtime@0.
|
|
967
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/typeof.js
|
|
968
968
|
function _typeof(o) {
|
|
969
969
|
"@babel/helpers - typeof";
|
|
970
970
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -975,7 +975,7 @@ function _typeof(o) {
|
|
|
975
975
|
}
|
|
976
976
|
|
|
977
977
|
//#endregion
|
|
978
|
-
//#region \0@oxc-project+runtime@0.
|
|
978
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/toPrimitive.js
|
|
979
979
|
function toPrimitive(t, r) {
|
|
980
980
|
if ("object" != _typeof(t) || !t) return t;
|
|
981
981
|
var e = t[Symbol.toPrimitive];
|
|
@@ -988,14 +988,14 @@ function toPrimitive(t, r) {
|
|
|
988
988
|
}
|
|
989
989
|
|
|
990
990
|
//#endregion
|
|
991
|
-
//#region \0@oxc-project+runtime@0.
|
|
991
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/toPropertyKey.js
|
|
992
992
|
function toPropertyKey(t) {
|
|
993
993
|
var i = toPrimitive(t, "string");
|
|
994
994
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
995
995
|
}
|
|
996
996
|
|
|
997
997
|
//#endregion
|
|
998
|
-
//#region \0@oxc-project+runtime@0.
|
|
998
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/defineProperty.js
|
|
999
999
|
function _defineProperty(e, r, t) {
|
|
1000
1000
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
1001
1001
|
value: t,
|
|
@@ -1370,7 +1370,7 @@ let DrawingUpdateController = class DrawingUpdateController extends _univerjs_co
|
|
|
1370
1370
|
}
|
|
1371
1371
|
_getSceneAndTransformerByDrawingSearch(unitId) {
|
|
1372
1372
|
if (unitId == null) return;
|
|
1373
|
-
const renderObject = this._renderManagerService.
|
|
1373
|
+
const renderObject = this._renderManagerService.getRenderUnitById(unitId);
|
|
1374
1374
|
const scene = renderObject === null || renderObject === void 0 ? void 0 : renderObject.scene;
|
|
1375
1375
|
if (scene == null) return null;
|
|
1376
1376
|
return {
|
|
@@ -1982,7 +1982,7 @@ let ImageCropperController = class ImageCropperController extends _univerjs_core
|
|
|
1982
1982
|
const drawingParams = this._drawingManagerService.getFocusDrawings();
|
|
1983
1983
|
if (drawingParams.length !== 1) return;
|
|
1984
1984
|
const { unitId, subUnitId, drawingId } = drawingParams[0];
|
|
1985
|
-
const renderObject = this._renderManagerService.
|
|
1985
|
+
const renderObject = this._renderManagerService.getRenderUnitById(unitId);
|
|
1986
1986
|
const scene = renderObject === null || renderObject === void 0 ? void 0 : renderObject.scene;
|
|
1987
1987
|
if (scene == null) return true;
|
|
1988
1988
|
if (this._searchCropObject(scene) != null) this._commandService.syncExecuteCommand(CloseImageCropOperation.id, { isAuto: true });
|
|
@@ -2074,7 +2074,7 @@ let ImageCropperController = class ImageCropperController extends _univerjs_core
|
|
|
2074
2074
|
const params = command.params;
|
|
2075
2075
|
if (params == null) return;
|
|
2076
2076
|
const { unitId, subUnitId, drawingId } = params;
|
|
2077
|
-
const renderObject = this._renderManagerService.
|
|
2077
|
+
const renderObject = this._renderManagerService.getRenderUnitById(unitId);
|
|
2078
2078
|
const scene = renderObject === null || renderObject === void 0 ? void 0 : renderObject.scene;
|
|
2079
2079
|
if (scene == null) return true;
|
|
2080
2080
|
if (!this._sceneListenerOnImageMap.has(scene)) {
|
|
@@ -2130,7 +2130,7 @@ let ImageCropperController = class ImageCropperController extends _univerjs_core
|
|
|
2130
2130
|
const currentUnit = this._univerInstanceService.getFocusedUnit();
|
|
2131
2131
|
if (currentUnit == null) return;
|
|
2132
2132
|
const unitId = currentUnit.getUnitId();
|
|
2133
|
-
const renderObject = this._renderManagerService.
|
|
2133
|
+
const renderObject = this._renderManagerService.getRenderUnitById(unitId);
|
|
2134
2134
|
const scene = renderObject === null || renderObject === void 0 ? void 0 : renderObject.scene;
|
|
2135
2135
|
if (scene == null) return true;
|
|
2136
2136
|
const imageCropperObject = this._searchCropObject(scene);
|
|
@@ -2300,7 +2300,7 @@ let ImageUpdateController = class ImageUpdateController extends _univerjs_core.D
|
|
|
2300
2300
|
}
|
|
2301
2301
|
_getSceneAndTransformerByDrawingSearch(unitId) {
|
|
2302
2302
|
if (unitId == null) return;
|
|
2303
|
-
const renderObject = this._renderManagerService.
|
|
2303
|
+
const renderObject = this._renderManagerService.getRenderUnitById(unitId);
|
|
2304
2304
|
const scene = renderObject === null || renderObject === void 0 ? void 0 : renderObject.scene;
|
|
2305
2305
|
if (scene == null) return null;
|
|
2306
2306
|
return {
|
|
@@ -2535,7 +2535,11 @@ let UniverDrawingUIPlugin = class UniverDrawingUIPlugin extends _univerjs_core.P
|
|
|
2535
2535
|
_defineProperty(UniverDrawingUIPlugin, "pluginName", "UNIVER_DRAWING_UI_PLUGIN");
|
|
2536
2536
|
_defineProperty(UniverDrawingUIPlugin, "packageName", name);
|
|
2537
2537
|
_defineProperty(UniverDrawingUIPlugin, "version", version);
|
|
2538
|
-
UniverDrawingUIPlugin = __decorate([
|
|
2538
|
+
UniverDrawingUIPlugin = __decorate([
|
|
2539
|
+
(0, _univerjs_core.DependentOn)(_univerjs_drawing.UniverDrawingPlugin, _univerjs_engine_render.UniverRenderEnginePlugin, _univerjs_ui.UniverUIPlugin),
|
|
2540
|
+
__decorateParam(1, (0, _univerjs_core.Inject)(_univerjs_core.Injector)),
|
|
2541
|
+
__decorateParam(2, _univerjs_core.IConfigService)
|
|
2542
|
+
], UniverDrawingUIPlugin);
|
|
2539
2543
|
|
|
2540
2544
|
//#endregion
|
|
2541
2545
|
//#region src/views/object-list-panel/object-list-panel-layer.ts
|
|
@@ -3156,7 +3160,7 @@ const DrawingGroup = (props) => {
|
|
|
3156
3160
|
const GroupIcon = iconManager.get("GroupIcon");
|
|
3157
3161
|
const UngroupIcon = iconManager.get("UngroupIcon");
|
|
3158
3162
|
const drawingParam = drawings[0];
|
|
3159
|
-
const transformer = drawingParam ? (_renderManagerService = renderManagerService.
|
|
3163
|
+
const transformer = drawingParam ? (_renderManagerService = renderManagerService.getRenderUnitById(drawingParam.unitId)) === null || _renderManagerService === void 0 || (_renderManagerService = _renderManagerService.scene) === null || _renderManagerService === void 0 ? void 0 : _renderManagerService.getTransformerByCreate() : void 0;
|
|
3160
3164
|
const { groupShow, groupBtnShow, ungroupBtnShow } = (0, _univerjs_ui.useObservable)(transformer ? () => (0, rxjs.merge)(transformer.clearControl$.pipe((0, rxjs.filter)((changeSelf) => changeSelf === true), (0, rxjs.map)(() => ({
|
|
3161
3165
|
groupShow: false,
|
|
3162
3166
|
groupBtnShow: false,
|
|
@@ -3235,7 +3239,7 @@ const DrawingTransform = (props) => {
|
|
|
3235
3239
|
var _renderManagerService, _scene$getEngine;
|
|
3236
3240
|
const renderManagerService = (0, _univerjs_ui.useDependency)(_univerjs_engine_render.IRenderManagerService);
|
|
3237
3241
|
const drawingParam = props.drawings[0];
|
|
3238
|
-
const scene = drawingParam ? (_renderManagerService = renderManagerService.
|
|
3242
|
+
const scene = drawingParam ? (_renderManagerService = renderManagerService.getRenderUnitById(drawingParam.unitId)) === null || _renderManagerService === void 0 ? void 0 : _renderManagerService.scene : void 0;
|
|
3239
3243
|
const topScene = scene === null || scene === void 0 || (_scene$getEngine = scene.getEngine()) === null || _scene$getEngine === void 0 ? void 0 : _scene$getEngine.activeScene;
|
|
3240
3244
|
if (!(drawingParam === null || drawingParam === void 0 ? void 0 : drawingParam.transform) || !scene || !topScene) return null;
|
|
3241
3245
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DrawingTransformContent, { ...props });
|
|
@@ -3248,7 +3252,7 @@ function DrawingTransformContent(props) {
|
|
|
3248
3252
|
const drawingParam = drawings[0];
|
|
3249
3253
|
const transform = drawingParam.transform;
|
|
3250
3254
|
const { unitId, subUnitId, drawingId, drawingType } = drawingParam;
|
|
3251
|
-
const scene = renderManagerService.
|
|
3255
|
+
const scene = renderManagerService.getRenderUnitById(unitId).scene;
|
|
3252
3256
|
const topScene = scene.getEngine().activeScene;
|
|
3253
3257
|
const transformer = scene.getTransformerByCreate();
|
|
3254
3258
|
const { width: originWidth = 0, height: originHeight = 0, left: originX = 0, top: originY = 0, angle: originRotation = 0 } = transform;
|
|
@@ -3615,7 +3619,7 @@ const DrawingCommonPanel = (props) => {
|
|
|
3615
3619
|
const localeService = (0, _univerjs_ui.useDependency)(_univerjs_core.LocaleService);
|
|
3616
3620
|
const { drawings, hasArrange = true, hasTransform = true, hasAlign = true, hasCropper = true, hasGroup = true } = props;
|
|
3617
3621
|
const drawingParam = drawings[0];
|
|
3618
|
-
const renderObject = drawingParam ? renderManagerService.
|
|
3622
|
+
const renderObject = drawingParam ? renderManagerService.getRenderUnitById(drawingParam.unitId) : void 0;
|
|
3619
3623
|
const scene = renderObject === null || renderObject === void 0 ? void 0 : renderObject.scene;
|
|
3620
3624
|
const transformer = scene === null || scene === void 0 ? void 0 : scene.getTransformerByCreate();
|
|
3621
3625
|
const { arrangeShow, transformShow, alignShow, cropperShow, nullShow } = (0, _univerjs_ui.useObservable)(() => (0, rxjs.merge)(drawingManagerService.focus$.pipe((0, rxjs.map)(getPanelShowState)), ...transformer ? [transformer.clearControl$.pipe((0, rxjs.filter)((changeSelf) => changeSelf === true), (0, rxjs.map)(() => getPanelShowState([]))), transformer.changeStart$.pipe((0, rxjs.map)((state) => getPanelShowState(getUpdateParams(state.objects, drawingManagerService))))] : []), getPanelShowState(drawings), false, [drawingManagerService, transformer]);
|
package/lib/cjs/locale/fr-FR.js
CHANGED
|
@@ -18,7 +18,7 @@ const locale = { "drawing-ui": {
|
|
|
18
18
|
nameInput: "Nom de l'objet",
|
|
19
19
|
description: "Description",
|
|
20
20
|
descriptionPlaceholder: "Ajouter une description",
|
|
21
|
-
details: "
|
|
21
|
+
details: "Détails",
|
|
22
22
|
locate: "Localiser",
|
|
23
23
|
expand: "Développer",
|
|
24
24
|
collapse: "Réduire",
|
package/lib/cjs/locale/ru-RU.js
CHANGED
|
@@ -89,22 +89,22 @@ const locale = { "drawing-ui": {
|
|
|
89
89
|
null: "Нет выбранных объектов"
|
|
90
90
|
},
|
|
91
91
|
"image-text-wrap": {
|
|
92
|
-
title: "
|
|
93
|
-
wrappingStyle: "
|
|
94
|
-
square: "
|
|
95
|
-
topAndBottom: "
|
|
96
|
-
inline: "
|
|
97
|
-
behindText: "
|
|
98
|
-
inFrontText: "
|
|
99
|
-
wrapText: "
|
|
100
|
-
bothSide: "
|
|
101
|
-
leftOnly: "
|
|
102
|
-
rightOnly: "
|
|
103
|
-
distanceFromText: "
|
|
104
|
-
top: "
|
|
105
|
-
left: "
|
|
106
|
-
bottom: "
|
|
107
|
-
right: "
|
|
92
|
+
title: "Обтекание текстом",
|
|
93
|
+
wrappingStyle: "Стиль обтекания",
|
|
94
|
+
square: "Вокруг рамки",
|
|
95
|
+
topAndBottom: "Сверху и снизу",
|
|
96
|
+
inline: "В тексте",
|
|
97
|
+
behindText: "За текстом",
|
|
98
|
+
inFrontText: "Перед текстом",
|
|
99
|
+
wrapText: "Обтекание",
|
|
100
|
+
bothSide: "С обеих сторон",
|
|
101
|
+
leftOnly: "Только слева",
|
|
102
|
+
rightOnly: "Только справа",
|
|
103
|
+
distanceFromText: "Расстояние от текста",
|
|
104
|
+
top: "Сверху (пкс)",
|
|
105
|
+
left: "Слева (пкс)",
|
|
106
|
+
bottom: "Снизу (пкс)",
|
|
107
|
+
right: "Справа (пкс)"
|
|
108
108
|
},
|
|
109
109
|
"image-popup": {
|
|
110
110
|
replace: "Заменить",
|
package/lib/cjs/locale/vi-VN.js
CHANGED
|
@@ -89,22 +89,22 @@ const locale = { "drawing-ui": {
|
|
|
89
89
|
null: "Không có đối tượng nào được chọn"
|
|
90
90
|
},
|
|
91
91
|
"image-text-wrap": {
|
|
92
|
-
title: "
|
|
93
|
-
wrappingStyle: "
|
|
94
|
-
square: "
|
|
95
|
-
topAndBottom: "
|
|
96
|
-
inline: "
|
|
97
|
-
behindText: "
|
|
98
|
-
inFrontText: "
|
|
99
|
-
wrapText: "
|
|
100
|
-
bothSide: "
|
|
101
|
-
leftOnly: "
|
|
102
|
-
rightOnly: "
|
|
103
|
-
distanceFromText: "
|
|
104
|
-
top: "
|
|
105
|
-
left: "
|
|
106
|
-
bottom: "
|
|
107
|
-
right: "
|
|
92
|
+
title: "Bố cục văn bản",
|
|
93
|
+
wrappingStyle: "Kiểu bố cục",
|
|
94
|
+
square: "Vuông",
|
|
95
|
+
topAndBottom: "Trên và dưới",
|
|
96
|
+
inline: "Cùng dòng với văn bản",
|
|
97
|
+
behindText: "Phía sau văn bản",
|
|
98
|
+
inFrontText: "Phía trước văn bản",
|
|
99
|
+
wrapText: "Bọc văn bản",
|
|
100
|
+
bothSide: "Cả hai bên",
|
|
101
|
+
leftOnly: "Chỉ bên trái",
|
|
102
|
+
rightOnly: "Chỉ bên phải",
|
|
103
|
+
distanceFromText: "Khoảng cách từ văn bản",
|
|
104
|
+
top: "Trên (px)",
|
|
105
|
+
left: "Trái (px)",
|
|
106
|
+
bottom: "Dưới (px)",
|
|
107
|
+
right: "Phải (px)"
|
|
108
108
|
},
|
|
109
109
|
"image-popup": {
|
|
110
110
|
replace: "Thay thế",
|
package/lib/es/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ArrangeTypeEnum, BooleanNumber, CommandType, Disposable, DrawingTypeEnum, ICommandService, IConfigService, IImageIoService, IURLImageService, IUniverInstanceService, ImageSourceType, Inject, Injector, LocaleService, Plugin, PositionedObjectLayoutType, UniverInstanceType, checkIfMove, debounce, generateRandomId, merge, toDisposable } from "@univerjs/core";
|
|
2
|
-
import { DRAWING_GROUPABLE_TYPES, IDrawingManagerService, SetDrawingSelectedOperation, getDrawingShapeKeyByDrawingSearch, isGroupableDrawingType, resolveDrawingRotateEnabled } from "@univerjs/drawing";
|
|
3
|
-
import { CURSOR_TYPE, Canvas, DRAWING_OBJECT_LAYER_INDEX, DrawingGroupObject, Group, IRenderManagerService, Image, RENDER_CLASS_TYPE, Rect, Shape, Vector2, degToRad, getGroupState, precisionTo, transformObjectOutOfGroup } from "@univerjs/engine-render";
|
|
4
|
-
import { ComponentManager, ContextMenuGroup, ContextMenuPosition, IDialogService, IGalleryService, IMenuManagerService, IMessageService, IconManager, MenuItemType, useDependency, useObservable } from "@univerjs/ui";
|
|
1
|
+
import { ArrangeTypeEnum, BooleanNumber, CommandType, DependentOn, Disposable, DrawingTypeEnum, ICommandService, IConfigService, IImageIoService, IURLImageService, IUniverInstanceService, ImageSourceType, Inject, Injector, LocaleService, Plugin, PositionedObjectLayoutType, UniverInstanceType, checkIfMove, debounce, generateRandomId, merge, toDisposable } from "@univerjs/core";
|
|
2
|
+
import { DRAWING_GROUPABLE_TYPES, IDrawingManagerService, SetDrawingSelectedOperation, UniverDrawingPlugin, getDrawingShapeKeyByDrawingSearch, isGroupableDrawingType, resolveDrawingRotateEnabled } from "@univerjs/drawing";
|
|
3
|
+
import { CURSOR_TYPE, Canvas, DRAWING_OBJECT_LAYER_INDEX, DrawingGroupObject, Group, IRenderManagerService, Image, RENDER_CLASS_TYPE, Rect, Shape, UniverRenderEnginePlugin, Vector2, degToRad, getGroupState, precisionTo, transformObjectOutOfGroup } from "@univerjs/engine-render";
|
|
4
|
+
import { ComponentManager, ContextMenuGroup, ContextMenuPosition, IDialogService, IGalleryService, IMenuManagerService, IMessageService, IconManager, MenuItemType, UniverUIPlugin, useDependency, useObservable } from "@univerjs/ui";
|
|
5
5
|
import { BehaviorSubject, Observable, bufferTime, filter, map, merge as merge$1, of, startWith, switchMap } from "rxjs";
|
|
6
6
|
import { ArrowDownIcon, ArrowUpIcon, AutofillDoubleIcon, BottomIcon, ChartIcon, CreateCopyIcon, CropIcon, DeleteIcon, DocSettingIcon, EyeIcon, EyelashIcon, GroupIcon, LocateFixedIcon, LockIcon, MoreDownIcon, MoreRightIcon, MoveDownIcon, MoveUpIcon, TextWrapShapeIcon, TopmostIcon, UngroupIcon, UnlockIcon } from "@univerjs/icons";
|
|
7
7
|
import { Button, Checkbox, Dropdown, DropdownMenu, Input, InputNumber, MessageType, Select, Separator, Tooltip, borderClassName, clsx } from "@univerjs/design";
|
|
@@ -626,7 +626,7 @@ const menuSchema = { [ContextMenuPosition.DRAWING]: { [ContextMenuGroup.OTHERS]:
|
|
|
626
626
|
//#endregion
|
|
627
627
|
//#region package.json
|
|
628
628
|
var name = "@univerjs/drawing-ui";
|
|
629
|
-
var version = "1.0.0-alpha.
|
|
629
|
+
var version = "1.0.0-alpha.8";
|
|
630
630
|
|
|
631
631
|
//#endregion
|
|
632
632
|
//#region src/config/config.ts
|
|
@@ -900,7 +900,7 @@ function DocChartFloatingToolbar(props) {
|
|
|
900
900
|
}
|
|
901
901
|
|
|
902
902
|
//#endregion
|
|
903
|
-
//#region \0@oxc-project+runtime@0.
|
|
903
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/decorateParam.js
|
|
904
904
|
function __decorateParam(paramIndex, decorator) {
|
|
905
905
|
return function(target, key) {
|
|
906
906
|
decorator(target, key, paramIndex);
|
|
@@ -908,7 +908,7 @@ function __decorateParam(paramIndex, decorator) {
|
|
|
908
908
|
}
|
|
909
909
|
|
|
910
910
|
//#endregion
|
|
911
|
-
//#region \0@oxc-project+runtime@0.
|
|
911
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/decorate.js
|
|
912
912
|
function __decorate(decorators, target, key, desc) {
|
|
913
913
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
914
914
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -963,7 +963,7 @@ let ComponentsController = class ComponentsController extends Disposable {
|
|
|
963
963
|
ComponentsController = __decorate([__decorateParam(0, Inject(ComponentManager)), __decorateParam(1, Inject(IconManager))], ComponentsController);
|
|
964
964
|
|
|
965
965
|
//#endregion
|
|
966
|
-
//#region \0@oxc-project+runtime@0.
|
|
966
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/typeof.js
|
|
967
967
|
function _typeof(o) {
|
|
968
968
|
"@babel/helpers - typeof";
|
|
969
969
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -974,7 +974,7 @@ function _typeof(o) {
|
|
|
974
974
|
}
|
|
975
975
|
|
|
976
976
|
//#endregion
|
|
977
|
-
//#region \0@oxc-project+runtime@0.
|
|
977
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/toPrimitive.js
|
|
978
978
|
function toPrimitive(t, r) {
|
|
979
979
|
if ("object" != _typeof(t) || !t) return t;
|
|
980
980
|
var e = t[Symbol.toPrimitive];
|
|
@@ -987,14 +987,14 @@ function toPrimitive(t, r) {
|
|
|
987
987
|
}
|
|
988
988
|
|
|
989
989
|
//#endregion
|
|
990
|
-
//#region \0@oxc-project+runtime@0.
|
|
990
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/toPropertyKey.js
|
|
991
991
|
function toPropertyKey(t) {
|
|
992
992
|
var i = toPrimitive(t, "string");
|
|
993
993
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
994
994
|
}
|
|
995
995
|
|
|
996
996
|
//#endregion
|
|
997
|
-
//#region \0@oxc-project+runtime@0.
|
|
997
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/defineProperty.js
|
|
998
998
|
function _defineProperty(e, r, t) {
|
|
999
999
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
1000
1000
|
value: t,
|
|
@@ -1369,7 +1369,7 @@ let DrawingUpdateController = class DrawingUpdateController extends Disposable {
|
|
|
1369
1369
|
}
|
|
1370
1370
|
_getSceneAndTransformerByDrawingSearch(unitId) {
|
|
1371
1371
|
if (unitId == null) return;
|
|
1372
|
-
const renderObject = this._renderManagerService.
|
|
1372
|
+
const renderObject = this._renderManagerService.getRenderUnitById(unitId);
|
|
1373
1373
|
const scene = renderObject === null || renderObject === void 0 ? void 0 : renderObject.scene;
|
|
1374
1374
|
if (scene == null) return null;
|
|
1375
1375
|
return {
|
|
@@ -1981,7 +1981,7 @@ let ImageCropperController = class ImageCropperController extends Disposable {
|
|
|
1981
1981
|
const drawingParams = this._drawingManagerService.getFocusDrawings();
|
|
1982
1982
|
if (drawingParams.length !== 1) return;
|
|
1983
1983
|
const { unitId, subUnitId, drawingId } = drawingParams[0];
|
|
1984
|
-
const renderObject = this._renderManagerService.
|
|
1984
|
+
const renderObject = this._renderManagerService.getRenderUnitById(unitId);
|
|
1985
1985
|
const scene = renderObject === null || renderObject === void 0 ? void 0 : renderObject.scene;
|
|
1986
1986
|
if (scene == null) return true;
|
|
1987
1987
|
if (this._searchCropObject(scene) != null) this._commandService.syncExecuteCommand(CloseImageCropOperation.id, { isAuto: true });
|
|
@@ -2073,7 +2073,7 @@ let ImageCropperController = class ImageCropperController extends Disposable {
|
|
|
2073
2073
|
const params = command.params;
|
|
2074
2074
|
if (params == null) return;
|
|
2075
2075
|
const { unitId, subUnitId, drawingId } = params;
|
|
2076
|
-
const renderObject = this._renderManagerService.
|
|
2076
|
+
const renderObject = this._renderManagerService.getRenderUnitById(unitId);
|
|
2077
2077
|
const scene = renderObject === null || renderObject === void 0 ? void 0 : renderObject.scene;
|
|
2078
2078
|
if (scene == null) return true;
|
|
2079
2079
|
if (!this._sceneListenerOnImageMap.has(scene)) {
|
|
@@ -2129,7 +2129,7 @@ let ImageCropperController = class ImageCropperController extends Disposable {
|
|
|
2129
2129
|
const currentUnit = this._univerInstanceService.getFocusedUnit();
|
|
2130
2130
|
if (currentUnit == null) return;
|
|
2131
2131
|
const unitId = currentUnit.getUnitId();
|
|
2132
|
-
const renderObject = this._renderManagerService.
|
|
2132
|
+
const renderObject = this._renderManagerService.getRenderUnitById(unitId);
|
|
2133
2133
|
const scene = renderObject === null || renderObject === void 0 ? void 0 : renderObject.scene;
|
|
2134
2134
|
if (scene == null) return true;
|
|
2135
2135
|
const imageCropperObject = this._searchCropObject(scene);
|
|
@@ -2299,7 +2299,7 @@ let ImageUpdateController = class ImageUpdateController extends Disposable {
|
|
|
2299
2299
|
}
|
|
2300
2300
|
_getSceneAndTransformerByDrawingSearch(unitId) {
|
|
2301
2301
|
if (unitId == null) return;
|
|
2302
|
-
const renderObject = this._renderManagerService.
|
|
2302
|
+
const renderObject = this._renderManagerService.getRenderUnitById(unitId);
|
|
2303
2303
|
const scene = renderObject === null || renderObject === void 0 ? void 0 : renderObject.scene;
|
|
2304
2304
|
if (scene == null) return null;
|
|
2305
2305
|
return {
|
|
@@ -2534,7 +2534,11 @@ let UniverDrawingUIPlugin = class UniverDrawingUIPlugin extends Plugin {
|
|
|
2534
2534
|
_defineProperty(UniverDrawingUIPlugin, "pluginName", "UNIVER_DRAWING_UI_PLUGIN");
|
|
2535
2535
|
_defineProperty(UniverDrawingUIPlugin, "packageName", name);
|
|
2536
2536
|
_defineProperty(UniverDrawingUIPlugin, "version", version);
|
|
2537
|
-
UniverDrawingUIPlugin = __decorate([
|
|
2537
|
+
UniverDrawingUIPlugin = __decorate([
|
|
2538
|
+
DependentOn(UniverDrawingPlugin, UniverRenderEnginePlugin, UniverUIPlugin),
|
|
2539
|
+
__decorateParam(1, Inject(Injector)),
|
|
2540
|
+
__decorateParam(2, IConfigService)
|
|
2541
|
+
], UniverDrawingUIPlugin);
|
|
2538
2542
|
|
|
2539
2543
|
//#endregion
|
|
2540
2544
|
//#region src/views/object-list-panel/object-list-panel-layer.ts
|
|
@@ -3155,7 +3159,7 @@ const DrawingGroup = (props) => {
|
|
|
3155
3159
|
const GroupIcon = iconManager.get("GroupIcon");
|
|
3156
3160
|
const UngroupIcon = iconManager.get("UngroupIcon");
|
|
3157
3161
|
const drawingParam = drawings[0];
|
|
3158
|
-
const transformer = drawingParam ? (_renderManagerService = renderManagerService.
|
|
3162
|
+
const transformer = drawingParam ? (_renderManagerService = renderManagerService.getRenderUnitById(drawingParam.unitId)) === null || _renderManagerService === void 0 || (_renderManagerService = _renderManagerService.scene) === null || _renderManagerService === void 0 ? void 0 : _renderManagerService.getTransformerByCreate() : void 0;
|
|
3159
3163
|
const { groupShow, groupBtnShow, ungroupBtnShow } = useObservable(transformer ? () => merge$1(transformer.clearControl$.pipe(filter((changeSelf) => changeSelf === true), map(() => ({
|
|
3160
3164
|
groupShow: false,
|
|
3161
3165
|
groupBtnShow: false,
|
|
@@ -3234,7 +3238,7 @@ const DrawingTransform = (props) => {
|
|
|
3234
3238
|
var _renderManagerService, _scene$getEngine;
|
|
3235
3239
|
const renderManagerService = useDependency(IRenderManagerService);
|
|
3236
3240
|
const drawingParam = props.drawings[0];
|
|
3237
|
-
const scene = drawingParam ? (_renderManagerService = renderManagerService.
|
|
3241
|
+
const scene = drawingParam ? (_renderManagerService = renderManagerService.getRenderUnitById(drawingParam.unitId)) === null || _renderManagerService === void 0 ? void 0 : _renderManagerService.scene : void 0;
|
|
3238
3242
|
const topScene = scene === null || scene === void 0 || (_scene$getEngine = scene.getEngine()) === null || _scene$getEngine === void 0 ? void 0 : _scene$getEngine.activeScene;
|
|
3239
3243
|
if (!(drawingParam === null || drawingParam === void 0 ? void 0 : drawingParam.transform) || !scene || !topScene) return null;
|
|
3240
3244
|
return /* @__PURE__ */ jsx(DrawingTransformContent, { ...props });
|
|
@@ -3247,7 +3251,7 @@ function DrawingTransformContent(props) {
|
|
|
3247
3251
|
const drawingParam = drawings[0];
|
|
3248
3252
|
const transform = drawingParam.transform;
|
|
3249
3253
|
const { unitId, subUnitId, drawingId, drawingType } = drawingParam;
|
|
3250
|
-
const scene = renderManagerService.
|
|
3254
|
+
const scene = renderManagerService.getRenderUnitById(unitId).scene;
|
|
3251
3255
|
const topScene = scene.getEngine().activeScene;
|
|
3252
3256
|
const transformer = scene.getTransformerByCreate();
|
|
3253
3257
|
const { width: originWidth = 0, height: originHeight = 0, left: originX = 0, top: originY = 0, angle: originRotation = 0 } = transform;
|
|
@@ -3614,7 +3618,7 @@ const DrawingCommonPanel = (props) => {
|
|
|
3614
3618
|
const localeService = useDependency(LocaleService);
|
|
3615
3619
|
const { drawings, hasArrange = true, hasTransform = true, hasAlign = true, hasCropper = true, hasGroup = true } = props;
|
|
3616
3620
|
const drawingParam = drawings[0];
|
|
3617
|
-
const renderObject = drawingParam ? renderManagerService.
|
|
3621
|
+
const renderObject = drawingParam ? renderManagerService.getRenderUnitById(drawingParam.unitId) : void 0;
|
|
3618
3622
|
const scene = renderObject === null || renderObject === void 0 ? void 0 : renderObject.scene;
|
|
3619
3623
|
const transformer = scene === null || scene === void 0 ? void 0 : scene.getTransformerByCreate();
|
|
3620
3624
|
const { arrangeShow, transformShow, alignShow, cropperShow, nullShow } = useObservable(() => merge$1(drawingManagerService.focus$.pipe(map(getPanelShowState)), ...transformer ? [transformer.clearControl$.pipe(filter((changeSelf) => changeSelf === true), map(() => getPanelShowState([]))), transformer.changeStart$.pipe(map((state) => getPanelShowState(getUpdateParams(state.objects, drawingManagerService))))] : []), getPanelShowState(drawings), false, [drawingManagerService, transformer]);
|
package/lib/es/locale/fr-FR.js
CHANGED
|
@@ -17,7 +17,7 @@ const locale = { "drawing-ui": {
|
|
|
17
17
|
nameInput: "Nom de l'objet",
|
|
18
18
|
description: "Description",
|
|
19
19
|
descriptionPlaceholder: "Ajouter une description",
|
|
20
|
-
details: "
|
|
20
|
+
details: "Détails",
|
|
21
21
|
locate: "Localiser",
|
|
22
22
|
expand: "Développer",
|
|
23
23
|
collapse: "Réduire",
|
package/lib/es/locale/ru-RU.js
CHANGED
|
@@ -88,22 +88,22 @@ const locale = { "drawing-ui": {
|
|
|
88
88
|
null: "Нет выбранных объектов"
|
|
89
89
|
},
|
|
90
90
|
"image-text-wrap": {
|
|
91
|
-
title: "
|
|
92
|
-
wrappingStyle: "
|
|
93
|
-
square: "
|
|
94
|
-
topAndBottom: "
|
|
95
|
-
inline: "
|
|
96
|
-
behindText: "
|
|
97
|
-
inFrontText: "
|
|
98
|
-
wrapText: "
|
|
99
|
-
bothSide: "
|
|
100
|
-
leftOnly: "
|
|
101
|
-
rightOnly: "
|
|
102
|
-
distanceFromText: "
|
|
103
|
-
top: "
|
|
104
|
-
left: "
|
|
105
|
-
bottom: "
|
|
106
|
-
right: "
|
|
91
|
+
title: "Обтекание текстом",
|
|
92
|
+
wrappingStyle: "Стиль обтекания",
|
|
93
|
+
square: "Вокруг рамки",
|
|
94
|
+
topAndBottom: "Сверху и снизу",
|
|
95
|
+
inline: "В тексте",
|
|
96
|
+
behindText: "За текстом",
|
|
97
|
+
inFrontText: "Перед текстом",
|
|
98
|
+
wrapText: "Обтекание",
|
|
99
|
+
bothSide: "С обеих сторон",
|
|
100
|
+
leftOnly: "Только слева",
|
|
101
|
+
rightOnly: "Только справа",
|
|
102
|
+
distanceFromText: "Расстояние от текста",
|
|
103
|
+
top: "Сверху (пкс)",
|
|
104
|
+
left: "Слева (пкс)",
|
|
105
|
+
bottom: "Снизу (пкс)",
|
|
106
|
+
right: "Справа (пкс)"
|
|
107
107
|
},
|
|
108
108
|
"image-popup": {
|
|
109
109
|
replace: "Заменить",
|
package/lib/es/locale/vi-VN.js
CHANGED
|
@@ -88,22 +88,22 @@ const locale = { "drawing-ui": {
|
|
|
88
88
|
null: "Không có đối tượng nào được chọn"
|
|
89
89
|
},
|
|
90
90
|
"image-text-wrap": {
|
|
91
|
-
title: "
|
|
92
|
-
wrappingStyle: "
|
|
93
|
-
square: "
|
|
94
|
-
topAndBottom: "
|
|
95
|
-
inline: "
|
|
96
|
-
behindText: "
|
|
97
|
-
inFrontText: "
|
|
98
|
-
wrapText: "
|
|
99
|
-
bothSide: "
|
|
100
|
-
leftOnly: "
|
|
101
|
-
rightOnly: "
|
|
102
|
-
distanceFromText: "
|
|
103
|
-
top: "
|
|
104
|
-
left: "
|
|
105
|
-
bottom: "
|
|
106
|
-
right: "
|
|
91
|
+
title: "Bố cục văn bản",
|
|
92
|
+
wrappingStyle: "Kiểu bố cục",
|
|
93
|
+
square: "Vuông",
|
|
94
|
+
topAndBottom: "Trên và dưới",
|
|
95
|
+
inline: "Cùng dòng với văn bản",
|
|
96
|
+
behindText: "Phía sau văn bản",
|
|
97
|
+
inFrontText: "Phía trước văn bản",
|
|
98
|
+
wrapText: "Bọc văn bản",
|
|
99
|
+
bothSide: "Cả hai bên",
|
|
100
|
+
leftOnly: "Chỉ bên trái",
|
|
101
|
+
rightOnly: "Chỉ bên phải",
|
|
102
|
+
distanceFromText: "Khoảng cách từ văn bản",
|
|
103
|
+
top: "Trên (px)",
|
|
104
|
+
left: "Trái (px)",
|
|
105
|
+
bottom: "Dưới (px)",
|
|
106
|
+
right: "Phải (px)"
|
|
107
107
|
},
|
|
108
108
|
"image-popup": {
|
|
109
109
|
replace: "Thay thế",
|