@univerjs/docs-drawing-ui 0.6.1-nightly.202502261607 → 0.6.2
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/LICENSE +176 -0
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +296 -295
- package/lib/umd/index.js +1 -1
- package/package.json +11 -12
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();
|
|
@@ -705,12 +705,12 @@ let on = class extends Xe {
|
|
|
705
705
|
if (p == null)
|
|
706
706
|
return;
|
|
707
707
|
const M = o == null ? void 0 : o.findPositionByGlyph(p, v), y = this._getDocObject();
|
|
708
|
-
if (M == null || o == null || y == null ||
|
|
708
|
+
if (M == null || o == null || y == null || Hn(M))
|
|
709
709
|
return;
|
|
710
710
|
const E = {
|
|
711
711
|
...M,
|
|
712
712
|
isBack: h
|
|
713
|
-
}, U = y.document.getOffsetConfig(), N = new
|
|
713
|
+
}, 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
714
|
if (W != null)
|
|
715
715
|
return { offset: W, contentBoxPointGroup: L, segmentId: w, segmentPage: v };
|
|
716
716
|
}
|
|
@@ -720,7 +720,7 @@ let on = class extends Xe {
|
|
|
720
720
|
const t = this._renderManagerService.getRenderById(e.unitId), r = t == null ? void 0 : t.with(se).getSkeleton(), o = r == null ? void 0 : r.getSkeletonData();
|
|
721
721
|
if (o == null || t == null)
|
|
722
722
|
return;
|
|
723
|
-
const { pages: s, skeHeaders: a, skeFooters: d } = o, { mainComponent: c, scene: l } = t, m = c, g = l.getViewports()[0], { pageLayoutType: p =
|
|
723
|
+
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
724
|
let { width: M, height: y } = n;
|
|
725
725
|
const { positionV: E, positionH: U } = e.docTransform, { width: N, height: I } = this._getPageContentSize(e);
|
|
726
726
|
M = Math.min(M, N), y = Math.min(y, I);
|
|
@@ -753,28 +753,28 @@ let on = class extends Xe {
|
|
|
753
753
|
if (b == null || A == null || $ == null || F == null)
|
|
754
754
|
return;
|
|
755
755
|
this._liquid.reset();
|
|
756
|
-
const
|
|
756
|
+
const Z = F.type;
|
|
757
757
|
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(
|
|
758
|
+
const { headerId: mn, footerId: un, pageHeight: It, pageWidth: Dn, marginLeft: On, marginBottom: _t } = pe, St = s.indexOf(pe);
|
|
759
|
+
if (x > -1 && St === x) {
|
|
760
|
+
switch (Z) {
|
|
761
|
+
case Nn.HEADER: {
|
|
762
|
+
const Ge = (Oe = a.get(mn)) == null ? void 0 : Oe.get(Dn);
|
|
763
763
|
if (Ge)
|
|
764
764
|
this._liquid.translatePagePadding({
|
|
765
765
|
marginTop: Ge.marginTop,
|
|
766
|
-
marginLeft:
|
|
766
|
+
marginLeft: On
|
|
767
767
|
});
|
|
768
768
|
else
|
|
769
769
|
throw new Error("header skeleton not found");
|
|
770
770
|
break;
|
|
771
771
|
}
|
|
772
|
-
case
|
|
773
|
-
const Ge = (Ne = d.get(un)) == null ? void 0 : Ne.get(
|
|
772
|
+
case Nn.FOOTER: {
|
|
773
|
+
const Ge = (Ne = d.get(un)) == null ? void 0 : Ne.get(Dn);
|
|
774
774
|
if (Ge)
|
|
775
775
|
this._liquid.translatePagePadding({
|
|
776
|
-
marginTop:
|
|
777
|
-
marginLeft:
|
|
776
|
+
marginTop: It - _t + Ge.marginTop,
|
|
777
|
+
marginLeft: On
|
|
778
778
|
});
|
|
779
779
|
else
|
|
780
780
|
throw new Error("footer skeleton not found");
|
|
@@ -820,12 +820,12 @@ let on = class extends Xe {
|
|
|
820
820
|
if (L == null)
|
|
821
821
|
return;
|
|
822
822
|
const ae = r == null ? void 0 : r.findPositionByGlyph(L, x), Ue = this._getDocObject();
|
|
823
|
-
if (ae == null || r == null || Ue == null ||
|
|
823
|
+
if (ae == null || r == null || Ue == null || Hn(ae))
|
|
824
824
|
return;
|
|
825
825
|
const Re = {
|
|
826
826
|
...ae,
|
|
827
827
|
isBack: G
|
|
828
|
-
}, We = Ue.document.getOffsetConfig(), ce = new
|
|
828
|
+
}, We = Ue.document.getOffsetConfig(), ce = new En(We, r), { cursorList: te } = ce.getRangePointData(Re, Re), { startOffset: ie } = (Ae = An(te)) != null ? Ae : {};
|
|
829
829
|
if (ie != null)
|
|
830
830
|
return { offset: ie, docTransform: _, segmentId: W, segmentPage: x };
|
|
831
831
|
}
|
|
@@ -854,7 +854,7 @@ let on = class extends Xe {
|
|
|
854
854
|
// Update inline drawing when use transformer to move it.
|
|
855
855
|
_moveInlineDrawing(e, n, t) {
|
|
856
856
|
const r = this._getInlineDrawingAnchor(e, n, t), { offset: o, segmentId: s, segmentPage: a } = r != null ? r : {};
|
|
857
|
-
return this._commandService.executeCommand(
|
|
857
|
+
return this._commandService.executeCommand(nt.id, {
|
|
858
858
|
unitId: e.unitId,
|
|
859
859
|
subUnitId: e.unitId,
|
|
860
860
|
drawing: e,
|
|
@@ -907,7 +907,7 @@ let on = class extends Xe {
|
|
|
907
907
|
if (t && r.top !== n.top)
|
|
908
908
|
return;
|
|
909
909
|
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(
|
|
910
|
+
return s == null || a == null ? this._updateMultipleDrawingDocTransform(/* @__PURE__ */ new Map([[e.drawingId, n]])) : this._commandService.executeCommand(tt.id, {
|
|
911
911
|
unitId: e.unitId,
|
|
912
912
|
subUnitId: e.unitId,
|
|
913
913
|
drawing: e,
|
|
@@ -938,23 +938,23 @@ let on = class extends Xe {
|
|
|
938
938
|
const { mainComponent: r, scene: o } = t, s = r, {
|
|
939
939
|
docsLeft: a,
|
|
940
940
|
docsTop: d
|
|
941
|
-
} = s.getOffsetConfig(), c =
|
|
941
|
+
} = s.getOffsetConfig(), c = mi(n), { left: l, top: m, height: g } = c, p = l + a, h = m + d;
|
|
942
942
|
if (this._anchorShape) {
|
|
943
943
|
this._anchorShape.transformByState({ left: p, top: h, height: g }), this._anchorShape.show();
|
|
944
944
|
return;
|
|
945
945
|
}
|
|
946
|
-
const v = 6, w = new ei(
|
|
946
|
+
const v = 6, w = new ei(Ei + ye.generateRandomId(v), {
|
|
947
947
|
left: p,
|
|
948
948
|
top: h,
|
|
949
949
|
height: g,
|
|
950
950
|
strokeWidth: 2,
|
|
951
|
-
stroke: ni(
|
|
951
|
+
stroke: ni(Pt.darkGray, 1),
|
|
952
952
|
evented: !1
|
|
953
953
|
});
|
|
954
|
-
this._anchorShape = w, o.addObject(w,
|
|
954
|
+
this._anchorShape = w, o.addObject(w, ui);
|
|
955
955
|
}
|
|
956
956
|
_getDocObject() {
|
|
957
|
-
return
|
|
957
|
+
return fi(this._univerInstanceService, this._renderManagerService);
|
|
958
958
|
}
|
|
959
959
|
_getPageContentSize(e) {
|
|
960
960
|
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 +985,9 @@ let on = class extends Xe {
|
|
|
985
985
|
};
|
|
986
986
|
}
|
|
987
987
|
};
|
|
988
|
-
on =
|
|
988
|
+
on = Ni([
|
|
989
989
|
Qe(0, z),
|
|
990
|
-
Qe(1,
|
|
990
|
+
Qe(1, K),
|
|
991
991
|
Qe(2, Ie),
|
|
992
992
|
Qe(3, ee)
|
|
993
993
|
], on);
|
|
@@ -999,23 +999,23 @@ var he = function() {
|
|
|
999
999
|
}
|
|
1000
1000
|
return i;
|
|
1001
1001
|
}, he.apply(this, arguments);
|
|
1002
|
-
},
|
|
1002
|
+
}, Ai = function(i, e) {
|
|
1003
1003
|
var n = {};
|
|
1004
1004
|
for (var t in i) Object.prototype.hasOwnProperty.call(i, t) && e.indexOf(t) < 0 && (n[t] = i[t]);
|
|
1005
1005
|
if (i != null && typeof Object.getOwnPropertySymbols == "function")
|
|
1006
1006
|
for (var r = 0, t = Object.getOwnPropertySymbols(i); r < t.length; r++)
|
|
1007
1007
|
e.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(i, t[r]) && (n[t[r]] = i[t[r]]);
|
|
1008
1008
|
return n;
|
|
1009
|
-
},
|
|
1010
|
-
var n = i.icon, t = i.id, r = i.className, o = i.extend, s =
|
|
1011
|
-
return
|
|
1009
|
+
}, it = Kn(function(i, e) {
|
|
1010
|
+
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()));
|
|
1011
|
+
return rt(n, "".concat(t), { defIds: n.defIds, idSuffix: d.current }, he({ ref: e, className: a }, s), o);
|
|
1012
1012
|
});
|
|
1013
|
-
function
|
|
1014
|
-
return
|
|
1015
|
-
return
|
|
1013
|
+
function rt(i, e, n, t, r) {
|
|
1014
|
+
return Yn(i.tag, he(he({ key: e }, xi(i, n, r)), t), (Li(i, n).children || []).map(function(o, s) {
|
|
1015
|
+
return rt(o, "".concat(e, "-").concat(i.tag, "-").concat(s), n, void 0, r);
|
|
1016
1016
|
}));
|
|
1017
1017
|
}
|
|
1018
|
-
function
|
|
1018
|
+
function xi(i, e, n) {
|
|
1019
1019
|
var t = he({}, i.attrs);
|
|
1020
1020
|
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
1021
|
var s = o[0], a = o[1];
|
|
@@ -1027,34 +1027,34 @@ function Ai(i, e, n) {
|
|
|
1027
1027
|
typeof a == "string" && (t[s] = a.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
1028
1028
|
})), t;
|
|
1029
1029
|
}
|
|
1030
|
-
function
|
|
1030
|
+
function Li(i, e) {
|
|
1031
1031
|
var n, t = e.defIds;
|
|
1032
1032
|
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
1033
|
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
1034
|
}) }) : i;
|
|
1035
1035
|
}
|
|
1036
|
-
function
|
|
1036
|
+
function Bi() {
|
|
1037
1037
|
return Math.random().toString(36).substring(2, 8);
|
|
1038
1038
|
}
|
|
1039
|
-
|
|
1040
|
-
var
|
|
1041
|
-
return
|
|
1039
|
+
it.displayName = "UniverIcon";
|
|
1040
|
+
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) {
|
|
1041
|
+
return Yn(it, Object.assign({}, i, {
|
|
1042
1042
|
id: "add-image-single",
|
|
1043
1043
|
ref: e,
|
|
1044
|
-
icon:
|
|
1044
|
+
icon: Ui
|
|
1045
1045
|
}));
|
|
1046
1046
|
});
|
|
1047
|
-
|
|
1048
|
-
const
|
|
1047
|
+
ot.displayName = "AddImageSingle";
|
|
1048
|
+
const Cn = {
|
|
1049
1049
|
id: "doc.command.remove-doc-image",
|
|
1050
|
-
type:
|
|
1050
|
+
type: Y.COMMAND,
|
|
1051
1051
|
// eslint-disable-next-line max-lines-per-function
|
|
1052
1052
|
handler: (i, e) => {
|
|
1053
1053
|
var M, y, E, U;
|
|
1054
|
-
const n = i.get(z), t = i.get(
|
|
1054
|
+
const n = i.get(z), t = i.get(K), r = i.get(ee), o = t.getCurrentUniverDocInstance();
|
|
1055
1055
|
if (e == null || o == null)
|
|
1056
1056
|
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
|
|
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 yt();
|
|
1058
1058
|
h.reset();
|
|
1059
1059
|
const v = g[0].startIndex, w = [
|
|
1060
1060
|
{
|
|
@@ -1072,10 +1072,10 @@ const Sn = {
|
|
|
1072
1072
|
for (const N of g) {
|
|
1073
1073
|
const { startIndex: I } = N;
|
|
1074
1074
|
I > h.cursor && c.push({
|
|
1075
|
-
t:
|
|
1075
|
+
t: Q.RETAIN,
|
|
1076
1076
|
len: I - h.cursor
|
|
1077
1077
|
}), c.push({
|
|
1078
|
-
t:
|
|
1078
|
+
t: Q.DELETE,
|
|
1079
1079
|
len: 1
|
|
1080
1080
|
}), h.moveCursorTo(I + 1);
|
|
1081
1081
|
}
|
|
@@ -1087,9 +1087,9 @@ const Sn = {
|
|
|
1087
1087
|
}
|
|
1088
1088
|
return S.params.actions = O.reduce((N, I) => q.compose(N, I), null), !!n.syncExecuteCommand(S.id, S.params);
|
|
1089
1089
|
}
|
|
1090
|
-
},
|
|
1090
|
+
}, st = {
|
|
1091
1091
|
id: "doc.command.delete-drawing",
|
|
1092
|
-
type:
|
|
1092
|
+
type: Y.COMMAND,
|
|
1093
1093
|
handler: (i) => {
|
|
1094
1094
|
const e = i.get(z), t = i.get(Be).getFocusDrawings();
|
|
1095
1095
|
if (t.length === 0)
|
|
@@ -1103,16 +1103,16 @@ const Sn = {
|
|
|
1103
1103
|
drawingType: l
|
|
1104
1104
|
};
|
|
1105
1105
|
});
|
|
1106
|
-
return e.executeCommand(
|
|
1106
|
+
return e.executeCommand(Cn.id, {
|
|
1107
1107
|
unitId: r,
|
|
1108
1108
|
drawings: o
|
|
1109
1109
|
});
|
|
1110
1110
|
}
|
|
1111
|
-
},
|
|
1111
|
+
}, at = {
|
|
1112
1112
|
id: "doc.command.group-doc-image",
|
|
1113
|
-
type:
|
|
1113
|
+
type: Y.COMMAND,
|
|
1114
1114
|
handler: (i, e) => {
|
|
1115
|
-
i.get(z), i.get(
|
|
1115
|
+
i.get(z), i.get(Vn);
|
|
1116
1116
|
const n = i.get(Be);
|
|
1117
1117
|
if (!e) return !1;
|
|
1118
1118
|
const t = [];
|
|
@@ -1124,15 +1124,15 @@ const Sn = {
|
|
|
1124
1124
|
const r = n.getGroupDrawingOp(e), { unitId: o, subUnitId: s, undo: a, redo: d, objects: c } = r;
|
|
1125
1125
|
return !1;
|
|
1126
1126
|
}
|
|
1127
|
-
},
|
|
1127
|
+
}, ct = {
|
|
1128
1128
|
id: "doc.command.insert-doc-image",
|
|
1129
|
-
type:
|
|
1129
|
+
type: Y.COMMAND,
|
|
1130
1130
|
// eslint-disable-next-line max-lines-per-function
|
|
1131
1131
|
handler: (i, e) => {
|
|
1132
1132
|
var y, E, U, N;
|
|
1133
1133
|
if (e == null)
|
|
1134
1134
|
return !1;
|
|
1135
|
-
const n = i.get(z), t = i.get(
|
|
1135
|
+
const n = i.get(z), t = i.get(_n), r = i.get(K), o = t.getActiveTextRange(), s = r.getCurrentUniverDocInstance();
|
|
1136
1136
|
if (o == null || s == null)
|
|
1137
1137
|
return !1;
|
|
1138
1138
|
const a = s.getUnitId(), { drawings: d } = e, { collapsed: c, startOffset: l, segmentId: m } = o, g = s.getSelfOrHeaderFooterModel(m).getBody();
|
|
@@ -1142,13 +1142,13 @@ const Sn = {
|
|
|
1142
1142
|
let S = 0;
|
|
1143
1143
|
if (c)
|
|
1144
1144
|
l > 0 && p.push({
|
|
1145
|
-
t:
|
|
1145
|
+
t: Q.RETAIN,
|
|
1146
1146
|
len: l
|
|
1147
1147
|
});
|
|
1148
1148
|
else {
|
|
1149
|
-
const I =
|
|
1149
|
+
const I = bt.selection.delete([o], g, 0, null, !1);
|
|
1150
1150
|
p.push(...I);
|
|
1151
|
-
const L =
|
|
1151
|
+
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
1152
|
if (G.length > 0)
|
|
1153
1153
|
for (const _ of G) {
|
|
1154
1154
|
const C = W[_], R = x.indexOf(_);
|
|
@@ -1159,7 +1159,7 @@ const Sn = {
|
|
|
1159
1159
|
}
|
|
1160
1160
|
}
|
|
1161
1161
|
p.push({
|
|
1162
|
-
t:
|
|
1162
|
+
t: Q.INSERT,
|
|
1163
1163
|
body: {
|
|
1164
1164
|
dataStream: "\b".repeat(d.length),
|
|
1165
1165
|
customBlocks: d.map((I, L) => ({
|
|
@@ -1185,9 +1185,9 @@ const Sn = {
|
|
|
1185
1185
|
};
|
|
1186
1186
|
return T.params.actions = v.reduce((I, L) => q.compose(I, L), null), !!n.syncExecuteCommand(T.id, T.params);
|
|
1187
1187
|
}
|
|
1188
|
-
},
|
|
1188
|
+
}, dt = {
|
|
1189
1189
|
id: "doc.command.set-drawing-arrange",
|
|
1190
|
-
type:
|
|
1190
|
+
type: Y.COMMAND,
|
|
1191
1191
|
handler: (i, e) => {
|
|
1192
1192
|
const n = i.get(z), t = i.get(Be);
|
|
1193
1193
|
if (e == null)
|
|
@@ -1212,11 +1212,11 @@ const Sn = {
|
|
|
1212
1212
|
};
|
|
1213
1213
|
return p.params.actions = m.reduce((v, w) => q.compose(v, w), null), !!n.syncExecuteCommand(p.id, p.params);
|
|
1214
1214
|
}
|
|
1215
|
-
},
|
|
1215
|
+
}, lt = {
|
|
1216
1216
|
id: "doc.command.ungroup-doc-image",
|
|
1217
|
-
type:
|
|
1217
|
+
type: Y.COMMAND,
|
|
1218
1218
|
handler: (i, e) => {
|
|
1219
|
-
i.get(z), i.get(
|
|
1219
|
+
i.get(z), i.get(Vn);
|
|
1220
1220
|
const n = i.get(Be);
|
|
1221
1221
|
if (!e) return !1;
|
|
1222
1222
|
const t = [];
|
|
@@ -1229,8 +1229,8 @@ const Sn = {
|
|
|
1229
1229
|
return !1;
|
|
1230
1230
|
}
|
|
1231
1231
|
};
|
|
1232
|
-
var
|
|
1233
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
1232
|
+
var ki = Object.getOwnPropertyDescriptor, Fi = (i, e, n, t) => {
|
|
1233
|
+
for (var r = t > 1 ? void 0 : t ? ki(e, n) : e, o = i.length - 1, s; o >= 0; o--)
|
|
1234
1234
|
(s = i[o]) && (r = s(r) || r);
|
|
1235
1235
|
return r;
|
|
1236
1236
|
}, me = (i, e) => (n, t) => e(n, t, i);
|
|
@@ -1243,9 +1243,9 @@ let sn = class extends Xe {
|
|
|
1243
1243
|
multiple: !0,
|
|
1244
1244
|
accept: Gt.map((n) => `.${n.replace("image/", "")}`).join(",")
|
|
1245
1245
|
}), e = i.length;
|
|
1246
|
-
return e >
|
|
1247
|
-
type:
|
|
1248
|
-
content: this._localeService.t("update-status.exceedMaxCount", String(
|
|
1246
|
+
return e > yn ? (this._messageService.show({
|
|
1247
|
+
type: Bn.Error,
|
|
1248
|
+
content: this._localeService.t("update-status.exceedMaxCount", String(yn))
|
|
1249
1249
|
}), !1) : e === 0 ? !1 : (await this._insertFloatImages(i), !0);
|
|
1250
1250
|
}
|
|
1251
1251
|
// eslint-disable-next-line max-lines-per-function
|
|
@@ -1268,7 +1268,7 @@ let sn = class extends Xe {
|
|
|
1268
1268
|
break;
|
|
1269
1269
|
}
|
|
1270
1270
|
this._messageService.show({
|
|
1271
|
-
type:
|
|
1271
|
+
type: Bn.Error,
|
|
1272
1272
|
content: s
|
|
1273
1273
|
});
|
|
1274
1274
|
}
|
|
@@ -1281,8 +1281,8 @@ let sn = class extends Xe {
|
|
|
1281
1281
|
const { imageId: o, imageSourceType: s, source: a, base64Cache: d } = r, { width: c, height: l, image: m } = await jt(d || "");
|
|
1282
1282
|
this._imageIoService.addImageSourceCache(o, s, m);
|
|
1283
1283
|
let g = 1;
|
|
1284
|
-
if (c >
|
|
1285
|
-
const w =
|
|
1284
|
+
if (c > bn || l > Mn) {
|
|
1285
|
+
const w = bn / c, S = Mn / l;
|
|
1286
1286
|
g = Math.min(w, S);
|
|
1287
1287
|
}
|
|
1288
1288
|
const p = this._getImagePosition(c * g, l * g);
|
|
@@ -1292,10 +1292,10 @@ let sn = class extends Xe {
|
|
|
1292
1292
|
unitId: n,
|
|
1293
1293
|
subUnitId: n,
|
|
1294
1294
|
drawingId: o,
|
|
1295
|
-
drawingType:
|
|
1295
|
+
drawingType: Mt.DRAWING_IMAGE,
|
|
1296
1296
|
imageSourceType: s,
|
|
1297
1297
|
source: a,
|
|
1298
|
-
transform:
|
|
1298
|
+
transform: pi(p),
|
|
1299
1299
|
docTransform: p,
|
|
1300
1300
|
behindDoc: oe.FALSE,
|
|
1301
1301
|
title: "",
|
|
@@ -1310,7 +1310,7 @@ let sn = class extends Xe {
|
|
|
1310
1310
|
};
|
|
1311
1311
|
this._isInsertInHeaderFooter() && (h.isMultiTransform = oe.TRUE, h.transforms = h.transform ? [h.transform] : null), t.push(h);
|
|
1312
1312
|
}
|
|
1313
|
-
this._commandService.executeCommand(
|
|
1313
|
+
this._commandService.executeCommand(ct.id, {
|
|
1314
1314
|
unitId: n,
|
|
1315
1315
|
drawings: t
|
|
1316
1316
|
});
|
|
@@ -1343,7 +1343,7 @@ let sn = class extends Xe {
|
|
|
1343
1343
|
_updateOrderListener() {
|
|
1344
1344
|
this._drawingManagerService.featurePluginOrderUpdate$.subscribe((i) => {
|
|
1345
1345
|
const { unitId: e, subUnitId: n, drawingIds: t, arrangeType: r } = i;
|
|
1346
|
-
this._commandService.executeCommand(
|
|
1346
|
+
this._commandService.executeCommand(dt.id, {
|
|
1347
1347
|
unitId: e,
|
|
1348
1348
|
subUnitId: n,
|
|
1349
1349
|
drawingIds: t,
|
|
@@ -1353,9 +1353,9 @@ let sn = class extends Xe {
|
|
|
1353
1353
|
}
|
|
1354
1354
|
_groupDrawingListener() {
|
|
1355
1355
|
this._drawingManagerService.featurePluginGroupUpdate$.subscribe((i) => {
|
|
1356
|
-
this._commandService.executeCommand(
|
|
1356
|
+
this._commandService.executeCommand(at.id, i);
|
|
1357
1357
|
}), this._drawingManagerService.featurePluginUngroupUpdate$.subscribe((i) => {
|
|
1358
|
-
this._commandService.executeCommand(
|
|
1358
|
+
this._commandService.executeCommand(lt.id, i);
|
|
1359
1359
|
});
|
|
1360
1360
|
}
|
|
1361
1361
|
_getCurrentSceneAndTransformer() {
|
|
@@ -1368,7 +1368,7 @@ let sn = class extends Xe {
|
|
|
1368
1368
|
_transformDrawingListener() {
|
|
1369
1369
|
const i = this._getCurrentSceneAndTransformer();
|
|
1370
1370
|
if (i && i.transformer)
|
|
1371
|
-
this.disposeWithMe(i.transformer.changeEnd$.pipe(
|
|
1371
|
+
this.disposeWithMe(i.transformer.changeEnd$.pipe(Xn(30)).subscribe((e) => {
|
|
1372
1372
|
this._docSelectionManagerService.refreshSelection();
|
|
1373
1373
|
}));
|
|
1374
1374
|
else
|
|
@@ -1450,32 +1450,33 @@ let sn = class extends Xe {
|
|
|
1450
1450
|
this._docSelectionManagerService.replaceDocRanges(t);
|
|
1451
1451
|
}
|
|
1452
1452
|
};
|
|
1453
|
-
sn =
|
|
1453
|
+
sn = Fi([
|
|
1454
1454
|
me(1, z),
|
|
1455
|
-
me(2, ve(
|
|
1455
|
+
me(2, ve(_n)),
|
|
1456
1456
|
me(3, ee),
|
|
1457
1457
|
me(4, Wt),
|
|
1458
1458
|
me(5, Be),
|
|
1459
1459
|
me(6, Ie),
|
|
1460
|
-
me(7,
|
|
1461
|
-
me(8,
|
|
1460
|
+
me(7, jn),
|
|
1461
|
+
me(8, ri),
|
|
1462
1462
|
me(9, ve(ln)),
|
|
1463
1463
|
me(10, ve(Me)),
|
|
1464
1464
|
me(11, ve(gn)),
|
|
1465
|
-
me(12,
|
|
1465
|
+
me(12, oi)
|
|
1466
1466
|
], sn);
|
|
1467
|
-
const
|
|
1467
|
+
const gt = {
|
|
1468
1468
|
id: "doc.command.insert-float-image",
|
|
1469
|
-
type:
|
|
1469
|
+
type: Y.COMMAND,
|
|
1470
1470
|
handler: (i) => {
|
|
1471
|
-
var
|
|
1472
|
-
|
|
1471
|
+
var t, r;
|
|
1472
|
+
const e = i.get(K), n = i.get(ee);
|
|
1473
|
+
return (r = (t = ti(be.UNIVER_DOC, e, n)) == null ? void 0 : t.with(sn).insertDocImage()) != null ? r : !1;
|
|
1473
1474
|
}
|
|
1474
1475
|
}, Ke = {
|
|
1475
1476
|
id: "doc.command.move-drawing",
|
|
1476
|
-
type:
|
|
1477
|
+
type: Y.COMMAND,
|
|
1477
1478
|
handler: (i, e) => {
|
|
1478
|
-
const n = i.get(z), t = i.get(Be), r = i.get(
|
|
1479
|
+
const n = i.get(z), t = i.get(Be), r = i.get(K), o = i.get(ee), { direction: s } = e, a = t.getFocusDrawings();
|
|
1479
1480
|
if (a.length === 0)
|
|
1480
1481
|
return !1;
|
|
1481
1482
|
const d = a[0].unitId, c = o.getRenderById(d), l = c == null ? void 0 : c.scene;
|
|
@@ -1502,9 +1503,9 @@ const lt = {
|
|
|
1502
1503
|
});
|
|
1503
1504
|
return m.refreshControls(), !!h;
|
|
1504
1505
|
}
|
|
1505
|
-
},
|
|
1506
|
+
}, Hi = {
|
|
1506
1507
|
id: "doc.operation.clear-drawing-transformer",
|
|
1507
|
-
type:
|
|
1508
|
+
type: Y.MUTATION,
|
|
1508
1509
|
handler: (i, e) => {
|
|
1509
1510
|
const n = i.get(ee);
|
|
1510
1511
|
return e.forEach((t) => {
|
|
@@ -1512,16 +1513,16 @@ const lt = {
|
|
|
1512
1513
|
(o = (r = n.getRenderById(t)) == null ? void 0 : r.scene.getTransformer()) == null || o.debounceRefreshControls();
|
|
1513
1514
|
}), !0;
|
|
1514
1515
|
}
|
|
1515
|
-
},
|
|
1516
|
+
}, mt = "COMPONENT_DOC_DRAWING_PANEL", ut = {
|
|
1516
1517
|
id: "sidebar.operation.doc-image",
|
|
1517
|
-
type:
|
|
1518
|
+
type: Y.COMMAND,
|
|
1518
1519
|
handler: async (i, e) => {
|
|
1519
|
-
const n = i.get(
|
|
1520
|
+
const n = i.get(si), t = i.get(ln), r = i.get(Ie);
|
|
1520
1521
|
switch (e.value) {
|
|
1521
1522
|
case "open":
|
|
1522
1523
|
n.open({
|
|
1523
1524
|
header: { title: t.t("docImage.panel.title") },
|
|
1524
|
-
children: { label:
|
|
1525
|
+
children: { label: mt },
|
|
1525
1526
|
onClose: () => {
|
|
1526
1527
|
r.focusDrawing(null);
|
|
1527
1528
|
},
|
|
@@ -1535,25 +1536,25 @@ const lt = {
|
|
|
1535
1536
|
}
|
|
1536
1537
|
return !0;
|
|
1537
1538
|
}
|
|
1538
|
-
},
|
|
1539
|
+
}, ft = {
|
|
1539
1540
|
id: "doc.operation.edit-doc-image",
|
|
1540
|
-
type:
|
|
1541
|
+
type: Y.OPERATION,
|
|
1541
1542
|
handler: (i, e) => {
|
|
1542
1543
|
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(
|
|
1544
|
+
return e == null ? !1 : (n.focusDrawing([e]), t.executeCommand(ut.id, { value: "open" }), !0);
|
|
1545
|
+
}
|
|
1546
|
+
}, 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 = {
|
|
1547
|
+
imageCommonPanel: Wi,
|
|
1548
|
+
imageCommonPanelGrid: Gi,
|
|
1549
|
+
imageCommonPanelBorder: Vi,
|
|
1550
|
+
imageCommonPanelTitle: ji,
|
|
1551
|
+
imageCommonPanelSubtitle: $i,
|
|
1552
|
+
imageCommonPanelRow: zi,
|
|
1553
|
+
imageCommonPanelColumn: qi,
|
|
1554
|
+
imageCommonPanelSpan2: Xi,
|
|
1555
|
+
imageCommonPanelInput: Ki
|
|
1556
|
+
}, Wn = -1e3, Gn = 1e3, Yi = (i) => {
|
|
1557
|
+
const e = we(z), n = we(ln), t = we(Ie), r = we(ee), o = we(K), { drawings: s } = i, a = s[0];
|
|
1557
1558
|
if (a == null)
|
|
1558
1559
|
return;
|
|
1559
1560
|
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 +1624,7 @@ const lt = {
|
|
|
1623
1624
|
return;
|
|
1624
1625
|
const b = k[0].drawingId, A = k[0].unitId;
|
|
1625
1626
|
let $ = null, F = 0;
|
|
1626
|
-
const
|
|
1627
|
+
const Z = (ie = r.getRenderById(A)) == null ? void 0 : ie.with(se).getSkeleton(), ae = Z == null ? void 0 : Z.getSkeletonData();
|
|
1627
1628
|
if (ae == null)
|
|
1628
1629
|
return;
|
|
1629
1630
|
const { pages: Ue, skeHeaders: Re, skeFooters: We } = ae;
|
|
@@ -1662,8 +1663,8 @@ const lt = {
|
|
|
1662
1663
|
const k = t.getFocusDrawings();
|
|
1663
1664
|
if (k.length === 0)
|
|
1664
1665
|
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 ||
|
|
1666
|
+
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);
|
|
1667
|
+
if (Re == null || F == null || Z == null)
|
|
1667
1668
|
return;
|
|
1668
1669
|
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
1670
|
if (ce == null || te == null || _e == null || ie == null || Se == null)
|
|
@@ -1694,7 +1695,7 @@ const lt = {
|
|
|
1694
1695
|
function _(C) {
|
|
1695
1696
|
E(C), W(String(C ? V.PARAGRAPH : V.PAGE));
|
|
1696
1697
|
}
|
|
1697
|
-
return
|
|
1698
|
+
return Sn(() => {
|
|
1698
1699
|
G();
|
|
1699
1700
|
const C = t.focus$.subscribe((P) => {
|
|
1700
1701
|
if (P.length === 0) {
|
|
@@ -1717,8 +1718,8 @@ const lt = {
|
|
|
1717
1718
|
/* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ f(
|
|
1718
1719
|
ke,
|
|
1719
1720
|
{
|
|
1720
|
-
min:
|
|
1721
|
-
max:
|
|
1721
|
+
min: Wn,
|
|
1722
|
+
max: Gn,
|
|
1722
1723
|
precision: 1,
|
|
1723
1724
|
disabled: w,
|
|
1724
1725
|
value: O.posOffset,
|
|
@@ -1735,7 +1736,7 @@ const lt = {
|
|
|
1735
1736
|
/* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn, u.imageCommonPanelSpan2), children: /* @__PURE__ */ X("label", { children: [
|
|
1736
1737
|
/* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: n.t("image-position.toTheRightOf") }) }),
|
|
1737
1738
|
/* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ f(
|
|
1738
|
-
|
|
1739
|
+
Un,
|
|
1739
1740
|
{
|
|
1740
1741
|
value: String(O.relativeFrom),
|
|
1741
1742
|
disabled: w,
|
|
@@ -1752,8 +1753,8 @@ const lt = {
|
|
|
1752
1753
|
/* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ f(
|
|
1753
1754
|
ke,
|
|
1754
1755
|
{
|
|
1755
|
-
min:
|
|
1756
|
-
max:
|
|
1756
|
+
min: Wn,
|
|
1757
|
+
max: Gn,
|
|
1757
1758
|
precision: 1,
|
|
1758
1759
|
disabled: w,
|
|
1759
1760
|
value: T.posOffset,
|
|
@@ -1770,7 +1771,7 @@ const lt = {
|
|
|
1770
1771
|
/* @__PURE__ */ f("div", { className: j(u.imageCommonPanelColumn, u.imageCommonPanelSpan2), children: /* @__PURE__ */ X("label", { children: [
|
|
1771
1772
|
/* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: n.t("image-position.bellow") }) }),
|
|
1772
1773
|
/* @__PURE__ */ f("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ f("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ f(
|
|
1773
|
-
|
|
1774
|
+
Un,
|
|
1774
1775
|
{
|
|
1775
1776
|
disabled: w,
|
|
1776
1777
|
value: String(T.relativeFrom),
|
|
@@ -1781,10 +1782,10 @@ const lt = {
|
|
|
1781
1782
|
] }) })
|
|
1782
1783
|
] }),
|
|
1783
1784
|
/* @__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(
|
|
1785
|
+
/* @__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
1786
|
] });
|
|
1786
|
-
}, Je = 0, en = 100,
|
|
1787
|
-
const e = we(z), n = we(ln), t = we(Ie), r = we(ee), o = we(
|
|
1787
|
+
}, Je = 0, en = 100, Zi = (i) => {
|
|
1788
|
+
const e = we(z), n = we(ln), t = we(Ie), r = we(ee), o = we(K), { drawings: s } = i, a = s[0];
|
|
1788
1789
|
if (a == null)
|
|
1789
1790
|
return null;
|
|
1790
1791
|
const { unitId: d } = a, c = o.getUniverDocInstance(d), l = r.getRenderById(d);
|
|
@@ -1806,7 +1807,7 @@ const lt = {
|
|
|
1806
1807
|
subUnitId: b,
|
|
1807
1808
|
drawingId: A
|
|
1808
1809
|
}));
|
|
1809
|
-
e.executeCommand(
|
|
1810
|
+
e.executeCommand(Qn.id, {
|
|
1810
1811
|
unitId: R,
|
|
1811
1812
|
subUnitId: P,
|
|
1812
1813
|
drawings: B,
|
|
@@ -1823,7 +1824,7 @@ const lt = {
|
|
|
1823
1824
|
subUnitId: P.subUnitId,
|
|
1824
1825
|
drawingId: P.drawingId
|
|
1825
1826
|
}));
|
|
1826
|
-
e.executeCommand(
|
|
1827
|
+
e.executeCommand(et.id, {
|
|
1827
1828
|
unitId: C[0].unitId,
|
|
1828
1829
|
subUnitId: C[0].unitId,
|
|
1829
1830
|
drawings: R,
|
|
@@ -1843,7 +1844,7 @@ const lt = {
|
|
|
1843
1844
|
subUnitId: k.subUnitId,
|
|
1844
1845
|
drawingId: k.drawingId
|
|
1845
1846
|
}));
|
|
1846
|
-
e.executeCommand(
|
|
1847
|
+
e.executeCommand(Jn.id, {
|
|
1847
1848
|
unitId: P[0].unitId,
|
|
1848
1849
|
subUnitId: P[0].unitId,
|
|
1849
1850
|
drawings: B,
|
|
@@ -1857,8 +1858,8 @@ const lt = {
|
|
|
1857
1858
|
_.length !== 0 && G(_[0]);
|
|
1858
1859
|
}
|
|
1859
1860
|
function G(_) {
|
|
1860
|
-
var
|
|
1861
|
-
const C = (ae = (
|
|
1861
|
+
var Z, ae;
|
|
1862
|
+
const C = (ae = (Z = c == null ? void 0 : c.getSnapshot()) == null ? void 0 : Z.drawings) == null ? void 0 : ae[_.drawingId];
|
|
1862
1863
|
if (C == null)
|
|
1863
1864
|
return;
|
|
1864
1865
|
const {
|
|
@@ -1892,7 +1893,7 @@ const lt = {
|
|
|
1892
1893
|
throw new Error(`Unsupported layout type: ${b}`);
|
|
1893
1894
|
}
|
|
1894
1895
|
}
|
|
1895
|
-
return
|
|
1896
|
+
return Sn(() => {
|
|
1896
1897
|
x();
|
|
1897
1898
|
const _ = t.focus$.subscribe((R) => {
|
|
1898
1899
|
if (R.length === 0) {
|
|
@@ -1909,7 +1910,7 @@ const lt = {
|
|
|
1909
1910
|
}, []), /* @__PURE__ */ X("div", { className: j(u.imageCommonPanelGrid, u.imageCommonPanelBorder), style: { display: U ? "block" : "none" }, children: [
|
|
1910
1911
|
/* @__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
1912
|
/* @__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(
|
|
1913
|
+
/* @__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
1914
|
/* @__PURE__ */ f(Pe, { value: ue.INLINE, children: n.t("image-text-wrap.inline") }),
|
|
1914
1915
|
/* @__PURE__ */ f(Pe, { value: ue.WRAP_SQUARE, children: n.t("image-text-wrap.square") }),
|
|
1915
1916
|
/* @__PURE__ */ f(Pe, { value: ue.WRAP_TOP_AND_BOTTOM, children: n.t("image-text-wrap.topAndBottom") }),
|
|
@@ -1917,7 +1918,7 @@ const lt = {
|
|
|
1917
1918
|
/* @__PURE__ */ f(Pe, { value: ue.IN_FRONT_OF_TEXT, children: n.t("image-text-wrap.inFrontText") })
|
|
1918
1919
|
] }) }) }),
|
|
1919
1920
|
/* @__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(
|
|
1921
|
+
/* @__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
1922
|
/* @__PURE__ */ f(Pe, { value: $e.BOTH_SIDES, children: n.t("image-text-wrap.bothSide") }),
|
|
1922
1923
|
/* @__PURE__ */ f(Pe, { value: $e.LEFT, children: n.t("image-text-wrap.leftOnly") }),
|
|
1923
1924
|
/* @__PURE__ */ f(Pe, { value: $e.RIGHT, children: n.t("image-text-wrap.rightOnly") })
|
|
@@ -1996,9 +1997,9 @@ const lt = {
|
|
|
1996
1997
|
] }) })
|
|
1997
1998
|
] })
|
|
1998
1999
|
] });
|
|
1999
|
-
},
|
|
2000
|
+
}, Qi = () => {
|
|
2000
2001
|
const i = we(Ie), e = i.getFocusDrawings(), [n, t] = re(e);
|
|
2001
|
-
return
|
|
2002
|
+
return Sn(() => {
|
|
2002
2003
|
const r = i.focus$.subscribe((o) => {
|
|
2003
2004
|
t(o);
|
|
2004
2005
|
});
|
|
@@ -2007,12 +2008,12 @@ const lt = {
|
|
|
2007
2008
|
};
|
|
2008
2009
|
}, []), !!(n != null && n.length) && /* @__PURE__ */ X("div", { className: u.imageCommonPanel, children: [
|
|
2009
2010
|
/* @__PURE__ */ f(qt, { drawings: n, hasAlign: !1, hasCropper: !1, hasGroup: !1, hasTransform: !1 }),
|
|
2010
|
-
/* @__PURE__ */ f(
|
|
2011
|
-
/* @__PURE__ */ f(
|
|
2011
|
+
/* @__PURE__ */ f(Zi, { drawings: n }),
|
|
2012
|
+
/* @__PURE__ */ f(Yi, { drawings: n })
|
|
2012
2013
|
] });
|
|
2013
|
-
},
|
|
2014
|
-
const e = i.get(
|
|
2015
|
-
return new
|
|
2014
|
+
}, ht = "addition-and-subtraction-single", pt = "doc.menu.image", wt = gt.id, Ji = (i) => {
|
|
2015
|
+
const e = i.get(_n), n = i.get(K);
|
|
2016
|
+
return new Si((t) => {
|
|
2016
2017
|
const r = e.textSelection$.subscribe(() => {
|
|
2017
2018
|
var s;
|
|
2018
2019
|
const o = e.getActiveTextRange();
|
|
@@ -2034,40 +2035,40 @@ const lt = {
|
|
|
2034
2035
|
return () => r.unsubscribe();
|
|
2035
2036
|
});
|
|
2036
2037
|
};
|
|
2037
|
-
function
|
|
2038
|
+
function er(i) {
|
|
2038
2039
|
return {
|
|
2039
|
-
id:
|
|
2040
|
-
type:
|
|
2041
|
-
icon:
|
|
2040
|
+
id: pt,
|
|
2041
|
+
type: qn.SUBITEMS,
|
|
2042
|
+
icon: ht,
|
|
2042
2043
|
tooltip: "docImage.title",
|
|
2043
|
-
disabled$:
|
|
2044
|
-
hidden$:
|
|
2044
|
+
disabled$: Ji(i),
|
|
2045
|
+
hidden$: zn(i, be.UNIVER_DOC, void 0, In)
|
|
2045
2046
|
};
|
|
2046
2047
|
}
|
|
2047
|
-
function
|
|
2048
|
+
function nr(i) {
|
|
2048
2049
|
return {
|
|
2049
|
-
id:
|
|
2050
|
+
id: wt,
|
|
2050
2051
|
title: "docImage.upload.float",
|
|
2051
|
-
type:
|
|
2052
|
-
hidden$:
|
|
2052
|
+
type: qn.BUTTON,
|
|
2053
|
+
hidden$: zn(i, be.UNIVER_DOC, void 0, In)
|
|
2053
2054
|
};
|
|
2054
2055
|
}
|
|
2055
|
-
const
|
|
2056
|
-
[
|
|
2057
|
-
[
|
|
2056
|
+
const tr = {
|
|
2057
|
+
[ai.LAYOUT]: {
|
|
2058
|
+
[pt]: {
|
|
2058
2059
|
order: 0,
|
|
2059
|
-
menuItemFactory:
|
|
2060
|
-
[
|
|
2060
|
+
menuItemFactory: er,
|
|
2061
|
+
[wt]: {
|
|
2061
2062
|
order: 0,
|
|
2062
|
-
menuItemFactory:
|
|
2063
|
+
menuItemFactory: nr
|
|
2063
2064
|
}
|
|
2064
2065
|
}
|
|
2065
2066
|
}
|
|
2066
2067
|
};
|
|
2067
2068
|
function Ye(i) {
|
|
2068
|
-
return i.getContextValue(
|
|
2069
|
+
return i.getContextValue(Rt) && i.getContextValue(tn);
|
|
2069
2070
|
}
|
|
2070
|
-
const
|
|
2071
|
+
const ir = {
|
|
2071
2072
|
id: Ke.id,
|
|
2072
2073
|
description: "shortcut.doc.drawing-move-down",
|
|
2073
2074
|
group: "4_doc-drawing-view",
|
|
@@ -2077,7 +2078,7 @@ const tr = {
|
|
|
2077
2078
|
staticParameters: {
|
|
2078
2079
|
direction: fe.DOWN
|
|
2079
2080
|
}
|
|
2080
|
-
},
|
|
2081
|
+
}, rr = {
|
|
2081
2082
|
id: Ke.id,
|
|
2082
2083
|
description: "shortcut.doc.drawing-move-up",
|
|
2083
2084
|
group: "4_doc-drawing-view",
|
|
@@ -2087,7 +2088,7 @@ const tr = {
|
|
|
2087
2088
|
staticParameters: {
|
|
2088
2089
|
direction: fe.UP
|
|
2089
2090
|
}
|
|
2090
|
-
},
|
|
2091
|
+
}, or = {
|
|
2091
2092
|
id: Ke.id,
|
|
2092
2093
|
description: "shortcut.doc.drawing-move-left",
|
|
2093
2094
|
group: "4_doc-drawing-view",
|
|
@@ -2097,7 +2098,7 @@ const tr = {
|
|
|
2097
2098
|
staticParameters: {
|
|
2098
2099
|
direction: fe.LEFT
|
|
2099
2100
|
}
|
|
2100
|
-
},
|
|
2101
|
+
}, sr = {
|
|
2101
2102
|
id: Ke.id,
|
|
2102
2103
|
description: "shortcut.doc.drawing-move-right",
|
|
2103
2104
|
group: "4_doc-drawing-view",
|
|
@@ -2107,8 +2108,8 @@ const tr = {
|
|
|
2107
2108
|
staticParameters: {
|
|
2108
2109
|
direction: fe.RIGHT
|
|
2109
2110
|
}
|
|
2110
|
-
},
|
|
2111
|
-
id:
|
|
2111
|
+
}, ar = {
|
|
2112
|
+
id: st.id,
|
|
2112
2113
|
description: "shortcut.doc.drawing-delete",
|
|
2113
2114
|
group: "4_doc-drawing-view",
|
|
2114
2115
|
// when focusing on any other input tag do not trigger this shortcut
|
|
@@ -2116,8 +2117,8 @@ const tr = {
|
|
|
2116
2117
|
binding: He.DELETE,
|
|
2117
2118
|
mac: He.BACKSPACE
|
|
2118
2119
|
};
|
|
2119
|
-
var
|
|
2120
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2120
|
+
var cr = Object.getOwnPropertyDescriptor, dr = (i, e, n, t) => {
|
|
2121
|
+
for (var r = t > 1 ? void 0 : t ? cr(e, n) : e, o = i.length - 1, s; o >= 0; o--)
|
|
2121
2122
|
(s = i[o]) && (r = s(r) || r);
|
|
2122
2123
|
return r;
|
|
2123
2124
|
}, nn = (i, e) => (n, t) => e(n, t, i);
|
|
@@ -2127,40 +2128,40 @@ let an = class extends Xe {
|
|
|
2127
2128
|
}
|
|
2128
2129
|
_initCustomComponents() {
|
|
2129
2130
|
const i = this._componentManager;
|
|
2130
|
-
this.disposeWithMe(i.register(
|
|
2131
|
+
this.disposeWithMe(i.register(ht, ot)), this.disposeWithMe(i.register(mt, Qi));
|
|
2131
2132
|
}
|
|
2132
2133
|
_initMenus() {
|
|
2133
|
-
this._menuManagerService.mergeMenu(
|
|
2134
|
+
this._menuManagerService.mergeMenu(tr);
|
|
2134
2135
|
}
|
|
2135
2136
|
_initCommands() {
|
|
2136
2137
|
[
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
Zn,
|
|
2138
|
+
gt,
|
|
2139
|
+
ct,
|
|
2140
2140
|
Qn,
|
|
2141
2141
|
Jn,
|
|
2142
|
-
qe,
|
|
2143
2142
|
et,
|
|
2143
|
+
qe,
|
|
2144
2144
|
nt,
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
Fi,
|
|
2145
|
+
tt,
|
|
2146
|
+
Cn,
|
|
2148
2147
|
ut,
|
|
2149
|
-
|
|
2150
|
-
|
|
2148
|
+
Hi,
|
|
2149
|
+
ft,
|
|
2150
|
+
at,
|
|
2151
|
+
lt,
|
|
2151
2152
|
Ke,
|
|
2152
|
-
|
|
2153
|
-
|
|
2153
|
+
st,
|
|
2154
|
+
dt
|
|
2154
2155
|
].forEach((i) => this.disposeWithMe(this._commandService.registerCommand(i)));
|
|
2155
2156
|
}
|
|
2156
2157
|
_initShortcuts() {
|
|
2157
2158
|
[
|
|
2158
2159
|
// sheet drawing shortcuts
|
|
2159
|
-
tr,
|
|
2160
2160
|
ir,
|
|
2161
2161
|
rr,
|
|
2162
2162
|
or,
|
|
2163
|
-
sr
|
|
2163
|
+
sr,
|
|
2164
|
+
ar
|
|
2164
2165
|
].forEach((i) => {
|
|
2165
2166
|
this.disposeWithMe(this._shortcutService.registerShortcut(i));
|
|
2166
2167
|
});
|
|
@@ -2169,25 +2170,25 @@ let an = class extends Xe {
|
|
|
2169
2170
|
this._initCommands(), this._initCustomComponents(), this._initMenus(), this._initShortcuts();
|
|
2170
2171
|
}
|
|
2171
2172
|
};
|
|
2172
|
-
an =
|
|
2173
|
-
nn(0, ve(
|
|
2174
|
-
nn(1,
|
|
2173
|
+
an = dr([
|
|
2174
|
+
nn(0, ve(ci)),
|
|
2175
|
+
nn(1, di),
|
|
2175
2176
|
nn(2, z),
|
|
2176
|
-
nn(3,
|
|
2177
|
+
nn(3, li)
|
|
2177
2178
|
], an);
|
|
2178
|
-
var
|
|
2179
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2179
|
+
var lr = Object.getOwnPropertyDescriptor, gr = (i, e, n, t) => {
|
|
2180
|
+
for (var r = t > 1 ? void 0 : t ? lr(e, n) : e, o = i.length - 1, s; o >= 0; o--)
|
|
2180
2181
|
(s = i[o]) && (r = s(r) || r);
|
|
2181
2182
|
return r;
|
|
2182
2183
|
}, je = (i, e) => (n, t) => e(n, t, i);
|
|
2183
|
-
let cn = class extends
|
|
2184
|
+
let cn = class extends Nt {
|
|
2184
2185
|
constructor(e, n, t, r, o) {
|
|
2185
2186
|
super();
|
|
2186
2187
|
Ce(this, "_initImagePopupMenu", /* @__PURE__ */ new Set());
|
|
2187
2188
|
this._drawingManagerService = e, this._canvasPopManagerService = n, this._renderManagerService = t, this._univerInstanceService = r, this._contextService = o, this._init();
|
|
2188
2189
|
}
|
|
2189
2190
|
_init() {
|
|
2190
|
-
this._univerInstanceService.getCurrentTypeOfUnit$(be.UNIVER_DOC).pipe(
|
|
2191
|
+
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
2192
|
}
|
|
2192
2193
|
_dispose(e) {
|
|
2193
2194
|
const n = e.getUnitId();
|
|
@@ -2274,14 +2275,14 @@ let cn = class extends Rt {
|
|
|
2274
2275
|
{
|
|
2275
2276
|
label: "image-popup.edit",
|
|
2276
2277
|
index: 0,
|
|
2277
|
-
commandId:
|
|
2278
|
+
commandId: ft.id,
|
|
2278
2279
|
commandParams: { unitId: e, subUnitId: n, drawingId: t },
|
|
2279
|
-
disable: !!
|
|
2280
|
+
disable: !!Et.includes(e)
|
|
2280
2281
|
},
|
|
2281
2282
|
{
|
|
2282
2283
|
label: "image-popup.delete",
|
|
2283
2284
|
index: 1,
|
|
2284
|
-
commandId:
|
|
2285
|
+
commandId: Cn.id,
|
|
2285
2286
|
commandParams: { unitId: e, drawings: [{ unitId: e, subUnitId: n, drawingId: t }] },
|
|
2286
2287
|
disable: !1
|
|
2287
2288
|
},
|
|
@@ -2304,22 +2305,22 @@ let cn = class extends Rt {
|
|
|
2304
2305
|
];
|
|
2305
2306
|
}
|
|
2306
2307
|
};
|
|
2307
|
-
cn =
|
|
2308
|
+
cn = gr([
|
|
2308
2309
|
je(0, Ie),
|
|
2309
|
-
je(1, ve(
|
|
2310
|
+
je(1, ve(wi)),
|
|
2310
2311
|
je(2, ee),
|
|
2311
|
-
je(3,
|
|
2312
|
-
je(4,
|
|
2312
|
+
je(3, K),
|
|
2313
|
+
je(4, jn)
|
|
2313
2314
|
], cn);
|
|
2314
|
-
var
|
|
2315
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2315
|
+
var mr = Object.getOwnPropertyDescriptor, ur = (i, e, n, t) => {
|
|
2316
|
+
for (var r = t > 1 ? void 0 : t ? mr(e, n) : e, o = i.length - 1, s; o >= 0; o--)
|
|
2316
2317
|
(s = i[o]) && (r = s(r) || r);
|
|
2317
2318
|
return r;
|
|
2318
2319
|
}, xe = (i, e) => (n, t) => e(n, t, i);
|
|
2319
2320
|
let wn = class extends Xe {
|
|
2320
2321
|
constructor(e, n, t, r, o, s, a, d) {
|
|
2321
2322
|
super();
|
|
2322
|
-
Ce(this, "_liquid", new
|
|
2323
|
+
Ce(this, "_liquid", new $n());
|
|
2323
2324
|
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
2325
|
}
|
|
2325
2326
|
_initialize() {
|
|
@@ -2333,7 +2334,7 @@ let wn = class extends Xe {
|
|
|
2333
2334
|
});
|
|
2334
2335
|
}
|
|
2335
2336
|
_commandExecutedListener() {
|
|
2336
|
-
const e = [J.id,
|
|
2337
|
+
const e = [J.id, Ii.id];
|
|
2337
2338
|
this.disposeWithMe(
|
|
2338
2339
|
this._commandService.onCommandExecuted((n) => {
|
|
2339
2340
|
if (e.includes(n.id)) {
|
|
@@ -2343,7 +2344,7 @@ let wn = class extends Xe {
|
|
|
2343
2344
|
const a = this._docSkeletonManagerService.getSkeleton();
|
|
2344
2345
|
if (a == null)
|
|
2345
2346
|
return;
|
|
2346
|
-
if (this._editorService.isEditor(o) && o !==
|
|
2347
|
+
if (this._editorService.isEditor(o) && o !== In) {
|
|
2347
2348
|
s == null || s.makeDirty();
|
|
2348
2349
|
return;
|
|
2349
2350
|
}
|
|
@@ -2355,8 +2356,8 @@ let wn = class extends Xe {
|
|
|
2355
2356
|
_initResize() {
|
|
2356
2357
|
this.disposeWithMe(
|
|
2357
2358
|
xt(this._context.engine.onTransformChange$).pipe(
|
|
2358
|
-
|
|
2359
|
-
|
|
2359
|
+
Ln((e) => e.type === ii.resize),
|
|
2360
|
+
Xn(16)
|
|
2360
2361
|
).subscribe(() => {
|
|
2361
2362
|
var t;
|
|
2362
2363
|
const e = this._docSkeletonManagerService.getSkeleton(), { scene: n } = this._context;
|
|
@@ -2447,35 +2448,35 @@ let wn = class extends Xe {
|
|
|
2447
2448
|
const n = this._docSkeletonManagerService.getSkeleton();
|
|
2448
2449
|
n != null && (this._refreshDrawing(n), this._drawingManagerService.initializeNotification(this._context.unitId));
|
|
2449
2450
|
};
|
|
2450
|
-
this._lifecycleService.stage ===
|
|
2451
|
+
this._lifecycleService.stage === Pn.Steady ? setTimeout(() => {
|
|
2451
2452
|
e();
|
|
2452
|
-
}, 1e3) : this._lifecycleService.lifecycle$.pipe(
|
|
2453
|
+
}, 1e3) : this._lifecycleService.lifecycle$.pipe(Ln((n) => n === Pn.Steady)).subscribe(e);
|
|
2453
2454
|
}
|
|
2454
2455
|
};
|
|
2455
|
-
wn =
|
|
2456
|
+
wn = ur([
|
|
2456
2457
|
xe(1, ve(se)),
|
|
2457
2458
|
xe(2, z),
|
|
2458
|
-
xe(3,
|
|
2459
|
+
xe(3, vi),
|
|
2459
2460
|
xe(4, Ie),
|
|
2460
2461
|
xe(5, ve(gn)),
|
|
2461
|
-
xe(6,
|
|
2462
|
-
xe(7, ve(
|
|
2462
|
+
xe(6, K),
|
|
2463
|
+
xe(7, ve(At))
|
|
2463
2464
|
], wn);
|
|
2464
|
-
var
|
|
2465
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2465
|
+
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) => {
|
|
2466
|
+
for (var r = t > 1 ? void 0 : t ? hr(e, n) : e, o = i.length - 1, s; o >= 0; o--)
|
|
2466
2467
|
(s = i[o]) && (r = s(r) || r);
|
|
2467
2468
|
return r;
|
|
2468
|
-
}, pn = (i, e) => (n, t) => e(n, t, i),
|
|
2469
|
-
const
|
|
2469
|
+
}, pn = (i, e) => (n, t) => e(n, t, i), vt = (i, e, n) => pr(i, typeof e != "symbol" ? e + "" : e, n);
|
|
2470
|
+
const vr = "DOC_DRAWING_UI_PLUGIN";
|
|
2470
2471
|
let dn = class extends kt {
|
|
2471
|
-
constructor(i =
|
|
2472
|
+
constructor(i = Fn, e, n, t) {
|
|
2472
2473
|
super(), this._config = i, this._injector = e, this._renderManagerSrv = n, this._configService = t;
|
|
2473
2474
|
const { ...r } = Ft(
|
|
2474
2475
|
{},
|
|
2475
|
-
|
|
2476
|
+
Fn,
|
|
2476
2477
|
this._config
|
|
2477
2478
|
);
|
|
2478
|
-
this._configService.setConfig(
|
|
2479
|
+
this._configService.setConfig(Oi, r);
|
|
2479
2480
|
}
|
|
2480
2481
|
onStarting() {
|
|
2481
2482
|
[
|
|
@@ -2496,26 +2497,26 @@ let dn = class extends kt {
|
|
|
2496
2497
|
this._injector.get(cn);
|
|
2497
2498
|
}
|
|
2498
2499
|
};
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
dn =
|
|
2502
|
-
Lt(Qt, zt, Ht,
|
|
2500
|
+
vt(dn, "type", be.UNIVER_DOC);
|
|
2501
|
+
vt(dn, "pluginName", vr);
|
|
2502
|
+
dn = wr([
|
|
2503
|
+
Lt(Qt, zt, Ht, gi),
|
|
2503
2504
|
pn(1, ve(Bt)),
|
|
2504
2505
|
pn(2, ee),
|
|
2505
2506
|
pn(3, Ut)
|
|
2506
2507
|
], dn);
|
|
2507
2508
|
export {
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2509
|
+
Hi as ClearDocDrawingTransformerOperation,
|
|
2510
|
+
pt as DOCS_IMAGE_MENU_ID,
|
|
2511
|
+
st as DeleteDocDrawingsCommand,
|
|
2512
|
+
ft as EditDocDrawingOperation,
|
|
2513
|
+
at as GroupDocDrawingCommand,
|
|
2514
|
+
ct as InsertDocDrawingCommand,
|
|
2515
|
+
gt as InsertDocImageCommand,
|
|
2515
2516
|
Ke as MoveDocDrawingsCommand,
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2517
|
+
Cn as RemoveDocDrawingCommand,
|
|
2518
|
+
dt as SetDocDrawingArrangeCommand,
|
|
2519
|
+
ut as SidebarDocDrawingOperation,
|
|
2520
|
+
lt as UngroupDocDrawingCommand,
|
|
2520
2521
|
dn as UniverDocsDrawingUIPlugin
|
|
2521
2522
|
};
|