@univerjs/docs-drawing-ui 0.7.0-nightly.202505091607 → 0.7.0-nightly.202505111606
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 +22 -79
- package/lib/es/index.js +734 -863
- package/lib/index.css +1 -1
- package/lib/index.js +734 -863
- package/lib/umd/index.js +22 -79
- package/package.json +10 -10
package/lib/es/index.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
var kn = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { CommandType as q, ICommandService as
|
|
5
|
-
import { IDocDrawingService as
|
|
6
|
-
import { IImageIoService as ii, IDrawingManagerService as
|
|
2
|
+
var Wn = (i, e, t) => e in i ? kn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
3
|
+
var Ie = (i, e, t) => Wn(i, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { CommandType as q, ICommandService as j, IUniverInstanceService as z, TextX as Dt, JSONX as $, MemoryCursor as Hn, TextXActionType as Y, IUndoRedoService as Zt, BuildTextUtils as Gn, ArrangeTypeEnum as Qe, Tools as be, Inject as Z, IContextService as Qt, LocaleService as gt, Disposable as Le, WrapTextType as Xe, PositionedObjectLayoutType as k, BooleanNumber as se, DrawingTypeEnum as Pe, ObjectRelativeFromV as W, ObjectRelativeFromH as J, FOCUSING_COMMON_DRAWINGS as it, UniverInstanceType as we, Direction as fe, DocumentFlavor as pt, DOCS_ZEN_EDITOR_UNIT_ID_KEY as Ot, FOCUSING_UNIVER_EDITOR as jn, UndoCommand as Vn, RedoCommand as $n, DisposableCollection as zn, toDisposable as De, fromEventSubject as Jt, generateRandomId as Xn, Injector as en, DOC_DRAWING_PRINTING_COMPONENT_KEY as qn, throttle as Et, COLORS as Kn, RxDisposable as Yn, LifecycleService as Zn, LifecycleStages as Rt, DependentOn as Qn, IConfigService as Jn, Plugin as ei, merge as ti } from "@univerjs/core";
|
|
5
|
+
import { IDocDrawingService as Ue, UniverDocsDrawingPlugin as ni } from "@univerjs/docs-drawing";
|
|
6
|
+
import { IImageIoService as ii, IDrawingManagerService as me, DRAWING_IMAGE_ALLOW_IMAGE_LIST as ri, DRAWING_IMAGE_COUNT_LIMIT as At, ImageUploadStatusType as vt, DRAWING_IMAGE_ALLOW_SIZE as si, getImageSize as oi, getDrawingShapeKeyByDrawingSearch as ai, DRAWING_IMAGE_WIDTH_LIMIT as Pt, DRAWING_IMAGE_HEIGHT_LIMIT as Lt, UniverDrawingPlugin as ci } from "@univerjs/drawing";
|
|
7
7
|
import { DrawingCommonPanel as di, DrawingRenderService as tn, ImageCropperObject as li, COMPONENT_IMAGE_POPUP_MENU as ui, OpenImageCropOperation as gi, ImageResetSizeOperation as fi, UniverDrawingUIPlugin as hi } from "@univerjs/drawing-ui";
|
|
8
|
-
import { IRenderManagerService as Q, DocumentEditArea as We, getCurrentTypeOfRenderer as mi, CURSOR_TYPE as Ut, Liquid as nn, PageLayoutType as Bt, DocumentSkeletonPageType as Ft, Vector2 as
|
|
9
|
-
import { IMessageService as _i, ILocalFileService as Si, ISidebarService as Di, useDependency as
|
|
10
|
-
import { RichTextEditingMutation as ee, DocSelectionManagerService as
|
|
11
|
-
import { DocSelectionRenderService as xe, getRichTextEditPath as
|
|
12
|
-
import { MessageType as
|
|
13
|
-
import { BehaviorSubject as Tt, debounceTime as un, Observable as
|
|
8
|
+
import { IRenderManagerService as Q, DocumentEditArea as We, getCurrentTypeOfRenderer as mi, CURSOR_TYPE as Ut, Liquid as nn, PageLayoutType as Bt, DocumentSkeletonPageType as Ft, Vector2 as pi, Rect as vi, getColor as wi, TRANSFORM_CHANGE_OBSERVABLE_TYPE as Ii } from "@univerjs/engine-render";
|
|
9
|
+
import { IMessageService as _i, ILocalFileService as Si, ISidebarService as Di, useDependency as ve, getMenuHiddenObservable as rn, MenuItemType as sn, RibbonStartGroup as Oi, KeyCode as He, ComponentManager as on, IMenuManagerService as yi, IShortcutService as Ti, CanvasFloatDomService as Mi, PrintFloatDomSingle as bi, connectInjector as xi, UniverUIPlugin as Ci } from "@univerjs/ui";
|
|
10
|
+
import { RichTextEditingMutation as ee, DocSelectionManagerService as yt, DocSkeletonManagerService as te } from "@univerjs/docs";
|
|
11
|
+
import { DocSelectionRenderService as xe, getRichTextEditPath as qe, getCustomBlockIdsInSelections as Ni, docDrawingPositionToTransform as an, VIEWPORT_KEY as cn, SetDocZoomRatioOperation as dn, DocPrintInterceptorService as Ei, NodePositionConvertToCursor as kt, getOneTextSelectionRange as Wt, getAnchorBounding as Ri, TEXT_RANGE_LAYER_INDEX as Ai, getDocObject as Pi, DocCanvasPopManagerService as Li, IEditorService as Ui } from "@univerjs/docs-ui";
|
|
12
|
+
import { MessageType as Ht, clsx as _t, InputNumber as ke, Select as Gt, Checkbox as Bi, borderTopClassName as ln, RadioGroup as jt, Radio as Me, render as Fi, unmount as ki } from "@univerjs/design";
|
|
13
|
+
import { BehaviorSubject as Tt, debounceTime as un, Observable as Wi, map as Vt, switchMap as Hi, of as Gi, takeUntil as $t, filter as zt } from "rxjs";
|
|
14
14
|
import { jsxs as X, jsx as m } from "react/jsx-runtime";
|
|
15
|
-
import { forwardRef as gn, useRef as
|
|
15
|
+
import { forwardRef as gn, useRef as ji, createElement as fn, useState as re, useEffect as Mt, useMemo as Vi } from "react";
|
|
16
16
|
const $i = "docs-drawing-ui.config", Xt = {};
|
|
17
|
-
var
|
|
18
|
-
return
|
|
17
|
+
var he = function() {
|
|
18
|
+
return he = Object.assign || function(i) {
|
|
19
19
|
for (var e, t = 1, n = arguments.length; t < n; t++) {
|
|
20
20
|
e = arguments[t];
|
|
21
21
|
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && (i[r] = e[r]);
|
|
22
22
|
}
|
|
23
23
|
return i;
|
|
24
|
-
},
|
|
24
|
+
}, he.apply(this, arguments);
|
|
25
25
|
}, zi = function(i, e) {
|
|
26
26
|
var t = {};
|
|
27
27
|
for (var n in i) Object.prototype.hasOwnProperty.call(i, n) && e.indexOf(n) < 0 && (t[n] = i[n]);
|
|
@@ -30,16 +30,16 @@ var me = function() {
|
|
|
30
30
|
e.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(i, n[r]) && (t[n[r]] = i[n[r]]);
|
|
31
31
|
return t;
|
|
32
32
|
}, hn = gn(function(i, e) {
|
|
33
|
-
var t = i.icon, n = i.id, r = i.className, s = i.extend, o = zi(i, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(n, " ").concat(r || "").trim(), d =
|
|
34
|
-
return mn(t, "".concat(n), { defIds: t.defIds, idSuffix: d.current },
|
|
33
|
+
var t = i.icon, n = i.id, r = i.className, s = i.extend, o = zi(i, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(n, " ").concat(r || "").trim(), d = ji("_".concat(Ki()));
|
|
34
|
+
return mn(t, "".concat(n), { defIds: t.defIds, idSuffix: d.current }, he({ ref: e, className: c }, o), s);
|
|
35
35
|
});
|
|
36
36
|
function mn(i, e, t, n, r) {
|
|
37
|
-
return fn(i.tag,
|
|
37
|
+
return fn(i.tag, he(he({ key: e }, Xi(i, t, r)), n), (qi(i, t).children || []).map(function(s, o) {
|
|
38
38
|
return mn(s, "".concat(e, "-").concat(i.tag, "-").concat(o), t, void 0, r);
|
|
39
39
|
}));
|
|
40
40
|
}
|
|
41
41
|
function Xi(i, e, t) {
|
|
42
|
-
var n =
|
|
42
|
+
var n = he({}, i.attrs);
|
|
43
43
|
t != null && t.colorChannel1 && n.fill === "colorChannel1" && (n.fill = t.colorChannel1), i.tag === "mask" && n.id && (n.id = n.id + e.idSuffix), Object.entries(n).forEach(function(s) {
|
|
44
44
|
var o = s[0], c = s[1];
|
|
45
45
|
o === "mask" && typeof c == "string" && (n[o] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
@@ -52,46 +52,46 @@ function Xi(i, e, t) {
|
|
|
52
52
|
}
|
|
53
53
|
function qi(i, e) {
|
|
54
54
|
var t, n = e.defIds;
|
|
55
|
-
return !n || n.length === 0 ? i : i.tag === "defs" && (!((t = i.children) === null || t === void 0) && t.length) ?
|
|
56
|
-
return typeof r.attrs.id == "string" && n && n.indexOf(r.attrs.id) > -1 ?
|
|
55
|
+
return !n || n.length === 0 ? i : i.tag === "defs" && (!((t = i.children) === null || t === void 0) && t.length) ? he(he({}, i), { children: i.children.map(function(r) {
|
|
56
|
+
return typeof r.attrs.id == "string" && n && n.indexOf(r.attrs.id) > -1 ? he(he({}, r), { attrs: he(he({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
|
|
57
57
|
}) }) : i;
|
|
58
58
|
}
|
|
59
59
|
function Ki() {
|
|
60
60
|
return Math.random().toString(36).substring(2, 8);
|
|
61
61
|
}
|
|
62
62
|
hn.displayName = "UniverIcon";
|
|
63
|
-
var Yi = { 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" } }] },
|
|
63
|
+
var Yi = { 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" } }] }, pn = gn(function(i, e) {
|
|
64
64
|
return fn(hn, Object.assign({}, i, {
|
|
65
65
|
id: "add-image-single",
|
|
66
66
|
ref: e,
|
|
67
67
|
icon: Yi
|
|
68
68
|
}));
|
|
69
69
|
});
|
|
70
|
-
|
|
70
|
+
pn.displayName = "AddImageSingle";
|
|
71
71
|
const bt = {
|
|
72
72
|
id: "doc.command.remove-doc-image",
|
|
73
73
|
type: q.COMMAND,
|
|
74
74
|
// eslint-disable-next-line max-lines-per-function
|
|
75
75
|
handler: (i, e) => {
|
|
76
|
-
var
|
|
77
|
-
const t = i.get(
|
|
76
|
+
var x, M, E, U;
|
|
77
|
+
const t = i.get(j), n = i.get(z), r = i.get(Q), s = n.getCurrentUniverDocInstance();
|
|
78
78
|
if (e == null || s == null)
|
|
79
79
|
return !1;
|
|
80
|
-
const o = r.getRenderById(e.unitId).with(xe), { drawings: c } = e, d = (
|
|
80
|
+
const o = r.getRenderById(e.unitId).with(xe), { drawings: c } = e, d = (x = o.getSegment()) != null ? x : "", a = new Dt(), l = $.getInstance(), g = (E = (M = s.getSelfOrHeaderFooterModel(d).getBody()) == null ? void 0 : M.customBlocks) != null ? E : [], u = c.map((N) => g.find((I) => I.blockId === N.drawingId)).filter((N) => !!N).sort((N, I) => N.startIndex > I.startIndex ? 1 : -1), h = c[0].unitId, f = new Hn();
|
|
81
81
|
f.reset();
|
|
82
|
-
const
|
|
82
|
+
const v = u[0].startIndex, p = [
|
|
83
83
|
{
|
|
84
|
-
startOffset:
|
|
85
|
-
endOffset:
|
|
84
|
+
startOffset: v,
|
|
85
|
+
endOffset: v
|
|
86
86
|
}
|
|
87
87
|
], w = {
|
|
88
88
|
id: ee.id,
|
|
89
89
|
params: {
|
|
90
90
|
unitId: h,
|
|
91
91
|
actions: [],
|
|
92
|
-
textRanges:
|
|
92
|
+
textRanges: p
|
|
93
93
|
}
|
|
94
|
-
},
|
|
94
|
+
}, O = [];
|
|
95
95
|
for (const N of u) {
|
|
96
96
|
const { startIndex: I } = N;
|
|
97
97
|
I > f.cursor && a.push({
|
|
@@ -102,19 +102,19 @@ const bt = {
|
|
|
102
102
|
len: 1
|
|
103
103
|
}), f.moveCursorTo(I + 1);
|
|
104
104
|
}
|
|
105
|
-
const D =
|
|
106
|
-
|
|
105
|
+
const D = qe(s, d);
|
|
106
|
+
O.push(l.editOp(a.serialize(), D));
|
|
107
107
|
for (const N of u) {
|
|
108
|
-
const { blockId: I } = N, P = ((U = s.getDrawings()) != null ? U : {})[I], A = s.getDrawingsOrder().indexOf(I),
|
|
109
|
-
|
|
108
|
+
const { blockId: I } = N, P = ((U = s.getDrawings()) != null ? U : {})[I], A = s.getDrawingsOrder().indexOf(I), G = l.removeOp(["drawings", I], P), _ = l.removeOp(["drawingsOrder", A], I);
|
|
109
|
+
O.push(G), O.push(_);
|
|
110
110
|
}
|
|
111
|
-
return w.params.actions =
|
|
111
|
+
return w.params.actions = O.reduce((N, I) => $.compose(N, I), null), !!t.syncExecuteCommand(w.id, w.params);
|
|
112
112
|
}
|
|
113
|
-
},
|
|
113
|
+
}, vn = {
|
|
114
114
|
id: "doc.command.delete-drawing",
|
|
115
115
|
type: q.COMMAND,
|
|
116
116
|
handler: (i) => {
|
|
117
|
-
const e = i.get(
|
|
117
|
+
const e = i.get(j), n = i.get(Ue).getFocusDrawings();
|
|
118
118
|
if (n.length === 0)
|
|
119
119
|
return !1;
|
|
120
120
|
const { unitId: r } = n[0], s = n.map((o) => {
|
|
@@ -135,8 +135,8 @@ const bt = {
|
|
|
135
135
|
id: "doc.command.group-doc-image",
|
|
136
136
|
type: q.COMMAND,
|
|
137
137
|
handler: (i, e) => {
|
|
138
|
-
i.get(
|
|
139
|
-
const t = i.get(
|
|
138
|
+
i.get(j), i.get(Zt);
|
|
139
|
+
const t = i.get(Ue);
|
|
140
140
|
if (!e) return !1;
|
|
141
141
|
const n = [];
|
|
142
142
|
e.forEach(({ parent: l, children: g }) => {
|
|
@@ -147,7 +147,7 @@ const bt = {
|
|
|
147
147
|
const r = t.getGroupDrawingOp(e), { unitId: s, subUnitId: o, undo: c, redo: d, objects: a } = r;
|
|
148
148
|
return !1;
|
|
149
149
|
}
|
|
150
|
-
},
|
|
150
|
+
}, xt = {
|
|
151
151
|
id: "doc.command.insert-doc-image",
|
|
152
152
|
type: q.COMMAND,
|
|
153
153
|
// eslint-disable-next-line max-lines-per-function
|
|
@@ -155,13 +155,13 @@ const bt = {
|
|
|
155
155
|
var M, E, U, N;
|
|
156
156
|
if (e == null)
|
|
157
157
|
return !1;
|
|
158
|
-
const t = i.get(
|
|
158
|
+
const t = i.get(j), n = i.get(yt), r = i.get(z), s = n.getActiveTextRange(), o = r.getCurrentUniverDocInstance();
|
|
159
159
|
if (s == null || o == null)
|
|
160
160
|
return !1;
|
|
161
161
|
const c = o.getUnitId(), { drawings: d } = e, { collapsed: a, startOffset: l, segmentId: g } = s, u = o.getSelfOrHeaderFooterModel(g).getBody();
|
|
162
162
|
if (u == null)
|
|
163
163
|
return !1;
|
|
164
|
-
const h = new Dt(), f = $.getInstance(),
|
|
164
|
+
const h = new Dt(), f = $.getInstance(), v = [], p = (E = (M = o.getSnapshot().drawingsOrder) == null ? void 0 : M.length) != null ? E : 0;
|
|
165
165
|
let w = 0;
|
|
166
166
|
if (a)
|
|
167
167
|
l > 0 && h.push({
|
|
@@ -169,16 +169,16 @@ const bt = {
|
|
|
169
169
|
len: l
|
|
170
170
|
});
|
|
171
171
|
else {
|
|
172
|
-
const I =
|
|
172
|
+
const I = Gn.selection.delete([s], u, 0, null, !1);
|
|
173
173
|
h.push(...I);
|
|
174
|
-
const P = Ni(u, [s]),
|
|
175
|
-
if (
|
|
176
|
-
for (const _ of
|
|
177
|
-
const S =
|
|
178
|
-
if (S == null ||
|
|
174
|
+
const P = Ni(u, [s]), H = (U = o.getDrawings()) != null ? U : {}, A = (N = o.getDrawingsOrder()) != null ? N : [], G = P.sort((_, S) => A.indexOf(_) > A.indexOf(S) ? -1 : A.indexOf(_) < A.indexOf(S) ? 1 : 0);
|
|
175
|
+
if (G.length > 0)
|
|
176
|
+
for (const _ of G) {
|
|
177
|
+
const S = H[_], C = A.indexOf(_);
|
|
178
|
+
if (S == null || C < 0)
|
|
179
179
|
continue;
|
|
180
|
-
const T = f.removeOp(["drawings", _], S), L = f.removeOp(["drawingsOrder",
|
|
181
|
-
|
|
180
|
+
const T = f.removeOp(["drawings", _], S), L = f.removeOp(["drawingsOrder", C], _);
|
|
181
|
+
v.push(T), v.push(L), w++;
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
h.push({
|
|
@@ -192,13 +192,13 @@ const bt = {
|
|
|
192
192
|
},
|
|
193
193
|
len: d.length
|
|
194
194
|
});
|
|
195
|
-
const
|
|
196
|
-
|
|
195
|
+
const O = qe(o, g), D = f.editOp(h.serialize(), O);
|
|
196
|
+
v.push(D);
|
|
197
197
|
for (const I of d) {
|
|
198
|
-
const { drawingId: P } = I,
|
|
199
|
-
|
|
198
|
+
const { drawingId: P } = I, H = f.insertOp(["drawings", P], I), A = f.insertOp(["drawingsOrder", p - w], P);
|
|
199
|
+
v.push(H), v.push(A);
|
|
200
200
|
}
|
|
201
|
-
const
|
|
201
|
+
const y = {
|
|
202
202
|
id: ee.id,
|
|
203
203
|
params: {
|
|
204
204
|
unitId: c,
|
|
@@ -206,24 +206,24 @@ const bt = {
|
|
|
206
206
|
textRanges: []
|
|
207
207
|
}
|
|
208
208
|
};
|
|
209
|
-
return
|
|
209
|
+
return y.params.actions = v.reduce((I, P) => $.compose(I, P), null), !!t.syncExecuteCommand(y.id, y.params);
|
|
210
210
|
}
|
|
211
211
|
}, In = {
|
|
212
212
|
id: "doc.command.set-drawing-arrange",
|
|
213
213
|
type: q.COMMAND,
|
|
214
214
|
handler: (i, e) => {
|
|
215
|
-
const t = i.get(
|
|
215
|
+
const t = i.get(j), n = i.get(Ue);
|
|
216
216
|
if (e == null)
|
|
217
217
|
return !1;
|
|
218
218
|
const { unitId: r, subUnitId: s, drawingIds: o, arrangeType: c } = e, d = { unitId: r, subUnitId: s, drawingIds: o };
|
|
219
219
|
let a;
|
|
220
|
-
if (c ===
|
|
220
|
+
if (c === Qe.forward ? a = n.getForwardDrawingsOp(d) : c === Qe.backward ? a = n.getBackwardDrawingOp(d) : c === Qe.front ? a = n.getFrontDrawingsOp(d) : c === Qe.back && (a = n.getBackDrawingsOp(d)), a == null)
|
|
221
221
|
return !1;
|
|
222
222
|
const { redo: l } = a;
|
|
223
223
|
if (l == null)
|
|
224
224
|
return !1;
|
|
225
225
|
const g = [];
|
|
226
|
-
let u =
|
|
226
|
+
let u = be.deepClone(l);
|
|
227
227
|
u = u.slice(3), u.unshift("drawingsOrder"), g.push(u);
|
|
228
228
|
const h = {
|
|
229
229
|
id: ee.id,
|
|
@@ -233,14 +233,14 @@ const bt = {
|
|
|
233
233
|
textRanges: null
|
|
234
234
|
}
|
|
235
235
|
};
|
|
236
|
-
return h.params.actions = g.reduce((
|
|
236
|
+
return h.params.actions = g.reduce((v, p) => $.compose(v, p), null), !!t.syncExecuteCommand(h.id, h.params);
|
|
237
237
|
}
|
|
238
238
|
}, _n = {
|
|
239
239
|
id: "doc.command.ungroup-doc-image",
|
|
240
240
|
type: q.COMMAND,
|
|
241
241
|
handler: (i, e) => {
|
|
242
|
-
i.get(
|
|
243
|
-
const t = i.get(
|
|
242
|
+
i.get(j), i.get(Zt);
|
|
243
|
+
const t = i.get(Ue);
|
|
244
244
|
if (!e) return !1;
|
|
245
245
|
const n = [];
|
|
246
246
|
e.forEach(({ parent: l, children: g }) => {
|
|
@@ -252,10 +252,10 @@ const bt = {
|
|
|
252
252
|
return !1;
|
|
253
253
|
}
|
|
254
254
|
};
|
|
255
|
-
class
|
|
255
|
+
class ft {
|
|
256
256
|
constructor() {
|
|
257
|
-
|
|
258
|
-
|
|
257
|
+
Ie(this, "_refreshDrawings$", new Tt(null));
|
|
258
|
+
Ie(this, "refreshDrawings$", this._refreshDrawings$.asObservable());
|
|
259
259
|
}
|
|
260
260
|
refreshDrawings(e) {
|
|
261
261
|
this._refreshDrawings$.next(e);
|
|
@@ -265,8 +265,8 @@ var Zi = Object.getOwnPropertyDescriptor, Qi = (i, e, t, n) => {
|
|
|
265
265
|
for (var r = n > 1 ? void 0 : n ? Zi(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
266
266
|
(o = i[s]) && (r = o(r) || r);
|
|
267
267
|
return r;
|
|
268
|
-
},
|
|
269
|
-
let
|
|
268
|
+
}, ue = (i, e) => (t, n) => e(t, n, i);
|
|
269
|
+
let rt = class extends Le {
|
|
270
270
|
constructor(i, e, t, n, r, s, o, c, d, a, l, g, u) {
|
|
271
271
|
super(), this._context = i, this._commandService = e, this._docSelectionManagerService = t, this._renderManagerSrv = n, this._imageIoService = r, this._docDrawingService = s, this._drawingManagerService = o, this._contextService = c, this._messageService = d, this._localeService = a, this._docSelectionRenderService = l, this._docRefreshDrawingsService = g, this._fileOpenerService = u, this._updateOrderListener(), this._groupDrawingListener(), this._focusDrawingListener(), this._transformDrawingListener(), this._editAreaChangeListener();
|
|
272
272
|
}
|
|
@@ -276,7 +276,7 @@ let st = class extends Ue {
|
|
|
276
276
|
accept: ri.map((t) => `.${t.replace("image/", "")}`).join(",")
|
|
277
277
|
}), e = i.length;
|
|
278
278
|
return e > At ? (this._messageService.show({
|
|
279
|
-
type:
|
|
279
|
+
type: Ht.Error,
|
|
280
280
|
content: this._localeService.t("update-status.exceedMaxCount", String(At))
|
|
281
281
|
}), !1) : e === 0 ? !1 : (await this._insertFloatImages(i), !0);
|
|
282
282
|
}
|
|
@@ -289,18 +289,18 @@ let st = class extends Ue {
|
|
|
289
289
|
const s = r.message;
|
|
290
290
|
let o = "";
|
|
291
291
|
switch (s) {
|
|
292
|
-
case
|
|
292
|
+
case vt.ERROR_EXCEED_SIZE:
|
|
293
293
|
o = this._localeService.t("update-status.exceedMaxSize", String(si / (1024 * 1024)));
|
|
294
294
|
break;
|
|
295
|
-
case
|
|
295
|
+
case vt.ERROR_IMAGE_TYPE:
|
|
296
296
|
o = this._localeService.t("update-status.invalidImageType");
|
|
297
297
|
break;
|
|
298
|
-
case
|
|
298
|
+
case vt.ERROR_IMAGE:
|
|
299
299
|
o = this._localeService.t("update-status.invalidImage");
|
|
300
300
|
break;
|
|
301
301
|
}
|
|
302
302
|
this._messageService.show({
|
|
303
|
-
type:
|
|
303
|
+
type: Ht.Error,
|
|
304
304
|
content: o
|
|
305
305
|
});
|
|
306
306
|
}
|
|
@@ -314,8 +314,8 @@ let st = class extends Ue {
|
|
|
314
314
|
this._imageIoService.addImageSourceCache(s, o, g);
|
|
315
315
|
let u = 1;
|
|
316
316
|
if (a > Pt || l > Lt) {
|
|
317
|
-
const
|
|
318
|
-
u = Math.min(
|
|
317
|
+
const p = Pt / a, w = Lt / l;
|
|
318
|
+
u = Math.min(p, w);
|
|
319
319
|
}
|
|
320
320
|
const h = this._getImagePosition(a * u, l * u);
|
|
321
321
|
if (h == null)
|
|
@@ -324,32 +324,32 @@ let st = class extends Ue {
|
|
|
324
324
|
unitId: t,
|
|
325
325
|
subUnitId: t,
|
|
326
326
|
drawingId: s,
|
|
327
|
-
drawingType:
|
|
327
|
+
drawingType: Pe.DRAWING_IMAGE,
|
|
328
328
|
imageSourceType: o,
|
|
329
329
|
source: c,
|
|
330
330
|
transform: an(h),
|
|
331
331
|
docTransform: h,
|
|
332
|
-
behindDoc:
|
|
332
|
+
behindDoc: se.FALSE,
|
|
333
333
|
title: "",
|
|
334
334
|
description: "",
|
|
335
335
|
layoutType: k.INLINE,
|
|
336
336
|
// Insert inline drawing by default.
|
|
337
|
-
wrapText:
|
|
337
|
+
wrapText: Xe.BOTH_SIDES,
|
|
338
338
|
distB: 0,
|
|
339
339
|
distL: 0,
|
|
340
340
|
distR: 0,
|
|
341
341
|
distT: 0
|
|
342
342
|
};
|
|
343
|
-
this._isInsertInHeaderFooter() && (f.isMultiTransform =
|
|
343
|
+
this._isInsertInHeaderFooter() && (f.isMultiTransform = se.TRUE, f.transforms = f.transform ? [f.transform] : null), n.push(f);
|
|
344
344
|
}
|
|
345
|
-
this._commandService.executeCommand(
|
|
345
|
+
this._commandService.executeCommand(xt.id, {
|
|
346
346
|
unitId: t,
|
|
347
347
|
drawings: n
|
|
348
348
|
});
|
|
349
349
|
}
|
|
350
350
|
_isInsertInHeaderFooter() {
|
|
351
351
|
var n;
|
|
352
|
-
const { unitId: i } = this._context, e = (n = this._renderManagerSrv.getRenderById(i)) == null ? void 0 : n.with(
|
|
352
|
+
const { unitId: i } = this._context, e = (n = this._renderManagerSrv.getRenderById(i)) == null ? void 0 : n.with(te).getViewModel(), t = e == null ? void 0 : e.getEditArea();
|
|
353
353
|
return t === We.HEADER || t === We.FOOTER;
|
|
354
354
|
}
|
|
355
355
|
_getImagePosition(i, e) {
|
|
@@ -366,7 +366,7 @@ let st = class extends Ue {
|
|
|
366
366
|
posOffset: n.left
|
|
367
367
|
},
|
|
368
368
|
positionV: {
|
|
369
|
-
relativeFrom:
|
|
369
|
+
relativeFrom: W.PARAGRAPH,
|
|
370
370
|
posOffset: 0
|
|
371
371
|
},
|
|
372
372
|
angle: 0
|
|
@@ -412,12 +412,12 @@ let st = class extends Ue {
|
|
|
412
412
|
var r;
|
|
413
413
|
const { transformer: e, docsLeft: t, docsTop: n } = (r = this._getCurrentSceneAndTransformer()) != null ? r : {};
|
|
414
414
|
if (i == null || i.length === 0)
|
|
415
|
-
this._contextService.setContextValue(
|
|
415
|
+
this._contextService.setContextValue(it, !1), this._docDrawingService.focusDrawing([]), e && e.resetProps({
|
|
416
416
|
zeroTop: 0,
|
|
417
417
|
zeroLeft: 0
|
|
418
418
|
});
|
|
419
419
|
else {
|
|
420
|
-
this._contextService.setContextValue(
|
|
420
|
+
this._contextService.setContextValue(it, !0), this._docDrawingService.focusDrawing(i), this._setDrawingSelections(i);
|
|
421
421
|
const s = this._docSelectionRenderService.getSegment(), o = this._findSegmentIdByDrawingId(i[0].drawingId);
|
|
422
422
|
s !== o && this._docSelectionRenderService.setSegment(o), e && e.resetProps({
|
|
423
423
|
zeroTop: n,
|
|
@@ -443,7 +443,7 @@ let st = class extends Ue {
|
|
|
443
443
|
// Update drawings edit status and opacity. You can not edit header footer images when you are editing body. and vice verse.
|
|
444
444
|
_updateDrawingsEditStatus() {
|
|
445
445
|
var c;
|
|
446
|
-
const { unit: i, scene: e, unitId: t } = this._context, n = (c = this._renderManagerSrv.getRenderById(t)) == null ? void 0 : c.with(
|
|
446
|
+
const { unit: i, scene: e, unitId: t } = this._context, n = (c = this._renderManagerSrv.getRenderById(t)) == null ? void 0 : c.with(te).getViewModel();
|
|
447
447
|
if (n == null || i == null)
|
|
448
448
|
return;
|
|
449
449
|
const r = i.getSnapshot(), { drawings: s = {} } = r, o = n.getEditArea() === We.BODY;
|
|
@@ -456,7 +456,7 @@ let st = class extends Ue {
|
|
|
456
456
|
u.setOpacity(0.5);
|
|
457
457
|
} catch {
|
|
458
458
|
}
|
|
459
|
-
if (o && a.isMultiTransform !==
|
|
459
|
+
if (o && a.isMultiTransform !== se.TRUE || !o && a.isMultiTransform === se.TRUE) {
|
|
460
460
|
a.allowTransform !== !1 && e.attachTransformerTo(u);
|
|
461
461
|
try {
|
|
462
462
|
u.setOpacity(1);
|
|
@@ -468,7 +468,7 @@ let st = class extends Ue {
|
|
|
468
468
|
}
|
|
469
469
|
_editAreaChangeListener() {
|
|
470
470
|
var t;
|
|
471
|
-
const { unitId: i } = this._context, e = (t = this._renderManagerSrv.getRenderById(i)) == null ? void 0 : t.with(
|
|
471
|
+
const { unitId: i } = this._context, e = (t = this._renderManagerSrv.getRenderById(i)) == null ? void 0 : t.with(te).getViewModel();
|
|
472
472
|
e != null && (this._updateDrawingsEditStatus(), this.disposeWithMe(
|
|
473
473
|
e.editAreaChange$.subscribe(() => {
|
|
474
474
|
this._updateDrawingsEditStatus();
|
|
@@ -494,30 +494,30 @@ let st = class extends Ue {
|
|
|
494
494
|
this._docSelectionManagerService.replaceDocRanges(n);
|
|
495
495
|
}
|
|
496
496
|
};
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
],
|
|
497
|
+
rt = Qi([
|
|
498
|
+
ue(1, j),
|
|
499
|
+
ue(2, Z(yt)),
|
|
500
|
+
ue(3, Q),
|
|
501
|
+
ue(4, ii),
|
|
502
|
+
ue(5, Ue),
|
|
503
|
+
ue(6, me),
|
|
504
|
+
ue(7, Qt),
|
|
505
|
+
ue(8, _i),
|
|
506
|
+
ue(9, Z(gt)),
|
|
507
|
+
ue(10, Z(xe)),
|
|
508
|
+
ue(11, Z(ft)),
|
|
509
|
+
ue(12, Si)
|
|
510
|
+
], rt);
|
|
511
511
|
const Sn = {
|
|
512
512
|
id: "doc.command.insert-float-image",
|
|
513
513
|
type: q.COMMAND,
|
|
514
514
|
handler: (i) => {
|
|
515
515
|
var n, r;
|
|
516
516
|
const e = i.get(z), t = i.get(Q);
|
|
517
|
-
return (r = (n = mi(
|
|
517
|
+
return (r = (n = mi(we.UNIVER_DOC, e, t)) == null ? void 0 : n.with(rt).insertDocImage()) != null ? r : !1;
|
|
518
518
|
}
|
|
519
519
|
};
|
|
520
|
-
var
|
|
520
|
+
var ge = /* @__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))(ge || {});
|
|
521
521
|
const Ji = {
|
|
522
522
|
inline: k.INLINE,
|
|
523
523
|
wrapSquare: k.WRAP_SQUARE,
|
|
@@ -530,7 +530,7 @@ function Dn(i, e, t, n, r, s, o) {
|
|
|
530
530
|
const c = new Dt(), d = $.getInstance(), a = [], l = s.getSelfOrHeaderFooterModel(e).getBody(), g = s.getSelfOrHeaderFooterModel(i).getBody();
|
|
531
531
|
if (l == null || g == null)
|
|
532
532
|
return;
|
|
533
|
-
const u = (f = (h = l.customBlocks) == null ? void 0 : h.find((
|
|
533
|
+
const u = (f = (h = l.customBlocks) == null ? void 0 : h.find((v) => v.blockId === r)) == null ? void 0 : f.startIndex;
|
|
534
534
|
if (u != null) {
|
|
535
535
|
if (n = Math.min(g.dataStream.length - 2, n), i === e) {
|
|
536
536
|
if (n < u ? (n > 0 && c.push({
|
|
@@ -572,8 +572,8 @@ function Dn(i, e, t, n, r, s, o) {
|
|
|
572
572
|
},
|
|
573
573
|
len: 1
|
|
574
574
|
})), n !== u) {
|
|
575
|
-
const
|
|
576
|
-
a.push(
|
|
575
|
+
const v = qe(s, e), p = d.editOp(c.serialize(), v);
|
|
576
|
+
a.push(p);
|
|
577
577
|
}
|
|
578
578
|
} else {
|
|
579
579
|
u > 0 && c.push({
|
|
@@ -583,8 +583,8 @@ function Dn(i, e, t, n, r, s, o) {
|
|
|
583
583
|
t: Y.DELETE,
|
|
584
584
|
len: 1
|
|
585
585
|
});
|
|
586
|
-
let
|
|
587
|
-
a.push(
|
|
586
|
+
let v = qe(s, e), p = d.editOp(c.serialize(), v);
|
|
587
|
+
a.push(p), c.empty(), n > 0 && c.push({
|
|
588
588
|
t: Y.RETAIN,
|
|
589
589
|
len: n
|
|
590
590
|
}), c.push({
|
|
@@ -597,12 +597,12 @@ function Dn(i, e, t, n, r, s, o) {
|
|
|
597
597
|
}]
|
|
598
598
|
},
|
|
599
599
|
len: 1
|
|
600
|
-
}),
|
|
600
|
+
}), v = qe(s, i), p = d.editOp(c.serialize(), v), a.push(p), o.setSegment(i), o.setSegmentPage(t);
|
|
601
601
|
}
|
|
602
602
|
return a;
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
|
-
const
|
|
605
|
+
const On = {
|
|
606
606
|
id: "doc.command.update-doc-drawing-wrapping-style",
|
|
607
607
|
type: q.COMMAND,
|
|
608
608
|
// eslint-disable-next-line max-lines-per-function, complexity
|
|
@@ -610,41 +610,41 @@ const yn = {
|
|
|
610
610
|
var E, U;
|
|
611
611
|
if (e == null)
|
|
612
612
|
return !1;
|
|
613
|
-
const { drawings: t, wrappingStyle: n, unitId: r } = e, s = i.get(
|
|
613
|
+
const { drawings: t, wrappingStyle: n, unitId: r } = e, s = i.get(j), o = i.get(z), d = i.get(Q).getRenderById(r), a = d == null ? void 0 : d.with(te).getSkeleton().getSkeletonData(), l = d == null ? void 0 : d.with(te).getViewModel(), g = d == null ? void 0 : d.scene, u = o.getCurrentUniverDocInstance();
|
|
614
614
|
if (u == null || a == null || g == null || l == null)
|
|
615
615
|
return !1;
|
|
616
|
-
const h = l.getEditArea(), f = g.getTransformerByCreate(), { pages:
|
|
616
|
+
const h = l.getEditArea(), f = g.getTransformerByCreate(), { pages: v, skeHeaders: p, skeFooters: w } = a, O = $.getInstance(), D = [], { drawings: y = {} } = u.getSnapshot();
|
|
617
617
|
for (const N of t) {
|
|
618
|
-
const { drawingId: I } = N, P =
|
|
619
|
-
if (P !==
|
|
620
|
-
const S =
|
|
618
|
+
const { drawingId: I } = N, P = y[I].layoutType, H = Ji[n];
|
|
619
|
+
if (P !== H) {
|
|
620
|
+
const S = O.replaceOp(["drawings", I, "layoutType"], P, H);
|
|
621
621
|
D.push(S);
|
|
622
622
|
}
|
|
623
623
|
if (n === "behindText" || n === "inFrontOfText") {
|
|
624
|
-
const S =
|
|
625
|
-
if (S !==
|
|
626
|
-
const T =
|
|
624
|
+
const S = y[I].behindDoc, C = n === "behindText" ? se.TRUE : se.FALSE;
|
|
625
|
+
if (S !== C) {
|
|
626
|
+
const T = O.replaceOp(["drawings", I, "behindDoc"], S, C);
|
|
627
627
|
D.push(T);
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
630
|
if (n === "inline")
|
|
631
631
|
continue;
|
|
632
|
-
let A = null,
|
|
633
|
-
for (const S of
|
|
634
|
-
const { headerId:
|
|
632
|
+
let A = null, G = 0, _ = 0;
|
|
633
|
+
for (const S of v) {
|
|
634
|
+
const { headerId: C, footerId: T, marginTop: L, marginLeft: B, marginBottom: b, pageWidth: R, pageHeight: V } = S;
|
|
635
635
|
switch (h) {
|
|
636
636
|
case We.HEADER: {
|
|
637
|
-
const F = (E =
|
|
638
|
-
F != null && F.skeDrawings.has(I) && (A = F.skeDrawings.get(I),
|
|
637
|
+
const F = (E = p.get(C)) == null ? void 0 : E.get(R);
|
|
638
|
+
F != null && F.skeDrawings.has(I) && (A = F.skeDrawings.get(I), G = F.marginTop, _ = B);
|
|
639
639
|
break;
|
|
640
640
|
}
|
|
641
641
|
case We.FOOTER: {
|
|
642
642
|
const F = (U = w.get(T)) == null ? void 0 : U.get(R);
|
|
643
|
-
F != null && F.skeDrawings.has(I) && (A = F.skeDrawings.get(I),
|
|
643
|
+
F != null && F.skeDrawings.has(I) && (A = F.skeDrawings.get(I), G = V - b + F.marginTop, _ = B);
|
|
644
644
|
break;
|
|
645
645
|
}
|
|
646
646
|
case We.BODY: {
|
|
647
|
-
S.skeDrawings.has(I) && (A = S.skeDrawings.get(I),
|
|
647
|
+
S.skeDrawings.has(I) && (A = S.skeDrawings.get(I), G = L, _ = B);
|
|
648
648
|
break;
|
|
649
649
|
}
|
|
650
650
|
}
|
|
@@ -652,31 +652,31 @@ const yn = {
|
|
|
652
652
|
break;
|
|
653
653
|
}
|
|
654
654
|
if (A != null) {
|
|
655
|
-
const { aTop: S, aLeft:
|
|
656
|
-
let L =
|
|
655
|
+
const { aTop: S, aLeft: C } = A, T = y[I].docTransform.positionH;
|
|
656
|
+
let L = C;
|
|
657
657
|
T.relativeFrom === J.MARGIN ? L -= _ : T.relativeFrom === J.COLUMN && (L -= A.columnLeft);
|
|
658
658
|
const B = {
|
|
659
659
|
relativeFrom: T.relativeFrom,
|
|
660
660
|
posOffset: L
|
|
661
661
|
};
|
|
662
662
|
if (T.posOffset !== B.posOffset) {
|
|
663
|
-
const F =
|
|
663
|
+
const F = O.replaceOp(["drawings", I, "docTransform", "positionH"], T, B);
|
|
664
664
|
D.push(F);
|
|
665
665
|
}
|
|
666
|
-
const b =
|
|
666
|
+
const b = y[I].docTransform.positionV;
|
|
667
667
|
let R = S;
|
|
668
|
-
b.relativeFrom ===
|
|
668
|
+
b.relativeFrom === W.PAGE ? R += G : b.relativeFrom === W.LINE ? R -= A.lineTop : b.relativeFrom === W.PARAGRAPH && (R -= A.blockAnchorTop);
|
|
669
669
|
const V = {
|
|
670
670
|
relativeFrom: b.relativeFrom,
|
|
671
671
|
posOffset: R
|
|
672
672
|
};
|
|
673
673
|
if (b.posOffset !== V.posOffset) {
|
|
674
|
-
const F =
|
|
674
|
+
const F = O.replaceOp(["drawings", I, "docTransform", "positionV"], b, V);
|
|
675
675
|
D.push(F);
|
|
676
676
|
}
|
|
677
677
|
}
|
|
678
678
|
}
|
|
679
|
-
const
|
|
679
|
+
const x = {
|
|
680
680
|
id: ee.id,
|
|
681
681
|
params: {
|
|
682
682
|
unitId: r,
|
|
@@ -684,27 +684,27 @@ const yn = {
|
|
|
684
684
|
textRanges: null
|
|
685
685
|
}
|
|
686
686
|
};
|
|
687
|
-
|
|
688
|
-
const M = s.syncExecuteCommand(
|
|
687
|
+
x.params.actions = D.reduce((N, I) => $.compose(N, I), null);
|
|
688
|
+
const M = s.syncExecuteCommand(x.id, x.params);
|
|
689
689
|
return f.refreshControls(), !!M;
|
|
690
690
|
}
|
|
691
|
-
},
|
|
691
|
+
}, yn = {
|
|
692
692
|
id: "doc.command.update-doc-drawing-distance",
|
|
693
693
|
type: q.COMMAND,
|
|
694
694
|
handler: (i, e) => {
|
|
695
695
|
if (e == null)
|
|
696
696
|
return !1;
|
|
697
|
-
const t = i.get(
|
|
697
|
+
const t = i.get(j), r = i.get(z).getCurrentUniverDocInstance();
|
|
698
698
|
if (r == null)
|
|
699
699
|
return !1;
|
|
700
700
|
const { drawings: s, dist: o, unitId: c } = e, d = $.getInstance(), a = [], { drawings: l = {} } = r.getSnapshot();
|
|
701
701
|
for (const h of s) {
|
|
702
702
|
const { drawingId: f } = h;
|
|
703
|
-
for (const [
|
|
704
|
-
const w = l[f][
|
|
705
|
-
if (w !==
|
|
706
|
-
const
|
|
707
|
-
a.push(
|
|
703
|
+
for (const [v, p] of Object.entries(o)) {
|
|
704
|
+
const w = l[f][v];
|
|
705
|
+
if (w !== p) {
|
|
706
|
+
const O = d.replaceOp(["drawings", f, v], w, p);
|
|
707
|
+
a.push(O);
|
|
708
708
|
}
|
|
709
709
|
}
|
|
710
710
|
}
|
|
@@ -724,15 +724,15 @@ const yn = {
|
|
|
724
724
|
handler: (i, e) => {
|
|
725
725
|
if (e == null)
|
|
726
726
|
return !1;
|
|
727
|
-
const t = i.get(
|
|
727
|
+
const t = i.get(j), r = i.get(z).getCurrentUniverDocInstance();
|
|
728
728
|
if (r == null)
|
|
729
729
|
return !1;
|
|
730
730
|
const { drawings: s, wrapText: o, unitId: c } = e, d = $.getInstance(), a = [], { drawings: l = {} } = r.getSnapshot();
|
|
731
731
|
for (const h of s) {
|
|
732
|
-
const { drawingId: f } = h,
|
|
733
|
-
if (
|
|
734
|
-
const
|
|
735
|
-
a.push(
|
|
732
|
+
const { drawingId: f } = h, v = l[f].wrapText;
|
|
733
|
+
if (v !== o) {
|
|
734
|
+
const p = d.replaceOp(["drawings", f, "wrapText"], v, o);
|
|
735
|
+
a.push(p);
|
|
736
736
|
}
|
|
737
737
|
}
|
|
738
738
|
const g = {
|
|
@@ -745,24 +745,24 @@ const yn = {
|
|
|
745
745
|
};
|
|
746
746
|
return g.params.actions = a.reduce((h, f) => $.compose(h, f), null), !!t.syncExecuteCommand(g.id, g.params);
|
|
747
747
|
}
|
|
748
|
-
},
|
|
748
|
+
}, Ke = {
|
|
749
749
|
id: "doc.command.update-drawing-doc-transform",
|
|
750
750
|
type: q.COMMAND,
|
|
751
751
|
handler: (i, e) => {
|
|
752
752
|
if (e == null)
|
|
753
753
|
return !1;
|
|
754
|
-
const t = i.get(
|
|
754
|
+
const t = i.get(j), n = i.get(z), s = i.get(Q).getRenderById(e.unitId), o = s == null ? void 0 : s.scene;
|
|
755
755
|
if (o == null)
|
|
756
756
|
return !1;
|
|
757
757
|
const c = o.getTransformerByCreate(), d = n.getCurrentUniverDocInstance();
|
|
758
758
|
if (d == null)
|
|
759
759
|
return !1;
|
|
760
760
|
const { drawings: a, unitId: l } = e, g = $.getInstance(), u = [], { drawings: h = {} } = d.getSnapshot();
|
|
761
|
-
for (const
|
|
762
|
-
const { drawingId: w, key:
|
|
763
|
-
if (!
|
|
764
|
-
const
|
|
765
|
-
u.push(
|
|
761
|
+
for (const p of a) {
|
|
762
|
+
const { drawingId: w, key: O, value: D } = p, y = h[w].docTransform[O];
|
|
763
|
+
if (!be.diffValue(y, D)) {
|
|
764
|
+
const x = g.replaceOp(["drawings", w, "docTransform", O], y, D);
|
|
765
|
+
u.push(x);
|
|
766
766
|
}
|
|
767
767
|
}
|
|
768
768
|
const f = {
|
|
@@ -774,9 +774,9 @@ const yn = {
|
|
|
774
774
|
debounce: !0
|
|
775
775
|
}
|
|
776
776
|
};
|
|
777
|
-
f.params.actions = u.reduce((
|
|
778
|
-
const
|
|
779
|
-
return c.refreshControls(), !!
|
|
777
|
+
f.params.actions = u.reduce((p, w) => $.compose(p, w), null);
|
|
778
|
+
const v = t.syncExecuteCommand(f.id, f.params);
|
|
779
|
+
return c.refreshControls(), !!v;
|
|
780
780
|
}
|
|
781
781
|
}, Mn = {
|
|
782
782
|
id: "doc.command.move-inline-drawing",
|
|
@@ -785,27 +785,27 @@ const yn = {
|
|
|
785
785
|
var U, N;
|
|
786
786
|
if (e == null)
|
|
787
787
|
return !1;
|
|
788
|
-
const t = i.get(Q), n = (U = t.getRenderById(e.unitId)) == null ? void 0 : U.with(xe), r = i.get(
|
|
788
|
+
const t = i.get(Q), n = (U = t.getRenderById(e.unitId)) == null ? void 0 : U.with(xe), r = i.get(ft), s = t.getRenderById(e.unitId), o = s == null ? void 0 : s.scene, c = s == null ? void 0 : s.with(te).getSkeleton();
|
|
789
789
|
if (o == null || n == null)
|
|
790
790
|
return !1;
|
|
791
|
-
const d = o.getTransformerByCreate(), a = i.get(
|
|
791
|
+
const d = o.getTransformerByCreate(), a = i.get(j), g = i.get(z).getCurrentUniverDocInstance();
|
|
792
792
|
if (g == null)
|
|
793
793
|
return !1;
|
|
794
|
-
const { drawing: u, unitId: h, offset: f, segmentId:
|
|
794
|
+
const { drawing: u, unitId: h, offset: f, segmentId: v, segmentPage: p, needRefreshDrawings: w } = e;
|
|
795
795
|
if (w)
|
|
796
796
|
return r.refreshDrawings(c), d.refreshControls(), !0;
|
|
797
|
-
const
|
|
798
|
-
p,
|
|
799
|
-
O,
|
|
797
|
+
const O = [], { drawingId: D } = u, y = (N = n.getSegment()) != null ? N : "", x = Dn(
|
|
800
798
|
v,
|
|
799
|
+
y,
|
|
800
|
+
p,
|
|
801
801
|
f,
|
|
802
802
|
D,
|
|
803
803
|
g,
|
|
804
804
|
n
|
|
805
805
|
);
|
|
806
|
-
if (
|
|
806
|
+
if (x == null || x.length === 0)
|
|
807
807
|
return r.refreshDrawings(c), d.refreshControls(), !1;
|
|
808
|
-
|
|
808
|
+
O.push(...x);
|
|
809
809
|
const M = {
|
|
810
810
|
id: ee.id,
|
|
811
811
|
params: {
|
|
@@ -814,7 +814,7 @@ const yn = {
|
|
|
814
814
|
textRanges: null
|
|
815
815
|
}
|
|
816
816
|
};
|
|
817
|
-
M.params.actions =
|
|
817
|
+
M.params.actions = O.reduce((I, P) => $.compose(I, P), null);
|
|
818
818
|
const E = a.syncExecuteCommand(M.id, M.params);
|
|
819
819
|
return d.refreshControls(), !!E;
|
|
820
820
|
}
|
|
@@ -823,19 +823,19 @@ const yn = {
|
|
|
823
823
|
type: q.COMMAND,
|
|
824
824
|
// eslint-disable-next-line max-lines-per-function
|
|
825
825
|
handler: (i, e) => {
|
|
826
|
-
var A,
|
|
826
|
+
var A, G;
|
|
827
827
|
if (e == null)
|
|
828
828
|
return !1;
|
|
829
829
|
const t = i.get(Q), n = (A = t.getRenderById(e.unitId)) == null ? void 0 : A.with(xe), r = t.getRenderById(e.unitId), s = r == null ? void 0 : r.scene;
|
|
830
830
|
if (s == null || n == null)
|
|
831
831
|
return !1;
|
|
832
|
-
const o = s.getTransformerByCreate(), c = i.get(
|
|
832
|
+
const o = s.getTransformerByCreate(), c = i.get(j), a = i.get(z).getCurrentUniverDocInstance();
|
|
833
833
|
if (a == null)
|
|
834
834
|
return !1;
|
|
835
|
-
const { drawing: l, unitId: g, offset: u, docTransform: h, segmentId: f, segmentPage:
|
|
835
|
+
const { drawing: l, unitId: g, offset: u, docTransform: h, segmentId: f, segmentPage: v } = e, p = [], { drawingId: w } = l, O = (G = n.getSegment()) != null ? G : "", D = Dn(
|
|
836
836
|
f,
|
|
837
|
-
|
|
838
|
-
|
|
837
|
+
O,
|
|
838
|
+
v,
|
|
839
839
|
u,
|
|
840
840
|
w,
|
|
841
841
|
a,
|
|
@@ -843,23 +843,23 @@ const yn = {
|
|
|
843
843
|
);
|
|
844
844
|
if (D == null)
|
|
845
845
|
return !1;
|
|
846
|
-
D.length > 0 &&
|
|
847
|
-
const
|
|
848
|
-
if (!
|
|
849
|
-
const _ =
|
|
850
|
-
|
|
846
|
+
D.length > 0 && p.push(...D);
|
|
847
|
+
const y = $.getInstance(), { drawings: x = {} } = a.getSnapshot(), M = x[w].docTransform, { positionH: E, positionV: U, size: N, angle: I } = M;
|
|
848
|
+
if (!be.diffValue(E, h.positionH)) {
|
|
849
|
+
const _ = y.replaceOp(["drawings", w, "docTransform", "positionH"], E, h.positionH);
|
|
850
|
+
p.push(_);
|
|
851
851
|
}
|
|
852
|
-
if (!
|
|
853
|
-
const _ =
|
|
854
|
-
|
|
852
|
+
if (!be.diffValue(U, h.positionV)) {
|
|
853
|
+
const _ = y.replaceOp(["drawings", w, "docTransform", "positionV"], U, h.positionV);
|
|
854
|
+
p.push(_);
|
|
855
855
|
}
|
|
856
|
-
if (!
|
|
857
|
-
const _ =
|
|
858
|
-
|
|
856
|
+
if (!be.diffValue(N, h.size)) {
|
|
857
|
+
const _ = y.replaceOp(["drawings", w, "docTransform", "size"], N, h.size);
|
|
858
|
+
p.push(_);
|
|
859
859
|
}
|
|
860
|
-
if (!
|
|
861
|
-
const _ =
|
|
862
|
-
|
|
860
|
+
if (!be.diffValue(I, h.angle)) {
|
|
861
|
+
const _ = y.replaceOp(["drawings", w, "docTransform", "angle"], I, h.angle);
|
|
862
|
+
p.push(_);
|
|
863
863
|
}
|
|
864
864
|
const P = {
|
|
865
865
|
id: ee.id,
|
|
@@ -870,35 +870,35 @@ const yn = {
|
|
|
870
870
|
debounce: !0
|
|
871
871
|
}
|
|
872
872
|
};
|
|
873
|
-
P.params.actions =
|
|
874
|
-
const
|
|
875
|
-
return o.refreshControls(), !!
|
|
873
|
+
P.params.actions = p.reduce((_, S) => $.compose(_, S), null);
|
|
874
|
+
const H = c.syncExecuteCommand(P.id, P.params);
|
|
875
|
+
return o.refreshControls(), !!H;
|
|
876
876
|
}
|
|
877
|
-
},
|
|
877
|
+
}, Ye = {
|
|
878
878
|
id: "doc.command.move-drawing",
|
|
879
879
|
type: q.COMMAND,
|
|
880
880
|
handler: (i, e) => {
|
|
881
|
-
const t = i.get(
|
|
881
|
+
const t = i.get(j), n = i.get(Ue), r = i.get(z), s = i.get(Q), { direction: o } = e, c = n.getFocusDrawings();
|
|
882
882
|
if (c.length === 0)
|
|
883
883
|
return !1;
|
|
884
884
|
const d = c[0].unitId, a = s.getRenderById(d), l = a == null ? void 0 : a.scene;
|
|
885
885
|
if (l == null)
|
|
886
886
|
return !1;
|
|
887
|
-
const g = l.getTransformerByCreate(), u = r.getUniverDocInstance(d), h = c.map((
|
|
887
|
+
const g = l.getTransformerByCreate(), u = r.getUniverDocInstance(d), h = c.map((v) => {
|
|
888
888
|
var M, E, U, N, I;
|
|
889
|
-
const { drawingId:
|
|
889
|
+
const { drawingId: p } = v, w = (M = u == null ? void 0 : u.getSnapshot().drawings) == null ? void 0 : M[p];
|
|
890
890
|
if (w == null || w.layoutType === k.INLINE)
|
|
891
891
|
return null;
|
|
892
|
-
const { positionH:
|
|
893
|
-
return o ===
|
|
894
|
-
drawingId:
|
|
895
|
-
key: o ===
|
|
896
|
-
value: o ===
|
|
892
|
+
const { positionH: O, positionV: D } = w.docTransform, y = { ...O }, x = { ...D };
|
|
893
|
+
return o === fe.UP ? x.posOffset = ((E = x.posOffset) != null ? E : 0) - 2 : o === fe.DOWN ? x.posOffset = ((U = x.posOffset) != null ? U : 0) + 2 : o === fe.LEFT ? y.posOffset = ((N = y.posOffset) != null ? N : 0) - 2 : o === fe.RIGHT && (y.posOffset = ((I = y.posOffset) != null ? I : 0) + 2), {
|
|
894
|
+
drawingId: p,
|
|
895
|
+
key: o === fe.UP || o === fe.DOWN ? "positionV" : "positionH",
|
|
896
|
+
value: o === fe.UP || o === fe.DOWN ? x : y
|
|
897
897
|
};
|
|
898
|
-
}).filter((
|
|
898
|
+
}).filter((v) => v != null);
|
|
899
899
|
if (h.length === 0)
|
|
900
900
|
return !1;
|
|
901
|
-
const f = t.syncExecuteCommand(
|
|
901
|
+
const f = t.syncExecuteCommand(Ke.id, {
|
|
902
902
|
unitId: d,
|
|
903
903
|
subUnitId: d,
|
|
904
904
|
drawings: h
|
|
@@ -915,16 +915,16 @@ const yn = {
|
|
|
915
915
|
(s = (r = t.getRenderById(n)) == null ? void 0 : r.scene.getTransformer()) == null || s.debounceRefreshControls();
|
|
916
916
|
}), !0;
|
|
917
917
|
}
|
|
918
|
-
},
|
|
918
|
+
}, xn = "COMPONENT_DOC_DRAWING_PANEL", Cn = {
|
|
919
919
|
id: "sidebar.operation.doc-image",
|
|
920
920
|
type: q.COMMAND,
|
|
921
921
|
handler: async (i, e) => {
|
|
922
|
-
const t = i.get(Di), n = i.get(
|
|
922
|
+
const t = i.get(Di), n = i.get(gt), r = i.get(me);
|
|
923
923
|
switch (e.value) {
|
|
924
924
|
case "open":
|
|
925
925
|
t.open({
|
|
926
926
|
header: { title: n.t("docImage.panel.title") },
|
|
927
|
-
children: { label:
|
|
927
|
+
children: { label: xn },
|
|
928
928
|
onClose: () => {
|
|
929
929
|
r.focusDrawing(null);
|
|
930
930
|
},
|
|
@@ -942,11 +942,11 @@ const yn = {
|
|
|
942
942
|
id: "doc.operation.edit-doc-image",
|
|
943
943
|
type: q.OPERATION,
|
|
944
944
|
handler: (i, e) => {
|
|
945
|
-
const t = i.get(
|
|
946
|
-
return e == null ? !1 : (t.focusDrawing([e]), n.executeCommand(
|
|
945
|
+
const t = i.get(me), n = i.get(j);
|
|
946
|
+
return e == null ? !1 : (t.focusDrawing([e]), n.executeCommand(Cn.id, { value: "open" }), !0);
|
|
947
947
|
}
|
|
948
948
|
}, qt = -1e3, Kt = 1e3, tr = (i) => {
|
|
949
|
-
const e =
|
|
949
|
+
const e = ve(j), t = ve(gt), n = ve(me), r = ve(Q), s = ve(z), { drawings: o } = i, c = o[0];
|
|
950
950
|
if (c == null)
|
|
951
951
|
return;
|
|
952
952
|
const { unitId: d } = c, a = s.getUniverDocInstance(d), l = a == null ? void 0 : a.getSnapshot().documentStyle.documentFlavor, g = r.getRenderById(d), u = g == null ? void 0 : g.scene;
|
|
@@ -961,31 +961,31 @@ const yn = {
|
|
|
961
961
|
}, {
|
|
962
962
|
label: t.t("image-position.margin"),
|
|
963
963
|
value: String(J.MARGIN)
|
|
964
|
-
}],
|
|
964
|
+
}], v = [{
|
|
965
965
|
label: t.t("image-position.line"),
|
|
966
|
-
value: String(
|
|
966
|
+
value: String(W.LINE),
|
|
967
967
|
disabled: l === pt.MODERN
|
|
968
968
|
}, {
|
|
969
969
|
label: t.t("image-position.page"),
|
|
970
|
-
value: String(
|
|
970
|
+
value: String(W.PAGE),
|
|
971
971
|
disabled: l === pt.MODERN
|
|
972
972
|
}, {
|
|
973
973
|
label: t.t("image-position.margin"),
|
|
974
|
-
value: String(
|
|
974
|
+
value: String(W.MARGIN),
|
|
975
975
|
disabled: l === pt.MODERN
|
|
976
976
|
}, {
|
|
977
977
|
label: t.t("image-position.paragraph"),
|
|
978
|
-
value: String(
|
|
979
|
-
}], [
|
|
978
|
+
value: String(W.PARAGRAPH)
|
|
979
|
+
}], [p, w] = re(!0), [O, D] = re({
|
|
980
980
|
relativeFrom: J.PAGE,
|
|
981
981
|
posOffset: 0
|
|
982
|
-
}), [
|
|
983
|
-
relativeFrom:
|
|
982
|
+
}), [y, x] = re({
|
|
983
|
+
relativeFrom: W.PAGE,
|
|
984
984
|
posOffset: 0
|
|
985
|
-
}), [M, E] =
|
|
986
|
-
function I(S,
|
|
985
|
+
}), [M, E] = re(!0), [U, N] = re(!0);
|
|
986
|
+
function I(S, C) {
|
|
987
987
|
var b;
|
|
988
|
-
S === "positionH" ? D(
|
|
988
|
+
S === "positionH" ? D(C) : x(C);
|
|
989
989
|
const T = n.getFocusDrawings();
|
|
990
990
|
if (T.length === 0)
|
|
991
991
|
return;
|
|
@@ -994,173 +994,165 @@ const yn = {
|
|
|
994
994
|
subUnitId: R.subUnitId,
|
|
995
995
|
drawingId: R.drawingId
|
|
996
996
|
}));
|
|
997
|
-
e.executeCommand(
|
|
997
|
+
e.executeCommand(Ke.id, {
|
|
998
998
|
unitId: T[0].unitId,
|
|
999
999
|
subUnitId: T[0].unitId,
|
|
1000
1000
|
drawings: L.map((R) => ({
|
|
1001
1001
|
drawingId: R.drawingId,
|
|
1002
1002
|
key: S,
|
|
1003
|
-
value:
|
|
1003
|
+
value: C
|
|
1004
1004
|
}))
|
|
1005
1005
|
});
|
|
1006
1006
|
const B = (b = r.getRenderById(d)) == null ? void 0 : b.with(xe);
|
|
1007
1007
|
B && B.blur(), h.refreshControls();
|
|
1008
1008
|
}
|
|
1009
1009
|
function P(S) {
|
|
1010
|
-
var
|
|
1011
|
-
const
|
|
1012
|
-
if (
|
|
1010
|
+
var ie, _e, Se;
|
|
1011
|
+
const C = O.relativeFrom, T = O.posOffset, L = Number(S);
|
|
1012
|
+
if (C === L)
|
|
1013
1013
|
return;
|
|
1014
1014
|
const B = n.getFocusDrawings();
|
|
1015
1015
|
if (B.length === 0)
|
|
1016
1016
|
return;
|
|
1017
1017
|
const b = B[0].drawingId, R = B[0].unitId;
|
|
1018
1018
|
let V = null, F = 0;
|
|
1019
|
-
const K = (
|
|
1020
|
-
if (
|
|
1019
|
+
const K = (ie = r.getRenderById(R)) == null ? void 0 : ie.with(te).getSkeleton(), oe = K == null ? void 0 : K.getSkeletonData();
|
|
1020
|
+
if (oe == null)
|
|
1021
1021
|
return;
|
|
1022
|
-
const { pages:
|
|
1023
|
-
for (const
|
|
1024
|
-
const { marginLeft: Oe, skeDrawings:
|
|
1025
|
-
if (
|
|
1026
|
-
V =
|
|
1022
|
+
const { pages: Be, skeHeaders: Ce, skeFooters: Ge } = oe;
|
|
1023
|
+
for (const ce of Be) {
|
|
1024
|
+
const { marginLeft: Oe, skeDrawings: ye, headerId: Ne, footerId: Ee, pageWidth: Te } = ce;
|
|
1025
|
+
if (ye.has(b)) {
|
|
1026
|
+
V = ye.get(b), F = Oe;
|
|
1027
1027
|
break;
|
|
1028
1028
|
}
|
|
1029
|
-
const
|
|
1030
|
-
if (
|
|
1031
|
-
V =
|
|
1029
|
+
const de = (_e = Ce.get(Ne)) == null ? void 0 : _e.get(Te);
|
|
1030
|
+
if (de != null && de.skeDrawings.has(b)) {
|
|
1031
|
+
V = de == null ? void 0 : de.skeDrawings.get(b), F = Oe;
|
|
1032
1032
|
break;
|
|
1033
1033
|
}
|
|
1034
|
-
const
|
|
1035
|
-
if (
|
|
1036
|
-
V =
|
|
1034
|
+
const le = (Se = Ge.get(Ee)) == null ? void 0 : Se.get(Te);
|
|
1035
|
+
if (le != null && le.skeDrawings.has(b)) {
|
|
1036
|
+
V = le == null ? void 0 : le.skeDrawings.get(b), F = Oe;
|
|
1037
1037
|
break;
|
|
1038
1038
|
}
|
|
1039
1039
|
}
|
|
1040
1040
|
if (V == null)
|
|
1041
1041
|
return;
|
|
1042
|
-
let
|
|
1043
|
-
|
|
1044
|
-
const
|
|
1042
|
+
let ae = 0;
|
|
1043
|
+
C === J.COLUMN ? ae -= V.columnLeft : C === J.MARGIN && (ae -= F), L === J.COLUMN ? ae += V.columnLeft : L === J.MARGIN ? ae += F : J.PAGE;
|
|
1044
|
+
const ne = {
|
|
1045
1045
|
relativeFrom: L,
|
|
1046
|
-
posOffset: (T != null ? T : 0) -
|
|
1046
|
+
posOffset: (T != null ? T : 0) - ae
|
|
1047
1047
|
};
|
|
1048
|
-
I("positionH",
|
|
1048
|
+
I("positionH", ne);
|
|
1049
1049
|
}
|
|
1050
|
-
function
|
|
1051
|
-
var
|
|
1052
|
-
const
|
|
1053
|
-
if (
|
|
1050
|
+
function H(S) {
|
|
1051
|
+
var ye, Ne, Ee, Te, de, le;
|
|
1052
|
+
const C = y.relativeFrom, T = y.posOffset, L = Number(S);
|
|
1053
|
+
if (C === L)
|
|
1054
1054
|
return;
|
|
1055
1055
|
const B = n.getFocusDrawings();
|
|
1056
1056
|
if (B.length === 0)
|
|
1057
1057
|
return;
|
|
1058
|
-
const { drawingId: b, unitId: R } = B[0], V = s.getUniverDocInstance(R), F = (
|
|
1059
|
-
if (
|
|
1058
|
+
const { drawingId: b, unitId: R } = B[0], V = s.getUniverDocInstance(R), F = (ye = r.getRenderById(R)) == null ? void 0 : ye.with(te).getSkeleton(), K = (Ne = r.getRenderById(R)) == null ? void 0 : Ne.with(xe), oe = K == null ? void 0 : K.getSegment(), Be = K == null ? void 0 : K.getSegmentPage(), Ce = (Te = (Ee = V == null ? void 0 : V.getSelfOrHeaderFooterModel(oe).getBody()) == null ? void 0 : Ee.customBlocks) == null ? void 0 : Te.find((Re) => Re.blockId === b);
|
|
1059
|
+
if (Ce == null || F == null || K == null)
|
|
1060
1060
|
return;
|
|
1061
|
-
const { startIndex: Ge } =
|
|
1062
|
-
if (
|
|
1061
|
+
const { startIndex: Ge } = Ce, ae = F.findNodeByCharIndex(Ge, oe, Be), ne = (de = ae == null ? void 0 : ae.parent) == null ? void 0 : de.parent, ie = ne == null ? void 0 : ne.parent, _e = ie == null ? void 0 : ie.lines.find((Re) => Re.paragraphIndex === (ne == null ? void 0 : ne.paragraphIndex) && Re.paragraphStart), Se = (le = ie == null ? void 0 : ie.parent) == null ? void 0 : le.parent;
|
|
1062
|
+
if (ae == null || ne == null || _e == null || ie == null || Se == null)
|
|
1063
1063
|
return;
|
|
1064
|
-
let
|
|
1065
|
-
|
|
1064
|
+
let ce = 0;
|
|
1065
|
+
C === W.PARAGRAPH ? ce -= _e.top : C === W.LINE ? ce -= ne.top : C === W.PAGE && (ce += Se.marginTop), L === W.PARAGRAPH ? ce += _e.top : L === W.LINE ? ce += ne.top : L === W.PAGE && (ce -= Se.marginTop);
|
|
1066
1066
|
const Oe = {
|
|
1067
1067
|
relativeFrom: L,
|
|
1068
|
-
posOffset: (T != null ? T : 0) -
|
|
1068
|
+
posOffset: (T != null ? T : 0) - ce
|
|
1069
1069
|
};
|
|
1070
1070
|
I("positionV", Oe);
|
|
1071
1071
|
}
|
|
1072
1072
|
function A(S) {
|
|
1073
1073
|
var R;
|
|
1074
|
-
const
|
|
1074
|
+
const C = a == null ? void 0 : a.getSnapshot(), T = (R = C == null ? void 0 : C.drawings) == null ? void 0 : R[S.drawingId];
|
|
1075
1075
|
if (T == null)
|
|
1076
1076
|
return;
|
|
1077
1077
|
const { layoutType: L } = T, {
|
|
1078
1078
|
positionH: B,
|
|
1079
1079
|
positionV: b
|
|
1080
1080
|
} = T.docTransform;
|
|
1081
|
-
D(B),
|
|
1081
|
+
D(B), x(b), w(L === k.INLINE), E(b.relativeFrom === W.PARAGRAPH || b.relativeFrom === W.LINE);
|
|
1082
1082
|
}
|
|
1083
|
-
function
|
|
1083
|
+
function G() {
|
|
1084
1084
|
const S = n.getFocusDrawings();
|
|
1085
1085
|
S.length !== 0 && A(S[0]);
|
|
1086
1086
|
}
|
|
1087
1087
|
function _(S) {
|
|
1088
|
-
E(S),
|
|
1088
|
+
E(S), H(String(S ? W.PARAGRAPH : W.PAGE));
|
|
1089
1089
|
}
|
|
1090
1090
|
return Mt(() => {
|
|
1091
|
-
|
|
1091
|
+
G();
|
|
1092
1092
|
const S = n.focus$.subscribe((T) => {
|
|
1093
1093
|
if (T.length === 0) {
|
|
1094
1094
|
N(!1);
|
|
1095
1095
|
return;
|
|
1096
1096
|
}
|
|
1097
1097
|
N(!0), A(T[0]);
|
|
1098
|
-
}),
|
|
1099
|
-
T.id === ee.id &&
|
|
1098
|
+
}), C = e.onCommandExecuted(async (T) => {
|
|
1099
|
+
T.id === ee.id && G();
|
|
1100
1100
|
});
|
|
1101
1101
|
return () => {
|
|
1102
|
-
S.unsubscribe(),
|
|
1102
|
+
S.unsubscribe(), C.dispose();
|
|
1103
1103
|
};
|
|
1104
1104
|
}, []), /* @__PURE__ */ X(
|
|
1105
1105
|
"div",
|
|
1106
1106
|
{
|
|
1107
|
-
className:
|
|
1108
|
-
|
|
1107
|
+
className: _t("univer-relative univer-mt-5 univer-w-full", ln, {
|
|
1108
|
+
"univer-hidden": !U
|
|
1109
|
+
}),
|
|
1109
1110
|
children: [
|
|
1111
|
+
/* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1 univer-text-gray-400", children: /* @__PURE__ */ m("div", { children: t.t("image-position.title") }) }) }),
|
|
1110
1112
|
/* @__PURE__ */ m(
|
|
1111
1113
|
"div",
|
|
1112
1114
|
{
|
|
1113
|
-
className:
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
`,
|
|
1125
|
-
children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1 univer-text-gray-900", children: /* @__PURE__ */ m("div", { children: t.t("image-position.horizontal") }) })
|
|
1115
|
+
className: "univer-relative univer-mt-2.5 univer-flex univer-h-full",
|
|
1116
|
+
children: /* @__PURE__ */ m(
|
|
1117
|
+
"div",
|
|
1118
|
+
{
|
|
1119
|
+
className: `
|
|
1120
|
+
univer-flex univer-items-center univer-gap-1 univer-text-gray-900
|
|
1121
|
+
dark:univer-text-white
|
|
1122
|
+
`,
|
|
1123
|
+
children: /* @__PURE__ */ m("div", { children: t.t("image-position.horizontal") })
|
|
1124
|
+
}
|
|
1125
|
+
)
|
|
1126
1126
|
}
|
|
1127
1127
|
),
|
|
1128
1128
|
/* @__PURE__ */ X(
|
|
1129
1129
|
"div",
|
|
1130
1130
|
{
|
|
1131
|
-
className:
|
|
1132
|
-
univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start univer-justify-start
|
|
1133
|
-
`,
|
|
1131
|
+
className: "univer-relative univer-mt-2.5 univer-flex univer-h-full",
|
|
1134
1132
|
children: [
|
|
1135
1133
|
/* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1 univer-text-gray-400", children: /* @__PURE__ */ X("label", { children: [
|
|
1136
1134
|
/* @__PURE__ */ m(
|
|
1137
1135
|
"div",
|
|
1138
1136
|
{
|
|
1139
|
-
className:
|
|
1140
|
-
univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start
|
|
1141
|
-
univer-justify-start
|
|
1142
|
-
`,
|
|
1137
|
+
className: "univer-relative univer-mt-2.5 univer-flex univer-h-full",
|
|
1143
1138
|
children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: t.t("image-position.absolutePosition") })
|
|
1144
1139
|
}
|
|
1145
1140
|
),
|
|
1146
1141
|
/* @__PURE__ */ m(
|
|
1147
1142
|
"div",
|
|
1148
1143
|
{
|
|
1149
|
-
className:
|
|
1150
|
-
univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start
|
|
1151
|
-
univer-justify-start
|
|
1152
|
-
`,
|
|
1144
|
+
className: "univer-relative univer-mt-2.5 univer-flex univer-h-full",
|
|
1153
1145
|
children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(
|
|
1154
|
-
|
|
1146
|
+
ke,
|
|
1155
1147
|
{
|
|
1156
1148
|
min: qt,
|
|
1157
1149
|
max: Kt,
|
|
1158
1150
|
precision: 1,
|
|
1159
|
-
disabled:
|
|
1160
|
-
value:
|
|
1151
|
+
disabled: p,
|
|
1152
|
+
value: O.posOffset,
|
|
1161
1153
|
onChange: (S) => {
|
|
1162
1154
|
I("positionH", {
|
|
1163
|
-
relativeFrom:
|
|
1155
|
+
relativeFrom: O.relativeFrom,
|
|
1164
1156
|
posOffset: S
|
|
1165
1157
|
});
|
|
1166
1158
|
}
|
|
@@ -1170,28 +1162,16 @@ const yn = {
|
|
|
1170
1162
|
)
|
|
1171
1163
|
] }) }),
|
|
1172
1164
|
/* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ X("label", { children: [
|
|
1165
|
+
/* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: t.t("image-position.toTheRightOf") }) }),
|
|
1173
1166
|
/* @__PURE__ */ m(
|
|
1174
1167
|
"div",
|
|
1175
1168
|
{
|
|
1176
|
-
className:
|
|
1177
|
-
univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start
|
|
1178
|
-
univer-justify-start
|
|
1179
|
-
`,
|
|
1180
|
-
children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: t.t("image-position.toTheRightOf") })
|
|
1181
|
-
}
|
|
1182
|
-
),
|
|
1183
|
-
/* @__PURE__ */ m(
|
|
1184
|
-
"div",
|
|
1185
|
-
{
|
|
1186
|
-
className: `
|
|
1187
|
-
univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start
|
|
1188
|
-
univer-justify-start
|
|
1189
|
-
`,
|
|
1169
|
+
className: "univer-relative univer-mt-2.5 univer-flex univer-h-full",
|
|
1190
1170
|
children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(
|
|
1191
|
-
|
|
1171
|
+
Gt,
|
|
1192
1172
|
{
|
|
1193
|
-
value: String(
|
|
1194
|
-
disabled:
|
|
1173
|
+
value: String(O.relativeFrom),
|
|
1174
|
+
disabled: p,
|
|
1195
1175
|
options: f,
|
|
1196
1176
|
onChange: P
|
|
1197
1177
|
}
|
|
@@ -1202,150 +1182,117 @@ const yn = {
|
|
|
1202
1182
|
]
|
|
1203
1183
|
}
|
|
1204
1184
|
),
|
|
1205
|
-
/* @__PURE__ */ m(
|
|
1185
|
+
/* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m(
|
|
1206
1186
|
"div",
|
|
1207
1187
|
{
|
|
1208
1188
|
className: `
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1189
|
+
univer-flex univer-items-center univer-gap-1 univer-text-gray-900
|
|
1190
|
+
dark:univer-text-white
|
|
1191
|
+
`,
|
|
1192
|
+
children: /* @__PURE__ */ m("div", { children: t.t("image-position.vertical") })
|
|
1212
1193
|
}
|
|
1213
|
-
),
|
|
1214
|
-
/* @__PURE__ */ X(
|
|
1215
|
-
"div",
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
"div",
|
|
1194
|
+
) }),
|
|
1195
|
+
/* @__PURE__ */ X("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: [
|
|
1196
|
+
/* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ X("label", { children: [
|
|
1197
|
+
/* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: t.t("image-position.absolutePosition") }) }),
|
|
1198
|
+
/* @__PURE__ */ m(
|
|
1199
|
+
"div",
|
|
1200
|
+
{
|
|
1201
|
+
className: "univer-relative univer-mt-2.5 univer-flex univer-h-full",
|
|
1202
|
+
children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(
|
|
1203
|
+
ke,
|
|
1224
1204
|
{
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1205
|
+
min: qt,
|
|
1206
|
+
max: Kt,
|
|
1207
|
+
precision: 1,
|
|
1208
|
+
disabled: p,
|
|
1209
|
+
value: y.posOffset,
|
|
1210
|
+
onChange: (S) => {
|
|
1211
|
+
I("positionV", {
|
|
1212
|
+
relativeFrom: y.relativeFrom,
|
|
1213
|
+
posOffset: S
|
|
1214
|
+
});
|
|
1215
|
+
}
|
|
1230
1216
|
}
|
|
1231
|
-
)
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
max: Kt,
|
|
1244
|
-
precision: 1,
|
|
1245
|
-
disabled: v,
|
|
1246
|
-
value: O.posOffset,
|
|
1247
|
-
onChange: (S) => {
|
|
1248
|
-
I("positionV", {
|
|
1249
|
-
relativeFrom: O.relativeFrom,
|
|
1250
|
-
posOffset: S
|
|
1251
|
-
});
|
|
1252
|
-
}
|
|
1253
|
-
}
|
|
1254
|
-
) })
|
|
1255
|
-
}
|
|
1256
|
-
)
|
|
1257
|
-
] }) }),
|
|
1258
|
-
/* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ X("label", { children: [
|
|
1259
|
-
/* @__PURE__ */ m(
|
|
1260
|
-
"div",
|
|
1261
|
-
{
|
|
1262
|
-
className: `
|
|
1263
|
-
univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start
|
|
1264
|
-
univer-justify-start
|
|
1265
|
-
`,
|
|
1266
|
-
children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: t.t("image-position.bellow") })
|
|
1267
|
-
}
|
|
1268
|
-
),
|
|
1269
|
-
/* @__PURE__ */ m(
|
|
1270
|
-
"div",
|
|
1217
|
+
) })
|
|
1218
|
+
}
|
|
1219
|
+
)
|
|
1220
|
+
] }) }),
|
|
1221
|
+
/* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ X("label", { children: [
|
|
1222
|
+
/* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: t.t("image-position.bellow") }) }),
|
|
1223
|
+
/* @__PURE__ */ m(
|
|
1224
|
+
"div",
|
|
1225
|
+
{
|
|
1226
|
+
className: "univer-relative univer-mt-2.5 univer-flex univer-h-full",
|
|
1227
|
+
children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(
|
|
1228
|
+
Gt,
|
|
1271
1229
|
{
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(
|
|
1277
|
-
Ht,
|
|
1278
|
-
{
|
|
1279
|
-
disabled: v,
|
|
1280
|
-
value: String(O.relativeFrom),
|
|
1281
|
-
options: p,
|
|
1282
|
-
onChange: W
|
|
1283
|
-
}
|
|
1284
|
-
) })
|
|
1230
|
+
disabled: p,
|
|
1231
|
+
value: String(y.relativeFrom),
|
|
1232
|
+
options: v,
|
|
1233
|
+
onChange: H
|
|
1285
1234
|
}
|
|
1286
|
-
)
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
}
|
|
1290
|
-
),
|
|
1291
|
-
/* @__PURE__ */ m(
|
|
1235
|
+
) })
|
|
1236
|
+
}
|
|
1237
|
+
)
|
|
1238
|
+
] }) })
|
|
1239
|
+
] }),
|
|
1240
|
+
/* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m(
|
|
1292
1241
|
"div",
|
|
1293
1242
|
{
|
|
1294
1243
|
className: `
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1244
|
+
univer-flex univer-items-center univer-gap-1 univer-text-gray-900
|
|
1245
|
+
dark:univer-text-white
|
|
1246
|
+
`,
|
|
1247
|
+
children: /* @__PURE__ */ m("div", { children: t.t("image-position.options") })
|
|
1298
1248
|
}
|
|
1299
|
-
),
|
|
1249
|
+
) }),
|
|
1300
1250
|
/* @__PURE__ */ m(
|
|
1301
1251
|
"div",
|
|
1302
1252
|
{
|
|
1303
|
-
className:
|
|
1304
|
-
|
|
1305
|
-
`,
|
|
1306
|
-
style: { marginBottom: "50px" },
|
|
1307
|
-
children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(Bi, { disabled: v, checked: M, onChange: _, children: t.t("image-position.moveObjectWithText") }) })
|
|
1253
|
+
className: "univer-relative univer-mb-12 univer-mt-2.5 univer-flex univer-h-full",
|
|
1254
|
+
children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(Bi, { disabled: p, checked: M, onChange: _, children: t.t("image-position.moveObjectWithText") }) })
|
|
1308
1255
|
}
|
|
1309
1256
|
)
|
|
1310
1257
|
]
|
|
1311
1258
|
}
|
|
1312
1259
|
);
|
|
1313
|
-
},
|
|
1314
|
-
const e =
|
|
1260
|
+
}, Je = 0, et = 100, nr = (i) => {
|
|
1261
|
+
const e = ve(j), t = ve(gt), n = ve(me), r = ve(Q), s = ve(z), { drawings: o } = i, c = o[0];
|
|
1315
1262
|
if (c == null)
|
|
1316
1263
|
return null;
|
|
1317
1264
|
const { unitId: d } = c, a = s.getUniverDocInstance(d), l = r.getRenderById(d);
|
|
1318
1265
|
if ((l == null ? void 0 : l.scene) == null)
|
|
1319
1266
|
return null;
|
|
1320
|
-
const [u, h] =
|
|
1267
|
+
const [u, h] = re(!0), [f, v] = re(!0), [p, w] = re(!0), [O, D] = re(ge.INLINE), [y, x] = re(""), [M, E] = re({
|
|
1321
1268
|
distT: 0,
|
|
1322
1269
|
distL: 0,
|
|
1323
1270
|
distB: 0,
|
|
1324
1271
|
distR: 0
|
|
1325
|
-
}), [U, N] =
|
|
1272
|
+
}), [U, N] = re(!0);
|
|
1326
1273
|
function I(_) {
|
|
1327
1274
|
D(_);
|
|
1328
1275
|
const S = n.getFocusDrawings();
|
|
1329
1276
|
if (S.length === 0)
|
|
1330
1277
|
return;
|
|
1331
|
-
const { unitId:
|
|
1278
|
+
const { unitId: C, subUnitId: T } = S[0], L = S.map(({ unitId: B, subUnitId: b, drawingId: R }) => ({
|
|
1332
1279
|
unitId: B,
|
|
1333
1280
|
subUnitId: b,
|
|
1334
1281
|
drawingId: R
|
|
1335
1282
|
}));
|
|
1336
|
-
e.executeCommand(
|
|
1337
|
-
unitId:
|
|
1283
|
+
e.executeCommand(On.id, {
|
|
1284
|
+
unitId: C,
|
|
1338
1285
|
subUnitId: T,
|
|
1339
1286
|
drawings: L,
|
|
1340
1287
|
wrappingStyle: _
|
|
1341
1288
|
});
|
|
1342
1289
|
}
|
|
1343
1290
|
function P(_) {
|
|
1344
|
-
|
|
1291
|
+
x(_);
|
|
1345
1292
|
const S = n.getFocusDrawings();
|
|
1346
1293
|
if (S.length === 0)
|
|
1347
1294
|
return;
|
|
1348
|
-
const
|
|
1295
|
+
const C = S.map((T) => ({
|
|
1349
1296
|
unitId: T.unitId,
|
|
1350
1297
|
subUnitId: T.subUnitId,
|
|
1351
1298
|
drawingId: T.drawingId
|
|
@@ -1353,15 +1300,15 @@ const yn = {
|
|
|
1353
1300
|
e.executeCommand(Tn.id, {
|
|
1354
1301
|
unitId: S[0].unitId,
|
|
1355
1302
|
subUnitId: S[0].unitId,
|
|
1356
|
-
drawings:
|
|
1303
|
+
drawings: C,
|
|
1357
1304
|
wrapText: _
|
|
1358
1305
|
});
|
|
1359
1306
|
}
|
|
1360
|
-
function
|
|
1307
|
+
function H(_, S) {
|
|
1361
1308
|
if (_ == null)
|
|
1362
1309
|
return;
|
|
1363
|
-
const
|
|
1364
|
-
E(
|
|
1310
|
+
const C = { ...M, [S]: _ };
|
|
1311
|
+
E(C);
|
|
1365
1312
|
const T = n.getFocusDrawings();
|
|
1366
1313
|
if (T.length === 0)
|
|
1367
1314
|
return;
|
|
@@ -1370,7 +1317,7 @@ const yn = {
|
|
|
1370
1317
|
subUnitId: B.subUnitId,
|
|
1371
1318
|
drawingId: B.drawingId
|
|
1372
1319
|
}));
|
|
1373
|
-
e.executeCommand(
|
|
1320
|
+
e.executeCommand(yn.id, {
|
|
1374
1321
|
unitId: T[0].unitId,
|
|
1375
1322
|
subUnitId: T[0].unitId,
|
|
1376
1323
|
drawings: L,
|
|
@@ -1381,39 +1328,39 @@ const yn = {
|
|
|
1381
1328
|
}
|
|
1382
1329
|
function A() {
|
|
1383
1330
|
const _ = n.getFocusDrawings();
|
|
1384
|
-
_.length !== 0 &&
|
|
1331
|
+
_.length !== 0 && G(_[0]);
|
|
1385
1332
|
}
|
|
1386
|
-
function
|
|
1387
|
-
var K,
|
|
1388
|
-
const S = (
|
|
1333
|
+
function G(_) {
|
|
1334
|
+
var K, oe;
|
|
1335
|
+
const S = (oe = (K = a == null ? void 0 : a.getSnapshot()) == null ? void 0 : K.drawings) == null ? void 0 : oe[_.drawingId];
|
|
1389
1336
|
if (S == null)
|
|
1390
1337
|
return;
|
|
1391
1338
|
const {
|
|
1392
|
-
distT:
|
|
1339
|
+
distT: C = 0,
|
|
1393
1340
|
distL: T = 0,
|
|
1394
1341
|
distB: L = 0,
|
|
1395
1342
|
distR: B = 0,
|
|
1396
1343
|
layoutType: b = k.INLINE,
|
|
1397
|
-
behindDoc: R =
|
|
1398
|
-
wrapText: V =
|
|
1344
|
+
behindDoc: R = se.FALSE,
|
|
1345
|
+
wrapText: V = Xe.BOTH_SIDES
|
|
1399
1346
|
} = S;
|
|
1400
1347
|
if (E({
|
|
1401
|
-
distT:
|
|
1348
|
+
distT: C,
|
|
1402
1349
|
distL: T,
|
|
1403
1350
|
distB: L,
|
|
1404
1351
|
distR: B
|
|
1405
|
-
}),
|
|
1406
|
-
R ===
|
|
1352
|
+
}), x(V), h(b !== k.WRAP_SQUARE), b === k.WRAP_NONE || b === k.INLINE ? v(!0) : v(!1), b === k.WRAP_NONE || b === k.INLINE || b === k.WRAP_TOP_AND_BOTTOM ? w(!0) : w(!1), b === k.WRAP_NONE)
|
|
1353
|
+
R === se.TRUE ? D(ge.BEHIND_TEXT) : D(ge.IN_FRONT_OF_TEXT);
|
|
1407
1354
|
else
|
|
1408
1355
|
switch (b) {
|
|
1409
1356
|
case k.INLINE:
|
|
1410
|
-
D(
|
|
1357
|
+
D(ge.INLINE);
|
|
1411
1358
|
break;
|
|
1412
1359
|
case k.WRAP_SQUARE:
|
|
1413
|
-
D(
|
|
1360
|
+
D(ge.WRAP_SQUARE);
|
|
1414
1361
|
break;
|
|
1415
1362
|
case k.WRAP_TOP_AND_BOTTOM:
|
|
1416
|
-
D(
|
|
1363
|
+
D(ge.WRAP_TOP_AND_BOTTOM);
|
|
1417
1364
|
break;
|
|
1418
1365
|
default:
|
|
1419
1366
|
throw new Error(`Unsupported layout type: ${b}`);
|
|
@@ -1421,14 +1368,14 @@ const yn = {
|
|
|
1421
1368
|
}
|
|
1422
1369
|
return Mt(() => {
|
|
1423
1370
|
A();
|
|
1424
|
-
const _ = n.focus$.subscribe((
|
|
1425
|
-
if (
|
|
1371
|
+
const _ = n.focus$.subscribe((C) => {
|
|
1372
|
+
if (C.length === 0) {
|
|
1426
1373
|
N(!1);
|
|
1427
1374
|
return;
|
|
1428
1375
|
}
|
|
1429
|
-
N(!0),
|
|
1430
|
-
}), S = e.onCommandExecuted(async (
|
|
1431
|
-
|
|
1376
|
+
N(!0), G(C[0]);
|
|
1377
|
+
}), S = e.onCommandExecuted(async (C) => {
|
|
1378
|
+
C.id === ee.id && A();
|
|
1432
1379
|
});
|
|
1433
1380
|
return () => {
|
|
1434
1381
|
_.unsubscribe(), S.dispose();
|
|
@@ -1436,148 +1383,110 @@ const yn = {
|
|
|
1436
1383
|
}, []), /* @__PURE__ */ X(
|
|
1437
1384
|
"div",
|
|
1438
1385
|
{
|
|
1439
|
-
className:
|
|
1386
|
+
className: _t("univer-relative univer-mt-5 univer-w-full", ln, {
|
|
1440
1387
|
"univer-hidden": !U
|
|
1441
1388
|
}),
|
|
1442
1389
|
children: [
|
|
1443
|
-
/* @__PURE__ */ m(
|
|
1390
|
+
/* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m(
|
|
1444
1391
|
"div",
|
|
1445
1392
|
{
|
|
1446
1393
|
className: `
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1394
|
+
univer-flex univer-items-center univer-gap-1 univer-text-gray-600
|
|
1395
|
+
dark:univer-text-gray-200
|
|
1396
|
+
`,
|
|
1397
|
+
children: /* @__PURE__ */ m("div", { children: t.t("image-text-wrap.title") })
|
|
1450
1398
|
}
|
|
1451
|
-
),
|
|
1452
|
-
/* @__PURE__ */ m(
|
|
1399
|
+
) }),
|
|
1400
|
+
/* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m(
|
|
1453
1401
|
"div",
|
|
1454
1402
|
{
|
|
1455
1403
|
className: `
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1404
|
+
univer-flex univer-items-center univer-gap-1 univer-text-gray-900
|
|
1405
|
+
dark:univer-text-white
|
|
1406
|
+
`,
|
|
1407
|
+
children: /* @__PURE__ */ m("div", { children: t.t("image-text-wrap.wrappingStyle") })
|
|
1459
1408
|
}
|
|
1460
|
-
),
|
|
1461
|
-
/* @__PURE__ */ m(
|
|
1462
|
-
"
|
|
1463
|
-
{
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
/* @__PURE__ */ m(be, { value: fe.WRAP_SQUARE, children: t.t("image-text-wrap.square") }),
|
|
1470
|
-
/* @__PURE__ */ m(be, { value: fe.WRAP_TOP_AND_BOTTOM, children: t.t("image-text-wrap.topAndBottom") }),
|
|
1471
|
-
/* @__PURE__ */ m(be, { value: fe.BEHIND_TEXT, children: t.t("image-text-wrap.behindText") }),
|
|
1472
|
-
/* @__PURE__ */ m(be, { value: fe.IN_FRONT_OF_TEXT, children: t.t("image-text-wrap.inFrontText") })
|
|
1473
|
-
] }) })
|
|
1474
|
-
}
|
|
1475
|
-
),
|
|
1476
|
-
/* @__PURE__ */ m(
|
|
1409
|
+
) }),
|
|
1410
|
+
/* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ X(jt, { value: O, onChange: I, direction: "vertical", children: [
|
|
1411
|
+
/* @__PURE__ */ m(Me, { value: ge.INLINE, children: t.t("image-text-wrap.inline") }),
|
|
1412
|
+
/* @__PURE__ */ m(Me, { value: ge.WRAP_SQUARE, children: t.t("image-text-wrap.square") }),
|
|
1413
|
+
/* @__PURE__ */ m(Me, { value: ge.WRAP_TOP_AND_BOTTOM, children: t.t("image-text-wrap.topAndBottom") }),
|
|
1414
|
+
/* @__PURE__ */ m(Me, { value: ge.BEHIND_TEXT, children: t.t("image-text-wrap.behindText") }),
|
|
1415
|
+
/* @__PURE__ */ m(Me, { value: ge.IN_FRONT_OF_TEXT, children: t.t("image-text-wrap.inFrontText") })
|
|
1416
|
+
] }) }) }),
|
|
1417
|
+
/* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m(
|
|
1477
1418
|
"div",
|
|
1478
1419
|
{
|
|
1479
1420
|
className: `
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1421
|
+
univer-flex univer-items-center univer-gap-1 univer-text-gray-900
|
|
1422
|
+
dark:univer-text-white
|
|
1423
|
+
`,
|
|
1424
|
+
children: /* @__PURE__ */ m("div", { children: t.t("image-text-wrap.wrapText") })
|
|
1483
1425
|
}
|
|
1484
|
-
),
|
|
1426
|
+
) }),
|
|
1485
1427
|
/* @__PURE__ */ m(
|
|
1486
1428
|
"div",
|
|
1487
1429
|
{
|
|
1488
|
-
className:
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
/* @__PURE__ */ m(
|
|
1493
|
-
/* @__PURE__ */ m(be, { value: qe.LEFT, children: t.t("image-text-wrap.leftOnly") }),
|
|
1494
|
-
/* @__PURE__ */ m(be, { value: qe.RIGHT, children: t.t("image-text-wrap.rightOnly") })
|
|
1430
|
+
className: "univer-relative univer-mt-2.5 univer-flex univer-h-full",
|
|
1431
|
+
children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ X(jt, { disabled: u, value: y, onChange: P, direction: "horizontal", children: [
|
|
1432
|
+
/* @__PURE__ */ m(Me, { value: Xe.BOTH_SIDES, children: t.t("image-text-wrap.bothSide") }),
|
|
1433
|
+
/* @__PURE__ */ m(Me, { value: Xe.LEFT, children: t.t("image-text-wrap.leftOnly") }),
|
|
1434
|
+
/* @__PURE__ */ m(Me, { value: Xe.RIGHT, children: t.t("image-text-wrap.rightOnly") })
|
|
1495
1435
|
] }) })
|
|
1496
1436
|
}
|
|
1497
1437
|
),
|
|
1498
|
-
/* @__PURE__ */ m(
|
|
1438
|
+
/* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m(
|
|
1499
1439
|
"div",
|
|
1500
1440
|
{
|
|
1501
1441
|
className: `
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1442
|
+
univer-flex univer-items-center univer-gap-1 univer-text-gray-900
|
|
1443
|
+
dark:univer-text-white
|
|
1444
|
+
`,
|
|
1445
|
+
children: /* @__PURE__ */ m("div", { children: t.t("image-text-wrap.distanceFromText") })
|
|
1505
1446
|
}
|
|
1506
|
-
),
|
|
1447
|
+
) }),
|
|
1507
1448
|
/* @__PURE__ */ X(
|
|
1508
1449
|
"div",
|
|
1509
1450
|
{
|
|
1510
|
-
className:
|
|
1511
|
-
univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start univer-justify-start
|
|
1512
|
-
`,
|
|
1451
|
+
className: "univer-relative univer-mt-2.5 univer-flex univer-h-full",
|
|
1513
1452
|
children: [
|
|
1514
|
-
/* @__PURE__ */ m("div", { className:
|
|
1515
|
-
/* @__PURE__ */ m(
|
|
1516
|
-
|
|
1453
|
+
/* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ X("label", { children: [
|
|
1454
|
+
/* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: t.t("image-text-wrap.top") }) }),
|
|
1455
|
+
/* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(
|
|
1456
|
+
ke,
|
|
1517
1457
|
{
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1458
|
+
min: Je,
|
|
1459
|
+
max: et,
|
|
1460
|
+
disabled: f,
|
|
1461
|
+
precision: 1,
|
|
1462
|
+
value: M.distT,
|
|
1463
|
+
onChange: (_) => {
|
|
1464
|
+
H(_, "distT");
|
|
1465
|
+
}
|
|
1523
1466
|
}
|
|
1524
|
-
)
|
|
1525
|
-
/* @__PURE__ */ m(
|
|
1526
|
-
"div",
|
|
1527
|
-
{
|
|
1528
|
-
className: `
|
|
1529
|
-
univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start
|
|
1530
|
-
univer-justify-start
|
|
1531
|
-
`,
|
|
1532
|
-
children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(
|
|
1533
|
-
je,
|
|
1534
|
-
{
|
|
1535
|
-
min: et,
|
|
1536
|
-
max: tt,
|
|
1537
|
-
disabled: f,
|
|
1538
|
-
precision: 1,
|
|
1539
|
-
value: M.distT,
|
|
1540
|
-
onChange: (_) => {
|
|
1541
|
-
W(_, "distT");
|
|
1542
|
-
}
|
|
1543
|
-
}
|
|
1544
|
-
) })
|
|
1545
|
-
}
|
|
1546
|
-
)
|
|
1467
|
+
) }) })
|
|
1547
1468
|
] }) }),
|
|
1548
|
-
/* @__PURE__ */ m("div", { className:
|
|
1469
|
+
/* @__PURE__ */ m("div", { className: _t("univer-flex univer-items-center univer-gap-1"), children: /* @__PURE__ */ X("label", { children: [
|
|
1549
1470
|
/* @__PURE__ */ m(
|
|
1550
1471
|
"div",
|
|
1551
1472
|
{
|
|
1552
|
-
className:
|
|
1553
|
-
univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start
|
|
1554
|
-
univer-justify-start
|
|
1555
|
-
`,
|
|
1473
|
+
className: "univer-relative univer-mt-2.5 univer-flex univer-h-full",
|
|
1556
1474
|
children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: t.t("image-text-wrap.left") })
|
|
1557
1475
|
}
|
|
1558
1476
|
),
|
|
1559
|
-
/* @__PURE__ */ m(
|
|
1560
|
-
|
|
1477
|
+
/* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(
|
|
1478
|
+
ke,
|
|
1561
1479
|
{
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
max: tt,
|
|
1571
|
-
disabled: v,
|
|
1572
|
-
precision: 1,
|
|
1573
|
-
value: M.distL,
|
|
1574
|
-
onChange: (_) => {
|
|
1575
|
-
W(_, "distL");
|
|
1576
|
-
}
|
|
1577
|
-
}
|
|
1578
|
-
) })
|
|
1480
|
+
min: Je,
|
|
1481
|
+
max: et,
|
|
1482
|
+
disabled: p,
|
|
1483
|
+
precision: 1,
|
|
1484
|
+
value: M.distL,
|
|
1485
|
+
onChange: (_) => {
|
|
1486
|
+
H(_, "distL");
|
|
1487
|
+
}
|
|
1579
1488
|
}
|
|
1580
|
-
)
|
|
1489
|
+
) }) })
|
|
1581
1490
|
] }) })
|
|
1582
1491
|
]
|
|
1583
1492
|
}
|
|
@@ -1585,77 +1494,39 @@ const yn = {
|
|
|
1585
1494
|
/* @__PURE__ */ X(
|
|
1586
1495
|
"div",
|
|
1587
1496
|
{
|
|
1588
|
-
className:
|
|
1589
|
-
univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start univer-justify-start
|
|
1590
|
-
`,
|
|
1497
|
+
className: "univer-relative univer-mt-2.5 univer-flex univer-h-full",
|
|
1591
1498
|
children: [
|
|
1592
|
-
/* @__PURE__ */ m("div", { className:
|
|
1593
|
-
/* @__PURE__ */ m(
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
className: `
|
|
1597
|
-
univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start
|
|
1598
|
-
univer-justify-start
|
|
1599
|
-
`,
|
|
1600
|
-
children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: t.t("image-text-wrap.bottom") })
|
|
1601
|
-
}
|
|
1602
|
-
),
|
|
1603
|
-
/* @__PURE__ */ m(
|
|
1604
|
-
"div",
|
|
1499
|
+
/* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ X("label", { children: [
|
|
1500
|
+
/* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: t.t("image-text-wrap.bottom") }) }),
|
|
1501
|
+
/* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(
|
|
1502
|
+
ke,
|
|
1605
1503
|
{
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
max: tt,
|
|
1615
|
-
disabled: f,
|
|
1616
|
-
precision: 1,
|
|
1617
|
-
value: M.distB,
|
|
1618
|
-
onChange: (_) => {
|
|
1619
|
-
W(_, "distB");
|
|
1620
|
-
}
|
|
1621
|
-
}
|
|
1622
|
-
) })
|
|
1504
|
+
min: Je,
|
|
1505
|
+
max: et,
|
|
1506
|
+
disabled: f,
|
|
1507
|
+
precision: 1,
|
|
1508
|
+
value: M.distB,
|
|
1509
|
+
onChange: (_) => {
|
|
1510
|
+
H(_, "distB");
|
|
1511
|
+
}
|
|
1623
1512
|
}
|
|
1624
|
-
)
|
|
1513
|
+
) }) })
|
|
1625
1514
|
] }) }),
|
|
1626
|
-
/* @__PURE__ */ m("div", { className:
|
|
1627
|
-
/* @__PURE__ */ m(
|
|
1628
|
-
|
|
1515
|
+
/* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ X("label", { children: [
|
|
1516
|
+
/* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: t.t("image-text-wrap.right") }) }),
|
|
1517
|
+
/* @__PURE__ */ m("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(
|
|
1518
|
+
ke,
|
|
1629
1519
|
{
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1520
|
+
min: Je,
|
|
1521
|
+
max: et,
|
|
1522
|
+
disabled: p,
|
|
1523
|
+
precision: 1,
|
|
1524
|
+
value: M.distR,
|
|
1525
|
+
onChange: (_) => {
|
|
1526
|
+
H(_, "distR");
|
|
1527
|
+
}
|
|
1635
1528
|
}
|
|
1636
|
-
)
|
|
1637
|
-
/* @__PURE__ */ m(
|
|
1638
|
-
"div",
|
|
1639
|
-
{
|
|
1640
|
-
className: `
|
|
1641
|
-
univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start
|
|
1642
|
-
univer-justify-start
|
|
1643
|
-
`,
|
|
1644
|
-
children: /* @__PURE__ */ m("div", { className: "univer-flex univer-items-center univer-gap-1", children: /* @__PURE__ */ m(
|
|
1645
|
-
je,
|
|
1646
|
-
{
|
|
1647
|
-
min: et,
|
|
1648
|
-
max: tt,
|
|
1649
|
-
disabled: v,
|
|
1650
|
-
precision: 1,
|
|
1651
|
-
value: M.distR,
|
|
1652
|
-
onChange: (_) => {
|
|
1653
|
-
W(_, "distR");
|
|
1654
|
-
}
|
|
1655
|
-
}
|
|
1656
|
-
) })
|
|
1657
|
-
}
|
|
1658
|
-
)
|
|
1529
|
+
) }) })
|
|
1659
1530
|
] }) })
|
|
1660
1531
|
]
|
|
1661
1532
|
}
|
|
@@ -1664,7 +1535,7 @@ const yn = {
|
|
|
1664
1535
|
}
|
|
1665
1536
|
);
|
|
1666
1537
|
}, ir = () => {
|
|
1667
|
-
const i =
|
|
1538
|
+
const i = ve(me), e = i.getFocusDrawings(), [t, n] = re(e);
|
|
1668
1539
|
return Mt(() => {
|
|
1669
1540
|
const r = i.focus$.subscribe((s) => {
|
|
1670
1541
|
n(s);
|
|
@@ -1678,8 +1549,8 @@ const yn = {
|
|
|
1678
1549
|
/* @__PURE__ */ m(tr, { drawings: t })
|
|
1679
1550
|
] });
|
|
1680
1551
|
}, En = "addition-and-subtraction-single", Rn = "doc.menu.image", An = Sn.id, rr = (i) => {
|
|
1681
|
-
const e = i.get(
|
|
1682
|
-
return new
|
|
1552
|
+
const e = i.get(yt), t = i.get(z);
|
|
1553
|
+
return new Wi((n) => {
|
|
1683
1554
|
const r = e.textSelection$.subscribe(() => {
|
|
1684
1555
|
var o;
|
|
1685
1556
|
const s = e.getActiveTextRange();
|
|
@@ -1708,7 +1579,7 @@ function sr(i) {
|
|
|
1708
1579
|
icon: En,
|
|
1709
1580
|
tooltip: "docImage.title",
|
|
1710
1581
|
disabled$: rr(i),
|
|
1711
|
-
hidden$: rn(i,
|
|
1582
|
+
hidden$: rn(i, we.UNIVER_DOC, void 0, Ot)
|
|
1712
1583
|
};
|
|
1713
1584
|
}
|
|
1714
1585
|
function or(i) {
|
|
@@ -1716,11 +1587,11 @@ function or(i) {
|
|
|
1716
1587
|
id: An,
|
|
1717
1588
|
title: "docImage.upload.float",
|
|
1718
1589
|
type: sn.BUTTON,
|
|
1719
|
-
hidden$: rn(i,
|
|
1590
|
+
hidden$: rn(i, we.UNIVER_DOC, void 0, Ot)
|
|
1720
1591
|
};
|
|
1721
1592
|
}
|
|
1722
1593
|
const ar = {
|
|
1723
|
-
[
|
|
1594
|
+
[Oi.LAYOUT]: {
|
|
1724
1595
|
[Rn]: {
|
|
1725
1596
|
order: 0,
|
|
1726
1597
|
menuItemFactory: sr,
|
|
@@ -1731,55 +1602,55 @@ const ar = {
|
|
|
1731
1602
|
}
|
|
1732
1603
|
}
|
|
1733
1604
|
};
|
|
1734
|
-
function
|
|
1735
|
-
return i.getContextValue(
|
|
1605
|
+
function Ze(i) {
|
|
1606
|
+
return i.getContextValue(jn) && i.getContextValue(it);
|
|
1736
1607
|
}
|
|
1737
1608
|
const cr = {
|
|
1738
|
-
id:
|
|
1609
|
+
id: Ye.id,
|
|
1739
1610
|
description: "shortcut.drawing-move-down",
|
|
1740
1611
|
group: "4_drawing-view",
|
|
1741
1612
|
binding: He.ARROW_DOWN,
|
|
1742
1613
|
priority: 100,
|
|
1743
|
-
preconditions:
|
|
1614
|
+
preconditions: Ze,
|
|
1744
1615
|
staticParameters: {
|
|
1745
|
-
direction:
|
|
1616
|
+
direction: fe.DOWN
|
|
1746
1617
|
}
|
|
1747
1618
|
}, dr = {
|
|
1748
|
-
id:
|
|
1619
|
+
id: Ye.id,
|
|
1749
1620
|
description: "shortcut.drawing-move-up",
|
|
1750
1621
|
group: "4_drawing-view",
|
|
1751
1622
|
binding: He.ARROW_UP,
|
|
1752
1623
|
priority: 100,
|
|
1753
|
-
preconditions:
|
|
1624
|
+
preconditions: Ze,
|
|
1754
1625
|
staticParameters: {
|
|
1755
|
-
direction:
|
|
1626
|
+
direction: fe.UP
|
|
1756
1627
|
}
|
|
1757
1628
|
}, lr = {
|
|
1758
|
-
id:
|
|
1629
|
+
id: Ye.id,
|
|
1759
1630
|
description: "shortcut.drawing-move-left",
|
|
1760
1631
|
group: "4_drawing-view",
|
|
1761
1632
|
binding: He.ARROW_LEFT,
|
|
1762
1633
|
priority: 100,
|
|
1763
|
-
preconditions:
|
|
1634
|
+
preconditions: Ze,
|
|
1764
1635
|
staticParameters: {
|
|
1765
|
-
direction:
|
|
1636
|
+
direction: fe.LEFT
|
|
1766
1637
|
}
|
|
1767
1638
|
}, ur = {
|
|
1768
|
-
id:
|
|
1639
|
+
id: Ye.id,
|
|
1769
1640
|
description: "shortcut.drawing-move-right",
|
|
1770
1641
|
group: "4_drawing-view",
|
|
1771
1642
|
binding: He.ARROW_RIGHT,
|
|
1772
1643
|
priority: 100,
|
|
1773
|
-
preconditions:
|
|
1644
|
+
preconditions: Ze,
|
|
1774
1645
|
staticParameters: {
|
|
1775
|
-
direction:
|
|
1646
|
+
direction: fe.RIGHT
|
|
1776
1647
|
}
|
|
1777
1648
|
}, gr = {
|
|
1778
|
-
id:
|
|
1649
|
+
id: vn.id,
|
|
1779
1650
|
description: "shortcut.drawing-delete",
|
|
1780
1651
|
group: "4_drawing-view",
|
|
1781
1652
|
// when focusing on any other input tag do not trigger this shortcut
|
|
1782
|
-
preconditions:
|
|
1653
|
+
preconditions: Ze,
|
|
1783
1654
|
binding: He.DELETE,
|
|
1784
1655
|
mac: He.BACKSPACE
|
|
1785
1656
|
};
|
|
@@ -1787,14 +1658,14 @@ var fr = Object.getOwnPropertyDescriptor, hr = (i, e, t, n) => {
|
|
|
1787
1658
|
for (var r = n > 1 ? void 0 : n ? fr(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
1788
1659
|
(o = i[s]) && (r = o(r) || r);
|
|
1789
1660
|
return r;
|
|
1790
|
-
},
|
|
1791
|
-
let
|
|
1661
|
+
}, tt = (i, e) => (t, n) => e(t, n, i);
|
|
1662
|
+
let st = class extends Le {
|
|
1792
1663
|
constructor(i, e, t, n) {
|
|
1793
1664
|
super(), this._componentManager = i, this._menuManagerService = e, this._commandService = t, this._shortcutService = n, this._init();
|
|
1794
1665
|
}
|
|
1795
1666
|
_initCustomComponents() {
|
|
1796
1667
|
const i = this._componentManager;
|
|
1797
|
-
this.disposeWithMe(i.register(En,
|
|
1668
|
+
this.disposeWithMe(i.register(En, pn)), this.disposeWithMe(i.register(xn, ir));
|
|
1798
1669
|
}
|
|
1799
1670
|
_initMenus() {
|
|
1800
1671
|
this._menuManagerService.mergeMenu(ar);
|
|
@@ -1802,21 +1673,21 @@ let ot = class extends Ue {
|
|
|
1802
1673
|
_initCommands() {
|
|
1803
1674
|
[
|
|
1804
1675
|
Sn,
|
|
1805
|
-
|
|
1806
|
-
yn,
|
|
1676
|
+
xt,
|
|
1807
1677
|
On,
|
|
1678
|
+
yn,
|
|
1808
1679
|
Tn,
|
|
1809
|
-
|
|
1680
|
+
Ke,
|
|
1810
1681
|
Mn,
|
|
1811
1682
|
bn,
|
|
1812
1683
|
bt,
|
|
1813
|
-
|
|
1684
|
+
Cn,
|
|
1814
1685
|
er,
|
|
1815
1686
|
Nn,
|
|
1816
1687
|
wn,
|
|
1817
1688
|
_n,
|
|
1818
|
-
|
|
1819
|
-
|
|
1689
|
+
Ye,
|
|
1690
|
+
vn,
|
|
1820
1691
|
In
|
|
1821
1692
|
].forEach((i) => this.disposeWithMe(this._commandService.registerCommand(i)));
|
|
1822
1693
|
}
|
|
@@ -1836,18 +1707,18 @@ let ot = class extends Ue {
|
|
|
1836
1707
|
this._initCommands(), this._initCustomComponents(), this._initMenus(), this._initShortcuts();
|
|
1837
1708
|
}
|
|
1838
1709
|
};
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
],
|
|
1845
|
-
var mr = Object.getOwnPropertyDescriptor,
|
|
1710
|
+
st = hr([
|
|
1711
|
+
tt(0, Z(on)),
|
|
1712
|
+
tt(1, yi),
|
|
1713
|
+
tt(2, j),
|
|
1714
|
+
tt(3, Ti)
|
|
1715
|
+
], st);
|
|
1716
|
+
var mr = Object.getOwnPropertyDescriptor, pr = (i, e, t, n) => {
|
|
1846
1717
|
for (var r = n > 1 ? void 0 : n ? mr(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
1847
1718
|
(o = i[s]) && (r = o(r) || r);
|
|
1848
1719
|
return r;
|
|
1849
|
-
},
|
|
1850
|
-
function
|
|
1720
|
+
}, Ve = (i, e) => (t, n) => e(t, n, i);
|
|
1721
|
+
function vr(i) {
|
|
1851
1722
|
var n, r, s, o;
|
|
1852
1723
|
if ($.isNoop(i) || !Array.isArray(i))
|
|
1853
1724
|
return null;
|
|
@@ -1885,7 +1756,7 @@ function wr(i) {
|
|
|
1885
1756
|
}
|
|
1886
1757
|
return e;
|
|
1887
1758
|
}
|
|
1888
|
-
let
|
|
1759
|
+
let ot = class extends Le {
|
|
1889
1760
|
constructor(i, e, t, n, r) {
|
|
1890
1761
|
super(), this._univerInstanceService = i, this._commandService = e, this._drawingManagerService = t, this._docDrawingService = n, this._renderManagerService = r, this._initialize();
|
|
1891
1762
|
}
|
|
@@ -1897,7 +1768,7 @@ let at = class extends Ue {
|
|
|
1897
1768
|
this._commandService.beforeCommandExecuted((i) => {
|
|
1898
1769
|
if (i.id !== ee.id)
|
|
1899
1770
|
return;
|
|
1900
|
-
const e = i.params, { unitId: t, actions: n } = e, r =
|
|
1771
|
+
const e = i.params, { unitId: t, actions: n } = e, r = vr(n);
|
|
1901
1772
|
if (r != null)
|
|
1902
1773
|
for (const { type: s, drawingId: o, drawing: c } of r)
|
|
1903
1774
|
s === "add" ? this._addDrawings(t, [c]) : this._removeDrawings(t, [o]);
|
|
@@ -1953,18 +1824,18 @@ let at = class extends Ue {
|
|
|
1953
1824
|
n.orderNotification(s), r.orderNotification(s);
|
|
1954
1825
|
}
|
|
1955
1826
|
};
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
],
|
|
1827
|
+
ot = pr([
|
|
1828
|
+
Ve(0, z),
|
|
1829
|
+
Ve(1, j),
|
|
1830
|
+
Ve(2, me),
|
|
1831
|
+
Ve(3, Ue),
|
|
1832
|
+
Ve(4, Q)
|
|
1833
|
+
], ot);
|
|
1963
1834
|
var Ir = Object.getOwnPropertyDescriptor, _r = (i, e, t, n) => {
|
|
1964
1835
|
for (var r = n > 1 ? void 0 : n ? Ir(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
1965
1836
|
(o = i[s]) && (r = o(r) || r);
|
|
1966
1837
|
return r;
|
|
1967
|
-
},
|
|
1838
|
+
}, Fe = (i, e) => (t, n) => e(t, n, i);
|
|
1968
1839
|
function Pn(i, e, t = 1, n = 0) {
|
|
1969
1840
|
const { top: r, left: s, bottom: o, right: c } = i, d = c - s, a = o - r, l = e.getViewport(cn.VIEW_MAIN), { viewportScrollX: g, viewportScrollY: u } = l, { scaleX: h, scaleY: f } = e.getAncestorScale();
|
|
1970
1841
|
return {
|
|
@@ -1982,14 +1853,14 @@ function Pn(i, e, t = 1, n = 0) {
|
|
|
1982
1853
|
opacity: t != null ? t : 1
|
|
1983
1854
|
};
|
|
1984
1855
|
}
|
|
1985
|
-
function
|
|
1856
|
+
function wt(i, e) {
|
|
1986
1857
|
const { top: t, left: n, width: r, height: s, angle: o, opacity: c } = i;
|
|
1987
1858
|
return Pn({ top: t, left: n, bottom: t + s, right: n + r }, e.scene, c, o);
|
|
1988
1859
|
}
|
|
1989
|
-
let
|
|
1860
|
+
let at = class extends Le {
|
|
1990
1861
|
constructor(e, t, n, r, s, o) {
|
|
1991
1862
|
super();
|
|
1992
|
-
|
|
1863
|
+
Ie(this, "_domLayerInfoMap", /* @__PURE__ */ new Map());
|
|
1993
1864
|
this._renderManagerService = e, this._drawingManagerService = t, this._drawingRenderService = n, this._canvasFloatDomService = r, this._univerInstanceService = s, this._commandService = o, this._initialize();
|
|
1994
1865
|
}
|
|
1995
1866
|
dispose() {
|
|
@@ -2023,7 +1894,7 @@ let ct = class extends Ue {
|
|
|
2023
1894
|
_insertRects(e) {
|
|
2024
1895
|
e.forEach(async (t) => {
|
|
2025
1896
|
const { unitId: n } = t;
|
|
2026
|
-
if (!this._univerInstanceService.getUnit(n,
|
|
1897
|
+
if (!this._univerInstanceService.getUnit(n, we.UNIVER_DOC))
|
|
2027
1898
|
return;
|
|
2028
1899
|
const s = this._getSceneAndTransformerByDrawingSearch(n);
|
|
2029
1900
|
if (s == null)
|
|
@@ -2035,7 +1906,7 @@ let ct = class extends Ue {
|
|
|
2035
1906
|
if (!(c == null || c.length === 0))
|
|
2036
1907
|
for (const d of c) {
|
|
2037
1908
|
this._addHoverForRect(d);
|
|
2038
|
-
const a = new zn(), l =
|
|
1909
|
+
const a = new zn(), l = wt(d, s.renderUnit), g = new Tt(l), u = s.canvas, h = o.data, f = {
|
|
2039
1910
|
dispose: a,
|
|
2040
1911
|
rect: d,
|
|
2041
1912
|
position$: g,
|
|
@@ -2045,42 +1916,42 @@ let ct = class extends Ue {
|
|
|
2045
1916
|
position$: g,
|
|
2046
1917
|
id: o.drawingId,
|
|
2047
1918
|
componentKey: o.componentKey,
|
|
2048
|
-
onPointerDown: (
|
|
2049
|
-
u.dispatchEvent(new PointerEvent(
|
|
1919
|
+
onPointerDown: (p) => {
|
|
1920
|
+
u.dispatchEvent(new PointerEvent(p.type, p));
|
|
2050
1921
|
},
|
|
2051
|
-
onPointerMove: (
|
|
2052
|
-
u.dispatchEvent(new PointerEvent(
|
|
1922
|
+
onPointerMove: (p) => {
|
|
1923
|
+
u.dispatchEvent(new PointerEvent(p.type, p));
|
|
2053
1924
|
},
|
|
2054
|
-
onPointerUp: (
|
|
2055
|
-
u.dispatchEvent(new PointerEvent(
|
|
1925
|
+
onPointerUp: (p) => {
|
|
1926
|
+
u.dispatchEvent(new PointerEvent(p.type, p));
|
|
2056
1927
|
},
|
|
2057
|
-
onWheel: (
|
|
2058
|
-
u.dispatchEvent(new WheelEvent(
|
|
1928
|
+
onWheel: (p) => {
|
|
1929
|
+
u.dispatchEvent(new WheelEvent(p.type, p));
|
|
2059
1930
|
},
|
|
2060
1931
|
data: h,
|
|
2061
1932
|
unitId: n
|
|
2062
1933
|
});
|
|
2063
|
-
const
|
|
2064
|
-
const
|
|
1934
|
+
const v = d.onTransformChange$.subscribeEvent(() => {
|
|
1935
|
+
const p = wt(d, s.renderUnit);
|
|
2065
1936
|
g.next(
|
|
2066
|
-
|
|
1937
|
+
p
|
|
2067
1938
|
);
|
|
2068
1939
|
});
|
|
2069
1940
|
a.add(() => {
|
|
2070
1941
|
this._canvasFloatDomService.removeFloatDom(o.drawingId);
|
|
2071
|
-
}),
|
|
1942
|
+
}), v && a.add(v), this._domLayerInfoMap.set(o.drawingId, f);
|
|
2072
1943
|
}
|
|
2073
1944
|
});
|
|
2074
1945
|
}
|
|
2075
1946
|
_addHoverForRect(e) {
|
|
2076
1947
|
this.disposeWithMe(
|
|
2077
|
-
|
|
1948
|
+
De(
|
|
2078
1949
|
e.onPointerEnter$.subscribeEvent(() => {
|
|
2079
1950
|
e.cursor = Ut.GRAB;
|
|
2080
1951
|
})
|
|
2081
1952
|
)
|
|
2082
1953
|
), this.disposeWithMe(
|
|
2083
|
-
|
|
1954
|
+
De(
|
|
2084
1955
|
e.onPointerLeave$.subscribeEvent(() => {
|
|
2085
1956
|
e.cursor = Ut.DEFAULT;
|
|
2086
1957
|
})
|
|
@@ -2101,19 +1972,19 @@ let ct = class extends Ue {
|
|
|
2101
1972
|
const n = this._getSceneAndTransformerByDrawingSearch(t);
|
|
2102
1973
|
n && this._domLayerInfoMap.forEach((r) => {
|
|
2103
1974
|
if (r.unitId !== t) return;
|
|
2104
|
-
const s =
|
|
1975
|
+
const s = wt(r.rect, n.renderUnit);
|
|
2105
1976
|
r.position$.next(s);
|
|
2106
1977
|
});
|
|
2107
1978
|
};
|
|
2108
1979
|
this.disposeWithMe(
|
|
2109
|
-
this._univerInstanceService.getCurrentTypeOfUnit$(
|
|
1980
|
+
this._univerInstanceService.getCurrentTypeOfUnit$(we.UNIVER_DOC).pipe(
|
|
2110
1981
|
Vt((t) => {
|
|
2111
1982
|
if (!t) return null;
|
|
2112
1983
|
const n = t.getUnitId(), r = this._renderManagerService.getRenderById(n);
|
|
2113
1984
|
return r ? { render: r, unitId: n } : null;
|
|
2114
1985
|
}),
|
|
2115
|
-
|
|
2116
|
-
(t) => t ? Jt(t.render.scene.getViewport(cn.VIEW_MAIN).onScrollAfter$).pipe(Vt(() => ({ unitId: t.unitId }))) :
|
|
1986
|
+
Hi(
|
|
1987
|
+
(t) => t ? Jt(t.render.scene.getViewport(cn.VIEW_MAIN).onScrollAfter$).pipe(Vt(() => ({ unitId: t.unitId }))) : Gi(null)
|
|
2117
1988
|
)
|
|
2118
1989
|
).subscribe((t) => {
|
|
2119
1990
|
if (!t) return;
|
|
@@ -2128,16 +1999,16 @@ let ct = class extends Ue {
|
|
|
2128
1999
|
}));
|
|
2129
2000
|
}
|
|
2130
2001
|
insertFloatDom(e, t) {
|
|
2131
|
-
var
|
|
2132
|
-
const n = this._univerInstanceService.getCurrentUnitOfType(
|
|
2002
|
+
var v, p, w;
|
|
2003
|
+
const n = this._univerInstanceService.getCurrentUnitOfType(we.UNIVER_DOC);
|
|
2133
2004
|
if (!n) return !1;
|
|
2134
2005
|
const r = this._getSceneAndTransformerByDrawingSearch(n.getUnitId());
|
|
2135
2006
|
if (!r) return !1;
|
|
2136
|
-
const c = (
|
|
2007
|
+
const c = (v = r.renderUnit.with(te).getSkeleton().getSkeletonData()) == null ? void 0 : v.pages[0];
|
|
2137
2008
|
if (!c) return !1;
|
|
2138
2009
|
const { pageWidth: d, marginLeft: a, marginRight: l } = c, g = d - a - l, u = {
|
|
2139
2010
|
size: {
|
|
2140
|
-
width: (
|
|
2011
|
+
width: (p = t.width) != null ? p : g,
|
|
2141
2012
|
height: t.height
|
|
2142
2013
|
},
|
|
2143
2014
|
positionH: {
|
|
@@ -2145,7 +2016,7 @@ let ct = class extends Ue {
|
|
|
2145
2016
|
posOffset: 0
|
|
2146
2017
|
},
|
|
2147
2018
|
positionV: {
|
|
2148
|
-
relativeFrom:
|
|
2019
|
+
relativeFrom: W.PAGE,
|
|
2149
2020
|
posOffset: 0
|
|
2150
2021
|
},
|
|
2151
2022
|
angle: 0
|
|
@@ -2154,7 +2025,7 @@ let ct = class extends Ue {
|
|
|
2154
2025
|
drawings: [
|
|
2155
2026
|
{
|
|
2156
2027
|
drawingId: h,
|
|
2157
|
-
drawingType:
|
|
2028
|
+
drawingType: Pe.DRAWING_DOM,
|
|
2158
2029
|
subUnitId: n.getUnitId(),
|
|
2159
2030
|
unitId: n.getUnitId(),
|
|
2160
2031
|
...e,
|
|
@@ -2166,17 +2037,17 @@ let ct = class extends Ue {
|
|
|
2166
2037
|
}
|
|
2167
2038
|
]
|
|
2168
2039
|
};
|
|
2169
|
-
return this._commandService.syncExecuteCommand(
|
|
2040
|
+
return this._commandService.syncExecuteCommand(xt.id, f), h;
|
|
2170
2041
|
}
|
|
2171
2042
|
};
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
],
|
|
2043
|
+
at = _r([
|
|
2044
|
+
Fe(0, Q),
|
|
2045
|
+
Fe(1, me),
|
|
2046
|
+
Fe(2, Z(tn)),
|
|
2047
|
+
Fe(3, Z(Mi)),
|
|
2048
|
+
Fe(4, z),
|
|
2049
|
+
Fe(5, j)
|
|
2050
|
+
], at);
|
|
2180
2051
|
const Sr = (i) => {
|
|
2181
2052
|
const { floatDomInfos: e, scene: t, offset: n, bound: r } = i, s = r.right - r.left, o = r.bottom - r.top, c = Vi(() => e.map((d) => {
|
|
2182
2053
|
const { width: a = 0, height: l = 0, left: g = 0, top: u = 0 } = d.transform, f = Pn(
|
|
@@ -2187,7 +2058,7 @@ const Sr = (i) => {
|
|
|
2187
2058
|
bottom: u + l
|
|
2188
2059
|
},
|
|
2189
2060
|
t
|
|
2190
|
-
),
|
|
2061
|
+
), v = {
|
|
2191
2062
|
position$: new Tt(f),
|
|
2192
2063
|
position: f,
|
|
2193
2064
|
id: d.drawingId,
|
|
@@ -2203,16 +2074,16 @@ const Sr = (i) => {
|
|
|
2203
2074
|
unitId: d.unitId,
|
|
2204
2075
|
data: d.data
|
|
2205
2076
|
};
|
|
2206
|
-
return [d.drawingId,
|
|
2077
|
+
return [d.drawingId, v];
|
|
2207
2078
|
}).filter(([d, a]) => !(a.position.endX < 0 || a.position.endY < 0 || a.position.startX > s || a.position.startY > o)), [e, t, n, s, o]);
|
|
2208
2079
|
return /* @__PURE__ */ m("div", { style: { position: "absolute", top: 0, left: 0 }, children: c.map(([d, a]) => /* @__PURE__ */ m(bi, { layer: a, id: d, position: a.position }, d)) });
|
|
2209
2080
|
};
|
|
2210
|
-
var Dr = Object.getOwnPropertyDescriptor,
|
|
2081
|
+
var Dr = Object.getOwnPropertyDescriptor, Or = (i, e, t, n) => {
|
|
2211
2082
|
for (var r = n > 1 ? void 0 : n ? Dr(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
2212
2083
|
(o = i[s]) && (r = o(r) || r);
|
|
2213
2084
|
return r;
|
|
2214
|
-
},
|
|
2215
|
-
let
|
|
2085
|
+
}, $e = (i, e) => (t, n) => e(t, n, i);
|
|
2086
|
+
let ct = class extends Le {
|
|
2216
2087
|
constructor(i, e, t, n, r) {
|
|
2217
2088
|
super(), this._docPrintInterceptorService = i, this._drawingRenderService = e, this._drawingManagerService = t, this._componetManager = n, this._injector = r, this._initPrinting(), this._initPrintingDom();
|
|
2218
2089
|
}
|
|
@@ -2225,7 +2096,7 @@ let dt = class extends Ue {
|
|
|
2225
2096
|
const { unitId: n, scene: r } = e, s = this._drawingManagerService.getDrawingDataForUnit(n), o = s == null ? void 0 : s[n];
|
|
2226
2097
|
return o && o.order.forEach((c) => {
|
|
2227
2098
|
const d = o.data[c];
|
|
2228
|
-
d.drawingType !==
|
|
2099
|
+
d.drawingType !== Pe.DRAWING_CHART && d.drawingType !== Pe.DRAWING_DOM && this._drawingRenderService.renderDrawing(d, r);
|
|
2229
2100
|
}), t();
|
|
2230
2101
|
}
|
|
2231
2102
|
}
|
|
@@ -2242,12 +2113,12 @@ let dt = class extends Ue {
|
|
|
2242
2113
|
if (s) {
|
|
2243
2114
|
const o = s.order.map((d) => {
|
|
2244
2115
|
const a = s.data[d];
|
|
2245
|
-
if (a.drawingType ===
|
|
2116
|
+
if (a.drawingType === Pe.DRAWING_CHART)
|
|
2246
2117
|
return {
|
|
2247
2118
|
...a,
|
|
2248
2119
|
componentKey: this._componetManager.get(qn)
|
|
2249
2120
|
};
|
|
2250
|
-
if (a.drawingType ===
|
|
2121
|
+
if (a.drawingType === Pe.DRAWING_DOM) {
|
|
2251
2122
|
const l = this._docPrintInterceptorService.getPrintComponent(a.componentKey);
|
|
2252
2123
|
return {
|
|
2253
2124
|
...a,
|
|
@@ -2255,7 +2126,7 @@ let dt = class extends Ue {
|
|
|
2255
2126
|
};
|
|
2256
2127
|
}
|
|
2257
2128
|
return null;
|
|
2258
|
-
}).filter(Boolean), c =
|
|
2129
|
+
}).filter(Boolean), c = xi(Sr, this._injector);
|
|
2259
2130
|
return Fi(
|
|
2260
2131
|
/* @__PURE__ */ m(
|
|
2261
2132
|
c,
|
|
@@ -2279,31 +2150,31 @@ let dt = class extends Ue {
|
|
|
2279
2150
|
);
|
|
2280
2151
|
}
|
|
2281
2152
|
};
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
],
|
|
2289
|
-
var
|
|
2290
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
2153
|
+
ct = Or([
|
|
2154
|
+
$e(0, Z(Ei)),
|
|
2155
|
+
$e(1, Z(tn)),
|
|
2156
|
+
$e(2, me),
|
|
2157
|
+
$e(3, Z(on)),
|
|
2158
|
+
$e(4, Z(en))
|
|
2159
|
+
], ct);
|
|
2160
|
+
var yr = Object.getOwnPropertyDescriptor, Tr = (i, e, t, n) => {
|
|
2161
|
+
for (var r = n > 1 ? void 0 : n ? yr(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
2291
2162
|
(o = i[s]) && (r = o(r) || r);
|
|
2292
2163
|
return r;
|
|
2293
|
-
},
|
|
2164
|
+
}, nt = (i, e) => (t, n) => e(t, n, i);
|
|
2294
2165
|
const Mr = "__InlineDrawingAnchor__";
|
|
2295
2166
|
function Yt(i) {
|
|
2296
2167
|
const { path: e } = i;
|
|
2297
2168
|
return e.some((t) => t === "cells");
|
|
2298
2169
|
}
|
|
2299
|
-
let
|
|
2170
|
+
let dt = class extends Le {
|
|
2300
2171
|
constructor(e, t, n, r) {
|
|
2301
2172
|
super();
|
|
2302
|
-
|
|
2303
|
-
|
|
2173
|
+
Ie(this, "_liquid", new nn());
|
|
2174
|
+
Ie(this, "_listenerOnImageMap", /* @__PURE__ */ new Set());
|
|
2304
2175
|
// Use to cache the drawings is under transforming or scaling.
|
|
2305
|
-
|
|
2306
|
-
|
|
2176
|
+
Ie(this, "_transformerCache", /* @__PURE__ */ new Map());
|
|
2177
|
+
Ie(this, "_anchorShape");
|
|
2307
2178
|
this._commandService = e, this._univerInstanceService = t, this._drawingManagerService = n, this._renderManagerService = r, this._init();
|
|
2308
2179
|
}
|
|
2309
2180
|
_init() {
|
|
@@ -2328,22 +2199,22 @@ let lt = class extends Ue {
|
|
|
2328
2199
|
if (t == null)
|
|
2329
2200
|
return;
|
|
2330
2201
|
this.disposeWithMe(
|
|
2331
|
-
|
|
2202
|
+
De(
|
|
2332
2203
|
t.changeStart$.subscribe((s) => {
|
|
2333
2204
|
var c;
|
|
2334
2205
|
this._transformerCache.clear();
|
|
2335
2206
|
const { objects: o } = s;
|
|
2336
2207
|
for (const d of o.values()) {
|
|
2337
|
-
const { oKey: a, width: l, height: g, left: u, top: h, angle: f } = d,
|
|
2338
|
-
if (
|
|
2208
|
+
const { oKey: a, width: l, height: g, left: u, top: h, angle: f } = d, v = this._drawingManagerService.getDrawingOKey(a);
|
|
2209
|
+
if (v == null)
|
|
2339
2210
|
continue;
|
|
2340
|
-
const
|
|
2211
|
+
const p = this._univerInstanceService.getUniverDocInstance(v.unitId), w = (c = p == null ? void 0 : p.getSnapshot().drawings) == null ? void 0 : c[v.drawingId];
|
|
2341
2212
|
if ((w == null ? void 0 : w.layoutType) === k.INLINE)
|
|
2342
2213
|
try {
|
|
2343
2214
|
d.setOpacity(0.2);
|
|
2344
2215
|
} catch {
|
|
2345
2216
|
}
|
|
2346
|
-
w != null && this._transformerCache.set(
|
|
2217
|
+
w != null && this._transformerCache.set(v.drawingId, {
|
|
2347
2218
|
drawing: w,
|
|
2348
2219
|
top: h,
|
|
2349
2220
|
left: u,
|
|
@@ -2357,21 +2228,21 @@ let lt = class extends Ue {
|
|
|
2357
2228
|
);
|
|
2358
2229
|
const n = Et(this._updateMultipleDrawingDocTransform.bind(this), 50);
|
|
2359
2230
|
Et(this._nonInlineDrawingTransform.bind(this), 50), this.disposeWithMe(
|
|
2360
|
-
|
|
2231
|
+
De(
|
|
2361
2232
|
t.changing$.subscribe((s) => {
|
|
2362
2233
|
const { objects: o, offsetX: c, offsetY: d } = s;
|
|
2363
2234
|
if (o.size > 1)
|
|
2364
2235
|
n(o);
|
|
2365
2236
|
else if (o.size === 1) {
|
|
2366
|
-
const a = this._transformerCache.values().next().value, l = o.values().next().value, { width: g, height: u, top: h, left: f, angle:
|
|
2367
|
-
if (a && g === a.width && u === a.height && h === a.top && f === a.left &&
|
|
2237
|
+
const a = this._transformerCache.values().next().value, l = o.values().next().value, { width: g, height: u, top: h, left: f, angle: v } = l;
|
|
2238
|
+
if (a && g === a.width && u === a.height && h === a.top && f === a.left && v === a.angle)
|
|
2368
2239
|
return;
|
|
2369
2240
|
a && (a.drawing.layoutType, k.INLINE), a && a.drawing.layoutType === k.INLINE && c != null && d != null && this._updateInlineDrawingAnchor(a.drawing, c, d);
|
|
2370
2241
|
}
|
|
2371
2242
|
})
|
|
2372
2243
|
)
|
|
2373
2244
|
), this.disposeWithMe(
|
|
2374
|
-
|
|
2245
|
+
De(
|
|
2375
2246
|
// eslint-disable-next-line complexity
|
|
2376
2247
|
t.changeEnd$.subscribe((s) => {
|
|
2377
2248
|
const { objects: o, offsetX: c, offsetY: d } = s;
|
|
@@ -2389,10 +2260,10 @@ let lt = class extends Ue {
|
|
|
2389
2260
|
if (this._anchorShape && this._anchorShape.hide(), o.size > 1)
|
|
2390
2261
|
this._updateMultipleDrawingDocTransform(o);
|
|
2391
2262
|
else if (o.size === 1) {
|
|
2392
|
-
const a = this._transformerCache.values().next().value, l = o.values().next().value, { width: g, height: u, top: h, left: f, angle:
|
|
2393
|
-
if (a && g === a.width && u === a.height && h === a.top && f === a.left &&
|
|
2263
|
+
const a = this._transformerCache.values().next().value, l = o.values().next().value, { width: g, height: u, top: h, left: f, angle: v } = l;
|
|
2264
|
+
if (a && g === a.width && u === a.height && h === a.top && f === a.left && v === a.angle)
|
|
2394
2265
|
return;
|
|
2395
|
-
a && a.drawing.layoutType === k.INLINE ? g !== a.width || u !== a.height ||
|
|
2266
|
+
a && a.drawing.layoutType === k.INLINE ? g !== a.width || u !== a.height || v !== a.angle ? this._updateDrawingSize(a, l) : c != null && d != null && this._moveInlineDrawing(a.drawing, c, d) : a && this._nonInlineDrawingTransform(a.drawing, l);
|
|
2396
2267
|
}
|
|
2397
2268
|
this._transformerCache.clear();
|
|
2398
2269
|
})
|
|
@@ -2415,8 +2286,8 @@ let lt = class extends Ue {
|
|
|
2415
2286
|
const h = this._transformerCache.get(u.drawingId);
|
|
2416
2287
|
if (h == null)
|
|
2417
2288
|
continue;
|
|
2418
|
-
const { drawing: f, top:
|
|
2419
|
-
if (l = Math.min(l,
|
|
2289
|
+
const { drawing: f, top: v, left: p, width: w, height: O, angle: D } = h, { width: y, height: x } = this._getPageContentSize(f);
|
|
2290
|
+
if (l = Math.min(l, y), g = Math.min(g, x), (w !== l || O !== g) && t.push({
|
|
2420
2291
|
drawingId: u.drawingId,
|
|
2421
2292
|
key: "size",
|
|
2422
2293
|
value: {
|
|
@@ -2427,8 +2298,8 @@ let lt = class extends Ue {
|
|
|
2427
2298
|
drawingId: u.drawingId,
|
|
2428
2299
|
key: "angle",
|
|
2429
2300
|
value: a
|
|
2430
|
-
}),
|
|
2431
|
-
const M = d -
|
|
2301
|
+
}), v !== d || p !== c) {
|
|
2302
|
+
const M = d - v, E = c - p;
|
|
2432
2303
|
M !== 0 && t.push({
|
|
2433
2304
|
drawingId: u.drawingId,
|
|
2434
2305
|
key: "positionV",
|
|
@@ -2446,7 +2317,7 @@ let lt = class extends Ue {
|
|
|
2446
2317
|
});
|
|
2447
2318
|
}
|
|
2448
2319
|
}
|
|
2449
|
-
t.length > 0 && n && r && this._commandService.executeCommand(
|
|
2320
|
+
t.length > 0 && n && r && this._commandService.executeCommand(Ke.id, {
|
|
2450
2321
|
unitId: n,
|
|
2451
2322
|
subUnitId: r,
|
|
2452
2323
|
drawings: t
|
|
@@ -2467,8 +2338,8 @@ let lt = class extends Ue {
|
|
|
2467
2338
|
r != null && this._createOrUpdateInlineAnchor(e.unitId, r);
|
|
2468
2339
|
}
|
|
2469
2340
|
_getInlineDrawingAnchor(e, t, n) {
|
|
2470
|
-
var A,
|
|
2471
|
-
const r = this._renderManagerService.getRenderById(e.unitId), s = r == null ? void 0 : r.with(
|
|
2341
|
+
var A, G;
|
|
2342
|
+
const r = this._renderManagerService.getRenderById(e.unitId), s = r == null ? void 0 : r.with(te).getSkeleton();
|
|
2472
2343
|
if (r == null)
|
|
2473
2344
|
return;
|
|
2474
2345
|
const { mainComponent: o, scene: c } = r, d = o, a = c.getViewports()[0], {
|
|
@@ -2476,83 +2347,83 @@ let lt = class extends Ue {
|
|
|
2476
2347
|
pageMarginLeft: g,
|
|
2477
2348
|
pageMarginTop: u
|
|
2478
2349
|
} = d.getOffsetConfig();
|
|
2479
|
-
let h = null, f = !1,
|
|
2480
|
-
const w = 0.5,
|
|
2481
|
-
if (
|
|
2350
|
+
let h = null, f = !1, v = -1, p = "";
|
|
2351
|
+
const w = 0.5, O = this._getTransformCoordForDocumentOffset(d, a, t, n);
|
|
2352
|
+
if (O == null)
|
|
2482
2353
|
return;
|
|
2483
2354
|
const D = (A = this._renderManagerService.getRenderById(e.unitId)) == null ? void 0 : A.with(xe);
|
|
2484
2355
|
if (D == null)
|
|
2485
2356
|
return;
|
|
2486
|
-
const
|
|
2357
|
+
const y = s == null ? void 0 : s.findNodeByCoord(O, l, g, u, {
|
|
2487
2358
|
strict: !1,
|
|
2488
2359
|
segmentId: D.getSegment(),
|
|
2489
2360
|
segmentPage: D.getSegmentPage()
|
|
2490
2361
|
});
|
|
2491
|
-
if (
|
|
2492
|
-
const { node: _, ratioX: S, segmentPage:
|
|
2493
|
-
f = S < w, h = _,
|
|
2362
|
+
if (y) {
|
|
2363
|
+
const { node: _, ratioX: S, segmentPage: C, segmentId: T } = y;
|
|
2364
|
+
f = S < w, h = _, v = C, p = T;
|
|
2494
2365
|
}
|
|
2495
2366
|
if (h == null)
|
|
2496
2367
|
return;
|
|
2497
|
-
const
|
|
2498
|
-
if (
|
|
2368
|
+
const x = s == null ? void 0 : s.findPositionByGlyph(h, v), M = this._getDocObject();
|
|
2369
|
+
if (x == null || s == null || M == null || Yt(x))
|
|
2499
2370
|
return;
|
|
2500
2371
|
const E = {
|
|
2501
|
-
...
|
|
2372
|
+
...x,
|
|
2502
2373
|
isBack: f
|
|
2503
|
-
}, U = M.document.getOffsetConfig(), N = new kt(U, s), { cursorList: I, contentBoxPointGroup: P } = N.getRangePointData(E, E), { startOffset:
|
|
2504
|
-
if (
|
|
2505
|
-
return { offset:
|
|
2374
|
+
}, U = M.document.getOffsetConfig(), N = new kt(U, s), { cursorList: I, contentBoxPointGroup: P } = N.getRangePointData(E, E), { startOffset: H } = (G = Wt(I)) != null ? G : {};
|
|
2375
|
+
if (H != null)
|
|
2376
|
+
return { offset: H, contentBoxPointGroup: P, segmentId: p, segmentPage: v };
|
|
2506
2377
|
}
|
|
2507
2378
|
// eslint-disable-next-line max-lines-per-function, complexity
|
|
2508
2379
|
_getDrawingAnchor(e, t) {
|
|
2509
|
-
var
|
|
2510
|
-
const n = this._renderManagerService.getRenderById(e.unitId), r = n == null ? void 0 : n.with(
|
|
2380
|
+
var _e, Se, ce, Oe, ye, Ne, Ee, Te, de, le, Re;
|
|
2381
|
+
const n = this._renderManagerService.getRenderById(e.unitId), r = n == null ? void 0 : n.with(te).getSkeleton(), s = r == null ? void 0 : r.getSkeletonData();
|
|
2511
2382
|
if (s == null || n == null)
|
|
2512
2383
|
return;
|
|
2513
|
-
const { pages: o, skeHeaders: c, skeFooters: d } = s, { mainComponent: a, scene: l } = n, g = a, u = l.getViewports()[0], { pageLayoutType: h = Bt.VERTICAL, pageMarginLeft: f, pageMarginTop:
|
|
2514
|
-
let { width:
|
|
2384
|
+
const { pages: o, skeHeaders: c, skeFooters: d } = s, { mainComponent: a, scene: l } = n, g = a, u = l.getViewports()[0], { pageLayoutType: h = Bt.VERTICAL, pageMarginLeft: f, pageMarginTop: v, docsLeft: p, docsTop: w } = g.getOffsetConfig(), { left: O, top: D, angle: y } = t;
|
|
2385
|
+
let { width: x, height: M } = t;
|
|
2515
2386
|
const { positionV: E, positionH: U } = e.docTransform, { width: N, height: I } = this._getPageContentSize(e);
|
|
2516
|
-
|
|
2517
|
-
let P = null,
|
|
2518
|
-
const
|
|
2387
|
+
x = Math.min(x, N), M = Math.min(M, I);
|
|
2388
|
+
let P = null, H = "", A = -1;
|
|
2389
|
+
const G = !1, _ = {
|
|
2519
2390
|
...e.docTransform,
|
|
2520
2391
|
size: {
|
|
2521
|
-
width:
|
|
2392
|
+
width: x,
|
|
2522
2393
|
height: M
|
|
2523
2394
|
},
|
|
2524
|
-
angle:
|
|
2525
|
-
}, { x: S, y:
|
|
2395
|
+
angle: y
|
|
2396
|
+
}, { x: S, y: C } = l.getViewportScrollXY(u), T = this._getTransformCoordForDocumentOffset(g, u, O - S, D - C);
|
|
2526
2397
|
if (T == null)
|
|
2527
2398
|
return;
|
|
2528
|
-
const L = (
|
|
2399
|
+
const L = (_e = this._renderManagerService.getRenderById(e.unitId)) == null ? void 0 : _e.with(xe);
|
|
2529
2400
|
if (L == null)
|
|
2530
2401
|
return;
|
|
2531
|
-
const B = r == null ? void 0 : r.findNodeByCoord(T, h, f,
|
|
2402
|
+
const B = r == null ? void 0 : r.findNodeByCoord(T, h, f, v, {
|
|
2532
2403
|
strict: !1,
|
|
2533
2404
|
segmentId: L.getSegment(),
|
|
2534
2405
|
segmentPage: L.getSegmentPage()
|
|
2535
2406
|
});
|
|
2536
2407
|
if (B) {
|
|
2537
|
-
const { node: pe, segmentPage:
|
|
2538
|
-
P = pe, A =
|
|
2408
|
+
const { node: pe, segmentPage: ht, segmentId: mt } = B;
|
|
2409
|
+
P = pe, A = ht, H = mt;
|
|
2539
2410
|
}
|
|
2540
2411
|
if (P == null)
|
|
2541
2412
|
return;
|
|
2542
|
-
const b = (
|
|
2413
|
+
const b = (Se = P.parent) == null ? void 0 : Se.parent, R = b == null ? void 0 : b.parent, V = (ce = R == null ? void 0 : R.lines.find((pe) => pe.paragraphIndex === (b == null ? void 0 : b.paragraphIndex) && pe.paragraphStart)) != null ? ce : R == null ? void 0 : R.lines[0], F = (Oe = R == null ? void 0 : R.parent) == null ? void 0 : Oe.parent;
|
|
2543
2414
|
if (b == null || R == null || V == null || F == null)
|
|
2544
2415
|
return;
|
|
2545
2416
|
this._liquid.reset();
|
|
2546
2417
|
const K = F.type;
|
|
2547
2418
|
for (const pe of o) {
|
|
2548
|
-
const { headerId:
|
|
2419
|
+
const { headerId: ht, footerId: mt, pageHeight: Un, pageWidth: Ct, marginLeft: Nt, marginBottom: Bn } = pe, Fn = o.indexOf(pe);
|
|
2549
2420
|
if (A > -1 && Fn === A) {
|
|
2550
2421
|
switch (K) {
|
|
2551
2422
|
case Ft.HEADER: {
|
|
2552
|
-
const
|
|
2553
|
-
if (
|
|
2423
|
+
const je = (ye = c.get(ht)) == null ? void 0 : ye.get(Ct);
|
|
2424
|
+
if (je)
|
|
2554
2425
|
this._liquid.translatePagePadding({
|
|
2555
|
-
marginTop:
|
|
2426
|
+
marginTop: je.marginTop,
|
|
2556
2427
|
marginLeft: Nt
|
|
2557
2428
|
});
|
|
2558
2429
|
else
|
|
@@ -2560,10 +2431,10 @@ let lt = class extends Ue {
|
|
|
2560
2431
|
break;
|
|
2561
2432
|
}
|
|
2562
2433
|
case Ft.FOOTER: {
|
|
2563
|
-
const
|
|
2564
|
-
if (
|
|
2434
|
+
const je = (Ne = d.get(mt)) == null ? void 0 : Ne.get(Ct);
|
|
2435
|
+
if (je)
|
|
2565
2436
|
this._liquid.translatePagePadding({
|
|
2566
|
-
marginTop: Un - Bn +
|
|
2437
|
+
marginTop: Un - Bn + je.marginTop,
|
|
2567
2438
|
marginLeft: Nt
|
|
2568
2439
|
});
|
|
2569
2440
|
else
|
|
@@ -2575,18 +2446,18 @@ let lt = class extends Ue {
|
|
|
2575
2446
|
}
|
|
2576
2447
|
if (this._liquid.translatePagePadding(pe), pe === F)
|
|
2577
2448
|
break;
|
|
2578
|
-
this._liquid.restorePagePadding(pe), this._liquid.translatePage(pe, h, f,
|
|
2449
|
+
this._liquid.restorePagePadding(pe), this._liquid.translatePage(pe, h, f, v);
|
|
2579
2450
|
}
|
|
2580
|
-
switch (E.relativeFrom ===
|
|
2451
|
+
switch (E.relativeFrom === W.LINE ? P = b.divides[0].glyphGroup[0] : P = (le = (de = (Te = (Ee = V.divides) == null ? void 0 : Ee[0]) == null ? void 0 : Te.glyphGroup) == null ? void 0 : de[0]) != null ? le : P, _.positionH = {
|
|
2581
2452
|
relativeFrom: U.relativeFrom,
|
|
2582
|
-
posOffset:
|
|
2453
|
+
posOffset: O - this._liquid.x - p
|
|
2583
2454
|
}, U.relativeFrom) {
|
|
2584
2455
|
case J.MARGIN: {
|
|
2585
|
-
_.positionH.posOffset =
|
|
2456
|
+
_.positionH.posOffset = O - this._liquid.x - p - F.marginLeft;
|
|
2586
2457
|
break;
|
|
2587
2458
|
}
|
|
2588
2459
|
case J.COLUMN: {
|
|
2589
|
-
_.positionH.posOffset =
|
|
2460
|
+
_.positionH.posOffset = O - this._liquid.x - p - R.left;
|
|
2590
2461
|
break;
|
|
2591
2462
|
}
|
|
2592
2463
|
}
|
|
@@ -2594,30 +2465,30 @@ let lt = class extends Ue {
|
|
|
2594
2465
|
relativeFrom: E.relativeFrom,
|
|
2595
2466
|
posOffset: D - this._liquid.y - w
|
|
2596
2467
|
}, E.relativeFrom) {
|
|
2597
|
-
case
|
|
2468
|
+
case W.PAGE: {
|
|
2598
2469
|
_.positionV.posOffset = D - this._liquid.y - w - F.marginTop;
|
|
2599
2470
|
break;
|
|
2600
2471
|
}
|
|
2601
|
-
case
|
|
2472
|
+
case W.LINE: {
|
|
2602
2473
|
_.positionV.posOffset = D - this._liquid.y - w - b.top;
|
|
2603
2474
|
break;
|
|
2604
2475
|
}
|
|
2605
|
-
case
|
|
2476
|
+
case W.PARAGRAPH: {
|
|
2606
2477
|
_.positionV.posOffset = D - this._liquid.y - w - V.top;
|
|
2607
2478
|
break;
|
|
2608
2479
|
}
|
|
2609
2480
|
}
|
|
2610
2481
|
if (P == null)
|
|
2611
2482
|
return;
|
|
2612
|
-
const
|
|
2613
|
-
if (
|
|
2483
|
+
const oe = r == null ? void 0 : r.findPositionByGlyph(P, A), Be = this._getDocObject();
|
|
2484
|
+
if (oe == null || r == null || Be == null || Yt(oe))
|
|
2614
2485
|
return;
|
|
2615
|
-
const
|
|
2616
|
-
...
|
|
2617
|
-
isBack:
|
|
2618
|
-
}, Ge =
|
|
2619
|
-
if (
|
|
2620
|
-
return { offset:
|
|
2486
|
+
const Ce = {
|
|
2487
|
+
...oe,
|
|
2488
|
+
isBack: G
|
|
2489
|
+
}, Ge = Be.document.getOffsetConfig(), ae = new kt(Ge, r), { cursorList: ne } = ae.getRangePointData(Ce, Ce), { startOffset: ie } = (Re = Wt(ne)) != null ? Re : {};
|
|
2490
|
+
if (ie != null)
|
|
2491
|
+
return { offset: ie, docTransform: _, segmentId: H, segmentPage: A };
|
|
2621
2492
|
}
|
|
2622
2493
|
// Update drawing when use transformer to resize it.
|
|
2623
2494
|
_updateDrawingSize(e, t) {
|
|
@@ -2635,7 +2506,7 @@ let lt = class extends Ue {
|
|
|
2635
2506
|
drawingId: r.drawingId,
|
|
2636
2507
|
key: "angle",
|
|
2637
2508
|
value: u
|
|
2638
|
-
}), n.length > 0 && d && a && this._commandService.executeCommand(
|
|
2509
|
+
}), n.length > 0 && d && a && this._commandService.executeCommand(Ke.id, {
|
|
2639
2510
|
unitId: d,
|
|
2640
2511
|
subUnitId: a,
|
|
2641
2512
|
drawings: n
|
|
@@ -2657,7 +2528,7 @@ let lt = class extends Ue {
|
|
|
2657
2528
|
// Limit the drawing to the page area, mainly in the vertical direction,
|
|
2658
2529
|
// and the upper and lower limits cannot exceed the page margin area.
|
|
2659
2530
|
_limitDrawingInPage(e, t) {
|
|
2660
|
-
const n = this._renderManagerService.getRenderById(e.unitId), { left: r, top: s, width: o, height: c, angle: d } = t, a = n == null ? void 0 : n.with(
|
|
2531
|
+
const n = this._renderManagerService.getRenderById(e.unitId), { left: r, top: s, width: o, height: c, angle: d } = t, a = n == null ? void 0 : n.with(te).getSkeleton(), l = a == null ? void 0 : a.getSkeletonData(), { pages: g } = l != null ? l : {};
|
|
2661
2532
|
if (l == null || n == null || g == null)
|
|
2662
2533
|
return {
|
|
2663
2534
|
left: r,
|
|
@@ -2666,34 +2537,34 @@ let lt = class extends Ue {
|
|
|
2666
2537
|
height: c,
|
|
2667
2538
|
angle: d
|
|
2668
2539
|
};
|
|
2669
|
-
const { mainComponent: u } = n, h = u, { top: f, pageLayoutType:
|
|
2670
|
-
let
|
|
2540
|
+
const { mainComponent: u } = n, h = u, { top: f, pageLayoutType: v, pageMarginLeft: p, pageMarginTop: w } = h;
|
|
2541
|
+
let O = s;
|
|
2671
2542
|
this._liquid.reset();
|
|
2672
2543
|
for (const D of g) {
|
|
2673
|
-
const { marginBottom:
|
|
2544
|
+
const { marginBottom: y, pageHeight: x } = D, M = g.indexOf(D), E = g[M + 1];
|
|
2674
2545
|
if (E == null)
|
|
2675
2546
|
continue;
|
|
2676
|
-
if (
|
|
2547
|
+
if (be.hasIntersectionBetweenTwoRanges(
|
|
2677
2548
|
s,
|
|
2678
2549
|
s + c,
|
|
2679
|
-
this._liquid.y + f +
|
|
2680
|
-
this._liquid.y + f +
|
|
2550
|
+
this._liquid.y + f + x - y,
|
|
2551
|
+
this._liquid.y + f + x + w + E.marginTop
|
|
2681
2552
|
)) {
|
|
2682
|
-
const N = s + c / 2, I = this._liquid.y + f +
|
|
2683
|
-
N < I ?
|
|
2553
|
+
const N = s + c / 2, I = this._liquid.y + f + x + w / 2;
|
|
2554
|
+
N < I ? O = Math.min(s, this._liquid.y + f + x - y - c) : O = Math.max(s, this._liquid.y + f + x + w + E.marginTop);
|
|
2684
2555
|
}
|
|
2685
|
-
this._liquid.translatePage(D,
|
|
2556
|
+
this._liquid.translatePage(D, v, p, w);
|
|
2686
2557
|
}
|
|
2687
2558
|
return {
|
|
2688
2559
|
left: r,
|
|
2689
|
-
top:
|
|
2560
|
+
top: O,
|
|
2690
2561
|
width: o,
|
|
2691
2562
|
height: c,
|
|
2692
2563
|
angle: d
|
|
2693
2564
|
};
|
|
2694
2565
|
}
|
|
2695
2566
|
_nonInlineDrawingTransform(e, t, n = !1) {
|
|
2696
|
-
const r = e.isMultiTransform ===
|
|
2567
|
+
const r = e.isMultiTransform === se.TRUE ? t : this._limitDrawingInPage(e, t);
|
|
2697
2568
|
if (n && r.top !== t.top)
|
|
2698
2569
|
return;
|
|
2699
2570
|
const s = this._getDrawingAnchor(e, r), { offset: o, docTransform: c, segmentId: d, segmentPage: a } = s != null ? s : {};
|
|
@@ -2717,7 +2588,7 @@ let lt = class extends Ue {
|
|
|
2717
2588
|
return { scene: n, transformer: r };
|
|
2718
2589
|
}
|
|
2719
2590
|
_getTransformCoordForDocumentOffset(e, t, n, r) {
|
|
2720
|
-
const { documentTransform: s } = e.getOffsetConfig(), o = t.transformVector2SceneCoord(
|
|
2591
|
+
const { documentTransform: s } = e.getOffsetConfig(), o = t.transformVector2SceneCoord(pi.FromArray([n, r]));
|
|
2721
2592
|
if (o)
|
|
2722
2593
|
return s.clone().invert().applyPoint(o);
|
|
2723
2594
|
}
|
|
@@ -2733,7 +2604,7 @@ let lt = class extends Ue {
|
|
|
2733
2604
|
this._anchorShape.transformByState({ left: h, top: f, height: u }), this._anchorShape.show();
|
|
2734
2605
|
return;
|
|
2735
2606
|
}
|
|
2736
|
-
const
|
|
2607
|
+
const v = 6, p = new vi(Mr + be.generateRandomId(v), {
|
|
2737
2608
|
left: h,
|
|
2738
2609
|
top: f,
|
|
2739
2610
|
height: u,
|
|
@@ -2741,13 +2612,13 @@ let lt = class extends Ue {
|
|
|
2741
2612
|
stroke: wi(Kn.darkGray, 1),
|
|
2742
2613
|
evented: !1
|
|
2743
2614
|
});
|
|
2744
|
-
this._anchorShape =
|
|
2615
|
+
this._anchorShape = p, s.addObject(p, Ai);
|
|
2745
2616
|
}
|
|
2746
2617
|
_getDocObject() {
|
|
2747
2618
|
return Pi(this._univerInstanceService, this._renderManagerService);
|
|
2748
2619
|
}
|
|
2749
2620
|
_getPageContentSize(e) {
|
|
2750
|
-
const t = this._renderManagerService.getRenderById(e.unitId), n = t == null ? void 0 : t.with(
|
|
2621
|
+
const t = this._renderManagerService.getRenderById(e.unitId), n = t == null ? void 0 : t.with(te).getSkeleton(), r = 500, s = 500, o = n == null ? void 0 : n.getSkeletonData();
|
|
2751
2622
|
if (o == null || t == null)
|
|
2752
2623
|
return {
|
|
2753
2624
|
width: r,
|
|
@@ -2775,25 +2646,25 @@ let lt = class extends Ue {
|
|
|
2775
2646
|
};
|
|
2776
2647
|
}
|
|
2777
2648
|
};
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
],
|
|
2784
|
-
var br = Object.getOwnPropertyDescriptor,
|
|
2649
|
+
dt = Tr([
|
|
2650
|
+
nt(0, j),
|
|
2651
|
+
nt(1, z),
|
|
2652
|
+
nt(2, me),
|
|
2653
|
+
nt(3, Q)
|
|
2654
|
+
], dt);
|
|
2655
|
+
var br = Object.getOwnPropertyDescriptor, xr = (i, e, t, n) => {
|
|
2785
2656
|
for (var r = n > 1 ? void 0 : n ? br(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
2786
2657
|
(o = i[s]) && (r = o(r) || r);
|
|
2787
2658
|
return r;
|
|
2788
|
-
},
|
|
2789
|
-
let
|
|
2659
|
+
}, ze = (i, e) => (t, n) => e(t, n, i);
|
|
2660
|
+
let lt = class extends Yn {
|
|
2790
2661
|
constructor(e, t, n, r, s) {
|
|
2791
2662
|
super();
|
|
2792
|
-
|
|
2663
|
+
Ie(this, "_initImagePopupMenu", /* @__PURE__ */ new Set());
|
|
2793
2664
|
this._drawingManagerService = e, this._canvasPopManagerService = t, this._renderManagerService = n, this._univerInstanceService = r, this._contextService = s, this._init();
|
|
2794
2665
|
}
|
|
2795
2666
|
_init() {
|
|
2796
|
-
this._univerInstanceService.getCurrentTypeOfUnit$(
|
|
2667
|
+
this._univerInstanceService.getCurrentTypeOfUnit$(we.UNIVER_DOC).pipe($t(this.dispose$)).subscribe((e) => this._create(e)), this._univerInstanceService.getTypeOfUnitDisposed$(we.UNIVER_DOC).pipe($t(this.dispose$)).subscribe((e) => this._dispose(e)), this._univerInstanceService.getAllUnitsForType(we.UNIVER_DOC).forEach((e) => this._create(e));
|
|
2797
2668
|
}
|
|
2798
2669
|
_dispose(e) {
|
|
2799
2670
|
const t = e.getUnitId();
|
|
@@ -2823,7 +2694,7 @@ let ut = class extends Yn {
|
|
|
2823
2694
|
return;
|
|
2824
2695
|
const r = [];
|
|
2825
2696
|
this.disposeWithMe(
|
|
2826
|
-
|
|
2697
|
+
De(
|
|
2827
2698
|
n.createControl$.subscribe(() => {
|
|
2828
2699
|
if (this._hasCropObject(t))
|
|
2829
2700
|
return;
|
|
@@ -2834,7 +2705,7 @@ let ut = class extends Yn {
|
|
|
2834
2705
|
if (!c)
|
|
2835
2706
|
return;
|
|
2836
2707
|
const d = c.oKey, a = this._drawingManagerService.getDrawingOKey(d);
|
|
2837
|
-
if (!a || a.drawingType ===
|
|
2708
|
+
if (!a || a.drawingType === Pe.DRAWING_DOM)
|
|
2838
2709
|
return;
|
|
2839
2710
|
const { unitId: l, subUnitId: g, drawingId: u, drawingType: h } = a, f = this._canvasPopManagerService.attachPopupToObject(
|
|
2840
2711
|
c,
|
|
@@ -2856,19 +2727,19 @@ let ut = class extends Yn {
|
|
|
2856
2727
|
})
|
|
2857
2728
|
)
|
|
2858
2729
|
), this.disposeWithMe(
|
|
2859
|
-
|
|
2730
|
+
De(
|
|
2860
2731
|
n.clearControl$.subscribe(() => {
|
|
2861
|
-
r.forEach((o) => o.dispose()), r.length = 0, this._contextService.setContextValue(
|
|
2732
|
+
r.forEach((o) => o.dispose()), r.length = 0, this._contextService.setContextValue(it, !1), this._drawingManagerService.focusDrawing(null);
|
|
2862
2733
|
})
|
|
2863
2734
|
)
|
|
2864
2735
|
), this.disposeWithMe(
|
|
2865
|
-
|
|
2736
|
+
De(
|
|
2866
2737
|
n.changing$.subscribe(() => {
|
|
2867
2738
|
r.forEach((o) => o.dispose()), r.length = 0;
|
|
2868
2739
|
})
|
|
2869
2740
|
)
|
|
2870
2741
|
), this.disposeWithMe(
|
|
2871
|
-
|
|
2742
|
+
De(
|
|
2872
2743
|
n.changeStart$.subscribe(() => {
|
|
2873
2744
|
r.forEach((o) => o.dispose()), r.length = 0;
|
|
2874
2745
|
})
|
|
@@ -2911,22 +2782,22 @@ let ut = class extends Yn {
|
|
|
2911
2782
|
];
|
|
2912
2783
|
}
|
|
2913
2784
|
};
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
],
|
|
2921
|
-
var
|
|
2922
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
2785
|
+
lt = xr([
|
|
2786
|
+
ze(0, me),
|
|
2787
|
+
ze(1, Z(Li)),
|
|
2788
|
+
ze(2, Q),
|
|
2789
|
+
ze(3, z),
|
|
2790
|
+
ze(4, Qt)
|
|
2791
|
+
], lt);
|
|
2792
|
+
var Cr = Object.getOwnPropertyDescriptor, Nr = (i, e, t, n) => {
|
|
2793
|
+
for (var r = n > 1 ? void 0 : n ? Cr(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
2923
2794
|
(o = i[s]) && (r = o(r) || r);
|
|
2924
2795
|
return r;
|
|
2925
|
-
},
|
|
2926
|
-
let St = class extends
|
|
2796
|
+
}, Ae = (i, e) => (t, n) => e(t, n, i);
|
|
2797
|
+
let St = class extends Le {
|
|
2927
2798
|
constructor(e, t, n, r, s, o, c, d) {
|
|
2928
2799
|
super();
|
|
2929
|
-
|
|
2800
|
+
Ie(this, "_liquid", new nn());
|
|
2930
2801
|
this._context = e, this._docSkeletonManagerService = t, this._commandService = n, this._editorService = r, this._drawingManagerService = s, this._docRefreshDrawingsService = o, this._univerInstanceService = c, this._lifecycleService = d, this._initialize(), this._commandExecutedListener();
|
|
2931
2802
|
}
|
|
2932
2803
|
_initialize() {
|
|
@@ -2950,7 +2821,7 @@ let St = class extends Ue {
|
|
|
2950
2821
|
const c = this._docSkeletonManagerService.getSkeleton();
|
|
2951
2822
|
if (c == null)
|
|
2952
2823
|
return;
|
|
2953
|
-
if (this._editorService.isEditor(s) && s !==
|
|
2824
|
+
if (this._editorService.isEditor(s) && s !== Ot) {
|
|
2954
2825
|
o == null || o.makeDirty();
|
|
2955
2826
|
return;
|
|
2956
2827
|
}
|
|
@@ -2972,16 +2843,16 @@ let St = class extends Ue {
|
|
|
2972
2843
|
);
|
|
2973
2844
|
}
|
|
2974
2845
|
_refreshDrawing(e) {
|
|
2975
|
-
var
|
|
2846
|
+
var O, D;
|
|
2976
2847
|
const t = e == null ? void 0 : e.getSkeletonData(), { mainComponent: n, unitId: r } = this._context, s = n;
|
|
2977
2848
|
if (!t)
|
|
2978
2849
|
return;
|
|
2979
2850
|
const { left: o, top: c, pageLayoutType: d, pageMarginLeft: a, pageMarginTop: l } = s, { pages: g, skeHeaders: u, skeFooters: h } = t, f = {};
|
|
2980
2851
|
this._liquid.reset();
|
|
2981
|
-
for (let
|
|
2982
|
-
const M = g[
|
|
2852
|
+
for (let y = 0, x = g.length; y < x; y++) {
|
|
2853
|
+
const M = g[y], { headerId: E, footerId: U, pageWidth: N } = M;
|
|
2983
2854
|
if (E) {
|
|
2984
|
-
const I = (
|
|
2855
|
+
const I = (O = u.get(E)) == null ? void 0 : O.get(N);
|
|
2985
2856
|
I && this._calculateDrawingPosition(
|
|
2986
2857
|
r,
|
|
2987
2858
|
I,
|
|
@@ -3006,8 +2877,8 @@ let St = class extends Ue {
|
|
|
3006
2877
|
}
|
|
3007
2878
|
this._calculateDrawingPosition(r, M, o, c, f, M.marginTop, M.marginLeft), this._liquid.translatePage(M, d, a, l);
|
|
3008
2879
|
}
|
|
3009
|
-
const
|
|
3010
|
-
|
|
2880
|
+
const v = Object.values(f), p = v.filter((y) => !y.isMultiTransform), w = v.filter((y) => y.isMultiTransform);
|
|
2881
|
+
p.length > 0 && this._drawingManagerService.refreshTransform(p), this._handleMultiDrawingsTransform(w);
|
|
3011
2882
|
}
|
|
3012
2883
|
_handleMultiDrawingsTransform(e) {
|
|
3013
2884
|
const { scene: t, unitId: n } = this._context, r = t.getTransformerByCreate();
|
|
@@ -3015,7 +2886,7 @@ let St = class extends Ue {
|
|
|
3015
2886
|
const a = this._drawingManagerService.getDrawingByParam(d);
|
|
3016
2887
|
a != null && (a.transform = d.transform, a.transforms = d.transforms, a.isMultiTransform = d.isMultiTransform);
|
|
3017
2888
|
});
|
|
3018
|
-
const o = [...r.getSelectedObjectMap().keys()], c = Object.values(this._drawingManagerService.getDrawingData(n, n)).filter((d) => d.isMultiTransform ===
|
|
2889
|
+
const o = [...r.getSelectedObjectMap().keys()], c = Object.values(this._drawingManagerService.getDrawingData(n, n)).filter((d) => d.isMultiTransform === se.TRUE);
|
|
3019
2890
|
this._drawingManagerService.removeNotification(c), e.length > 0 && this._drawingManagerService.addNotification(e);
|
|
3020
2891
|
for (const d of o) {
|
|
3021
2892
|
const a = t.getObject(d);
|
|
@@ -3028,22 +2899,22 @@ let St = class extends Ue {
|
|
|
3028
2899
|
marginTop: o,
|
|
3029
2900
|
marginLeft: c
|
|
3030
2901
|
}), d.forEach((a) => {
|
|
3031
|
-
const { aLeft: l, aTop: g, height: u, width: h, angle: f, drawingId:
|
|
2902
|
+
const { aLeft: l, aTop: g, height: u, width: h, angle: f, drawingId: v, drawingOrigin: p } = a, w = p.layoutType === k.WRAP_NONE && p.behindDoc === se.TRUE, { isMultiTransform: O = se.FALSE } = p, D = {
|
|
3032
2903
|
left: l + n + this._liquid.x,
|
|
3033
2904
|
top: g + r + this._liquid.y,
|
|
3034
2905
|
width: h,
|
|
3035
2906
|
height: u,
|
|
3036
2907
|
angle: f
|
|
3037
2908
|
};
|
|
3038
|
-
s[
|
|
2909
|
+
s[v] == null ? s[v] = {
|
|
3039
2910
|
unitId: e,
|
|
3040
2911
|
subUnitId: e,
|
|
3041
|
-
drawingId:
|
|
2912
|
+
drawingId: v,
|
|
3042
2913
|
behindText: w,
|
|
3043
2914
|
transform: D,
|
|
3044
2915
|
transforms: [D],
|
|
3045
|
-
isMultiTransform:
|
|
3046
|
-
} :
|
|
2916
|
+
isMultiTransform: O
|
|
2917
|
+
} : O === se.TRUE && s[v].transforms.push(D);
|
|
3047
2918
|
}), this._liquid.restorePagePadding({
|
|
3048
2919
|
marginTop: o,
|
|
3049
2920
|
marginLeft: c
|
|
@@ -3058,21 +2929,21 @@ let St = class extends Ue {
|
|
|
3058
2929
|
}
|
|
3059
2930
|
};
|
|
3060
2931
|
St = Nr([
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
2932
|
+
Ae(1, Z(te)),
|
|
2933
|
+
Ae(2, j),
|
|
2934
|
+
Ae(3, Ui),
|
|
2935
|
+
Ae(4, me),
|
|
2936
|
+
Ae(5, Z(ft)),
|
|
2937
|
+
Ae(6, z),
|
|
2938
|
+
Ae(7, Z(Zn))
|
|
3068
2939
|
], St);
|
|
3069
2940
|
var Er = Object.defineProperty, Rr = Object.getOwnPropertyDescriptor, Ar = (i, e, t) => e in i ? Er(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, Pr = (i, e, t, n) => {
|
|
3070
2941
|
for (var r = n > 1 ? void 0 : n ? Rr(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
3071
2942
|
(o = i[s]) && (r = o(r) || r);
|
|
3072
2943
|
return r;
|
|
3073
|
-
},
|
|
2944
|
+
}, It = (i, e) => (t, n) => e(t, n, i), Ln = (i, e, t) => Ar(i, typeof e != "symbol" ? e + "" : e, t);
|
|
3074
2945
|
const Lr = "DOC_DRAWING_UI_PLUGIN";
|
|
3075
|
-
let
|
|
2946
|
+
let ut = class extends ei {
|
|
3076
2947
|
constructor(i = Xt, e, t, n) {
|
|
3077
2948
|
super(), this._config = i, this._injector = e, this._renderManagerSrv = t, this._configService = n;
|
|
3078
2949
|
const { ...r } = ti(
|
|
@@ -3084,46 +2955,46 @@ let gt = class extends ei {
|
|
|
3084
2955
|
}
|
|
3085
2956
|
onStarting() {
|
|
3086
2957
|
[
|
|
3087
|
-
[
|
|
3088
|
-
[ut],
|
|
2958
|
+
[st],
|
|
3089
2959
|
[lt],
|
|
2960
|
+
[dt],
|
|
2961
|
+
[ot],
|
|
2962
|
+
[ft],
|
|
3090
2963
|
[at],
|
|
3091
|
-
[
|
|
3092
|
-
[ct],
|
|
3093
|
-
[dt]
|
|
2964
|
+
[ct]
|
|
3094
2965
|
].forEach((e) => this._injector.add(e));
|
|
3095
2966
|
}
|
|
3096
2967
|
onReady() {
|
|
3097
2968
|
[
|
|
3098
|
-
[
|
|
2969
|
+
[rt],
|
|
3099
2970
|
[St]
|
|
3100
|
-
].forEach((i) => this._renderManagerSrv.registerRenderModule(
|
|
2971
|
+
].forEach((i) => this._renderManagerSrv.registerRenderModule(we.UNIVER_DOC, i)), this._injector.get(ot), this._injector.get(st), this._injector.get(dt), this._injector.get(ct);
|
|
3101
2972
|
}
|
|
3102
2973
|
onRendered() {
|
|
3103
|
-
this._injector.get(
|
|
2974
|
+
this._injector.get(lt), this._injector.get(at);
|
|
3104
2975
|
}
|
|
3105
2976
|
};
|
|
3106
|
-
Ln(
|
|
3107
|
-
Ln(
|
|
3108
|
-
|
|
3109
|
-
Qn(hi, ci, ni,
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
],
|
|
2977
|
+
Ln(ut, "type", we.UNIVER_DOC);
|
|
2978
|
+
Ln(ut, "pluginName", Lr);
|
|
2979
|
+
ut = Pr([
|
|
2980
|
+
Qn(hi, ci, ni, Ci),
|
|
2981
|
+
It(1, Z(en)),
|
|
2982
|
+
It(2, Q),
|
|
2983
|
+
It(3, Jn)
|
|
2984
|
+
], ut);
|
|
3114
2985
|
export {
|
|
3115
2986
|
er as ClearDocDrawingTransformerOperation,
|
|
3116
2987
|
Rn as DOCS_IMAGE_MENU_ID,
|
|
3117
|
-
|
|
3118
|
-
|
|
2988
|
+
vn as DeleteDocDrawingsCommand,
|
|
2989
|
+
at as DocFloatDomController,
|
|
3119
2990
|
Nn as EditDocDrawingOperation,
|
|
3120
2991
|
wn as GroupDocDrawingCommand,
|
|
3121
|
-
|
|
2992
|
+
xt as InsertDocDrawingCommand,
|
|
3122
2993
|
Sn as InsertDocImageCommand,
|
|
3123
|
-
|
|
2994
|
+
Ye as MoveDocDrawingsCommand,
|
|
3124
2995
|
bt as RemoveDocDrawingCommand,
|
|
3125
2996
|
In as SetDocDrawingArrangeCommand,
|
|
3126
|
-
|
|
2997
|
+
Cn as SidebarDocDrawingOperation,
|
|
3127
2998
|
_n as UngroupDocDrawingCommand,
|
|
3128
|
-
|
|
2999
|
+
ut as UniverDocsDrawingUIPlugin
|
|
3129
3000
|
};
|