@univerjs/sheets-drawing-ui 0.2.4 → 0.2.5
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 +509 -508
- package/lib/types/controllers/drawing-popup-menu.controller.d.ts +1 -2
- package/lib/types/controllers/sheet-drawing.controller.d.ts +1 -2
- package/lib/types/plugin.d.ts +1 -2
- package/lib/types/services/canvas-float-dom-manager.service.d.ts +8 -2
- package/lib/types/views/menu/image.menu.d.ts +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +20 -22
package/lib/es/index.js
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var H = (i, e, n) =>
|
|
4
|
-
import { CommandType as F, ICommandService as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import L, { useEffect as rt, forwardRef as Lt, useRef as Bt, createElement as Wt, useState as et } from "react";
|
|
16
|
-
import { MessageType as be, RadioGroup as cr, Radio as Xe } from "@univerjs/design";
|
|
1
|
+
var tn = Object.defineProperty;
|
|
2
|
+
var nn = (i, e, n) => e in i ? tn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n;
|
|
3
|
+
var H = (i, e, n) => nn(i, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { CommandType as F, ICommandService as G, IUndoRedoService as ge, LocaleService as _e, IUniverInstanceService as he, useDependency as Z, RxDisposable as rn, UniverInstanceType as B, connectInjector as sn, toDisposable as on, FOCUSING_COMMON_DRAWINGS as we, OnLifecycle as ee, LifecycleStages as te, Inject as W, Injector as nt, IContextService as vt, Disposable as oe, Direction as q, FOCUSING_FORMULA_EDITOR as an, EDITOR_ACTIVATED as cn, Rectangle as dn, DrawingTypeEnum as ke, DisposableCollection as ln, Tools as ie, UserManagerService as un, IPermissionService as gn, Plugin as hn, DependentOn as mn } from "@univerjs/core";
|
|
5
|
+
import { ImageCropperObject as fn, COMPONENT_IMAGE_POPUP_MENU as pn, OpenImageCropOperation as wn, ImageResetSizeOperation as _n, DrawingCommonPanel as vn, DrawingRenderService as Sn, UniverDrawingUIPlugin as Cn } from "@univerjs/drawing-ui";
|
|
6
|
+
import { ISheetDrawingService as k, SetDrawingApplyMutation as E, DrawingApplyType as y, SheetDrawingAnchorType as P, UniverSheetsDrawingPlugin as In } from "@univerjs/sheets-drawing";
|
|
7
|
+
import { IDrawingManagerService as z, IImageIoService as St, ArrangeTypeEnum as Ce, DrawingTypeEnum as Ge, DRAWING_IMAGE_COUNT_LIMIT as lt, ImageUploadStatusType as He, DRAWING_IMAGE_ALLOW_SIZE as Rn, getImageSize as Mn, DRAWING_IMAGE_WIDTH_LIMIT as ut, DRAWING_IMAGE_HEIGHT_LIMIT as gt, DRAWING_IMAGE_ALLOW_IMAGE_LIST as Dn, getDrawingShapeKeyByDrawingSearch as bn, UniverDrawingPlugin as En } from "@univerjs/drawing";
|
|
8
|
+
import { IRenderManagerService as K, getGroupState as yn, transformObjectOutOfGroup as On, precisionTo as Q, Rect as Pn, DRAWING_OBJECT_LAYER_INDEX as Tn, SHEET_VIEWPORT_KEY as Un, RENDER_CLASS_TYPE as ae } from "@univerjs/engine-render";
|
|
9
|
+
import { SheetCanvasPopManagerService as An, ISheetSelectionRenderService as xe, SheetSkeletonManagerService as se, attachRangeWithCoord as Nn, getCurrentRangeDisable$ as jn, SetScrollOperation as Ln, SetZoomRatioOperation as Bn, SheetPrintInterceptorService as Wn, COPY_TYPE as ht, PREDEFINED_HOOK_NAME as Ie, virtualizeDiscreteRanges as $n, ISheetClipboardService as Vn } from "@univerjs/sheets-ui";
|
|
10
|
+
import { takeUntil as mt, Subject as ft, BehaviorSubject as Gn, combineLatest as Re, map as pt, filter as Me, distinctUntilChanged as De } from "rxjs";
|
|
11
|
+
import { ISidebarService as xn, BuiltInUIPart as Fn, IUIPartsService as Yn, IMessageService as kn, MenuItemType as Ct, MenuPosition as Hn, MenuGroup as Xn, getMenuHiddenObservable as It, KeyCode as ue, ComponentManager as zn, IMenuService as Kn, IShortcutService as Jn, CanvasFloatDomService as Zn } from "@univerjs/ui";
|
|
12
|
+
import { getSheetCommandTarget as le, SheetsSelectionsService as qn, WorkbookEditablePermission as qe, WorksheetEditPermission as Pe, RangeProtectionPermissionEditPoint as Qn, InsertRowCommand as Rt, InsertColCommand as Mt, RemoveRowCommand as Dt, RemoveColCommand as bt, DeleteRangeMoveLeftCommand as Et, DeleteRangeMoveUpCommand as yt, InsertRangeMoveDownCommand as Ot, InsertRangeMoveRightCommand as Pt, DeltaRowHeightCommand as Qe, SetRowHeightCommand as et, DeltaColumnWidthCommand as Tt, SetColWidthCommand as Ut, SetRowHiddenCommand as At, SetSpecificRowsVisibleCommand as Nt, SetSpecificColsVisibleCommand as jt, SetColHiddenCommand as Lt, SetRowVisibleMutation as er, SetRowHiddenMutation as tr, SetColVisibleMutation as nr, SetColHiddenMutation as rr, SetWorksheetRowHeightMutation as ir, SetWorksheetColWidthMutation as sr, SetWorksheetActiveOperation as or, SheetInterceptorService as ar, SetFrozenMutation as cr, WorkbookViewPermission as wt, WorksheetViewPermission as Xe } from "@univerjs/sheets";
|
|
13
|
+
import L, { useEffect as rt, forwardRef as Bt, useRef as Wt, createElement as $t, useState as tt } from "react";
|
|
14
|
+
import { MessageType as be, RadioGroup as dr, Radio as ze } from "@univerjs/design";
|
|
17
15
|
import Ee from "clsx";
|
|
18
16
|
const j = {
|
|
19
17
|
id: "sheet.operation.clear-drawing-transformer",
|
|
@@ -29,7 +27,7 @@ const j = {
|
|
|
29
27
|
id: "sheet.command.remove-sheet-image",
|
|
30
28
|
type: F.COMMAND,
|
|
31
29
|
handler: (i, e) => {
|
|
32
|
-
const n = i.get(
|
|
30
|
+
const n = i.get(G), t = i.get(ge), r = i.get(k);
|
|
33
31
|
if (!e) return !1;
|
|
34
32
|
const { drawings: s } = e, o = [];
|
|
35
33
|
s.forEach((f) => {
|
|
@@ -49,17 +47,17 @@ const j = {
|
|
|
49
47
|
]
|
|
50
48
|
}), !0) : !1;
|
|
51
49
|
}
|
|
52
|
-
},
|
|
50
|
+
}, Vt = "COMPONENT_SHEET_DRAWING_PANEL", Gt = {
|
|
53
51
|
id: "sidebar.operation.sheet-image",
|
|
54
52
|
type: F.COMMAND,
|
|
55
53
|
handler: async (i, e) => {
|
|
56
|
-
const n = i.get(
|
|
54
|
+
const n = i.get(xn), t = i.get(_e), r = i.get(he), s = i.get(z);
|
|
57
55
|
if (!le(r)) return !1;
|
|
58
56
|
switch (e.value) {
|
|
59
57
|
case "open":
|
|
60
58
|
n.open({
|
|
61
59
|
header: { title: t.t("sheetImage.panel.title") },
|
|
62
|
-
children: { label:
|
|
60
|
+
children: { label: Vt },
|
|
63
61
|
onClose: () => {
|
|
64
62
|
s.focusDrawing(null);
|
|
65
63
|
},
|
|
@@ -73,21 +71,21 @@ const j = {
|
|
|
73
71
|
}
|
|
74
72
|
return !0;
|
|
75
73
|
}
|
|
76
|
-
},
|
|
74
|
+
}, xt = {
|
|
77
75
|
id: "sheet.operation.edit-sheet-image",
|
|
78
76
|
type: F.OPERATION,
|
|
79
77
|
handler: (i, e) => {
|
|
80
|
-
const n = i.get(z), t = i.get(
|
|
81
|
-
return e == null ? !1 : (n.focusDrawing([e]), t.executeCommand(
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
uploadLoading:
|
|
85
|
-
uploadLoadingBody:
|
|
86
|
-
uploadLoadingBodyAnimation:
|
|
87
|
-
univerCircleAnimation:
|
|
88
|
-
uploadLoadingBodyText:
|
|
89
|
-
},
|
|
90
|
-
const i =
|
|
78
|
+
const n = i.get(z), t = i.get(G);
|
|
79
|
+
return e == null ? !1 : (n.focusDrawing([e]), t.executeCommand(Gt.id, { value: "open" }), !0);
|
|
80
|
+
}
|
|
81
|
+
}, lr = "univer-upload-loading", ur = "univer-upload-loading-body", gr = "univer-upload-loading-body-animation", hr = "univer-UniverCircleAnimation", mr = "univer-upload-loading-body-text", ye = {
|
|
82
|
+
uploadLoading: lr,
|
|
83
|
+
uploadLoadingBody: ur,
|
|
84
|
+
uploadLoadingBodyAnimation: gr,
|
|
85
|
+
univerCircleAnimation: hr,
|
|
86
|
+
uploadLoadingBodyText: mr
|
|
87
|
+
}, fr = () => {
|
|
88
|
+
const i = Z(St), e = Z(_e), [n, t] = L.useState(0);
|
|
91
89
|
return rt(() => {
|
|
92
90
|
const r = i.change$.subscribe((s) => {
|
|
93
91
|
t(s);
|
|
@@ -97,19 +95,19 @@ const j = {
|
|
|
97
95
|
};
|
|
98
96
|
}, [i]), /* @__PURE__ */ L.createElement("div", { style: { display: n > 0 ? "block" : "none" }, className: ye.uploadLoading }, /* @__PURE__ */ L.createElement("div", { className: ye.uploadLoadingBody }, /* @__PURE__ */ L.createElement("div", { className: ye.uploadLoadingBodyAnimation }), /* @__PURE__ */ L.createElement("div", { className: ye.uploadLoadingBodyText }, `${e.t("uploadLoading.loading")}: ${n}`)));
|
|
99
97
|
};
|
|
100
|
-
var
|
|
101
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
98
|
+
var pr = Object.defineProperty, wr = Object.getOwnPropertyDescriptor, _r = (i, e, n, t) => {
|
|
99
|
+
for (var r = t > 1 ? void 0 : t ? wr(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
102
100
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
103
|
-
return t && r &&
|
|
104
|
-
},
|
|
105
|
-
let Te = class extends
|
|
101
|
+
return t && r && pr(e, n, r), r;
|
|
102
|
+
}, re = (i, e) => (n, t) => e(n, t, i);
|
|
103
|
+
let Te = class extends rn {
|
|
106
104
|
constructor(e, n, t, r, s, o, a) {
|
|
107
105
|
super();
|
|
108
106
|
H(this, "_initImagePopupMenu", /* @__PURE__ */ new Set());
|
|
109
107
|
this._injector = e, this._drawingManagerService = n, this._canvasPopManagerService = t, this._renderManagerService = r, this._univerInstanceService = s, this._contextService = o, this._uiPartsService = a, this._init();
|
|
110
108
|
}
|
|
111
109
|
_init() {
|
|
112
|
-
this._univerInstanceService.getCurrentTypeOfUnit$(B.UNIVER_SHEET).pipe(
|
|
110
|
+
this._univerInstanceService.getCurrentTypeOfUnit$(B.UNIVER_SHEET).pipe(mt(this.dispose$)).subscribe((e) => this._create(e)), this._univerInstanceService.getTypeOfUnitDisposed$(B.UNIVER_SHEET).pipe(mt(this.dispose$)).subscribe((e) => this._dispose(e)), this._univerInstanceService.getAllUnitsForType(B.UNIVER_SHEET).forEach((e) => this._create(e)), this._uiPartsService.registerComponent(Fn.CONTENT, () => sn(fr, this._injector));
|
|
113
111
|
}
|
|
114
112
|
_dispose(e) {
|
|
115
113
|
const n = e.getUnitId();
|
|
@@ -124,7 +122,7 @@ let Te = class extends nn {
|
|
|
124
122
|
_hasCropObject(e) {
|
|
125
123
|
const n = e.getAllObjects();
|
|
126
124
|
for (const t of n)
|
|
127
|
-
if (t instanceof
|
|
125
|
+
if (t instanceof fn)
|
|
128
126
|
return !0;
|
|
129
127
|
return !1;
|
|
130
128
|
}
|
|
@@ -138,7 +136,7 @@ let Te = class extends nn {
|
|
|
138
136
|
return;
|
|
139
137
|
let r;
|
|
140
138
|
this.disposeWithMe(
|
|
141
|
-
|
|
139
|
+
on(
|
|
142
140
|
t.createControl$.subscribe(() => {
|
|
143
141
|
if (this._contextService.setContextValue(we, !0), this._hasCropObject(n))
|
|
144
142
|
return;
|
|
@@ -155,7 +153,7 @@ let Te = class extends nn {
|
|
|
155
153
|
return;
|
|
156
154
|
const { unitId: l, subUnitId: c, drawingId: u } = h;
|
|
157
155
|
r == null || r.dispose(), r = this.disposeWithMe(this._canvasPopManagerService.attachPopupToObject(a, {
|
|
158
|
-
componentKey:
|
|
156
|
+
componentKey: pn,
|
|
159
157
|
direction: "horizontal",
|
|
160
158
|
offset: [2, 0],
|
|
161
159
|
extraProps: {
|
|
@@ -183,7 +181,7 @@ let Te = class extends nn {
|
|
|
183
181
|
{
|
|
184
182
|
label: "image-popup.edit",
|
|
185
183
|
index: 0,
|
|
186
|
-
commandId:
|
|
184
|
+
commandId: xt.id,
|
|
187
185
|
commandParams: { unitId: e, subUnitId: n, drawingId: t },
|
|
188
186
|
disable: !1
|
|
189
187
|
},
|
|
@@ -197,35 +195,35 @@ let Te = class extends nn {
|
|
|
197
195
|
{
|
|
198
196
|
label: "image-popup.crop",
|
|
199
197
|
index: 2,
|
|
200
|
-
commandId:
|
|
198
|
+
commandId: wn.id,
|
|
201
199
|
commandParams: { unitId: e, subUnitId: n, drawingId: t },
|
|
202
200
|
disable: !1
|
|
203
201
|
},
|
|
204
202
|
{
|
|
205
203
|
label: "image-popup.reset",
|
|
206
204
|
index: 3,
|
|
207
|
-
commandId:
|
|
205
|
+
commandId: _n.id,
|
|
208
206
|
commandParams: [{ unitId: e, subUnitId: n, drawingId: t }],
|
|
209
207
|
disable: !1
|
|
210
208
|
}
|
|
211
209
|
];
|
|
212
210
|
}
|
|
213
211
|
};
|
|
214
|
-
Te =
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
212
|
+
Te = _r([
|
|
213
|
+
ee(te.Steady, Te),
|
|
214
|
+
re(0, W(nt)),
|
|
215
|
+
re(1, z),
|
|
216
|
+
re(2, W(An)),
|
|
217
|
+
re(3, K),
|
|
218
|
+
re(4, he),
|
|
219
|
+
re(5, vt),
|
|
220
|
+
re(6, W(Yn))
|
|
223
221
|
], Te);
|
|
224
|
-
const
|
|
222
|
+
const Fe = {
|
|
225
223
|
id: "sheet.operation.insert-float-image",
|
|
226
224
|
type: F.OPERATION,
|
|
227
225
|
handler: (i, e) => !0
|
|
228
|
-
},
|
|
226
|
+
}, We = {
|
|
229
227
|
id: "sheet.operation.insert-cell-image",
|
|
230
228
|
type: F.OPERATION,
|
|
231
229
|
handler: (i, e) => !0
|
|
@@ -233,7 +231,7 @@ const xe = {
|
|
|
233
231
|
id: "sheet.command.insert-sheet-image",
|
|
234
232
|
type: F.COMMAND,
|
|
235
233
|
handler: (i, e) => {
|
|
236
|
-
const n = i.get(
|
|
234
|
+
const n = i.get(G), t = i.get(ge), r = i.get(k);
|
|
237
235
|
if (!e) return !1;
|
|
238
236
|
const s = e.drawings, o = s.map((f) => f.unitId), a = r.getBatchAddOp(s), { unitId: d, subUnitId: h, undo: l, redo: c, objects: u } = a;
|
|
239
237
|
return n.syncExecuteCommand(E.id, { op: c, unitId: d, subUnitId: h, objects: u, type: y.INSERT }) ? (t.pushUndoRedo({
|
|
@@ -248,11 +246,11 @@ const xe = {
|
|
|
248
246
|
]
|
|
249
247
|
}), !0) : !1;
|
|
250
248
|
}
|
|
251
|
-
},
|
|
249
|
+
}, Ye = {
|
|
252
250
|
id: "sheet.command.set-sheet-image",
|
|
253
251
|
type: F.COMMAND,
|
|
254
252
|
handler: (i, e) => {
|
|
255
|
-
const n = i.get(
|
|
253
|
+
const n = i.get(G), t = i.get(ge), r = i.get(k);
|
|
256
254
|
if (!e) return !1;
|
|
257
255
|
const { drawings: s } = e, o = r.getBatchUpdateOp(s), { unitId: a, subUnitId: d, undo: h, redo: l, objects: c } = o;
|
|
258
256
|
return n.syncExecuteCommand(E.id, { unitId: a, subUnitId: d, op: l, objects: c, type: y.UPDATE }) ? (t.pushUndoRedo({
|
|
@@ -267,11 +265,11 @@ const xe = {
|
|
|
267
265
|
]
|
|
268
266
|
}), !0) : !1;
|
|
269
267
|
}
|
|
270
|
-
},
|
|
268
|
+
}, Ft = {
|
|
271
269
|
id: "sheet.command.set-drawing-arrange",
|
|
272
270
|
type: F.COMMAND,
|
|
273
271
|
handler: (i, e) => {
|
|
274
|
-
const n = i.get(
|
|
272
|
+
const n = i.get(G), t = i.get(ge);
|
|
275
273
|
if (!e) return !1;
|
|
276
274
|
const r = i.get(k), { unitId: s, subUnitId: o, drawingIds: a, arrangeType: d } = e, h = { unitId: s, subUnitId: o, drawingIds: a };
|
|
277
275
|
let l;
|
|
@@ -289,10 +287,10 @@ const xe = {
|
|
|
289
287
|
}), !0) : !1;
|
|
290
288
|
}
|
|
291
289
|
};
|
|
292
|
-
function
|
|
290
|
+
function vr(i) {
|
|
293
291
|
const e = [];
|
|
294
292
|
return i.forEach((n) => {
|
|
295
|
-
const { parent: t, children: r } = n, { unitId: s, subUnitId: o, drawingId: a } = t, d =
|
|
293
|
+
const { parent: t, children: r } = n, { unitId: s, subUnitId: o, drawingId: a } = t, d = yn(0, 0, r.map((c) => c.transform || {})), h = r.map((c) => {
|
|
296
294
|
const u = c.transform || { left: 0, top: 0 }, { unitId: g, subUnitId: f, drawingId: m } = c;
|
|
297
295
|
return {
|
|
298
296
|
unitId: g,
|
|
@@ -309,7 +307,7 @@ function _r(i) {
|
|
|
309
307
|
unitId: s,
|
|
310
308
|
subUnitId: o,
|
|
311
309
|
drawingId: a,
|
|
312
|
-
drawingType:
|
|
310
|
+
drawingType: Ge.DRAWING_GROUP,
|
|
313
311
|
transform: d
|
|
314
312
|
};
|
|
315
313
|
e.push({
|
|
@@ -318,14 +316,14 @@ function _r(i) {
|
|
|
318
316
|
});
|
|
319
317
|
}), e;
|
|
320
318
|
}
|
|
321
|
-
function
|
|
319
|
+
function Sr(i) {
|
|
322
320
|
const e = [];
|
|
323
321
|
return i.forEach((n) => {
|
|
324
322
|
const { parent: t, children: r } = n, { unitId: s, subUnitId: o, drawingId: a, transform: d = { width: 0, height: 0 } } = t;
|
|
325
323
|
if (d == null)
|
|
326
324
|
return;
|
|
327
325
|
const h = r.map((c) => {
|
|
328
|
-
const { transform: u } = c, { unitId: g, subUnitId: f, drawingId: m } = c, p =
|
|
326
|
+
const { transform: u } = c, { unitId: g, subUnitId: f, drawingId: m } = c, p = On(u || {}, d, d.width || 0, d.height || 0);
|
|
329
327
|
return {
|
|
330
328
|
unitId: g,
|
|
331
329
|
subUnitId: f,
|
|
@@ -337,7 +335,7 @@ function vr(i) {
|
|
|
337
335
|
unitId: s,
|
|
338
336
|
subUnitId: o,
|
|
339
337
|
drawingId: a,
|
|
340
|
-
drawingType:
|
|
338
|
+
drawingType: Ge.DRAWING_GROUP,
|
|
341
339
|
transform: {
|
|
342
340
|
left: 0,
|
|
343
341
|
top: 0
|
|
@@ -349,11 +347,11 @@ function vr(i) {
|
|
|
349
347
|
});
|
|
350
348
|
}), e;
|
|
351
349
|
}
|
|
352
|
-
const
|
|
350
|
+
const Yt = {
|
|
353
351
|
id: "sheet.command.group-sheet-image",
|
|
354
352
|
type: F.COMMAND,
|
|
355
353
|
handler: (i, e) => {
|
|
356
|
-
const n = i.get(
|
|
354
|
+
const n = i.get(G), t = i.get(ge), r = i.get(k);
|
|
357
355
|
if (!e) return !1;
|
|
358
356
|
const s = [];
|
|
359
357
|
e.forEach(({ parent: g, children: f }) => {
|
|
@@ -365,7 +363,7 @@ const Ft = {
|
|
|
365
363
|
return n.syncExecuteCommand(E.id, { op: l, unitId: a, subUnitId: d, objects: c, type: y.GROUP }) ? (t.pushUndoRedo({
|
|
366
364
|
unitID: a,
|
|
367
365
|
undoMutations: [
|
|
368
|
-
{ id: E.id, params: { op: h, unitId: a, subUnitId: d, objects:
|
|
366
|
+
{ id: E.id, params: { op: h, unitId: a, subUnitId: d, objects: Sr(c), type: y.UNGROUP } },
|
|
369
367
|
{ id: j.id, params: s }
|
|
370
368
|
],
|
|
371
369
|
redoMutations: [
|
|
@@ -374,11 +372,11 @@ const Ft = {
|
|
|
374
372
|
]
|
|
375
373
|
}), !0) : !1;
|
|
376
374
|
}
|
|
377
|
-
},
|
|
375
|
+
}, kt = {
|
|
378
376
|
id: "sheet.command.ungroup-sheet-image",
|
|
379
377
|
type: F.COMMAND,
|
|
380
378
|
handler: (i, e) => {
|
|
381
|
-
const n = i.get(
|
|
379
|
+
const n = i.get(G), t = i.get(ge), r = i.get(k);
|
|
382
380
|
if (!e) return !1;
|
|
383
381
|
const s = [];
|
|
384
382
|
e.forEach(({ parent: g, children: f }) => {
|
|
@@ -390,7 +388,7 @@ const Ft = {
|
|
|
390
388
|
return n.syncExecuteCommand(E.id, { op: l, unitId: a, subUnitId: d, objects: c, type: y.UNGROUP }) ? (t.pushUndoRedo({
|
|
391
389
|
unitID: a,
|
|
392
390
|
undoMutations: [
|
|
393
|
-
{ id: E.id, params: { op: h, unitId: a, subUnitId: d, objects:
|
|
391
|
+
{ id: E.id, params: { op: h, unitId: a, subUnitId: d, objects: vr(c), type: y.GROUP } },
|
|
394
392
|
{ id: j.id, params: s }
|
|
395
393
|
],
|
|
396
394
|
redoMutations: [
|
|
@@ -400,7 +398,7 @@ const Ft = {
|
|
|
400
398
|
}), !0) : !1;
|
|
401
399
|
}
|
|
402
400
|
};
|
|
403
|
-
function
|
|
401
|
+
function V(i, e, n) {
|
|
404
402
|
const { from: t, to: r, flipY: s = !1, flipX: o = !1, angle: a = 0, skewX: d = 0, skewY: h = 0 } = i, { column: l, columnOffset: c, row: u, rowOffset: g } = t, { column: f, columnOffset: m, row: p, rowOffset: S } = r, C = n.attachRangeWithCoord({
|
|
405
403
|
startColumn: l,
|
|
406
404
|
endColumn: l,
|
|
@@ -418,19 +416,19 @@ function $(i, e, n) {
|
|
|
418
416
|
if (v == null)
|
|
419
417
|
return;
|
|
420
418
|
const { startX: R, startY: _ } = C, { startX: b, startY: w } = v;
|
|
421
|
-
let
|
|
422
|
-
C.startX === v.endX && (
|
|
423
|
-
const
|
|
424
|
-
return
|
|
419
|
+
let T = Q(R + c, 1), M = Q(_ + g, 1), U = Q(b + m - T, 1), O = Q(w + S - M, 1);
|
|
420
|
+
C.startX === v.endX && (U = 0), C.startY === v.endY && (O = 0);
|
|
421
|
+
const D = n.getCurrentSkeleton(), I = D.rowHeaderWidth + D.columnTotalWidth, A = D.columnHeaderHeight + D.rowTotalHeight;
|
|
422
|
+
return T + U > I && (T = I - U), M + O > A && (M = A - O), {
|
|
425
423
|
flipY: s,
|
|
426
424
|
flipX: o,
|
|
427
425
|
angle: a,
|
|
428
426
|
skewX: d,
|
|
429
427
|
skewY: h,
|
|
430
|
-
left:
|
|
431
|
-
top:
|
|
432
|
-
width:
|
|
433
|
-
height:
|
|
428
|
+
left: T,
|
|
429
|
+
top: M,
|
|
430
|
+
width: U,
|
|
431
|
+
height: O
|
|
434
432
|
};
|
|
435
433
|
}
|
|
436
434
|
function N(i, e) {
|
|
@@ -461,10 +459,10 @@ function N(i, e) {
|
|
|
461
459
|
to: f
|
|
462
460
|
};
|
|
463
461
|
}
|
|
464
|
-
var
|
|
465
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
462
|
+
var Cr = Object.defineProperty, Ir = Object.getOwnPropertyDescriptor, Rr = (i, e, n, t) => {
|
|
463
|
+
for (var r = t > 1 ? void 0 : t ? Ir(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
466
464
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
467
|
-
return t && r &&
|
|
465
|
+
return t && r && Cr(e, n, r), r;
|
|
468
466
|
}, X = (i, e) => (n, t) => e(n, t, i);
|
|
469
467
|
let Ue = class extends oe {
|
|
470
468
|
constructor(i, e, n, t, r, s, o, a, d, h) {
|
|
@@ -475,12 +473,12 @@ let Ue = class extends oe {
|
|
|
475
473
|
get _selectionRenderService() {
|
|
476
474
|
return this._renderManagerService.getRenderById(
|
|
477
475
|
this._univerInstanceService.getCurrentUnitForType(B.UNIVER_SHEET).getUnitId()
|
|
478
|
-
).with(
|
|
476
|
+
).with(xe);
|
|
479
477
|
}
|
|
480
478
|
get _skeletonManagerService() {
|
|
481
479
|
return this._renderManagerService.getRenderById(
|
|
482
480
|
this._univerInstanceService.getCurrentUnitForType(B.UNIVER_SHEET).getUnitId()
|
|
483
|
-
).with(
|
|
481
|
+
).with(se);
|
|
484
482
|
}
|
|
485
483
|
_init() {
|
|
486
484
|
this._initCommandListeners(), this._updateImageListener(), this._updateOrderListener(), this._groupDrawingListener(), this._focusDrawingListener(), this._drawingAddListener();
|
|
@@ -491,19 +489,19 @@ let Ue = class extends oe {
|
|
|
491
489
|
_initCommandListeners() {
|
|
492
490
|
this.disposeWithMe(
|
|
493
491
|
this._commandService.onCommandExecuted(async (i) => {
|
|
494
|
-
if (i.id ===
|
|
492
|
+
if (i.id === We.id || i.id === Fe.id) {
|
|
495
493
|
const e = i.params;
|
|
496
494
|
if (e.files == null)
|
|
497
495
|
return;
|
|
498
496
|
const n = e.files.length;
|
|
499
|
-
if (n >
|
|
497
|
+
if (n > lt) {
|
|
500
498
|
this._messageService.show({
|
|
501
499
|
type: be.Error,
|
|
502
|
-
content: this._localeService.t("update-status.exceedMaxCount", String(
|
|
500
|
+
content: this._localeService.t("update-status.exceedMaxCount", String(lt))
|
|
503
501
|
});
|
|
504
502
|
return;
|
|
505
503
|
}
|
|
506
|
-
this._imageIoService.setWaitCount(n), i.id ===
|
|
504
|
+
this._imageIoService.setWaitCount(n), i.id === We.id ? e.files.forEach(async (t) => {
|
|
507
505
|
await this._insertCellImage(t);
|
|
508
506
|
}) : e.files.forEach(async (t) => {
|
|
509
507
|
await this._insertFloatImage(t);
|
|
@@ -520,13 +518,13 @@ let Ue = class extends oe {
|
|
|
520
518
|
e = await this._imageIoService.saveImage(i);
|
|
521
519
|
} catch (C) {
|
|
522
520
|
const v = C.message;
|
|
523
|
-
v ===
|
|
521
|
+
v === He.ERROR_EXCEED_SIZE ? this._messageService.show({
|
|
524
522
|
type: be.Error,
|
|
525
|
-
content: this._localeService.t("update-status.exceedMaxSize", String(
|
|
526
|
-
}) : v ===
|
|
523
|
+
content: this._localeService.t("update-status.exceedMaxSize", String(Rn / (1024 * 1024)))
|
|
524
|
+
}) : v === He.ERROR_IMAGE_TYPE ? this._messageService.show({
|
|
527
525
|
type: be.Error,
|
|
528
526
|
content: this._localeService.t("update-status.invalidImageType")
|
|
529
|
-
}) : v ===
|
|
527
|
+
}) : v === He.ERROR_IMAGE && this._messageService.show({
|
|
530
528
|
type: be.Error,
|
|
531
529
|
content: this._localeService.t("update-status.invalidImage")
|
|
532
530
|
});
|
|
@@ -536,14 +534,14 @@ let Ue = class extends oe {
|
|
|
536
534
|
const n = this._getUnitInfo();
|
|
537
535
|
if (n == null)
|
|
538
536
|
return;
|
|
539
|
-
const { unitId: t, subUnitId: r } = n, { imageId: s, imageSourceType: o, source: a, base64Cache: d } = e, { width: h, height: l, image: c } = await
|
|
537
|
+
const { unitId: t, subUnitId: r } = n, { imageId: s, imageSourceType: o, source: a, base64Cache: d } = e, { width: h, height: l, image: c } = await Mn(d || ""), u = this._renderManagerService.getRenderById(t);
|
|
540
538
|
if (u == null)
|
|
541
539
|
return;
|
|
542
540
|
const { width: g, height: f } = u.scene;
|
|
543
541
|
this._imageIoService.addImageSourceCache(a, o, c);
|
|
544
542
|
let m = 1;
|
|
545
|
-
if (h >
|
|
546
|
-
const C =
|
|
543
|
+
if (h > ut || l > gt) {
|
|
544
|
+
const C = ut / h, v = gt / l;
|
|
547
545
|
m = Math.max(C, v);
|
|
548
546
|
}
|
|
549
547
|
const p = this._getImagePosition(h * m, l * m, g, f);
|
|
@@ -553,10 +551,10 @@ let Ue = class extends oe {
|
|
|
553
551
|
unitId: t,
|
|
554
552
|
subUnitId: r,
|
|
555
553
|
drawingId: s,
|
|
556
|
-
drawingType:
|
|
554
|
+
drawingType: Ge.DRAWING_IMAGE,
|
|
557
555
|
imageSourceType: o,
|
|
558
556
|
source: a,
|
|
559
|
-
transform:
|
|
557
|
+
transform: V(p, this._selectionRenderService, this._skeletonManagerService),
|
|
560
558
|
sheetTransform: p
|
|
561
559
|
};
|
|
562
560
|
this._commandService.executeCommand(st.id, {
|
|
@@ -586,7 +584,7 @@ let Ue = class extends oe {
|
|
|
586
584
|
endColumn: 0
|
|
587
585
|
};
|
|
588
586
|
r && r.length > 0 && (s = r[r.length - 1].range);
|
|
589
|
-
const o =
|
|
587
|
+
const o = Nn(this._skeletonManagerService.getCurrent().skeleton, s);
|
|
590
588
|
if (o == null)
|
|
591
589
|
return;
|
|
592
590
|
let { startColumn: a, startRow: d, startX: h, startY: l } = o, c = !1;
|
|
@@ -618,7 +616,7 @@ let Ue = class extends oe {
|
|
|
618
616
|
_updateOrderListener() {
|
|
619
617
|
this._drawingManagerService.featurePluginOrderUpdate$.subscribe((i) => {
|
|
620
618
|
const { unitId: e, subUnitId: n, drawingIds: t, arrangeType: r } = i;
|
|
621
|
-
this._commandService.executeCommand(
|
|
619
|
+
this._commandService.executeCommand(Ft.id, {
|
|
622
620
|
unitId: e,
|
|
623
621
|
subUnitId: n,
|
|
624
622
|
drawingIds: t,
|
|
@@ -641,11 +639,11 @@ let Ue = class extends oe {
|
|
|
641
639
|
return;
|
|
642
640
|
const l = {
|
|
643
641
|
...n,
|
|
644
|
-
transform: { ...d.transform, ...a,
|
|
642
|
+
transform: { ...d.transform, ...a, ...V(h, this._selectionRenderService, this._skeletonManagerService) },
|
|
645
643
|
sheetTransform: { ...h }
|
|
646
644
|
};
|
|
647
645
|
e.push(l);
|
|
648
|
-
}), e.length > 0 && this._commandService.executeCommand(
|
|
646
|
+
}), e.length > 0 && this._commandService.executeCommand(Ye.id, {
|
|
649
647
|
unitId: i[0].unitId,
|
|
650
648
|
drawings: e
|
|
651
649
|
}));
|
|
@@ -653,11 +651,11 @@ let Ue = class extends oe {
|
|
|
653
651
|
}
|
|
654
652
|
_groupDrawingListener() {
|
|
655
653
|
this._drawingManagerService.featurePluginGroupUpdate$.subscribe((i) => {
|
|
656
|
-
this._commandService.executeCommand(
|
|
654
|
+
this._commandService.executeCommand(Yt.id, i);
|
|
657
655
|
const { unitId: e, subUnitId: n, drawingId: t } = i[0].parent;
|
|
658
656
|
this._drawingManagerService.focusDrawing([{ unitId: e, subUnitId: n, drawingId: t }]);
|
|
659
657
|
}), this._drawingManagerService.featurePluginUngroupUpdate$.subscribe((i) => {
|
|
660
|
-
this._commandService.executeCommand(
|
|
658
|
+
this._commandService.executeCommand(kt.id, i);
|
|
661
659
|
});
|
|
662
660
|
}
|
|
663
661
|
_focusDrawingListener() {
|
|
@@ -680,22 +678,22 @@ let Ue = class extends oe {
|
|
|
680
678
|
if (t == null)
|
|
681
679
|
return;
|
|
682
680
|
const { sheetTransform: r } = t;
|
|
683
|
-
t.transform =
|
|
681
|
+
t.transform = V(r, this._selectionRenderService, this._skeletonManagerService);
|
|
684
682
|
});
|
|
685
683
|
const e = i[0].unitId;
|
|
686
684
|
this._drawingManagerService.registerDrawingData(e, this._sheetDrawingService.getDrawingDataForUnit(e)), this._drawingManagerService.initializeNotification(e);
|
|
687
685
|
}
|
|
688
686
|
};
|
|
689
|
-
Ue =
|
|
690
|
-
|
|
691
|
-
X(0,
|
|
687
|
+
Ue = Rr([
|
|
688
|
+
ee(te.Rendered, Ue),
|
|
689
|
+
X(0, G),
|
|
692
690
|
X(1, he),
|
|
693
|
-
X(2, W(
|
|
694
|
-
X(3,
|
|
691
|
+
X(2, W(qn)),
|
|
692
|
+
X(3, St),
|
|
695
693
|
X(4, k),
|
|
696
694
|
X(5, z),
|
|
697
|
-
X(6,
|
|
698
|
-
X(7,
|
|
695
|
+
X(6, vt),
|
|
696
|
+
X(7, kn),
|
|
699
697
|
X(8, W(_e)),
|
|
700
698
|
X(9, K)
|
|
701
699
|
], Ue);
|
|
@@ -707,23 +705,23 @@ var Y = function() {
|
|
|
707
705
|
}
|
|
708
706
|
return i;
|
|
709
707
|
}, Y.apply(this, arguments);
|
|
710
|
-
},
|
|
708
|
+
}, Mr = function(i, e) {
|
|
711
709
|
var n = {};
|
|
712
710
|
for (var t in i) Object.prototype.hasOwnProperty.call(i, t) && e.indexOf(t) < 0 && (n[t] = i[t]);
|
|
713
711
|
if (i != null && typeof Object.getOwnPropertySymbols == "function")
|
|
714
712
|
for (var r = 0, t = Object.getOwnPropertySymbols(i); r < t.length; r++)
|
|
715
713
|
e.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(i, t[r]) && (n[t[r]] = i[t[r]]);
|
|
716
714
|
return n;
|
|
717
|
-
},
|
|
718
|
-
var n = i.icon, t = i.id, r = i.className, s = i.extend, o =
|
|
719
|
-
return
|
|
715
|
+
}, Ht = Bt(function(i, e) {
|
|
716
|
+
var n = i.icon, t = i.id, r = i.className, s = i.extend, o = Mr(i, ["icon", "id", "className", "extend"]), a = "univerjs-icon univerjs-icon-".concat(t, " ").concat(r || "").trim(), d = Wt("_".concat(Er()));
|
|
717
|
+
return Xt(n, "".concat(t), { defIds: n.defIds, idSuffix: d.current }, Y({ ref: e, className: a }, o), s);
|
|
720
718
|
});
|
|
721
|
-
function
|
|
722
|
-
return
|
|
723
|
-
return
|
|
719
|
+
function Xt(i, e, n, t, r) {
|
|
720
|
+
return $t(i.tag, Y(Y({ key: e }, Dr(i, n, r)), t), (br(i, n).children || []).map(function(s, o) {
|
|
721
|
+
return Xt(s, "".concat(e, "-").concat(i.tag, "-").concat(o), n, void 0, r);
|
|
724
722
|
}));
|
|
725
723
|
}
|
|
726
|
-
function
|
|
724
|
+
function Dr(i, e, n) {
|
|
727
725
|
var t = Y({}, i.attrs);
|
|
728
726
|
n != null && n.colorChannel1 && t.fill === "colorChannel1" && (t.fill = n.colorChannel1);
|
|
729
727
|
var r = e.defIds;
|
|
@@ -732,117 +730,117 @@ function Mr(i, e, n) {
|
|
|
732
730
|
typeof a == "string" && (t[o] = a.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
733
731
|
})), t;
|
|
734
732
|
}
|
|
735
|
-
function
|
|
733
|
+
function br(i, e) {
|
|
736
734
|
var n, t = e.defIds;
|
|
737
735
|
return !t || t.length === 0 ? i : i.tag === "defs" && (!((n = i.children) === null || n === void 0) && n.length) ? Y(Y({}, i), { children: i.children.map(function(r) {
|
|
738
736
|
return typeof r.attrs.id == "string" && t && t.indexOf(r.attrs.id) > -1 ? Y(Y({}, r), { attrs: Y(Y({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
|
|
739
737
|
}) }) : i;
|
|
740
738
|
}
|
|
741
|
-
function
|
|
739
|
+
function Er() {
|
|
742
740
|
return Math.random().toString(36).substring(2, 8);
|
|
743
741
|
}
|
|
744
|
-
|
|
745
|
-
var
|
|
746
|
-
return
|
|
742
|
+
Ht.displayName = "UniverIcon";
|
|
743
|
+
var yr = { 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" } }] }, zt = Bt(function(i, e) {
|
|
744
|
+
return $t(Ht, Object.assign({}, i, {
|
|
747
745
|
id: "add-image-single",
|
|
748
746
|
ref: e,
|
|
749
|
-
icon:
|
|
747
|
+
icon: yr
|
|
750
748
|
}));
|
|
751
749
|
});
|
|
752
|
-
|
|
753
|
-
const
|
|
754
|
-
uploadFileMenu:
|
|
755
|
-
uploadFileMenuInput:
|
|
756
|
-
},
|
|
757
|
-
var
|
|
758
|
-
const
|
|
759
|
-
const { type: e } = i, n =
|
|
750
|
+
zt.displayName = "AddImageSingle";
|
|
751
|
+
const Or = "univer-upload-file-menu", Pr = "univer-upload-file-menu-input", _t = {
|
|
752
|
+
uploadFileMenu: Or,
|
|
753
|
+
uploadFileMenuInput: Pr
|
|
754
|
+
}, Kt = "COMPONENT_UPLOAD_FILE_MENU";
|
|
755
|
+
var $e = /* @__PURE__ */ ((i) => (i[i.cellImage = 0] = "cellImage", i[i.floatImage = 1] = "floatImage", i))($e || {});
|
|
756
|
+
const Tr = (i) => {
|
|
757
|
+
const { type: e } = i, n = Z(G), t = Wt(null), r = () => {
|
|
760
758
|
var a;
|
|
761
759
|
(a = t.current) == null || a.click();
|
|
762
|
-
}, s =
|
|
760
|
+
}, s = Dn.map((a) => `.${a.replace("image/", "")}`).join(","), o = (a) => {
|
|
763
761
|
const d = a.target.files;
|
|
764
762
|
if (d == null)
|
|
765
763
|
return;
|
|
766
764
|
const h = Array.from(d);
|
|
767
|
-
e ===
|
|
765
|
+
e === $e.floatImage ? n.executeCommand(Fe.id, { files: h }) : e === $e.cellImage && n.executeCommand(We.id, { files: h }), t.current && (t.current.value = "");
|
|
768
766
|
};
|
|
769
|
-
return /* @__PURE__ */ L.createElement("div", { onClick: r, className:
|
|
767
|
+
return /* @__PURE__ */ L.createElement("div", { onClick: r, className: _t.uploadFileMenu }, /* @__PURE__ */ L.createElement(
|
|
770
768
|
"input",
|
|
771
769
|
{
|
|
772
770
|
type: "file",
|
|
773
|
-
className:
|
|
771
|
+
className: _t.uploadFileMenuInput,
|
|
774
772
|
ref: t,
|
|
775
773
|
onChange: o,
|
|
776
774
|
accept: s,
|
|
777
775
|
multiple: !0
|
|
778
776
|
}
|
|
779
777
|
));
|
|
780
|
-
},
|
|
781
|
-
function
|
|
778
|
+
}, Jt = "addition-and-subtraction-single", Zt = "sheet.menu.image";
|
|
779
|
+
function Ur(i) {
|
|
782
780
|
return {
|
|
783
|
-
id:
|
|
784
|
-
type:
|
|
785
|
-
positions: [
|
|
786
|
-
group:
|
|
787
|
-
icon:
|
|
781
|
+
id: Zt,
|
|
782
|
+
type: Ct.SUBITEMS,
|
|
783
|
+
positions: [Hn.TOOLBAR_START],
|
|
784
|
+
group: Xn.TOOLBAR_FORMULAS_INSERT,
|
|
785
|
+
icon: Jt,
|
|
788
786
|
tooltip: "sheetImage.title",
|
|
789
|
-
hidden$:
|
|
790
|
-
disabled$:
|
|
787
|
+
hidden$: It(i, B.UNIVER_SHEET),
|
|
788
|
+
disabled$: jn(i, { workbookTypes: [qe], worksheetTypes: [Pe], rangeTypes: [Qn] })
|
|
791
789
|
};
|
|
792
790
|
}
|
|
793
|
-
function
|
|
791
|
+
function Ar(i) {
|
|
794
792
|
return {
|
|
795
|
-
id:
|
|
793
|
+
id: Fe.id,
|
|
796
794
|
title: "sheetImage.upload.float",
|
|
797
|
-
type:
|
|
795
|
+
type: Ct.SELECTOR,
|
|
798
796
|
label: {
|
|
799
|
-
name:
|
|
797
|
+
name: Kt,
|
|
800
798
|
props: {
|
|
801
|
-
type:
|
|
799
|
+
type: $e.floatImage
|
|
802
800
|
}
|
|
803
801
|
},
|
|
804
|
-
positions: [
|
|
805
|
-
hidden$:
|
|
802
|
+
positions: [Zt],
|
|
803
|
+
hidden$: It(i, B.UNIVER_SHEET)
|
|
806
804
|
};
|
|
807
805
|
}
|
|
808
|
-
const
|
|
809
|
-
imageCommonPanel:
|
|
810
|
-
imageCommonPanelGrid:
|
|
811
|
-
imageCommonPanelBorder:
|
|
812
|
-
imageCommonPanelTitle:
|
|
813
|
-
imageCommonPanelSubtitle:
|
|
814
|
-
imageCommonPanelRow:
|
|
815
|
-
imageCommonPanelRowVertical:
|
|
816
|
-
imageCommonPanelColumn:
|
|
817
|
-
imageCommonPanelColumnCenter:
|
|
818
|
-
imageCommonPanelInline:
|
|
819
|
-
imageCommonPanelSpan2:
|
|
820
|
-
imageCommonPanelSpan3:
|
|
821
|
-
imageCommonPanelInput:
|
|
822
|
-
sheetImageMenu:
|
|
823
|
-
sheetImageMenuInput:
|
|
824
|
-
},
|
|
806
|
+
const Nr = "univer-image-common-panel", jr = "univer-image-common-panel-grid", Lr = "univer-image-common-panel-border", Br = "univer-image-common-panel-title", Wr = "univer-image-common-panel-subtitle", $r = "univer-image-common-panel-row", Vr = "univer-image-common-panel-row-vertical", Gr = "univer-image-common-panel-column", xr = "univer-image-common-panel-column-center", Fr = "univer-image-common-panel-inline", Yr = "univer-image-common-panel-span2", kr = "univer-image-common-panel-span3", Hr = "univer-image-common-panel-input", Xr = "univer-sheet-image-menu", zr = "univer-sheet-image-menu-input", J = {
|
|
807
|
+
imageCommonPanel: Nr,
|
|
808
|
+
imageCommonPanelGrid: jr,
|
|
809
|
+
imageCommonPanelBorder: Lr,
|
|
810
|
+
imageCommonPanelTitle: Br,
|
|
811
|
+
imageCommonPanelSubtitle: Wr,
|
|
812
|
+
imageCommonPanelRow: $r,
|
|
813
|
+
imageCommonPanelRowVertical: Vr,
|
|
814
|
+
imageCommonPanelColumn: Gr,
|
|
815
|
+
imageCommonPanelColumnCenter: xr,
|
|
816
|
+
imageCommonPanelInline: Fr,
|
|
817
|
+
imageCommonPanelSpan2: Yr,
|
|
818
|
+
imageCommonPanelSpan3: kr,
|
|
819
|
+
imageCommonPanelInput: Hr,
|
|
820
|
+
sheetImageMenu: Xr,
|
|
821
|
+
sheetImageMenuInput: zr
|
|
822
|
+
}, Kr = (i) => {
|
|
825
823
|
var v;
|
|
826
|
-
const e =
|
|
824
|
+
const e = Z(G), n = Z(_e), t = Z(z), r = Z(K), { drawings: s } = i, o = s[0];
|
|
827
825
|
if (o == null)
|
|
828
826
|
return;
|
|
829
827
|
const { unitId: a } = o, d = r.getRenderById(a), h = d == null ? void 0 : d.scene;
|
|
830
828
|
if (h == null)
|
|
831
829
|
return;
|
|
832
|
-
const l = h.getTransformerByCreate(), [c, u] =
|
|
830
|
+
const l = h.getTransformerByCreate(), [c, u] = tt(!0), g = (v = o.anchorType) != null ? v : P.Position, [f, m] = tt(g);
|
|
833
831
|
function p(R, _) {
|
|
834
832
|
const b = [];
|
|
835
833
|
return R.forEach((w) => {
|
|
836
|
-
const { oKey:
|
|
837
|
-
if (
|
|
834
|
+
const { oKey: T } = w, M = _.getDrawingOKey(T);
|
|
835
|
+
if (M == null)
|
|
838
836
|
return b.push(null), !0;
|
|
839
|
-
const { unitId:
|
|
837
|
+
const { unitId: U, subUnitId: O, drawingId: D, drawingType: I, anchorType: A, sheetTransform: $ } = M;
|
|
840
838
|
b.push({
|
|
841
|
-
unitId:
|
|
842
|
-
subUnitId:
|
|
843
|
-
drawingId:
|
|
839
|
+
unitId: U,
|
|
840
|
+
subUnitId: O,
|
|
841
|
+
drawingId: D,
|
|
844
842
|
anchorType: A,
|
|
845
|
-
sheetTransform:
|
|
843
|
+
sheetTransform: $,
|
|
846
844
|
drawingType: I
|
|
847
845
|
});
|
|
848
846
|
}), b;
|
|
@@ -851,14 +849,14 @@ const Ar = "univer-image-common-panel", Nr = "univer-image-common-panel-grid", j
|
|
|
851
849
|
const R = l.clearControl$.subscribe((b) => {
|
|
852
850
|
b === !0 && u(!1);
|
|
853
851
|
}), _ = l.changeStart$.subscribe((b) => {
|
|
854
|
-
var
|
|
855
|
-
const { objects: w } = b,
|
|
856
|
-
if (
|
|
852
|
+
var M;
|
|
853
|
+
const { objects: w } = b, T = p(w, t);
|
|
854
|
+
if (T.length === 0)
|
|
857
855
|
u(!1);
|
|
858
|
-
else if (
|
|
856
|
+
else if (T.length >= 1) {
|
|
859
857
|
u(!0);
|
|
860
|
-
const
|
|
861
|
-
m(
|
|
858
|
+
const U = ((M = T[0]) == null ? void 0 : M.anchorType) || P.Position;
|
|
859
|
+
m(U);
|
|
862
860
|
}
|
|
863
861
|
});
|
|
864
862
|
return () => {
|
|
@@ -876,15 +874,15 @@ const Ar = "univer-image-common-panel", Nr = "univer-image-common-panel-grid", j
|
|
|
876
874
|
drawingId: w.drawingId,
|
|
877
875
|
anchorType: R
|
|
878
876
|
}));
|
|
879
|
-
e.executeCommand(
|
|
877
|
+
e.executeCommand(Ye.id, {
|
|
880
878
|
unitId: _[0].unitId,
|
|
881
879
|
drawings: b
|
|
882
880
|
});
|
|
883
881
|
}
|
|
884
882
|
const C = (R) => R ? "block" : "none";
|
|
885
|
-
return /* @__PURE__ */ L.createElement("div", { className: Ee(
|
|
886
|
-
},
|
|
887
|
-
const i =
|
|
883
|
+
return /* @__PURE__ */ L.createElement("div", { className: Ee(J.imageCommonPanelGrid, J.imageCommonPanelBorder), style: { display: C(c) } }, /* @__PURE__ */ L.createElement("div", { className: J.imageCommonPanelRow }, /* @__PURE__ */ L.createElement("div", { className: Ee(J.imageCommonPanelColumn, J.imageCommonPanelTitle) }, /* @__PURE__ */ L.createElement("div", null, n.t("drawing-anchor.title")))), /* @__PURE__ */ L.createElement("div", { className: Ee(J.imageCommonPanelRow) }, /* @__PURE__ */ L.createElement("div", { className: Ee(J.imageCommonPanelColumn) }, /* @__PURE__ */ L.createElement(dr, { value: f, onChange: S, direction: "vertical" }, /* @__PURE__ */ L.createElement(ze, { value: P.Both }, n.t("drawing-anchor.both")), /* @__PURE__ */ L.createElement(ze, { value: P.Position }, n.t("drawing-anchor.position")), /* @__PURE__ */ L.createElement(ze, { value: P.None }, n.t("drawing-anchor.none"))))));
|
|
884
|
+
}, Jr = () => {
|
|
885
|
+
const i = Z(z), e = i.getFocusDrawings(), [n, t] = tt(e);
|
|
888
886
|
return rt(() => {
|
|
889
887
|
const r = i.focus$.subscribe((s) => {
|
|
890
888
|
t(s);
|
|
@@ -892,12 +890,12 @@ const Ar = "univer-image-common-panel", Nr = "univer-image-common-panel-grid", j
|
|
|
892
890
|
return () => {
|
|
893
891
|
r.unsubscribe();
|
|
894
892
|
};
|
|
895
|
-
}, []), !!(n != null && n.length) && /* @__PURE__ */ L.createElement("div", { className:
|
|
893
|
+
}, []), !!(n != null && n.length) && /* @__PURE__ */ L.createElement("div", { className: J.imageCommonPanel }, /* @__PURE__ */ L.createElement(vn, { drawings: n }), /* @__PURE__ */ L.createElement(Kr, { drawings: n }));
|
|
896
894
|
}, ve = {
|
|
897
895
|
id: "sheet.command.move-drawing",
|
|
898
896
|
type: F.COMMAND,
|
|
899
897
|
handler: (i, e) => {
|
|
900
|
-
const n = i.get(
|
|
898
|
+
const n = i.get(G), t = i.get(k), r = i.get(xe), { direction: s } = e, o = t.getFocusDrawings();
|
|
901
899
|
if (o.length === 0)
|
|
902
900
|
return !1;
|
|
903
901
|
const a = o[0].unitId, d = o.map((l) => {
|
|
@@ -911,16 +909,16 @@ const Ar = "univer-image-common-panel", Nr = "univer-image-common-panel-grid", j
|
|
|
911
909
|
sheetTransform: N(u, r)
|
|
912
910
|
};
|
|
913
911
|
}).filter((l) => l != null);
|
|
914
|
-
return n.syncExecuteCommand(
|
|
912
|
+
return n.syncExecuteCommand(Ye.id, {
|
|
915
913
|
unitId: a,
|
|
916
914
|
drawings: d
|
|
917
915
|
}) ? (n.syncExecuteCommand(j.id, [a]), !0) : !1;
|
|
918
916
|
}
|
|
919
|
-
},
|
|
917
|
+
}, qt = {
|
|
920
918
|
id: "sheet.command.delete-drawing",
|
|
921
919
|
type: F.COMMAND,
|
|
922
920
|
handler: (i) => {
|
|
923
|
-
const e = i.get(
|
|
921
|
+
const e = i.get(G), t = i.get(k).getFocusDrawings();
|
|
924
922
|
if (t.length === 0)
|
|
925
923
|
return !1;
|
|
926
924
|
const r = t[0].unitId, s = t.map((o) => {
|
|
@@ -939,9 +937,9 @@ const Ar = "univer-image-common-panel", Nr = "univer-image-common-panel-grid", j
|
|
|
939
937
|
}
|
|
940
938
|
};
|
|
941
939
|
function Se(i) {
|
|
942
|
-
return !i.getContextValue(
|
|
940
|
+
return !i.getContextValue(an) && !i.getContextValue(cn) && i.getContextValue(we);
|
|
943
941
|
}
|
|
944
|
-
const
|
|
942
|
+
const Zr = {
|
|
945
943
|
id: ve.id,
|
|
946
944
|
description: "shortcut.sheet.drawing-move-down",
|
|
947
945
|
group: "4_sheet-drawing-view",
|
|
@@ -951,7 +949,7 @@ const Jr = {
|
|
|
951
949
|
staticParameters: {
|
|
952
950
|
direction: q.DOWN
|
|
953
951
|
}
|
|
954
|
-
},
|
|
952
|
+
}, qr = {
|
|
955
953
|
id: ve.id,
|
|
956
954
|
description: "shortcut.sheet.drawing-move-up",
|
|
957
955
|
group: "4_sheet-drawing-view",
|
|
@@ -961,7 +959,7 @@ const Jr = {
|
|
|
961
959
|
staticParameters: {
|
|
962
960
|
direction: q.UP
|
|
963
961
|
}
|
|
964
|
-
},
|
|
962
|
+
}, Qr = {
|
|
965
963
|
id: ve.id,
|
|
966
964
|
description: "shortcut.sheet.drawing-move-left",
|
|
967
965
|
group: "4_sheet-drawing-view",
|
|
@@ -971,7 +969,7 @@ const Jr = {
|
|
|
971
969
|
staticParameters: {
|
|
972
970
|
direction: q.LEFT
|
|
973
971
|
}
|
|
974
|
-
},
|
|
972
|
+
}, ei = {
|
|
975
973
|
id: ve.id,
|
|
976
974
|
description: "shortcut.sheet.drawing-move-right",
|
|
977
975
|
group: "4_sheet-drawing-view",
|
|
@@ -981,8 +979,8 @@ const Jr = {
|
|
|
981
979
|
staticParameters: {
|
|
982
980
|
direction: q.RIGHT
|
|
983
981
|
}
|
|
984
|
-
},
|
|
985
|
-
id:
|
|
982
|
+
}, ti = {
|
|
983
|
+
id: qt.id,
|
|
986
984
|
description: "shortcut.sheet.drawing-delete",
|
|
987
985
|
group: "4_sheet-drawing-view",
|
|
988
986
|
// when focusing on any other input tag do not trigger this shortcut
|
|
@@ -990,25 +988,25 @@ const Jr = {
|
|
|
990
988
|
binding: ue.DELETE,
|
|
991
989
|
mac: ue.BACKSPACE
|
|
992
990
|
};
|
|
993
|
-
var
|
|
994
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
991
|
+
var ni = Object.defineProperty, ri = Object.getOwnPropertyDescriptor, ii = (i, e, n, t) => {
|
|
992
|
+
for (var r = t > 1 ? void 0 : t ? ri(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
995
993
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
996
|
-
return t && r &&
|
|
994
|
+
return t && r && ni(e, n, r), r;
|
|
997
995
|
}, me = (i, e) => (n, t) => e(n, t, i);
|
|
998
|
-
const
|
|
996
|
+
const si = {};
|
|
999
997
|
let pe = class extends oe {
|
|
1000
998
|
constructor(i, e, n, t, r, s) {
|
|
1001
999
|
super(), this._config = i, this._injector = e, this._componentManager = n, this._menuService = t, this._commandService = r, this._shortcutService = s, this._init();
|
|
1002
1000
|
}
|
|
1003
1001
|
_initCustomComponents() {
|
|
1004
1002
|
const i = this._componentManager;
|
|
1005
|
-
this.disposeWithMe(i.register(
|
|
1003
|
+
this.disposeWithMe(i.register(Jt, zt)), this.disposeWithMe(i.register(Kt, Tr)), this.disposeWithMe(i.register(Vt, Jr));
|
|
1006
1004
|
}
|
|
1007
1005
|
_initMenus() {
|
|
1008
1006
|
const { menu: i = {} } = this._config;
|
|
1009
1007
|
[
|
|
1010
|
-
|
|
1011
|
-
|
|
1008
|
+
Ur,
|
|
1009
|
+
Ar
|
|
1012
1010
|
// UploadCellImageMenuFactory,
|
|
1013
1011
|
].forEach((e) => {
|
|
1014
1012
|
this._menuService.addMenuItem(e(this._injector), i);
|
|
@@ -1016,29 +1014,29 @@ let pe = class extends oe {
|
|
|
1016
1014
|
}
|
|
1017
1015
|
_initCommands() {
|
|
1018
1016
|
[
|
|
1019
|
-
|
|
1020
|
-
|
|
1017
|
+
Fe,
|
|
1018
|
+
We,
|
|
1021
1019
|
st,
|
|
1022
1020
|
it,
|
|
1023
|
-
|
|
1024
|
-
Vt,
|
|
1025
|
-
j,
|
|
1021
|
+
Ye,
|
|
1026
1022
|
Gt,
|
|
1027
|
-
|
|
1023
|
+
j,
|
|
1024
|
+
xt,
|
|
1028
1025
|
Yt,
|
|
1026
|
+
kt,
|
|
1029
1027
|
ve,
|
|
1030
|
-
|
|
1031
|
-
|
|
1028
|
+
qt,
|
|
1029
|
+
Ft
|
|
1032
1030
|
].forEach((i) => this.disposeWithMe(this._commandService.registerCommand(i)));
|
|
1033
1031
|
}
|
|
1034
1032
|
_initShortcuts() {
|
|
1035
1033
|
[
|
|
1036
1034
|
// sheet drawing shortcuts
|
|
1037
|
-
Jr,
|
|
1038
1035
|
Zr,
|
|
1039
1036
|
qr,
|
|
1040
1037
|
Qr,
|
|
1041
|
-
ei
|
|
1038
|
+
ei,
|
|
1039
|
+
ti
|
|
1042
1040
|
].forEach((i) => {
|
|
1043
1041
|
this.disposeWithMe(this._shortcutService.registerShortcut(i));
|
|
1044
1042
|
});
|
|
@@ -1047,21 +1045,20 @@ let pe = class extends oe {
|
|
|
1047
1045
|
this._initCommands(), this._initCustomComponents(), this._initMenus(), this._initShortcuts();
|
|
1048
1046
|
}
|
|
1049
1047
|
};
|
|
1050
|
-
pe =
|
|
1051
|
-
|
|
1048
|
+
pe = ii([
|
|
1049
|
+
ee(te.Rendered, pe),
|
|
1052
1050
|
me(1, W(nt)),
|
|
1053
|
-
me(2, W(
|
|
1054
|
-
me(3,
|
|
1055
|
-
me(4,
|
|
1056
|
-
me(5,
|
|
1051
|
+
me(2, W(zn)),
|
|
1052
|
+
me(3, Kn),
|
|
1053
|
+
me(4, G),
|
|
1054
|
+
me(5, Jn)
|
|
1057
1055
|
], pe);
|
|
1058
|
-
var
|
|
1059
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
1056
|
+
var oi = Object.defineProperty, ai = Object.getOwnPropertyDescriptor, ci = (i, e, n, t) => {
|
|
1057
|
+
for (var r = t > 1 ? void 0 : t ? ai(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
1060
1058
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
1061
|
-
return t && r &&
|
|
1059
|
+
return t && r && oi(e, n, r), r;
|
|
1062
1060
|
}, ce = (i, e) => (n, t) => e(n, t, i);
|
|
1063
|
-
const
|
|
1064
|
-
It.id,
|
|
1061
|
+
const di = [
|
|
1065
1062
|
Rt.id,
|
|
1066
1063
|
Mt.id,
|
|
1067
1064
|
Dt.id,
|
|
@@ -1069,21 +1066,22 @@ const ci = [
|
|
|
1069
1066
|
Et.id,
|
|
1070
1067
|
yt.id,
|
|
1071
1068
|
Ot.id,
|
|
1072
|
-
qe.id,
|
|
1073
|
-
Qe.id,
|
|
1074
1069
|
Pt.id,
|
|
1070
|
+
Qe.id,
|
|
1071
|
+
et.id,
|
|
1075
1072
|
Tt.id,
|
|
1076
1073
|
Ut.id,
|
|
1077
1074
|
At.id,
|
|
1078
1075
|
Nt.id,
|
|
1079
|
-
jt.id
|
|
1080
|
-
|
|
1081
|
-
|
|
1076
|
+
jt.id,
|
|
1077
|
+
Lt.id
|
|
1078
|
+
], li = [
|
|
1082
1079
|
er.id,
|
|
1083
1080
|
tr.id,
|
|
1084
1081
|
nr.id,
|
|
1085
1082
|
rr.id,
|
|
1086
|
-
ir.id
|
|
1083
|
+
ir.id,
|
|
1084
|
+
sr.id
|
|
1087
1085
|
];
|
|
1088
1086
|
let Ae = class extends oe {
|
|
1089
1087
|
constructor(i, e, n, t, r, s) {
|
|
@@ -1094,12 +1092,12 @@ let Ae = class extends oe {
|
|
|
1094
1092
|
get _selectionRenderService() {
|
|
1095
1093
|
return this._renderManagerService.getRenderById(
|
|
1096
1094
|
this._univerInstanceService.getCurrentUnitForType(B.UNIVER_SHEET).getUnitId()
|
|
1097
|
-
).with(
|
|
1095
|
+
).with(xe);
|
|
1098
1096
|
}
|
|
1099
1097
|
get _skeletonManagerService() {
|
|
1100
1098
|
return this._renderManagerService.getRenderById(
|
|
1101
1099
|
this._univerInstanceService.getCurrentUnitForType(B.UNIVER_SHEET).getUnitId()
|
|
1102
|
-
).with(
|
|
1100
|
+
).with(se);
|
|
1103
1101
|
}
|
|
1104
1102
|
_init() {
|
|
1105
1103
|
this._sheetInterceptorListener(), this._commandListener(), this._sheetRefreshListener();
|
|
@@ -1108,55 +1106,55 @@ let Ae = class extends oe {
|
|
|
1108
1106
|
this.disposeWithMe(
|
|
1109
1107
|
this._sheetInterceptorService.interceptCommand({
|
|
1110
1108
|
getMutations: (i) => {
|
|
1111
|
-
if (!
|
|
1109
|
+
if (!di.includes(i.id))
|
|
1112
1110
|
return { redos: [], undos: [] };
|
|
1113
1111
|
if (i.params == null)
|
|
1114
1112
|
return { redos: [], undos: [] };
|
|
1115
1113
|
const e = i.id;
|
|
1116
|
-
if (e === It.id)
|
|
1117
|
-
return this._moveRowInterceptor(i.params, "insert");
|
|
1118
1114
|
if (e === Rt.id)
|
|
1119
|
-
return this.
|
|
1115
|
+
return this._moveRowInterceptor(i.params, "insert");
|
|
1120
1116
|
if (e === Mt.id)
|
|
1121
|
-
return this.
|
|
1117
|
+
return this._moveColInterceptor(i.params, "insert");
|
|
1122
1118
|
if (e === Dt.id)
|
|
1119
|
+
return this._moveRowInterceptor(i.params, "remove");
|
|
1120
|
+
if (e === bt.id)
|
|
1123
1121
|
return this._moveColInterceptor(i.params, "remove");
|
|
1124
|
-
if (e ===
|
|
1122
|
+
if (e === Et.id) {
|
|
1125
1123
|
const { range: n } = i.params;
|
|
1126
1124
|
return this._getRangeMoveUndo(
|
|
1127
1125
|
n,
|
|
1128
1126
|
0
|
|
1129
1127
|
/* deleteLeft */
|
|
1130
1128
|
);
|
|
1131
|
-
} else if (e ===
|
|
1129
|
+
} else if (e === yt.id) {
|
|
1132
1130
|
const { range: n } = i.params;
|
|
1133
1131
|
return this._getRangeMoveUndo(
|
|
1134
1132
|
n,
|
|
1135
1133
|
1
|
|
1136
1134
|
/* deleteUp */
|
|
1137
1135
|
);
|
|
1138
|
-
} else if (e ===
|
|
1136
|
+
} else if (e === Ot.id) {
|
|
1139
1137
|
const { range: n } = i.params;
|
|
1140
1138
|
return this._getRangeMoveUndo(
|
|
1141
1139
|
n,
|
|
1142
1140
|
2
|
|
1143
1141
|
/* insertDown */
|
|
1144
1142
|
);
|
|
1145
|
-
} else if (e ===
|
|
1143
|
+
} else if (e === Pt.id) {
|
|
1146
1144
|
const { range: n } = i.params;
|
|
1147
1145
|
return this._getRangeMoveUndo(
|
|
1148
1146
|
n,
|
|
1149
1147
|
3
|
|
1150
1148
|
/* insertRight */
|
|
1151
1149
|
);
|
|
1152
|
-
} else if (e ===
|
|
1150
|
+
} else if (e === At.id || e === Nt.id) {
|
|
1153
1151
|
const n = i.params, { unitId: t, subUnitId: r, ranges: s } = n;
|
|
1154
1152
|
return this._getDrawingUndoForRowVisible(t, r, s);
|
|
1155
|
-
} else if (e ===
|
|
1153
|
+
} else if (e === jt.id || e === Lt.id) {
|
|
1156
1154
|
const n = i.params, { unitId: t, subUnitId: r, ranges: s } = n;
|
|
1157
1155
|
return this._getDrawingUndoForColVisible(t, r, s);
|
|
1158
|
-
} else if (e ===
|
|
1159
|
-
const n = i.params, { unitId: t, subUnitId: r, ranges: s } = n, o = e ===
|
|
1156
|
+
} else if (e === Qe.id || e === et.id || e === Tt.id || e === Ut.id) {
|
|
1157
|
+
const n = i.params, { unitId: t, subUnitId: r, ranges: s } = n, o = e === Qe.id || e === et.id;
|
|
1160
1158
|
return this._getDrawingUndoForRowAndColSize(t, r, s, o);
|
|
1161
1159
|
}
|
|
1162
1160
|
return { redos: [], undos: [] };
|
|
@@ -1188,7 +1186,7 @@ let Ae = class extends oe {
|
|
|
1188
1186
|
};
|
|
1189
1187
|
}
|
|
1190
1188
|
_getUpdateOrDeleteDrawings(i, e, n) {
|
|
1191
|
-
const t = [], r = [], { sheetTransform: s, anchorType: o =
|
|
1189
|
+
const t = [], r = [], { sheetTransform: s, anchorType: o = P.Position, transform: a, unitId: d, subUnitId: h, drawingId: l } = n, { from: c, to: u } = s, { row: g, column: f } = c, { row: m, column: p } = u;
|
|
1192
1190
|
if (s == null || a == null)
|
|
1193
1191
|
return {
|
|
1194
1192
|
updateDrawings: t,
|
|
@@ -1218,7 +1216,7 @@ let Ae = class extends oe {
|
|
|
1218
1216
|
_ = w == null ? void 0 : w.newSheetTransform, b = w == null ? void 0 : w.newTransform;
|
|
1219
1217
|
}
|
|
1220
1218
|
if (_ != null && b != null) {
|
|
1221
|
-
const w =
|
|
1219
|
+
const w = V(_, this._selectionRenderService, this._skeletonManagerService);
|
|
1222
1220
|
t.push({ ...n, sheetTransform: _, transform: w });
|
|
1223
1221
|
}
|
|
1224
1222
|
return { updateDrawings: t, deleteDrawings: r };
|
|
@@ -1234,22 +1232,22 @@ let Ae = class extends oe {
|
|
|
1234
1232
|
_getDrawingUndoForColVisible(i, e, n) {
|
|
1235
1233
|
const t = this._drawingManagerService.getDrawingData(i, e), r = [], s = [];
|
|
1236
1234
|
if (Object.keys(t).forEach((l) => {
|
|
1237
|
-
const c = t[l], { sheetTransform: u, transform: g, anchorType: f =
|
|
1238
|
-
if (f ===
|
|
1235
|
+
const c = t[l], { sheetTransform: u, transform: g, anchorType: f = P.Position } = c;
|
|
1236
|
+
if (f === P.None)
|
|
1239
1237
|
this._remainDrawingSize(g, r, c);
|
|
1240
1238
|
else {
|
|
1241
1239
|
const { from: m, to: p } = u, { row: S, column: C } = m, { row: v, column: R } = p;
|
|
1242
1240
|
for (let _ = 0; _ < n.length; _++) {
|
|
1243
|
-
const b = n[_], { startRow: w, endRow:
|
|
1244
|
-
if (R <
|
|
1241
|
+
const b = n[_], { startRow: w, endRow: T, startColumn: M, endColumn: U } = b;
|
|
1242
|
+
if (R < M)
|
|
1245
1243
|
continue;
|
|
1246
|
-
if (f ===
|
|
1244
|
+
if (f === P.Position) {
|
|
1247
1245
|
let I = null, A = null;
|
|
1248
|
-
if (C >=
|
|
1249
|
-
const
|
|
1250
|
-
if (
|
|
1246
|
+
if (C >= M && C <= U) {
|
|
1247
|
+
const $ = this._skeletonManagerService.attachRangeWithCoord({ startColumn: C, endColumn: U, startRow: m.row, endRow: p.row });
|
|
1248
|
+
if ($ == null)
|
|
1251
1249
|
return;
|
|
1252
|
-
A = { ...g, left:
|
|
1250
|
+
A = { ...g, left: $.startX };
|
|
1253
1251
|
}
|
|
1254
1252
|
if (A != null && (I = N(A, this._selectionRenderService), I != null && A != null)) {
|
|
1255
1253
|
r.push({ ...c, sheetTransform: I, transform: A });
|
|
@@ -1258,40 +1256,40 @@ let Ae = class extends oe {
|
|
|
1258
1256
|
this._remainDrawingSize(g, r, c);
|
|
1259
1257
|
continue;
|
|
1260
1258
|
}
|
|
1261
|
-
if (C >=
|
|
1259
|
+
if (C >= M && R <= U)
|
|
1262
1260
|
continue;
|
|
1263
|
-
let
|
|
1264
|
-
if (C >=
|
|
1265
|
-
const I = this._skeletonManagerService.attachRangeWithCoord({ startColumn: C, endColumn:
|
|
1261
|
+
let O = null, D = null;
|
|
1262
|
+
if (C >= M && C <= U) {
|
|
1263
|
+
const I = this._skeletonManagerService.attachRangeWithCoord({ startColumn: C, endColumn: U, startRow: m.row, endRow: p.row });
|
|
1266
1264
|
if (I == null)
|
|
1267
1265
|
return;
|
|
1268
|
-
|
|
1266
|
+
D = {
|
|
1269
1267
|
...g,
|
|
1270
1268
|
left: (I == null ? void 0 : I.startX) || 0,
|
|
1271
1269
|
width: ((g == null ? void 0 : g.width) || 0) - I.endX + I.startX
|
|
1272
1270
|
};
|
|
1273
|
-
} else if (R >=
|
|
1274
|
-
const I = this._skeletonManagerService.attachRangeWithCoord({ startColumn:
|
|
1271
|
+
} else if (R >= M && R <= U) {
|
|
1272
|
+
const I = this._skeletonManagerService.attachRangeWithCoord({ startColumn: M, endColumn: R, startRow: m.row, endRow: p.row });
|
|
1275
1273
|
if (I == null)
|
|
1276
1274
|
return;
|
|
1277
|
-
|
|
1275
|
+
D = {
|
|
1278
1276
|
...g,
|
|
1279
1277
|
left: I.startX - ((g == null ? void 0 : g.width) || 0)
|
|
1280
1278
|
};
|
|
1281
1279
|
} else {
|
|
1282
|
-
const I = this._skeletonManagerService.attachRangeWithCoord({ startColumn:
|
|
1280
|
+
const I = this._skeletonManagerService.attachRangeWithCoord({ startColumn: M, endColumn: U, startRow: m.row, endRow: p.row });
|
|
1283
1281
|
if (I == null)
|
|
1284
1282
|
return;
|
|
1285
|
-
if (
|
|
1283
|
+
if (D = {
|
|
1286
1284
|
...g,
|
|
1287
1285
|
width: ((g == null ? void 0 : g.width) || 0) - I.endX + I.startX
|
|
1288
|
-
},
|
|
1289
|
-
s.push({ ...c, sheetTransform:
|
|
1286
|
+
}, O = N(D, this._selectionRenderService), O != null && D != null) {
|
|
1287
|
+
s.push({ ...c, sheetTransform: O, transform: D });
|
|
1290
1288
|
break;
|
|
1291
1289
|
}
|
|
1292
1290
|
}
|
|
1293
|
-
if (
|
|
1294
|
-
r.push({ ...c, sheetTransform:
|
|
1291
|
+
if (D != null && (O = N(D, this._selectionRenderService)), D != null && O != null) {
|
|
1292
|
+
r.push({ ...c, sheetTransform: O, transform: D });
|
|
1295
1293
|
break;
|
|
1296
1294
|
} else
|
|
1297
1295
|
this._remainDrawingSize(g, r, c);
|
|
@@ -1328,22 +1326,22 @@ let Ae = class extends oe {
|
|
|
1328
1326
|
_getDrawingUndoForRowVisible(i, e, n) {
|
|
1329
1327
|
const t = this._drawingManagerService.getDrawingData(i, e), r = [], s = [];
|
|
1330
1328
|
if (Object.keys(t).forEach((l) => {
|
|
1331
|
-
const c = t[l], { sheetTransform: u, transform: g, anchorType: f =
|
|
1332
|
-
if (f ===
|
|
1329
|
+
const c = t[l], { sheetTransform: u, transform: g, anchorType: f = P.Position } = c;
|
|
1330
|
+
if (f === P.None)
|
|
1333
1331
|
this._remainDrawingSize(g, r, c);
|
|
1334
1332
|
else {
|
|
1335
1333
|
const { from: m, to: p } = u, { row: S, column: C } = m, { row: v, column: R } = p;
|
|
1336
1334
|
for (let _ = 0; _ < n.length; _++) {
|
|
1337
|
-
const b = n[_], { startRow: w, endRow:
|
|
1335
|
+
const b = n[_], { startRow: w, endRow: T, startColumn: M, endColumn: U } = b;
|
|
1338
1336
|
if (v < w)
|
|
1339
1337
|
continue;
|
|
1340
|
-
if (f ===
|
|
1338
|
+
if (f === P.Position) {
|
|
1341
1339
|
let I = null, A = null;
|
|
1342
|
-
if (S >= w && S <=
|
|
1343
|
-
const
|
|
1344
|
-
if (
|
|
1340
|
+
if (S >= w && S <= T) {
|
|
1341
|
+
const $ = this._skeletonManagerService.attachRangeWithCoord({ startColumn: m.column, endColumn: p.column, startRow: S, endRow: T });
|
|
1342
|
+
if ($ == null)
|
|
1345
1343
|
return;
|
|
1346
|
-
A = { ...g, top:
|
|
1344
|
+
A = { ...g, top: $.startY };
|
|
1347
1345
|
}
|
|
1348
1346
|
if (A != null && (I = N(A, this._selectionRenderService), I != null && A != null)) {
|
|
1349
1347
|
r.push({ ...c, sheetTransform: I, transform: A });
|
|
@@ -1352,40 +1350,40 @@ let Ae = class extends oe {
|
|
|
1352
1350
|
this._remainDrawingSize(g, r, c);
|
|
1353
1351
|
continue;
|
|
1354
1352
|
}
|
|
1355
|
-
if (S >= w && v <=
|
|
1353
|
+
if (S >= w && v <= T)
|
|
1356
1354
|
continue;
|
|
1357
|
-
let
|
|
1358
|
-
if (S >= w && S <=
|
|
1359
|
-
const I = this._skeletonManagerService.attachRangeWithCoord({ startColumn: m.column, endColumn: p.column, startRow: S, endRow:
|
|
1355
|
+
let O = null, D = null;
|
|
1356
|
+
if (S >= w && S <= T) {
|
|
1357
|
+
const I = this._skeletonManagerService.attachRangeWithCoord({ startColumn: m.column, endColumn: p.column, startRow: S, endRow: T });
|
|
1360
1358
|
if (I == null)
|
|
1361
1359
|
return;
|
|
1362
|
-
|
|
1360
|
+
D = {
|
|
1363
1361
|
...g,
|
|
1364
1362
|
top: (I == null ? void 0 : I.startY) || 0,
|
|
1365
1363
|
height: ((g == null ? void 0 : g.height) || 0) - I.endY + I.startY
|
|
1366
1364
|
};
|
|
1367
|
-
} else if (v >= w && v <=
|
|
1365
|
+
} else if (v >= w && v <= T) {
|
|
1368
1366
|
const I = this._skeletonManagerService.attachRangeWithCoord({ startColumn: m.column, endColumn: p.column, startRow: w, endRow: v });
|
|
1369
1367
|
if (I == null)
|
|
1370
1368
|
return;
|
|
1371
|
-
|
|
1369
|
+
D = {
|
|
1372
1370
|
...g,
|
|
1373
1371
|
top: I.startY - ((g == null ? void 0 : g.height) || 0)
|
|
1374
1372
|
};
|
|
1375
1373
|
} else {
|
|
1376
|
-
const I = this._skeletonManagerService.attachRangeWithCoord({ startColumn: m.column, endColumn: p.column, startRow: w, endRow:
|
|
1374
|
+
const I = this._skeletonManagerService.attachRangeWithCoord({ startColumn: m.column, endColumn: p.column, startRow: w, endRow: T });
|
|
1377
1375
|
if (I == null)
|
|
1378
1376
|
return;
|
|
1379
|
-
if (
|
|
1377
|
+
if (D = {
|
|
1380
1378
|
...g,
|
|
1381
1379
|
height: ((g == null ? void 0 : g.height) || 0) - I.endY + I.startY
|
|
1382
|
-
},
|
|
1383
|
-
s.push({ ...c, sheetTransform:
|
|
1380
|
+
}, O = N(D, this._selectionRenderService), O != null && D != null) {
|
|
1381
|
+
s.push({ ...c, sheetTransform: O, transform: D });
|
|
1384
1382
|
break;
|
|
1385
1383
|
}
|
|
1386
1384
|
}
|
|
1387
|
-
if (
|
|
1388
|
-
r.push({ ...c, sheetTransform:
|
|
1385
|
+
if (D != null && (O = N(D, this._selectionRenderService)), D != null && O != null) {
|
|
1386
|
+
r.push({ ...c, sheetTransform: O, transform: D });
|
|
1389
1387
|
break;
|
|
1390
1388
|
} else
|
|
1391
1389
|
this._remainDrawingSize(g, r, c);
|
|
@@ -1408,8 +1406,8 @@ let Ae = class extends oe {
|
|
|
1408
1406
|
_getDrawingUndoForRowAndColSize(i, e, n, t) {
|
|
1409
1407
|
const r = this._drawingManagerService.getDrawingData(i, e), s = [];
|
|
1410
1408
|
return Object.keys(r).forEach((o) => {
|
|
1411
|
-
const a = r[o], { sheetTransform: d, transform: h, anchorType: l =
|
|
1412
|
-
if (l ===
|
|
1409
|
+
const a = r[o], { sheetTransform: d, transform: h, anchorType: l = P.Position } = a;
|
|
1410
|
+
if (l === P.None)
|
|
1413
1411
|
this._remainDrawingSize(h, s, a);
|
|
1414
1412
|
else {
|
|
1415
1413
|
const { from: c, to: u } = d, { row: g, column: f } = c, { row: m, column: p } = u;
|
|
@@ -1417,11 +1415,11 @@ let Ae = class extends oe {
|
|
|
1417
1415
|
const C = n[S], { startRow: v, endRow: R, startColumn: _, endColumn: b } = C;
|
|
1418
1416
|
if (m < v || p < _)
|
|
1419
1417
|
continue;
|
|
1420
|
-
if (l ===
|
|
1418
|
+
if (l === P.Position && (g <= v && m >= R || f <= _ && p >= b)) {
|
|
1421
1419
|
this._remainDrawingSize(h, s, a);
|
|
1422
1420
|
continue;
|
|
1423
1421
|
}
|
|
1424
|
-
const w =
|
|
1422
|
+
const w = V(
|
|
1425
1423
|
{ ...d },
|
|
1426
1424
|
this._selectionRenderService,
|
|
1427
1425
|
this._skeletonManagerService
|
|
@@ -1455,7 +1453,7 @@ let Ae = class extends oe {
|
|
|
1455
1453
|
return { redos: [], undos: [] };
|
|
1456
1454
|
const { unitId: t, subUnitId: r } = n, { range: s } = i, o = s.startRow, a = s.endRow, d = [], h = [], l = this._sheetDrawingService.getDrawingData(t, r), c = [], u = [];
|
|
1457
1455
|
if (Object.keys(l).forEach((g) => {
|
|
1458
|
-
const f = l[g], { sheetTransform: m, transform: p, anchorType: S =
|
|
1456
|
+
const f = l[g], { sheetTransform: m, transform: p, anchorType: S = P.Position } = f;
|
|
1459
1457
|
if (m == null || p == null)
|
|
1460
1458
|
return;
|
|
1461
1459
|
let C, v;
|
|
@@ -1463,12 +1461,12 @@ let Ae = class extends oe {
|
|
|
1463
1461
|
const _ = this._expandRow(m, p, o, a, S);
|
|
1464
1462
|
C = _ == null ? void 0 : _.newSheetTransform, v = _ == null ? void 0 : _.newTransform;
|
|
1465
1463
|
} else {
|
|
1466
|
-
const { from: _, to: b } = m, { row: w } = _, { row:
|
|
1467
|
-
if (w >= o &&
|
|
1464
|
+
const { from: _, to: b } = m, { row: w } = _, { row: T } = b;
|
|
1465
|
+
if (w >= o && T <= a)
|
|
1468
1466
|
u.push({ unitId: t, subUnitId: r, drawingId: g });
|
|
1469
1467
|
else {
|
|
1470
|
-
const
|
|
1471
|
-
C =
|
|
1468
|
+
const M = this._shrinkRow(m, p, o, a, S);
|
|
1469
|
+
C = M == null ? void 0 : M.newSheetTransform, v = M == null ? void 0 : M.newTransform;
|
|
1472
1470
|
}
|
|
1473
1471
|
}
|
|
1474
1472
|
if (!C || !v)
|
|
@@ -1496,7 +1494,7 @@ let Ae = class extends oe {
|
|
|
1496
1494
|
return { redos: [], undos: [] };
|
|
1497
1495
|
const { unitId: t, subUnitId: r } = n, { range: s } = i, o = s.startColumn, a = s.endColumn, d = [], h = [], l = this._sheetDrawingService.getDrawingData(t, r), c = [], u = [];
|
|
1498
1496
|
if (Object.keys(l).forEach((g) => {
|
|
1499
|
-
const f = l[g], { sheetTransform: m, transform: p, anchorType: S =
|
|
1497
|
+
const f = l[g], { sheetTransform: m, transform: p, anchorType: S = P.Position } = f;
|
|
1500
1498
|
if (m == null || p == null)
|
|
1501
1499
|
return;
|
|
1502
1500
|
let C, v;
|
|
@@ -1504,12 +1502,12 @@ let Ae = class extends oe {
|
|
|
1504
1502
|
const _ = this._expandCol(m, p, o, a, S);
|
|
1505
1503
|
C = _ == null ? void 0 : _.newSheetTransform, v = _ == null ? void 0 : _.newTransform;
|
|
1506
1504
|
} else {
|
|
1507
|
-
const { from: _, to: b } = m, { column: w } = _, { column:
|
|
1508
|
-
if (w >= o &&
|
|
1505
|
+
const { from: _, to: b } = m, { column: w } = _, { column: T } = b;
|
|
1506
|
+
if (w >= o && T <= a)
|
|
1509
1507
|
u.push({ unitId: t, subUnitId: r, drawingId: g });
|
|
1510
1508
|
else {
|
|
1511
|
-
const
|
|
1512
|
-
C =
|
|
1509
|
+
const M = this._shrinkCol(m, p, o, a, S);
|
|
1510
|
+
C = M == null ? void 0 : M.newSheetTransform, v = M == null ? void 0 : M.newTransform;
|
|
1513
1511
|
}
|
|
1514
1512
|
}
|
|
1515
1513
|
if (!C || !v)
|
|
@@ -1528,9 +1526,9 @@ let Ae = class extends oe {
|
|
|
1528
1526
|
}
|
|
1529
1527
|
return d.push({ id: j.id, params: [t] }), h.push({ id: j.id, params: [t] }), { redos: d, undos: h };
|
|
1530
1528
|
}
|
|
1531
|
-
_expandCol(i, e, n, t, r =
|
|
1529
|
+
_expandCol(i, e, n, t, r = P.Position) {
|
|
1532
1530
|
const s = t - n + 1, { from: o, to: a } = i, { column: d } = o, { column: h } = a;
|
|
1533
|
-
if (r ===
|
|
1531
|
+
if (r === P.None)
|
|
1534
1532
|
return {
|
|
1535
1533
|
newSheetTransform: N({ ...e }, this._selectionRenderService),
|
|
1536
1534
|
newTransform: e
|
|
@@ -1542,11 +1540,11 @@ let Ae = class extends oe {
|
|
|
1542
1540
|
return;
|
|
1543
1541
|
c = { ...e, left: (e.left || 0) + u.endX - u.startX }, l = N(c, this._selectionRenderService);
|
|
1544
1542
|
} else if (h >= t)
|
|
1545
|
-
if (r ===
|
|
1543
|
+
if (r === P.Both)
|
|
1546
1544
|
l = {
|
|
1547
1545
|
from: { ...o },
|
|
1548
1546
|
to: { ...a, column: h + s }
|
|
1549
|
-
}, c =
|
|
1547
|
+
}, c = V(l, this._selectionRenderService, this._skeletonManagerService);
|
|
1550
1548
|
else
|
|
1551
1549
|
return {
|
|
1552
1550
|
newSheetTransform: N({ ...e }, this._selectionRenderService),
|
|
@@ -1557,9 +1555,9 @@ let Ae = class extends oe {
|
|
|
1557
1555
|
newTransform: c
|
|
1558
1556
|
} : null;
|
|
1559
1557
|
}
|
|
1560
|
-
_shrinkCol(i, e, n, t, r =
|
|
1558
|
+
_shrinkCol(i, e, n, t, r = P.Position) {
|
|
1561
1559
|
const s = t - n + 1, { from: o, to: a } = i, { column: d } = o, { column: h } = a;
|
|
1562
|
-
if (r ===
|
|
1560
|
+
if (r === P.None)
|
|
1563
1561
|
return {
|
|
1564
1562
|
newSheetTransform: N({ ...e }, this._selectionRenderService),
|
|
1565
1563
|
newTransform: e
|
|
@@ -1569,16 +1567,16 @@ let Ae = class extends oe {
|
|
|
1569
1567
|
l = {
|
|
1570
1568
|
from: { ...o, column: d - s },
|
|
1571
1569
|
to: { ...a, column: h - s }
|
|
1572
|
-
}, c =
|
|
1570
|
+
}, c = V(l, this._selectionRenderService, this._skeletonManagerService);
|
|
1573
1571
|
else {
|
|
1574
1572
|
if (d >= n && h <= t)
|
|
1575
1573
|
return null;
|
|
1576
1574
|
if (d < n && h > t)
|
|
1577
|
-
if (r ===
|
|
1575
|
+
if (r === P.Both)
|
|
1578
1576
|
l = {
|
|
1579
1577
|
from: { ...o },
|
|
1580
1578
|
to: { ...a, column: h - s }
|
|
1581
|
-
}, c =
|
|
1579
|
+
}, c = V(l, this._selectionRenderService, this._skeletonManagerService);
|
|
1582
1580
|
else
|
|
1583
1581
|
return {
|
|
1584
1582
|
newSheetTransform: N({ ...e }, this._selectionRenderService),
|
|
@@ -1594,7 +1592,7 @@ let Ae = class extends oe {
|
|
|
1594
1592
|
c = { ...e, left: (e.left || 0) - u.endX + u.startX - i.from.columnOffset };
|
|
1595
1593
|
}
|
|
1596
1594
|
l = N(c, this._selectionRenderService);
|
|
1597
|
-
} else if (h >= n && h <= t && r ===
|
|
1595
|
+
} else if (h >= n && h <= t && r === P.Both) {
|
|
1598
1596
|
const u = this._skeletonManagerService.attachRangeWithCoord({
|
|
1599
1597
|
startColumn: n - 1,
|
|
1600
1598
|
endColumn: n - 1,
|
|
@@ -1606,7 +1604,7 @@ let Ae = class extends oe {
|
|
|
1606
1604
|
l = {
|
|
1607
1605
|
from: { ...o },
|
|
1608
1606
|
to: { ...a, column: n - 1, columnOffset: u.endX - u.startX }
|
|
1609
|
-
}, c =
|
|
1607
|
+
}, c = V(l, this._selectionRenderService, this._skeletonManagerService);
|
|
1610
1608
|
}
|
|
1611
1609
|
}
|
|
1612
1610
|
return l != null && c != null ? {
|
|
@@ -1614,9 +1612,9 @@ let Ae = class extends oe {
|
|
|
1614
1612
|
newTransform: c
|
|
1615
1613
|
} : null;
|
|
1616
1614
|
}
|
|
1617
|
-
_expandRow(i, e, n, t, r =
|
|
1615
|
+
_expandRow(i, e, n, t, r = P.Position) {
|
|
1618
1616
|
const s = t - n + 1, { from: o, to: a } = i, { row: d } = o, { row: h } = a;
|
|
1619
|
-
if (r ===
|
|
1617
|
+
if (r === P.None)
|
|
1620
1618
|
return {
|
|
1621
1619
|
newSheetTransform: N({ ...e }, this._selectionRenderService),
|
|
1622
1620
|
newTransform: e
|
|
@@ -1628,14 +1626,14 @@ let Ae = class extends oe {
|
|
|
1628
1626
|
return;
|
|
1629
1627
|
c = { ...e, top: (e.top || 0) + u.endY - u.startY }, l = N(c, this._selectionRenderService);
|
|
1630
1628
|
} else if (h >= t)
|
|
1631
|
-
if (r ===
|
|
1629
|
+
if (r === P.Both)
|
|
1632
1630
|
l = {
|
|
1633
1631
|
from: { ...o },
|
|
1634
1632
|
to: {
|
|
1635
1633
|
...a,
|
|
1636
1634
|
row: h + s
|
|
1637
1635
|
}
|
|
1638
|
-
}, c =
|
|
1636
|
+
}, c = V(l, this._selectionRenderService, this._skeletonManagerService);
|
|
1639
1637
|
else
|
|
1640
1638
|
return {
|
|
1641
1639
|
newSheetTransform: N({ ...e }, this._selectionRenderService),
|
|
@@ -1646,9 +1644,9 @@ let Ae = class extends oe {
|
|
|
1646
1644
|
newTransform: c
|
|
1647
1645
|
} : null;
|
|
1648
1646
|
}
|
|
1649
|
-
_shrinkRow(i, e, n, t, r =
|
|
1647
|
+
_shrinkRow(i, e, n, t, r = P.Position) {
|
|
1650
1648
|
const s = t - n + 1, { from: o, to: a } = i, { row: d } = o, { row: h } = a;
|
|
1651
|
-
if (r ===
|
|
1649
|
+
if (r === P.None)
|
|
1652
1650
|
return {
|
|
1653
1651
|
newSheetTransform: N({ ...e }, this._selectionRenderService),
|
|
1654
1652
|
newTransform: e
|
|
@@ -1658,16 +1656,16 @@ let Ae = class extends oe {
|
|
|
1658
1656
|
l = {
|
|
1659
1657
|
from: { ...o, row: d - s },
|
|
1660
1658
|
to: { ...a, row: h - s }
|
|
1661
|
-
}, c =
|
|
1659
|
+
}, c = V(l, this._selectionRenderService, this._skeletonManagerService);
|
|
1662
1660
|
else {
|
|
1663
1661
|
if (d >= n && h <= t)
|
|
1664
1662
|
return null;
|
|
1665
1663
|
if (d < n && h > t)
|
|
1666
|
-
if (r ===
|
|
1664
|
+
if (r === P.Both)
|
|
1667
1665
|
l = {
|
|
1668
1666
|
from: { ...o },
|
|
1669
1667
|
to: { ...a, row: h - s }
|
|
1670
|
-
}, c =
|
|
1668
|
+
}, c = V(l, this._selectionRenderService, this._skeletonManagerService);
|
|
1671
1669
|
else
|
|
1672
1670
|
return {
|
|
1673
1671
|
newSheetTransform: N({ ...e }, this._selectionRenderService),
|
|
@@ -1683,14 +1681,14 @@ let Ae = class extends oe {
|
|
|
1683
1681
|
c = { ...e, top: (e.top || 0) - u.endY + u.startY - i.from.rowOffset };
|
|
1684
1682
|
}
|
|
1685
1683
|
l = N(c, this._selectionRenderService);
|
|
1686
|
-
} else if (h >= n && h <= t && r ===
|
|
1684
|
+
} else if (h >= n && h <= t && r === P.Both) {
|
|
1687
1685
|
const u = this._skeletonManagerService.attachRangeWithCoord({ startColumn: o.column, endColumn: o.column, startRow: n - 1, endRow: n - 1 });
|
|
1688
1686
|
if (u == null)
|
|
1689
1687
|
return;
|
|
1690
1688
|
l = {
|
|
1691
1689
|
from: { ...o },
|
|
1692
1690
|
to: { ...a, row: n - 1, rowOffset: u.endY - u.startY }
|
|
1693
|
-
}, c =
|
|
1691
|
+
}, c = V(l, this._selectionRenderService, this._skeletonManagerService);
|
|
1694
1692
|
}
|
|
1695
1693
|
}
|
|
1696
1694
|
return l != null && c != null ? {
|
|
@@ -1701,7 +1699,7 @@ let Ae = class extends oe {
|
|
|
1701
1699
|
_commandListener() {
|
|
1702
1700
|
this.disposeWithMe(
|
|
1703
1701
|
this._commandService.onCommandExecuted((i) => {
|
|
1704
|
-
i.id ===
|
|
1702
|
+
i.id === or.id && setTimeout(() => {
|
|
1705
1703
|
const e = i.params, { unitId: n, subUnitId: t } = e, r = this._drawingManagerService.drawingManagerData, s = [], o = [];
|
|
1706
1704
|
Object.keys(r).forEach((a) => {
|
|
1707
1705
|
const d = r[a];
|
|
@@ -1710,7 +1708,7 @@ let Ae = class extends oe {
|
|
|
1710
1708
|
l != null && Object.keys(l).forEach((c) => {
|
|
1711
1709
|
if (a === n && h === t) {
|
|
1712
1710
|
const u = l[c];
|
|
1713
|
-
u.transform =
|
|
1711
|
+
u.transform = V(u.sheetTransform, this._selectionRenderService, this._skeletonManagerService), s.push(l[c]);
|
|
1714
1712
|
} else
|
|
1715
1713
|
o.push(l[c]);
|
|
1716
1714
|
});
|
|
@@ -1723,7 +1721,7 @@ let Ae = class extends oe {
|
|
|
1723
1721
|
_sheetRefreshListener() {
|
|
1724
1722
|
this.disposeWithMe(
|
|
1725
1723
|
this._commandService.onCommandExecuted((i) => {
|
|
1726
|
-
|
|
1724
|
+
li.includes(i.id) && requestIdleCallback(() => {
|
|
1727
1725
|
const e = i.params, { unitId: n, subUnitId: t, ranges: r } = e;
|
|
1728
1726
|
this._refreshDrawingTransform(n, t, r);
|
|
1729
1727
|
});
|
|
@@ -1733,13 +1731,13 @@ let Ae = class extends oe {
|
|
|
1733
1731
|
_refreshDrawingTransform(i, e, n) {
|
|
1734
1732
|
const t = this._drawingManagerService.getDrawingData(i, e), r = [];
|
|
1735
1733
|
Object.keys(t).forEach((s) => {
|
|
1736
|
-
const o = t[s], { sheetTransform: a, anchorType: d =
|
|
1737
|
-
if (d ===
|
|
1734
|
+
const o = t[s], { sheetTransform: a, anchorType: d = P.Position } = o;
|
|
1735
|
+
if (d === P.None)
|
|
1738
1736
|
return !0;
|
|
1739
1737
|
const { from: h, to: l } = a, { row: c, column: u } = h, { row: g, column: f } = l;
|
|
1740
1738
|
for (let m = 0; m < n.length; m++) {
|
|
1741
1739
|
const p = n[m], { startRow: S, endRow: C, startColumn: v, endColumn: R } = p;
|
|
1742
|
-
if (
|
|
1740
|
+
if (dn.intersects(
|
|
1743
1741
|
{
|
|
1744
1742
|
startRow: S,
|
|
1745
1743
|
endRow: C,
|
|
@@ -1755,7 +1753,7 @@ let Ae = class extends oe {
|
|
|
1755
1753
|
) || c > C || u > R) {
|
|
1756
1754
|
r.push({
|
|
1757
1755
|
...o,
|
|
1758
|
-
transform:
|
|
1756
|
+
transform: V(a, this._selectionRenderService, this._skeletonManagerService)
|
|
1759
1757
|
});
|
|
1760
1758
|
break;
|
|
1761
1759
|
}
|
|
@@ -1763,22 +1761,22 @@ let Ae = class extends oe {
|
|
|
1763
1761
|
}), r.length !== 0 && (this._drawingManagerService.refreshTransform(r), this._commandService.syncExecuteCommand(j.id, [i]));
|
|
1764
1762
|
}
|
|
1765
1763
|
};
|
|
1766
|
-
Ae =
|
|
1767
|
-
|
|
1768
|
-
ce(0,
|
|
1769
|
-
ce(1, W(
|
|
1764
|
+
Ae = ci([
|
|
1765
|
+
ee(te.Rendered, Ae),
|
|
1766
|
+
ce(0, G),
|
|
1767
|
+
ce(1, W(ar)),
|
|
1770
1768
|
ce(2, K),
|
|
1771
1769
|
ce(3, k),
|
|
1772
1770
|
ce(4, z),
|
|
1773
1771
|
ce(5, he)
|
|
1774
1772
|
], Ae);
|
|
1775
|
-
var
|
|
1776
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
1773
|
+
var ui = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, hi = (i, e, n, t) => {
|
|
1774
|
+
for (var r = t > 1 ? void 0 : t ? gi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
1777
1775
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
1778
|
-
return t && r &&
|
|
1776
|
+
return t && r && ui(e, n, r), r;
|
|
1779
1777
|
}, de = (i, e) => (n, t) => e(n, t, i);
|
|
1780
|
-
function
|
|
1781
|
-
const { scaleX: r, scaleY: s } = e.getAncestorScale(), o = e.getViewport(
|
|
1778
|
+
function mi(i, e, n, t) {
|
|
1779
|
+
const { scaleX: r, scaleY: s } = e.getAncestorScale(), o = e.getViewport(Un.VIEW_MAIN), a = {
|
|
1782
1780
|
left: !0,
|
|
1783
1781
|
top: !0
|
|
1784
1782
|
};
|
|
@@ -1787,37 +1785,37 @@ function hi(i, e, n, t) {
|
|
|
1787
1785
|
...i,
|
|
1788
1786
|
absolute: a
|
|
1789
1787
|
};
|
|
1790
|
-
const { left: d, right: h, top: l, bottom: c } = i, u = t.getFreeze(), { startColumn: g, startRow: f, xSplit: m, ySplit: p } = u, S = n.getNoMergeCellPositionByIndexWithNoHeader(f - p, g - m), C = n.getNoMergeCellPositionByIndexWithNoHeader(f, g), { rowHeaderWidth: v, columnHeaderHeight: R } = n, _ = C.startX - S.startX, b = C.startY - S.startY, { top: w, left:
|
|
1791
|
-
let
|
|
1792
|
-
d <
|
|
1788
|
+
const { left: d, right: h, top: l, bottom: c } = i, u = t.getFreeze(), { startColumn: g, startRow: f, xSplit: m, ySplit: p } = u, S = n.getNoMergeCellPositionByIndexWithNoHeader(f - p, g - m), C = n.getNoMergeCellPositionByIndexWithNoHeader(f, g), { rowHeaderWidth: v, columnHeaderHeight: R } = n, _ = C.startX - S.startX, b = C.startY - S.startY, { top: w, left: T, viewportScrollX: M, viewportScrollY: U } = o;
|
|
1789
|
+
let O, D;
|
|
1790
|
+
d < T ? (a.left = !0, O = (_ + v + (d - T)) * r, D = Math.max(
|
|
1793
1791
|
Math.min(
|
|
1794
|
-
(_ + v + (h -
|
|
1792
|
+
(_ + v + (h - T)) * r,
|
|
1795
1793
|
(_ + v) * r
|
|
1796
1794
|
),
|
|
1797
|
-
(h -
|
|
1798
|
-
)) : (a.left = !1,
|
|
1795
|
+
(h - M) * r
|
|
1796
|
+
)) : (a.left = !1, O = Math.max((d - M) * r, (_ + v) * r), D = Math.max((h - M) * r, (_ + v) * r));
|
|
1799
1797
|
let I, A;
|
|
1800
1798
|
return l < w ? (a.top = !0, I = (b + R + (l - w)) * s, A = Math.max(
|
|
1801
1799
|
Math.min(
|
|
1802
1800
|
(b + R + (h - w)) * s,
|
|
1803
1801
|
(b + R) * s
|
|
1804
1802
|
),
|
|
1805
|
-
(c -
|
|
1806
|
-
)) : (a.top = !1, I = Math.max((l -
|
|
1807
|
-
left:
|
|
1808
|
-
right:
|
|
1803
|
+
(c - U) * s
|
|
1804
|
+
)) : (a.top = !1, I = Math.max((l - U) * s, (b + R) * s), A = Math.max((c - U) * s, (b + R) * s)), {
|
|
1805
|
+
left: O,
|
|
1806
|
+
right: D,
|
|
1809
1807
|
top: I,
|
|
1810
1808
|
bottom: A,
|
|
1811
1809
|
absolute: a
|
|
1812
1810
|
};
|
|
1813
1811
|
}
|
|
1814
|
-
const
|
|
1812
|
+
const Ke = (i, e, n, t) => {
|
|
1815
1813
|
const { scene: r } = e, { left: s, top: o, width: a, height: d, angle: h } = i, l = {
|
|
1816
1814
|
left: s,
|
|
1817
1815
|
right: s + a,
|
|
1818
1816
|
top: o,
|
|
1819
1817
|
bottom: o + d
|
|
1820
|
-
}, c =
|
|
1818
|
+
}, c = mi(l, r, n, t);
|
|
1821
1819
|
return {
|
|
1822
1820
|
startX: c.left,
|
|
1823
1821
|
endX: c.right,
|
|
@@ -1829,14 +1827,14 @@ const ze = (i, e, n, t) => {
|
|
|
1829
1827
|
absolute: c.absolute
|
|
1830
1828
|
};
|
|
1831
1829
|
};
|
|
1832
|
-
let
|
|
1830
|
+
let Ne = class extends oe {
|
|
1833
1831
|
constructor(e, n, t, r, s, o) {
|
|
1834
1832
|
super();
|
|
1835
1833
|
H(this, "_domLayerMap", /* @__PURE__ */ new Map());
|
|
1836
1834
|
H(this, "_domLayerInfoMap", /* @__PURE__ */ new Map());
|
|
1837
|
-
H(this, "_transformChange$", new
|
|
1835
|
+
H(this, "_transformChange$", new ft());
|
|
1838
1836
|
H(this, "transformChange$", this._transformChange$.asObservable());
|
|
1839
|
-
H(this, "_remove$", new
|
|
1837
|
+
H(this, "_remove$", new ft());
|
|
1840
1838
|
H(this, "remove$", this._remove$.asObservable());
|
|
1841
1839
|
H(this, "_hooks", []);
|
|
1842
1840
|
this._renderManagerService = e, this._univerInstanceService = n, this._commandService = t, this._drawingManagerService = r, this._canvasFloatDomService = s, this._sheetDrawingService = o, this._drawingAddListener(), this._scrollUpdateListener(), this._featureUpdateListener(), this._deleteListener();
|
|
@@ -1868,66 +1866,67 @@ let tt = class extends oe {
|
|
|
1868
1866
|
// eslint-disable-next-line max-lines-per-function
|
|
1869
1867
|
this._drawingManagerService.add$.subscribe((e) => {
|
|
1870
1868
|
e.forEach((n) => {
|
|
1871
|
-
var
|
|
1872
|
-
const { unitId: t, subUnitId: r, drawingId: s } = n, o = le(this._univerInstanceService, { unitId: t, subUnitId: r }), a = this._drawingManagerService.getDrawingByParam(n), d = (
|
|
1869
|
+
var at, ct, dt;
|
|
1870
|
+
const { unitId: t, subUnitId: r, drawingId: s } = n, o = le(this._univerInstanceService, { unitId: t, subUnitId: r }), a = this._drawingManagerService.getDrawingByParam(n), d = (at = this._renderManagerService.getRenderById(t)) == null ? void 0 : at.with(se).getWorksheetSkeleton(r);
|
|
1873
1871
|
if (a == null || o == null || d == null)
|
|
1874
1872
|
return;
|
|
1875
|
-
const { transform: h, drawingType: l } = a;
|
|
1876
|
-
if (l !==
|
|
1873
|
+
const { transform: h, drawingType: l, data: c } = a;
|
|
1874
|
+
if (l !== ke.DRAWING_DOM)
|
|
1877
1875
|
return;
|
|
1878
|
-
const
|
|
1879
|
-
if (
|
|
1876
|
+
const u = this._getSceneAndTransformerByDrawingSearch(t);
|
|
1877
|
+
if (u == null)
|
|
1880
1878
|
return;
|
|
1881
|
-
const { scene:
|
|
1879
|
+
const { scene: g, canvas: f } = u;
|
|
1882
1880
|
if (h == null)
|
|
1883
1881
|
return !0;
|
|
1884
|
-
const { left:
|
|
1885
|
-
if (
|
|
1886
|
-
|
|
1882
|
+
const { left: m, top: p, width: S, height: C, angle: v, flipX: R, flipY: _, skewX: b, skewY: w } = h, T = bn({ unitId: t, subUnitId: r, drawingId: s }), M = g.getObject(T);
|
|
1883
|
+
if (M != null) {
|
|
1884
|
+
M.transformByState({ left: m, top: p, width: S, height: C, angle: v, flipX: R, flipY: _, skewX: b, skewY: w });
|
|
1887
1885
|
return;
|
|
1888
1886
|
}
|
|
1889
|
-
const
|
|
1890
|
-
left:
|
|
1891
|
-
top:
|
|
1892
|
-
width:
|
|
1893
|
-
height:
|
|
1887
|
+
const U = {
|
|
1888
|
+
left: m,
|
|
1889
|
+
top: p,
|
|
1890
|
+
width: S,
|
|
1891
|
+
height: C,
|
|
1894
1892
|
zIndex: this._drawingManagerService.getDrawingOrder(t, r).length - 1
|
|
1895
|
-
},
|
|
1896
|
-
|
|
1897
|
-
const
|
|
1898
|
-
dispose:
|
|
1899
|
-
rect:
|
|
1900
|
-
position$:
|
|
1893
|
+
}, O = new Pn(T, U);
|
|
1894
|
+
g.addObject(O, Tn).attachTransformerTo(O);
|
|
1895
|
+
const D = this._ensureMap(t, r), I = new ln(), A = Ke(O, u.renderObject, d.skeleton, o.worksheet), $ = new Gn(A), ne = {
|
|
1896
|
+
dispose: I,
|
|
1897
|
+
rect: O,
|
|
1898
|
+
position$: $,
|
|
1901
1899
|
unitId: t,
|
|
1902
1900
|
subUnitId: r
|
|
1903
1901
|
};
|
|
1904
1902
|
this._canvasFloatDomService.addFloatDom({
|
|
1905
|
-
position$:
|
|
1903
|
+
position$: $,
|
|
1906
1904
|
id: s,
|
|
1907
1905
|
componentKey: a.componentKey,
|
|
1908
1906
|
onPointerDown: (x) => {
|
|
1909
|
-
|
|
1907
|
+
f.dispatchEvent(new PointerEvent(x.type, x));
|
|
1910
1908
|
},
|
|
1911
1909
|
onPointerMove: (x) => {
|
|
1912
|
-
|
|
1910
|
+
f.dispatchEvent(new PointerEvent(x.type, x));
|
|
1913
1911
|
},
|
|
1914
1912
|
onPointerUp: (x) => {
|
|
1915
|
-
|
|
1913
|
+
f.dispatchEvent(new PointerEvent(x.type, x));
|
|
1916
1914
|
},
|
|
1917
1915
|
onWheel: (x) => {
|
|
1918
|
-
|
|
1916
|
+
f.dispatchEvent(new WheelEvent(x.type, x));
|
|
1919
1917
|
},
|
|
1920
|
-
props: (
|
|
1918
|
+
props: (dt = (ct = D.get(s)) == null ? void 0 : ct.props) != null ? dt : this._getFloatDomProps(s),
|
|
1919
|
+
data: c
|
|
1921
1920
|
});
|
|
1922
|
-
const
|
|
1923
|
-
const x =
|
|
1924
|
-
|
|
1921
|
+
const ot = O.onTransformChange$.subscribeEvent(() => {
|
|
1922
|
+
const x = Ke(O, u.renderObject, d.skeleton, o.worksheet);
|
|
1923
|
+
$.next(
|
|
1925
1924
|
x
|
|
1926
1925
|
);
|
|
1927
1926
|
});
|
|
1928
|
-
|
|
1927
|
+
I.add(() => {
|
|
1929
1928
|
this._canvasFloatDomService.removeFloatDom(s);
|
|
1930
|
-
}),
|
|
1929
|
+
}), ot && I.add(ot), this._domLayerInfoMap.set(s, ne), D.set(s, {});
|
|
1931
1930
|
});
|
|
1932
1931
|
})
|
|
1933
1932
|
);
|
|
@@ -1937,24 +1936,24 @@ let tt = class extends oe {
|
|
|
1937
1936
|
var t, r;
|
|
1938
1937
|
const n = (s, o) => {
|
|
1939
1938
|
var u;
|
|
1940
|
-
const a = this._getSceneAndTransformerByDrawingSearch(s), d = this._ensureMap(s, o), h = Array.from(d.keys()), l = le(this._univerInstanceService, { unitId: s, subUnitId: o }), c = (u = this._renderManagerService.getRenderById(s)) == null ? void 0 : u.with(
|
|
1939
|
+
const a = this._getSceneAndTransformerByDrawingSearch(s), d = this._ensureMap(s, o), h = Array.from(d.keys()), l = le(this._univerInstanceService, { unitId: s, subUnitId: o }), c = (u = this._renderManagerService.getRenderById(s)) == null ? void 0 : u.with(se).getWorksheetSkeleton(o);
|
|
1941
1940
|
!a || !l || !c || h.forEach((g) => {
|
|
1942
1941
|
const f = this._domLayerInfoMap.get(g);
|
|
1943
1942
|
if (f) {
|
|
1944
|
-
const m =
|
|
1943
|
+
const m = Ke(f.rect, a.renderObject, c.skeleton, l.worksheet);
|
|
1945
1944
|
f.position$.next(m);
|
|
1946
1945
|
}
|
|
1947
1946
|
});
|
|
1948
1947
|
};
|
|
1949
|
-
if (e.id ===
|
|
1948
|
+
if (e.id === Ln.id) {
|
|
1950
1949
|
const s = e.params, { unitId: o, sheetId: a } = s;
|
|
1951
1950
|
n(o, a);
|
|
1952
|
-
} else if (e.id ===
|
|
1951
|
+
} else if (e.id === Bn.id) {
|
|
1953
1952
|
const s = e.params, { unitId: o } = s;
|
|
1954
1953
|
Array.from((r = (t = this._domLayerMap.get(o)) == null ? void 0 : t.keys()) != null ? r : []).forEach((d) => {
|
|
1955
1954
|
n(o, d);
|
|
1956
1955
|
});
|
|
1957
|
-
} else if (e.id ===
|
|
1956
|
+
} else if (e.id === cr.id) {
|
|
1958
1957
|
const { unitId: s, subUnitId: o } = e.params;
|
|
1959
1958
|
n(s, o);
|
|
1960
1959
|
}
|
|
@@ -1962,7 +1961,7 @@ let tt = class extends oe {
|
|
|
1962
1961
|
}
|
|
1963
1962
|
_getPosition(e, n) {
|
|
1964
1963
|
var u;
|
|
1965
|
-
const { startX: t, endX: r, startY: s, endY: o } = e, a = (u = this._renderManagerService.getRenderById(n)) == null ? void 0 : u.with(
|
|
1964
|
+
const { startX: t, endX: r, startY: s, endY: o } = e, a = (u = this._renderManagerService.getRenderById(n)) == null ? void 0 : u.with(xe);
|
|
1966
1965
|
if (a == null)
|
|
1967
1966
|
return;
|
|
1968
1967
|
const d = a.getSelectionCellByPosition(t, s);
|
|
@@ -1992,7 +1991,7 @@ let tt = class extends oe {
|
|
|
1992
1991
|
this._drawingManagerService.update$.subscribe((e) => {
|
|
1993
1992
|
e.forEach((n) => {
|
|
1994
1993
|
const t = this._drawingManagerService.getDrawingByParam(n);
|
|
1995
|
-
if (!t || t.drawingType !==
|
|
1994
|
+
if (!t || t.drawingType !== ke.DRAWING_DOM)
|
|
1996
1995
|
return;
|
|
1997
1996
|
const r = {
|
|
1998
1997
|
...t.transform
|
|
@@ -2018,31 +2017,32 @@ let tt = class extends oe {
|
|
|
2018
2017
|
});
|
|
2019
2018
|
if (!n)
|
|
2020
2019
|
throw new Error("cannot find current target!");
|
|
2021
|
-
const { unitId: t, subUnitId: r } = n, { initPosition: s, componentKey: o } = e,
|
|
2022
|
-
if (
|
|
2020
|
+
const { unitId: t, subUnitId: r } = n, { initPosition: s, componentKey: o, data: a } = e, d = ie.generateRandomId(), h = this._getPosition(s, t);
|
|
2021
|
+
if (h == null)
|
|
2023
2022
|
return;
|
|
2024
|
-
this._ensureMap(t, r).set(
|
|
2025
|
-
const
|
|
2023
|
+
this._ensureMap(t, r).set(d, e);
|
|
2024
|
+
const c = {
|
|
2026
2025
|
unitId: t,
|
|
2027
2026
|
subUnitId: r,
|
|
2028
|
-
drawingId:
|
|
2029
|
-
drawingType:
|
|
2027
|
+
drawingId: d,
|
|
2028
|
+
drawingType: ke.DRAWING_DOM,
|
|
2030
2029
|
componentKey: o,
|
|
2031
|
-
sheetTransform:
|
|
2030
|
+
sheetTransform: h,
|
|
2032
2031
|
transform: {
|
|
2033
2032
|
left: s.startX,
|
|
2034
2033
|
top: s.startY,
|
|
2035
2034
|
width: s.endX - s.startX,
|
|
2036
2035
|
height: s.endY - s.startY
|
|
2037
|
-
}
|
|
2036
|
+
},
|
|
2037
|
+
data: a
|
|
2038
2038
|
};
|
|
2039
2039
|
return this._commandService.executeCommand(st.id, {
|
|
2040
2040
|
unitId: t,
|
|
2041
|
-
drawings: [
|
|
2041
|
+
drawings: [c]
|
|
2042
2042
|
}), {
|
|
2043
|
-
id:
|
|
2043
|
+
id: d,
|
|
2044
2044
|
dispose: () => {
|
|
2045
|
-
this._removeDom(
|
|
2045
|
+
this._removeDom(d, !0);
|
|
2046
2046
|
}
|
|
2047
2047
|
};
|
|
2048
2048
|
}
|
|
@@ -2071,20 +2071,21 @@ let tt = class extends oe {
|
|
|
2071
2071
|
};
|
|
2072
2072
|
}
|
|
2073
2073
|
};
|
|
2074
|
-
|
|
2074
|
+
Ne = hi([
|
|
2075
|
+
ee(te.Starting, Ne),
|
|
2075
2076
|
de(0, W(K)),
|
|
2076
2077
|
de(1, he),
|
|
2077
|
-
de(2, W(
|
|
2078
|
+
de(2, W(G)),
|
|
2078
2079
|
de(3, z),
|
|
2079
|
-
de(4, W(
|
|
2080
|
+
de(4, W(Zn)),
|
|
2080
2081
|
de(5, k)
|
|
2081
|
-
],
|
|
2082
|
-
var
|
|
2083
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2082
|
+
], Ne);
|
|
2083
|
+
var fi = Object.defineProperty, pi = Object.getOwnPropertyDescriptor, wi = (i, e, n, t) => {
|
|
2084
|
+
for (var r = t > 1 ? void 0 : t ? pi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
2084
2085
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
2085
|
-
return t && r &&
|
|
2086
|
+
return t && r && fi(e, n, r), r;
|
|
2086
2087
|
}, Oe = (i, e) => (n, t) => e(n, t, i);
|
|
2087
|
-
let
|
|
2088
|
+
let je = class extends oe {
|
|
2088
2089
|
constructor(i, e, n, t) {
|
|
2089
2090
|
super(), this._sheetPrintInterceptorService = i, this._drawingRenderService = e, this._drawingManagerService = n, this._renderManagerService = t, this._initPrinting();
|
|
2090
2091
|
}
|
|
@@ -2109,15 +2110,15 @@ let Ne = class extends oe {
|
|
|
2109
2110
|
const { unitId: t, subUnitId: r } = e, s = this._renderManagerService.getRenderById(t);
|
|
2110
2111
|
if (!s)
|
|
2111
2112
|
return n(i);
|
|
2112
|
-
const o = s.with(
|
|
2113
|
+
const o = s.with(se).getWorksheetSkeleton(r);
|
|
2113
2114
|
if (!o)
|
|
2114
2115
|
return n(i);
|
|
2115
2116
|
const a = this._drawingManagerService.getDrawingDataForUnit(t), d = a == null ? void 0 : a[e.subUnitId];
|
|
2116
2117
|
if (!d)
|
|
2117
2118
|
return n(i);
|
|
2118
|
-
const { scaleX: h, scaleY: l } = s.scene, c = i ? { ...i } : { startColumn: 0, endColumn: 0, endRow: 0, startRow: 0 }, u = d.order.map((g) => d.data[g]).filter((g) => g.drawingType !==
|
|
2119
|
+
const { scaleX: h, scaleY: l } = s.scene, c = i ? { ...i } : { startColumn: 0, endColumn: 0, endRow: 0, startRow: 0 }, u = d.order.map((g) => d.data[g]).filter((g) => g.drawingType !== Ge.DRAWING_DOM);
|
|
2119
2120
|
return u.length ? (u.forEach((g) => {
|
|
2120
|
-
if (!g.groupId && g.transform &&
|
|
2121
|
+
if (!g.groupId && g.transform && ie.isDefine(g.transform.left) && ie.isDefine(g.transform.top) && ie.isDefine(g.transform.width) && ie.isDefine(g.transform.height)) {
|
|
2121
2122
|
const f = o.skeleton.getCellPositionByOffset(g.transform.left, g.transform.top, h, l, { x: 0, y: 0 }), m = o.skeleton.getCellPositionByOffset(g.transform.left + g.transform.width, g.transform.top + g.transform.height, h, l, { x: 0, y: 0 });
|
|
2122
2123
|
f.column < c.startColumn && (c.startColumn = f.column), f.row < c.startRow && (c.startRow = f.row), c.endRow < m.row && (c.endRow = m.row), c.endColumn < m.column && (c.endColumn = m.column);
|
|
2123
2124
|
}
|
|
@@ -2128,19 +2129,19 @@ let Ne = class extends oe {
|
|
|
2128
2129
|
);
|
|
2129
2130
|
}
|
|
2130
2131
|
};
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
Oe(0, W(
|
|
2134
|
-
Oe(1, W(
|
|
2132
|
+
je = wi([
|
|
2133
|
+
ee(te.Rendered, je),
|
|
2134
|
+
Oe(0, W(Wn)),
|
|
2135
|
+
Oe(1, W(Sn)),
|
|
2135
2136
|
Oe(2, z),
|
|
2136
2137
|
Oe(3, K)
|
|
2137
|
-
],
|
|
2138
|
-
var
|
|
2139
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2138
|
+
], je);
|
|
2139
|
+
var _i = Object.defineProperty, vi = Object.getOwnPropertyDescriptor, Si = (i, e, n, t) => {
|
|
2140
|
+
for (var r = t > 1 ? void 0 : t ? vi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
2140
2141
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
2141
|
-
return t && r &&
|
|
2142
|
+
return t && r && _i(e, n, r), r;
|
|
2142
2143
|
}, fe = (i, e) => (n, t) => e(n, t, i);
|
|
2143
|
-
let
|
|
2144
|
+
let Le = class extends oe {
|
|
2144
2145
|
constructor(i, e, n, t, r) {
|
|
2145
2146
|
super(), this._drawingManagerService = i, this._renderManagerService = e, this._permissionService = n, this._univerInstanceService = t, this._userManagerService = r, this._initDrawingVisible(), this._initDrawingEditable(), this._initViewPermissionChange(), this._initEditPermissionChange();
|
|
2146
2147
|
}
|
|
@@ -2158,7 +2159,7 @@ let je = class extends oe {
|
|
|
2158
2159
|
return;
|
|
2159
2160
|
}
|
|
2160
2161
|
const r = e.getUnitId(), s = t.getSheetId();
|
|
2161
|
-
if (this._permissionService.composePermission([new
|
|
2162
|
+
if (this._permissionService.composePermission([new wt(r).id, new Xe(r, s).id]).every((a) => a.value))
|
|
2162
2163
|
this._drawingManagerService.setDrawingVisible(!0);
|
|
2163
2164
|
else {
|
|
2164
2165
|
this._drawingManagerService.setDrawingVisible(!1);
|
|
@@ -2187,7 +2188,7 @@ let je = class extends oe {
|
|
|
2187
2188
|
return;
|
|
2188
2189
|
}
|
|
2189
2190
|
const r = e.getUnitId(), s = t.getSheetId();
|
|
2190
|
-
if (this._permissionService.composePermission([new
|
|
2191
|
+
if (this._permissionService.composePermission([new qe(r).id, new Pe(r, s).id]).every((a) => a.value))
|
|
2191
2192
|
this._drawingManagerService.setDrawingEditable(!0);
|
|
2192
2193
|
else {
|
|
2193
2194
|
this._drawingManagerService.setDrawingEditable(!1);
|
|
@@ -2215,7 +2216,7 @@ let je = class extends oe {
|
|
|
2215
2216
|
const a = this._renderManagerService.getRenderById(r), d = a == null ? void 0 : a.scene;
|
|
2216
2217
|
if (d == null)
|
|
2217
2218
|
return;
|
|
2218
|
-
const h = d.getTransformerByCreate(), l = this._permissionService.composePermission$([new
|
|
2219
|
+
const h = d.getTransformerByCreate(), l = this._permissionService.composePermission$([new wt(r).id, new Xe(r, s).id]).pipe(pt((u) => u.every((g) => g.value)));
|
|
2219
2220
|
l == null || l.pipe(
|
|
2220
2221
|
Me((u) => u !== o),
|
|
2221
2222
|
De()
|
|
@@ -2227,7 +2228,7 @@ let je = class extends oe {
|
|
|
2227
2228
|
p.classType === ae.IMAGE && m.some((S) => p.oKey.includes(S.drawingId)) && d.removeObject(p);
|
|
2228
2229
|
}), h.clearSelectedObjects());
|
|
2229
2230
|
}
|
|
2230
|
-
}), (c = this._permissionService.getPermissionPoint$(new
|
|
2231
|
+
}), (c = this._permissionService.getPermissionPoint$(new Xe(r, s).id)) == null || c.pipe(
|
|
2231
2232
|
Me((u) => u.value !== o),
|
|
2232
2233
|
De()
|
|
2233
2234
|
).subscribe({
|
|
@@ -2254,7 +2255,7 @@ let je = class extends oe {
|
|
|
2254
2255
|
const a = this._renderManagerService.getRenderById(r), d = a == null ? void 0 : a.scene;
|
|
2255
2256
|
if (d == null)
|
|
2256
2257
|
return;
|
|
2257
|
-
const h = d.getTransformerByCreate(), l = this._permissionService.composePermission$([new
|
|
2258
|
+
const h = d.getTransformerByCreate(), l = this._permissionService.composePermission$([new qe(r).id, new Pe(r, s).id]).pipe(pt((u) => u.every((g) => g.value)));
|
|
2258
2259
|
l == null || l.pipe(
|
|
2259
2260
|
Me((u) => u !== o),
|
|
2260
2261
|
De()
|
|
@@ -2287,20 +2288,20 @@ let je = class extends oe {
|
|
|
2287
2288
|
);
|
|
2288
2289
|
}
|
|
2289
2290
|
};
|
|
2290
|
-
|
|
2291
|
-
|
|
2291
|
+
Le = Si([
|
|
2292
|
+
ee(te.Rendered, Le),
|
|
2292
2293
|
fe(0, z),
|
|
2293
2294
|
fe(1, K),
|
|
2294
|
-
fe(2,
|
|
2295
|
+
fe(2, gn),
|
|
2295
2296
|
fe(3, he),
|
|
2296
|
-
fe(4, W(
|
|
2297
|
-
],
|
|
2298
|
-
var
|
|
2299
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2297
|
+
fe(4, W(un))
|
|
2298
|
+
], Le);
|
|
2299
|
+
var Ci = Object.defineProperty, Ii = Object.getOwnPropertyDescriptor, Ri = (i, e, n, t) => {
|
|
2300
|
+
for (var r = t > 1 ? void 0 : t ? Ii(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
2300
2301
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
2301
|
-
return t && r &&
|
|
2302
|
-
},
|
|
2303
|
-
let
|
|
2302
|
+
return t && r && Ci(e, n, r), r;
|
|
2303
|
+
}, Je = (i, e) => (n, t) => e(n, t, i);
|
|
2304
|
+
let Be = class extends oe {
|
|
2304
2305
|
constructor(e, n, t) {
|
|
2305
2306
|
super();
|
|
2306
2307
|
H(this, "_copyInfo");
|
|
@@ -2311,7 +2312,7 @@ let Le = class extends oe {
|
|
|
2311
2312
|
id: "SHEET_IMAGE_UI_PLUGIN",
|
|
2312
2313
|
onBeforeCopy: (e, n, t) => this._collect(e, n, t),
|
|
2313
2314
|
onPasteCells: (e, n, t, r) => {
|
|
2314
|
-
const { copyType: s =
|
|
2315
|
+
const { copyType: s = ht.COPY, pasteType: o } = r, { range: a } = e || {}, { range: d, unitId: h, subUnitId: l } = n;
|
|
2315
2316
|
return this._generateMutations(d, { copyType: s, pasteType: o, copyRange: a, unitId: h, subUnitId: l });
|
|
2316
2317
|
},
|
|
2317
2318
|
onPastePlainText: (e, n) => ({ undos: [], redos: [] })
|
|
@@ -2319,7 +2320,7 @@ let Le = class extends oe {
|
|
|
2319
2320
|
}
|
|
2320
2321
|
_collect(e, n, t) {
|
|
2321
2322
|
var u;
|
|
2322
|
-
const r = (u = this._renderManagerService.getRenderById(e)) == null ? void 0 : u.with(
|
|
2323
|
+
const r = (u = this._renderManagerService.getRenderById(e)) == null ? void 0 : u.with(se);
|
|
2323
2324
|
if (!r) return;
|
|
2324
2325
|
const s = r.attachRangeWithCoord(t);
|
|
2325
2326
|
if (!s)
|
|
@@ -2327,7 +2328,7 @@ let Le = class extends oe {
|
|
|
2327
2328
|
const { startX: o, endX: a, startY: d, endY: h } = s, l = this._sheetDrawingService.getDrawingData(e, n), c = [];
|
|
2328
2329
|
Object.keys(l).forEach((g) => {
|
|
2329
2330
|
const f = l[g], { transform: m } = f;
|
|
2330
|
-
if (f.anchorType !==
|
|
2331
|
+
if (f.anchorType !== P.Both || !m)
|
|
2331
2332
|
return;
|
|
2332
2333
|
const { left: p = 0, top: S = 0, width: C = 0, height: v = 0 } = m, { drawingStartX: R, drawingEndX: _, drawingStartY: b, drawingEndY: w } = {
|
|
2333
2334
|
drawingStartX: p,
|
|
@@ -2344,7 +2345,7 @@ let Le = class extends oe {
|
|
|
2344
2345
|
}
|
|
2345
2346
|
// eslint-disable-next-line max-lines-per-function
|
|
2346
2347
|
_generateMutations(e, n) {
|
|
2347
|
-
var
|
|
2348
|
+
var M;
|
|
2348
2349
|
if (!this._copyInfo)
|
|
2349
2350
|
return { redos: [], undos: [] };
|
|
2350
2351
|
if ([
|
|
@@ -2359,7 +2360,7 @@ let Le = class extends oe {
|
|
|
2359
2360
|
const { copyRange: t } = n;
|
|
2360
2361
|
if (!t)
|
|
2361
2362
|
return { redos: [], undos: [] };
|
|
2362
|
-
const { drawings: r, unitId: s, subUnitId: o } = this._copyInfo, { ranges: [a, d], mapFunc: h } =
|
|
2363
|
+
const { drawings: r, unitId: s, subUnitId: o } = this._copyInfo, { ranges: [a, d], mapFunc: h } = $n([t, e]), { row: l, col: c } = h(a.startRow, a.startColumn), { row: u, col: g } = h(d.startRow, d.startColumn), f = (M = this._renderManagerService.getRenderById(s)) == null ? void 0 : M.with(se);
|
|
2363
2364
|
if (!f)
|
|
2364
2365
|
return { redos: [], undos: [] };
|
|
2365
2366
|
const m = f.attachRangeWithCoord({
|
|
@@ -2375,36 +2376,36 @@ let Le = class extends oe {
|
|
|
2375
2376
|
});
|
|
2376
2377
|
if (!m || !p)
|
|
2377
2378
|
return { redos: [], undos: [] };
|
|
2378
|
-
const S = [], C = [], v = p.startX - m.startX, R = p.startY - m.startY, _ = u - l, b = g - c, w = n.copyType ===
|
|
2379
|
-
return r.forEach((
|
|
2380
|
-
const { transform:
|
|
2381
|
-
if (!
|
|
2379
|
+
const S = [], C = [], v = p.startX - m.startX, R = p.startY - m.startY, _ = u - l, b = g - c, w = n.copyType === ht.CUT, { _sheetDrawingService: T } = this;
|
|
2380
|
+
return r.forEach((U) => {
|
|
2381
|
+
const { transform: O, sheetTransform: D } = U;
|
|
2382
|
+
if (!O)
|
|
2382
2383
|
return;
|
|
2383
2384
|
const I = {
|
|
2384
|
-
...
|
|
2385
|
+
...U,
|
|
2385
2386
|
unitId: s,
|
|
2386
2387
|
subUnitId: o,
|
|
2387
|
-
drawingId: w ?
|
|
2388
|
+
drawingId: w ? U.drawingId : ie.generateRandomId(),
|
|
2388
2389
|
transform: {
|
|
2389
|
-
...
|
|
2390
|
-
left:
|
|
2391
|
-
top:
|
|
2390
|
+
...O,
|
|
2391
|
+
left: O.left + v,
|
|
2392
|
+
top: O.top + R
|
|
2392
2393
|
},
|
|
2393
2394
|
sheetTransform: {
|
|
2394
|
-
to: { ...
|
|
2395
|
-
from: { ...
|
|
2395
|
+
to: { ...D.to, row: D.to.row + _, column: D.to.column + b },
|
|
2396
|
+
from: { ...D.from, row: D.from.row + _, column: D.from.column + b }
|
|
2396
2397
|
}
|
|
2397
2398
|
};
|
|
2398
2399
|
if (w) {
|
|
2399
|
-
const { undo: A, redo:
|
|
2400
|
+
const { undo: A, redo: $, objects: ne } = T.getBatchUpdateOp([I]);
|
|
2400
2401
|
S.push({
|
|
2401
2402
|
id: E.id,
|
|
2402
2403
|
params: {
|
|
2403
2404
|
unitId: s,
|
|
2404
2405
|
subUnitId: o,
|
|
2405
2406
|
type: y.UPDATE,
|
|
2406
|
-
op:
|
|
2407
|
-
objects:
|
|
2407
|
+
op: $,
|
|
2408
|
+
objects: ne
|
|
2408
2409
|
}
|
|
2409
2410
|
}), C.push({
|
|
2410
2411
|
id: E.id,
|
|
@@ -2413,12 +2414,12 @@ let Le = class extends oe {
|
|
|
2413
2414
|
subUnitId: o,
|
|
2414
2415
|
type: y.UPDATE,
|
|
2415
2416
|
op: A,
|
|
2416
|
-
objects:
|
|
2417
|
+
objects: ne
|
|
2417
2418
|
}
|
|
2418
2419
|
});
|
|
2419
2420
|
} else {
|
|
2420
|
-
const { undo: A, redo:
|
|
2421
|
-
S.push({ id: E.id, params: { op:
|
|
2421
|
+
const { undo: A, redo: $, objects: ne } = T.getBatchAddOp([I]);
|
|
2422
|
+
S.push({ id: E.id, params: { op: $, unitId: s, subUnitId: o, objects: ne, type: y.INSERT } }), C.push({ id: E.id, params: { op: A, unitId: s, subUnitId: o, objects: ne, type: y.REMOVE } });
|
|
2422
2423
|
}
|
|
2423
2424
|
}), {
|
|
2424
2425
|
redos: S,
|
|
@@ -2426,23 +2427,23 @@ let Le = class extends oe {
|
|
|
2426
2427
|
};
|
|
2427
2428
|
}
|
|
2428
2429
|
};
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
],
|
|
2435
|
-
var
|
|
2436
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2430
|
+
Be = Ri([
|
|
2431
|
+
ee(te.Ready, Be),
|
|
2432
|
+
Je(0, Vn),
|
|
2433
|
+
Je(1, K),
|
|
2434
|
+
Je(2, k)
|
|
2435
|
+
], Be);
|
|
2436
|
+
var Qt = Object.defineProperty, Mi = Object.getOwnPropertyDescriptor, Di = (i, e, n) => e in i ? Qt(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n, bi = (i, e, n, t) => {
|
|
2437
|
+
for (var r = t > 1 ? void 0 : t ? Mi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
2437
2438
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
2438
|
-
return t && r &&
|
|
2439
|
-
},
|
|
2440
|
-
const
|
|
2441
|
-
let
|
|
2439
|
+
return t && r && Qt(e, n, r), r;
|
|
2440
|
+
}, Ze = (i, e) => (n, t) => e(n, t, i), en = (i, e, n) => Di(i, typeof e != "symbol" ? e + "" : e, n);
|
|
2441
|
+
const Ei = "SHEET_IMAGE_UI_PLUGIN";
|
|
2442
|
+
let Ve = class extends hn {
|
|
2442
2443
|
constructor(e = {}, n, t, r) {
|
|
2443
2444
|
super();
|
|
2444
2445
|
H(this, "_pluginConfig");
|
|
2445
|
-
this._injector = n, this._localeService = t, this._renderManagerService = r, this._pluginConfig =
|
|
2446
|
+
this._injector = n, this._localeService = t, this._renderManagerService = r, this._pluginConfig = ie.deepMerge({}, si, e);
|
|
2446
2447
|
}
|
|
2447
2448
|
onStarting(e) {
|
|
2448
2449
|
super.onStarting(e), this._initDependencies(e);
|
|
@@ -2453,7 +2454,7 @@ let $e = class extends un {
|
|
|
2453
2454
|
_initDependencies(e) {
|
|
2454
2455
|
const n = [
|
|
2455
2456
|
// services
|
|
2456
|
-
[
|
|
2457
|
+
[Ne],
|
|
2457
2458
|
// controllers
|
|
2458
2459
|
[
|
|
2459
2460
|
pe,
|
|
@@ -2462,8 +2463,8 @@ let $e = class extends un {
|
|
|
2462
2463
|
}
|
|
2463
2464
|
],
|
|
2464
2465
|
[Te],
|
|
2465
|
-
[
|
|
2466
|
-
[
|
|
2466
|
+
[je],
|
|
2467
|
+
[Le]
|
|
2467
2468
|
], t = [
|
|
2468
2469
|
Ue,
|
|
2469
2470
|
Ae
|
|
@@ -2472,34 +2473,34 @@ let $e = class extends un {
|
|
|
2472
2473
|
}
|
|
2473
2474
|
_registerRenderModules() {
|
|
2474
2475
|
[
|
|
2475
|
-
[
|
|
2476
|
+
[Be]
|
|
2476
2477
|
].forEach((e) => {
|
|
2477
2478
|
this.disposeWithMe(this._renderManagerService.registerRenderModule(B.UNIVER_SHEET, e));
|
|
2478
2479
|
});
|
|
2479
2480
|
}
|
|
2480
2481
|
};
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
],
|
|
2482
|
+
en(Ve, "type", B.UNIVER_SHEET);
|
|
2483
|
+
en(Ve, "pluginName", Ei);
|
|
2484
|
+
Ve = bi([
|
|
2485
|
+
mn(En, Cn, In),
|
|
2486
|
+
Ze(1, W(nt)),
|
|
2487
|
+
Ze(2, W(_e)),
|
|
2488
|
+
Ze(3, K)
|
|
2489
|
+
], Ve);
|
|
2489
2490
|
export {
|
|
2490
2491
|
j as ClearSheetDrawingTransformerOperation,
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2492
|
+
qt as DeleteDrawingsCommand,
|
|
2493
|
+
xt as EditSheetDrawingOperation,
|
|
2494
|
+
Yt as GroupSheetDrawingCommand,
|
|
2495
|
+
We as InsertCellImageOperation,
|
|
2496
|
+
Fe as InsertFloatImageOperation,
|
|
2496
2497
|
st as InsertSheetDrawingCommand,
|
|
2497
2498
|
ve as MoveDrawingsCommand,
|
|
2498
2499
|
it as RemoveSheetDrawingCommand,
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2500
|
+
Ft as SetDrawingArrangeCommand,
|
|
2501
|
+
Ye as SetSheetDrawingCommand,
|
|
2502
|
+
Ne as SheetCanvasFloatDomManagerService,
|
|
2503
|
+
Gt as SidebarSheetDrawingOperation,
|
|
2504
|
+
kt as UngroupSheetDrawingCommand,
|
|
2505
|
+
Ve as UniverSheetsDrawingUIPlugin
|
|
2505
2506
|
};
|