@univerjs/sheets-drawing-ui 0.15.0-insiders.20251227-c108ce3 → 0.15.0-insiders.20260107-3441c7a
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 +205 -205
- package/lib/index.js +205 -205
- package/lib/umd/index.js +1 -1
- package/package.json +12 -12
package/lib/es/index.js
CHANGED
|
@@ -3,16 +3,16 @@ var Zr = (i, t, e) => t in i ? Jr(i, t, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var re = (i, t, e) => Zr(i, typeof t != "symbol" ? t + "" : t, e);
|
|
4
4
|
import { precisionTo as bt, IRenderManagerService as Q, transformObjectOutOfGroup as qr, getGroupState as Qr, getCurrentTypeOfRenderer as Dn, CURSOR_TYPE as ei, RENDER_CLASS_TYPE as ke, Rect as $e, ObjectType as An, DRAWING_OBJECT_LAYER_INDEX as qt, SHEET_VIEWPORT_KEY as cr } from "@univerjs/engine-render";
|
|
5
5
|
import { convertPositionSheetOverGridToAbsolute as ti, SheetSkeletonManagerService as X, ISheetSelectionRenderService as Je, attachRangeWithCoord as dr, SheetCanvasPopManagerService as ni, HoverManagerService as ri, IEditorBridgeService as ii, IAutoFillService as si, EditingRenderController as oi, SetCellEditVisibleOperation as Nn, PREDEFINED_HOOK_NAME_PASTE as Le, COPY_TYPE as Re, discreteRangeToRange as kn, virtualizeDiscreteRanges as ai, ISheetClipboardService as ci, SetZoomRatioOperation as $n, SetScrollOperation as di, SheetPrintInterceptorService as li, useHighlightRange as ui, getCurrentRangeDisable$ as hi } from "@univerjs/sheets-ui";
|
|
6
|
-
import { CommandType as q, ICommandService as
|
|
7
|
-
import { ISheetDrawingService as oe, DrawingApplyType as U, SetDrawingApplyMutation as P, SheetDrawingAnchorType as O, UniverSheetsDrawingPlugin as
|
|
8
|
-
import { SheetInterceptorService as Ht, SheetsSelectionsService as ut, SetRangeValuesCommand as Ln, getSheetCommandTarget as se, INTERCEPTOR_POINT as
|
|
9
|
-
import { MessageType as Se, render as
|
|
10
|
-
import { docDrawingPositionToTransform as Xn, ReplaceSnapshotCommand as
|
|
11
|
-
import { IImageIoService as
|
|
12
|
-
import { ILocalFileService as
|
|
13
|
-
import { DocDrawingController as
|
|
14
|
-
import { ImageCropperObject as
|
|
15
|
-
import { takeUntil as Qn, throttleTime as
|
|
6
|
+
import { CommandType as q, ICommandService as G, IUndoRedoService as Ze, sequenceExecute as lr, DrawingTypeEnum as x, ArrangeTypeEnum as Mt, Inject as A, IContextService as ur, LocaleService as Te, Injector as qe, Disposable as ee, createDocumentModelWithStyle as un, ObjectRelativeFromV as xn, ObjectRelativeFromH as Wn, WrapTextType as Bn, PositionedObjectLayoutType as jn, BooleanNumber as Fn, BuildTextUtils as hn, ImageSourceType as Ce, generateRandomId as He, FOCUSING_COMMON_DRAWINGS as Ye, IUniverInstanceService as de, UniverInstanceType as k, Direction as ve, createIdentifier as gi, IImageIoService as hr, RxDisposable as mi, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as ot, DOCS_ZEN_EDITOR_UNIT_ID_KEY as Ve, InterceptorEffectEnum as fi, ObjectMatrix as pi, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as wi, IPermissionService as _i, UserManagerService as Si, LifecycleService as vi, LifecycleStages as Ii, DisposableCollection as yt, fromEventSubject as Ci, Tools as Ge, PRINT_CHART_COMPONENT_KEY as Ri, Rectangle as Di, FOCUSING_SHEET as bi, FOCUSING_FX_BAR_EDITOR as Mi, EDITOR_ACTIVATED as yi, FOCUSING_PANEL_EDITOR as Ei, DependentOn as Ti, IConfigService as Oi, Plugin as Ui, merge as Pi, registerDependencies as Ai, touchDependencies as Qt } from "@univerjs/core";
|
|
7
|
+
import { ISheetDrawingService as oe, DrawingApplyType as U, SetDrawingApplyMutation as P, SheetDrawingAnchorType as O, UniverSheetsDrawingPlugin as Ni } from "@univerjs/sheets-drawing";
|
|
8
|
+
import { SheetInterceptorService as Ht, SheetsSelectionsService as ut, SetRangeValuesCommand as Ln, getSheetCommandTarget as se, INTERCEPTOR_POINT as ki, InterceptCellContentPriority as $i, WorkbookViewPermission as Hn, WorksheetViewPermission as Vn, WorkbookEditablePermission as gn, WorksheetEditPermission as mn, SetFrozenMutation as xi, SetSelectionsOperation as Wi, SetWorksheetRowAutoHeightMutation as gr, COMMAND_LISTENER_SKELETON_CHANGE as Bi, InsertRowCommand as mr, InsertColCommand as fr, RemoveRowCommand as pr, RemoveColCommand as wr, DeleteRangeMoveLeftCommand as _r, DeleteRangeMoveUpCommand as Sr, InsertRangeMoveDownCommand as vr, InsertRangeMoveRightCommand as Ir, DeltaRowHeightCommand as fn, SetRowHeightCommand as pn, DeltaColumnWidthCommand as Cr, SetColWidthCommand as Rr, SetRowHiddenCommand as Dr, SetSpecificRowsVisibleCommand as br, SetSpecificColsVisibleCommand as Mr, SetColHiddenCommand as yr, MoveColsCommand as Er, MoveRowsCommand as Tr, MoveRangeCommand as Or, SetRowVisibleMutation as ji, SetRowHiddenMutation as Fi, SetColVisibleMutation as Li, SetColHiddenMutation as Hi, SetWorksheetRowHeightMutation as Vi, SetWorksheetRowIsAutoHeightMutation as Gi, SetWorksheetColWidthMutation as Yi, SetWorksheetActiveOperation as Xi, RangeProtectionPermissionEditPoint as zi } from "@univerjs/sheets";
|
|
9
|
+
import { MessageType as Se, render as Ki, unmount as Ji, FormLayout as en, CheckboxGroup as Zi, Checkbox as Gn, Select as qi, Button as Yn, clsx as Qi, RadioGroup as es, Radio as tn } from "@univerjs/design";
|
|
10
|
+
import { docDrawingPositionToTransform as Xn, ReplaceSnapshotCommand as ts, InnerPasteCommand as ns } from "@univerjs/docs-ui";
|
|
11
|
+
import { IImageIoService as rs, IDrawingManagerService as ae, DRAWING_IMAGE_ALLOW_IMAGE_LIST as zn, DRAWING_IMAGE_COUNT_LIMIT as Kn, ImageUploadStatusType as xe, DRAWING_IMAGE_ALLOW_SIZE as Jn, getImageSize as nn, SetDrawingSelectedOperation as Vt, DRAWING_IMAGE_WIDTH_LIMIT as Zn, DRAWING_IMAGE_HEIGHT_LIMIT as qn, ImageSourceType as is, getDrawingShapeKeyByDrawingSearch as De, UniverDrawingPlugin as ss } from "@univerjs/drawing";
|
|
12
|
+
import { ILocalFileService as os, IMessageService as Ur, IDialogService as bn, ISidebarService as as, IClipboardInterfaceService as cs, CanvasFloatDomService as ds, PrintFloatDomSingle as ls, ComponentManager as Pr, connectInjector as us, useDependency as Ie, getMenuHiddenObservable as Gt, MenuItemType as Yt, ContextMenuPosition as rn, ContextMenuGroup as sn, RibbonInsertGroup as hs, KeyCode as Ke, IMenuManagerService as gs, IShortcutService as ms } from "@univerjs/ui";
|
|
13
|
+
import { DocDrawingController as fs, UniverDocsDrawingPlugin as ps } from "@univerjs/docs-drawing";
|
|
14
|
+
import { ImageCropperObject as ws, COMPONENT_IMAGE_POPUP_MENU as _s, OpenImageCropOperation as Ss, ImageResetSizeOperation as vs, DrawingRenderService as Ar, DrawingCommonPanel as Is, UniverDrawingUIPlugin as Cs } from "@univerjs/drawing-ui";
|
|
15
|
+
import { takeUntil as Qn, throttleTime as Rs, combineLatest as at, switchMap as fe, EMPTY as we, tap as er, map as pe, distinctUntilChanged as tr, Subject as on, filter as Ds, take as bs, BehaviorSubject as je, of as wn } from "rxjs";
|
|
16
16
|
import { jsx as L, jsxs as Xe } from "react/jsx-runtime";
|
|
17
17
|
import { useMemo as Fe, useState as Ee, useCallback as Et, useEffect as Nr } from "react";
|
|
18
18
|
function J(i, t, e) {
|
|
@@ -82,7 +82,7 @@ const H = {
|
|
|
82
82
|
type: q.COMMAND,
|
|
83
83
|
handler: (i, t) => {
|
|
84
84
|
var S, I, D;
|
|
85
|
-
const e = i.get(
|
|
85
|
+
const e = i.get(G), n = i.get(Ze), r = i.get(Ht), s = i.get(oe);
|
|
86
86
|
if (!t) return !1;
|
|
87
87
|
const { drawings: o } = t, a = [];
|
|
88
88
|
o.forEach((v) => {
|
|
@@ -110,7 +110,7 @@ const H = {
|
|
|
110
110
|
id: "sheet.command.delete-drawing",
|
|
111
111
|
type: q.COMMAND,
|
|
112
112
|
handler: (i) => {
|
|
113
|
-
const t = i.get(
|
|
113
|
+
const t = i.get(G), n = i.get(oe).getFocusDrawings();
|
|
114
114
|
if (n.length === 0)
|
|
115
115
|
return !1;
|
|
116
116
|
const r = n[0].unitId, s = n.map((o) => {
|
|
@@ -128,7 +128,7 @@ const H = {
|
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
130
|
};
|
|
131
|
-
function
|
|
131
|
+
function Ms(i) {
|
|
132
132
|
const t = [];
|
|
133
133
|
return i.forEach((e) => {
|
|
134
134
|
const { parent: n, children: r } = e, { unitId: s, subUnitId: o, drawingId: a } = n, d = Qr(0, 0, r.map((l) => l.transform || {})), u = r.map((l) => {
|
|
@@ -157,7 +157,7 @@ function bs(i) {
|
|
|
157
157
|
});
|
|
158
158
|
}), t;
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function ys(i) {
|
|
161
161
|
const t = [];
|
|
162
162
|
return i.forEach((e) => {
|
|
163
163
|
const { parent: n, children: r } = e, { unitId: s, subUnitId: o, drawingId: a, transform: d = { width: 0, height: 0 } } = n;
|
|
@@ -192,7 +192,7 @@ const $r = {
|
|
|
192
192
|
id: "sheet.command.group-sheet-image",
|
|
193
193
|
type: q.COMMAND,
|
|
194
194
|
handler: (i, t) => {
|
|
195
|
-
const e = i.get(
|
|
195
|
+
const e = i.get(G), n = i.get(Ze), r = i.get(oe);
|
|
196
196
|
if (!t) return !1;
|
|
197
197
|
const s = [];
|
|
198
198
|
t.forEach(({ parent: h, children: m }) => {
|
|
@@ -204,7 +204,7 @@ const $r = {
|
|
|
204
204
|
return e.syncExecuteCommand(P.id, { op: c, unitId: a, subUnitId: d, objects: l, type: U.GROUP }) ? (n.pushUndoRedo({
|
|
205
205
|
unitID: a,
|
|
206
206
|
undoMutations: [
|
|
207
|
-
{ id: P.id, params: { op: u, unitId: a, subUnitId: d, objects:
|
|
207
|
+
{ id: P.id, params: { op: u, unitId: a, subUnitId: d, objects: ys(l), type: U.UNGROUP } },
|
|
208
208
|
{ id: H.id, params: s }
|
|
209
209
|
],
|
|
210
210
|
redoMutations: [
|
|
@@ -218,7 +218,7 @@ const $r = {
|
|
|
218
218
|
type: q.COMMAND,
|
|
219
219
|
handler: (i, t) => {
|
|
220
220
|
var S, I, D;
|
|
221
|
-
const e = i.get(
|
|
221
|
+
const e = i.get(G), n = i.get(Ze), r = i.get(oe), s = i.get(Ht);
|
|
222
222
|
if (!t) return !1;
|
|
223
223
|
const o = t.drawings, a = o.map((v) => v.unitId), d = r.getBatchAddOp(o), { unitId: u, subUnitId: c, undo: l, redo: g, objects: h } = d, m = s.onCommandExecute({ id: Xt.id, params: t }), f = { id: P.id, params: { op: g, unitId: u, subUnitId: c, objects: h, type: U.INSERT } }, p = { id: P.id, params: { op: l, unitId: u, subUnitId: c, objects: h, type: U.REMOVE } };
|
|
224
224
|
return lr([...(S = m.preRedos) != null ? S : [], f, ...m.redos], e) ? (n.pushUndoRedo({
|
|
@@ -241,7 +241,7 @@ const $r = {
|
|
|
241
241
|
id: "sheet.command.set-drawing-arrange",
|
|
242
242
|
type: q.COMMAND,
|
|
243
243
|
handler: (i, t) => {
|
|
244
|
-
const e = i.get(
|
|
244
|
+
const e = i.get(G), n = i.get(Ze);
|
|
245
245
|
if (!t) return !1;
|
|
246
246
|
const r = i.get(oe), { unitId: s, subUnitId: o, drawingIds: a, arrangeType: d } = t, u = { unitId: s, subUnitId: o, drawingIds: a };
|
|
247
247
|
let c;
|
|
@@ -262,7 +262,7 @@ const $r = {
|
|
|
262
262
|
id: "sheet.command.set-sheet-image",
|
|
263
263
|
type: q.COMMAND,
|
|
264
264
|
handler: (i, t) => {
|
|
265
|
-
const e = i.get(
|
|
265
|
+
const e = i.get(G), n = i.get(Ze), r = i.get(oe);
|
|
266
266
|
if (!t) return !1;
|
|
267
267
|
const { drawings: s } = t, o = r.getBatchUpdateOp(s), { unitId: a, subUnitId: d, undo: u, redo: c, objects: l } = o;
|
|
268
268
|
return e.syncExecuteCommand(P.id, { unitId: a, subUnitId: d, op: c, objects: l, type: U.UPDATE }) ? (n.pushUndoRedo({
|
|
@@ -281,7 +281,7 @@ const $r = {
|
|
|
281
281
|
id: "sheet.command.ungroup-sheet-image",
|
|
282
282
|
type: q.COMMAND,
|
|
283
283
|
handler: (i, t) => {
|
|
284
|
-
const e = i.get(
|
|
284
|
+
const e = i.get(G), n = i.get(Ze), r = i.get(oe);
|
|
285
285
|
if (!t) return !1;
|
|
286
286
|
const s = [];
|
|
287
287
|
t.forEach(({ parent: h, children: m }) => {
|
|
@@ -293,7 +293,7 @@ const $r = {
|
|
|
293
293
|
return e.syncExecuteCommand(P.id, { op: c, unitId: a, subUnitId: d, objects: l, type: U.UNGROUP }) ? (n.pushUndoRedo({
|
|
294
294
|
unitID: a,
|
|
295
295
|
undoMutations: [
|
|
296
|
-
{ id: P.id, params: { op: u, unitId: a, subUnitId: d, objects:
|
|
296
|
+
{ id: P.id, params: { op: u, unitId: a, subUnitId: d, objects: Ms(l), type: U.GROUP } },
|
|
297
297
|
{ id: H.id, params: s }
|
|
298
298
|
],
|
|
299
299
|
redoMutations: [
|
|
@@ -303,18 +303,18 @@ const $r = {
|
|
|
303
303
|
}), !0) : !1;
|
|
304
304
|
}
|
|
305
305
|
};
|
|
306
|
-
var
|
|
307
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
306
|
+
var Es = Object.getOwnPropertyDescriptor, Ts = (i, t, e, n) => {
|
|
307
|
+
for (var r = n > 1 ? void 0 : n ? Es(t, e) : t, s = i.length - 1, o; s >= 0; s--)
|
|
308
308
|
(o = i[s]) && (r = o(r) || r);
|
|
309
309
|
return r;
|
|
310
310
|
}, ie = (i, t) => (e, n) => t(e, n, i);
|
|
311
|
-
function
|
|
311
|
+
function Os(i, t, e) {
|
|
312
312
|
const n = e * Math.PI / 180, r = Math.abs(i * Math.cos(n)) + Math.abs(t * Math.sin(n)), s = Math.abs(i * Math.sin(n)) + Math.abs(t * Math.cos(n));
|
|
313
313
|
return { rotatedWidth: r, rotatedHeight: s };
|
|
314
314
|
}
|
|
315
315
|
function _n(i, t, e, n, r) {
|
|
316
316
|
var S;
|
|
317
|
-
const { rotatedHeight: s, rotatedWidth: o } =
|
|
317
|
+
const { rotatedHeight: s, rotatedWidth: o } = Os(e, n, r), d = i.get(Q).getRenderById(t.unitId);
|
|
318
318
|
if (!d)
|
|
319
319
|
return !1;
|
|
320
320
|
const c = (S = d.with(X).getSkeletonParam(t.subUnitId)) == null ? void 0 : S.skeleton;
|
|
@@ -663,17 +663,17 @@ let dt = class extends ee {
|
|
|
663
663
|
_focusDrawingListener() {
|
|
664
664
|
this.disposeWithMe(
|
|
665
665
|
this._drawingManagerService.focus$.subscribe((t) => {
|
|
666
|
-
t == null || t.length === 0 ? (this._contextService.setContextValue(
|
|
666
|
+
t == null || t.length === 0 ? (this._contextService.setContextValue(Ye, !1), this._sheetDrawingService.focusDrawing([])) : (this._contextService.setContextValue(Ye, !0), this._sheetDrawingService.focusDrawing(t));
|
|
667
667
|
})
|
|
668
668
|
);
|
|
669
669
|
}
|
|
670
670
|
};
|
|
671
|
-
dt =
|
|
671
|
+
dt = Ts([
|
|
672
672
|
ie(1, A(X)),
|
|
673
|
-
ie(2,
|
|
673
|
+
ie(2, G),
|
|
674
674
|
ie(3, Je),
|
|
675
|
-
ie(4,
|
|
676
|
-
ie(5,
|
|
675
|
+
ie(4, rs),
|
|
676
|
+
ie(5, os),
|
|
677
677
|
ie(6, oe),
|
|
678
678
|
ie(7, ae),
|
|
679
679
|
ie(8, ur),
|
|
@@ -717,7 +717,7 @@ const Kt = {
|
|
|
717
717
|
id: "sheet.command.move-drawing",
|
|
718
718
|
type: q.COMMAND,
|
|
719
719
|
handler: (i, t) => {
|
|
720
|
-
const e = i.get(
|
|
720
|
+
const e = i.get(G), n = i.get(oe), r = i.get(Je), { direction: s } = t, o = n.getFocusDrawings();
|
|
721
721
|
if (o.length === 0)
|
|
722
722
|
return !1;
|
|
723
723
|
const a = o[0].unitId, d = o.map((c) => {
|
|
@@ -737,8 +737,8 @@ const Kt = {
|
|
|
737
737
|
}) ? (e.syncExecuteCommand(H.id, [a]), !0) : !1;
|
|
738
738
|
}
|
|
739
739
|
};
|
|
740
|
-
var
|
|
741
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
740
|
+
var Us = Object.getOwnPropertyDescriptor, Ps = (i, t, e, n) => {
|
|
741
|
+
for (var r = n > 1 ? void 0 : n ? Us(t, e) : t, s = i.length - 1, o; s >= 0; s--)
|
|
742
742
|
(o = i[s]) && (r = o(r) || r);
|
|
743
743
|
return r;
|
|
744
744
|
}, an = (i, t) => (e, n) => t(e, n, i), ye = /* @__PURE__ */ ((i) => (i.CELL_ADDRESS = "cellAddress", i.COLUMN_VALUE = "columnValue", i))(ye || {});
|
|
@@ -752,7 +752,7 @@ function Sn(i) {
|
|
|
752
752
|
function At(i, t) {
|
|
753
753
|
return `${Sn(t)}${i + 1}`;
|
|
754
754
|
}
|
|
755
|
-
function
|
|
755
|
+
function As(i) {
|
|
756
756
|
const t = At(i.startRow, i.startColumn), e = At(i.endRow, i.endColumn);
|
|
757
757
|
return t === e ? t : `${t}:${e}`;
|
|
758
758
|
}
|
|
@@ -913,7 +913,7 @@ let vn = class extends ee {
|
|
|
913
913
|
}
|
|
914
914
|
getSelectionRangeNotation() {
|
|
915
915
|
const i = this._selectionService.getCurrentSelections();
|
|
916
|
-
return !i || i.length === 0 ? "" : i.map((t) =>
|
|
916
|
+
return !i || i.length === 0 ? "" : i.map((t) => As(t.range)).join(", ");
|
|
917
917
|
}
|
|
918
918
|
getSelectionRowRange() {
|
|
919
919
|
const i = this._selectionService.getCurrentSelections();
|
|
@@ -1021,7 +1021,7 @@ let vn = class extends ee {
|
|
|
1021
1021
|
return ir(i.source, i.imageSourceType);
|
|
1022
1022
|
}
|
|
1023
1023
|
};
|
|
1024
|
-
vn =
|
|
1024
|
+
vn = Ps([
|
|
1025
1025
|
an(0, de),
|
|
1026
1026
|
an(1, A(ut)),
|
|
1027
1027
|
an(2, hr)
|
|
@@ -1055,7 +1055,7 @@ const ze = "sheet.dialog.batch-save-images", ct = {
|
|
|
1055
1055
|
id: "sidebar.operation.sheet-image",
|
|
1056
1056
|
type: q.COMMAND,
|
|
1057
1057
|
handler: async (i, t) => {
|
|
1058
|
-
const e = i.get(
|
|
1058
|
+
const e = i.get(as), n = i.get(Te), r = i.get(de), s = i.get(G);
|
|
1059
1059
|
return se(r) ? (t.value === "open" ? e.open({
|
|
1060
1060
|
header: { title: n.t("sheetImage.panel.title") },
|
|
1061
1061
|
children: { label: Br },
|
|
@@ -1069,12 +1069,12 @@ const ze = "sheet.dialog.batch-save-images", ct = {
|
|
|
1069
1069
|
id: "sheet.operation.edit-sheet-image",
|
|
1070
1070
|
type: q.OPERATION,
|
|
1071
1071
|
handler: (i, t) => {
|
|
1072
|
-
const e = i.get(
|
|
1072
|
+
const e = i.get(G);
|
|
1073
1073
|
return t == null ? !1 : (e.syncExecuteCommand(Vt.id, [t]), e.executeCommand(jr.id, { value: "open" }), !0);
|
|
1074
1074
|
}
|
|
1075
|
-
},
|
|
1076
|
-
var
|
|
1077
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
1075
|
+
}, Ns = "sheets-drawing-ui.config", sr = {};
|
|
1076
|
+
var ks = Object.getOwnPropertyDescriptor, $s = (i, t, e, n) => {
|
|
1077
|
+
for (var r = n > 1 ? void 0 : n ? ks(t, e) : t, s = i.length - 1, o; s >= 0; s--)
|
|
1078
1078
|
(o = i[s]) && (r = o(r) || r);
|
|
1079
1079
|
return r;
|
|
1080
1080
|
}, ce = (i, t) => (e, n) => t(e, n, i);
|
|
@@ -1113,7 +1113,7 @@ let Nt = class extends mi {
|
|
|
1113
1113
|
_hasCropObject(t) {
|
|
1114
1114
|
const e = t.getAllObjectsByOrder();
|
|
1115
1115
|
for (const n of e)
|
|
1116
|
-
if (n instanceof
|
|
1116
|
+
if (n instanceof ws)
|
|
1117
1117
|
return !0;
|
|
1118
1118
|
return !1;
|
|
1119
1119
|
}
|
|
@@ -1128,7 +1128,7 @@ let Nt = class extends mi {
|
|
|
1128
1128
|
let r;
|
|
1129
1129
|
this.disposeWithMe(
|
|
1130
1130
|
n.createControl$.subscribe(() => {
|
|
1131
|
-
if (this._contextService.setContextValue(
|
|
1131
|
+
if (this._contextService.setContextValue(Ye, !0), this._hasCropObject(e))
|
|
1132
1132
|
return;
|
|
1133
1133
|
const o = n.getSelectedObjectMap();
|
|
1134
1134
|
if (o.size > 1) {
|
|
@@ -1147,7 +1147,7 @@ let Nt = class extends mi {
|
|
|
1147
1147
|
r == null || r.dispose();
|
|
1148
1148
|
const f = this._canvasPopManagerService.getFeatureMenu(c, l, g, h);
|
|
1149
1149
|
r = this.disposeWithMe(this._canvasPopManagerService.attachPopupToObject(a, {
|
|
1150
|
-
componentKey:
|
|
1150
|
+
componentKey: _s,
|
|
1151
1151
|
direction: "horizontal",
|
|
1152
1152
|
offset: [2, 0],
|
|
1153
1153
|
extraProps: {
|
|
@@ -1157,11 +1157,11 @@ let Nt = class extends mi {
|
|
|
1157
1157
|
})
|
|
1158
1158
|
), this.disposeWithMe(
|
|
1159
1159
|
n.clearControl$.subscribe(() => {
|
|
1160
|
-
r == null || r.dispose(), this._contextService.setContextValue(
|
|
1160
|
+
r == null || r.dispose(), this._contextService.setContextValue(Ye, !1), this._commandService.syncExecuteCommand(Vt.id, []);
|
|
1161
1161
|
})
|
|
1162
1162
|
), this.disposeWithMe(
|
|
1163
1163
|
this._contextService.contextChanged$.subscribe((o) => {
|
|
1164
|
-
o[
|
|
1164
|
+
o[Ye] === !1 && (r == null || r.dispose());
|
|
1165
1165
|
})
|
|
1166
1166
|
), this.disposeWithMe(
|
|
1167
1167
|
n.changing$.subscribe(() => {
|
|
@@ -1188,21 +1188,21 @@ let Nt = class extends mi {
|
|
|
1188
1188
|
{
|
|
1189
1189
|
label: "image-popup.crop",
|
|
1190
1190
|
index: 2,
|
|
1191
|
-
commandId:
|
|
1191
|
+
commandId: Ss.id,
|
|
1192
1192
|
commandParams: { unitId: t, subUnitId: e, drawingId: n },
|
|
1193
1193
|
disable: r === x.DRAWING_DOM
|
|
1194
1194
|
},
|
|
1195
1195
|
{
|
|
1196
1196
|
label: "image-popup.reset",
|
|
1197
1197
|
index: 3,
|
|
1198
|
-
commandId:
|
|
1198
|
+
commandId: vs.id,
|
|
1199
1199
|
commandParams: [{ unitId: t, subUnitId: e, drawingId: n }],
|
|
1200
1200
|
disable: r === x.DRAWING_DOM
|
|
1201
1201
|
}
|
|
1202
1202
|
];
|
|
1203
1203
|
}
|
|
1204
1204
|
};
|
|
1205
|
-
Nt =
|
|
1205
|
+
Nt = $s([
|
|
1206
1206
|
ce(0, A(qe)),
|
|
1207
1207
|
ce(1, A(Te)),
|
|
1208
1208
|
ce(2, ae),
|
|
@@ -1212,10 +1212,10 @@ Nt = ks([
|
|
|
1212
1212
|
ce(6, Ur),
|
|
1213
1213
|
ce(7, ur),
|
|
1214
1214
|
ce(8, hr),
|
|
1215
|
-
ce(9,
|
|
1215
|
+
ce(9, G)
|
|
1216
1216
|
], Nt);
|
|
1217
|
-
var
|
|
1218
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
1217
|
+
var xs = Object.getOwnPropertyDescriptor, Ws = (i, t, e, n) => {
|
|
1218
|
+
for (var r = n > 1 ? void 0 : n ? xs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
|
|
1219
1219
|
(o = i[s]) && (r = o(r) || r);
|
|
1220
1220
|
return r;
|
|
1221
1221
|
}, Tt = (i, t) => (e, n) => t(e, n, i);
|
|
@@ -1226,7 +1226,7 @@ let In = class extends ee {
|
|
|
1226
1226
|
this._context = t, this._hoverManagerService = e, this._selectionsService = n, this._drawingRenderService = r, this._sheetSkeletonManagerService = s, this._initHover(), this._initImageClick();
|
|
1227
1227
|
}
|
|
1228
1228
|
_initHover() {
|
|
1229
|
-
this.disposeWithMe(this._hoverManagerService.currentRichTextNoDistinct$.pipe(
|
|
1229
|
+
this.disposeWithMe(this._hoverManagerService.currentRichTextNoDistinct$.pipe(Rs(33)).subscribe((t) => {
|
|
1230
1230
|
var n, r;
|
|
1231
1231
|
let e = [];
|
|
1232
1232
|
t !== null && (e = this._selectionsService.getWorkbookSelections(this._context.unitId).getCurrentSelections()), e.length > 0 && (t == null ? void 0 : t.unitId) === this._context.unitId && (t != null && t.drawing) && e.length === 1 && ((n = e[0].primary) == null ? void 0 : n.actualRow) === t.row && ((r = e[0].primary) == null ? void 0 : r.actualColumn) === t.col ? (this._isSetCursor = !0, this._context.scene.setCursor(ei.ZOOM_IN)) : this._isSetCursor && (this._isSetCursor = !1, this._context.scene.resetCursor());
|
|
@@ -1243,14 +1243,14 @@ let In = class extends ee {
|
|
|
1243
1243
|
}));
|
|
1244
1244
|
}
|
|
1245
1245
|
};
|
|
1246
|
-
In =
|
|
1246
|
+
In = Ws([
|
|
1247
1247
|
Tt(1, A(ri)),
|
|
1248
1248
|
Tt(2, A(ut)),
|
|
1249
1249
|
Tt(3, A(Ar)),
|
|
1250
1250
|
Tt(4, A(X))
|
|
1251
1251
|
], In);
|
|
1252
|
-
var
|
|
1253
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
1252
|
+
var Bs = Object.getOwnPropertyDescriptor, js = (i, t, e, n) => {
|
|
1253
|
+
for (var r = n > 1 ? void 0 : n ? Bs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
|
|
1254
1254
|
(o = i[s]) && (r = o(r) || r);
|
|
1255
1255
|
return r;
|
|
1256
1256
|
}, Ot = (i, t) => (e, n) => t(e, n, i);
|
|
@@ -1274,14 +1274,14 @@ let Cn = class extends ee {
|
|
|
1274
1274
|
this._drawingManagerService.registerDrawingData(this._context.unitId, this._sheetDrawingService.getDrawingDataForUnit(this._context.unitId)), this._drawingManagerService.initializeNotification(this._context.unitId);
|
|
1275
1275
|
}
|
|
1276
1276
|
};
|
|
1277
|
-
Cn =
|
|
1277
|
+
Cn = js([
|
|
1278
1278
|
Ot(1, oe),
|
|
1279
1279
|
Ot(2, ae),
|
|
1280
1280
|
Ot(3, A(Je)),
|
|
1281
1281
|
Ot(4, A(X))
|
|
1282
1282
|
], Cn);
|
|
1283
|
-
var
|
|
1284
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
1283
|
+
var Fs = Object.getOwnPropertyDescriptor, Ls = (i, t, e, n) => {
|
|
1284
|
+
for (var r = n > 1 ? void 0 : n ? Fs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
|
|
1285
1285
|
(o = i[s]) && (r = o(r) || r);
|
|
1286
1286
|
return r;
|
|
1287
1287
|
}, We = (i, t) => (e, n) => t(e, n, i);
|
|
@@ -1313,16 +1313,16 @@ let kt = class extends ee {
|
|
|
1313
1313
|
this.disposeWithMe(this._editorBridgeService.visible$.subscribe((i) => {
|
|
1314
1314
|
i.visible ? i.visible && (this._drawingManagerService.removeDrawingDataForUnit(ot), this._docDrawingController.loadDrawingDataForUnit(ot), this._drawingManagerService.initializeNotification(ot)) : this._drawingManagerService.removeDrawingDataForUnit(ot);
|
|
1315
1315
|
})), this.disposeWithMe(this._commandService.onCommandExecuted((i) => {
|
|
1316
|
-
i.id ===
|
|
1316
|
+
i.id === ts.id && i.params.unitId === Ve && (this._drawingManagerService.removeDrawingDataForUnit(Ve), this._docDrawingController.loadDrawingDataForUnit(Ve), this._drawingManagerService.initializeNotification(Ve));
|
|
1317
1317
|
}));
|
|
1318
1318
|
}
|
|
1319
1319
|
_initCellContentInterceptor() {
|
|
1320
1320
|
this.disposeWithMe(
|
|
1321
1321
|
this._sheetInterceptorService.intercept(
|
|
1322
|
-
|
|
1322
|
+
ki.CELL_CONTENT,
|
|
1323
1323
|
{
|
|
1324
1324
|
effect: fi.Style,
|
|
1325
|
-
priority:
|
|
1325
|
+
priority: $i.CELL_IMAGE,
|
|
1326
1326
|
handler: (i, t, e) => {
|
|
1327
1327
|
var n;
|
|
1328
1328
|
return i != null && i.p && ((n = i.p.drawingsOrder) != null && n.length) && (i === t.rawData && (i = { ...t.rawData }), i.interceptorStyle || (i.interceptorStyle = {}), i.interceptorStyle.tr = { a: 0 }, Lr(this._injector, { unitId: t.unitId, subUnitId: t.subUnitId, row: t.row, col: t.col }, i)), e(i);
|
|
@@ -1332,16 +1332,16 @@ let kt = class extends ee {
|
|
|
1332
1332
|
);
|
|
1333
1333
|
}
|
|
1334
1334
|
};
|
|
1335
|
-
kt =
|
|
1336
|
-
We(0,
|
|
1335
|
+
kt = Ls([
|
|
1336
|
+
We(0, G),
|
|
1337
1337
|
We(1, A(Ht)),
|
|
1338
1338
|
We(2, A(qe)),
|
|
1339
1339
|
We(3, ae),
|
|
1340
|
-
We(4, A(
|
|
1340
|
+
We(4, A(fs)),
|
|
1341
1341
|
We(5, A(ii))
|
|
1342
1342
|
], kt);
|
|
1343
|
-
var
|
|
1344
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
1343
|
+
var Hs = Object.getOwnPropertyDescriptor, Vs = (i, t, e, n) => {
|
|
1344
|
+
for (var r = n > 1 ? void 0 : n ? Hs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
|
|
1345
1345
|
(o = i[s]) && (r = o(r) || r);
|
|
1346
1346
|
return r;
|
|
1347
1347
|
}, or = (i, t) => (e, n) => t(e, n, i);
|
|
@@ -1362,16 +1362,16 @@ let $t = class extends ee {
|
|
|
1362
1362
|
);
|
|
1363
1363
|
}
|
|
1364
1364
|
};
|
|
1365
|
-
$t =
|
|
1365
|
+
$t = Vs([
|
|
1366
1366
|
or(0, A(si)),
|
|
1367
1367
|
or(1, A(qe))
|
|
1368
1368
|
], $t);
|
|
1369
|
-
var
|
|
1370
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
1369
|
+
var Gs = Object.getOwnPropertyDescriptor, Ys = (i, t, e, n) => {
|
|
1370
|
+
for (var r = n > 1 ? void 0 : n ? Gs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
|
|
1371
1371
|
(o = i[s]) && (r = o(r) || r);
|
|
1372
1372
|
return r;
|
|
1373
1373
|
}, nt = (i, t) => (e, n) => t(e, n, i);
|
|
1374
|
-
const
|
|
1374
|
+
const Xs = [
|
|
1375
1375
|
ot,
|
|
1376
1376
|
wi,
|
|
1377
1377
|
Ve
|
|
@@ -1397,12 +1397,12 @@ let xt = class extends ee {
|
|
|
1397
1397
|
this.disposeWithMe(
|
|
1398
1398
|
this._commandService.beforeCommandExecuted((i) => {
|
|
1399
1399
|
var t, e;
|
|
1400
|
-
if (i.id ===
|
|
1400
|
+
if (i.id === ns.id) {
|
|
1401
1401
|
const n = i.params, { doc: r } = n, s = this._univerInstanceService.getCurrentUnitOfType(k.UNIVER_DOC);
|
|
1402
1402
|
if (s == null || !Object.keys((t = r.drawings) != null ? t : {}).length)
|
|
1403
1403
|
return;
|
|
1404
1404
|
const o = s.getUnitId();
|
|
1405
|
-
if (
|
|
1405
|
+
if (Xs.includes(o)) {
|
|
1406
1406
|
if (o !== Ve) {
|
|
1407
1407
|
const a = () => {
|
|
1408
1408
|
this._dialogService.close("sheet-cell-image-copy-paste"), this._commandService.syncExecuteCommand(Nn.id, {
|
|
@@ -1439,31 +1439,31 @@ let xt = class extends ee {
|
|
|
1439
1439
|
}
|
|
1440
1440
|
};
|
|
1441
1441
|
xt = Ys([
|
|
1442
|
-
nt(0,
|
|
1442
|
+
nt(0, G),
|
|
1443
1443
|
nt(1, de),
|
|
1444
1444
|
nt(2, bn),
|
|
1445
1445
|
nt(3, Q),
|
|
1446
1446
|
nt(4, A(Te))
|
|
1447
1447
|
], xt);
|
|
1448
|
-
var
|
|
1449
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
1448
|
+
var zs = Object.getOwnPropertyDescriptor, Ks = (i, t, e, n) => {
|
|
1449
|
+
for (var r = n > 1 ? void 0 : n ? zs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
|
|
1450
1450
|
(o = i[s]) && (r = o(r) || r);
|
|
1451
1451
|
return r;
|
|
1452
1452
|
}, rt = (i, t) => (e, n) => t(e, n, i);
|
|
1453
1453
|
const Hr = "image/png";
|
|
1454
|
-
function
|
|
1454
|
+
function Js(i) {
|
|
1455
1455
|
const t = i.split(","), e = atob(t[1]), n = e.length, r = new Uint8Array(n);
|
|
1456
1456
|
for (let s = 0; s < n; s++)
|
|
1457
1457
|
r[s] = e.charCodeAt(s);
|
|
1458
1458
|
return new Blob([r], { type: Hr });
|
|
1459
1459
|
}
|
|
1460
|
-
function
|
|
1461
|
-
const t = new ClipboardItem({ [Hr]:
|
|
1460
|
+
function Zs(i) {
|
|
1461
|
+
const t = new ClipboardItem({ [Hr]: Js(i) });
|
|
1462
1462
|
navigator.clipboard.write([t]).catch((e) => {
|
|
1463
1463
|
console.error("Could not copy image using clipboard API: ", e);
|
|
1464
1464
|
});
|
|
1465
1465
|
}
|
|
1466
|
-
function
|
|
1466
|
+
function qs() {
|
|
1467
1467
|
function i() {
|
|
1468
1468
|
const n = document.createElement("input");
|
|
1469
1469
|
return n.style.position = "absolute", n.style.height = "1px", n.style.width = "1px", n.style.opacity = "0", n;
|
|
@@ -1507,8 +1507,8 @@ let Wt = class extends ee {
|
|
|
1507
1507
|
this._commandService.executeCommand(ht.id, d);
|
|
1508
1508
|
}
|
|
1509
1509
|
setTimeout(() => {
|
|
1510
|
-
const d =
|
|
1511
|
-
o.drawingType === x.DRAWING_IMAGE && o.imageSourceType ===
|
|
1510
|
+
const d = qs();
|
|
1511
|
+
o.drawingType === x.DRAWING_IMAGE && o.imageSourceType === is.BASE64 ? Zs(o.source) : this._clipboardInterfaceService.writeText(""), d();
|
|
1512
1512
|
}, 200);
|
|
1513
1513
|
const a = {
|
|
1514
1514
|
unitId: o.unitId,
|
|
@@ -1723,15 +1723,15 @@ let Wt = class extends ee {
|
|
|
1723
1723
|
});
|
|
1724
1724
|
}
|
|
1725
1725
|
};
|
|
1726
|
-
Wt =
|
|
1726
|
+
Wt = Ks([
|
|
1727
1727
|
rt(0, ci),
|
|
1728
1728
|
rt(1, Q),
|
|
1729
1729
|
rt(2, ae),
|
|
1730
|
-
rt(3,
|
|
1731
|
-
rt(4,
|
|
1730
|
+
rt(3, cs),
|
|
1731
|
+
rt(4, G)
|
|
1732
1732
|
], Wt);
|
|
1733
|
-
var
|
|
1734
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
1733
|
+
var Qs = Object.getOwnPropertyDescriptor, eo = (i, t, e, n) => {
|
|
1734
|
+
for (var r = n > 1 ? void 0 : n ? Qs(t, e) : t, s = i.length - 1, o; s >= 0; s--)
|
|
1735
1735
|
(o = i[s]) && (r = o(r) || r);
|
|
1736
1736
|
return r;
|
|
1737
1737
|
}, it = (i, t) => (e, n) => t(e, n, i);
|
|
@@ -1903,19 +1903,19 @@ let Bt = class extends ee {
|
|
|
1903
1903
|
);
|
|
1904
1904
|
}
|
|
1905
1905
|
};
|
|
1906
|
-
Bt =
|
|
1906
|
+
Bt = eo([
|
|
1907
1907
|
it(0, ae),
|
|
1908
1908
|
it(1, Q),
|
|
1909
1909
|
it(2, _i),
|
|
1910
1910
|
it(3, de),
|
|
1911
1911
|
it(4, A(Si))
|
|
1912
1912
|
], Bt);
|
|
1913
|
-
var
|
|
1914
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
1913
|
+
var to = Object.getOwnPropertyDescriptor, no = (i, t, e, n) => {
|
|
1914
|
+
for (var r = n > 1 ? void 0 : n ? to(t, e) : t, s = i.length - 1, o; s >= 0; s--)
|
|
1915
1915
|
(o = i[s]) && (r = o(r) || r);
|
|
1916
1916
|
return r;
|
|
1917
1917
|
}, be = (i, t) => (e, n) => t(e, n, i);
|
|
1918
|
-
const
|
|
1918
|
+
const ro = "univer-sheet-float-dom-";
|
|
1919
1919
|
function Vr(i, t, e, n, r, s = !1) {
|
|
1920
1920
|
const { scaleX: o, scaleY: a } = t.getAncestorScale(), d = t.getViewport(cr.VIEW_MAIN), u = n.getFreeze(), { startColumn: c, startRow: l, xSplit: g, ySplit: h } = u, m = {
|
|
1921
1921
|
left: !0,
|
|
@@ -1933,7 +1933,7 @@ function Vr(i, t, e, n, r, s = !1) {
|
|
|
1933
1933
|
top: s ? 0 : E,
|
|
1934
1934
|
left: s ? 0 : R
|
|
1935
1935
|
};
|
|
1936
|
-
_ && (
|
|
1936
|
+
_ && (Ge.isDefine(T.top) && (T.top = _.top), Ge.isDefine(T.left) && (T.left = _.left)), y === "HORIZONTAL" && (C = 0), y === "VERTICAL" && (v = 0);
|
|
1937
1937
|
let M = 0, b = 0;
|
|
1938
1938
|
const N = e.rowStartY(l - h) + E, F = e.colStartX(c - g) + R, te = e.rowStartY(l) + E, z = e.colStartX(c) + R;
|
|
1939
1939
|
if (g === 0)
|
|
@@ -1942,18 +1942,18 @@ function Vr(i, t, e, n, r, s = !1) {
|
|
|
1942
1942
|
const K = f - (F - R), W = p - (F - R);
|
|
1943
1943
|
p < z ? (M = K * o, b = W * o) : f <= z && p >= z ? (M = K * o, b = Math.max(D, (p - v) * o)) : f > z && (m.left = !1, M = Math.max((f - v) * o, D), b = Math.max((p - v) * o, D));
|
|
1944
1944
|
}
|
|
1945
|
-
let V = 0,
|
|
1945
|
+
let V = 0, Y = 0;
|
|
1946
1946
|
if (h === 0)
|
|
1947
|
-
m.top = !1, V = (w - C) * a,
|
|
1947
|
+
m.top = !1, V = (w - C) * a, Y = (S - C) * a;
|
|
1948
1948
|
else {
|
|
1949
1949
|
const K = w - (N - E), W = S - (N - E);
|
|
1950
|
-
S < te ? (V = K * a,
|
|
1950
|
+
S < te ? (V = K * a, Y = W * a) : w <= te && S >= te ? (V = K * a, Y = Math.max(I, (S - C) * a)) : w > te && (m.top = !1, V = Math.max((w - C) * a, I), Y = Math.max((S - C) * a, I));
|
|
1951
1951
|
}
|
|
1952
|
-
return M = Math.max(M, T.left), V = Math.max(V, T.top), b = Math.max(b, T.left),
|
|
1952
|
+
return M = Math.max(M, T.left), V = Math.max(V, T.top), b = Math.max(b, T.left), Y = Math.max(Y, T.top), {
|
|
1953
1953
|
left: M,
|
|
1954
1954
|
right: b,
|
|
1955
1955
|
top: V,
|
|
1956
|
-
bottom:
|
|
1956
|
+
bottom: Y,
|
|
1957
1957
|
absolute: m
|
|
1958
1958
|
};
|
|
1959
1959
|
}
|
|
@@ -1991,7 +1991,7 @@ let lt = class extends ee {
|
|
|
1991
1991
|
this._renderManagerService = t, this._univerInstanceService = e, this._commandService = n, this._drawingManagerService = r, this._canvasFloatDomService = s, this._sheetDrawingService = o, this._lifecycleService = a, this._drawingAddListener(), this._featureUpdateListener(), this._deleteListener(), this._bindScrollEvent();
|
|
1992
1992
|
}
|
|
1993
1993
|
_bindScrollEvent() {
|
|
1994
|
-
this._lifecycleService.lifecycle$.pipe(
|
|
1994
|
+
this._lifecycleService.lifecycle$.pipe(Ds((t) => t === Ii.Rendered), bs(1)).subscribe(() => {
|
|
1995
1995
|
this._scrollUpdateListener();
|
|
1996
1996
|
});
|
|
1997
1997
|
}
|
|
@@ -2055,7 +2055,7 @@ let lt = class extends ee {
|
|
|
2055
2055
|
}
|
|
2056
2056
|
const N = new $e(E, M);
|
|
2057
2057
|
b && N.setObjectType(An.CHART), f.addObject(N, qt), a.allowTransform !== !1 && f.attachTransformerTo(N);
|
|
2058
|
-
const F = new yt(), te = me(N, m.renderUnit.scene, c.skeleton, o.worksheet), z = new je(te), V = `${
|
|
2058
|
+
const F = new yt(), te = me(N, m.renderUnit.scene, c.skeleton, o.worksheet), z = new je(te), V = `${ro}${He(6)}`, Y = {
|
|
2059
2059
|
dispose: F,
|
|
2060
2060
|
rect: N,
|
|
2061
2061
|
position$: z,
|
|
@@ -2092,7 +2092,7 @@ let lt = class extends ee {
|
|
|
2092
2092
|
});
|
|
2093
2093
|
F.add(() => {
|
|
2094
2094
|
this._canvasFloatDomService.removeFloatDom(s);
|
|
2095
|
-
}), Z && F.add(Z), this._domLayerInfoMap.set(s,
|
|
2095
|
+
}), Z && F.add(Z), this._domLayerInfoMap.set(s, Y);
|
|
2096
2096
|
});
|
|
2097
2097
|
})
|
|
2098
2098
|
), this.disposeWithMe(
|
|
@@ -2142,10 +2142,10 @@ let lt = class extends ee {
|
|
|
2142
2142
|
Array.from(this._domLayerInfoMap.values()).filter((o) => o.unitId === r).map((o) => o.subUnitId).forEach((o) => {
|
|
2143
2143
|
t(r, o);
|
|
2144
2144
|
});
|
|
2145
|
-
} else if (e.id ===
|
|
2145
|
+
} else if (e.id === xi.id) {
|
|
2146
2146
|
const { unitId: n, subUnitId: r } = e.params;
|
|
2147
2147
|
t(n, r);
|
|
2148
|
-
} else if (e.id ===
|
|
2148
|
+
} else if (e.id === Wi.id) {
|
|
2149
2149
|
const { unitId: n, subUnitId: r } = e.params;
|
|
2150
2150
|
t(n, r);
|
|
2151
2151
|
}
|
|
@@ -2314,8 +2314,8 @@ let lt = class extends ee {
|
|
|
2314
2314
|
const z = te.getWorksheetSkeleton(E);
|
|
2315
2315
|
if (!z)
|
|
2316
2316
|
return;
|
|
2317
|
-
const { transform: V, drawingType:
|
|
2318
|
-
if (
|
|
2317
|
+
const { transform: V, drawingType: Y, data: Z } = b;
|
|
2318
|
+
if (Y !== x.DRAWING_DOM && Y !== x.DRAWING_CHART)
|
|
2319
2319
|
return;
|
|
2320
2320
|
const K = this._getSceneAndTransformerByDrawingSearch(R);
|
|
2321
2321
|
if (K == null)
|
|
@@ -2335,7 +2335,7 @@ let lt = class extends ee {
|
|
|
2335
2335
|
width: wt,
|
|
2336
2336
|
height: _t,
|
|
2337
2337
|
zIndex: this._drawingManagerService.getDrawingOrder(R, E).length - 1
|
|
2338
|
-
}, Pe =
|
|
2338
|
+
}, Pe = Y === x.DRAWING_CHART;
|
|
2339
2339
|
if (Pe) {
|
|
2340
2340
|
const $ = Z ? Z.backgroundColor : "white";
|
|
2341
2341
|
ne.fill = $, ne.rotateEnabled = !1, Z && Z.border && (ne.stroke = Z.border), ne.paintFirst = "stroke", ne.strokeWidth = 1, ne.borderEnabled = !1, ne.radius = 8;
|
|
@@ -2480,10 +2480,10 @@ let lt = class extends ee {
|
|
|
2480
2480
|
const { transform: te, data: z } = T, V = this._getSceneAndTransformerByDrawingSearch(_);
|
|
2481
2481
|
if (V == null)
|
|
2482
2482
|
return;
|
|
2483
|
-
const { scene:
|
|
2483
|
+
const { scene: Y, canvas: Z } = V;
|
|
2484
2484
|
if (te == null || b !== y)
|
|
2485
2485
|
return;
|
|
2486
|
-
const { left: K, top: W, width: Oe, height: ft, angle: pt, flipX: wt, flipY: _t, skewX: Jt, skewY: Zt } = te, St = De({ unitId: _, subUnitId: y, drawingId: R }), vt =
|
|
2486
|
+
const { left: K, top: W, width: Oe, height: ft, angle: pt, flipX: wt, flipY: _t, skewX: Jt, skewY: Zt } = te, St = De({ unitId: _, subUnitId: y, drawingId: R }), vt = Y.getObject(St);
|
|
2487
2487
|
if (vt != null) {
|
|
2488
2488
|
vt.transformByState({ left: K, top: W, width: Oe, height: ft, angle: pt, flipX: wt, flipY: _t, skewX: Jt, skewY: Zt });
|
|
2489
2489
|
return;
|
|
@@ -2506,8 +2506,8 @@ let lt = class extends ee {
|
|
|
2506
2506
|
height: Ue.height,
|
|
2507
2507
|
zIndex: this._drawingManagerService.getDrawingOrder(_, y).length - 1
|
|
2508
2508
|
}, le = new $e(St, It);
|
|
2509
|
-
|
|
2510
|
-
const ne = new yt(), Pe =
|
|
2509
|
+
Y.addObject(le, qt), T.allowTransform !== !1 && Y.attachTransformerTo(le);
|
|
2510
|
+
const ne = new yt(), Pe = Y.getMainViewport(), ue = {
|
|
2511
2511
|
top: 0,
|
|
2512
2512
|
//viewMain.top,
|
|
2513
2513
|
left: Pe.left,
|
|
@@ -2616,7 +2616,7 @@ let lt = class extends ee {
|
|
|
2616
2616
|
c();
|
|
2617
2617
|
return;
|
|
2618
2618
|
}
|
|
2619
|
-
(
|
|
2619
|
+
(Bi.indexOf(p.id) > -1 || p.id === di.id || p.id === $n.id) && c();
|
|
2620
2620
|
}));
|
|
2621
2621
|
const g = (p, w) => {
|
|
2622
2622
|
r = p, s = w, c();
|
|
@@ -2660,12 +2660,12 @@ let lt = class extends ee {
|
|
|
2660
2660
|
};
|
|
2661
2661
|
}
|
|
2662
2662
|
};
|
|
2663
|
-
lt =
|
|
2663
|
+
lt = no([
|
|
2664
2664
|
be(0, A(Q)),
|
|
2665
2665
|
be(1, de),
|
|
2666
|
-
be(2, A(
|
|
2666
|
+
be(2, A(G)),
|
|
2667
2667
|
be(3, ae),
|
|
2668
|
-
be(4, A(
|
|
2668
|
+
be(4, A(ds)),
|
|
2669
2669
|
be(5, oe),
|
|
2670
2670
|
be(6, A(vi))
|
|
2671
2671
|
], lt);
|
|
@@ -2715,7 +2715,7 @@ function Pt(i, t) {
|
|
|
2715
2715
|
const e = Number.parseFloat(i);
|
|
2716
2716
|
return t * e / 100;
|
|
2717
2717
|
}
|
|
2718
|
-
const
|
|
2718
|
+
const io = (i) => {
|
|
2719
2719
|
const { floatDomInfos: t, scene: e, skeleton: n, worksheet: r } = i, s = Fe(() => t.map((o) => {
|
|
2720
2720
|
const { width: a, height: d, angle: u, left: c, top: l } = o.transform, g = Vr(
|
|
2721
2721
|
{
|
|
@@ -2756,10 +2756,10 @@ const ro = (i) => {
|
|
|
2756
2756
|
};
|
|
2757
2757
|
return [o.drawingId, p];
|
|
2758
2758
|
}), [t, e, n, r]);
|
|
2759
|
-
return /* @__PURE__ */ L("div", { style: { position: "absolute", top: 0, left: 0 }, children: s.map(([o, a]) => /* @__PURE__ */ L(
|
|
2759
|
+
return /* @__PURE__ */ L("div", { style: { position: "absolute", top: 0, left: 0 }, children: s.map(([o, a]) => /* @__PURE__ */ L(ls, { layer: a, id: o, position: a.position }, o)) });
|
|
2760
2760
|
};
|
|
2761
|
-
var
|
|
2762
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
2761
|
+
var so = Object.getOwnPropertyDescriptor, oo = (i, t, e, n) => {
|
|
2762
|
+
for (var r = n > 1 ? void 0 : n ? so(t, e) : t, s = i.length - 1, o; s >= 0; s--)
|
|
2763
2763
|
(o = i[s]) && (r = o(r) || r);
|
|
2764
2764
|
return r;
|
|
2765
2765
|
}, Me = (i, t) => (e, n) => t(e, n, i);
|
|
@@ -2797,7 +2797,7 @@ let jt = class extends ee {
|
|
|
2797
2797
|
return e(i);
|
|
2798
2798
|
const { scaleX: u, scaleY: c } = s.scene, l = i ? { ...i } : { startColumn: 0, endColumn: 0, endRow: 0, startRow: 0 }, g = d.order.map((h) => d.data[h]);
|
|
2799
2799
|
return g.length ? (g.forEach((h) => {
|
|
2800
|
-
if (!h.groupId && h.transform &&
|
|
2800
|
+
if (!h.groupId && h.transform && Ge.isDefine(h.transform.left) && Ge.isDefine(h.transform.top) && Ge.isDefine(h.transform.width) && Ge.isDefine(h.transform.height)) {
|
|
2801
2801
|
const m = o.skeleton.getCellIndexByOffset(h.transform.left, h.transform.top, u, c, { x: 0, y: 0 }), f = o.skeleton.getCellIndexByOffset(h.transform.left + h.transform.width, h.transform.top + h.transform.height, u, c, { x: 0, y: 0 });
|
|
2802
2802
|
m.column < l.startColumn && (l.startColumn = m.column), m.row < l.startRow && (l.startRow = m.row), l.endRow < f.row && (l.endRow = f.row), l.endColumn < f.column && (l.endColumn = f.column);
|
|
2803
2803
|
}
|
|
@@ -2830,12 +2830,12 @@ let jt = class extends ee {
|
|
|
2830
2830
|
};
|
|
2831
2831
|
}
|
|
2832
2832
|
return null;
|
|
2833
|
-
}).filter(Boolean), d =
|
|
2834
|
-
return
|
|
2833
|
+
}).filter(Boolean), d = us(io, this._injector);
|
|
2834
|
+
return Ki(
|
|
2835
2835
|
/* @__PURE__ */ L(d, { floatDomInfos: a, scene: t.scene, skeleton: t.skeleton, worksheet: t.worksheet }),
|
|
2836
2836
|
t.root
|
|
2837
2837
|
), i == null || i.add(() => {
|
|
2838
|
-
|
|
2838
|
+
Ji(t.root);
|
|
2839
2839
|
}), e(i);
|
|
2840
2840
|
}
|
|
2841
2841
|
}
|
|
@@ -2844,7 +2844,7 @@ let jt = class extends ee {
|
|
|
2844
2844
|
);
|
|
2845
2845
|
}
|
|
2846
2846
|
};
|
|
2847
|
-
jt =
|
|
2847
|
+
jt = oo([
|
|
2848
2848
|
Me(0, A(li)),
|
|
2849
2849
|
Me(1, A(Ar)),
|
|
2850
2850
|
Me(2, ae),
|
|
@@ -2853,12 +2853,12 @@ jt = so([
|
|
|
2853
2853
|
Me(5, A(Pr)),
|
|
2854
2854
|
Me(6, A(qe))
|
|
2855
2855
|
], jt);
|
|
2856
|
-
var
|
|
2857
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
2856
|
+
var ao = Object.getOwnPropertyDescriptor, co = (i, t, e, n) => {
|
|
2857
|
+
for (var r = n > 1 ? void 0 : n ? ao(t, e) : t, s = i.length - 1, o; s >= 0; s--)
|
|
2858
2858
|
(o = i[s]) && (r = o(r) || r);
|
|
2859
2859
|
return r;
|
|
2860
2860
|
}, _e = (i, t) => (e, n) => t(e, n, i);
|
|
2861
|
-
const
|
|
2861
|
+
const lo = [
|
|
2862
2862
|
mr.id,
|
|
2863
2863
|
fr.id,
|
|
2864
2864
|
pr.id,
|
|
@@ -2878,14 +2878,14 @@ const co = [
|
|
|
2878
2878
|
Er.id,
|
|
2879
2879
|
Tr.id,
|
|
2880
2880
|
Or.id
|
|
2881
|
-
],
|
|
2882
|
-
Bi.id,
|
|
2881
|
+
], uo = [
|
|
2883
2882
|
ji.id,
|
|
2884
2883
|
Fi.id,
|
|
2885
2884
|
Li.id,
|
|
2886
2885
|
Hi.id,
|
|
2887
|
-
gr.id,
|
|
2888
2886
|
Vi.id,
|
|
2887
|
+
gr.id,
|
|
2888
|
+
Gi.id,
|
|
2889
2889
|
Yi.id
|
|
2890
2890
|
];
|
|
2891
2891
|
let Rn = class extends ee {
|
|
@@ -2897,7 +2897,7 @@ let Rn = class extends ee {
|
|
|
2897
2897
|
this._sheetInterceptorService.interceptAfterCommand({
|
|
2898
2898
|
/* eslint-disable-next-line complexity */
|
|
2899
2899
|
getMutations: (i) => {
|
|
2900
|
-
if (!
|
|
2900
|
+
if (!lo.includes(i.id))
|
|
2901
2901
|
return { redos: [], undos: [] };
|
|
2902
2902
|
if (i.params == null)
|
|
2903
2903
|
return { redos: [], undos: [] };
|
|
@@ -3537,7 +3537,7 @@ let Rn = class extends ee {
|
|
|
3537
3537
|
// but the skeleton changes like other render modules. These two signals are not equivalent.
|
|
3538
3538
|
// As a temp solution, I subscribed to activate$ here.
|
|
3539
3539
|
this._commandService.onCommandExecuted((i) => {
|
|
3540
|
-
if (i.id ===
|
|
3540
|
+
if (i.id === Xi.id) {
|
|
3541
3541
|
const { unitId: t, subUnitId: e } = i.params;
|
|
3542
3542
|
this._updateDrawings(t, e);
|
|
3543
3543
|
}
|
|
@@ -3588,7 +3588,7 @@ let Rn = class extends ee {
|
|
|
3588
3588
|
_sheetRefreshListener() {
|
|
3589
3589
|
this.disposeWithMe(
|
|
3590
3590
|
this._commandService.onCommandExecuted((i) => {
|
|
3591
|
-
|
|
3591
|
+
uo.includes(i.id) && requestIdleCallback(() => {
|
|
3592
3592
|
const t = i.params, e = se(this._univerInstanceService, t);
|
|
3593
3593
|
if (!e) return;
|
|
3594
3594
|
const { unitId: n, subUnitId: r, worksheet: s } = e;
|
|
@@ -3641,9 +3641,9 @@ let Rn = class extends ee {
|
|
|
3641
3641
|
}), r.length !== 0 && (this._drawingManagerService.refreshTransform(r), this._commandService.syncExecuteCommand(H.id, [i]));
|
|
3642
3642
|
}
|
|
3643
3643
|
};
|
|
3644
|
-
Rn =
|
|
3644
|
+
Rn = co([
|
|
3645
3645
|
_e(1, Q),
|
|
3646
|
-
_e(2,
|
|
3646
|
+
_e(2, G),
|
|
3647
3647
|
_e(3, Je),
|
|
3648
3648
|
_e(4, A(X)),
|
|
3649
3649
|
_e(5, A(Ht)),
|
|
@@ -3651,7 +3651,7 @@ Rn = ao([
|
|
|
3651
3651
|
_e(7, ae),
|
|
3652
3652
|
_e(8, de)
|
|
3653
3653
|
], Rn);
|
|
3654
|
-
function
|
|
3654
|
+
function ho() {
|
|
3655
3655
|
const i = Ie(Te), t = Ie(bn), e = Ie(yn), [n, r] = Ee([ye.CELL_ADDRESS]), [s, o] = Ee(!1), [a, d] = Ee(null), u = Fe(() => e.getCellImagesInSelection(), [e]), c = Fe(() => e.getDataColumns(), [e]), l = Fe(() => e.getSelectionRowRange(), [e]), g = c.length > 0, h = Fe(() => c.map((C) => ({
|
|
3656
3656
|
label: C.label,
|
|
3657
3657
|
value: String(C.index)
|
|
@@ -3692,12 +3692,12 @@ function uo() {
|
|
|
3692
3692
|
}, [e, u, n, m, t, i]), v = n.includes(ye.COLUMN_VALUE);
|
|
3693
3693
|
return /* @__PURE__ */ Xe("div", { className: "univer-flex univer-flex-col", children: [
|
|
3694
3694
|
/* @__PURE__ */ L(en, { label: i.t("sheetImage.save.imageCount"), children: /* @__PURE__ */ L("div", { className: "univer-text-sm univer-text-gray-600", children: u.length }) }),
|
|
3695
|
-
/* @__PURE__ */ L(en, { label: i.t("sheetImage.save.fileNameConfig"), children: /* @__PURE__ */ Xe(
|
|
3696
|
-
/* @__PURE__ */ L(
|
|
3697
|
-
g && /* @__PURE__ */ L(
|
|
3695
|
+
/* @__PURE__ */ L(en, { label: i.t("sheetImage.save.fileNameConfig"), children: /* @__PURE__ */ Xe(Zi, { value: n, onChange: w, direction: "vertical", children: [
|
|
3696
|
+
/* @__PURE__ */ L(Gn, { value: ye.CELL_ADDRESS, disabled: !g, children: i.t("sheetImage.save.useRowCol") }),
|
|
3697
|
+
g && /* @__PURE__ */ L(Gn, { value: ye.COLUMN_VALUE, children: i.t("sheetImage.save.useColumnValue") })
|
|
3698
3698
|
] }) }),
|
|
3699
3699
|
v && /* @__PURE__ */ L(en, { label: i.t("sheetImage.save.selectColumn"), children: /* @__PURE__ */ L(
|
|
3700
|
-
|
|
3700
|
+
qi,
|
|
3701
3701
|
{
|
|
3702
3702
|
value: m,
|
|
3703
3703
|
options: h,
|
|
@@ -3710,9 +3710,9 @@ function uo() {
|
|
|
3710
3710
|
{
|
|
3711
3711
|
className: "univer-flex univer-justify-end univer-gap-2 univer-border-t univer-border-gray-200 univer-pt-3",
|
|
3712
3712
|
children: [
|
|
3713
|
-
/* @__PURE__ */ L(
|
|
3713
|
+
/* @__PURE__ */ L(Yn, { onClick: I, disabled: s, children: i.t("sheetImage.save.cancel") }),
|
|
3714
3714
|
/* @__PURE__ */ L(
|
|
3715
|
-
|
|
3715
|
+
Yn,
|
|
3716
3716
|
{
|
|
3717
3717
|
variant: "primary",
|
|
3718
3718
|
onClick: D,
|
|
@@ -3725,9 +3725,9 @@ function uo() {
|
|
|
3725
3725
|
)
|
|
3726
3726
|
] });
|
|
3727
3727
|
}
|
|
3728
|
-
const
|
|
3728
|
+
const go = (i) => {
|
|
3729
3729
|
var S;
|
|
3730
|
-
const t = Ie(
|
|
3730
|
+
const t = Ie(G), e = Ie(Te), n = Ie(ae), r = Ie(Q), { drawings: s } = i, o = s[0];
|
|
3731
3731
|
if (o == null)
|
|
3732
3732
|
return;
|
|
3733
3733
|
const { unitId: a } = o, d = r.getRenderById(a), u = d == null ? void 0 : d.scene;
|
|
@@ -3788,7 +3788,7 @@ const ho = (i) => {
|
|
|
3788
3788
|
return /* @__PURE__ */ Xe(
|
|
3789
3789
|
"div",
|
|
3790
3790
|
{
|
|
3791
|
-
className:
|
|
3791
|
+
className: Qi("univer-grid univer-gap-2 univer-py-2 univer-text-gray-400", {
|
|
3792
3792
|
"univer-hidden": !l
|
|
3793
3793
|
}),
|
|
3794
3794
|
children: [
|
|
@@ -3799,7 +3799,7 @@ const ho = (i) => {
|
|
|
3799
3799
|
children: /* @__PURE__ */ L("div", { children: e.t("drawing-anchor.title") })
|
|
3800
3800
|
}
|
|
3801
3801
|
),
|
|
3802
|
-
/* @__PURE__ */ L("div", { children: /* @__PURE__ */ Xe(
|
|
3802
|
+
/* @__PURE__ */ L("div", { children: /* @__PURE__ */ Xe(es, { value: m, onChange: w, direction: "vertical", children: [
|
|
3803
3803
|
/* @__PURE__ */ L(tn, { value: O.Both, children: e.t("drawing-anchor.both") }),
|
|
3804
3804
|
/* @__PURE__ */ L(tn, { value: O.Position, children: e.t("drawing-anchor.position") }),
|
|
3805
3805
|
/* @__PURE__ */ L(tn, { value: O.None, children: e.t("drawing-anchor.none") })
|
|
@@ -3807,7 +3807,7 @@ const ho = (i) => {
|
|
|
3807
3807
|
]
|
|
3808
3808
|
}
|
|
3809
3809
|
);
|
|
3810
|
-
},
|
|
3810
|
+
}, mo = () => {
|
|
3811
3811
|
const i = Ie(ae), t = i.getFocusDrawings(), [e, n] = Ee(t);
|
|
3812
3812
|
return Nr(() => {
|
|
3813
3813
|
const r = i.focus$.subscribe((s) => {
|
|
@@ -3817,68 +3817,68 @@ const ho = (i) => {
|
|
|
3817
3817
|
r.unsubscribe();
|
|
3818
3818
|
};
|
|
3819
3819
|
}, []), !!(e != null && e.length) && /* @__PURE__ */ Xe("div", { className: "univer-text-sm", children: [
|
|
3820
|
-
/* @__PURE__ */ L(
|
|
3821
|
-
/* @__PURE__ */ L(
|
|
3820
|
+
/* @__PURE__ */ L(Is, { drawings: e }),
|
|
3821
|
+
/* @__PURE__ */ L(go, { drawings: e })
|
|
3822
3822
|
] });
|
|
3823
|
-
},
|
|
3824
|
-
function
|
|
3823
|
+
}, Gr = "sheet.menu.image";
|
|
3824
|
+
function fo(i) {
|
|
3825
3825
|
return {
|
|
3826
|
-
id:
|
|
3827
|
-
type:
|
|
3826
|
+
id: Gr,
|
|
3827
|
+
type: Yt.SUBITEMS,
|
|
3828
3828
|
icon: "AddImageIcon",
|
|
3829
3829
|
tooltip: "sheetImage.title",
|
|
3830
|
-
hidden$:
|
|
3831
|
-
disabled$: hi(i, { workbookTypes: [gn], worksheetTypes: [mn], rangeTypes: [
|
|
3830
|
+
hidden$: Gt(i, k.UNIVER_SHEET),
|
|
3831
|
+
disabled$: hi(i, { workbookTypes: [gn], worksheetTypes: [mn], rangeTypes: [zi] })
|
|
3832
3832
|
};
|
|
3833
3833
|
}
|
|
3834
|
-
function
|
|
3834
|
+
function po(i) {
|
|
3835
3835
|
return {
|
|
3836
3836
|
id: Kt.id,
|
|
3837
3837
|
title: "sheetImage.upload.float",
|
|
3838
|
-
type:
|
|
3839
|
-
hidden$:
|
|
3838
|
+
type: Yt.BUTTON,
|
|
3839
|
+
hidden$: Gt(i, k.UNIVER_SHEET)
|
|
3840
3840
|
};
|
|
3841
3841
|
}
|
|
3842
|
-
function
|
|
3842
|
+
function wo(i) {
|
|
3843
3843
|
return {
|
|
3844
3844
|
id: Mn.id,
|
|
3845
3845
|
title: "sheetImage.upload.cell",
|
|
3846
|
-
type:
|
|
3847
|
-
hidden$:
|
|
3846
|
+
type: Yt.BUTTON,
|
|
3847
|
+
hidden$: Gt(i, k.UNIVER_SHEET)
|
|
3848
3848
|
};
|
|
3849
3849
|
}
|
|
3850
|
-
function
|
|
3850
|
+
function _o(i) {
|
|
3851
3851
|
var t, e, n, r;
|
|
3852
3852
|
return !!((e = (t = i == null ? void 0 : i.p) == null ? void 0 : t.drawingsOrder) != null && e.length && ((r = (n = i == null ? void 0 : i.p) == null ? void 0 : n.drawingsOrder) == null ? void 0 : r.length) > 0);
|
|
3853
3853
|
}
|
|
3854
|
-
function
|
|
3854
|
+
function So(i, t) {
|
|
3855
3855
|
const e = i.getActiveSheet();
|
|
3856
3856
|
if (!e) return !1;
|
|
3857
3857
|
const n = e.getCellMatrix(), { startRow: r, endRow: s, startColumn: o, endColumn: a } = t;
|
|
3858
3858
|
for (let d = r; d <= s; d++)
|
|
3859
3859
|
for (let u = o; u <= a; u++) {
|
|
3860
3860
|
const c = n.getValue(d, u);
|
|
3861
|
-
if (
|
|
3861
|
+
if (_o(c))
|
|
3862
3862
|
return !0;
|
|
3863
3863
|
}
|
|
3864
3864
|
return !1;
|
|
3865
3865
|
}
|
|
3866
|
-
function
|
|
3866
|
+
function vo() {
|
|
3867
3867
|
return "showDirectoryPicker" in window;
|
|
3868
3868
|
}
|
|
3869
3869
|
function dn(i) {
|
|
3870
3870
|
const t = i.get(de), e = i.get(ut), n = at([
|
|
3871
|
-
|
|
3871
|
+
Gt(i, k.UNIVER_SHEET),
|
|
3872
3872
|
t.getCurrentTypeOfUnit$(k.UNIVER_SHEET).pipe(
|
|
3873
3873
|
fe((r) => r ? e.selectionMoveEnd$.pipe(
|
|
3874
3874
|
pe(() => {
|
|
3875
|
-
if (!
|
|
3875
|
+
if (!vo())
|
|
3876
3876
|
return !0;
|
|
3877
3877
|
const s = e.getCurrentSelections();
|
|
3878
3878
|
if (!s || s.length === 0)
|
|
3879
3879
|
return !0;
|
|
3880
3880
|
for (const o of s)
|
|
3881
|
-
if (
|
|
3881
|
+
if (So(r, o.range))
|
|
3882
3882
|
return !1;
|
|
3883
3883
|
return !0;
|
|
3884
3884
|
})
|
|
@@ -3889,24 +3889,24 @@ function dn(i) {
|
|
|
3889
3889
|
);
|
|
3890
3890
|
return {
|
|
3891
3891
|
id: ct.id,
|
|
3892
|
-
type:
|
|
3892
|
+
type: Yt.BUTTON,
|
|
3893
3893
|
icon: "DownloadImageIcon",
|
|
3894
3894
|
title: "sheetImage.save.menuLabel",
|
|
3895
3895
|
hidden$: n
|
|
3896
3896
|
};
|
|
3897
3897
|
}
|
|
3898
|
-
const
|
|
3899
|
-
[
|
|
3900
|
-
[
|
|
3898
|
+
const Io = {
|
|
3899
|
+
[hs.MEDIA]: {
|
|
3900
|
+
[Gr]: {
|
|
3901
3901
|
order: 0,
|
|
3902
|
-
menuItemFactory:
|
|
3902
|
+
menuItemFactory: fo,
|
|
3903
3903
|
[Kt.id]: {
|
|
3904
3904
|
order: 0,
|
|
3905
|
-
menuItemFactory:
|
|
3905
|
+
menuItemFactory: po
|
|
3906
3906
|
},
|
|
3907
3907
|
[Mn.id]: {
|
|
3908
3908
|
order: 1,
|
|
3909
|
-
menuItemFactory:
|
|
3909
|
+
menuItemFactory: wo
|
|
3910
3910
|
}
|
|
3911
3911
|
}
|
|
3912
3912
|
},
|
|
@@ -3936,9 +3936,9 @@ const vo = {
|
|
|
3936
3936
|
}
|
|
3937
3937
|
};
|
|
3938
3938
|
function mt(i) {
|
|
3939
|
-
return
|
|
3939
|
+
return i.getContextValue(bi) && !i.getContextValue(Mi) && !i.getContextValue(yi) && !i.getContextValue(Ei) && i.getContextValue(Ye);
|
|
3940
3940
|
}
|
|
3941
|
-
const
|
|
3941
|
+
const Co = {
|
|
3942
3942
|
id: gt.id,
|
|
3943
3943
|
description: "shortcut.drawing-move-down",
|
|
3944
3944
|
group: "4_drawing-view",
|
|
@@ -3948,7 +3948,7 @@ const Io = {
|
|
|
3948
3948
|
staticParameters: {
|
|
3949
3949
|
direction: ve.DOWN
|
|
3950
3950
|
}
|
|
3951
|
-
},
|
|
3951
|
+
}, Ro = {
|
|
3952
3952
|
id: gt.id,
|
|
3953
3953
|
description: "shortcut.drawing-move-up",
|
|
3954
3954
|
group: "4_drawing-view",
|
|
@@ -3958,7 +3958,7 @@ const Io = {
|
|
|
3958
3958
|
staticParameters: {
|
|
3959
3959
|
direction: ve.UP
|
|
3960
3960
|
}
|
|
3961
|
-
},
|
|
3961
|
+
}, Do = {
|
|
3962
3962
|
id: gt.id,
|
|
3963
3963
|
description: "shortcut.drawing-move-left",
|
|
3964
3964
|
group: "4_drawing-view",
|
|
@@ -3968,7 +3968,7 @@ const Io = {
|
|
|
3968
3968
|
staticParameters: {
|
|
3969
3969
|
direction: ve.LEFT
|
|
3970
3970
|
}
|
|
3971
|
-
},
|
|
3971
|
+
}, bo = {
|
|
3972
3972
|
id: gt.id,
|
|
3973
3973
|
description: "shortcut.drawing-move-right",
|
|
3974
3974
|
group: "4_drawing-view",
|
|
@@ -3978,7 +3978,7 @@ const Io = {
|
|
|
3978
3978
|
staticParameters: {
|
|
3979
3979
|
direction: ve.RIGHT
|
|
3980
3980
|
}
|
|
3981
|
-
},
|
|
3981
|
+
}, Mo = {
|
|
3982
3982
|
id: kr.id,
|
|
3983
3983
|
description: "shortcut.drawing-delete",
|
|
3984
3984
|
group: "4_drawing-view",
|
|
@@ -3987,8 +3987,8 @@ const Io = {
|
|
|
3987
3987
|
binding: Ke.DELETE,
|
|
3988
3988
|
mac: Ke.BACKSPACE
|
|
3989
3989
|
};
|
|
3990
|
-
var
|
|
3991
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
3990
|
+
var yo = Object.getOwnPropertyDescriptor, Eo = (i, t, e, n) => {
|
|
3991
|
+
for (var r = n > 1 ? void 0 : n ? yo(t, e) : t, s = i.length - 1, o; s >= 0; s--)
|
|
3992
3992
|
(o = i[s]) && (r = o(r) || r);
|
|
3993
3993
|
return r;
|
|
3994
3994
|
}, Be = (i, t) => (e, n) => t(e, n, i);
|
|
@@ -3998,10 +3998,10 @@ let Ft = class extends ee {
|
|
|
3998
3998
|
}
|
|
3999
3999
|
_initCustomComponents() {
|
|
4000
4000
|
const i = this._componentManager;
|
|
4001
|
-
this.disposeWithMe(i.register(Br,
|
|
4001
|
+
this.disposeWithMe(i.register(Br, mo)), this.disposeWithMe(i.register(ze, ho));
|
|
4002
4002
|
}
|
|
4003
4003
|
_initMenus() {
|
|
4004
|
-
this._menuManagerService.mergeMenu(
|
|
4004
|
+
this._menuManagerService.mergeMenu(Io);
|
|
4005
4005
|
}
|
|
4006
4006
|
_initCommands() {
|
|
4007
4007
|
[
|
|
@@ -4024,11 +4024,11 @@ let Ft = class extends ee {
|
|
|
4024
4024
|
_initShortcuts() {
|
|
4025
4025
|
[
|
|
4026
4026
|
// sheet drawing shortcuts
|
|
4027
|
-
Io,
|
|
4028
4027
|
Co,
|
|
4029
4028
|
Ro,
|
|
4030
4029
|
Do,
|
|
4031
|
-
bo
|
|
4030
|
+
bo,
|
|
4031
|
+
Mo
|
|
4032
4032
|
].forEach((i) => {
|
|
4033
4033
|
this.disposeWithMe(this._shortcutService.registerShortcut(i));
|
|
4034
4034
|
});
|
|
@@ -4037,32 +4037,32 @@ let Ft = class extends ee {
|
|
|
4037
4037
|
this._initCommands(), this._initCustomComponents(), this._initMenus(), this._initShortcuts();
|
|
4038
4038
|
}
|
|
4039
4039
|
};
|
|
4040
|
-
Ft =
|
|
4040
|
+
Ft = Eo([
|
|
4041
4041
|
Be(0, A(Pr)),
|
|
4042
|
-
Be(1,
|
|
4043
|
-
Be(2,
|
|
4044
|
-
Be(3,
|
|
4042
|
+
Be(1, gs),
|
|
4043
|
+
Be(2, G),
|
|
4044
|
+
Be(3, ms),
|
|
4045
4045
|
Be(4, ae),
|
|
4046
4046
|
Be(5, A(ut))
|
|
4047
4047
|
], Ft);
|
|
4048
|
-
var
|
|
4049
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
4048
|
+
var To = Object.defineProperty, Oo = Object.getOwnPropertyDescriptor, Uo = (i, t, e) => t in i ? To(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e, Po = (i, t, e, n) => {
|
|
4049
|
+
for (var r = n > 1 ? void 0 : n ? Oo(t, e) : t, s = i.length - 1, o; s >= 0; s--)
|
|
4050
4050
|
(o = i[s]) && (r = o(r) || r);
|
|
4051
4051
|
return r;
|
|
4052
|
-
}, ln = (i, t) => (e, n) => t(e, n, i),
|
|
4053
|
-
const
|
|
4054
|
-
let Lt = class extends
|
|
4052
|
+
}, ln = (i, t) => (e, n) => t(e, n, i), Yr = (i, t, e) => Uo(i, typeof t != "symbol" ? t + "" : t, e);
|
|
4053
|
+
const Ao = "SHEET_IMAGE_UI_PLUGIN";
|
|
4054
|
+
let Lt = class extends Ui {
|
|
4055
4055
|
constructor(i = sr, t, e, n) {
|
|
4056
4056
|
super(), this._config = i, this._injector = t, this._renderManagerService = e, this._configService = n;
|
|
4057
|
-
const { menu: r, ...s } =
|
|
4057
|
+
const { menu: r, ...s } = Pi(
|
|
4058
4058
|
{},
|
|
4059
4059
|
sr,
|
|
4060
4060
|
this._config
|
|
4061
4061
|
);
|
|
4062
|
-
r && this._configService.setConfig("menu", r, { merge: !0 }), this._configService.setConfig(
|
|
4062
|
+
r && this._configService.setConfig("menu", r, { merge: !0 }), this._configService.setConfig(Ns, s);
|
|
4063
4063
|
}
|
|
4064
4064
|
onStarting() {
|
|
4065
|
-
|
|
4065
|
+
Ai(this._injector, [
|
|
4066
4066
|
[lt],
|
|
4067
4067
|
[Ft],
|
|
4068
4068
|
[Nt],
|
|
@@ -4106,13 +4106,13 @@ let Lt = class extends Oi {
|
|
|
4106
4106
|
});
|
|
4107
4107
|
}
|
|
4108
4108
|
};
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
Lt =
|
|
4112
|
-
|
|
4109
|
+
Yr(Lt, "type", k.UNIVER_SHEET);
|
|
4110
|
+
Yr(Lt, "pluginName", Ao);
|
|
4111
|
+
Lt = Po([
|
|
4112
|
+
Ti(ss, ps, Cs, Ni),
|
|
4113
4113
|
ln(1, A(qe)),
|
|
4114
4114
|
ln(2, Q),
|
|
4115
|
-
ln(3,
|
|
4115
|
+
ln(3, Oi)
|
|
4116
4116
|
], Lt);
|
|
4117
4117
|
export {
|
|
4118
4118
|
vn as BatchSaveImagesService,
|
|
@@ -4126,13 +4126,13 @@ export {
|
|
|
4126
4126
|
Xt as InsertSheetDrawingCommand,
|
|
4127
4127
|
gt as MoveDrawingsCommand,
|
|
4128
4128
|
ht as RemoveSheetDrawingCommand,
|
|
4129
|
-
|
|
4130
|
-
|
|
4129
|
+
Gr as SHEETS_IMAGE_MENU_ID,
|
|
4130
|
+
ro as SHEET_FLOAT_DOM_PREFIX,
|
|
4131
4131
|
ct as SaveCellImagesCommand,
|
|
4132
4132
|
xr as SetDrawingArrangeCommand,
|
|
4133
4133
|
zt as SetSheetDrawingCommand,
|
|
4134
4134
|
lt as SheetCanvasFloatDomManagerService,
|
|
4135
|
-
|
|
4135
|
+
go as SheetDrawingAnchor,
|
|
4136
4136
|
dt as SheetDrawingUpdateController,
|
|
4137
4137
|
jr as SidebarSheetDrawingOperation,
|
|
4138
4138
|
Wr as UngroupSheetDrawingCommand,
|