@univerjs/docs-drawing-ui 0.6.3 → 0.6.4-nightly.202503101606
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 +1 -1
- package/lib/es/index.js +138 -135
- package/lib/umd/index.js +1 -1
- package/package.json +14 -14
- package/LICENSE +0 -176
package/lib/es/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
var Ct = Object.defineProperty;
|
|
2
2
|
var Dt = (i, e, n) => e in i ? Ct(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n;
|
|
3
3
|
var Ce = (i, e, n) => Dt(i, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
-
import { Disposable as Xe,
|
|
5
|
-
import { IDocDrawingService as Be, UniverDocsDrawingPlugin as
|
|
6
|
-
import { IDrawingManagerService as Ie, IImageIoService as
|
|
7
|
-
import { DrawingCommonPanel as
|
|
8
|
-
import { IRenderManagerService as ee, DocumentEditArea as Fe, Liquid as $n, PageLayoutType as Rn, DocumentSkeletonPageType as Nn, Vector2 as
|
|
9
|
-
import { IMessageService as
|
|
4
|
+
import { Disposable as Xe, BlockType as Ot, UndoCommand as Tt, RedoCommand as Pt, JSONX as q, IUniverInstanceService as K, ICommandService as z, PositionedObjectLayoutType as H, CommandType as Y, BooleanNumber as oe, ObjectRelativeFromH as ne, ObjectRelativeFromV as V, Tools as ye, TextX as vn, TextXActionType as Q, toDisposable as Le, throttle as Tn, COLORS as yt, MemoryCursor as bt, IUndoRedoService as Vn, BuildTextUtils as Mt, ArrangeTypeEnum as Ze, Inject as ve, IContextService as jn, LocaleService as ln, WrapTextType as $e, DrawingTypeEnum as Rt, FOCUSING_COMMON_DRAWINGS as tn, UniverInstanceType as be, Direction as fe, DocumentFlavor as fn, DOCS_ZEN_EDITOR_UNIT_ID_KEY as In, FOCUSING_UNIVER_EDITOR as Nt, RxDisposable as Et, SHEET_EDITOR_UNITS as At, LifecycleService as xt, fromEventSubject as Lt, LifecycleStages as Pn, DependentOn as Bt, Injector as Ut, IConfigService as kt, Plugin as Ft, merge as Ht } from "@univerjs/core";
|
|
5
|
+
import { IDocDrawingService as Be, UniverDocsDrawingPlugin as Wt } from "@univerjs/docs-drawing";
|
|
6
|
+
import { IDrawingManagerService as Ie, IImageIoService as Gt, DRAWING_IMAGE_ALLOW_IMAGE_LIST as Vt, DRAWING_IMAGE_COUNT_LIMIT as yn, ImageUploadStatusType as hn, DRAWING_IMAGE_ALLOW_SIZE as jt, getImageSize as $t, getDrawingShapeKeyByDrawingSearch as zt, DRAWING_IMAGE_WIDTH_LIMIT as bn, DRAWING_IMAGE_HEIGHT_LIMIT as Mn, UniverDrawingPlugin as qt } from "@univerjs/drawing";
|
|
7
|
+
import { DrawingCommonPanel as Xt, ImageCropperObject as Kt, COMPONENT_IMAGE_POPUP_MENU as Yt, OpenImageCropOperation as Zt, ImageResetSizeOperation as Qt, UniverDrawingUIPlugin as Jt } from "@univerjs/drawing-ui";
|
|
8
|
+
import { IRenderManagerService as ee, DocumentEditArea as Fe, Liquid as $n, PageLayoutType as Rn, DocumentSkeletonPageType as Nn, Vector2 as ei, Rect as ni, getColor as ti, getCurrentTypeOfRenderer as ii, TRANSFORM_CHANGE_OBSERVABLE_TYPE as ri } from "@univerjs/engine-render";
|
|
9
|
+
import { IMessageService as oi, ILocalFileService as si, ISidebarService as ai, useDependency as we, getMenuHiddenObservable as zn, MenuItemType as qn, RibbonStartGroup as ci, KeyCode as He, ComponentManager as di, IMenuManagerService as li, IShortcutService as gi, UniverUIPlugin as mi } from "@univerjs/ui";
|
|
10
10
|
import { RichTextEditingMutation as J, DocSkeletonManagerService as se, DocSelectionManagerService as _n } from "@univerjs/docs";
|
|
11
|
-
import { DocSelectionRenderService as Me, getRichTextEditPath as ze, NodePositionConvertToCursor as En, getOneTextSelectionRange as An, getAnchorBounding as
|
|
12
|
-
import { BehaviorSubject as
|
|
13
|
-
import { MessageType as Bn, clsx as j, InputNumber as ke, Select as Un, Checkbox as
|
|
11
|
+
import { DocSelectionRenderService as Me, getRichTextEditPath as ze, NodePositionConvertToCursor as En, getOneTextSelectionRange as An, getAnchorBounding as ui, TEXT_RANGE_LAYER_INDEX as fi, getDocObject as hi, getCustomBlockIdsInSelections as pi, docDrawingPositionToTransform as wi, DocCanvasPopManagerService as vi, IEditorService as Ii, SetDocZoomRatioOperation as _i } from "@univerjs/docs-ui";
|
|
12
|
+
import { BehaviorSubject as Si, debounceTime as Xn, Observable as Ci, takeUntil as xn, filter as Ln } from "rxjs";
|
|
13
|
+
import { MessageType as Bn, clsx as j, InputNumber as ke, Select as Un, Checkbox as Di, RadioGroup as kn, Radio as Pe } from "@univerjs/design";
|
|
14
14
|
import { jsxs as X, jsx as f } from "react/jsx-runtime";
|
|
15
|
-
import { forwardRef as Kn, useRef as
|
|
16
|
-
const
|
|
17
|
-
var
|
|
18
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
15
|
+
import { forwardRef as Kn, useRef as Oi, createElement as Yn, useState as re, useEffect as Sn } from "react";
|
|
16
|
+
const Ti = "docs-drawing-ui.config", Fn = {};
|
|
17
|
+
var Pi = Object.getOwnPropertyDescriptor, yi = (i, e, n, t) => {
|
|
18
|
+
for (var r = t > 1 ? void 0 : t ? Pi(e, n) : e, o = i.length - 1, s; o >= 0; o--)
|
|
19
19
|
(s = i[o]) && (r = s(r) || r);
|
|
20
20
|
return r;
|
|
21
21
|
}, Ve = (i, e) => (n, t) => e(n, t, i);
|
|
22
|
-
function
|
|
22
|
+
function bi(i) {
|
|
23
23
|
var t, r, o, s;
|
|
24
24
|
if (q.isNoop(i) || !Array.isArray(i))
|
|
25
25
|
return null;
|
|
@@ -42,7 +42,7 @@ function yi(i) {
|
|
|
42
42
|
});
|
|
43
43
|
return n;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function Mi(i) {
|
|
46
46
|
if (!Array.isArray(i) || i.length < 3 || i[0] !== "drawingsOrder")
|
|
47
47
|
return [];
|
|
48
48
|
const e = [];
|
|
@@ -67,24 +67,27 @@ let rn = class extends Xe {
|
|
|
67
67
|
_commandExecutedListener() {
|
|
68
68
|
this.disposeWithMe(
|
|
69
69
|
this._commandService.beforeCommandExecuted((i) => {
|
|
70
|
+
var a, d;
|
|
70
71
|
if (i.id !== J.id)
|
|
71
72
|
return;
|
|
72
|
-
const e = i.params, { unitId: n, actions: t } = e, r =
|
|
73
|
-
if (
|
|
74
|
-
for (const { type:
|
|
75
|
-
|
|
73
|
+
const e = i.params, { unitId: n, actions: t } = e, r = this._univerInstanceService.getUniverDocInstance(n), o = (d = (a = r == null ? void 0 : r.getBody()) == null ? void 0 : a.customBlocks) != null ? d : [], s = bi(t);
|
|
74
|
+
if (s != null)
|
|
75
|
+
for (const { type: c, drawingId: l, drawing: m } of s) {
|
|
76
|
+
const g = o.find((p) => p.blockId === l);
|
|
77
|
+
(g == null ? void 0 : g.blockType) !== Ot.CUSTOM && (c === "add" ? this._addDrawings(n, [m]) : this._removeDrawings(n, [l]));
|
|
78
|
+
}
|
|
76
79
|
})
|
|
77
80
|
), this.disposeWithMe(
|
|
78
81
|
this._commandService.onCommandExecuted((i) => {
|
|
79
82
|
if (i.id !== J.id)
|
|
80
83
|
return;
|
|
81
84
|
const e = i.params, { unitId: n, actions: t } = e;
|
|
82
|
-
|
|
85
|
+
Mi(t).length > 0 && this._updateDrawingsOrder(n);
|
|
83
86
|
})
|
|
84
87
|
), this.disposeWithMe(
|
|
85
88
|
this._commandService.onCommandExecuted((i) => {
|
|
86
89
|
var s;
|
|
87
|
-
if (i.id !==
|
|
90
|
+
if (i.id !== Tt.id && i.id !== Pt.id)
|
|
88
91
|
return;
|
|
89
92
|
const e = (s = this._univerInstanceService.getCurrentUniverDocInstance()) == null ? void 0 : s.getUnitId(), n = this._drawingManagerService.getFocusDrawings();
|
|
90
93
|
if (e == null || n.length === 0)
|
|
@@ -125,7 +128,7 @@ let rn = class extends Xe {
|
|
|
125
128
|
t.orderNotification(o), r.orderNotification(o);
|
|
126
129
|
}
|
|
127
130
|
};
|
|
128
|
-
rn =
|
|
131
|
+
rn = yi([
|
|
129
132
|
Ve(0, K),
|
|
130
133
|
Ve(1, z),
|
|
131
134
|
Ve(2, Ie),
|
|
@@ -134,7 +137,7 @@ rn = Pi([
|
|
|
134
137
|
], rn);
|
|
135
138
|
class gn {
|
|
136
139
|
constructor() {
|
|
137
|
-
Ce(this, "_refreshDrawings$", new
|
|
140
|
+
Ce(this, "_refreshDrawings$", new Si(null));
|
|
138
141
|
Ce(this, "refreshDrawings$", this._refreshDrawings$.asObservable());
|
|
139
142
|
}
|
|
140
143
|
refreshDrawings(e) {
|
|
@@ -142,7 +145,7 @@ class gn {
|
|
|
142
145
|
}
|
|
143
146
|
}
|
|
144
147
|
var ue = /* @__PURE__ */ ((i) => (i.INLINE = "inline", i.BEHIND_TEXT = "behindText", i.IN_FRONT_OF_TEXT = "inFrontOfText", i.WRAP_SQUARE = "wrapSquare", i.WRAP_TOP_AND_BOTTOM = "wrapTopAndBottom", i))(ue || {});
|
|
145
|
-
const
|
|
148
|
+
const Ri = {
|
|
146
149
|
inline: H.INLINE,
|
|
147
150
|
wrapSquare: H.WRAP_SQUARE,
|
|
148
151
|
wrapTopAndBottom: H.WRAP_TOP_AND_BOTTOM,
|
|
@@ -239,7 +242,7 @@ const Qn = {
|
|
|
239
242
|
return !1;
|
|
240
243
|
const p = l.getEditArea(), h = m.getTransformerByCreate(), { pages: v, skeHeaders: w, skeFooters: S } = c, O = q.getInstance(), D = [], { drawings: T = {} } = g.getSnapshot();
|
|
241
244
|
for (const N of n) {
|
|
242
|
-
const { drawingId: I } = N, L = T[I].layoutType, W =
|
|
245
|
+
const { drawingId: I } = N, L = T[I].layoutType, W = Ri[t];
|
|
243
246
|
if (L !== W) {
|
|
244
247
|
const C = O.replaceOp(["drawings", I, "layoutType"], L, W);
|
|
245
248
|
D.push(C);
|
|
@@ -499,12 +502,12 @@ const Qn = {
|
|
|
499
502
|
return s.refreshControls(), !!W;
|
|
500
503
|
}
|
|
501
504
|
};
|
|
502
|
-
var
|
|
503
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
505
|
+
var Ni = Object.getOwnPropertyDescriptor, Ei = (i, e, n, t) => {
|
|
506
|
+
for (var r = t > 1 ? void 0 : t ? Ni(e, n) : e, o = i.length - 1, s; o >= 0; o--)
|
|
504
507
|
(s = i[o]) && (r = s(r) || r);
|
|
505
508
|
return r;
|
|
506
509
|
}, Qe = (i, e) => (n, t) => e(n, t, i);
|
|
507
|
-
const
|
|
510
|
+
const Ai = "__InlineDrawingAnchor__";
|
|
508
511
|
function Hn(i) {
|
|
509
512
|
const { path: e } = i;
|
|
510
513
|
return e.some((n) => n === "cells");
|
|
@@ -921,7 +924,7 @@ let on = class extends Xe {
|
|
|
921
924
|
return { scene: t, transformer: r };
|
|
922
925
|
}
|
|
923
926
|
_getTransformCoordForDocumentOffset(e, n, t, r) {
|
|
924
|
-
const { documentTransform: o } = e.getOffsetConfig(), s = n.transformVector2SceneCoord(
|
|
927
|
+
const { documentTransform: o } = e.getOffsetConfig(), s = n.transformVector2SceneCoord(ei.FromArray([t, r]));
|
|
925
928
|
if (s)
|
|
926
929
|
return o.clone().invert().applyPoint(s);
|
|
927
930
|
}
|
|
@@ -932,23 +935,23 @@ let on = class extends Xe {
|
|
|
932
935
|
const { mainComponent: r, scene: o } = t, s = r, {
|
|
933
936
|
docsLeft: a,
|
|
934
937
|
docsTop: d
|
|
935
|
-
} = s.getOffsetConfig(), c =
|
|
938
|
+
} = s.getOffsetConfig(), c = ui(n), { left: l, top: m, height: g } = c, p = l + a, h = m + d;
|
|
936
939
|
if (this._anchorShape) {
|
|
937
940
|
this._anchorShape.transformByState({ left: p, top: h, height: g }), this._anchorShape.show();
|
|
938
941
|
return;
|
|
939
942
|
}
|
|
940
|
-
const v = 6, w = new
|
|
943
|
+
const v = 6, w = new ni(Ai + ye.generateRandomId(v), {
|
|
941
944
|
left: p,
|
|
942
945
|
top: h,
|
|
943
946
|
height: g,
|
|
944
947
|
strokeWidth: 2,
|
|
945
|
-
stroke:
|
|
948
|
+
stroke: ti(yt.darkGray, 1),
|
|
946
949
|
evented: !1
|
|
947
950
|
});
|
|
948
|
-
this._anchorShape = w, o.addObject(w,
|
|
951
|
+
this._anchorShape = w, o.addObject(w, fi);
|
|
949
952
|
}
|
|
950
953
|
_getDocObject() {
|
|
951
|
-
return
|
|
954
|
+
return hi(this._univerInstanceService, this._renderManagerService);
|
|
952
955
|
}
|
|
953
956
|
_getPageContentSize(e) {
|
|
954
957
|
const n = this._renderManagerService.getRenderById(e.unitId), t = n == null ? void 0 : n.with(se).getSkeleton(), r = 500, o = 500, s = t == null ? void 0 : t.getSkeletonData();
|
|
@@ -979,7 +982,7 @@ let on = class extends Xe {
|
|
|
979
982
|
};
|
|
980
983
|
}
|
|
981
984
|
};
|
|
982
|
-
on =
|
|
985
|
+
on = Ei([
|
|
983
986
|
Qe(0, z),
|
|
984
987
|
Qe(1, K),
|
|
985
988
|
Qe(2, Ie),
|
|
@@ -993,7 +996,7 @@ var he = function() {
|
|
|
993
996
|
}
|
|
994
997
|
return i;
|
|
995
998
|
}, he.apply(this, arguments);
|
|
996
|
-
},
|
|
999
|
+
}, xi = function(i, e) {
|
|
997
1000
|
var n = {};
|
|
998
1001
|
for (var t in i) Object.prototype.hasOwnProperty.call(i, t) && e.indexOf(t) < 0 && (n[t] = i[t]);
|
|
999
1002
|
if (i != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -1001,15 +1004,15 @@ var he = function() {
|
|
|
1001
1004
|
e.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(i, t[r]) && (n[t[r]] = i[t[r]]);
|
|
1002
1005
|
return n;
|
|
1003
1006
|
}, it = Kn(function(i, e) {
|
|
1004
|
-
var n = i.icon, t = i.id, r = i.className, o = i.extend, s =
|
|
1007
|
+
var n = i.icon, t = i.id, r = i.className, o = i.extend, s = xi(i, ["icon", "id", "className", "extend"]), a = "univerjs-icon univerjs-icon-".concat(t, " ").concat(r || "").trim(), d = Oi("_".concat(Ui()));
|
|
1005
1008
|
return rt(n, "".concat(t), { defIds: n.defIds, idSuffix: d.current }, he({ ref: e, className: a }, s), o);
|
|
1006
1009
|
});
|
|
1007
1010
|
function rt(i, e, n, t, r) {
|
|
1008
|
-
return Yn(i.tag, he(he({ key: e },
|
|
1011
|
+
return Yn(i.tag, he(he({ key: e }, Li(i, n, r)), t), (Bi(i, n).children || []).map(function(o, s) {
|
|
1009
1012
|
return rt(o, "".concat(e, "-").concat(i.tag, "-").concat(s), n, void 0, r);
|
|
1010
1013
|
}));
|
|
1011
1014
|
}
|
|
1012
|
-
function
|
|
1015
|
+
function Li(i, e, n) {
|
|
1013
1016
|
var t = he({}, i.attrs);
|
|
1014
1017
|
n != null && n.colorChannel1 && t.fill === "colorChannel1" && (t.fill = n.colorChannel1), i.tag === "mask" && t.id && (t.id = t.id + e.idSuffix), Object.entries(t).forEach(function(o) {
|
|
1015
1018
|
var s = o[0], a = o[1];
|
|
@@ -1021,21 +1024,21 @@ function xi(i, e, n) {
|
|
|
1021
1024
|
typeof a == "string" && (t[s] = a.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
1022
1025
|
})), t;
|
|
1023
1026
|
}
|
|
1024
|
-
function
|
|
1027
|
+
function Bi(i, e) {
|
|
1025
1028
|
var n, t = e.defIds;
|
|
1026
1029
|
return !t || t.length === 0 ? i : i.tag === "defs" && (!((n = i.children) === null || n === void 0) && n.length) ? he(he({}, i), { children: i.children.map(function(r) {
|
|
1027
1030
|
return typeof r.attrs.id == "string" && t && t.indexOf(r.attrs.id) > -1 ? he(he({}, r), { attrs: he(he({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
|
|
1028
1031
|
}) }) : i;
|
|
1029
1032
|
}
|
|
1030
|
-
function
|
|
1033
|
+
function Ui() {
|
|
1031
1034
|
return Math.random().toString(36).substring(2, 8);
|
|
1032
1035
|
}
|
|
1033
1036
|
it.displayName = "UniverIcon";
|
|
1034
|
-
var
|
|
1037
|
+
var ki = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M2.2498 3.65005C2.2498 2.87685 2.87661 2.25005 3.64981 2.25005H7.9998C8.33118 2.25005 8.5998 1.98142 8.5998 1.65005C8.5998 1.31868 8.33118 1.05005 7.9998 1.05005H3.64981C2.21387 1.05005 1.0498 2.21411 1.0498 3.65005V12.35C1.0498 13.786 2.21386 14.95 3.6498 14.95H12.3498C13.7857 14.95 14.9498 13.786 14.9498 12.3501V8.00005C14.9498 7.66868 14.6812 7.40005 14.3498 7.40005C14.0184 7.40005 13.7498 7.66868 13.7498 8.00005V9.23974L12.2385 8.1063C11.7252 7.72129 11.0068 7.7723 10.5531 8.22605L9.00869 9.77041L6.73916 7.8251C6.24387 7.40055 5.5095 7.41278 5.02864 7.85359L2.2498 10.4009V3.65005ZM2.2498 12.0287V12.35C2.2498 13.1232 2.87661 13.75 3.6498 13.75H12.3498C13.123 13.75 13.7498 13.1232 13.7498 12.3501V10.7397L11.5186 9.06631C11.4829 9.03956 11.433 9.04314 11.4016 9.07458L9.92249 10.5537L11.1015 11.5642C11.3531 11.7799 11.3822 12.1587 11.1666 12.4103C10.9509 12.6619 10.5721 12.691 10.3205 12.4753L5.9582 8.7362C5.92384 8.70674 5.87288 8.70758 5.83952 8.73816L2.2498 12.0287Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M11.8097 1.14783C12.1411 1.14783 12.4097 1.41646 12.4097 1.74783V3.297H14.1541C14.4855 3.297 14.7541 3.56563 14.7541 3.897C14.7541 4.22837 14.4855 4.497 14.1541 4.497H12.4097V6.24167C12.4097 6.57304 12.1411 6.84167 11.8097 6.84167C11.4783 6.84167 11.2097 6.57304 11.2097 6.24167V4.497H9.6603C9.32893 4.497 9.0603 4.22837 9.0603 3.897C9.0603 3.56563 9.32893 3.297 9.6603 3.297H11.2097V1.74783C11.2097 1.41646 11.4783 1.14783 11.8097 1.14783Z" } }] }, ot = Kn(function(i, e) {
|
|
1035
1038
|
return Yn(it, Object.assign({}, i, {
|
|
1036
1039
|
id: "add-image-single",
|
|
1037
1040
|
ref: e,
|
|
1038
|
-
icon:
|
|
1041
|
+
icon: ki
|
|
1039
1042
|
}));
|
|
1040
1043
|
});
|
|
1041
1044
|
ot.displayName = "AddImageSingle";
|
|
@@ -1048,7 +1051,7 @@ const Cn = {
|
|
|
1048
1051
|
const n = i.get(z), t = i.get(K), r = i.get(ee), o = t.getCurrentUniverDocInstance();
|
|
1049
1052
|
if (e == null || o == null)
|
|
1050
1053
|
return !1;
|
|
1051
|
-
const s = r.getRenderById(e.unitId).with(Me), { drawings: a } = e, d = (M = s.getSegment()) != null ? M : "", c = new vn(), l = q.getInstance(), m = (E = (y = o.getSelfOrHeaderFooterModel(d).getBody()) == null ? void 0 : y.customBlocks) != null ? E : [], g = a.map((N) => m.find((I) => I.blockId === N.drawingId)).filter((N) => !!N).sort((N, I) => N.startIndex > I.startIndex ? 1 : -1), p = a[0].unitId, h = new
|
|
1054
|
+
const s = r.getRenderById(e.unitId).with(Me), { drawings: a } = e, d = (M = s.getSegment()) != null ? M : "", c = new vn(), l = q.getInstance(), m = (E = (y = o.getSelfOrHeaderFooterModel(d).getBody()) == null ? void 0 : y.customBlocks) != null ? E : [], g = a.map((N) => m.find((I) => I.blockId === N.drawingId)).filter((N) => !!N).sort((N, I) => N.startIndex > I.startIndex ? 1 : -1), p = a[0].unitId, h = new bt();
|
|
1052
1055
|
h.reset();
|
|
1053
1056
|
const v = g[0].startIndex, w = [
|
|
1054
1057
|
{
|
|
@@ -1140,9 +1143,9 @@ const Cn = {
|
|
|
1140
1143
|
len: l
|
|
1141
1144
|
});
|
|
1142
1145
|
else {
|
|
1143
|
-
const I =
|
|
1146
|
+
const I = Mt.selection.delete([o], g, 0, null, !1);
|
|
1144
1147
|
p.push(...I);
|
|
1145
|
-
const L =
|
|
1148
|
+
const L = pi(g, [o]), W = (U = s.getDrawings()) != null ? U : {}, x = (N = s.getDrawingsOrder()) != null ? N : [], G = L.sort((_, C) => x.indexOf(_) > x.indexOf(C) ? -1 : x.indexOf(_) < x.indexOf(C) ? 1 : 0);
|
|
1146
1149
|
if (G.length > 0)
|
|
1147
1150
|
for (const _ of G) {
|
|
1148
1151
|
const C = W[_], R = x.indexOf(_);
|
|
@@ -1223,8 +1226,8 @@ const Cn = {
|
|
|
1223
1226
|
return !1;
|
|
1224
1227
|
}
|
|
1225
1228
|
};
|
|
1226
|
-
var
|
|
1227
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
1229
|
+
var Fi = Object.getOwnPropertyDescriptor, Hi = (i, e, n, t) => {
|
|
1230
|
+
for (var r = t > 1 ? void 0 : t ? Fi(e, n) : e, o = i.length - 1, s; o >= 0; o--)
|
|
1228
1231
|
(s = i[o]) && (r = s(r) || r);
|
|
1229
1232
|
return r;
|
|
1230
1233
|
}, me = (i, e) => (n, t) => e(n, t, i);
|
|
@@ -1235,7 +1238,7 @@ let sn = class extends Xe {
|
|
|
1235
1238
|
async insertDocImage() {
|
|
1236
1239
|
const i = await this._fileOpenerService.openFile({
|
|
1237
1240
|
multiple: !0,
|
|
1238
|
-
accept:
|
|
1241
|
+
accept: Vt.map((n) => `.${n.replace("image/", "")}`).join(",")
|
|
1239
1242
|
}), e = i.length;
|
|
1240
1243
|
return e > yn ? (this._messageService.show({
|
|
1241
1244
|
type: Bn.Error,
|
|
@@ -1252,7 +1255,7 @@ let sn = class extends Xe {
|
|
|
1252
1255
|
let s = "";
|
|
1253
1256
|
switch (o) {
|
|
1254
1257
|
case hn.ERROR_EXCEED_SIZE:
|
|
1255
|
-
s = this._localeService.t("update-status.exceedMaxSize", String(
|
|
1258
|
+
s = this._localeService.t("update-status.exceedMaxSize", String(jt / (1024 * 1024)));
|
|
1256
1259
|
break;
|
|
1257
1260
|
case hn.ERROR_IMAGE_TYPE:
|
|
1258
1261
|
s = this._localeService.t("update-status.invalidImageType");
|
|
@@ -1272,7 +1275,7 @@ let sn = class extends Xe {
|
|
|
1272
1275
|
for (const r of e) {
|
|
1273
1276
|
if (r == null)
|
|
1274
1277
|
continue;
|
|
1275
|
-
const { imageId: o, imageSourceType: s, source: a, base64Cache: d } = r, { width: c, height: l, image: m } = await
|
|
1278
|
+
const { imageId: o, imageSourceType: s, source: a, base64Cache: d } = r, { width: c, height: l, image: m } = await $t(d || "");
|
|
1276
1279
|
this._imageIoService.addImageSourceCache(o, s, m);
|
|
1277
1280
|
let g = 1;
|
|
1278
1281
|
if (c > bn || l > Mn) {
|
|
@@ -1286,10 +1289,10 @@ let sn = class extends Xe {
|
|
|
1286
1289
|
unitId: n,
|
|
1287
1290
|
subUnitId: n,
|
|
1288
1291
|
drawingId: o,
|
|
1289
|
-
drawingType:
|
|
1292
|
+
drawingType: Rt.DRAWING_IMAGE,
|
|
1290
1293
|
imageSourceType: s,
|
|
1291
1294
|
source: a,
|
|
1292
|
-
transform:
|
|
1295
|
+
transform: wi(p),
|
|
1293
1296
|
docTransform: p,
|
|
1294
1297
|
behindDoc: oe.FALSE,
|
|
1295
1298
|
title: "",
|
|
@@ -1410,7 +1413,7 @@ let sn = class extends Xe {
|
|
|
1410
1413
|
return;
|
|
1411
1414
|
const r = i.getSnapshot(), { drawings: o = {} } = r, s = t.getEditArea() === Fe.BODY;
|
|
1412
1415
|
for (const d of Object.keys(o)) {
|
|
1413
|
-
const c = o[d], l =
|
|
1416
|
+
const c = o[d], l = zt({ unitId: n, drawingId: c.drawingId, subUnitId: n }), m = e.fuzzyMathObjects(l, !0);
|
|
1414
1417
|
if (m.length)
|
|
1415
1418
|
for (const g of m)
|
|
1416
1419
|
e.detachTransformerFrom(g), g.setOpacity(0.5), (s && c.isMultiTransform !== oe.TRUE || !s && c.isMultiTransform === oe.TRUE) && (e.attachTransformerTo(g), g.setOpacity(1));
|
|
@@ -1444,19 +1447,19 @@ let sn = class extends Xe {
|
|
|
1444
1447
|
this._docSelectionManagerService.replaceDocRanges(t);
|
|
1445
1448
|
}
|
|
1446
1449
|
};
|
|
1447
|
-
sn =
|
|
1450
|
+
sn = Hi([
|
|
1448
1451
|
me(1, z),
|
|
1449
1452
|
me(2, ve(_n)),
|
|
1450
1453
|
me(3, ee),
|
|
1451
|
-
me(4,
|
|
1454
|
+
me(4, Gt),
|
|
1452
1455
|
me(5, Be),
|
|
1453
1456
|
me(6, Ie),
|
|
1454
1457
|
me(7, jn),
|
|
1455
|
-
me(8,
|
|
1458
|
+
me(8, oi),
|
|
1456
1459
|
me(9, ve(ln)),
|
|
1457
1460
|
me(10, ve(Me)),
|
|
1458
1461
|
me(11, ve(gn)),
|
|
1459
|
-
me(12,
|
|
1462
|
+
me(12, si)
|
|
1460
1463
|
], sn);
|
|
1461
1464
|
const gt = {
|
|
1462
1465
|
id: "doc.command.insert-float-image",
|
|
@@ -1464,7 +1467,7 @@ const gt = {
|
|
|
1464
1467
|
handler: (i) => {
|
|
1465
1468
|
var t, r;
|
|
1466
1469
|
const e = i.get(K), n = i.get(ee);
|
|
1467
|
-
return (r = (t =
|
|
1470
|
+
return (r = (t = ii(be.UNIVER_DOC, e, n)) == null ? void 0 : t.with(sn).insertDocImage()) != null ? r : !1;
|
|
1468
1471
|
}
|
|
1469
1472
|
}, Ke = {
|
|
1470
1473
|
id: "doc.command.move-drawing",
|
|
@@ -1497,7 +1500,7 @@ const gt = {
|
|
|
1497
1500
|
});
|
|
1498
1501
|
return m.refreshControls(), !!h;
|
|
1499
1502
|
}
|
|
1500
|
-
},
|
|
1503
|
+
}, Wi = {
|
|
1501
1504
|
id: "doc.operation.clear-drawing-transformer",
|
|
1502
1505
|
type: Y.MUTATION,
|
|
1503
1506
|
handler: (i, e) => {
|
|
@@ -1511,7 +1514,7 @@ const gt = {
|
|
|
1511
1514
|
id: "sidebar.operation.doc-image",
|
|
1512
1515
|
type: Y.COMMAND,
|
|
1513
1516
|
handler: async (i, e) => {
|
|
1514
|
-
const n = i.get(
|
|
1517
|
+
const n = i.get(ai), t = i.get(ln), r = i.get(Ie);
|
|
1515
1518
|
switch (e.value) {
|
|
1516
1519
|
case "open":
|
|
1517
1520
|
n.open({
|
|
@@ -1537,17 +1540,17 @@ const gt = {
|
|
|
1537
1540
|
const n = i.get(Ie), t = i.get(z);
|
|
1538
1541
|
return e == null ? !1 : (n.focusDrawing([e]), t.executeCommand(ut.id, { value: "open" }), !0);
|
|
1539
1542
|
}
|
|
1540
|
-
},
|
|
1541
|
-
imageCommonPanel:
|
|
1542
|
-
imageCommonPanelGrid:
|
|
1543
|
-
imageCommonPanelBorder:
|
|
1544
|
-
imageCommonPanelTitle:
|
|
1545
|
-
imageCommonPanelSubtitle:
|
|
1546
|
-
imageCommonPanelRow:
|
|
1547
|
-
imageCommonPanelColumn:
|
|
1548
|
-
imageCommonPanelSpan2:
|
|
1549
|
-
imageCommonPanelInput:
|
|
1550
|
-
}, Wn = -1e3, Gn = 1e3,
|
|
1543
|
+
}, Gi = "univer-image-common-panel", Vi = "univer-image-common-panel-grid", ji = "univer-image-common-panel-border", $i = "univer-image-common-panel-title", zi = "univer-image-common-panel-subtitle", qi = "univer-image-common-panel-row", Xi = "univer-image-common-panel-column", Ki = "univer-image-common-panel-span2", Yi = "univer-image-common-panel-input", u = {
|
|
1544
|
+
imageCommonPanel: Gi,
|
|
1545
|
+
imageCommonPanelGrid: Vi,
|
|
1546
|
+
imageCommonPanelBorder: ji,
|
|
1547
|
+
imageCommonPanelTitle: $i,
|
|
1548
|
+
imageCommonPanelSubtitle: zi,
|
|
1549
|
+
imageCommonPanelRow: qi,
|
|
1550
|
+
imageCommonPanelColumn: Xi,
|
|
1551
|
+
imageCommonPanelSpan2: Ki,
|
|
1552
|
+
imageCommonPanelInput: Yi
|
|
1553
|
+
}, Wn = -1e3, Gn = 1e3, Zi = (i) => {
|
|
1551
1554
|
const e = we(z), n = we(ln), t = we(Ie), r = we(ee), o = we(K), { drawings: s } = i, a = s[0];
|
|
1552
1555
|
if (a == null)
|
|
1553
1556
|
return;
|
|
@@ -1776,9 +1779,9 @@ const gt = {
|
|
|
1776
1779
|
] }) })
|
|
1777
1780
|
] }),
|
|
1778
1781
|
/* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn, u.imageCommonPanelSubtitle), children: /* @__PURE__ */ f("div", { children: n.t("image-position.options") }) }) }),
|
|
1779
|
-
/* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, style: { marginBottom: "50px" }, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ f(
|
|
1782
|
+
/* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, style: { marginBottom: "50px" }, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ f(Di, { disabled: w, checked: y, onChange: _, children: n.t("image-position.moveObjectWithText") }) }) })
|
|
1780
1783
|
] });
|
|
1781
|
-
}, Je = 0, en = 100,
|
|
1784
|
+
}, Je = 0, en = 100, Qi = (i) => {
|
|
1782
1785
|
const e = we(z), n = we(ln), t = we(Ie), r = we(ee), o = we(K), { drawings: s } = i, a = s[0];
|
|
1783
1786
|
if (a == null)
|
|
1784
1787
|
return null;
|
|
@@ -1991,7 +1994,7 @@ const gt = {
|
|
|
1991
1994
|
] }) })
|
|
1992
1995
|
] })
|
|
1993
1996
|
] });
|
|
1994
|
-
},
|
|
1997
|
+
}, Ji = () => {
|
|
1995
1998
|
const i = we(Ie), e = i.getFocusDrawings(), [n, t] = re(e);
|
|
1996
1999
|
return Sn(() => {
|
|
1997
2000
|
const r = i.focus$.subscribe((o) => {
|
|
@@ -2001,13 +2004,13 @@ const gt = {
|
|
|
2001
2004
|
r.unsubscribe();
|
|
2002
2005
|
};
|
|
2003
2006
|
}, []), !!(n != null && n.length) && /* @__PURE__ */ X("div", { className: u.imageCommonPanel, children: [
|
|
2004
|
-
/* @__PURE__ */ f(
|
|
2005
|
-
/* @__PURE__ */ f(
|
|
2006
|
-
/* @__PURE__ */ f(
|
|
2007
|
+
/* @__PURE__ */ f(Xt, { drawings: n, hasAlign: !1, hasCropper: !1, hasGroup: !1, hasTransform: !1 }),
|
|
2008
|
+
/* @__PURE__ */ f(Qi, { drawings: n }),
|
|
2009
|
+
/* @__PURE__ */ f(Zi, { drawings: n })
|
|
2007
2010
|
] });
|
|
2008
|
-
}, ht = "addition-and-subtraction-single", pt = "doc.menu.image", wt = gt.id,
|
|
2011
|
+
}, ht = "addition-and-subtraction-single", pt = "doc.menu.image", wt = gt.id, er = (i) => {
|
|
2009
2012
|
const e = i.get(_n), n = i.get(K);
|
|
2010
|
-
return new
|
|
2013
|
+
return new Ci((t) => {
|
|
2011
2014
|
const r = e.textSelection$.subscribe(() => {
|
|
2012
2015
|
var s;
|
|
2013
2016
|
const o = e.getActiveTextRange();
|
|
@@ -2029,17 +2032,17 @@ const gt = {
|
|
|
2029
2032
|
return () => r.unsubscribe();
|
|
2030
2033
|
});
|
|
2031
2034
|
};
|
|
2032
|
-
function
|
|
2035
|
+
function nr(i) {
|
|
2033
2036
|
return {
|
|
2034
2037
|
id: pt,
|
|
2035
2038
|
type: qn.SUBITEMS,
|
|
2036
2039
|
icon: ht,
|
|
2037
2040
|
tooltip: "docImage.title",
|
|
2038
|
-
disabled$:
|
|
2041
|
+
disabled$: er(i),
|
|
2039
2042
|
hidden$: zn(i, be.UNIVER_DOC, void 0, In)
|
|
2040
2043
|
};
|
|
2041
2044
|
}
|
|
2042
|
-
function
|
|
2045
|
+
function tr(i) {
|
|
2043
2046
|
return {
|
|
2044
2047
|
id: wt,
|
|
2045
2048
|
title: "docImage.upload.float",
|
|
@@ -2047,22 +2050,22 @@ function nr(i) {
|
|
|
2047
2050
|
hidden$: zn(i, be.UNIVER_DOC, void 0, In)
|
|
2048
2051
|
};
|
|
2049
2052
|
}
|
|
2050
|
-
const
|
|
2051
|
-
[
|
|
2053
|
+
const ir = {
|
|
2054
|
+
[ci.LAYOUT]: {
|
|
2052
2055
|
[pt]: {
|
|
2053
2056
|
order: 0,
|
|
2054
|
-
menuItemFactory:
|
|
2057
|
+
menuItemFactory: nr,
|
|
2055
2058
|
[wt]: {
|
|
2056
2059
|
order: 0,
|
|
2057
|
-
menuItemFactory:
|
|
2060
|
+
menuItemFactory: tr
|
|
2058
2061
|
}
|
|
2059
2062
|
}
|
|
2060
2063
|
}
|
|
2061
2064
|
};
|
|
2062
2065
|
function Ye(i) {
|
|
2063
|
-
return i.getContextValue(
|
|
2066
|
+
return i.getContextValue(Nt) && i.getContextValue(tn);
|
|
2064
2067
|
}
|
|
2065
|
-
const
|
|
2068
|
+
const rr = {
|
|
2066
2069
|
id: Ke.id,
|
|
2067
2070
|
description: "shortcut.doc.drawing-move-down",
|
|
2068
2071
|
group: "4_doc-drawing-view",
|
|
@@ -2072,7 +2075,7 @@ const ir = {
|
|
|
2072
2075
|
staticParameters: {
|
|
2073
2076
|
direction: fe.DOWN
|
|
2074
2077
|
}
|
|
2075
|
-
},
|
|
2078
|
+
}, or = {
|
|
2076
2079
|
id: Ke.id,
|
|
2077
2080
|
description: "shortcut.doc.drawing-move-up",
|
|
2078
2081
|
group: "4_doc-drawing-view",
|
|
@@ -2082,7 +2085,7 @@ const ir = {
|
|
|
2082
2085
|
staticParameters: {
|
|
2083
2086
|
direction: fe.UP
|
|
2084
2087
|
}
|
|
2085
|
-
},
|
|
2088
|
+
}, sr = {
|
|
2086
2089
|
id: Ke.id,
|
|
2087
2090
|
description: "shortcut.doc.drawing-move-left",
|
|
2088
2091
|
group: "4_doc-drawing-view",
|
|
@@ -2092,7 +2095,7 @@ const ir = {
|
|
|
2092
2095
|
staticParameters: {
|
|
2093
2096
|
direction: fe.LEFT
|
|
2094
2097
|
}
|
|
2095
|
-
},
|
|
2098
|
+
}, ar = {
|
|
2096
2099
|
id: Ke.id,
|
|
2097
2100
|
description: "shortcut.doc.drawing-move-right",
|
|
2098
2101
|
group: "4_doc-drawing-view",
|
|
@@ -2102,7 +2105,7 @@ const ir = {
|
|
|
2102
2105
|
staticParameters: {
|
|
2103
2106
|
direction: fe.RIGHT
|
|
2104
2107
|
}
|
|
2105
|
-
},
|
|
2108
|
+
}, cr = {
|
|
2106
2109
|
id: st.id,
|
|
2107
2110
|
description: "shortcut.doc.drawing-delete",
|
|
2108
2111
|
group: "4_doc-drawing-view",
|
|
@@ -2111,8 +2114,8 @@ const ir = {
|
|
|
2111
2114
|
binding: He.DELETE,
|
|
2112
2115
|
mac: He.BACKSPACE
|
|
2113
2116
|
};
|
|
2114
|
-
var
|
|
2115
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2117
|
+
var dr = Object.getOwnPropertyDescriptor, lr = (i, e, n, t) => {
|
|
2118
|
+
for (var r = t > 1 ? void 0 : t ? dr(e, n) : e, o = i.length - 1, s; o >= 0; o--)
|
|
2116
2119
|
(s = i[o]) && (r = s(r) || r);
|
|
2117
2120
|
return r;
|
|
2118
2121
|
}, nn = (i, e) => (n, t) => e(n, t, i);
|
|
@@ -2122,10 +2125,10 @@ let an = class extends Xe {
|
|
|
2122
2125
|
}
|
|
2123
2126
|
_initCustomComponents() {
|
|
2124
2127
|
const i = this._componentManager;
|
|
2125
|
-
this.disposeWithMe(i.register(ht, ot)), this.disposeWithMe(i.register(mt,
|
|
2128
|
+
this.disposeWithMe(i.register(ht, ot)), this.disposeWithMe(i.register(mt, Ji));
|
|
2126
2129
|
}
|
|
2127
2130
|
_initMenus() {
|
|
2128
|
-
this._menuManagerService.mergeMenu(
|
|
2131
|
+
this._menuManagerService.mergeMenu(ir);
|
|
2129
2132
|
}
|
|
2130
2133
|
_initCommands() {
|
|
2131
2134
|
[
|
|
@@ -2139,7 +2142,7 @@ let an = class extends Xe {
|
|
|
2139
2142
|
tt,
|
|
2140
2143
|
Cn,
|
|
2141
2144
|
ut,
|
|
2142
|
-
|
|
2145
|
+
Wi,
|
|
2143
2146
|
ft,
|
|
2144
2147
|
at,
|
|
2145
2148
|
lt,
|
|
@@ -2151,11 +2154,11 @@ let an = class extends Xe {
|
|
|
2151
2154
|
_initShortcuts() {
|
|
2152
2155
|
[
|
|
2153
2156
|
// sheet drawing shortcuts
|
|
2154
|
-
ir,
|
|
2155
2157
|
rr,
|
|
2156
2158
|
or,
|
|
2157
2159
|
sr,
|
|
2158
|
-
ar
|
|
2160
|
+
ar,
|
|
2161
|
+
cr
|
|
2159
2162
|
].forEach((i) => {
|
|
2160
2163
|
this.disposeWithMe(this._shortcutService.registerShortcut(i));
|
|
2161
2164
|
});
|
|
@@ -2164,18 +2167,18 @@ let an = class extends Xe {
|
|
|
2164
2167
|
this._initCommands(), this._initCustomComponents(), this._initMenus(), this._initShortcuts();
|
|
2165
2168
|
}
|
|
2166
2169
|
};
|
|
2167
|
-
an =
|
|
2168
|
-
nn(0, ve(
|
|
2169
|
-
nn(1,
|
|
2170
|
+
an = lr([
|
|
2171
|
+
nn(0, ve(di)),
|
|
2172
|
+
nn(1, li),
|
|
2170
2173
|
nn(2, z),
|
|
2171
|
-
nn(3,
|
|
2174
|
+
nn(3, gi)
|
|
2172
2175
|
], an);
|
|
2173
|
-
var
|
|
2174
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2176
|
+
var gr = Object.getOwnPropertyDescriptor, mr = (i, e, n, t) => {
|
|
2177
|
+
for (var r = t > 1 ? void 0 : t ? gr(e, n) : e, o = i.length - 1, s; o >= 0; o--)
|
|
2175
2178
|
(s = i[o]) && (r = s(r) || r);
|
|
2176
2179
|
return r;
|
|
2177
2180
|
}, je = (i, e) => (n, t) => e(n, t, i);
|
|
2178
|
-
let cn = class extends
|
|
2181
|
+
let cn = class extends Et {
|
|
2179
2182
|
constructor(e, n, t, r, o) {
|
|
2180
2183
|
super();
|
|
2181
2184
|
Ce(this, "_initImagePopupMenu", /* @__PURE__ */ new Set());
|
|
@@ -2197,7 +2200,7 @@ let cn = class extends Nt {
|
|
|
2197
2200
|
_hasCropObject(e) {
|
|
2198
2201
|
const n = e.getAllObjects();
|
|
2199
2202
|
for (const t of n)
|
|
2200
|
-
if (t instanceof
|
|
2203
|
+
if (t instanceof Kt)
|
|
2201
2204
|
return !0;
|
|
2202
2205
|
return !1;
|
|
2203
2206
|
}
|
|
@@ -2228,7 +2231,7 @@ let cn = class extends Nt {
|
|
|
2228
2231
|
const { unitId: l, subUnitId: m, drawingId: g } = c, p = this._canvasPopManagerService.attachPopupToObject(
|
|
2229
2232
|
a,
|
|
2230
2233
|
{
|
|
2231
|
-
componentKey:
|
|
2234
|
+
componentKey: Yt,
|
|
2232
2235
|
direction: "horizontal",
|
|
2233
2236
|
offset: [2, 0],
|
|
2234
2237
|
extraProps: {
|
|
@@ -2271,7 +2274,7 @@ let cn = class extends Nt {
|
|
|
2271
2274
|
index: 0,
|
|
2272
2275
|
commandId: ft.id,
|
|
2273
2276
|
commandParams: { unitId: e, subUnitId: n, drawingId: t },
|
|
2274
|
-
disable: !!
|
|
2277
|
+
disable: !!At.includes(e)
|
|
2275
2278
|
},
|
|
2276
2279
|
{
|
|
2277
2280
|
label: "image-popup.delete",
|
|
@@ -2283,7 +2286,7 @@ let cn = class extends Nt {
|
|
|
2283
2286
|
{
|
|
2284
2287
|
label: "image-popup.crop",
|
|
2285
2288
|
index: 2,
|
|
2286
|
-
commandId:
|
|
2289
|
+
commandId: Zt.id,
|
|
2287
2290
|
commandParams: { unitId: e, subUnitId: n, drawingId: t },
|
|
2288
2291
|
disable: !0
|
|
2289
2292
|
// TODO: @JOCS, feature is not ready.
|
|
@@ -2291,7 +2294,7 @@ let cn = class extends Nt {
|
|
|
2291
2294
|
{
|
|
2292
2295
|
label: "image-popup.reset",
|
|
2293
2296
|
index: 3,
|
|
2294
|
-
commandId:
|
|
2297
|
+
commandId: Qt.id,
|
|
2295
2298
|
commandParams: [{ unitId: e, subUnitId: n, drawingId: t }],
|
|
2296
2299
|
disable: !0
|
|
2297
2300
|
// TODO: @JOCS, feature is not ready.
|
|
@@ -2299,15 +2302,15 @@ let cn = class extends Nt {
|
|
|
2299
2302
|
];
|
|
2300
2303
|
}
|
|
2301
2304
|
};
|
|
2302
|
-
cn =
|
|
2305
|
+
cn = mr([
|
|
2303
2306
|
je(0, Ie),
|
|
2304
|
-
je(1, ve(
|
|
2307
|
+
je(1, ve(vi)),
|
|
2305
2308
|
je(2, ee),
|
|
2306
2309
|
je(3, K),
|
|
2307
2310
|
je(4, jn)
|
|
2308
2311
|
], cn);
|
|
2309
|
-
var
|
|
2310
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2312
|
+
var ur = Object.getOwnPropertyDescriptor, fr = (i, e, n, t) => {
|
|
2313
|
+
for (var r = t > 1 ? void 0 : t ? ur(e, n) : e, o = i.length - 1, s; o >= 0; o--)
|
|
2311
2314
|
(s = i[o]) && (r = s(r) || r);
|
|
2312
2315
|
return r;
|
|
2313
2316
|
}, xe = (i, e) => (n, t) => e(n, t, i);
|
|
@@ -2328,7 +2331,7 @@ let wn = class extends Xe {
|
|
|
2328
2331
|
});
|
|
2329
2332
|
}
|
|
2330
2333
|
_commandExecutedListener() {
|
|
2331
|
-
const e = [J.id,
|
|
2334
|
+
const e = [J.id, _i.id];
|
|
2332
2335
|
this.disposeWithMe(
|
|
2333
2336
|
this._commandService.onCommandExecuted((n) => {
|
|
2334
2337
|
if (e.includes(n.id)) {
|
|
@@ -2349,8 +2352,8 @@ let wn = class extends Xe {
|
|
|
2349
2352
|
}
|
|
2350
2353
|
_initResize() {
|
|
2351
2354
|
this.disposeWithMe(
|
|
2352
|
-
|
|
2353
|
-
Ln((e) => e.type ===
|
|
2355
|
+
Lt(this._context.engine.onTransformChange$).pipe(
|
|
2356
|
+
Ln((e) => e.type === ri.resize),
|
|
2354
2357
|
Xn(16)
|
|
2355
2358
|
).subscribe(() => {
|
|
2356
2359
|
var t;
|
|
@@ -2447,30 +2450,30 @@ let wn = class extends Xe {
|
|
|
2447
2450
|
}, 1e3) : this._lifecycleService.lifecycle$.pipe(Ln((n) => n === Pn.Steady)).subscribe(e);
|
|
2448
2451
|
}
|
|
2449
2452
|
};
|
|
2450
|
-
wn =
|
|
2453
|
+
wn = fr([
|
|
2451
2454
|
xe(1, ve(se)),
|
|
2452
2455
|
xe(2, z),
|
|
2453
|
-
xe(3,
|
|
2456
|
+
xe(3, Ii),
|
|
2454
2457
|
xe(4, Ie),
|
|
2455
2458
|
xe(5, ve(gn)),
|
|
2456
2459
|
xe(6, K),
|
|
2457
|
-
xe(7, ve(
|
|
2460
|
+
xe(7, ve(xt))
|
|
2458
2461
|
], wn);
|
|
2459
|
-
var
|
|
2460
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2462
|
+
var hr = Object.defineProperty, pr = Object.getOwnPropertyDescriptor, wr = (i, e, n) => e in i ? hr(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n, vr = (i, e, n, t) => {
|
|
2463
|
+
for (var r = t > 1 ? void 0 : t ? pr(e, n) : e, o = i.length - 1, s; o >= 0; o--)
|
|
2461
2464
|
(s = i[o]) && (r = s(r) || r);
|
|
2462
2465
|
return r;
|
|
2463
|
-
}, pn = (i, e) => (n, t) => e(n, t, i), vt = (i, e, n) =>
|
|
2464
|
-
const
|
|
2465
|
-
let dn = class extends
|
|
2466
|
+
}, pn = (i, e) => (n, t) => e(n, t, i), vt = (i, e, n) => wr(i, typeof e != "symbol" ? e + "" : e, n);
|
|
2467
|
+
const Ir = "DOC_DRAWING_UI_PLUGIN";
|
|
2468
|
+
let dn = class extends Ft {
|
|
2466
2469
|
constructor(i = Fn, e, n, t) {
|
|
2467
2470
|
super(), this._config = i, this._injector = e, this._renderManagerSrv = n, this._configService = t;
|
|
2468
|
-
const { ...r } =
|
|
2471
|
+
const { ...r } = Ht(
|
|
2469
2472
|
{},
|
|
2470
2473
|
Fn,
|
|
2471
2474
|
this._config
|
|
2472
2475
|
);
|
|
2473
|
-
this._configService.setConfig(
|
|
2476
|
+
this._configService.setConfig(Ti, r);
|
|
2474
2477
|
}
|
|
2475
2478
|
onStarting() {
|
|
2476
2479
|
[
|
|
@@ -2492,15 +2495,15 @@ let dn = class extends kt {
|
|
|
2492
2495
|
}
|
|
2493
2496
|
};
|
|
2494
2497
|
vt(dn, "type", be.UNIVER_DOC);
|
|
2495
|
-
vt(dn, "pluginName",
|
|
2496
|
-
dn =
|
|
2497
|
-
|
|
2498
|
-
pn(1, ve(
|
|
2498
|
+
vt(dn, "pluginName", Ir);
|
|
2499
|
+
dn = vr([
|
|
2500
|
+
Bt(Jt, qt, Wt, mi),
|
|
2501
|
+
pn(1, ve(Ut)),
|
|
2499
2502
|
pn(2, ee),
|
|
2500
|
-
pn(3,
|
|
2503
|
+
pn(3, kt)
|
|
2501
2504
|
], dn);
|
|
2502
2505
|
export {
|
|
2503
|
-
|
|
2506
|
+
Wi as ClearDocDrawingTransformerOperation,
|
|
2504
2507
|
pt as DOCS_IMAGE_MENU_ID,
|
|
2505
2508
|
st as DeleteDocDrawingsCommand,
|
|
2506
2509
|
ft as EditDocDrawingOperation,
|