@univerjs/docs-drawing-ui 0.6.1-nightly.202502261607 → 0.6.2-nightly.202503031606
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +301 -306
- package/lib/umd/index.js +1 -1
- package/package.json +12 -13
package/lib/es/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var Ce = (i, e, n) =>
|
|
4
|
-
import { Disposable as Xe, UndoCommand as
|
|
1
|
+
var Ct = Object.defineProperty;
|
|
2
|
+
var Dt = (i, e, n) => e in i ? Ct(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n;
|
|
3
|
+
var Ce = (i, e, n) => Dt(i, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { Disposable as Xe, UndoCommand as Ot, RedoCommand as Tt, JSONX as q, IUniverInstanceService as K, ICommandService as z, PositionedObjectLayoutType as H, CommandType as Y, BooleanNumber as oe, ObjectRelativeFromH as ne, ObjectRelativeFromV as V, Tools as ye, TextX as vn, TextXActionType as Q, toDisposable as Le, throttle as Tn, COLORS as Pt, MemoryCursor as yt, IUndoRedoService as Vn, BuildTextUtils as bt, ArrangeTypeEnum as Ze, Inject as ve, IContextService as jn, LocaleService as ln, WrapTextType as $e, DrawingTypeEnum as Mt, FOCUSING_COMMON_DRAWINGS as tn, UniverInstanceType as be, Direction as fe, DocumentFlavor as fn, DOCS_ZEN_EDITOR_UNIT_ID_KEY as In, FOCUSING_UNIVER_EDITOR as Rt, RxDisposable as Nt, SHEET_EDITOR_UNITS as Et, LifecycleService as At, fromEventSubject as xt, LifecycleStages as Pn, DependentOn as Lt, Injector as Bt, IConfigService as Ut, Plugin as kt, merge as Ft } from "@univerjs/core";
|
|
5
5
|
import { IDocDrawingService as Be, UniverDocsDrawingPlugin as Ht } from "@univerjs/docs-drawing";
|
|
6
|
-
import { IDrawingManagerService as Ie, IImageIoService as Wt, DRAWING_IMAGE_ALLOW_IMAGE_LIST as Gt, DRAWING_IMAGE_COUNT_LIMIT as
|
|
6
|
+
import { IDrawingManagerService as Ie, IImageIoService as Wt, DRAWING_IMAGE_ALLOW_IMAGE_LIST as Gt, DRAWING_IMAGE_COUNT_LIMIT as yn, ImageUploadStatusType as hn, DRAWING_IMAGE_ALLOW_SIZE as Vt, getImageSize as jt, getDrawingShapeKeyByDrawingSearch as $t, DRAWING_IMAGE_WIDTH_LIMIT as bn, DRAWING_IMAGE_HEIGHT_LIMIT as Mn, UniverDrawingPlugin as zt } from "@univerjs/drawing";
|
|
7
7
|
import { DrawingCommonPanel as qt, ImageCropperObject as Xt, COMPONENT_IMAGE_POPUP_MENU as Kt, OpenImageCropOperation as Yt, ImageResetSizeOperation as Zt, UniverDrawingUIPlugin as Qt } from "@univerjs/drawing-ui";
|
|
8
|
-
import { IRenderManagerService as ee, DocumentEditArea as Fe, Liquid as
|
|
9
|
-
import { IMessageService as
|
|
10
|
-
import { RichTextEditingMutation as J, DocSkeletonManagerService as se, DocSelectionManagerService as
|
|
11
|
-
import { DocSelectionRenderService as Me, getRichTextEditPath as ze, NodePositionConvertToCursor as
|
|
12
|
-
import { BehaviorSubject as
|
|
13
|
-
import { MessageType as
|
|
8
|
+
import { IRenderManagerService as ee, DocumentEditArea as Fe, Liquid as $n, PageLayoutType as Rn, DocumentSkeletonPageType as Nn, Vector2 as Jt, Rect as ei, getColor as ni, getCurrentTypeOfRenderer as ti, TRANSFORM_CHANGE_OBSERVABLE_TYPE as ii } from "@univerjs/engine-render";
|
|
9
|
+
import { IMessageService as ri, ILocalFileService as oi, ISidebarService as si, useDependency as we, getMenuHiddenObservable as zn, MenuItemType as qn, RibbonStartGroup as ai, KeyCode as He, ComponentManager as ci, IMenuManagerService as di, IShortcutService as li, UniverUIPlugin as gi } from "@univerjs/ui";
|
|
10
|
+
import { RichTextEditingMutation as J, DocSkeletonManagerService as se, DocSelectionManagerService as _n } from "@univerjs/docs";
|
|
11
|
+
import { DocSelectionRenderService as Me, getRichTextEditPath as ze, NodePositionConvertToCursor as En, getOneTextSelectionRange as An, getAnchorBounding as mi, TEXT_RANGE_LAYER_INDEX as ui, getDocObject as fi, getCustomBlockIdsInSelections as hi, docDrawingPositionToTransform as pi, DocCanvasPopManagerService as wi, IEditorService as vi, SetDocZoomRatioOperation as Ii } from "@univerjs/docs-ui";
|
|
12
|
+
import { BehaviorSubject as _i, debounceTime as Xn, Observable as Si, takeUntil as xn, filter as Ln } from "rxjs";
|
|
13
|
+
import { MessageType as Bn, clsx as j, InputNumber as ke, Select as Un, Checkbox as Ci, RadioGroup as kn, Radio as Pe } from "@univerjs/design";
|
|
14
14
|
import { jsxs as X, jsx as f } from "react/jsx-runtime";
|
|
15
|
-
import { forwardRef as
|
|
16
|
-
const
|
|
17
|
-
var
|
|
18
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
15
|
+
import { forwardRef as Kn, useRef as Di, createElement as Yn, useState as re, useEffect as Sn } from "react";
|
|
16
|
+
const Oi = "docs-drawing-ui.config", Fn = {};
|
|
17
|
+
var Ti = Object.getOwnPropertyDescriptor, Pi = (i, e, n, t) => {
|
|
18
|
+
for (var r = t > 1 ? void 0 : t ? Ti(e, n) : e, o = i.length - 1, s; o >= 0; o--)
|
|
19
19
|
(s = i[o]) && (r = s(r) || r);
|
|
20
20
|
return r;
|
|
21
21
|
}, Ve = (i, e) => (n, t) => e(n, t, i);
|
|
22
|
-
function
|
|
22
|
+
function yi(i) {
|
|
23
23
|
var t, r, o, s;
|
|
24
24
|
if (q.isNoop(i) || !Array.isArray(i))
|
|
25
25
|
return null;
|
|
@@ -42,7 +42,7 @@ function Pi(i) {
|
|
|
42
42
|
});
|
|
43
43
|
return n;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function bi(i) {
|
|
46
46
|
if (!Array.isArray(i) || i.length < 3 || i[0] !== "drawingsOrder")
|
|
47
47
|
return [];
|
|
48
48
|
const e = [];
|
|
@@ -69,7 +69,7 @@ let rn = class extends Xe {
|
|
|
69
69
|
this._commandService.beforeCommandExecuted((i) => {
|
|
70
70
|
if (i.id !== J.id)
|
|
71
71
|
return;
|
|
72
|
-
const e = i.params, { unitId: n, actions: t } = e, r =
|
|
72
|
+
const e = i.params, { unitId: n, actions: t } = e, r = yi(t);
|
|
73
73
|
if (r != null)
|
|
74
74
|
for (const { type: o, drawingId: s, drawing: a } of r)
|
|
75
75
|
o === "add" ? this._addDrawings(n, [a]) : this._removeDrawings(n, [s]);
|
|
@@ -79,12 +79,12 @@ let rn = class extends Xe {
|
|
|
79
79
|
if (i.id !== J.id)
|
|
80
80
|
return;
|
|
81
81
|
const e = i.params, { unitId: n, actions: t } = e;
|
|
82
|
-
|
|
82
|
+
bi(t).length > 0 && this._updateDrawingsOrder(n);
|
|
83
83
|
})
|
|
84
84
|
), this.disposeWithMe(
|
|
85
85
|
this._commandService.onCommandExecuted((i) => {
|
|
86
86
|
var s;
|
|
87
|
-
if (i.id !==
|
|
87
|
+
if (i.id !== Ot.id && i.id !== Tt.id)
|
|
88
88
|
return;
|
|
89
89
|
const e = (s = this._univerInstanceService.getCurrentUniverDocInstance()) == null ? void 0 : s.getUnitId(), n = this._drawingManagerService.getFocusDrawings();
|
|
90
90
|
if (e == null || n.length === 0)
|
|
@@ -125,8 +125,8 @@ let rn = class extends Xe {
|
|
|
125
125
|
t.orderNotification(o), r.orderNotification(o);
|
|
126
126
|
}
|
|
127
127
|
};
|
|
128
|
-
rn =
|
|
129
|
-
Ve(0,
|
|
128
|
+
rn = Pi([
|
|
129
|
+
Ve(0, K),
|
|
130
130
|
Ve(1, z),
|
|
131
131
|
Ve(2, Ie),
|
|
132
132
|
Ve(3, Be),
|
|
@@ -134,7 +134,7 @@ rn = Ti([
|
|
|
134
134
|
], rn);
|
|
135
135
|
class gn {
|
|
136
136
|
constructor() {
|
|
137
|
-
Ce(this, "_refreshDrawings$", new
|
|
137
|
+
Ce(this, "_refreshDrawings$", new _i(null));
|
|
138
138
|
Ce(this, "refreshDrawings$", this._refreshDrawings$.asObservable());
|
|
139
139
|
}
|
|
140
140
|
refreshDrawings(e) {
|
|
@@ -142,14 +142,14 @@ class gn {
|
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
var ue = /* @__PURE__ */ ((i) => (i.INLINE = "inline", i.BEHIND_TEXT = "behindText", i.IN_FRONT_OF_TEXT = "inFrontOfText", i.WRAP_SQUARE = "wrapSquare", i.WRAP_TOP_AND_BOTTOM = "wrapTopAndBottom", i))(ue || {});
|
|
145
|
-
const
|
|
145
|
+
const Mi = {
|
|
146
146
|
inline: H.INLINE,
|
|
147
147
|
wrapSquare: H.WRAP_SQUARE,
|
|
148
148
|
wrapTopAndBottom: H.WRAP_TOP_AND_BOTTOM,
|
|
149
149
|
inFrontOfText: H.WRAP_NONE,
|
|
150
150
|
behindText: H.WRAP_NONE
|
|
151
151
|
};
|
|
152
|
-
function
|
|
152
|
+
function Zn(i, e, n, t, r, o, s) {
|
|
153
153
|
var p, h;
|
|
154
154
|
const a = new vn(), d = q.getInstance(), c = [], l = o.getSelfOrHeaderFooterModel(e).getBody(), m = o.getSelfOrHeaderFooterModel(i).getBody();
|
|
155
155
|
if (l == null || m == null)
|
|
@@ -158,10 +158,10 @@ function Yn(i, e, n, t, r, o, s) {
|
|
|
158
158
|
if (g != null) {
|
|
159
159
|
if (t = Math.min(m.dataStream.length - 2, t), i === e) {
|
|
160
160
|
if (t < g ? (t > 0 && a.push({
|
|
161
|
-
t:
|
|
161
|
+
t: Q.RETAIN,
|
|
162
162
|
len: t
|
|
163
163
|
}), a.push({
|
|
164
|
-
t:
|
|
164
|
+
t: Q.INSERT,
|
|
165
165
|
body: {
|
|
166
166
|
dataStream: "\b",
|
|
167
167
|
customBlocks: [{
|
|
@@ -171,22 +171,22 @@ function Yn(i, e, n, t, r, o, s) {
|
|
|
171
171
|
},
|
|
172
172
|
len: 1
|
|
173
173
|
}), a.push({
|
|
174
|
-
t:
|
|
174
|
+
t: Q.RETAIN,
|
|
175
175
|
len: g - t
|
|
176
176
|
}), a.push({
|
|
177
|
-
t:
|
|
177
|
+
t: Q.DELETE,
|
|
178
178
|
len: 1
|
|
179
179
|
})) : (g > 0 && a.push({
|
|
180
|
-
t:
|
|
180
|
+
t: Q.RETAIN,
|
|
181
181
|
len: g
|
|
182
182
|
}), a.push({
|
|
183
|
-
t:
|
|
183
|
+
t: Q.DELETE,
|
|
184
184
|
len: 1
|
|
185
185
|
}), t - g - 1 > 0 && a.push({
|
|
186
|
-
t:
|
|
186
|
+
t: Q.RETAIN,
|
|
187
187
|
len: t - g - 1
|
|
188
188
|
}), a.push({
|
|
189
|
-
t:
|
|
189
|
+
t: Q.INSERT,
|
|
190
190
|
body: {
|
|
191
191
|
dataStream: "\b",
|
|
192
192
|
customBlocks: [{
|
|
@@ -201,18 +201,18 @@ function Yn(i, e, n, t, r, o, s) {
|
|
|
201
201
|
}
|
|
202
202
|
} else {
|
|
203
203
|
g > 0 && a.push({
|
|
204
|
-
t:
|
|
204
|
+
t: Q.RETAIN,
|
|
205
205
|
len: g
|
|
206
206
|
}), a.push({
|
|
207
|
-
t:
|
|
207
|
+
t: Q.DELETE,
|
|
208
208
|
len: 1
|
|
209
209
|
});
|
|
210
210
|
let v = ze(o, e), w = d.editOp(a.serialize(), v);
|
|
211
211
|
c.push(w), a.empty(), t > 0 && a.push({
|
|
212
|
-
t:
|
|
212
|
+
t: Q.RETAIN,
|
|
213
213
|
len: t
|
|
214
214
|
}), a.push({
|
|
215
|
-
t:
|
|
215
|
+
t: Q.INSERT,
|
|
216
216
|
body: {
|
|
217
217
|
dataStream: "\b",
|
|
218
218
|
customBlocks: [{
|
|
@@ -226,20 +226,20 @@ function Yn(i, e, n, t, r, o, s) {
|
|
|
226
226
|
return c;
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
|
-
const
|
|
229
|
+
const Qn = {
|
|
230
230
|
id: "doc.command.update-doc-drawing-wrapping-style",
|
|
231
|
-
type:
|
|
231
|
+
type: Y.COMMAND,
|
|
232
232
|
// eslint-disable-next-line max-lines-per-function, complexity
|
|
233
233
|
handler: (i, e) => {
|
|
234
234
|
var E, U;
|
|
235
235
|
if (e == null)
|
|
236
236
|
return !1;
|
|
237
|
-
const { drawings: n, wrappingStyle: t, unitId: r } = e, o = i.get(z), s = i.get(
|
|
237
|
+
const { drawings: n, wrappingStyle: t, unitId: r } = e, o = i.get(z), s = i.get(K), d = i.get(ee).getRenderById(r), c = d == null ? void 0 : d.with(se).getSkeleton().getSkeletonData(), l = d == null ? void 0 : d.with(se).getViewModel(), m = d == null ? void 0 : d.scene, g = s.getCurrentUniverDocInstance();
|
|
238
238
|
if (g == null || c == null || m == null || l == null)
|
|
239
239
|
return !1;
|
|
240
240
|
const p = l.getEditArea(), h = m.getTransformerByCreate(), { pages: v, skeHeaders: w, skeFooters: S } = c, O = q.getInstance(), D = [], { drawings: T = {} } = g.getSnapshot();
|
|
241
241
|
for (const N of n) {
|
|
242
|
-
const { drawingId: I } = N, L = T[I].layoutType, W =
|
|
242
|
+
const { drawingId: I } = N, L = T[I].layoutType, W = Mi[t];
|
|
243
243
|
if (L !== W) {
|
|
244
244
|
const C = O.replaceOp(["drawings", I, "layoutType"], L, W);
|
|
245
245
|
D.push(C);
|
|
@@ -312,13 +312,13 @@ const Zn = {
|
|
|
312
312
|
const y = o.syncExecuteCommand(M.id, M.params);
|
|
313
313
|
return h.refreshControls(), !!y;
|
|
314
314
|
}
|
|
315
|
-
},
|
|
315
|
+
}, Jn = {
|
|
316
316
|
id: "doc.command.update-doc-drawing-distance",
|
|
317
|
-
type:
|
|
317
|
+
type: Y.COMMAND,
|
|
318
318
|
handler: (i, e) => {
|
|
319
319
|
if (e == null)
|
|
320
320
|
return !1;
|
|
321
|
-
const n = i.get(z), r = i.get(
|
|
321
|
+
const n = i.get(z), r = i.get(K).getCurrentUniverDocInstance();
|
|
322
322
|
if (r == null)
|
|
323
323
|
return !1;
|
|
324
324
|
const { drawings: o, dist: s, unitId: a } = e, d = q.getInstance(), c = [], { drawings: l = {} } = r.getSnapshot();
|
|
@@ -342,13 +342,13 @@ const Zn = {
|
|
|
342
342
|
};
|
|
343
343
|
return m.params.actions = c.reduce((p, h) => q.compose(p, h), null), !!n.syncExecuteCommand(m.id, m.params);
|
|
344
344
|
}
|
|
345
|
-
},
|
|
345
|
+
}, et = {
|
|
346
346
|
id: "doc.command.update-doc-drawing-wrap-text",
|
|
347
|
-
type:
|
|
347
|
+
type: Y.COMMAND,
|
|
348
348
|
handler: (i, e) => {
|
|
349
349
|
if (e == null)
|
|
350
350
|
return !1;
|
|
351
|
-
const n = i.get(z), r = i.get(
|
|
351
|
+
const n = i.get(z), r = i.get(K).getCurrentUniverDocInstance();
|
|
352
352
|
if (r == null)
|
|
353
353
|
return !1;
|
|
354
354
|
const { drawings: o, wrapText: s, unitId: a } = e, d = q.getInstance(), c = [], { drawings: l = {} } = r.getSnapshot();
|
|
@@ -371,11 +371,11 @@ const Zn = {
|
|
|
371
371
|
}
|
|
372
372
|
}, qe = {
|
|
373
373
|
id: "doc.command.update-drawing-doc-transform",
|
|
374
|
-
type:
|
|
374
|
+
type: Y.COMMAND,
|
|
375
375
|
handler: (i, e) => {
|
|
376
376
|
if (e == null)
|
|
377
377
|
return !1;
|
|
378
|
-
const n = i.get(z), t = i.get(
|
|
378
|
+
const n = i.get(z), t = i.get(K), o = i.get(ee).getRenderById(e.unitId), s = o == null ? void 0 : o.scene;
|
|
379
379
|
if (s == null)
|
|
380
380
|
return !1;
|
|
381
381
|
const a = s.getTransformerByCreate(), d = t.getCurrentUniverDocInstance();
|
|
@@ -402,9 +402,9 @@ const Zn = {
|
|
|
402
402
|
const v = n.syncExecuteCommand(h.id, h.params);
|
|
403
403
|
return a.refreshControls(), !!v;
|
|
404
404
|
}
|
|
405
|
-
},
|
|
405
|
+
}, nt = {
|
|
406
406
|
id: "doc.command.move-inline-drawing",
|
|
407
|
-
type:
|
|
407
|
+
type: Y.COMMAND,
|
|
408
408
|
handler: (i, e) => {
|
|
409
409
|
var U, N;
|
|
410
410
|
if (e == null)
|
|
@@ -412,13 +412,13 @@ const Zn = {
|
|
|
412
412
|
const n = i.get(ee), t = (U = n.getRenderById(e.unitId)) == null ? void 0 : U.with(Me), r = i.get(gn), o = n.getRenderById(e.unitId), s = o == null ? void 0 : o.scene, a = o == null ? void 0 : o.with(se).getSkeleton();
|
|
413
413
|
if (s == null || t == null)
|
|
414
414
|
return !1;
|
|
415
|
-
const d = s.getTransformerByCreate(), c = i.get(z), m = i.get(
|
|
415
|
+
const d = s.getTransformerByCreate(), c = i.get(z), m = i.get(K).getCurrentUniverDocInstance();
|
|
416
416
|
if (m == null)
|
|
417
417
|
return !1;
|
|
418
418
|
const { drawing: g, unitId: p, offset: h, segmentId: v, segmentPage: w, needRefreshDrawings: S } = e;
|
|
419
419
|
if (S)
|
|
420
420
|
return r.refreshDrawings(a), d.refreshControls(), !0;
|
|
421
|
-
const O = [], { drawingId: D } = g, T = (N = t.getSegment()) != null ? N : "", M =
|
|
421
|
+
const O = [], { drawingId: D } = g, T = (N = t.getSegment()) != null ? N : "", M = Zn(
|
|
422
422
|
v,
|
|
423
423
|
T,
|
|
424
424
|
w,
|
|
@@ -442,9 +442,9 @@ const Zn = {
|
|
|
442
442
|
const E = c.syncExecuteCommand(y.id, y.params);
|
|
443
443
|
return d.refreshControls(), !!E;
|
|
444
444
|
}
|
|
445
|
-
},
|
|
445
|
+
}, tt = {
|
|
446
446
|
id: "doc.command.transform-non-inline-drawing",
|
|
447
|
-
type:
|
|
447
|
+
type: Y.COMMAND,
|
|
448
448
|
// eslint-disable-next-line max-lines-per-function
|
|
449
449
|
handler: (i, e) => {
|
|
450
450
|
var x, G;
|
|
@@ -453,10 +453,10 @@ const Zn = {
|
|
|
453
453
|
const n = i.get(ee), t = (x = n.getRenderById(e.unitId)) == null ? void 0 : x.with(Me), r = n.getRenderById(e.unitId), o = r == null ? void 0 : r.scene;
|
|
454
454
|
if (o == null || t == null)
|
|
455
455
|
return !1;
|
|
456
|
-
const s = o.getTransformerByCreate(), a = i.get(z), c = i.get(
|
|
456
|
+
const s = o.getTransformerByCreate(), a = i.get(z), c = i.get(K).getCurrentUniverDocInstance();
|
|
457
457
|
if (c == null)
|
|
458
458
|
return !1;
|
|
459
|
-
const { drawing: l, unitId: m, offset: g, docTransform: p, segmentId: h, segmentPage: v } = e, w = [], { drawingId: S } = l, O = (G = t.getSegment()) != null ? G : "", D =
|
|
459
|
+
const { drawing: l, unitId: m, offset: g, docTransform: p, segmentId: h, segmentPage: v } = e, w = [], { drawingId: S } = l, O = (G = t.getSegment()) != null ? G : "", D = Zn(
|
|
460
460
|
h,
|
|
461
461
|
O,
|
|
462
462
|
v,
|
|
@@ -499,20 +499,20 @@ const Zn = {
|
|
|
499
499
|
return s.refreshControls(), !!W;
|
|
500
500
|
}
|
|
501
501
|
};
|
|
502
|
-
var
|
|
503
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
502
|
+
var Ri = Object.getOwnPropertyDescriptor, Ni = (i, e, n, t) => {
|
|
503
|
+
for (var r = t > 1 ? void 0 : t ? Ri(e, n) : e, o = i.length - 1, s; o >= 0; o--)
|
|
504
504
|
(s = i[o]) && (r = s(r) || r);
|
|
505
505
|
return r;
|
|
506
506
|
}, Qe = (i, e) => (n, t) => e(n, t, i);
|
|
507
|
-
const
|
|
508
|
-
function
|
|
507
|
+
const Ei = "__InlineDrawingAnchor__";
|
|
508
|
+
function Hn(i) {
|
|
509
509
|
const { path: e } = i;
|
|
510
510
|
return e.some((n) => n === "cells");
|
|
511
511
|
}
|
|
512
512
|
let on = class extends Xe {
|
|
513
513
|
constructor(e, n, t, r) {
|
|
514
514
|
super();
|
|
515
|
-
Ce(this, "_liquid", new
|
|
515
|
+
Ce(this, "_liquid", new $n());
|
|
516
516
|
Ce(this, "_listenerOnImageMap", /* @__PURE__ */ new Set());
|
|
517
517
|
// Use to cache the drawings is under transforming or scaling.
|
|
518
518
|
Ce(this, "_transformerCache", /* @__PURE__ */ new Map());
|
|
@@ -563,8 +563,8 @@ let on = class extends Xe {
|
|
|
563
563
|
})
|
|
564
564
|
)
|
|
565
565
|
);
|
|
566
|
-
const t =
|
|
567
|
-
|
|
566
|
+
const t = Tn(this._updateMultipleDrawingDocTransform.bind(this), 50);
|
|
567
|
+
Tn(this._nonInlineDrawingTransform.bind(this), 50), this.disposeWithMe(
|
|
568
568
|
Le(
|
|
569
569
|
n.changing$.subscribe((o) => {
|
|
570
570
|
const { objects: s, offsetX: a, offsetY: d } = o;
|
|
@@ -676,7 +676,7 @@ let on = class extends Xe {
|
|
|
676
676
|
if (r == null)
|
|
677
677
|
return;
|
|
678
678
|
const { mainComponent: s, scene: a } = r, d = s, c = a.getViewports()[0], {
|
|
679
|
-
pageLayoutType: l =
|
|
679
|
+
pageLayoutType: l = Rn.VERTICAL,
|
|
680
680
|
pageMarginLeft: m,
|
|
681
681
|
pageMarginTop: g
|
|
682
682
|
} = d.getOffsetConfig();
|
|
@@ -687,17 +687,11 @@ let on = class extends Xe {
|
|
|
687
687
|
const D = (x = this._renderManagerService.getRenderById(e.unitId)) == null ? void 0 : x.with(Me);
|
|
688
688
|
if (D == null)
|
|
689
689
|
return;
|
|
690
|
-
const T = o == null ? void 0 : o.findNodeByCoord(
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
{
|
|
696
|
-
strict: !1,
|
|
697
|
-
segmentId: D.getSegment(),
|
|
698
|
-
segmentPage: D.getSegmentPage()
|
|
699
|
-
}
|
|
700
|
-
);
|
|
690
|
+
const T = o == null ? void 0 : o.findNodeByCoord(O, l, m, g, {
|
|
691
|
+
strict: !1,
|
|
692
|
+
segmentId: D.getSegment(),
|
|
693
|
+
segmentPage: D.getSegmentPage()
|
|
694
|
+
});
|
|
701
695
|
if (T) {
|
|
702
696
|
const { node: _, ratioX: C, segmentPage: R, segmentId: P } = T;
|
|
703
697
|
h = C < S, p = _, v = R, w = P;
|
|
@@ -705,12 +699,12 @@ let on = class extends Xe {
|
|
|
705
699
|
if (p == null)
|
|
706
700
|
return;
|
|
707
701
|
const M = o == null ? void 0 : o.findPositionByGlyph(p, v), y = this._getDocObject();
|
|
708
|
-
if (M == null || o == null || y == null ||
|
|
702
|
+
if (M == null || o == null || y == null || Hn(M))
|
|
709
703
|
return;
|
|
710
704
|
const E = {
|
|
711
705
|
...M,
|
|
712
706
|
isBack: h
|
|
713
|
-
}, U = y.document.getOffsetConfig(), N = new
|
|
707
|
+
}, U = y.document.getOffsetConfig(), N = new En(U, o), { cursorList: I, contentBoxPointGroup: L } = N.getRangePointData(E, E), { startOffset: W } = (G = An(I)) != null ? G : {};
|
|
714
708
|
if (W != null)
|
|
715
709
|
return { offset: W, contentBoxPointGroup: L, segmentId: w, segmentPage: v };
|
|
716
710
|
}
|
|
@@ -720,7 +714,7 @@ let on = class extends Xe {
|
|
|
720
714
|
const t = this._renderManagerService.getRenderById(e.unitId), r = t == null ? void 0 : t.with(se).getSkeleton(), o = r == null ? void 0 : r.getSkeletonData();
|
|
721
715
|
if (o == null || t == null)
|
|
722
716
|
return;
|
|
723
|
-
const { pages: s, skeHeaders: a, skeFooters: d } = o, { mainComponent: c, scene: l } = t, m = c, g = l.getViewports()[0], { pageLayoutType: p =
|
|
717
|
+
const { pages: s, skeHeaders: a, skeFooters: d } = o, { mainComponent: c, scene: l } = t, m = c, g = l.getViewports()[0], { pageLayoutType: p = Rn.VERTICAL, pageMarginLeft: h, pageMarginTop: v, docsLeft: w, docsTop: S } = m.getOffsetConfig(), { left: O, top: D, angle: T } = n;
|
|
724
718
|
let { width: M, height: y } = n;
|
|
725
719
|
const { positionV: E, positionH: U } = e.docTransform, { width: N, height: I } = this._getPageContentSize(e);
|
|
726
720
|
M = Math.min(M, N), y = Math.min(y, I);
|
|
@@ -753,28 +747,28 @@ let on = class extends Xe {
|
|
|
753
747
|
if (b == null || A == null || $ == null || F == null)
|
|
754
748
|
return;
|
|
755
749
|
this._liquid.reset();
|
|
756
|
-
const
|
|
750
|
+
const Z = F.type;
|
|
757
751
|
for (const pe of s) {
|
|
758
|
-
const { headerId: mn, footerId: un, pageHeight:
|
|
759
|
-
if (x > -1 &&
|
|
760
|
-
switch (
|
|
761
|
-
case
|
|
762
|
-
const Ge = (Oe = a.get(mn)) == null ? void 0 : Oe.get(
|
|
752
|
+
const { headerId: mn, footerId: un, pageHeight: It, pageWidth: Dn, marginLeft: On, marginBottom: _t } = pe, St = s.indexOf(pe);
|
|
753
|
+
if (x > -1 && St === x) {
|
|
754
|
+
switch (Z) {
|
|
755
|
+
case Nn.HEADER: {
|
|
756
|
+
const Ge = (Oe = a.get(mn)) == null ? void 0 : Oe.get(Dn);
|
|
763
757
|
if (Ge)
|
|
764
758
|
this._liquid.translatePagePadding({
|
|
765
759
|
marginTop: Ge.marginTop,
|
|
766
|
-
marginLeft:
|
|
760
|
+
marginLeft: On
|
|
767
761
|
});
|
|
768
762
|
else
|
|
769
763
|
throw new Error("header skeleton not found");
|
|
770
764
|
break;
|
|
771
765
|
}
|
|
772
|
-
case
|
|
773
|
-
const Ge = (Ne = d.get(un)) == null ? void 0 : Ne.get(
|
|
766
|
+
case Nn.FOOTER: {
|
|
767
|
+
const Ge = (Ne = d.get(un)) == null ? void 0 : Ne.get(Dn);
|
|
774
768
|
if (Ge)
|
|
775
769
|
this._liquid.translatePagePadding({
|
|
776
|
-
marginTop:
|
|
777
|
-
marginLeft:
|
|
770
|
+
marginTop: It - _t + Ge.marginTop,
|
|
771
|
+
marginLeft: On
|
|
778
772
|
});
|
|
779
773
|
else
|
|
780
774
|
throw new Error("footer skeleton not found");
|
|
@@ -820,12 +814,12 @@ let on = class extends Xe {
|
|
|
820
814
|
if (L == null)
|
|
821
815
|
return;
|
|
822
816
|
const ae = r == null ? void 0 : r.findPositionByGlyph(L, x), Ue = this._getDocObject();
|
|
823
|
-
if (ae == null || r == null || Ue == null ||
|
|
817
|
+
if (ae == null || r == null || Ue == null || Hn(ae))
|
|
824
818
|
return;
|
|
825
819
|
const Re = {
|
|
826
820
|
...ae,
|
|
827
821
|
isBack: G
|
|
828
|
-
}, We = Ue.document.getOffsetConfig(), ce = new
|
|
822
|
+
}, We = Ue.document.getOffsetConfig(), ce = new En(We, r), { cursorList: te } = ce.getRangePointData(Re, Re), { startOffset: ie } = (Ae = An(te)) != null ? Ae : {};
|
|
829
823
|
if (ie != null)
|
|
830
824
|
return { offset: ie, docTransform: _, segmentId: W, segmentPage: x };
|
|
831
825
|
}
|
|
@@ -854,7 +848,7 @@ let on = class extends Xe {
|
|
|
854
848
|
// Update inline drawing when use transformer to move it.
|
|
855
849
|
_moveInlineDrawing(e, n, t) {
|
|
856
850
|
const r = this._getInlineDrawingAnchor(e, n, t), { offset: o, segmentId: s, segmentPage: a } = r != null ? r : {};
|
|
857
|
-
return this._commandService.executeCommand(
|
|
851
|
+
return this._commandService.executeCommand(nt.id, {
|
|
858
852
|
unitId: e.unitId,
|
|
859
853
|
subUnitId: e.unitId,
|
|
860
854
|
drawing: e,
|
|
@@ -907,7 +901,7 @@ let on = class extends Xe {
|
|
|
907
901
|
if (t && r.top !== n.top)
|
|
908
902
|
return;
|
|
909
903
|
const o = this._getDrawingAnchor(e, r), { offset: s, docTransform: a, segmentId: d, segmentPage: c } = o != null ? o : {};
|
|
910
|
-
return s == null || a == null ? this._updateMultipleDrawingDocTransform(/* @__PURE__ */ new Map([[e.drawingId, n]])) : this._commandService.executeCommand(
|
|
904
|
+
return s == null || a == null ? this._updateMultipleDrawingDocTransform(/* @__PURE__ */ new Map([[e.drawingId, n]])) : this._commandService.executeCommand(tt.id, {
|
|
911
905
|
unitId: e.unitId,
|
|
912
906
|
subUnitId: e.unitId,
|
|
913
907
|
drawing: e,
|
|
@@ -938,23 +932,23 @@ let on = class extends Xe {
|
|
|
938
932
|
const { mainComponent: r, scene: o } = t, s = r, {
|
|
939
933
|
docsLeft: a,
|
|
940
934
|
docsTop: d
|
|
941
|
-
} = s.getOffsetConfig(), c =
|
|
935
|
+
} = s.getOffsetConfig(), c = mi(n), { left: l, top: m, height: g } = c, p = l + a, h = m + d;
|
|
942
936
|
if (this._anchorShape) {
|
|
943
937
|
this._anchorShape.transformByState({ left: p, top: h, height: g }), this._anchorShape.show();
|
|
944
938
|
return;
|
|
945
939
|
}
|
|
946
|
-
const v = 6, w = new ei(
|
|
940
|
+
const v = 6, w = new ei(Ei + ye.generateRandomId(v), {
|
|
947
941
|
left: p,
|
|
948
942
|
top: h,
|
|
949
943
|
height: g,
|
|
950
944
|
strokeWidth: 2,
|
|
951
|
-
stroke: ni(
|
|
945
|
+
stroke: ni(Pt.darkGray, 1),
|
|
952
946
|
evented: !1
|
|
953
947
|
});
|
|
954
|
-
this._anchorShape = w, o.addObject(w,
|
|
948
|
+
this._anchorShape = w, o.addObject(w, ui);
|
|
955
949
|
}
|
|
956
950
|
_getDocObject() {
|
|
957
|
-
return
|
|
951
|
+
return fi(this._univerInstanceService, this._renderManagerService);
|
|
958
952
|
}
|
|
959
953
|
_getPageContentSize(e) {
|
|
960
954
|
const n = this._renderManagerService.getRenderById(e.unitId), t = n == null ? void 0 : n.with(se).getSkeleton(), r = 500, o = 500, s = t == null ? void 0 : t.getSkeletonData();
|
|
@@ -985,9 +979,9 @@ let on = class extends Xe {
|
|
|
985
979
|
};
|
|
986
980
|
}
|
|
987
981
|
};
|
|
988
|
-
on =
|
|
982
|
+
on = Ni([
|
|
989
983
|
Qe(0, z),
|
|
990
|
-
Qe(1,
|
|
984
|
+
Qe(1, K),
|
|
991
985
|
Qe(2, Ie),
|
|
992
986
|
Qe(3, ee)
|
|
993
987
|
], on);
|
|
@@ -999,23 +993,23 @@ var he = function() {
|
|
|
999
993
|
}
|
|
1000
994
|
return i;
|
|
1001
995
|
}, he.apply(this, arguments);
|
|
1002
|
-
},
|
|
996
|
+
}, Ai = function(i, e) {
|
|
1003
997
|
var n = {};
|
|
1004
998
|
for (var t in i) Object.prototype.hasOwnProperty.call(i, t) && e.indexOf(t) < 0 && (n[t] = i[t]);
|
|
1005
999
|
if (i != null && typeof Object.getOwnPropertySymbols == "function")
|
|
1006
1000
|
for (var r = 0, t = Object.getOwnPropertySymbols(i); r < t.length; r++)
|
|
1007
1001
|
e.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(i, t[r]) && (n[t[r]] = i[t[r]]);
|
|
1008
1002
|
return n;
|
|
1009
|
-
},
|
|
1010
|
-
var n = i.icon, t = i.id, r = i.className, o = i.extend, s =
|
|
1011
|
-
return
|
|
1003
|
+
}, it = Kn(function(i, e) {
|
|
1004
|
+
var n = i.icon, t = i.id, r = i.className, o = i.extend, s = Ai(i, ["icon", "id", "className", "extend"]), a = "univerjs-icon univerjs-icon-".concat(t, " ").concat(r || "").trim(), d = Di("_".concat(Bi()));
|
|
1005
|
+
return rt(n, "".concat(t), { defIds: n.defIds, idSuffix: d.current }, he({ ref: e, className: a }, s), o);
|
|
1012
1006
|
});
|
|
1013
|
-
function
|
|
1014
|
-
return
|
|
1015
|
-
return
|
|
1007
|
+
function rt(i, e, n, t, r) {
|
|
1008
|
+
return Yn(i.tag, he(he({ key: e }, xi(i, n, r)), t), (Li(i, n).children || []).map(function(o, s) {
|
|
1009
|
+
return rt(o, "".concat(e, "-").concat(i.tag, "-").concat(s), n, void 0, r);
|
|
1016
1010
|
}));
|
|
1017
1011
|
}
|
|
1018
|
-
function
|
|
1012
|
+
function xi(i, e, n) {
|
|
1019
1013
|
var t = he({}, i.attrs);
|
|
1020
1014
|
n != null && n.colorChannel1 && t.fill === "colorChannel1" && (t.fill = n.colorChannel1), i.tag === "mask" && t.id && (t.id = t.id + e.idSuffix), Object.entries(t).forEach(function(o) {
|
|
1021
1015
|
var s = o[0], a = o[1];
|
|
@@ -1027,34 +1021,34 @@ function Ai(i, e, n) {
|
|
|
1027
1021
|
typeof a == "string" && (t[s] = a.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
1028
1022
|
})), t;
|
|
1029
1023
|
}
|
|
1030
|
-
function
|
|
1024
|
+
function Li(i, e) {
|
|
1031
1025
|
var n, t = e.defIds;
|
|
1032
1026
|
return !t || t.length === 0 ? i : i.tag === "defs" && (!((n = i.children) === null || n === void 0) && n.length) ? he(he({}, i), { children: i.children.map(function(r) {
|
|
1033
1027
|
return typeof r.attrs.id == "string" && t && t.indexOf(r.attrs.id) > -1 ? he(he({}, r), { attrs: he(he({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
|
|
1034
1028
|
}) }) : i;
|
|
1035
1029
|
}
|
|
1036
|
-
function
|
|
1030
|
+
function Bi() {
|
|
1037
1031
|
return Math.random().toString(36).substring(2, 8);
|
|
1038
1032
|
}
|
|
1039
|
-
|
|
1040
|
-
var
|
|
1041
|
-
return
|
|
1033
|
+
it.displayName = "UniverIcon";
|
|
1034
|
+
var Ui = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M2.2498 3.65005C2.2498 2.87685 2.87661 2.25005 3.64981 2.25005H7.9998C8.33118 2.25005 8.5998 1.98142 8.5998 1.65005C8.5998 1.31868 8.33118 1.05005 7.9998 1.05005H3.64981C2.21387 1.05005 1.0498 2.21411 1.0498 3.65005V12.35C1.0498 13.786 2.21386 14.95 3.6498 14.95H12.3498C13.7857 14.95 14.9498 13.786 14.9498 12.3501V8.00005C14.9498 7.66868 14.6812 7.40005 14.3498 7.40005C14.0184 7.40005 13.7498 7.66868 13.7498 8.00005V9.23974L12.2385 8.1063C11.7252 7.72129 11.0068 7.7723 10.5531 8.22605L9.00869 9.77041L6.73916 7.8251C6.24387 7.40055 5.5095 7.41278 5.02864 7.85359L2.2498 10.4009V3.65005ZM2.2498 12.0287V12.35C2.2498 13.1232 2.87661 13.75 3.6498 13.75H12.3498C13.123 13.75 13.7498 13.1232 13.7498 12.3501V10.7397L11.5186 9.06631C11.4829 9.03956 11.433 9.04314 11.4016 9.07458L9.92249 10.5537L11.1015 11.5642C11.3531 11.7799 11.3822 12.1587 11.1666 12.4103C10.9509 12.6619 10.5721 12.691 10.3205 12.4753L5.9582 8.7362C5.92384 8.70674 5.87288 8.70758 5.83952 8.73816L2.2498 12.0287Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M11.8097 1.14783C12.1411 1.14783 12.4097 1.41646 12.4097 1.74783V3.297H14.1541C14.4855 3.297 14.7541 3.56563 14.7541 3.897C14.7541 4.22837 14.4855 4.497 14.1541 4.497H12.4097V6.24167C12.4097 6.57304 12.1411 6.84167 11.8097 6.84167C11.4783 6.84167 11.2097 6.57304 11.2097 6.24167V4.497H9.6603C9.32893 4.497 9.0603 4.22837 9.0603 3.897C9.0603 3.56563 9.32893 3.297 9.6603 3.297H11.2097V1.74783C11.2097 1.41646 11.4783 1.14783 11.8097 1.14783Z" } }] }, ot = Kn(function(i, e) {
|
|
1035
|
+
return Yn(it, Object.assign({}, i, {
|
|
1042
1036
|
id: "add-image-single",
|
|
1043
1037
|
ref: e,
|
|
1044
|
-
icon:
|
|
1038
|
+
icon: Ui
|
|
1045
1039
|
}));
|
|
1046
1040
|
});
|
|
1047
|
-
|
|
1048
|
-
const
|
|
1041
|
+
ot.displayName = "AddImageSingle";
|
|
1042
|
+
const Cn = {
|
|
1049
1043
|
id: "doc.command.remove-doc-image",
|
|
1050
|
-
type:
|
|
1044
|
+
type: Y.COMMAND,
|
|
1051
1045
|
// eslint-disable-next-line max-lines-per-function
|
|
1052
1046
|
handler: (i, e) => {
|
|
1053
1047
|
var M, y, E, U;
|
|
1054
|
-
const n = i.get(z), t = i.get(
|
|
1048
|
+
const n = i.get(z), t = i.get(K), r = i.get(ee), o = t.getCurrentUniverDocInstance();
|
|
1055
1049
|
if (e == null || o == null)
|
|
1056
1050
|
return !1;
|
|
1057
|
-
const s = r.getRenderById(e.unitId).with(Me), { drawings: a } = e, d = (M = s.getSegment()) != null ? M : "", c = new vn(), l = q.getInstance(), m = (E = (y = o.getSelfOrHeaderFooterModel(d).getBody()) == null ? void 0 : y.customBlocks) != null ? E : [], g = a.map((N) => m.find((I) => I.blockId === N.drawingId)).filter((N) => !!N).sort((N, I) => N.startIndex > I.startIndex ? 1 : -1), p = a[0].unitId, h = new
|
|
1051
|
+
const s = r.getRenderById(e.unitId).with(Me), { drawings: a } = e, d = (M = s.getSegment()) != null ? M : "", c = new vn(), l = q.getInstance(), m = (E = (y = o.getSelfOrHeaderFooterModel(d).getBody()) == null ? void 0 : y.customBlocks) != null ? E : [], g = a.map((N) => m.find((I) => I.blockId === N.drawingId)).filter((N) => !!N).sort((N, I) => N.startIndex > I.startIndex ? 1 : -1), p = a[0].unitId, h = new yt();
|
|
1058
1052
|
h.reset();
|
|
1059
1053
|
const v = g[0].startIndex, w = [
|
|
1060
1054
|
{
|
|
@@ -1072,10 +1066,10 @@ const Sn = {
|
|
|
1072
1066
|
for (const N of g) {
|
|
1073
1067
|
const { startIndex: I } = N;
|
|
1074
1068
|
I > h.cursor && c.push({
|
|
1075
|
-
t:
|
|
1069
|
+
t: Q.RETAIN,
|
|
1076
1070
|
len: I - h.cursor
|
|
1077
1071
|
}), c.push({
|
|
1078
|
-
t:
|
|
1072
|
+
t: Q.DELETE,
|
|
1079
1073
|
len: 1
|
|
1080
1074
|
}), h.moveCursorTo(I + 1);
|
|
1081
1075
|
}
|
|
@@ -1087,9 +1081,9 @@ const Sn = {
|
|
|
1087
1081
|
}
|
|
1088
1082
|
return S.params.actions = O.reduce((N, I) => q.compose(N, I), null), !!n.syncExecuteCommand(S.id, S.params);
|
|
1089
1083
|
}
|
|
1090
|
-
},
|
|
1084
|
+
}, st = {
|
|
1091
1085
|
id: "doc.command.delete-drawing",
|
|
1092
|
-
type:
|
|
1086
|
+
type: Y.COMMAND,
|
|
1093
1087
|
handler: (i) => {
|
|
1094
1088
|
const e = i.get(z), t = i.get(Be).getFocusDrawings();
|
|
1095
1089
|
if (t.length === 0)
|
|
@@ -1103,16 +1097,16 @@ const Sn = {
|
|
|
1103
1097
|
drawingType: l
|
|
1104
1098
|
};
|
|
1105
1099
|
});
|
|
1106
|
-
return e.executeCommand(
|
|
1100
|
+
return e.executeCommand(Cn.id, {
|
|
1107
1101
|
unitId: r,
|
|
1108
1102
|
drawings: o
|
|
1109
1103
|
});
|
|
1110
1104
|
}
|
|
1111
|
-
},
|
|
1105
|
+
}, at = {
|
|
1112
1106
|
id: "doc.command.group-doc-image",
|
|
1113
|
-
type:
|
|
1107
|
+
type: Y.COMMAND,
|
|
1114
1108
|
handler: (i, e) => {
|
|
1115
|
-
i.get(z), i.get(
|
|
1109
|
+
i.get(z), i.get(Vn);
|
|
1116
1110
|
const n = i.get(Be);
|
|
1117
1111
|
if (!e) return !1;
|
|
1118
1112
|
const t = [];
|
|
@@ -1124,15 +1118,15 @@ const Sn = {
|
|
|
1124
1118
|
const r = n.getGroupDrawingOp(e), { unitId: o, subUnitId: s, undo: a, redo: d, objects: c } = r;
|
|
1125
1119
|
return !1;
|
|
1126
1120
|
}
|
|
1127
|
-
},
|
|
1121
|
+
}, ct = {
|
|
1128
1122
|
id: "doc.command.insert-doc-image",
|
|
1129
|
-
type:
|
|
1123
|
+
type: Y.COMMAND,
|
|
1130
1124
|
// eslint-disable-next-line max-lines-per-function
|
|
1131
1125
|
handler: (i, e) => {
|
|
1132
1126
|
var y, E, U, N;
|
|
1133
1127
|
if (e == null)
|
|
1134
1128
|
return !1;
|
|
1135
|
-
const n = i.get(z), t = i.get(
|
|
1129
|
+
const n = i.get(z), t = i.get(_n), r = i.get(K), o = t.getActiveTextRange(), s = r.getCurrentUniverDocInstance();
|
|
1136
1130
|
if (o == null || s == null)
|
|
1137
1131
|
return !1;
|
|
1138
1132
|
const a = s.getUnitId(), { drawings: d } = e, { collapsed: c, startOffset: l, segmentId: m } = o, g = s.getSelfOrHeaderFooterModel(m).getBody();
|
|
@@ -1142,13 +1136,13 @@ const Sn = {
|
|
|
1142
1136
|
let S = 0;
|
|
1143
1137
|
if (c)
|
|
1144
1138
|
l > 0 && p.push({
|
|
1145
|
-
t:
|
|
1139
|
+
t: Q.RETAIN,
|
|
1146
1140
|
len: l
|
|
1147
1141
|
});
|
|
1148
1142
|
else {
|
|
1149
|
-
const I =
|
|
1143
|
+
const I = bt.selection.delete([o], g, 0, null, !1);
|
|
1150
1144
|
p.push(...I);
|
|
1151
|
-
const L =
|
|
1145
|
+
const L = hi(g, [o]), W = (U = s.getDrawings()) != null ? U : {}, x = (N = s.getDrawingsOrder()) != null ? N : [], G = L.sort((_, C) => x.indexOf(_) > x.indexOf(C) ? -1 : x.indexOf(_) < x.indexOf(C) ? 1 : 0);
|
|
1152
1146
|
if (G.length > 0)
|
|
1153
1147
|
for (const _ of G) {
|
|
1154
1148
|
const C = W[_], R = x.indexOf(_);
|
|
@@ -1159,7 +1153,7 @@ const Sn = {
|
|
|
1159
1153
|
}
|
|
1160
1154
|
}
|
|
1161
1155
|
p.push({
|
|
1162
|
-
t:
|
|
1156
|
+
t: Q.INSERT,
|
|
1163
1157
|
body: {
|
|
1164
1158
|
dataStream: "\b".repeat(d.length),
|
|
1165
1159
|
customBlocks: d.map((I, L) => ({
|
|
@@ -1185,9 +1179,9 @@ const Sn = {
|
|
|
1185
1179
|
};
|
|
1186
1180
|
return T.params.actions = v.reduce((I, L) => q.compose(I, L), null), !!n.syncExecuteCommand(T.id, T.params);
|
|
1187
1181
|
}
|
|
1188
|
-
},
|
|
1182
|
+
}, dt = {
|
|
1189
1183
|
id: "doc.command.set-drawing-arrange",
|
|
1190
|
-
type:
|
|
1184
|
+
type: Y.COMMAND,
|
|
1191
1185
|
handler: (i, e) => {
|
|
1192
1186
|
const n = i.get(z), t = i.get(Be);
|
|
1193
1187
|
if (e == null)
|
|
@@ -1212,11 +1206,11 @@ const Sn = {
|
|
|
1212
1206
|
};
|
|
1213
1207
|
return p.params.actions = m.reduce((v, w) => q.compose(v, w), null), !!n.syncExecuteCommand(p.id, p.params);
|
|
1214
1208
|
}
|
|
1215
|
-
},
|
|
1209
|
+
}, lt = {
|
|
1216
1210
|
id: "doc.command.ungroup-doc-image",
|
|
1217
|
-
type:
|
|
1211
|
+
type: Y.COMMAND,
|
|
1218
1212
|
handler: (i, e) => {
|
|
1219
|
-
i.get(z), i.get(
|
|
1213
|
+
i.get(z), i.get(Vn);
|
|
1220
1214
|
const n = i.get(Be);
|
|
1221
1215
|
if (!e) return !1;
|
|
1222
1216
|
const t = [];
|
|
@@ -1229,8 +1223,8 @@ const Sn = {
|
|
|
1229
1223
|
return !1;
|
|
1230
1224
|
}
|
|
1231
1225
|
};
|
|
1232
|
-
var
|
|
1233
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
1226
|
+
var ki = Object.getOwnPropertyDescriptor, Fi = (i, e, n, t) => {
|
|
1227
|
+
for (var r = t > 1 ? void 0 : t ? ki(e, n) : e, o = i.length - 1, s; o >= 0; o--)
|
|
1234
1228
|
(s = i[o]) && (r = s(r) || r);
|
|
1235
1229
|
return r;
|
|
1236
1230
|
}, me = (i, e) => (n, t) => e(n, t, i);
|
|
@@ -1243,9 +1237,9 @@ let sn = class extends Xe {
|
|
|
1243
1237
|
multiple: !0,
|
|
1244
1238
|
accept: Gt.map((n) => `.${n.replace("image/", "")}`).join(",")
|
|
1245
1239
|
}), e = i.length;
|
|
1246
|
-
return e >
|
|
1247
|
-
type:
|
|
1248
|
-
content: this._localeService.t("update-status.exceedMaxCount", String(
|
|
1240
|
+
return e > yn ? (this._messageService.show({
|
|
1241
|
+
type: Bn.Error,
|
|
1242
|
+
content: this._localeService.t("update-status.exceedMaxCount", String(yn))
|
|
1249
1243
|
}), !1) : e === 0 ? !1 : (await this._insertFloatImages(i), !0);
|
|
1250
1244
|
}
|
|
1251
1245
|
// eslint-disable-next-line max-lines-per-function
|
|
@@ -1268,7 +1262,7 @@ let sn = class extends Xe {
|
|
|
1268
1262
|
break;
|
|
1269
1263
|
}
|
|
1270
1264
|
this._messageService.show({
|
|
1271
|
-
type:
|
|
1265
|
+
type: Bn.Error,
|
|
1272
1266
|
content: s
|
|
1273
1267
|
});
|
|
1274
1268
|
}
|
|
@@ -1281,8 +1275,8 @@ let sn = class extends Xe {
|
|
|
1281
1275
|
const { imageId: o, imageSourceType: s, source: a, base64Cache: d } = r, { width: c, height: l, image: m } = await jt(d || "");
|
|
1282
1276
|
this._imageIoService.addImageSourceCache(o, s, m);
|
|
1283
1277
|
let g = 1;
|
|
1284
|
-
if (c >
|
|
1285
|
-
const w =
|
|
1278
|
+
if (c > bn || l > Mn) {
|
|
1279
|
+
const w = bn / c, S = Mn / l;
|
|
1286
1280
|
g = Math.min(w, S);
|
|
1287
1281
|
}
|
|
1288
1282
|
const p = this._getImagePosition(c * g, l * g);
|
|
@@ -1292,10 +1286,10 @@ let sn = class extends Xe {
|
|
|
1292
1286
|
unitId: n,
|
|
1293
1287
|
subUnitId: n,
|
|
1294
1288
|
drawingId: o,
|
|
1295
|
-
drawingType:
|
|
1289
|
+
drawingType: Mt.DRAWING_IMAGE,
|
|
1296
1290
|
imageSourceType: s,
|
|
1297
1291
|
source: a,
|
|
1298
|
-
transform:
|
|
1292
|
+
transform: pi(p),
|
|
1299
1293
|
docTransform: p,
|
|
1300
1294
|
behindDoc: oe.FALSE,
|
|
1301
1295
|
title: "",
|
|
@@ -1310,7 +1304,7 @@ let sn = class extends Xe {
|
|
|
1310
1304
|
};
|
|
1311
1305
|
this._isInsertInHeaderFooter() && (h.isMultiTransform = oe.TRUE, h.transforms = h.transform ? [h.transform] : null), t.push(h);
|
|
1312
1306
|
}
|
|
1313
|
-
this._commandService.executeCommand(
|
|
1307
|
+
this._commandService.executeCommand(ct.id, {
|
|
1314
1308
|
unitId: n,
|
|
1315
1309
|
drawings: t
|
|
1316
1310
|
});
|
|
@@ -1343,7 +1337,7 @@ let sn = class extends Xe {
|
|
|
1343
1337
|
_updateOrderListener() {
|
|
1344
1338
|
this._drawingManagerService.featurePluginOrderUpdate$.subscribe((i) => {
|
|
1345
1339
|
const { unitId: e, subUnitId: n, drawingIds: t, arrangeType: r } = i;
|
|
1346
|
-
this._commandService.executeCommand(
|
|
1340
|
+
this._commandService.executeCommand(dt.id, {
|
|
1347
1341
|
unitId: e,
|
|
1348
1342
|
subUnitId: n,
|
|
1349
1343
|
drawingIds: t,
|
|
@@ -1353,9 +1347,9 @@ let sn = class extends Xe {
|
|
|
1353
1347
|
}
|
|
1354
1348
|
_groupDrawingListener() {
|
|
1355
1349
|
this._drawingManagerService.featurePluginGroupUpdate$.subscribe((i) => {
|
|
1356
|
-
this._commandService.executeCommand(
|
|
1350
|
+
this._commandService.executeCommand(at.id, i);
|
|
1357
1351
|
}), this._drawingManagerService.featurePluginUngroupUpdate$.subscribe((i) => {
|
|
1358
|
-
this._commandService.executeCommand(
|
|
1352
|
+
this._commandService.executeCommand(lt.id, i);
|
|
1359
1353
|
});
|
|
1360
1354
|
}
|
|
1361
1355
|
_getCurrentSceneAndTransformer() {
|
|
@@ -1368,7 +1362,7 @@ let sn = class extends Xe {
|
|
|
1368
1362
|
_transformDrawingListener() {
|
|
1369
1363
|
const i = this._getCurrentSceneAndTransformer();
|
|
1370
1364
|
if (i && i.transformer)
|
|
1371
|
-
this.disposeWithMe(i.transformer.changeEnd$.pipe(
|
|
1365
|
+
this.disposeWithMe(i.transformer.changeEnd$.pipe(Xn(30)).subscribe((e) => {
|
|
1372
1366
|
this._docSelectionManagerService.refreshSelection();
|
|
1373
1367
|
}));
|
|
1374
1368
|
else
|
|
@@ -1450,32 +1444,33 @@ let sn = class extends Xe {
|
|
|
1450
1444
|
this._docSelectionManagerService.replaceDocRanges(t);
|
|
1451
1445
|
}
|
|
1452
1446
|
};
|
|
1453
|
-
sn =
|
|
1447
|
+
sn = Fi([
|
|
1454
1448
|
me(1, z),
|
|
1455
|
-
me(2, ve(
|
|
1449
|
+
me(2, ve(_n)),
|
|
1456
1450
|
me(3, ee),
|
|
1457
1451
|
me(4, Wt),
|
|
1458
1452
|
me(5, Be),
|
|
1459
1453
|
me(6, Ie),
|
|
1460
|
-
me(7,
|
|
1461
|
-
me(8,
|
|
1454
|
+
me(7, jn),
|
|
1455
|
+
me(8, ri),
|
|
1462
1456
|
me(9, ve(ln)),
|
|
1463
1457
|
me(10, ve(Me)),
|
|
1464
1458
|
me(11, ve(gn)),
|
|
1465
|
-
me(12,
|
|
1459
|
+
me(12, oi)
|
|
1466
1460
|
], sn);
|
|
1467
|
-
const
|
|
1461
|
+
const gt = {
|
|
1468
1462
|
id: "doc.command.insert-float-image",
|
|
1469
|
-
type:
|
|
1463
|
+
type: Y.COMMAND,
|
|
1470
1464
|
handler: (i) => {
|
|
1471
|
-
var
|
|
1472
|
-
|
|
1465
|
+
var t, r;
|
|
1466
|
+
const e = i.get(K), n = i.get(ee);
|
|
1467
|
+
return (r = (t = ti(be.UNIVER_DOC, e, n)) == null ? void 0 : t.with(sn).insertDocImage()) != null ? r : !1;
|
|
1473
1468
|
}
|
|
1474
1469
|
}, Ke = {
|
|
1475
1470
|
id: "doc.command.move-drawing",
|
|
1476
|
-
type:
|
|
1471
|
+
type: Y.COMMAND,
|
|
1477
1472
|
handler: (i, e) => {
|
|
1478
|
-
const n = i.get(z), t = i.get(Be), r = i.get(
|
|
1473
|
+
const n = i.get(z), t = i.get(Be), r = i.get(K), o = i.get(ee), { direction: s } = e, a = t.getFocusDrawings();
|
|
1479
1474
|
if (a.length === 0)
|
|
1480
1475
|
return !1;
|
|
1481
1476
|
const d = a[0].unitId, c = o.getRenderById(d), l = c == null ? void 0 : c.scene;
|
|
@@ -1502,9 +1497,9 @@ const lt = {
|
|
|
1502
1497
|
});
|
|
1503
1498
|
return m.refreshControls(), !!h;
|
|
1504
1499
|
}
|
|
1505
|
-
},
|
|
1500
|
+
}, Hi = {
|
|
1506
1501
|
id: "doc.operation.clear-drawing-transformer",
|
|
1507
|
-
type:
|
|
1502
|
+
type: Y.MUTATION,
|
|
1508
1503
|
handler: (i, e) => {
|
|
1509
1504
|
const n = i.get(ee);
|
|
1510
1505
|
return e.forEach((t) => {
|
|
@@ -1512,16 +1507,16 @@ const lt = {
|
|
|
1512
1507
|
(o = (r = n.getRenderById(t)) == null ? void 0 : r.scene.getTransformer()) == null || o.debounceRefreshControls();
|
|
1513
1508
|
}), !0;
|
|
1514
1509
|
}
|
|
1515
|
-
},
|
|
1510
|
+
}, mt = "COMPONENT_DOC_DRAWING_PANEL", ut = {
|
|
1516
1511
|
id: "sidebar.operation.doc-image",
|
|
1517
|
-
type:
|
|
1512
|
+
type: Y.COMMAND,
|
|
1518
1513
|
handler: async (i, e) => {
|
|
1519
|
-
const n = i.get(
|
|
1514
|
+
const n = i.get(si), t = i.get(ln), r = i.get(Ie);
|
|
1520
1515
|
switch (e.value) {
|
|
1521
1516
|
case "open":
|
|
1522
1517
|
n.open({
|
|
1523
1518
|
header: { title: t.t("docImage.panel.title") },
|
|
1524
|
-
children: { label:
|
|
1519
|
+
children: { label: mt },
|
|
1525
1520
|
onClose: () => {
|
|
1526
1521
|
r.focusDrawing(null);
|
|
1527
1522
|
},
|
|
@@ -1535,25 +1530,25 @@ const lt = {
|
|
|
1535
1530
|
}
|
|
1536
1531
|
return !0;
|
|
1537
1532
|
}
|
|
1538
|
-
},
|
|
1533
|
+
}, ft = {
|
|
1539
1534
|
id: "doc.operation.edit-doc-image",
|
|
1540
|
-
type:
|
|
1535
|
+
type: Y.OPERATION,
|
|
1541
1536
|
handler: (i, e) => {
|
|
1542
1537
|
const n = i.get(Ie), t = i.get(z);
|
|
1543
|
-
return e == null ? !1 : (n.focusDrawing([e]), t.executeCommand(
|
|
1544
|
-
}
|
|
1545
|
-
},
|
|
1546
|
-
imageCommonPanel:
|
|
1547
|
-
imageCommonPanelGrid:
|
|
1548
|
-
imageCommonPanelBorder:
|
|
1549
|
-
imageCommonPanelTitle:
|
|
1550
|
-
imageCommonPanelSubtitle:
|
|
1551
|
-
imageCommonPanelRow:
|
|
1552
|
-
imageCommonPanelColumn:
|
|
1553
|
-
imageCommonPanelSpan2:
|
|
1554
|
-
imageCommonPanelInput:
|
|
1555
|
-
},
|
|
1556
|
-
const e = we(z), n = we(ln), t = we(Ie), r = we(ee), o = we(
|
|
1538
|
+
return e == null ? !1 : (n.focusDrawing([e]), t.executeCommand(ut.id, { value: "open" }), !0);
|
|
1539
|
+
}
|
|
1540
|
+
}, Wi = "univer-image-common-panel", Gi = "univer-image-common-panel-grid", Vi = "univer-image-common-panel-border", ji = "univer-image-common-panel-title", $i = "univer-image-common-panel-subtitle", zi = "univer-image-common-panel-row", qi = "univer-image-common-panel-column", Xi = "univer-image-common-panel-span2", Ki = "univer-image-common-panel-input", u = {
|
|
1541
|
+
imageCommonPanel: Wi,
|
|
1542
|
+
imageCommonPanelGrid: Gi,
|
|
1543
|
+
imageCommonPanelBorder: Vi,
|
|
1544
|
+
imageCommonPanelTitle: ji,
|
|
1545
|
+
imageCommonPanelSubtitle: $i,
|
|
1546
|
+
imageCommonPanelRow: zi,
|
|
1547
|
+
imageCommonPanelColumn: qi,
|
|
1548
|
+
imageCommonPanelSpan2: Xi,
|
|
1549
|
+
imageCommonPanelInput: Ki
|
|
1550
|
+
}, Wn = -1e3, Gn = 1e3, Yi = (i) => {
|
|
1551
|
+
const e = we(z), n = we(ln), t = we(Ie), r = we(ee), o = we(K), { drawings: s } = i, a = s[0];
|
|
1557
1552
|
if (a == null)
|
|
1558
1553
|
return;
|
|
1559
1554
|
const { unitId: d } = a, c = o.getUniverDocInstance(d), l = c == null ? void 0 : c.getSnapshot().documentStyle.documentFlavor, m = r.getRenderById(d), g = m == null ? void 0 : m.scene;
|
|
@@ -1623,7 +1618,7 @@ const lt = {
|
|
|
1623
1618
|
return;
|
|
1624
1619
|
const b = k[0].drawingId, A = k[0].unitId;
|
|
1625
1620
|
let $ = null, F = 0;
|
|
1626
|
-
const
|
|
1621
|
+
const Z = (ie = r.getRenderById(A)) == null ? void 0 : ie.with(se).getSkeleton(), ae = Z == null ? void 0 : Z.getSkeletonData();
|
|
1627
1622
|
if (ae == null)
|
|
1628
1623
|
return;
|
|
1629
1624
|
const { pages: Ue, skeHeaders: Re, skeFooters: We } = ae;
|
|
@@ -1662,8 +1657,8 @@ const lt = {
|
|
|
1662
1657
|
const k = t.getFocusDrawings();
|
|
1663
1658
|
if (k.length === 0)
|
|
1664
1659
|
return;
|
|
1665
|
-
const { drawingId: b, unitId: A } = k[0], $ = o.getUniverDocInstance(A), F = (Oe = r.getRenderById(A)) == null ? void 0 : Oe.with(se).getSkeleton(),
|
|
1666
|
-
if (Re == null || F == null ||
|
|
1660
|
+
const { drawingId: b, unitId: A } = k[0], $ = o.getUniverDocInstance(A), F = (Oe = r.getRenderById(A)) == null ? void 0 : Oe.with(se).getSkeleton(), Z = (Ne = r.getRenderById(A)) == null ? void 0 : Ne.with(Me), ae = Z == null ? void 0 : Z.getSegment(), Ue = Z == null ? void 0 : Z.getSegmentPage(), Re = (Te = (Ee = $ == null ? void 0 : $.getSelfOrHeaderFooterModel(ae).getBody()) == null ? void 0 : Ee.customBlocks) == null ? void 0 : Te.find((Ae) => Ae.blockId === b);
|
|
1661
|
+
if (Re == null || F == null || Z == null)
|
|
1667
1662
|
return;
|
|
1668
1663
|
const { startIndex: We } = Re, ce = F.findNodeByCharIndex(We, ae, Ue), te = (le = ce == null ? void 0 : ce.parent) == null ? void 0 : le.parent, ie = te == null ? void 0 : te.parent, _e = ie == null ? void 0 : ie.lines.find((Ae) => Ae.paragraphIndex === (te == null ? void 0 : te.paragraphIndex) && Ae.paragraphStart), Se = (ge = ie == null ? void 0 : ie.parent) == null ? void 0 : ge.parent;
|
|
1669
1664
|
if (ce == null || te == null || _e == null || ie == null || Se == null)
|
|
@@ -1694,7 +1689,7 @@ const lt = {
|
|
|
1694
1689
|
function _(C) {
|
|
1695
1690
|
E(C), W(String(C ? V.PARAGRAPH : V.PAGE));
|
|
1696
1691
|
}
|
|
1697
|
-
return
|
|
1692
|
+
return Sn(() => {
|
|
1698
1693
|
G();
|
|
1699
1694
|
const C = t.focus$.subscribe((P) => {
|
|
1700
1695
|
if (P.length === 0) {
|
|
@@ -1717,8 +1712,8 @@ const lt = {
|
|
|
1717
1712
|
/* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ f(
|
|
1718
1713
|
ke,
|
|
1719
1714
|
{
|
|
1720
|
-
min:
|
|
1721
|
-
max:
|
|
1715
|
+
min: Wn,
|
|
1716
|
+
max: Gn,
|
|
1722
1717
|
precision: 1,
|
|
1723
1718
|
disabled: w,
|
|
1724
1719
|
value: O.posOffset,
|
|
@@ -1735,7 +1730,7 @@ const lt = {
|
|
|
1735
1730
|
/* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn, u.imageCommonPanelSpan2), children: /* @__PURE__ */ X("label", { children: [
|
|
1736
1731
|
/* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: n.t("image-position.toTheRightOf") }) }),
|
|
1737
1732
|
/* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ f(
|
|
1738
|
-
|
|
1733
|
+
Un,
|
|
1739
1734
|
{
|
|
1740
1735
|
value: String(O.relativeFrom),
|
|
1741
1736
|
disabled: w,
|
|
@@ -1752,8 +1747,8 @@ const lt = {
|
|
|
1752
1747
|
/* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ f(
|
|
1753
1748
|
ke,
|
|
1754
1749
|
{
|
|
1755
|
-
min:
|
|
1756
|
-
max:
|
|
1750
|
+
min: Wn,
|
|
1751
|
+
max: Gn,
|
|
1757
1752
|
precision: 1,
|
|
1758
1753
|
disabled: w,
|
|
1759
1754
|
value: T.posOffset,
|
|
@@ -1770,7 +1765,7 @@ const lt = {
|
|
|
1770
1765
|
/* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn, u.imageCommonPanelSpan2), children: /* @__PURE__ */ X("label", { children: [
|
|
1771
1766
|
/* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: n.t("image-position.bellow") }) }),
|
|
1772
1767
|
/* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ f(
|
|
1773
|
-
|
|
1768
|
+
Un,
|
|
1774
1769
|
{
|
|
1775
1770
|
disabled: w,
|
|
1776
1771
|
value: String(T.relativeFrom),
|
|
@@ -1781,10 +1776,10 @@ const lt = {
|
|
|
1781
1776
|
] }) })
|
|
1782
1777
|
] }),
|
|
1783
1778
|
/* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn, u.imageCommonPanelSubtitle), children: /* @__PURE__ */ f("div", { children: n.t("image-position.options") }) }) }),
|
|
1784
|
-
/* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, style: { marginBottom: "50px" }, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ f(
|
|
1779
|
+
/* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, style: { marginBottom: "50px" }, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ f(Ci, { disabled: w, checked: y, onChange: _, children: n.t("image-position.moveObjectWithText") }) }) })
|
|
1785
1780
|
] });
|
|
1786
|
-
}, Je = 0, en = 100,
|
|
1787
|
-
const e = we(z), n = we(ln), t = we(Ie), r = we(ee), o = we(
|
|
1781
|
+
}, Je = 0, en = 100, Zi = (i) => {
|
|
1782
|
+
const e = we(z), n = we(ln), t = we(Ie), r = we(ee), o = we(K), { drawings: s } = i, a = s[0];
|
|
1788
1783
|
if (a == null)
|
|
1789
1784
|
return null;
|
|
1790
1785
|
const { unitId: d } = a, c = o.getUniverDocInstance(d), l = r.getRenderById(d);
|
|
@@ -1806,7 +1801,7 @@ const lt = {
|
|
|
1806
1801
|
subUnitId: b,
|
|
1807
1802
|
drawingId: A
|
|
1808
1803
|
}));
|
|
1809
|
-
e.executeCommand(
|
|
1804
|
+
e.executeCommand(Qn.id, {
|
|
1810
1805
|
unitId: R,
|
|
1811
1806
|
subUnitId: P,
|
|
1812
1807
|
drawings: B,
|
|
@@ -1823,7 +1818,7 @@ const lt = {
|
|
|
1823
1818
|
subUnitId: P.subUnitId,
|
|
1824
1819
|
drawingId: P.drawingId
|
|
1825
1820
|
}));
|
|
1826
|
-
e.executeCommand(
|
|
1821
|
+
e.executeCommand(et.id, {
|
|
1827
1822
|
unitId: C[0].unitId,
|
|
1828
1823
|
subUnitId: C[0].unitId,
|
|
1829
1824
|
drawings: R,
|
|
@@ -1843,7 +1838,7 @@ const lt = {
|
|
|
1843
1838
|
subUnitId: k.subUnitId,
|
|
1844
1839
|
drawingId: k.drawingId
|
|
1845
1840
|
}));
|
|
1846
|
-
e.executeCommand(
|
|
1841
|
+
e.executeCommand(Jn.id, {
|
|
1847
1842
|
unitId: P[0].unitId,
|
|
1848
1843
|
subUnitId: P[0].unitId,
|
|
1849
1844
|
drawings: B,
|
|
@@ -1857,8 +1852,8 @@ const lt = {
|
|
|
1857
1852
|
_.length !== 0 && G(_[0]);
|
|
1858
1853
|
}
|
|
1859
1854
|
function G(_) {
|
|
1860
|
-
var
|
|
1861
|
-
const C = (ae = (
|
|
1855
|
+
var Z, ae;
|
|
1856
|
+
const C = (ae = (Z = c == null ? void 0 : c.getSnapshot()) == null ? void 0 : Z.drawings) == null ? void 0 : ae[_.drawingId];
|
|
1862
1857
|
if (C == null)
|
|
1863
1858
|
return;
|
|
1864
1859
|
const {
|
|
@@ -1892,7 +1887,7 @@ const lt = {
|
|
|
1892
1887
|
throw new Error(`Unsupported layout type: ${b}`);
|
|
1893
1888
|
}
|
|
1894
1889
|
}
|
|
1895
|
-
return
|
|
1890
|
+
return Sn(() => {
|
|
1896
1891
|
x();
|
|
1897
1892
|
const _ = t.focus$.subscribe((R) => {
|
|
1898
1893
|
if (R.length === 0) {
|
|
@@ -1909,7 +1904,7 @@ const lt = {
|
|
|
1909
1904
|
}, []), /* @__PURE__ */ X("div", { className: j(u.imageCommonPanelGrid, u.imageCommonPanelBorder), style: { display: U ? "block" : "none" }, children: [
|
|
1910
1905
|
/* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn, u.imageCommonPanelTitle), children: /* @__PURE__ */ f("div", { children: n.t("image-text-wrap.title") }) }) }),
|
|
1911
1906
|
/* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn, u.imageCommonPanelSubtitle), children: /* @__PURE__ */ f("div", { children: n.t("image-text-wrap.wrappingStyle") }) }) }),
|
|
1912
|
-
/* @__PURE__ */ f("div", { className: j(u.imageCommonPanelRow), children: /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn), children: /* @__PURE__ */ X(
|
|
1907
|
+
/* @__PURE__ */ f("div", { className: j(u.imageCommonPanelRow), children: /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn), children: /* @__PURE__ */ X(kn, { value: O, onChange: I, direction: "vertical", children: [
|
|
1913
1908
|
/* @__PURE__ */ f(Pe, { value: ue.INLINE, children: n.t("image-text-wrap.inline") }),
|
|
1914
1909
|
/* @__PURE__ */ f(Pe, { value: ue.WRAP_SQUARE, children: n.t("image-text-wrap.square") }),
|
|
1915
1910
|
/* @__PURE__ */ f(Pe, { value: ue.WRAP_TOP_AND_BOTTOM, children: n.t("image-text-wrap.topAndBottom") }),
|
|
@@ -1917,7 +1912,7 @@ const lt = {
|
|
|
1917
1912
|
/* @__PURE__ */ f(Pe, { value: ue.IN_FRONT_OF_TEXT, children: n.t("image-text-wrap.inFrontText") })
|
|
1918
1913
|
] }) }) }),
|
|
1919
1914
|
/* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn, u.imageCommonPanelSubtitle), children: /* @__PURE__ */ f("div", { children: n.t("image-text-wrap.wrapText") }) }) }),
|
|
1920
|
-
/* @__PURE__ */ f("div", { className: j(u.imageCommonPanelRow), children: /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn), children: /* @__PURE__ */ X(
|
|
1915
|
+
/* @__PURE__ */ f("div", { className: j(u.imageCommonPanelRow), children: /* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn), children: /* @__PURE__ */ X(kn, { disabled: g, value: T, onChange: L, direction: "horizontal", children: [
|
|
1921
1916
|
/* @__PURE__ */ f(Pe, { value: $e.BOTH_SIDES, children: n.t("image-text-wrap.bothSide") }),
|
|
1922
1917
|
/* @__PURE__ */ f(Pe, { value: $e.LEFT, children: n.t("image-text-wrap.leftOnly") }),
|
|
1923
1918
|
/* @__PURE__ */ f(Pe, { value: $e.RIGHT, children: n.t("image-text-wrap.rightOnly") })
|
|
@@ -1996,9 +1991,9 @@ const lt = {
|
|
|
1996
1991
|
] }) })
|
|
1997
1992
|
] })
|
|
1998
1993
|
] });
|
|
1999
|
-
},
|
|
1994
|
+
}, Qi = () => {
|
|
2000
1995
|
const i = we(Ie), e = i.getFocusDrawings(), [n, t] = re(e);
|
|
2001
|
-
return
|
|
1996
|
+
return Sn(() => {
|
|
2002
1997
|
const r = i.focus$.subscribe((o) => {
|
|
2003
1998
|
t(o);
|
|
2004
1999
|
});
|
|
@@ -2007,12 +2002,12 @@ const lt = {
|
|
|
2007
2002
|
};
|
|
2008
2003
|
}, []), !!(n != null && n.length) && /* @__PURE__ */ X("div", { className: u.imageCommonPanel, children: [
|
|
2009
2004
|
/* @__PURE__ */ f(qt, { drawings: n, hasAlign: !1, hasCropper: !1, hasGroup: !1, hasTransform: !1 }),
|
|
2010
|
-
/* @__PURE__ */ f(
|
|
2011
|
-
/* @__PURE__ */ f(
|
|
2005
|
+
/* @__PURE__ */ f(Zi, { drawings: n }),
|
|
2006
|
+
/* @__PURE__ */ f(Yi, { drawings: n })
|
|
2012
2007
|
] });
|
|
2013
|
-
},
|
|
2014
|
-
const e = i.get(
|
|
2015
|
-
return new
|
|
2008
|
+
}, ht = "addition-and-subtraction-single", pt = "doc.menu.image", wt = gt.id, Ji = (i) => {
|
|
2009
|
+
const e = i.get(_n), n = i.get(K);
|
|
2010
|
+
return new Si((t) => {
|
|
2016
2011
|
const r = e.textSelection$.subscribe(() => {
|
|
2017
2012
|
var s;
|
|
2018
2013
|
const o = e.getActiveTextRange();
|
|
@@ -2034,40 +2029,40 @@ const lt = {
|
|
|
2034
2029
|
return () => r.unsubscribe();
|
|
2035
2030
|
});
|
|
2036
2031
|
};
|
|
2037
|
-
function
|
|
2032
|
+
function er(i) {
|
|
2038
2033
|
return {
|
|
2039
|
-
id:
|
|
2040
|
-
type:
|
|
2041
|
-
icon:
|
|
2034
|
+
id: pt,
|
|
2035
|
+
type: qn.SUBITEMS,
|
|
2036
|
+
icon: ht,
|
|
2042
2037
|
tooltip: "docImage.title",
|
|
2043
|
-
disabled$:
|
|
2044
|
-
hidden$:
|
|
2038
|
+
disabled$: Ji(i),
|
|
2039
|
+
hidden$: zn(i, be.UNIVER_DOC, void 0, In)
|
|
2045
2040
|
};
|
|
2046
2041
|
}
|
|
2047
|
-
function
|
|
2042
|
+
function nr(i) {
|
|
2048
2043
|
return {
|
|
2049
|
-
id:
|
|
2044
|
+
id: wt,
|
|
2050
2045
|
title: "docImage.upload.float",
|
|
2051
|
-
type:
|
|
2052
|
-
hidden$:
|
|
2046
|
+
type: qn.BUTTON,
|
|
2047
|
+
hidden$: zn(i, be.UNIVER_DOC, void 0, In)
|
|
2053
2048
|
};
|
|
2054
2049
|
}
|
|
2055
|
-
const
|
|
2056
|
-
[
|
|
2057
|
-
[
|
|
2050
|
+
const tr = {
|
|
2051
|
+
[ai.LAYOUT]: {
|
|
2052
|
+
[pt]: {
|
|
2058
2053
|
order: 0,
|
|
2059
|
-
menuItemFactory:
|
|
2060
|
-
[
|
|
2054
|
+
menuItemFactory: er,
|
|
2055
|
+
[wt]: {
|
|
2061
2056
|
order: 0,
|
|
2062
|
-
menuItemFactory:
|
|
2057
|
+
menuItemFactory: nr
|
|
2063
2058
|
}
|
|
2064
2059
|
}
|
|
2065
2060
|
}
|
|
2066
2061
|
};
|
|
2067
2062
|
function Ye(i) {
|
|
2068
|
-
return i.getContextValue(
|
|
2063
|
+
return i.getContextValue(Rt) && i.getContextValue(tn);
|
|
2069
2064
|
}
|
|
2070
|
-
const
|
|
2065
|
+
const ir = {
|
|
2071
2066
|
id: Ke.id,
|
|
2072
2067
|
description: "shortcut.doc.drawing-move-down",
|
|
2073
2068
|
group: "4_doc-drawing-view",
|
|
@@ -2077,7 +2072,7 @@ const tr = {
|
|
|
2077
2072
|
staticParameters: {
|
|
2078
2073
|
direction: fe.DOWN
|
|
2079
2074
|
}
|
|
2080
|
-
},
|
|
2075
|
+
}, rr = {
|
|
2081
2076
|
id: Ke.id,
|
|
2082
2077
|
description: "shortcut.doc.drawing-move-up",
|
|
2083
2078
|
group: "4_doc-drawing-view",
|
|
@@ -2087,7 +2082,7 @@ const tr = {
|
|
|
2087
2082
|
staticParameters: {
|
|
2088
2083
|
direction: fe.UP
|
|
2089
2084
|
}
|
|
2090
|
-
},
|
|
2085
|
+
}, or = {
|
|
2091
2086
|
id: Ke.id,
|
|
2092
2087
|
description: "shortcut.doc.drawing-move-left",
|
|
2093
2088
|
group: "4_doc-drawing-view",
|
|
@@ -2097,7 +2092,7 @@ const tr = {
|
|
|
2097
2092
|
staticParameters: {
|
|
2098
2093
|
direction: fe.LEFT
|
|
2099
2094
|
}
|
|
2100
|
-
},
|
|
2095
|
+
}, sr = {
|
|
2101
2096
|
id: Ke.id,
|
|
2102
2097
|
description: "shortcut.doc.drawing-move-right",
|
|
2103
2098
|
group: "4_doc-drawing-view",
|
|
@@ -2107,8 +2102,8 @@ const tr = {
|
|
|
2107
2102
|
staticParameters: {
|
|
2108
2103
|
direction: fe.RIGHT
|
|
2109
2104
|
}
|
|
2110
|
-
},
|
|
2111
|
-
id:
|
|
2105
|
+
}, ar = {
|
|
2106
|
+
id: st.id,
|
|
2112
2107
|
description: "shortcut.doc.drawing-delete",
|
|
2113
2108
|
group: "4_doc-drawing-view",
|
|
2114
2109
|
// when focusing on any other input tag do not trigger this shortcut
|
|
@@ -2116,8 +2111,8 @@ const tr = {
|
|
|
2116
2111
|
binding: He.DELETE,
|
|
2117
2112
|
mac: He.BACKSPACE
|
|
2118
2113
|
};
|
|
2119
|
-
var
|
|
2120
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2114
|
+
var cr = Object.getOwnPropertyDescriptor, dr = (i, e, n, t) => {
|
|
2115
|
+
for (var r = t > 1 ? void 0 : t ? cr(e, n) : e, o = i.length - 1, s; o >= 0; o--)
|
|
2121
2116
|
(s = i[o]) && (r = s(r) || r);
|
|
2122
2117
|
return r;
|
|
2123
2118
|
}, nn = (i, e) => (n, t) => e(n, t, i);
|
|
@@ -2127,40 +2122,40 @@ let an = class extends Xe {
|
|
|
2127
2122
|
}
|
|
2128
2123
|
_initCustomComponents() {
|
|
2129
2124
|
const i = this._componentManager;
|
|
2130
|
-
this.disposeWithMe(i.register(
|
|
2125
|
+
this.disposeWithMe(i.register(ht, ot)), this.disposeWithMe(i.register(mt, Qi));
|
|
2131
2126
|
}
|
|
2132
2127
|
_initMenus() {
|
|
2133
|
-
this._menuManagerService.mergeMenu(
|
|
2128
|
+
this._menuManagerService.mergeMenu(tr);
|
|
2134
2129
|
}
|
|
2135
2130
|
_initCommands() {
|
|
2136
2131
|
[
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
Zn,
|
|
2132
|
+
gt,
|
|
2133
|
+
ct,
|
|
2140
2134
|
Qn,
|
|
2141
2135
|
Jn,
|
|
2142
|
-
qe,
|
|
2143
2136
|
et,
|
|
2137
|
+
qe,
|
|
2144
2138
|
nt,
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
Fi,
|
|
2139
|
+
tt,
|
|
2140
|
+
Cn,
|
|
2148
2141
|
ut,
|
|
2149
|
-
|
|
2150
|
-
|
|
2142
|
+
Hi,
|
|
2143
|
+
ft,
|
|
2144
|
+
at,
|
|
2145
|
+
lt,
|
|
2151
2146
|
Ke,
|
|
2152
|
-
|
|
2153
|
-
|
|
2147
|
+
st,
|
|
2148
|
+
dt
|
|
2154
2149
|
].forEach((i) => this.disposeWithMe(this._commandService.registerCommand(i)));
|
|
2155
2150
|
}
|
|
2156
2151
|
_initShortcuts() {
|
|
2157
2152
|
[
|
|
2158
2153
|
// sheet drawing shortcuts
|
|
2159
|
-
tr,
|
|
2160
2154
|
ir,
|
|
2161
2155
|
rr,
|
|
2162
2156
|
or,
|
|
2163
|
-
sr
|
|
2157
|
+
sr,
|
|
2158
|
+
ar
|
|
2164
2159
|
].forEach((i) => {
|
|
2165
2160
|
this.disposeWithMe(this._shortcutService.registerShortcut(i));
|
|
2166
2161
|
});
|
|
@@ -2169,25 +2164,25 @@ let an = class extends Xe {
|
|
|
2169
2164
|
this._initCommands(), this._initCustomComponents(), this._initMenus(), this._initShortcuts();
|
|
2170
2165
|
}
|
|
2171
2166
|
};
|
|
2172
|
-
an =
|
|
2173
|
-
nn(0, ve(
|
|
2174
|
-
nn(1,
|
|
2167
|
+
an = dr([
|
|
2168
|
+
nn(0, ve(ci)),
|
|
2169
|
+
nn(1, di),
|
|
2175
2170
|
nn(2, z),
|
|
2176
|
-
nn(3,
|
|
2171
|
+
nn(3, li)
|
|
2177
2172
|
], an);
|
|
2178
|
-
var
|
|
2179
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2173
|
+
var lr = Object.getOwnPropertyDescriptor, gr = (i, e, n, t) => {
|
|
2174
|
+
for (var r = t > 1 ? void 0 : t ? lr(e, n) : e, o = i.length - 1, s; o >= 0; o--)
|
|
2180
2175
|
(s = i[o]) && (r = s(r) || r);
|
|
2181
2176
|
return r;
|
|
2182
2177
|
}, je = (i, e) => (n, t) => e(n, t, i);
|
|
2183
|
-
let cn = class extends
|
|
2178
|
+
let cn = class extends Nt {
|
|
2184
2179
|
constructor(e, n, t, r, o) {
|
|
2185
2180
|
super();
|
|
2186
2181
|
Ce(this, "_initImagePopupMenu", /* @__PURE__ */ new Set());
|
|
2187
2182
|
this._drawingManagerService = e, this._canvasPopManagerService = n, this._renderManagerService = t, this._univerInstanceService = r, this._contextService = o, this._init();
|
|
2188
2183
|
}
|
|
2189
2184
|
_init() {
|
|
2190
|
-
this._univerInstanceService.getCurrentTypeOfUnit$(be.UNIVER_DOC).pipe(
|
|
2185
|
+
this._univerInstanceService.getCurrentTypeOfUnit$(be.UNIVER_DOC).pipe(xn(this.dispose$)).subscribe((e) => this._create(e)), this._univerInstanceService.getTypeOfUnitDisposed$(be.UNIVER_DOC).pipe(xn(this.dispose$)).subscribe((e) => this._dispose(e)), this._univerInstanceService.getAllUnitsForType(be.UNIVER_DOC).forEach((e) => this._create(e));
|
|
2191
2186
|
}
|
|
2192
2187
|
_dispose(e) {
|
|
2193
2188
|
const n = e.getUnitId();
|
|
@@ -2274,14 +2269,14 @@ let cn = class extends Rt {
|
|
|
2274
2269
|
{
|
|
2275
2270
|
label: "image-popup.edit",
|
|
2276
2271
|
index: 0,
|
|
2277
|
-
commandId:
|
|
2272
|
+
commandId: ft.id,
|
|
2278
2273
|
commandParams: { unitId: e, subUnitId: n, drawingId: t },
|
|
2279
|
-
disable: !!
|
|
2274
|
+
disable: !!Et.includes(e)
|
|
2280
2275
|
},
|
|
2281
2276
|
{
|
|
2282
2277
|
label: "image-popup.delete",
|
|
2283
2278
|
index: 1,
|
|
2284
|
-
commandId:
|
|
2279
|
+
commandId: Cn.id,
|
|
2285
2280
|
commandParams: { unitId: e, drawings: [{ unitId: e, subUnitId: n, drawingId: t }] },
|
|
2286
2281
|
disable: !1
|
|
2287
2282
|
},
|
|
@@ -2304,22 +2299,22 @@ let cn = class extends Rt {
|
|
|
2304
2299
|
];
|
|
2305
2300
|
}
|
|
2306
2301
|
};
|
|
2307
|
-
cn =
|
|
2302
|
+
cn = gr([
|
|
2308
2303
|
je(0, Ie),
|
|
2309
|
-
je(1, ve(
|
|
2304
|
+
je(1, ve(wi)),
|
|
2310
2305
|
je(2, ee),
|
|
2311
|
-
je(3,
|
|
2312
|
-
je(4,
|
|
2306
|
+
je(3, K),
|
|
2307
|
+
je(4, jn)
|
|
2313
2308
|
], cn);
|
|
2314
|
-
var
|
|
2315
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2309
|
+
var mr = Object.getOwnPropertyDescriptor, ur = (i, e, n, t) => {
|
|
2310
|
+
for (var r = t > 1 ? void 0 : t ? mr(e, n) : e, o = i.length - 1, s; o >= 0; o--)
|
|
2316
2311
|
(s = i[o]) && (r = s(r) || r);
|
|
2317
2312
|
return r;
|
|
2318
2313
|
}, xe = (i, e) => (n, t) => e(n, t, i);
|
|
2319
2314
|
let wn = class extends Xe {
|
|
2320
2315
|
constructor(e, n, t, r, o, s, a, d) {
|
|
2321
2316
|
super();
|
|
2322
|
-
Ce(this, "_liquid", new
|
|
2317
|
+
Ce(this, "_liquid", new $n());
|
|
2323
2318
|
this._context = e, this._docSkeletonManagerService = n, this._commandService = t, this._editorService = r, this._drawingManagerService = o, this._docRefreshDrawingsService = s, this._univerInstanceService = a, this._lifecycleService = d, this._initialize(), this._commandExecutedListener();
|
|
2324
2319
|
}
|
|
2325
2320
|
_initialize() {
|
|
@@ -2333,7 +2328,7 @@ let wn = class extends Xe {
|
|
|
2333
2328
|
});
|
|
2334
2329
|
}
|
|
2335
2330
|
_commandExecutedListener() {
|
|
2336
|
-
const e = [J.id,
|
|
2331
|
+
const e = [J.id, Ii.id];
|
|
2337
2332
|
this.disposeWithMe(
|
|
2338
2333
|
this._commandService.onCommandExecuted((n) => {
|
|
2339
2334
|
if (e.includes(n.id)) {
|
|
@@ -2343,7 +2338,7 @@ let wn = class extends Xe {
|
|
|
2343
2338
|
const a = this._docSkeletonManagerService.getSkeleton();
|
|
2344
2339
|
if (a == null)
|
|
2345
2340
|
return;
|
|
2346
|
-
if (this._editorService.isEditor(o) && o !==
|
|
2341
|
+
if (this._editorService.isEditor(o) && o !== In) {
|
|
2347
2342
|
s == null || s.makeDirty();
|
|
2348
2343
|
return;
|
|
2349
2344
|
}
|
|
@@ -2355,8 +2350,8 @@ let wn = class extends Xe {
|
|
|
2355
2350
|
_initResize() {
|
|
2356
2351
|
this.disposeWithMe(
|
|
2357
2352
|
xt(this._context.engine.onTransformChange$).pipe(
|
|
2358
|
-
|
|
2359
|
-
|
|
2353
|
+
Ln((e) => e.type === ii.resize),
|
|
2354
|
+
Xn(16)
|
|
2360
2355
|
).subscribe(() => {
|
|
2361
2356
|
var t;
|
|
2362
2357
|
const e = this._docSkeletonManagerService.getSkeleton(), { scene: n } = this._context;
|
|
@@ -2447,35 +2442,35 @@ let wn = class extends Xe {
|
|
|
2447
2442
|
const n = this._docSkeletonManagerService.getSkeleton();
|
|
2448
2443
|
n != null && (this._refreshDrawing(n), this._drawingManagerService.initializeNotification(this._context.unitId));
|
|
2449
2444
|
};
|
|
2450
|
-
this._lifecycleService.stage ===
|
|
2445
|
+
this._lifecycleService.stage === Pn.Steady ? setTimeout(() => {
|
|
2451
2446
|
e();
|
|
2452
|
-
}, 1e3) : this._lifecycleService.lifecycle$.pipe(
|
|
2447
|
+
}, 1e3) : this._lifecycleService.lifecycle$.pipe(Ln((n) => n === Pn.Steady)).subscribe(e);
|
|
2453
2448
|
}
|
|
2454
2449
|
};
|
|
2455
|
-
wn =
|
|
2450
|
+
wn = ur([
|
|
2456
2451
|
xe(1, ve(se)),
|
|
2457
2452
|
xe(2, z),
|
|
2458
|
-
xe(3,
|
|
2453
|
+
xe(3, vi),
|
|
2459
2454
|
xe(4, Ie),
|
|
2460
2455
|
xe(5, ve(gn)),
|
|
2461
|
-
xe(6,
|
|
2462
|
-
xe(7, ve(
|
|
2456
|
+
xe(6, K),
|
|
2457
|
+
xe(7, ve(At))
|
|
2463
2458
|
], wn);
|
|
2464
|
-
var
|
|
2465
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2459
|
+
var fr = Object.defineProperty, hr = Object.getOwnPropertyDescriptor, pr = (i, e, n) => e in i ? fr(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n, wr = (i, e, n, t) => {
|
|
2460
|
+
for (var r = t > 1 ? void 0 : t ? hr(e, n) : e, o = i.length - 1, s; o >= 0; o--)
|
|
2466
2461
|
(s = i[o]) && (r = s(r) || r);
|
|
2467
2462
|
return r;
|
|
2468
|
-
}, pn = (i, e) => (n, t) => e(n, t, i),
|
|
2469
|
-
const
|
|
2463
|
+
}, pn = (i, e) => (n, t) => e(n, t, i), vt = (i, e, n) => pr(i, typeof e != "symbol" ? e + "" : e, n);
|
|
2464
|
+
const vr = "DOC_DRAWING_UI_PLUGIN";
|
|
2470
2465
|
let dn = class extends kt {
|
|
2471
|
-
constructor(i =
|
|
2466
|
+
constructor(i = Fn, e, n, t) {
|
|
2472
2467
|
super(), this._config = i, this._injector = e, this._renderManagerSrv = n, this._configService = t;
|
|
2473
2468
|
const { ...r } = Ft(
|
|
2474
2469
|
{},
|
|
2475
|
-
|
|
2470
|
+
Fn,
|
|
2476
2471
|
this._config
|
|
2477
2472
|
);
|
|
2478
|
-
this._configService.setConfig(
|
|
2473
|
+
this._configService.setConfig(Oi, r);
|
|
2479
2474
|
}
|
|
2480
2475
|
onStarting() {
|
|
2481
2476
|
[
|
|
@@ -2496,26 +2491,26 @@ let dn = class extends kt {
|
|
|
2496
2491
|
this._injector.get(cn);
|
|
2497
2492
|
}
|
|
2498
2493
|
};
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
dn =
|
|
2502
|
-
Lt(Qt, zt, Ht,
|
|
2494
|
+
vt(dn, "type", be.UNIVER_DOC);
|
|
2495
|
+
vt(dn, "pluginName", vr);
|
|
2496
|
+
dn = wr([
|
|
2497
|
+
Lt(Qt, zt, Ht, gi),
|
|
2503
2498
|
pn(1, ve(Bt)),
|
|
2504
2499
|
pn(2, ee),
|
|
2505
2500
|
pn(3, Ut)
|
|
2506
2501
|
], dn);
|
|
2507
2502
|
export {
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2503
|
+
Hi as ClearDocDrawingTransformerOperation,
|
|
2504
|
+
pt as DOCS_IMAGE_MENU_ID,
|
|
2505
|
+
st as DeleteDocDrawingsCommand,
|
|
2506
|
+
ft as EditDocDrawingOperation,
|
|
2507
|
+
at as GroupDocDrawingCommand,
|
|
2508
|
+
ct as InsertDocDrawingCommand,
|
|
2509
|
+
gt as InsertDocImageCommand,
|
|
2515
2510
|
Ke as MoveDocDrawingsCommand,
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2511
|
+
Cn as RemoveDocDrawingCommand,
|
|
2512
|
+
dt as SetDocDrawingArrangeCommand,
|
|
2513
|
+
ut as SidebarDocDrawingOperation,
|
|
2514
|
+
lt as UngroupDocDrawingCommand,
|
|
2520
2515
|
dn as UniverDocsDrawingUIPlugin
|
|
2521
2516
|
};
|