@univerjs/sheets-drawing-ui 0.5.1-nightly.202412261606 → 0.5.1-nightly.202412271606
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 +217 -216
- package/lib/umd/index.js +1 -1
- package/package.json +12 -12
package/lib/es/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
var jn = Object.defineProperty;
|
|
2
2
|
var Wn = (i, e, n) => e in i ? jn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n;
|
|
3
3
|
var V = (i, e, n) => Wn(i, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
-
import { CommandType as Y, ICommandService as F, IUndoRedoService as
|
|
5
|
-
import { DocDrawingController as
|
|
6
|
-
import { IDrawingManagerService as q, IImageIoService as Ft, DRAWING_IMAGE_ALLOW_IMAGE_LIST as Dt, DRAWING_IMAGE_COUNT_LIMIT as bt, ImageUploadStatusType as le, DRAWING_IMAGE_ALLOW_SIZE as yt, getImageSize as Ot, DRAWING_IMAGE_WIDTH_LIMIT as Tt, DRAWING_IMAGE_HEIGHT_LIMIT as Et, getDrawingShapeKeyByDrawingSearch as nt, UniverDrawingPlugin as
|
|
7
|
-
import { ImageCropperObject as
|
|
8
|
-
import { IRenderManagerService as X, precisionTo as ye, getGroupState as
|
|
9
|
-
import { ISheetDrawingService as z, SetDrawingApplyMutation as O, DrawingApplyType as T, SheetDrawingAnchorType as y, UniverSheetsDrawingPlugin as
|
|
10
|
-
import { SheetCanvasPopManagerService as
|
|
11
|
-
import { ISidebarService as
|
|
12
|
-
import { takeUntil as At, combineLatest as Te, map as $e, filter as ie, distinctUntilChanged as Ee, Subject as rt, take as
|
|
13
|
-
import { SheetInterceptorService as Je, getSheetCommandTarget as H, SheetsSelectionsService as Xt, SetRangeValuesCommand as
|
|
14
|
-
import mn, { useEffect as _t, forwardRef as fn, useRef as
|
|
15
|
-
import { docDrawingPositionToTransform as
|
|
16
|
-
import { MessageType as se, RadioGroup as
|
|
17
|
-
const
|
|
4
|
+
import { CommandType as Y, ICommandService as F, IUndoRedoService as me, sequenceExecute as Lt, LocaleService as Ke, IUniverInstanceService as fe, useDependency as de, Inject as U, Injector as Se, IContextService as Gt, RxDisposable as xn, UniverInstanceType as G, connectInjector as $n, toDisposable as Bn, FOCUSING_COMMON_DRAWINGS as he, DrawingTypeEnum as k, Disposable as Z, ArrangeTypeEnum as Me, createDocumentModelWithStyle as Ln, ObjectRelativeFromH as Gn, ObjectRelativeFromV as Fn, BooleanNumber as Vn, PositionedObjectLayoutType as kn, WrapTextType as Hn, BuildTextUtils as Yn, Range as Xn, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as De, DOCS_ZEN_EDITOR_UNIT_ID_KEY as be, InterceptorEffectEnum as zn, ObjectMatrix as Kn, Tools as _e, UserManagerService as Jn, IPermissionService as qn, Rectangle as Zn, Direction as re, FOCUSING_FX_BAR_EDITOR as Qn, EDITOR_ACTIVATED as er, FOCUSING_PANEL_EDITOR as tr, LifecycleService as nr, LifecycleStages as rr, DisposableCollection as ir, fromEventSubject as sr, generateRandomId as or, DependentOn as ar, Plugin as cr, merge as dr, registerDependencies as lr, touchDependencies as tt, IConfigService as ur } from "@univerjs/core";
|
|
5
|
+
import { DocDrawingController as hr, UniverDocsDrawingPlugin as gr } from "@univerjs/docs-drawing";
|
|
6
|
+
import { IDrawingManagerService as q, IImageIoService as Ft, DRAWING_IMAGE_ALLOW_IMAGE_LIST as Dt, DRAWING_IMAGE_COUNT_LIMIT as bt, ImageUploadStatusType as le, DRAWING_IMAGE_ALLOW_SIZE as yt, getImageSize as Ot, DRAWING_IMAGE_WIDTH_LIMIT as Tt, DRAWING_IMAGE_HEIGHT_LIMIT as Et, getDrawingShapeKeyByDrawingSearch as nt, UniverDrawingPlugin as mr } from "@univerjs/drawing";
|
|
7
|
+
import { ImageCropperObject as fr, COMPONENT_IMAGE_POPUP_MENU as pr, OpenImageCropOperation as wr, ImageResetSizeOperation as _r, DrawingRenderService as Vt, DrawingCommonPanel as vr, UniverDrawingUIPlugin as Sr } from "@univerjs/drawing-ui";
|
|
8
|
+
import { IRenderManagerService as X, precisionTo as ye, getGroupState as Ir, transformObjectOutOfGroup as Cr, RENDER_CLASS_TYPE as ue, Rect as Pt, ObjectType as Rr, DRAWING_OBJECT_LAYER_INDEX as Mr, SHEET_VIEWPORT_KEY as kt } from "@univerjs/engine-render";
|
|
9
|
+
import { ISheetDrawingService as z, SetDrawingApplyMutation as O, DrawingApplyType as T, SheetDrawingAnchorType as y, UniverSheetsDrawingPlugin as Dr } from "@univerjs/sheets-drawing";
|
|
10
|
+
import { SheetCanvasPopManagerService as br, convertPositionSheetOverGridToAbsolute as yr, ISheetSelectionRenderService as Ie, SheetSkeletonManagerService as Q, attachRangeWithCoord as Ht, IEditorBridgeService as Or, IAutoFillService as Tr, HoverManagerService as Er, COPY_TYPE as Ut, PREDEFINED_HOOK_NAME as Oe, virtualizeDiscreteRanges as Pr, ISheetClipboardService as Ur, SheetPrintInterceptorService as Ar, getCurrentRangeDisable$ as Nr, SetZoomRatioOperation as jr } from "@univerjs/sheets-ui";
|
|
11
|
+
import { ISidebarService as Wr, IUIPartsService as xr, BuiltInUIPart as $r, ILocalFileService as Br, IMessageService as Lr, MenuItemType as wt, getMenuHiddenObservable as Yt, RibbonStartGroup as Gr, KeyCode as ge, ComponentManager as Fr, IMenuManagerService as Vr, IShortcutService as kr, CanvasFloatDomService as Hr } from "@univerjs/ui";
|
|
12
|
+
import { takeUntil as At, combineLatest as Te, map as $e, filter as ie, distinctUntilChanged as Ee, Subject as rt, take as Yr, BehaviorSubject as Xr, switchMap as Nt } from "rxjs";
|
|
13
|
+
import { SheetInterceptorService as Je, getSheetCommandTarget as H, SheetsSelectionsService as Xt, SetRangeValuesCommand as zr, SetWorksheetRowHeightMutation as zt, SetWorksheetColWidthMutation as Kt, SetWorksheetRowIsAutoHeightMutation as Kr, SetWorksheetRowAutoHeightMutation as Jr, AddWorksheetMergeMutation as qr, RemoveWorksheetMergeMutation as Zr, AFTER_CELL_EDIT as Qr, INTERCEPTOR_POINT as ei, InterceptCellContentPriority as ti, WorkbookViewPermission as jt, WorksheetViewPermission as it, WorkbookEditablePermission as lt, WorksheetEditPermission as xe, InsertRowCommand as Jt, InsertColCommand as qt, RemoveRowCommand as Zt, RemoveColCommand as Qt, DeleteRangeMoveLeftCommand as en, DeleteRangeMoveUpCommand as tn, InsertRangeMoveDownCommand as nn, InsertRangeMoveRightCommand as rn, DeltaRowHeightCommand as ut, SetRowHeightCommand as ht, DeltaColumnWidthCommand as sn, SetColWidthCommand as on, SetRowHiddenCommand as an, SetSpecificRowsVisibleCommand as cn, SetSpecificColsVisibleCommand as dn, SetColHiddenCommand as ln, MoveColsCommand as un, MoveRowsCommand as hn, MoveRangeCommand as gn, SetRowVisibleMutation as ni, SetRowHiddenMutation as ri, SetColVisibleMutation as ii, SetColHiddenMutation as si, SetWorksheetActiveOperation as oi, RangeProtectionPermissionEditPoint as ai, SetFrozenMutation as ci } from "@univerjs/sheets";
|
|
14
|
+
import mn, { useEffect as _t, forwardRef as fn, useRef as di, createElement as pn, useState as gt } from "react";
|
|
15
|
+
import { docDrawingPositionToTransform as li, ReplaceSnapshotCommand as ui } from "@univerjs/docs-ui";
|
|
16
|
+
import { MessageType as se, RadioGroup as hi, Radio as st } from "@univerjs/design";
|
|
17
|
+
const gi = "sheets-drawing-ui.config", Wt = {}, W = {
|
|
18
18
|
id: "sheet.operation.clear-drawing-transformer",
|
|
19
19
|
type: Y.MUTATION,
|
|
20
20
|
handler: (i, e) => {
|
|
@@ -29,7 +29,7 @@ const hi = "sheets-drawing-ui.config", Wt = {}, W = {
|
|
|
29
29
|
type: Y.COMMAND,
|
|
30
30
|
handler: (i, e) => {
|
|
31
31
|
var I, S, R;
|
|
32
|
-
const n = i.get(F), t = i.get(
|
|
32
|
+
const n = i.get(F), t = i.get(me), r = i.get(Je), s = i.get(z);
|
|
33
33
|
if (!e) return !1;
|
|
34
34
|
const { drawings: o } = e, d = [];
|
|
35
35
|
o.forEach((_) => {
|
|
@@ -57,7 +57,7 @@ const hi = "sheets-drawing-ui.config", Wt = {}, W = {
|
|
|
57
57
|
id: "sidebar.operation.sheet-image",
|
|
58
58
|
type: Y.COMMAND,
|
|
59
59
|
handler: async (i, e) => {
|
|
60
|
-
const n = i.get(
|
|
60
|
+
const n = i.get(Wr), t = i.get(Ke), r = i.get(fe), s = i.get(q);
|
|
61
61
|
if (!H(r)) return !1;
|
|
62
62
|
switch (e.value) {
|
|
63
63
|
case "open":
|
|
@@ -85,7 +85,7 @@ const hi = "sheets-drawing-ui.config", Wt = {}, W = {
|
|
|
85
85
|
return e == null ? !1 : (n.focusDrawing([e]), t.executeCommand(_n.id, { value: "open" }), !0);
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
|
-
var ot = { exports: {} },
|
|
88
|
+
var ot = { exports: {} }, pe = {};
|
|
89
89
|
/**
|
|
90
90
|
* @license React
|
|
91
91
|
* react-jsx-runtime.production.min.js
|
|
@@ -96,8 +96,8 @@ var ot = { exports: {} }, we = {};
|
|
|
96
96
|
* LICENSE file in the root directory of this source tree.
|
|
97
97
|
*/
|
|
98
98
|
var xt;
|
|
99
|
-
function
|
|
100
|
-
if (xt) return
|
|
99
|
+
function mi() {
|
|
100
|
+
if (xt) return pe;
|
|
101
101
|
xt = 1;
|
|
102
102
|
var i = mn, e = Symbol.for("react.element"), n = Symbol.for("react.fragment"), t = Object.prototype.hasOwnProperty, r = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
103
103
|
function o(d, l, g) {
|
|
@@ -107,20 +107,20 @@ function gi() {
|
|
|
107
107
|
if (d && d.defaultProps) for (c in l = d.defaultProps, l) a[c] === void 0 && (a[c] = l[c]);
|
|
108
108
|
return { $$typeof: e, type: d, key: h, ref: u, props: a, _owner: r.current };
|
|
109
109
|
}
|
|
110
|
-
return
|
|
110
|
+
return pe.Fragment = n, pe.jsx = o, pe.jsxs = o, pe;
|
|
111
111
|
}
|
|
112
112
|
var $t;
|
|
113
|
-
function
|
|
114
|
-
return $t || ($t = 1, ot.exports =
|
|
113
|
+
function fi() {
|
|
114
|
+
return $t || ($t = 1, ot.exports = mi()), ot.exports;
|
|
115
115
|
}
|
|
116
|
-
var $ =
|
|
117
|
-
const
|
|
118
|
-
uploadLoading:
|
|
119
|
-
uploadLoadingBody:
|
|
120
|
-
uploadLoadingBodyAnimation:
|
|
121
|
-
univerCircleAnimation:
|
|
122
|
-
uploadLoadingBodyText:
|
|
123
|
-
},
|
|
116
|
+
var $ = fi();
|
|
117
|
+
const pi = "univer-upload-loading", wi = "univer-upload-loading-body", _i = "univer-upload-loading-body-animation", vi = "univer-UniverCircleAnimation", Si = "univer-upload-loading-body-text", Pe = {
|
|
118
|
+
uploadLoading: pi,
|
|
119
|
+
uploadLoadingBody: wi,
|
|
120
|
+
uploadLoadingBodyAnimation: _i,
|
|
121
|
+
univerCircleAnimation: vi,
|
|
122
|
+
uploadLoadingBodyText: Si
|
|
123
|
+
}, Ii = () => {
|
|
124
124
|
const i = de(Ft), e = de(Ke), [n, t] = mn.useState(0);
|
|
125
125
|
return _t(() => {
|
|
126
126
|
const r = i.change$.subscribe((s) => {
|
|
@@ -134,10 +134,10 @@ const fi = "univer-upload-loading", pi = "univer-upload-loading-body", wi = "uni
|
|
|
134
134
|
/* @__PURE__ */ $.jsx("div", { className: Pe.uploadLoadingBodyText, children: `${e.t("uploadLoading.loading")}: ${n}` })
|
|
135
135
|
] }) });
|
|
136
136
|
};
|
|
137
|
-
var
|
|
138
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
137
|
+
var Ci = Object.defineProperty, Ri = Object.getOwnPropertyDescriptor, Mi = (i, e, n, t) => {
|
|
138
|
+
for (var r = t > 1 ? void 0 : t ? Ri(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
139
139
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
140
|
-
return t && r &&
|
|
140
|
+
return t && r && Ci(e, n, r), r;
|
|
141
141
|
}, oe = (i, e) => (n, t) => e(n, t, i);
|
|
142
142
|
let Be = class extends xn {
|
|
143
143
|
constructor(e, n, t, r, s, o, d) {
|
|
@@ -146,7 +146,7 @@ let Be = class extends xn {
|
|
|
146
146
|
this._injector = e, this._drawingManagerService = n, this._canvasPopManagerService = t, this._renderManagerService = r, this._univerInstanceService = s, this._contextService = o, this._uiPartsService = d, this._init();
|
|
147
147
|
}
|
|
148
148
|
_init() {
|
|
149
|
-
this._univerInstanceService.getCurrentTypeOfUnit$(G.UNIVER_SHEET).pipe(At(this.dispose$)).subscribe((e) => this._create(e)), this._univerInstanceService.getTypeOfUnitDisposed$(G.UNIVER_SHEET).pipe(At(this.dispose$)).subscribe((e) => this._dispose(e)), this._univerInstanceService.getAllUnitsForType(G.UNIVER_SHEET).forEach((e) => this._create(e)), this._uiPartsService.registerComponent(
|
|
149
|
+
this._univerInstanceService.getCurrentTypeOfUnit$(G.UNIVER_SHEET).pipe(At(this.dispose$)).subscribe((e) => this._create(e)), this._univerInstanceService.getTypeOfUnitDisposed$(G.UNIVER_SHEET).pipe(At(this.dispose$)).subscribe((e) => this._dispose(e)), this._univerInstanceService.getAllUnitsForType(G.UNIVER_SHEET).forEach((e) => this._create(e)), this._uiPartsService.registerComponent($r.CONTENT, () => $n(Ii, this._injector));
|
|
150
150
|
}
|
|
151
151
|
_dispose(e) {
|
|
152
152
|
const n = e.getUnitId();
|
|
@@ -161,7 +161,7 @@ let Be = class extends xn {
|
|
|
161
161
|
_hasCropObject(e) {
|
|
162
162
|
const n = e.getAllObjectsByOrder();
|
|
163
163
|
for (const t of n)
|
|
164
|
-
if (t instanceof
|
|
164
|
+
if (t instanceof fr)
|
|
165
165
|
return !0;
|
|
166
166
|
return !1;
|
|
167
167
|
}
|
|
@@ -177,7 +177,7 @@ let Be = class extends xn {
|
|
|
177
177
|
this.disposeWithMe(
|
|
178
178
|
Bn(
|
|
179
179
|
t.createControl$.subscribe(() => {
|
|
180
|
-
if (this._contextService.setContextValue(
|
|
180
|
+
if (this._contextService.setContextValue(he, !0), this._hasCropObject(n))
|
|
181
181
|
return;
|
|
182
182
|
const o = t.getSelectedObjectMap();
|
|
183
183
|
if (o.size > 1) {
|
|
@@ -196,7 +196,7 @@ let Be = class extends xn {
|
|
|
196
196
|
r == null || r.dispose();
|
|
197
197
|
const f = this._canvasPopManagerService.getFeatureMenu(c, a, h, u);
|
|
198
198
|
r = this.disposeWithMe(this._canvasPopManagerService.attachPopupToObject(d, {
|
|
199
|
-
componentKey:
|
|
199
|
+
componentKey: pr,
|
|
200
200
|
direction: "horizontal",
|
|
201
201
|
offset: [2, 0],
|
|
202
202
|
extraProps: {
|
|
@@ -211,11 +211,11 @@ let Be = class extends xn {
|
|
|
211
211
|
)
|
|
212
212
|
), this.disposeWithMe(
|
|
213
213
|
t.clearControl$.subscribe(() => {
|
|
214
|
-
r == null || r.dispose(), this._contextService.setContextValue(
|
|
214
|
+
r == null || r.dispose(), this._contextService.setContextValue(he, !1), this._drawingManagerService.focusDrawing(null);
|
|
215
215
|
})
|
|
216
216
|
), this.disposeWithMe(
|
|
217
217
|
this._contextService.contextChanged$.subscribe((o) => {
|
|
218
|
-
o[
|
|
218
|
+
o[he] === !1 && (r == null || r.dispose());
|
|
219
219
|
})
|
|
220
220
|
), this.disposeWithMe(
|
|
221
221
|
t.changing$.subscribe(() => {
|
|
@@ -242,34 +242,34 @@ let Be = class extends xn {
|
|
|
242
242
|
{
|
|
243
243
|
label: "image-popup.crop",
|
|
244
244
|
index: 2,
|
|
245
|
-
commandId:
|
|
245
|
+
commandId: wr.id,
|
|
246
246
|
commandParams: { unitId: e, subUnitId: n, drawingId: t },
|
|
247
247
|
disable: r === k.DRAWING_DOM
|
|
248
248
|
},
|
|
249
249
|
{
|
|
250
250
|
label: "image-popup.reset",
|
|
251
251
|
index: 3,
|
|
252
|
-
commandId:
|
|
252
|
+
commandId: _r.id,
|
|
253
253
|
commandParams: [{ unitId: e, subUnitId: n, drawingId: t }],
|
|
254
254
|
disable: r === k.DRAWING_DOM
|
|
255
255
|
}
|
|
256
256
|
];
|
|
257
257
|
}
|
|
258
258
|
};
|
|
259
|
-
Be =
|
|
259
|
+
Be = Mi([
|
|
260
260
|
oe(0, U(Se)),
|
|
261
261
|
oe(1, q),
|
|
262
|
-
oe(2, U(
|
|
262
|
+
oe(2, U(br)),
|
|
263
263
|
oe(3, X),
|
|
264
|
-
oe(4,
|
|
264
|
+
oe(4, fe),
|
|
265
265
|
oe(5, Gt),
|
|
266
|
-
oe(6, U(
|
|
266
|
+
oe(6, U(xr))
|
|
267
267
|
], Be);
|
|
268
268
|
function B(i, e, n) {
|
|
269
269
|
const { from: t, to: r, flipY: s = !1, flipX: o = !1, angle: d = 0, skewX: l = 0, skewY: g = 0 } = i, c = n.getCurrent();
|
|
270
270
|
if (c == null)
|
|
271
271
|
return;
|
|
272
|
-
const a =
|
|
272
|
+
const a = yr(
|
|
273
273
|
c.unitId,
|
|
274
274
|
c.sheetId,
|
|
275
275
|
{ from: t, to: r },
|
|
@@ -317,10 +317,10 @@ function j(i, e) {
|
|
|
317
317
|
to: m
|
|
318
318
|
};
|
|
319
319
|
}
|
|
320
|
-
var
|
|
321
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
320
|
+
var Di = Object.defineProperty, bi = Object.getOwnPropertyDescriptor, yi = (i, e, n, t) => {
|
|
321
|
+
for (var r = t > 1 ? void 0 : t ? bi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
322
322
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
323
|
-
return t && r &&
|
|
323
|
+
return t && r && Di(e, n, r), r;
|
|
324
324
|
}, Ue = (i, e) => (n, t) => e(n, t, i);
|
|
325
325
|
let mt = class extends Z {
|
|
326
326
|
constructor(i, e, n, t, r) {
|
|
@@ -342,16 +342,16 @@ let mt = class extends Z {
|
|
|
342
342
|
this._drawingManagerService.registerDrawingData(this._context.unitId, this._sheetDrawingService.getDrawingDataForUnit(this._context.unitId)), this._drawingManagerService.initializeNotification(this._context.unitId);
|
|
343
343
|
}
|
|
344
344
|
};
|
|
345
|
-
mt =
|
|
345
|
+
mt = yi([
|
|
346
346
|
Ue(1, z),
|
|
347
347
|
Ue(2, q),
|
|
348
348
|
Ue(3, U(Ie)),
|
|
349
349
|
Ue(4, U(Q))
|
|
350
350
|
], mt);
|
|
351
|
-
function
|
|
351
|
+
function Oi(i) {
|
|
352
352
|
const e = [];
|
|
353
353
|
return i.forEach((n) => {
|
|
354
|
-
const { parent: t, children: r } = n, { unitId: s, subUnitId: o, drawingId: d } = t, l =
|
|
354
|
+
const { parent: t, children: r } = n, { unitId: s, subUnitId: o, drawingId: d } = t, l = Ir(0, 0, r.map((a) => a.transform || {})), g = r.map((a) => {
|
|
355
355
|
const h = a.transform || { left: 0, top: 0 }, { unitId: u, subUnitId: m, drawingId: f } = a;
|
|
356
356
|
return {
|
|
357
357
|
unitId: u,
|
|
@@ -377,14 +377,14 @@ function yi(i) {
|
|
|
377
377
|
});
|
|
378
378
|
}), e;
|
|
379
379
|
}
|
|
380
|
-
function
|
|
380
|
+
function Ti(i) {
|
|
381
381
|
const e = [];
|
|
382
382
|
return i.forEach((n) => {
|
|
383
383
|
const { parent: t, children: r } = n, { unitId: s, subUnitId: o, drawingId: d, transform: l = { width: 0, height: 0 } } = t;
|
|
384
384
|
if (l == null)
|
|
385
385
|
return;
|
|
386
386
|
const g = r.map((a) => {
|
|
387
|
-
const { transform: h } = a, { unitId: u, subUnitId: m, drawingId: f } = a, p =
|
|
387
|
+
const { transform: h } = a, { unitId: u, subUnitId: m, drawingId: f } = a, p = Cr(h || {}, l, l.width || 0, l.height || 0);
|
|
388
388
|
return {
|
|
389
389
|
unitId: u,
|
|
390
390
|
subUnitId: m,
|
|
@@ -412,7 +412,7 @@ const Sn = {
|
|
|
412
412
|
id: "sheet.command.group-sheet-image",
|
|
413
413
|
type: Y.COMMAND,
|
|
414
414
|
handler: (i, e) => {
|
|
415
|
-
const n = i.get(F), t = i.get(
|
|
415
|
+
const n = i.get(F), t = i.get(me), r = i.get(z);
|
|
416
416
|
if (!e) return !1;
|
|
417
417
|
const s = [];
|
|
418
418
|
e.forEach(({ parent: u, children: m }) => {
|
|
@@ -424,7 +424,7 @@ const Sn = {
|
|
|
424
424
|
return n.syncExecuteCommand(O.id, { op: c, unitId: d, subUnitId: l, objects: a, type: T.GROUP }) ? (t.pushUndoRedo({
|
|
425
425
|
unitID: d,
|
|
426
426
|
undoMutations: [
|
|
427
|
-
{ id: O.id, params: { op: g, unitId: d, subUnitId: l, objects:
|
|
427
|
+
{ id: O.id, params: { op: g, unitId: d, subUnitId: l, objects: Ti(a), type: T.UNGROUP } },
|
|
428
428
|
{ id: W.id, params: s }
|
|
429
429
|
],
|
|
430
430
|
redoMutations: [
|
|
@@ -438,7 +438,7 @@ const Sn = {
|
|
|
438
438
|
type: Y.COMMAND,
|
|
439
439
|
handler: (i, e) => {
|
|
440
440
|
var I, S, R;
|
|
441
|
-
const n = i.get(F), t = i.get(
|
|
441
|
+
const n = i.get(F), t = i.get(me), r = i.get(z), s = i.get(Je);
|
|
442
442
|
if (!e) return !1;
|
|
443
443
|
const o = e.drawings, d = o.map((_) => _.unitId), l = r.getBatchAddOp(o), { unitId: g, subUnitId: c, undo: a, redo: h, objects: u } = l, m = s.onCommandExecute({ id: Ze.id, params: e }), f = { id: O.id, params: { op: h, unitId: g, subUnitId: c, objects: u, type: T.INSERT } }, p = { id: O.id, params: { op: a, unitId: g, subUnitId: c, objects: u, type: T.REMOVE } };
|
|
444
444
|
return Lt([...(I = m.preRedos) != null ? I : [], f, ...m.redos], n) ? (t.pushUndoRedo({
|
|
@@ -461,7 +461,7 @@ const Sn = {
|
|
|
461
461
|
id: "sheet.command.set-drawing-arrange",
|
|
462
462
|
type: Y.COMMAND,
|
|
463
463
|
handler: (i, e) => {
|
|
464
|
-
const n = i.get(F), t = i.get(
|
|
464
|
+
const n = i.get(F), t = i.get(me);
|
|
465
465
|
if (!e) return !1;
|
|
466
466
|
const r = i.get(z), { unitId: s, subUnitId: o, drawingIds: d, arrangeType: l } = e, g = { unitId: s, subUnitId: o, drawingIds: d };
|
|
467
467
|
let c;
|
|
@@ -482,7 +482,7 @@ const Sn = {
|
|
|
482
482
|
id: "sheet.command.set-sheet-image",
|
|
483
483
|
type: Y.COMMAND,
|
|
484
484
|
handler: (i, e) => {
|
|
485
|
-
const n = i.get(F), t = i.get(
|
|
485
|
+
const n = i.get(F), t = i.get(me), r = i.get(z);
|
|
486
486
|
if (!e) return !1;
|
|
487
487
|
const { drawings: s } = e, o = r.getBatchUpdateOp(s), { unitId: d, subUnitId: l, undo: g, redo: c, objects: a } = o;
|
|
488
488
|
return n.syncExecuteCommand(O.id, { unitId: d, subUnitId: l, op: c, objects: a, type: T.UPDATE }) ? (t.pushUndoRedo({
|
|
@@ -501,7 +501,7 @@ const Sn = {
|
|
|
501
501
|
id: "sheet.command.ungroup-sheet-image",
|
|
502
502
|
type: Y.COMMAND,
|
|
503
503
|
handler: (i, e) => {
|
|
504
|
-
const n = i.get(F), t = i.get(
|
|
504
|
+
const n = i.get(F), t = i.get(me), r = i.get(z);
|
|
505
505
|
if (!e) return !1;
|
|
506
506
|
const s = [];
|
|
507
507
|
e.forEach(({ parent: u, children: m }) => {
|
|
@@ -513,7 +513,7 @@ const Sn = {
|
|
|
513
513
|
return n.syncExecuteCommand(O.id, { op: c, unitId: d, subUnitId: l, objects: a, type: T.UNGROUP }) ? (t.pushUndoRedo({
|
|
514
514
|
unitID: d,
|
|
515
515
|
undoMutations: [
|
|
516
|
-
{ id: O.id, params: { op: g, unitId: d, subUnitId: l, objects:
|
|
516
|
+
{ id: O.id, params: { op: g, unitId: d, subUnitId: l, objects: Oi(a), type: T.GROUP } },
|
|
517
517
|
{ id: W.id, params: s }
|
|
518
518
|
],
|
|
519
519
|
redoMutations: [
|
|
@@ -523,18 +523,18 @@ const Sn = {
|
|
|
523
523
|
}), !0) : !1;
|
|
524
524
|
}
|
|
525
525
|
};
|
|
526
|
-
var
|
|
527
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
526
|
+
var Ei = Object.defineProperty, Pi = Object.getOwnPropertyDescriptor, Ui = (i, e, n, t) => {
|
|
527
|
+
for (var r = t > 1 ? void 0 : t ? Pi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
528
528
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
529
|
-
return t && r &&
|
|
529
|
+
return t && r && Ei(e, n, r), r;
|
|
530
530
|
}, K = (i, e) => (n, t) => e(n, t, i);
|
|
531
|
-
function
|
|
531
|
+
function Ai(i, e, n) {
|
|
532
532
|
const t = n * Math.PI / 180, r = Math.abs(i * Math.cos(t)) + Math.abs(e * Math.sin(t)), s = Math.abs(i * Math.sin(t)) + Math.abs(e * Math.cos(t));
|
|
533
533
|
return { rotatedWidth: r, rotatedHeight: s };
|
|
534
534
|
}
|
|
535
535
|
function Rn(i, e, n, t, r) {
|
|
536
536
|
var I;
|
|
537
|
-
const { rotatedHeight: s, rotatedWidth: o } =
|
|
537
|
+
const { rotatedHeight: s, rotatedWidth: o } = Ai(n, t, r), l = i.get(X).getRenderById(e.unitId);
|
|
538
538
|
if (!l)
|
|
539
539
|
return !1;
|
|
540
540
|
const c = (I = l.with(Q).getWorksheetSkeleton(e.subUnitId)) == null ? void 0 : I.skeleton;
|
|
@@ -673,7 +673,7 @@ let ve = class extends Z {
|
|
|
673
673
|
drawingType: k.DRAWING_IMAGE,
|
|
674
674
|
imageSourceType: r,
|
|
675
675
|
source: s,
|
|
676
|
-
transform:
|
|
676
|
+
transform: li(u),
|
|
677
677
|
docTransform: u,
|
|
678
678
|
behindDoc: Vn.FALSE,
|
|
679
679
|
title: "",
|
|
@@ -694,7 +694,7 @@ let ve = class extends Z {
|
|
|
694
694
|
endOffset: 0
|
|
695
695
|
}
|
|
696
696
|
});
|
|
697
|
-
return f ? (a.apply(f), this._commandService.syncExecuteCommand(
|
|
697
|
+
return f ? (a.apply(f), this._commandService.syncExecuteCommand(zr.id, {
|
|
698
698
|
value: {
|
|
699
699
|
[c.primary.actualRow]: {
|
|
700
700
|
[c.primary.actualColumn]: {
|
|
@@ -798,29 +798,29 @@ let ve = class extends Z {
|
|
|
798
798
|
_focusDrawingListener() {
|
|
799
799
|
this.disposeWithMe(
|
|
800
800
|
this._drawingManagerService.focus$.subscribe((e) => {
|
|
801
|
-
e == null || e.length === 0 ? (this._contextService.setContextValue(
|
|
801
|
+
e == null || e.length === 0 ? (this._contextService.setContextValue(he, !1), this._sheetDrawingService.focusDrawing([])) : (this._contextService.setContextValue(he, !0), this._sheetDrawingService.focusDrawing(e));
|
|
802
802
|
})
|
|
803
803
|
);
|
|
804
804
|
}
|
|
805
805
|
};
|
|
806
|
-
ve =
|
|
806
|
+
ve = Ui([
|
|
807
807
|
K(1, U(Q)),
|
|
808
808
|
K(2, F),
|
|
809
809
|
K(3, Ie),
|
|
810
810
|
K(4, Ft),
|
|
811
|
-
K(5,
|
|
811
|
+
K(5, Br),
|
|
812
812
|
K(6, z),
|
|
813
813
|
K(7, q),
|
|
814
814
|
K(8, Gt),
|
|
815
|
-
K(9,
|
|
815
|
+
K(9, Lr),
|
|
816
816
|
K(10, U(Ke)),
|
|
817
817
|
K(11, U(Xt)),
|
|
818
818
|
K(12, U(Se))
|
|
819
819
|
], ve);
|
|
820
|
-
var
|
|
821
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
820
|
+
var Ni = Object.defineProperty, ji = Object.getOwnPropertyDescriptor, Wi = (i, e, n, t) => {
|
|
821
|
+
for (var r = t > 1 ? void 0 : t ? ji(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
822
822
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
823
|
-
return t && r &&
|
|
823
|
+
return t && r && Ni(e, n, r), r;
|
|
824
824
|
}, ae = (i, e) => (n, t) => e(n, t, i);
|
|
825
825
|
function ft(i, e, n) {
|
|
826
826
|
var t, r, s, o;
|
|
@@ -855,10 +855,10 @@ let Le = class extends Z {
|
|
|
855
855
|
} else if (i.id === Kt.id) {
|
|
856
856
|
const t = i.params;
|
|
857
857
|
n = t.ranges, e = H(this._univerInstanceService, { unitId: t.unitId, subUnitId: t.subUnitId });
|
|
858
|
-
} else if (i.id ===
|
|
858
|
+
} else if (i.id === Kr.id) {
|
|
859
859
|
const t = i.params;
|
|
860
860
|
n = t.ranges, e = H(this._univerInstanceService, { unitId: t.unitId, subUnitId: t.subUnitId });
|
|
861
|
-
} else if (i.id ===
|
|
861
|
+
} else if (i.id === Jr.id) {
|
|
862
862
|
const t = i.params;
|
|
863
863
|
e = H(this._univerInstanceService, { unitId: t.unitId, subUnitId: t.subUnitId }), n = t.rowsAutoHeightInfo.map((r) => ({
|
|
864
864
|
startRow: r.row,
|
|
@@ -866,10 +866,10 @@ let Le = class extends Z {
|
|
|
866
866
|
startColumn: 0,
|
|
867
867
|
endColumn: 9999
|
|
868
868
|
}));
|
|
869
|
-
} else if (i.id ===
|
|
869
|
+
} else if (i.id === qr.id) {
|
|
870
870
|
const t = i.params;
|
|
871
871
|
n = t.ranges, e = H(this._univerInstanceService, { unitId: t.unitId, subUnitId: t.subUnitId });
|
|
872
|
-
} else if (i.id ===
|
|
872
|
+
} else if (i.id === Zr.id) {
|
|
873
873
|
const t = i.params;
|
|
874
874
|
n = t.ranges, e = H(this._univerInstanceService, { unitId: t.unitId, subUnitId: t.subUnitId });
|
|
875
875
|
}
|
|
@@ -885,11 +885,11 @@ let Le = class extends Z {
|
|
|
885
885
|
this.disposeWithMe(this._editorBridgeService.visible$.subscribe((i) => {
|
|
886
886
|
i.visible ? i.visible && (this._drawingManagerService.removeDrawingDataForUnit(De), this._docDrawingController.loadDrawingDataForUnit(De), this._drawingManagerService.initializeNotification(De)) : this._drawingManagerService.removeDrawingDataForUnit(De);
|
|
887
887
|
})), this.disposeWithMe(this._commandService.onCommandExecuted((i) => {
|
|
888
|
-
i.id ===
|
|
888
|
+
i.id === ui.id && i.params.unitId === be && (this._drawingManagerService.removeDrawingDataForUnit(be), this._docDrawingController.loadDrawingDataForUnit(be), this._drawingManagerService.initializeNotification(be));
|
|
889
889
|
}));
|
|
890
890
|
}
|
|
891
891
|
_handleWriteCell() {
|
|
892
|
-
this.disposeWithMe(this._sheetInterceptorService.writeCellInterceptor.intercept(
|
|
892
|
+
this.disposeWithMe(this._sheetInterceptorService.writeCellInterceptor.intercept(Qr, {
|
|
893
893
|
priority: 9999,
|
|
894
894
|
handler: (i, e, n) => (ft(this._injector, { unitId: e.unitId, subUnitId: e.subUnitId, row: e.row, col: e.col }, i), n(i))
|
|
895
895
|
}));
|
|
@@ -897,10 +897,10 @@ let Le = class extends Z {
|
|
|
897
897
|
_initCellContentInterceptor() {
|
|
898
898
|
this.disposeWithMe(
|
|
899
899
|
this._sheetInterceptorService.intercept(
|
|
900
|
-
|
|
900
|
+
ei.CELL_CONTENT,
|
|
901
901
|
{
|
|
902
902
|
effect: zn.Style,
|
|
903
|
-
priority:
|
|
903
|
+
priority: ti.CELL_IMAGE,
|
|
904
904
|
handler: (i, e, n) => {
|
|
905
905
|
var t;
|
|
906
906
|
return i != null && i.p && ((t = i.p.drawingsOrder) != null && t.length) && (i.interceptorStyle || (i.interceptorStyle = {}), i.interceptorStyle.tr = { a: 0 }), n(i);
|
|
@@ -910,19 +910,19 @@ let Le = class extends Z {
|
|
|
910
910
|
);
|
|
911
911
|
}
|
|
912
912
|
};
|
|
913
|
-
Le =
|
|
913
|
+
Le = Wi([
|
|
914
914
|
ae(0, F),
|
|
915
915
|
ae(1, U(Je)),
|
|
916
|
-
ae(2,
|
|
916
|
+
ae(2, fe),
|
|
917
917
|
ae(3, U(Se)),
|
|
918
918
|
ae(4, q),
|
|
919
|
-
ae(5, U(
|
|
920
|
-
ae(6, U(
|
|
919
|
+
ae(5, U(hr)),
|
|
920
|
+
ae(6, U(Or))
|
|
921
921
|
], Le);
|
|
922
|
-
var
|
|
923
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
922
|
+
var xi = Object.defineProperty, $i = Object.getOwnPropertyDescriptor, Bi = (i, e, n, t) => {
|
|
923
|
+
for (var r = t > 1 ? void 0 : t ? $i(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
924
924
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
925
|
-
return t && r &&
|
|
925
|
+
return t && r && xi(e, n, r), r;
|
|
926
926
|
}, Bt = (i, e) => (n, t) => e(n, t, i);
|
|
927
927
|
let Ge = class extends Z {
|
|
928
928
|
constructor(i, e) {
|
|
@@ -941,14 +941,14 @@ let Ge = class extends Z {
|
|
|
941
941
|
);
|
|
942
942
|
}
|
|
943
943
|
};
|
|
944
|
-
Ge =
|
|
945
|
-
Bt(0, U(
|
|
944
|
+
Ge = Bi([
|
|
945
|
+
Bt(0, U(Tr)),
|
|
946
946
|
Bt(1, U(Se))
|
|
947
947
|
], Ge);
|
|
948
|
-
var
|
|
949
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
948
|
+
var Li = Object.defineProperty, Gi = Object.getOwnPropertyDescriptor, Fi = (i, e, n, t) => {
|
|
949
|
+
for (var r = t > 1 ? void 0 : t ? Gi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
950
950
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
951
|
-
return t && r &&
|
|
951
|
+
return t && r && Li(e, n, r), r;
|
|
952
952
|
}, Ae = (i, e) => (n, t) => e(n, t, i);
|
|
953
953
|
let Fe = class extends Z {
|
|
954
954
|
constructor(e, n, t, r) {
|
|
@@ -961,16 +961,16 @@ let Fe = class extends Z {
|
|
|
961
961
|
_initImageClick() {
|
|
962
962
|
}
|
|
963
963
|
};
|
|
964
|
-
Fe =
|
|
965
|
-
Ae(0, U(
|
|
964
|
+
Fe = Fi([
|
|
965
|
+
Ae(0, U(Er)),
|
|
966
966
|
Ae(1, U(X)),
|
|
967
967
|
Ae(2, U(Xt)),
|
|
968
968
|
Ae(3, U(Vt))
|
|
969
969
|
], Fe);
|
|
970
|
-
var
|
|
971
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
970
|
+
var Vi = Object.defineProperty, ki = Object.getOwnPropertyDescriptor, Hi = (i, e, n, t) => {
|
|
971
|
+
for (var r = t > 1 ? void 0 : t ? ki(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
972
972
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
973
|
-
return t && r &&
|
|
973
|
+
return t && r && Vi(e, n, r), r;
|
|
974
974
|
}, at = (i, e) => (n, t) => e(n, t, i);
|
|
975
975
|
let Ve = class extends Z {
|
|
976
976
|
constructor(e, n, t) {
|
|
@@ -1031,7 +1031,7 @@ let Ve = class extends Z {
|
|
|
1031
1031
|
const { copyRange: t } = n;
|
|
1032
1032
|
if (!t)
|
|
1033
1033
|
return { redos: [], undos: [] };
|
|
1034
|
-
const { drawings: r, unitId: s, subUnitId: o } = this._copyInfo, { ranges: [d, l], mapFunc: g } =
|
|
1034
|
+
const { drawings: r, unitId: s, subUnitId: o } = this._copyInfo, { ranges: [d, l], mapFunc: g } = Pr([t, e]), { row: c, col: a } = g(d.startRow, d.startColumn), { row: h, col: u } = g(l.startRow, l.startColumn), m = (b = this._renderManagerService.getRenderById(s)) == null ? void 0 : b.with(Q);
|
|
1035
1035
|
if (!m)
|
|
1036
1036
|
return { redos: [], undos: [] };
|
|
1037
1037
|
const f = m.attachRangeWithCoord({
|
|
@@ -1056,7 +1056,7 @@ let Ve = class extends Z {
|
|
|
1056
1056
|
...N,
|
|
1057
1057
|
unitId: s,
|
|
1058
1058
|
subUnitId: o,
|
|
1059
|
-
drawingId: w ? N.drawingId :
|
|
1059
|
+
drawingId: w ? N.drawingId : _e.generateRandomId(),
|
|
1060
1060
|
transform: {
|
|
1061
1061
|
...A,
|
|
1062
1062
|
left: A.left + S,
|
|
@@ -1098,16 +1098,16 @@ let Ve = class extends Z {
|
|
|
1098
1098
|
};
|
|
1099
1099
|
}
|
|
1100
1100
|
};
|
|
1101
|
-
Ve =
|
|
1102
|
-
at(0,
|
|
1101
|
+
Ve = Hi([
|
|
1102
|
+
at(0, Ur),
|
|
1103
1103
|
at(1, X),
|
|
1104
1104
|
at(2, z)
|
|
1105
1105
|
], Ve);
|
|
1106
|
-
var
|
|
1107
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
1106
|
+
var Yi = Object.defineProperty, Xi = Object.getOwnPropertyDescriptor, zi = (i, e, n, t) => {
|
|
1107
|
+
for (var r = t > 1 ? void 0 : t ? Xi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
1108
1108
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
1109
|
-
return t && r &&
|
|
1110
|
-
},
|
|
1109
|
+
return t && r && Yi(e, n, r), r;
|
|
1110
|
+
}, we = (i, e) => (n, t) => e(n, t, i);
|
|
1111
1111
|
let ke = class extends Z {
|
|
1112
1112
|
constructor(i, e, n, t, r) {
|
|
1113
1113
|
super(), this._drawingManagerService = i, this._renderManagerService = e, this._permissionService = n, this._univerInstanceService = t, this._userManagerService = r, this._initDrawingVisible(), this._initDrawingEditable(), this._initViewPermissionChange(), this._initEditPermissionChange();
|
|
@@ -1255,17 +1255,17 @@ let ke = class extends Z {
|
|
|
1255
1255
|
);
|
|
1256
1256
|
}
|
|
1257
1257
|
};
|
|
1258
|
-
ke =
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1258
|
+
ke = zi([
|
|
1259
|
+
we(0, q),
|
|
1260
|
+
we(1, X),
|
|
1261
|
+
we(2, qn),
|
|
1262
|
+
we(3, fe),
|
|
1263
|
+
we(4, U(Jn))
|
|
1264
1264
|
], ke);
|
|
1265
|
-
var
|
|
1266
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
1265
|
+
var Ki = Object.defineProperty, Ji = Object.getOwnPropertyDescriptor, qi = (i, e, n, t) => {
|
|
1266
|
+
for (var r = t > 1 ? void 0 : t ? Ji(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
1267
1267
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
1268
|
-
return t && r &&
|
|
1268
|
+
return t && r && Ki(e, n, r), r;
|
|
1269
1269
|
}, Ne = (i, e) => (n, t) => e(n, t, i);
|
|
1270
1270
|
let He = class extends Z {
|
|
1271
1271
|
constructor(i, e, n, t) {
|
|
@@ -1300,7 +1300,7 @@ let He = class extends Z {
|
|
|
1300
1300
|
return n(i);
|
|
1301
1301
|
const { scaleX: g, scaleY: c } = s.scene, a = i ? { ...i } : { startColumn: 0, endColumn: 0, endRow: 0, startRow: 0 }, h = l.order.map((u) => l.data[u]).filter((u) => u.drawingType !== k.DRAWING_DOM);
|
|
1302
1302
|
return h.length ? (h.forEach((u) => {
|
|
1303
|
-
if (!u.groupId && u.transform &&
|
|
1303
|
+
if (!u.groupId && u.transform && _e.isDefine(u.transform.left) && _e.isDefine(u.transform.top) && _e.isDefine(u.transform.width) && _e.isDefine(u.transform.height)) {
|
|
1304
1304
|
const m = o.skeleton.getCellIndexByOffset(u.transform.left, u.transform.top, g, c, { x: 0, y: 0 }), f = o.skeleton.getCellIndexByOffset(u.transform.left + u.transform.width, u.transform.top + u.transform.height, g, c, { x: 0, y: 0 });
|
|
1305
1305
|
m.column < a.startColumn && (a.startColumn = m.column), m.row < a.startRow && (a.startRow = m.row), a.endRow < f.row && (a.endRow = f.row), a.endColumn < f.column && (a.endColumn = f.column);
|
|
1306
1306
|
}
|
|
@@ -1311,18 +1311,18 @@ let He = class extends Z {
|
|
|
1311
1311
|
);
|
|
1312
1312
|
}
|
|
1313
1313
|
};
|
|
1314
|
-
He =
|
|
1315
|
-
Ne(0, U(
|
|
1314
|
+
He = qi([
|
|
1315
|
+
Ne(0, U(Ar)),
|
|
1316
1316
|
Ne(1, U(Vt)),
|
|
1317
1317
|
Ne(2, q),
|
|
1318
1318
|
Ne(3, X)
|
|
1319
1319
|
], He);
|
|
1320
|
-
var
|
|
1321
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
1320
|
+
var Zi = Object.defineProperty, Qi = Object.getOwnPropertyDescriptor, es = (i, e, n, t) => {
|
|
1321
|
+
for (var r = t > 1 ? void 0 : t ? Qi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
1322
1322
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
1323
|
-
return t && r &&
|
|
1323
|
+
return t && r && Zi(e, n, r), r;
|
|
1324
1324
|
}, te = (i, e) => (n, t) => e(n, t, i);
|
|
1325
|
-
const
|
|
1325
|
+
const ts = [
|
|
1326
1326
|
Jt.id,
|
|
1327
1327
|
qt.id,
|
|
1328
1328
|
Zt.id,
|
|
@@ -1342,11 +1342,11 @@ const es = [
|
|
|
1342
1342
|
un.id,
|
|
1343
1343
|
hn.id,
|
|
1344
1344
|
gn.id
|
|
1345
|
-
],
|
|
1346
|
-
ti.id,
|
|
1345
|
+
], ns = [
|
|
1347
1346
|
ni.id,
|
|
1348
1347
|
ri.id,
|
|
1349
1348
|
ii.id,
|
|
1349
|
+
si.id,
|
|
1350
1350
|
zt.id,
|
|
1351
1351
|
Kt.id
|
|
1352
1352
|
];
|
|
@@ -1358,7 +1358,7 @@ let pt = class extends Z {
|
|
|
1358
1358
|
this.disposeWithMe(
|
|
1359
1359
|
this._sheetInterceptorService.interceptCommand({
|
|
1360
1360
|
getMutations: (i) => {
|
|
1361
|
-
if (!
|
|
1361
|
+
if (!ts.includes(i.id))
|
|
1362
1362
|
return { redos: [], undos: [] };
|
|
1363
1363
|
if (i.params == null)
|
|
1364
1364
|
return { redos: [], undos: [] };
|
|
@@ -1999,7 +1999,7 @@ let pt = class extends Z {
|
|
|
1999
1999
|
_commandListener() {
|
|
2000
2000
|
this.disposeWithMe(
|
|
2001
2001
|
this._commandService.onCommandExecuted((i) => {
|
|
2002
|
-
i.id ===
|
|
2002
|
+
i.id === oi.id && setTimeout(() => {
|
|
2003
2003
|
const e = i.params, { unitId: n, subUnitId: t } = e, r = this._drawingManagerService.drawingManagerData, s = [], o = [];
|
|
2004
2004
|
Object.keys(r).forEach((d) => {
|
|
2005
2005
|
const l = r[d];
|
|
@@ -2021,7 +2021,7 @@ let pt = class extends Z {
|
|
|
2021
2021
|
_sheetRefreshListener() {
|
|
2022
2022
|
this.disposeWithMe(
|
|
2023
2023
|
this._commandService.onCommandExecuted((i) => {
|
|
2024
|
-
|
|
2024
|
+
ns.includes(i.id) && requestIdleCallback(() => {
|
|
2025
2025
|
const e = i.params, { unitId: n, subUnitId: t, ranges: r } = e;
|
|
2026
2026
|
this._refreshDrawingTransform(n, t, r);
|
|
2027
2027
|
});
|
|
@@ -2066,7 +2066,7 @@ let pt = class extends Z {
|
|
|
2066
2066
|
}), r.length !== 0 && (this._drawingManagerService.refreshTransform(r), this._commandService.syncExecuteCommand(W.id, [i]));
|
|
2067
2067
|
}
|
|
2068
2068
|
};
|
|
2069
|
-
pt =
|
|
2069
|
+
pt = es([
|
|
2070
2070
|
te(1, X),
|
|
2071
2071
|
te(2, F),
|
|
2072
2072
|
te(3, Ie),
|
|
@@ -2074,7 +2074,7 @@ pt = Qi([
|
|
|
2074
2074
|
te(5, U(Je)),
|
|
2075
2075
|
te(6, z),
|
|
2076
2076
|
te(7, q),
|
|
2077
|
-
te(8,
|
|
2077
|
+
te(8, fe)
|
|
2078
2078
|
], pt);
|
|
2079
2079
|
var J = function() {
|
|
2080
2080
|
return J = Object.assign || function(i) {
|
|
@@ -2084,7 +2084,7 @@ var J = function() {
|
|
|
2084
2084
|
}
|
|
2085
2085
|
return i;
|
|
2086
2086
|
}, J.apply(this, arguments);
|
|
2087
|
-
},
|
|
2087
|
+
}, rs = function(i, e) {
|
|
2088
2088
|
var n = {};
|
|
2089
2089
|
for (var t in i) Object.prototype.hasOwnProperty.call(i, t) && e.indexOf(t) < 0 && (n[t] = i[t]);
|
|
2090
2090
|
if (i != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -2092,15 +2092,15 @@ var J = function() {
|
|
|
2092
2092
|
e.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(i, t[r]) && (n[t[r]] = i[t[r]]);
|
|
2093
2093
|
return n;
|
|
2094
2094
|
}, Mn = fn(function(i, e) {
|
|
2095
|
-
var n = i.icon, t = i.id, r = i.className, s = i.extend, o =
|
|
2095
|
+
var n = i.icon, t = i.id, r = i.className, s = i.extend, o = rs(i, ["icon", "id", "className", "extend"]), d = "univerjs-icon univerjs-icon-".concat(t, " ").concat(r || "").trim(), l = di("_".concat(os()));
|
|
2096
2096
|
return Dn(n, "".concat(t), { defIds: n.defIds, idSuffix: l.current }, J({ ref: e, className: d }, o), s);
|
|
2097
2097
|
});
|
|
2098
2098
|
function Dn(i, e, n, t, r) {
|
|
2099
|
-
return pn(i.tag, J(J({ key: e },
|
|
2099
|
+
return pn(i.tag, J(J({ key: e }, is(i, n, r)), t), (ss(i, n).children || []).map(function(s, o) {
|
|
2100
2100
|
return Dn(s, "".concat(e, "-").concat(i.tag, "-").concat(o), n, void 0, r);
|
|
2101
2101
|
}));
|
|
2102
2102
|
}
|
|
2103
|
-
function
|
|
2103
|
+
function is(i, e, n) {
|
|
2104
2104
|
var t = J({}, i.attrs);
|
|
2105
2105
|
n != null && n.colorChannel1 && t.fill === "colorChannel1" && (t.fill = n.colorChannel1);
|
|
2106
2106
|
var r = e.defIds;
|
|
@@ -2109,21 +2109,21 @@ function rs(i, e, n) {
|
|
|
2109
2109
|
typeof d == "string" && (t[o] = d.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
2110
2110
|
})), t;
|
|
2111
2111
|
}
|
|
2112
|
-
function
|
|
2112
|
+
function ss(i, e) {
|
|
2113
2113
|
var n, t = e.defIds;
|
|
2114
2114
|
return !t || t.length === 0 ? i : i.tag === "defs" && (!((n = i.children) === null || n === void 0) && n.length) ? J(J({}, i), { children: i.children.map(function(r) {
|
|
2115
2115
|
return typeof r.attrs.id == "string" && t && t.indexOf(r.attrs.id) > -1 ? J(J({}, r), { attrs: J(J({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
|
|
2116
2116
|
}) }) : i;
|
|
2117
2117
|
}
|
|
2118
|
-
function
|
|
2118
|
+
function os() {
|
|
2119
2119
|
return Math.random().toString(36).substring(2, 8);
|
|
2120
2120
|
}
|
|
2121
2121
|
Mn.displayName = "UniverIcon";
|
|
2122
|
-
var
|
|
2122
|
+
var as = { 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" } }] }, bn = fn(function(i, e) {
|
|
2123
2123
|
return pn(Mn, Object.assign({}, i, {
|
|
2124
2124
|
id: "add-image-single",
|
|
2125
2125
|
ref: e,
|
|
2126
|
-
icon:
|
|
2126
|
+
icon: as
|
|
2127
2127
|
}));
|
|
2128
2128
|
});
|
|
2129
2129
|
bn.displayName = "AddImageSingle";
|
|
@@ -2186,17 +2186,17 @@ const yn = {
|
|
|
2186
2186
|
}) ? (n.syncExecuteCommand(W.id, [d]), !0) : !1;
|
|
2187
2187
|
}
|
|
2188
2188
|
}, On = "addition-and-subtraction-single", Tn = "sheet.menu.image";
|
|
2189
|
-
function
|
|
2189
|
+
function cs(i) {
|
|
2190
2190
|
return {
|
|
2191
2191
|
id: Tn,
|
|
2192
2192
|
type: wt.SUBITEMS,
|
|
2193
2193
|
icon: On,
|
|
2194
2194
|
tooltip: "sheetImage.title",
|
|
2195
2195
|
hidden$: Yt(i, G.UNIVER_SHEET),
|
|
2196
|
-
disabled$:
|
|
2196
|
+
disabled$: Nr(i, { workbookTypes: [lt], worksheetTypes: [xe], rangeTypes: [ai] })
|
|
2197
2197
|
};
|
|
2198
2198
|
}
|
|
2199
|
-
function
|
|
2199
|
+
function ds(i) {
|
|
2200
2200
|
return {
|
|
2201
2201
|
id: vt.id,
|
|
2202
2202
|
title: "sheetImage.upload.float",
|
|
@@ -2204,29 +2204,29 @@ function cs(i) {
|
|
|
2204
2204
|
hidden$: Yt(i, G.UNIVER_SHEET)
|
|
2205
2205
|
};
|
|
2206
2206
|
}
|
|
2207
|
-
function
|
|
2207
|
+
function ls(i) {
|
|
2208
2208
|
return {
|
|
2209
2209
|
id: St.id,
|
|
2210
2210
|
title: "sheetImage.upload.cell",
|
|
2211
2211
|
type: wt.BUTTON
|
|
2212
2212
|
};
|
|
2213
2213
|
}
|
|
2214
|
-
const
|
|
2215
|
-
imageCommonPanel:
|
|
2216
|
-
imageCommonPanelGrid:
|
|
2217
|
-
imageCommonPanelBorder:
|
|
2218
|
-
imageCommonPanelTitle:
|
|
2219
|
-
imageCommonPanelSubtitle:
|
|
2220
|
-
imageCommonPanelRow:
|
|
2221
|
-
imageCommonPanelRowVertical:
|
|
2222
|
-
imageCommonPanelColumn:
|
|
2223
|
-
imageCommonPanelColumnCenter:
|
|
2224
|
-
imageCommonPanelInline:
|
|
2225
|
-
imageCommonPanelSpan2:
|
|
2226
|
-
imageCommonPanelSpan3:
|
|
2227
|
-
imageCommonPanelInput:
|
|
2228
|
-
sheetImageMenu:
|
|
2229
|
-
sheetImageMenuInput:
|
|
2214
|
+
const us = "univer-image-common-panel", hs = "univer-image-common-panel-grid", gs = "univer-image-common-panel-border", ms = "univer-image-common-panel-title", fs = "univer-image-common-panel-subtitle", ps = "univer-image-common-panel-row", ws = "univer-image-common-panel-row-vertical", _s = "univer-image-common-panel-column", vs = "univer-image-common-panel-column-center", Ss = "univer-image-common-panel-inline", Is = "univer-image-common-panel-span2", Cs = "univer-image-common-panel-span3", Rs = "univer-image-common-panel-input", Ms = "univer-sheet-image-menu", Ds = "univer-sheet-image-menu-input", ne = {
|
|
2215
|
+
imageCommonPanel: us,
|
|
2216
|
+
imageCommonPanelGrid: hs,
|
|
2217
|
+
imageCommonPanelBorder: gs,
|
|
2218
|
+
imageCommonPanelTitle: ms,
|
|
2219
|
+
imageCommonPanelSubtitle: fs,
|
|
2220
|
+
imageCommonPanelRow: ps,
|
|
2221
|
+
imageCommonPanelRowVertical: ws,
|
|
2222
|
+
imageCommonPanelColumn: _s,
|
|
2223
|
+
imageCommonPanelColumnCenter: vs,
|
|
2224
|
+
imageCommonPanelInline: Ss,
|
|
2225
|
+
imageCommonPanelSpan2: Is,
|
|
2226
|
+
imageCommonPanelSpan3: Cs,
|
|
2227
|
+
imageCommonPanelInput: Rs,
|
|
2228
|
+
sheetImageMenu: Ms,
|
|
2229
|
+
sheetImageMenuInput: Ds
|
|
2230
2230
|
};
|
|
2231
2231
|
function En(i) {
|
|
2232
2232
|
var e, n, t = "";
|
|
@@ -2241,7 +2241,7 @@ function je() {
|
|
|
2241
2241
|
for (var i, e, n = 0, t = "", r = arguments.length; n < r; n++) (i = arguments[n]) && (e = En(i)) && (t && (t += " "), t += e);
|
|
2242
2242
|
return t;
|
|
2243
2243
|
}
|
|
2244
|
-
const
|
|
2244
|
+
const bs = (i) => {
|
|
2245
2245
|
var S;
|
|
2246
2246
|
const e = de(F), n = de(Ke), t = de(q), r = de(X), { drawings: s } = i, o = s[0];
|
|
2247
2247
|
if (o == null)
|
|
@@ -2304,13 +2304,13 @@ const Ds = (i) => {
|
|
|
2304
2304
|
const I = (R) => R ? "block" : "none";
|
|
2305
2305
|
return /* @__PURE__ */ $.jsxs("div", { className: je(ne.imageCommonPanelGrid, ne.imageCommonPanelBorder), style: { display: I(a) }, children: [
|
|
2306
2306
|
/* @__PURE__ */ $.jsx("div", { className: ne.imageCommonPanelRow, children: /* @__PURE__ */ $.jsx("div", { className: je(ne.imageCommonPanelColumn, ne.imageCommonPanelTitle), children: /* @__PURE__ */ $.jsx("div", { children: n.t("drawing-anchor.title") }) }) }),
|
|
2307
|
-
/* @__PURE__ */ $.jsx("div", { className: je(ne.imageCommonPanelRow), children: /* @__PURE__ */ $.jsx("div", { className: je(ne.imageCommonPanelColumn), children: /* @__PURE__ */ $.jsxs(
|
|
2307
|
+
/* @__PURE__ */ $.jsx("div", { className: je(ne.imageCommonPanelRow), children: /* @__PURE__ */ $.jsx("div", { className: je(ne.imageCommonPanelColumn), children: /* @__PURE__ */ $.jsxs(hi, { value: m, onChange: v, direction: "vertical", children: [
|
|
2308
2308
|
/* @__PURE__ */ $.jsx(st, { value: y.Both, children: n.t("drawing-anchor.both") }),
|
|
2309
2309
|
/* @__PURE__ */ $.jsx(st, { value: y.Position, children: n.t("drawing-anchor.position") }),
|
|
2310
2310
|
/* @__PURE__ */ $.jsx(st, { value: y.None, children: n.t("drawing-anchor.none") })
|
|
2311
2311
|
] }) }) })
|
|
2312
2312
|
] });
|
|
2313
|
-
},
|
|
2313
|
+
}, ys = () => {
|
|
2314
2314
|
const i = de(q), e = i.getFocusDrawings(), [n, t] = gt(e);
|
|
2315
2315
|
return _t(() => {
|
|
2316
2316
|
const r = i.focus$.subscribe((s) => {
|
|
@@ -2320,81 +2320,81 @@ const Ds = (i) => {
|
|
|
2320
2320
|
r.unsubscribe();
|
|
2321
2321
|
};
|
|
2322
2322
|
}, []), !!(n != null && n.length) && /* @__PURE__ */ $.jsxs("div", { className: ne.imageCommonPanel, children: [
|
|
2323
|
-
/* @__PURE__ */ $.jsx(
|
|
2324
|
-
/* @__PURE__ */ $.jsx(
|
|
2323
|
+
/* @__PURE__ */ $.jsx(vr, { drawings: n }),
|
|
2324
|
+
/* @__PURE__ */ $.jsx(bs, { drawings: n })
|
|
2325
2325
|
] });
|
|
2326
|
-
},
|
|
2327
|
-
[
|
|
2326
|
+
}, Os = {
|
|
2327
|
+
[Gr.FORMULAS_INSERT]: {
|
|
2328
2328
|
[Tn]: {
|
|
2329
2329
|
order: 3,
|
|
2330
|
-
menuItemFactory:
|
|
2330
|
+
menuItemFactory: cs,
|
|
2331
2331
|
[vt.id]: {
|
|
2332
2332
|
order: 0,
|
|
2333
|
-
menuItemFactory:
|
|
2333
|
+
menuItemFactory: ds
|
|
2334
2334
|
},
|
|
2335
2335
|
[St.id]: {
|
|
2336
2336
|
order: 1,
|
|
2337
|
-
menuItemFactory:
|
|
2337
|
+
menuItemFactory: ls
|
|
2338
2338
|
}
|
|
2339
2339
|
}
|
|
2340
2340
|
}
|
|
2341
2341
|
};
|
|
2342
2342
|
function Re(i) {
|
|
2343
|
-
return !i.getContextValue(Qn) && !i.getContextValue(er) && !i.getContextValue(tr) && i.getContextValue(
|
|
2343
|
+
return !i.getContextValue(Qn) && !i.getContextValue(er) && !i.getContextValue(tr) && i.getContextValue(he);
|
|
2344
2344
|
}
|
|
2345
|
-
const
|
|
2345
|
+
const Ts = {
|
|
2346
2346
|
id: Ce.id,
|
|
2347
2347
|
description: "shortcut.sheet.drawing-move-down",
|
|
2348
2348
|
group: "4_sheet-drawing-view",
|
|
2349
|
-
binding:
|
|
2349
|
+
binding: ge.ARROW_DOWN,
|
|
2350
2350
|
priority: 100,
|
|
2351
2351
|
preconditions: Re,
|
|
2352
2352
|
staticParameters: {
|
|
2353
2353
|
direction: re.DOWN
|
|
2354
2354
|
}
|
|
2355
|
-
},
|
|
2355
|
+
}, Es = {
|
|
2356
2356
|
id: Ce.id,
|
|
2357
2357
|
description: "shortcut.sheet.drawing-move-up",
|
|
2358
2358
|
group: "4_sheet-drawing-view",
|
|
2359
|
-
binding:
|
|
2359
|
+
binding: ge.ARROW_UP,
|
|
2360
2360
|
priority: 100,
|
|
2361
2361
|
preconditions: Re,
|
|
2362
2362
|
staticParameters: {
|
|
2363
2363
|
direction: re.UP
|
|
2364
2364
|
}
|
|
2365
|
-
},
|
|
2365
|
+
}, Ps = {
|
|
2366
2366
|
id: Ce.id,
|
|
2367
2367
|
description: "shortcut.sheet.drawing-move-left",
|
|
2368
2368
|
group: "4_sheet-drawing-view",
|
|
2369
|
-
binding:
|
|
2369
|
+
binding: ge.ARROW_LEFT,
|
|
2370
2370
|
priority: 100,
|
|
2371
2371
|
preconditions: Re,
|
|
2372
2372
|
staticParameters: {
|
|
2373
2373
|
direction: re.LEFT
|
|
2374
2374
|
}
|
|
2375
|
-
},
|
|
2375
|
+
}, Us = {
|
|
2376
2376
|
id: Ce.id,
|
|
2377
2377
|
description: "shortcut.sheet.drawing-move-right",
|
|
2378
2378
|
group: "4_sheet-drawing-view",
|
|
2379
|
-
binding:
|
|
2379
|
+
binding: ge.ARROW_RIGHT,
|
|
2380
2380
|
priority: 100,
|
|
2381
2381
|
preconditions: Re,
|
|
2382
2382
|
staticParameters: {
|
|
2383
2383
|
direction: re.RIGHT
|
|
2384
2384
|
}
|
|
2385
|
-
},
|
|
2385
|
+
}, As = {
|
|
2386
2386
|
id: yn.id,
|
|
2387
2387
|
description: "shortcut.sheet.drawing-delete",
|
|
2388
2388
|
group: "4_sheet-drawing-view",
|
|
2389
2389
|
// when focusing on any other input tag do not trigger this shortcut
|
|
2390
2390
|
preconditions: Re,
|
|
2391
|
-
binding:
|
|
2392
|
-
mac:
|
|
2391
|
+
binding: ge.DELETE,
|
|
2392
|
+
mac: ge.BACKSPACE
|
|
2393
2393
|
};
|
|
2394
|
-
var
|
|
2395
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2394
|
+
var Ns = Object.defineProperty, js = Object.getOwnPropertyDescriptor, Ws = (i, e, n, t) => {
|
|
2395
|
+
for (var r = t > 1 ? void 0 : t ? js(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
2396
2396
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
2397
|
-
return t && r &&
|
|
2397
|
+
return t && r && Ns(e, n, r), r;
|
|
2398
2398
|
}, We = (i, e) => (n, t) => e(n, t, i);
|
|
2399
2399
|
let Ye = class extends Z {
|
|
2400
2400
|
constructor(i, e, n, t) {
|
|
@@ -2402,10 +2402,10 @@ let Ye = class extends Z {
|
|
|
2402
2402
|
}
|
|
2403
2403
|
_initCustomComponents() {
|
|
2404
2404
|
const i = this._componentManager;
|
|
2405
|
-
this.disposeWithMe(i.register(On, bn)), this.disposeWithMe(i.register(wn,
|
|
2405
|
+
this.disposeWithMe(i.register(On, bn)), this.disposeWithMe(i.register(wn, ys));
|
|
2406
2406
|
}
|
|
2407
2407
|
_initMenus() {
|
|
2408
|
-
this._menuManagerService.mergeMenu(
|
|
2408
|
+
this._menuManagerService.mergeMenu(Os);
|
|
2409
2409
|
}
|
|
2410
2410
|
_initCommands() {
|
|
2411
2411
|
[
|
|
@@ -2427,11 +2427,11 @@ let Ye = class extends Z {
|
|
|
2427
2427
|
_initShortcuts() {
|
|
2428
2428
|
[
|
|
2429
2429
|
// sheet drawing shortcuts
|
|
2430
|
-
Os,
|
|
2431
2430
|
Ts,
|
|
2432
2431
|
Es,
|
|
2433
2432
|
Ps,
|
|
2434
|
-
Us
|
|
2433
|
+
Us,
|
|
2434
|
+
As
|
|
2435
2435
|
].forEach((i) => {
|
|
2436
2436
|
this.disposeWithMe(this._shortcutService.registerShortcut(i));
|
|
2437
2437
|
});
|
|
@@ -2440,18 +2440,18 @@ let Ye = class extends Z {
|
|
|
2440
2440
|
this._initCommands(), this._initCustomComponents(), this._initMenus(), this._initShortcuts();
|
|
2441
2441
|
}
|
|
2442
2442
|
};
|
|
2443
|
-
Ye =
|
|
2444
|
-
We(0, U(
|
|
2445
|
-
We(1,
|
|
2443
|
+
Ye = Ws([
|
|
2444
|
+
We(0, U(Fr)),
|
|
2445
|
+
We(1, Vr),
|
|
2446
2446
|
We(2, F),
|
|
2447
|
-
We(3,
|
|
2447
|
+
We(3, kr)
|
|
2448
2448
|
], Ye);
|
|
2449
|
-
var
|
|
2450
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2449
|
+
var xs = Object.defineProperty, $s = Object.getOwnPropertyDescriptor, Bs = (i, e, n, t) => {
|
|
2450
|
+
for (var r = t > 1 ? void 0 : t ? $s(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
2451
2451
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
2452
|
-
return t && r &&
|
|
2452
|
+
return t && r && xs(e, n, r), r;
|
|
2453
2453
|
}, ce = (i, e) => (n, t) => e(n, t, i);
|
|
2454
|
-
function
|
|
2454
|
+
function Ls(i, e, n, t) {
|
|
2455
2455
|
const { scaleX: r, scaleY: s } = e.getAncestorScale(), o = e.getViewport(kt.VIEW_MAIN), d = {
|
|
2456
2456
|
left: !0,
|
|
2457
2457
|
top: !0
|
|
@@ -2491,7 +2491,7 @@ const ct = (i, e, n, t) => {
|
|
|
2491
2491
|
right: s + d,
|
|
2492
2492
|
top: o,
|
|
2493
2493
|
bottom: o + l
|
|
2494
|
-
}, a =
|
|
2494
|
+
}, a = Ls(c, r, n, t), { scaleX: h, scaleY: u } = r.getAncestorScale();
|
|
2495
2495
|
return {
|
|
2496
2496
|
startX: a.left,
|
|
2497
2497
|
endX: a.right,
|
|
@@ -2518,7 +2518,7 @@ let Xe = class extends Z {
|
|
|
2518
2518
|
this._renderManagerService = e, this._univerInstanceService = n, this._commandService = t, this._drawingManagerService = r, this._canvasFloatDomService = s, this._sheetDrawingService = o, this._lifecycleService = d, this._drawingAddListener(), this._featureUpdateListener(), this._deleteListener(), this._bindScrollEvent();
|
|
2519
2519
|
}
|
|
2520
2520
|
_bindScrollEvent() {
|
|
2521
|
-
this._lifecycleService.lifecycle$.pipe(ie((e) => e === rr.Rendered),
|
|
2521
|
+
this._lifecycleService.lifecycle$.pipe(ie((e) => e === rr.Rendered), Yr(1)).subscribe(() => {
|
|
2522
2522
|
this._scrollUpdateListener();
|
|
2523
2523
|
});
|
|
2524
2524
|
}
|
|
@@ -2590,8 +2590,8 @@ let Xe = class extends Z {
|
|
|
2590
2590
|
D.fill = L, D.rotateEnabled = !1, u && u.border && (D.stroke = u.border), D.paintFirst = "stroke", D.strokeWidth = 1, D.borderEnabled = !1, D.radius = 8;
|
|
2591
2591
|
}
|
|
2592
2592
|
const P = new Pt(N, D);
|
|
2593
|
-
M && P.setObjectType(
|
|
2594
|
-
const x = this._ensureMap(t, r), ee = new ir(), An = ct(P, m.renderObject, c.skeleton, o.worksheet), et = new
|
|
2593
|
+
M && P.setObjectType(Rr.CHART), f.addObject(P, Mr), d.allowTransform !== !1 && f.attachTransformerTo(P);
|
|
2594
|
+
const x = this._ensureMap(t, r), ee = new ir(), An = ct(P, m.renderObject, c.skeleton, o.worksheet), et = new Xr(An), Nn = {
|
|
2595
2595
|
dispose: ee,
|
|
2596
2596
|
rect: P,
|
|
2597
2597
|
position$: et,
|
|
@@ -2673,12 +2673,12 @@ let Xe = class extends Z {
|
|
|
2673
2673
|
})
|
|
2674
2674
|
), this.disposeWithMe(this._commandService.onCommandExecuted((n) => {
|
|
2675
2675
|
var t, r;
|
|
2676
|
-
if (n.id ===
|
|
2676
|
+
if (n.id === jr.id) {
|
|
2677
2677
|
const s = n.params, { unitId: o } = s;
|
|
2678
2678
|
Array.from((r = (t = this._domLayerMap.get(o)) == null ? void 0 : t.keys()) != null ? r : []).forEach((l) => {
|
|
2679
2679
|
e(o, l);
|
|
2680
2680
|
});
|
|
2681
|
-
} else if (n.id ===
|
|
2681
|
+
} else if (n.id === ci.id) {
|
|
2682
2682
|
const { unitId: s, subUnitId: o } = n.params;
|
|
2683
2683
|
e(s, o);
|
|
2684
2684
|
}
|
|
@@ -2804,32 +2804,33 @@ let Xe = class extends Z {
|
|
|
2804
2804
|
};
|
|
2805
2805
|
}
|
|
2806
2806
|
};
|
|
2807
|
-
Xe =
|
|
2807
|
+
Xe = Bs([
|
|
2808
2808
|
ce(0, U(X)),
|
|
2809
|
-
ce(1,
|
|
2809
|
+
ce(1, fe),
|
|
2810
2810
|
ce(2, U(F)),
|
|
2811
2811
|
ce(3, q),
|
|
2812
|
-
ce(4, U(
|
|
2812
|
+
ce(4, U(Hr)),
|
|
2813
2813
|
ce(5, z),
|
|
2814
2814
|
ce(6, U(nr))
|
|
2815
2815
|
], Xe);
|
|
2816
|
-
var Pn = Object.defineProperty,
|
|
2817
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2816
|
+
var Pn = Object.defineProperty, Gs = Object.getOwnPropertyDescriptor, Fs = (i, e, n) => e in i ? Pn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n, Vs = (i, e, n, t) => {
|
|
2817
|
+
for (var r = t > 1 ? void 0 : t ? Gs(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
2818
2818
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
2819
2819
|
return t && r && Pn(e, n, r), r;
|
|
2820
|
-
}, dt = (i, e) => (n, t) => e(n, t, i), Un = (i, e, n) =>
|
|
2821
|
-
const
|
|
2820
|
+
}, dt = (i, e) => (n, t) => e(n, t, i), Un = (i, e, n) => Fs(i, typeof e != "symbol" ? e + "" : e, n);
|
|
2821
|
+
const ks = "SHEET_IMAGE_UI_PLUGIN";
|
|
2822
2822
|
let ze = class extends cr {
|
|
2823
2823
|
constructor(i = Wt, e, n, t) {
|
|
2824
2824
|
super(), this._config = i, this._injector = e, this._renderManagerService = n, this._configService = t;
|
|
2825
|
-
const { menu: r, ...s } =
|
|
2825
|
+
const { menu: r, ...s } = dr(
|
|
2826
|
+
{},
|
|
2826
2827
|
Wt,
|
|
2827
2828
|
this._config
|
|
2828
2829
|
);
|
|
2829
|
-
r && this._configService.setConfig("menu", r, { merge: !0 }), this._configService.setConfig(
|
|
2830
|
+
r && this._configService.setConfig("menu", r, { merge: !0 }), this._configService.setConfig(gi, s);
|
|
2830
2831
|
}
|
|
2831
2832
|
onStarting() {
|
|
2832
|
-
|
|
2833
|
+
lr(this._injector, [
|
|
2833
2834
|
[Xe],
|
|
2834
2835
|
[Ye],
|
|
2835
2836
|
[Be],
|
|
@@ -2872,12 +2873,12 @@ let ze = class extends cr {
|
|
|
2872
2873
|
}
|
|
2873
2874
|
};
|
|
2874
2875
|
Un(ze, "type", G.UNIVER_SHEET);
|
|
2875
|
-
Un(ze, "pluginName",
|
|
2876
|
-
ze =
|
|
2877
|
-
ar(
|
|
2876
|
+
Un(ze, "pluginName", ks);
|
|
2877
|
+
ze = Vs([
|
|
2878
|
+
ar(mr, gr, Sr, Dr),
|
|
2878
2879
|
dt(1, U(Se)),
|
|
2879
2880
|
dt(2, X),
|
|
2880
|
-
dt(3,
|
|
2881
|
+
dt(3, ur)
|
|
2881
2882
|
], ze);
|
|
2882
2883
|
export {
|
|
2883
2884
|
W as ClearSheetDrawingTransformerOperation,
|