@univerjs/sheets-drawing-ui 0.5.1-nightly.202412011605 → 0.5.1-nightly.202412021606
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 +2 -2
- package/lib/es/index.js +181 -181
- package/lib/umd/index.js +2 -2
- package/package.json +12 -12
package/lib/es/index.js
CHANGED
|
@@ -2,19 +2,19 @@ var Nn = Object.defineProperty;
|
|
|
2
2
|
var jn = (i, e, n) => e in i ? Nn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n;
|
|
3
3
|
var F = (i, e, n) => jn(i, typeof e != "symbol" ? e + "" : e, n);
|
|
4
4
|
import { CommandType as Y, ICommandService as G, IUndoRedoService as me, sequenceExecute as Lt, LocaleService as Je, IUniverInstanceService as fe, useDependency as le, Inject as N, Injector as Ie, IContextService as Gt, RxDisposable as Wn, UniverInstanceType as L, connectInjector as xn, toDisposable as $n, FOCUSING_COMMON_DRAWINGS as ve, DrawingTypeEnum as V, Disposable as Z, ArrangeTypeEnum as De, createDocumentModelWithStyle as Bn, ObjectRelativeFromH as Ln, ObjectRelativeFromV as Gn, BooleanNumber as Fn, PositionedObjectLayoutType as Vn, WrapTextType as kn, BuildTextUtils as Hn, Range as Yn, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as be, DOCS_ZEN_EDITOR_UNIT_ID_KEY as ye, InterceptorEffectEnum as Xn, ObjectMatrix as zn, Tools as _e, UserManagerService as Kn, IPermissionService as Jn, Rectangle as qn, Direction as re, FOCUSING_FX_BAR_EDITOR as Zn, EDITOR_ACTIVATED as Qn, FOCUSING_PANEL_EDITOR as er, LifecycleService as tr, LifecycleStages as nr, DisposableCollection as rr, fromEventSubject as ir, generateRandomId as sr, DependentOn as or, Plugin as ar, registerDependencies as cr, touchDependencies as nt, IConfigService as dr } from "@univerjs/core";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import { docDrawingPositionToTransform as
|
|
16
|
-
import { MessageType as oe, RadioGroup as
|
|
17
|
-
const
|
|
5
|
+
import { DocDrawingController as lr, UniverDocsDrawingPlugin as ur } from "@univerjs/docs-drawing";
|
|
6
|
+
import { IDrawingManagerService as q, IImageIoService as Ft, DRAWING_IMAGE_ALLOW_IMAGE_LIST as bt, DRAWING_IMAGE_COUNT_LIMIT as yt, ImageUploadStatusType as ue, DRAWING_IMAGE_ALLOW_SIZE as Ot, getImageSize as Tt, DRAWING_IMAGE_WIDTH_LIMIT as Et, DRAWING_IMAGE_HEIGHT_LIMIT as Pt, getDrawingShapeKeyByDrawingSearch as rt, UniverDrawingPlugin as hr } from "@univerjs/drawing";
|
|
7
|
+
import { ImageCropperObject as gr, COMPONENT_IMAGE_POPUP_MENU as mr, OpenImageCropOperation as fr, ImageResetSizeOperation as pr, DrawingRenderService as Vt, DrawingCommonPanel as wr, UniverDrawingUIPlugin as _r } from "@univerjs/drawing-ui";
|
|
8
|
+
import { IRenderManagerService as X, precisionTo as ie, getGroupState as vr, transformObjectOutOfGroup as Sr, RENDER_CLASS_TYPE as he, Rect as Ut, ObjectType as Ir, DRAWING_OBJECT_LAYER_INDEX as Cr, SHEET_VIEWPORT_KEY as kt } from "@univerjs/engine-render";
|
|
9
|
+
import { ISheetDrawingService as z, SetDrawingApplyMutation as T, DrawingApplyType as E, SheetDrawingAnchorType as y, UniverSheetsDrawingPlugin as Rr } from "@univerjs/sheets-drawing";
|
|
10
|
+
import { SheetCanvasPopManagerService as Mr, attachRangeWithCoord as $e, ISheetSelectionRenderService as Ce, SheetSkeletonManagerService as Q, IEditorBridgeService as Dr, IAutoFillService as br, HoverManagerService as yr, COPY_TYPE as At, PREDEFINED_HOOK_NAME as Oe, virtualizeDiscreteRanges as Or, ISheetClipboardService as Tr, SheetPrintInterceptorService as Er, getCurrentRangeDisable$ as Pr, SetZoomRatioOperation as Ur } from "@univerjs/sheets-ui";
|
|
11
|
+
import { ISidebarService as Ar, IUIPartsService as Nr, BuiltInUIPart as jr, ILocalFileService as Wr, IMessageService as xr, MenuItemType as _t, getMenuHiddenObservable as Ht, RibbonStartGroup as $r, KeyCode as ge, ComponentManager as Br, IMenuManagerService as Lr, IShortcutService as Gr, CanvasFloatDomService as Fr } from "@univerjs/ui";
|
|
12
|
+
import { takeUntil as Nt, combineLatest as Te, map as Be, filter as se, distinctUntilChanged as Ee, Subject as it, take as Vr, BehaviorSubject as kr, switchMap as jt } from "rxjs";
|
|
13
|
+
import { SheetInterceptorService as qe, getSheetCommandTarget as H, SheetsSelectionsService as Yt, SetRangeValuesCommand as Hr, SetWorksheetRowHeightMutation as Xt, SetWorksheetColWidthMutation as zt, SetWorksheetRowIsAutoHeightMutation as Yr, SetWorksheetRowAutoHeightMutation as Xr, AddWorksheetMergeMutation as zr, RemoveWorksheetMergeMutation as Kr, AFTER_CELL_EDIT as Jr, INTERCEPTOR_POINT as qr, InterceptCellContentPriority as Zr, WorkbookViewPermission as Wt, WorksheetViewPermission as st, WorkbookEditablePermission as ut, WorksheetEditPermission as xe, InsertRowCommand as Kt, InsertColCommand as Jt, RemoveRowCommand as qt, RemoveColCommand as Zt, DeleteRangeMoveLeftCommand as Qt, DeleteRangeMoveUpCommand as en, InsertRangeMoveDownCommand as tn, InsertRangeMoveRightCommand as nn, DeltaRowHeightCommand as ht, SetRowHeightCommand as gt, DeltaColumnWidthCommand as rn, SetColWidthCommand as sn, SetRowHiddenCommand as on, SetSpecificRowsVisibleCommand as an, SetSpecificColsVisibleCommand as cn, SetColHiddenCommand as dn, MoveColsCommand as ln, MoveRowsCommand as un, MoveRangeCommand as hn, SetRowVisibleMutation as Qr, SetRowHiddenMutation as ei, SetColVisibleMutation as ti, SetColHiddenMutation as ni, SetWorksheetActiveOperation as ri, RangeProtectionPermissionEditPoint as ii, SetFrozenMutation as si } from "@univerjs/sheets";
|
|
14
|
+
import gn, { useEffect as vt, forwardRef as mn, useRef as oi, createElement as fn, useState as mt } from "react";
|
|
15
|
+
import { docDrawingPositionToTransform as ai, ReplaceSnapshotCommand as ci } from "@univerjs/docs-ui";
|
|
16
|
+
import { MessageType as oe, RadioGroup as di, Radio as ot } from "@univerjs/design";
|
|
17
|
+
const li = "sheets-drawing-ui.config", ui = {}, W = {
|
|
18
18
|
id: "sheet.operation.clear-drawing-transformer",
|
|
19
19
|
type: Y.MUTATION,
|
|
20
20
|
handler: (i, e) => {
|
|
@@ -57,7 +57,7 @@ const di = "sheets-drawing-ui.config", li = {}, 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(Ar), t = i.get(Je), r = i.get(fe), s = i.get(q);
|
|
61
61
|
if (!H(r)) return !1;
|
|
62
62
|
switch (e.value) {
|
|
63
63
|
case "open":
|
|
@@ -96,7 +96,7 @@ var at = { exports: {} }, pe = {};
|
|
|
96
96
|
* LICENSE file in the root directory of this source tree.
|
|
97
97
|
*/
|
|
98
98
|
var xt;
|
|
99
|
-
function
|
|
99
|
+
function hi() {
|
|
100
100
|
if (xt) return pe;
|
|
101
101
|
xt = 1;
|
|
102
102
|
var i = gn, 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 };
|
|
@@ -110,17 +110,17 @@ function ui() {
|
|
|
110
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, at.exports =
|
|
113
|
+
function gi() {
|
|
114
|
+
return $t || ($t = 1, at.exports = hi()), at.exports;
|
|
115
115
|
}
|
|
116
|
-
var $ =
|
|
117
|
-
const
|
|
118
|
-
uploadLoading:
|
|
119
|
-
uploadLoadingBody:
|
|
120
|
-
uploadLoadingBodyAnimation:
|
|
121
|
-
univerCircleAnimation:
|
|
122
|
-
uploadLoadingBodyText:
|
|
123
|
-
},
|
|
116
|
+
var $ = gi();
|
|
117
|
+
const mi = "univer-upload-loading", fi = "univer-upload-loading-body", pi = "univer-upload-loading-body-animation", wi = "univer-UniverCircleAnimation", _i = "univer-upload-loading-body-text", Pe = {
|
|
118
|
+
uploadLoading: mi,
|
|
119
|
+
uploadLoadingBody: fi,
|
|
120
|
+
uploadLoadingBodyAnimation: pi,
|
|
121
|
+
univerCircleAnimation: wi,
|
|
122
|
+
uploadLoadingBodyText: _i
|
|
123
|
+
}, vi = () => {
|
|
124
124
|
const i = le(Ft), e = le(Je), [n, t] = gn.useState(0);
|
|
125
125
|
return vt(() => {
|
|
126
126
|
const r = i.change$.subscribe((s) => {
|
|
@@ -134,10 +134,10 @@ const gi = "univer-upload-loading", mi = "univer-upload-loading-body", fi = "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 Si = Object.defineProperty, Ii = Object.getOwnPropertyDescriptor, Ci = (i, e, n, t) => {
|
|
138
|
+
for (var r = t > 1 ? void 0 : t ? Ii(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 && Si(e, n, r), r;
|
|
141
141
|
}, ae = (i, e) => (n, t) => e(n, t, i);
|
|
142
142
|
let Le = class extends Wn {
|
|
143
143
|
constructor(e, n, t, r, s, o, d) {
|
|
@@ -146,7 +146,7 @@ let Le = class extends Wn {
|
|
|
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$(L.UNIVER_SHEET).pipe(Nt(this.dispose$)).subscribe((e) => this._create(e)), this._univerInstanceService.getTypeOfUnitDisposed$(L.UNIVER_SHEET).pipe(Nt(this.dispose$)).subscribe((e) => this._dispose(e)), this._univerInstanceService.getAllUnitsForType(L.UNIVER_SHEET).forEach((e) => this._create(e)), this._uiPartsService.registerComponent(
|
|
149
|
+
this._univerInstanceService.getCurrentTypeOfUnit$(L.UNIVER_SHEET).pipe(Nt(this.dispose$)).subscribe((e) => this._create(e)), this._univerInstanceService.getTypeOfUnitDisposed$(L.UNIVER_SHEET).pipe(Nt(this.dispose$)).subscribe((e) => this._dispose(e)), this._univerInstanceService.getAllUnitsForType(L.UNIVER_SHEET).forEach((e) => this._create(e)), this._uiPartsService.registerComponent(jr.CONTENT, () => xn(vi, this._injector));
|
|
150
150
|
}
|
|
151
151
|
_dispose(e) {
|
|
152
152
|
const n = e.getUnitId();
|
|
@@ -161,7 +161,7 @@ let Le = class extends Wn {
|
|
|
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 gr)
|
|
165
165
|
return !0;
|
|
166
166
|
return !1;
|
|
167
167
|
}
|
|
@@ -196,7 +196,7 @@ let Le = class extends Wn {
|
|
|
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: mr,
|
|
200
200
|
direction: "horizontal",
|
|
201
201
|
offset: [2, 0],
|
|
202
202
|
extraProps: {
|
|
@@ -238,28 +238,28 @@ let Le = class extends Wn {
|
|
|
238
238
|
{
|
|
239
239
|
label: "image-popup.crop",
|
|
240
240
|
index: 2,
|
|
241
|
-
commandId:
|
|
241
|
+
commandId: fr.id,
|
|
242
242
|
commandParams: { unitId: e, subUnitId: n, drawingId: t },
|
|
243
243
|
disable: r === V.DRAWING_DOM
|
|
244
244
|
},
|
|
245
245
|
{
|
|
246
246
|
label: "image-popup.reset",
|
|
247
247
|
index: 3,
|
|
248
|
-
commandId:
|
|
248
|
+
commandId: pr.id,
|
|
249
249
|
commandParams: [{ unitId: e, subUnitId: n, drawingId: t }],
|
|
250
250
|
disable: r === V.DRAWING_DOM
|
|
251
251
|
}
|
|
252
252
|
];
|
|
253
253
|
}
|
|
254
254
|
};
|
|
255
|
-
Le =
|
|
255
|
+
Le = Ci([
|
|
256
256
|
ae(0, N(Ie)),
|
|
257
257
|
ae(1, q),
|
|
258
|
-
ae(2, N(
|
|
258
|
+
ae(2, N(Mr)),
|
|
259
259
|
ae(3, X),
|
|
260
260
|
ae(4, fe),
|
|
261
261
|
ae(5, Gt),
|
|
262
|
-
ae(6, N(
|
|
262
|
+
ae(6, N(Nr))
|
|
263
263
|
], Le);
|
|
264
264
|
function B(i, e, n) {
|
|
265
265
|
const { from: t, to: r, flipY: s = !1, flipX: o = !1, angle: d = 0, skewX: l = 0, skewY: g = 0 } = i, { column: c, columnOffset: a, row: h, rowOffset: u } = t, { column: m, columnOffset: f, row: p, rowOffset: v } = r, I = n.getCurrentSkeleton(), S = $e(I, {
|
|
@@ -322,10 +322,10 @@ function j(i, e) {
|
|
|
322
322
|
to: m
|
|
323
323
|
};
|
|
324
324
|
}
|
|
325
|
-
var
|
|
326
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
325
|
+
var Ri = Object.defineProperty, Mi = Object.getOwnPropertyDescriptor, Di = (i, e, n, t) => {
|
|
326
|
+
for (var r = t > 1 ? void 0 : t ? Mi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
327
327
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
328
|
-
return t && r &&
|
|
328
|
+
return t && r && Ri(e, n, r), r;
|
|
329
329
|
}, Ue = (i, e) => (n, t) => e(n, t, i);
|
|
330
330
|
let ft = class extends Z {
|
|
331
331
|
constructor(i, e, n, t, r) {
|
|
@@ -347,16 +347,16 @@ let ft = class extends Z {
|
|
|
347
347
|
this._drawingManagerService.registerDrawingData(this._context.unitId, this._sheetDrawingService.getDrawingDataForUnit(this._context.unitId)), this._drawingManagerService.initializeNotification(this._context.unitId);
|
|
348
348
|
}
|
|
349
349
|
};
|
|
350
|
-
ft =
|
|
350
|
+
ft = Di([
|
|
351
351
|
Ue(1, z),
|
|
352
352
|
Ue(2, q),
|
|
353
353
|
Ue(3, N(Ce)),
|
|
354
354
|
Ue(4, N(Q))
|
|
355
355
|
], ft);
|
|
356
|
-
function
|
|
356
|
+
function bi(i) {
|
|
357
357
|
const e = [];
|
|
358
358
|
return i.forEach((n) => {
|
|
359
|
-
const { parent: t, children: r } = n, { unitId: s, subUnitId: o, drawingId: d } = t, l =
|
|
359
|
+
const { parent: t, children: r } = n, { unitId: s, subUnitId: o, drawingId: d } = t, l = vr(0, 0, r.map((a) => a.transform || {})), g = r.map((a) => {
|
|
360
360
|
const h = a.transform || { left: 0, top: 0 }, { unitId: u, subUnitId: m, drawingId: f } = a;
|
|
361
361
|
return {
|
|
362
362
|
unitId: u,
|
|
@@ -382,14 +382,14 @@ function Di(i) {
|
|
|
382
382
|
});
|
|
383
383
|
}), e;
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function yi(i) {
|
|
386
386
|
const e = [];
|
|
387
387
|
return i.forEach((n) => {
|
|
388
388
|
const { parent: t, children: r } = n, { unitId: s, subUnitId: o, drawingId: d, transform: l = { width: 0, height: 0 } } = t;
|
|
389
389
|
if (l == null)
|
|
390
390
|
return;
|
|
391
391
|
const g = r.map((a) => {
|
|
392
|
-
const { transform: h } = a, { unitId: u, subUnitId: m, drawingId: f } = a, p =
|
|
392
|
+
const { transform: h } = a, { unitId: u, subUnitId: m, drawingId: f } = a, p = Sr(h || {}, l, l.width || 0, l.height || 0);
|
|
393
393
|
return {
|
|
394
394
|
unitId: u,
|
|
395
395
|
subUnitId: m,
|
|
@@ -429,7 +429,7 @@ const vn = {
|
|
|
429
429
|
return n.syncExecuteCommand(T.id, { op: c, unitId: d, subUnitId: l, objects: a, type: E.GROUP }) ? (t.pushUndoRedo({
|
|
430
430
|
unitID: d,
|
|
431
431
|
undoMutations: [
|
|
432
|
-
{ id: T.id, params: { op: g, unitId: d, subUnitId: l, objects:
|
|
432
|
+
{ id: T.id, params: { op: g, unitId: d, subUnitId: l, objects: yi(a), type: E.UNGROUP } },
|
|
433
433
|
{ id: W.id, params: s }
|
|
434
434
|
],
|
|
435
435
|
redoMutations: [
|
|
@@ -518,7 +518,7 @@ const vn = {
|
|
|
518
518
|
return n.syncExecuteCommand(T.id, { op: c, unitId: d, subUnitId: l, objects: a, type: E.UNGROUP }) ? (t.pushUndoRedo({
|
|
519
519
|
unitID: d,
|
|
520
520
|
undoMutations: [
|
|
521
|
-
{ id: T.id, params: { op: g, unitId: d, subUnitId: l, objects:
|
|
521
|
+
{ id: T.id, params: { op: g, unitId: d, subUnitId: l, objects: bi(a), type: E.GROUP } },
|
|
522
522
|
{ id: W.id, params: s }
|
|
523
523
|
],
|
|
524
524
|
redoMutations: [
|
|
@@ -528,18 +528,18 @@ const vn = {
|
|
|
528
528
|
}), !0) : !1;
|
|
529
529
|
}
|
|
530
530
|
};
|
|
531
|
-
var
|
|
532
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
531
|
+
var Oi = Object.defineProperty, Ti = Object.getOwnPropertyDescriptor, Ei = (i, e, n, t) => {
|
|
532
|
+
for (var r = t > 1 ? void 0 : t ? Ti(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
533
533
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
534
|
-
return t && r &&
|
|
534
|
+
return t && r && Oi(e, n, r), r;
|
|
535
535
|
}, K = (i, e) => (n, t) => e(n, t, i);
|
|
536
|
-
function
|
|
536
|
+
function Pi(i, e, n) {
|
|
537
537
|
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));
|
|
538
538
|
return { rotatedWidth: r, rotatedHeight: s };
|
|
539
539
|
}
|
|
540
540
|
function Cn(i, e, n, t, r) {
|
|
541
541
|
var I;
|
|
542
|
-
const { rotatedHeight: s, rotatedWidth: o } =
|
|
542
|
+
const { rotatedHeight: s, rotatedWidth: o } = Pi(n, t, r), l = i.get(X).getRenderById(e.unitId);
|
|
543
543
|
if (!l)
|
|
544
544
|
return !1;
|
|
545
545
|
const c = (I = l.with(Q).getWorksheetSkeleton(e.subUnitId)) == null ? void 0 : I.skeleton;
|
|
@@ -678,7 +678,7 @@ let Se = class extends Z {
|
|
|
678
678
|
drawingType: V.DRAWING_IMAGE,
|
|
679
679
|
imageSourceType: r,
|
|
680
680
|
source: s,
|
|
681
|
-
transform:
|
|
681
|
+
transform: ai(u),
|
|
682
682
|
docTransform: u,
|
|
683
683
|
behindDoc: Fn.FALSE,
|
|
684
684
|
title: "",
|
|
@@ -699,7 +699,7 @@ let Se = class extends Z {
|
|
|
699
699
|
endOffset: 0
|
|
700
700
|
}
|
|
701
701
|
});
|
|
702
|
-
return f ? (a.apply(f), this._commandService.syncExecuteCommand(
|
|
702
|
+
return f ? (a.apply(f), this._commandService.syncExecuteCommand(Hr.id, {
|
|
703
703
|
value: {
|
|
704
704
|
[c.primary.actualRow]: {
|
|
705
705
|
[c.primary.actualColumn]: {
|
|
@@ -808,24 +808,24 @@ let Se = class extends Z {
|
|
|
808
808
|
);
|
|
809
809
|
}
|
|
810
810
|
};
|
|
811
|
-
Se =
|
|
811
|
+
Se = Ei([
|
|
812
812
|
K(1, N(Q)),
|
|
813
813
|
K(2, G),
|
|
814
814
|
K(3, Ce),
|
|
815
815
|
K(4, Ft),
|
|
816
|
-
K(5,
|
|
816
|
+
K(5, Wr),
|
|
817
817
|
K(6, z),
|
|
818
818
|
K(7, q),
|
|
819
819
|
K(8, Gt),
|
|
820
|
-
K(9,
|
|
820
|
+
K(9, xr),
|
|
821
821
|
K(10, N(Je)),
|
|
822
822
|
K(11, N(Yt)),
|
|
823
823
|
K(12, N(Ie))
|
|
824
824
|
], Se);
|
|
825
|
-
var
|
|
826
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
825
|
+
var Ui = Object.defineProperty, Ai = Object.getOwnPropertyDescriptor, Ni = (i, e, n, t) => {
|
|
826
|
+
for (var r = t > 1 ? void 0 : t ? Ai(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
827
827
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
828
|
-
return t && r &&
|
|
828
|
+
return t && r && Ui(e, n, r), r;
|
|
829
829
|
}, ce = (i, e) => (n, t) => e(n, t, i);
|
|
830
830
|
function pt(i, e, n) {
|
|
831
831
|
var t, r, s, o;
|
|
@@ -860,10 +860,10 @@ let Ge = class extends Z {
|
|
|
860
860
|
} else if (i.id === zt.id) {
|
|
861
861
|
const t = i.params;
|
|
862
862
|
n = t.ranges, e = H(this._univerInstanceService, { unitId: t.unitId, subUnitId: t.subUnitId });
|
|
863
|
-
} else if (i.id ===
|
|
863
|
+
} else if (i.id === Yr.id) {
|
|
864
864
|
const t = i.params;
|
|
865
865
|
n = t.ranges, e = H(this._univerInstanceService, { unitId: t.unitId, subUnitId: t.subUnitId });
|
|
866
|
-
} else if (i.id ===
|
|
866
|
+
} else if (i.id === Xr.id) {
|
|
867
867
|
const t = i.params;
|
|
868
868
|
e = H(this._univerInstanceService, { unitId: t.unitId, subUnitId: t.subUnitId }), n = t.rowsAutoHeightInfo.map((r) => ({
|
|
869
869
|
startRow: r.row,
|
|
@@ -871,10 +871,10 @@ let Ge = class extends Z {
|
|
|
871
871
|
startColumn: 0,
|
|
872
872
|
endColumn: 9999
|
|
873
873
|
}));
|
|
874
|
-
} else if (i.id ===
|
|
874
|
+
} else if (i.id === zr.id) {
|
|
875
875
|
const t = i.params;
|
|
876
876
|
n = t.ranges, e = H(this._univerInstanceService, { unitId: t.unitId, subUnitId: t.subUnitId });
|
|
877
|
-
} else if (i.id ===
|
|
877
|
+
} else if (i.id === Kr.id) {
|
|
878
878
|
const t = i.params;
|
|
879
879
|
n = t.ranges, e = H(this._univerInstanceService, { unitId: t.unitId, subUnitId: t.subUnitId });
|
|
880
880
|
}
|
|
@@ -890,11 +890,11 @@ let Ge = class extends Z {
|
|
|
890
890
|
this.disposeWithMe(this._editorBridgeService.visible$.subscribe((i) => {
|
|
891
891
|
i.visible ? i.visible && (this._drawingManagerService.removeDrawingDataForUnit(be), this._docDrawingController.loadDrawingDataForUnit(be), this._drawingManagerService.initializeNotification(be)) : this._drawingManagerService.removeDrawingDataForUnit(be);
|
|
892
892
|
})), this.disposeWithMe(this._commandService.onCommandExecuted((i) => {
|
|
893
|
-
i.id ===
|
|
893
|
+
i.id === ci.id && i.params.unitId === ye && (this._drawingManagerService.removeDrawingDataForUnit(ye), this._docDrawingController.loadDrawingDataForUnit(ye), this._drawingManagerService.initializeNotification(ye));
|
|
894
894
|
}));
|
|
895
895
|
}
|
|
896
896
|
_handleWriteCell() {
|
|
897
|
-
this.disposeWithMe(this._sheetInterceptorService.writeCellInterceptor.intercept(
|
|
897
|
+
this.disposeWithMe(this._sheetInterceptorService.writeCellInterceptor.intercept(Jr, {
|
|
898
898
|
priority: 9999,
|
|
899
899
|
handler: (i, e, n) => (pt(this._injector, { unitId: e.unitId, subUnitId: e.subUnitId, row: e.row, col: e.col }, i), n(i))
|
|
900
900
|
}));
|
|
@@ -902,10 +902,10 @@ let Ge = class extends Z {
|
|
|
902
902
|
_initCellContentInterceptor() {
|
|
903
903
|
this.disposeWithMe(
|
|
904
904
|
this._sheetInterceptorService.intercept(
|
|
905
|
-
|
|
905
|
+
qr.CELL_CONTENT,
|
|
906
906
|
{
|
|
907
907
|
effect: Xn.Style,
|
|
908
|
-
priority:
|
|
908
|
+
priority: Zr.CELL_IMAGE,
|
|
909
909
|
handler: (i, e, n) => {
|
|
910
910
|
var t;
|
|
911
911
|
return i != null && i.p && ((t = i.p.drawingsOrder) != null && t.length) && (i.interceptorStyle || (i.interceptorStyle = {}), i.interceptorStyle.tr = { a: 0 }), n(i);
|
|
@@ -915,19 +915,19 @@ let Ge = class extends Z {
|
|
|
915
915
|
);
|
|
916
916
|
}
|
|
917
917
|
};
|
|
918
|
-
Ge =
|
|
918
|
+
Ge = Ni([
|
|
919
919
|
ce(0, G),
|
|
920
920
|
ce(1, N(qe)),
|
|
921
921
|
ce(2, fe),
|
|
922
922
|
ce(3, N(Ie)),
|
|
923
923
|
ce(4, q),
|
|
924
|
-
ce(5, N(
|
|
925
|
-
ce(6, N(
|
|
924
|
+
ce(5, N(lr)),
|
|
925
|
+
ce(6, N(Dr))
|
|
926
926
|
], Ge);
|
|
927
|
-
var
|
|
928
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
927
|
+
var ji = Object.defineProperty, Wi = Object.getOwnPropertyDescriptor, xi = (i, e, n, t) => {
|
|
928
|
+
for (var r = t > 1 ? void 0 : t ? Wi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
929
929
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
930
|
-
return t && r &&
|
|
930
|
+
return t && r && ji(e, n, r), r;
|
|
931
931
|
}, Bt = (i, e) => (n, t) => e(n, t, i);
|
|
932
932
|
let Fe = class extends Z {
|
|
933
933
|
constructor(i, e) {
|
|
@@ -946,14 +946,14 @@ let Fe = class extends Z {
|
|
|
946
946
|
);
|
|
947
947
|
}
|
|
948
948
|
};
|
|
949
|
-
Fe =
|
|
950
|
-
Bt(0, N(
|
|
949
|
+
Fe = xi([
|
|
950
|
+
Bt(0, N(br)),
|
|
951
951
|
Bt(1, N(Ie))
|
|
952
952
|
], Fe);
|
|
953
|
-
var
|
|
954
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
953
|
+
var $i = Object.defineProperty, Bi = Object.getOwnPropertyDescriptor, Li = (i, e, n, t) => {
|
|
954
|
+
for (var r = t > 1 ? void 0 : t ? Bi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
955
955
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
956
|
-
return t && r &&
|
|
956
|
+
return t && r && $i(e, n, r), r;
|
|
957
957
|
}, Ae = (i, e) => (n, t) => e(n, t, i);
|
|
958
958
|
let Ve = class extends Z {
|
|
959
959
|
constructor(e, n, t, r) {
|
|
@@ -966,16 +966,16 @@ let Ve = class extends Z {
|
|
|
966
966
|
_initImageClick() {
|
|
967
967
|
}
|
|
968
968
|
};
|
|
969
|
-
Ve =
|
|
970
|
-
Ae(0, N(
|
|
969
|
+
Ve = Li([
|
|
970
|
+
Ae(0, N(yr)),
|
|
971
971
|
Ae(1, N(X)),
|
|
972
972
|
Ae(2, N(Yt)),
|
|
973
973
|
Ae(3, N(Vt))
|
|
974
974
|
], Ve);
|
|
975
|
-
var
|
|
976
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
975
|
+
var Gi = Object.defineProperty, Fi = Object.getOwnPropertyDescriptor, Vi = (i, e, n, t) => {
|
|
976
|
+
for (var r = t > 1 ? void 0 : t ? Fi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
977
977
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
978
|
-
return t && r &&
|
|
978
|
+
return t && r && Gi(e, n, r), r;
|
|
979
979
|
}, ct = (i, e) => (n, t) => e(n, t, i);
|
|
980
980
|
let ke = class extends Z {
|
|
981
981
|
constructor(e, n, t) {
|
|
@@ -1036,7 +1036,7 @@ let ke = class extends Z {
|
|
|
1036
1036
|
const { copyRange: t } = n;
|
|
1037
1037
|
if (!t)
|
|
1038
1038
|
return { redos: [], undos: [] };
|
|
1039
|
-
const { drawings: r, unitId: s, subUnitId: o } = this._copyInfo, { ranges: [d, l], mapFunc: g } =
|
|
1039
|
+
const { drawings: r, unitId: s, subUnitId: o } = this._copyInfo, { ranges: [d, l], mapFunc: g } = Or([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);
|
|
1040
1040
|
if (!m)
|
|
1041
1041
|
return { redos: [], undos: [] };
|
|
1042
1042
|
const f = m.attachRangeWithCoord({
|
|
@@ -1103,15 +1103,15 @@ let ke = class extends Z {
|
|
|
1103
1103
|
};
|
|
1104
1104
|
}
|
|
1105
1105
|
};
|
|
1106
|
-
ke =
|
|
1107
|
-
ct(0,
|
|
1106
|
+
ke = Vi([
|
|
1107
|
+
ct(0, Tr),
|
|
1108
1108
|
ct(1, X),
|
|
1109
1109
|
ct(2, z)
|
|
1110
1110
|
], ke);
|
|
1111
|
-
var
|
|
1112
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
1111
|
+
var ki = Object.defineProperty, Hi = Object.getOwnPropertyDescriptor, Yi = (i, e, n, t) => {
|
|
1112
|
+
for (var r = t > 1 ? void 0 : t ? Hi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
1113
1113
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
1114
|
-
return t && r &&
|
|
1114
|
+
return t && r && ki(e, n, r), r;
|
|
1115
1115
|
}, we = (i, e) => (n, t) => e(n, t, i);
|
|
1116
1116
|
let He = class extends Z {
|
|
1117
1117
|
constructor(i, e, n, t, r) {
|
|
@@ -1260,17 +1260,17 @@ let He = class extends Z {
|
|
|
1260
1260
|
);
|
|
1261
1261
|
}
|
|
1262
1262
|
};
|
|
1263
|
-
He =
|
|
1263
|
+
He = Yi([
|
|
1264
1264
|
we(0, q),
|
|
1265
1265
|
we(1, X),
|
|
1266
1266
|
we(2, Jn),
|
|
1267
1267
|
we(3, fe),
|
|
1268
1268
|
we(4, N(Kn))
|
|
1269
1269
|
], He);
|
|
1270
|
-
var
|
|
1271
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
1270
|
+
var Xi = Object.defineProperty, zi = Object.getOwnPropertyDescriptor, Ki = (i, e, n, t) => {
|
|
1271
|
+
for (var r = t > 1 ? void 0 : t ? zi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
1272
1272
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
1273
|
-
return t && r &&
|
|
1273
|
+
return t && r && Xi(e, n, r), r;
|
|
1274
1274
|
}, Ne = (i, e) => (n, t) => e(n, t, i);
|
|
1275
1275
|
let Ye = class extends Z {
|
|
1276
1276
|
constructor(i, e, n, t) {
|
|
@@ -1316,18 +1316,18 @@ let Ye = class extends Z {
|
|
|
1316
1316
|
);
|
|
1317
1317
|
}
|
|
1318
1318
|
};
|
|
1319
|
-
Ye =
|
|
1320
|
-
Ne(0, N(
|
|
1319
|
+
Ye = Ki([
|
|
1320
|
+
Ne(0, N(Er)),
|
|
1321
1321
|
Ne(1, N(Vt)),
|
|
1322
1322
|
Ne(2, q),
|
|
1323
1323
|
Ne(3, X)
|
|
1324
1324
|
], Ye);
|
|
1325
|
-
var
|
|
1326
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
1325
|
+
var Ji = Object.defineProperty, qi = Object.getOwnPropertyDescriptor, Zi = (i, e, n, t) => {
|
|
1326
|
+
for (var r = t > 1 ? void 0 : t ? qi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
1327
1327
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
1328
|
-
return t && r &&
|
|
1328
|
+
return t && r && Ji(e, n, r), r;
|
|
1329
1329
|
}, te = (i, e) => (n, t) => e(n, t, i);
|
|
1330
|
-
const
|
|
1330
|
+
const Qi = [
|
|
1331
1331
|
Kt.id,
|
|
1332
1332
|
Jt.id,
|
|
1333
1333
|
qt.id,
|
|
@@ -1347,11 +1347,11 @@ const Zi = [
|
|
|
1347
1347
|
ln.id,
|
|
1348
1348
|
un.id,
|
|
1349
1349
|
hn.id
|
|
1350
|
-
],
|
|
1351
|
-
qr.id,
|
|
1352
|
-
Zr.id,
|
|
1350
|
+
], es = [
|
|
1353
1351
|
Qr.id,
|
|
1354
1352
|
ei.id,
|
|
1353
|
+
ti.id,
|
|
1354
|
+
ni.id,
|
|
1355
1355
|
Xt.id,
|
|
1356
1356
|
zt.id
|
|
1357
1357
|
];
|
|
@@ -1363,7 +1363,7 @@ let wt = class extends Z {
|
|
|
1363
1363
|
this.disposeWithMe(
|
|
1364
1364
|
this._sheetInterceptorService.interceptCommand({
|
|
1365
1365
|
getMutations: (i) => {
|
|
1366
|
-
if (!
|
|
1366
|
+
if (!Qi.includes(i.id))
|
|
1367
1367
|
return { redos: [], undos: [] };
|
|
1368
1368
|
if (i.params == null)
|
|
1369
1369
|
return { redos: [], undos: [] };
|
|
@@ -2004,7 +2004,7 @@ let wt = class extends Z {
|
|
|
2004
2004
|
_commandListener() {
|
|
2005
2005
|
this.disposeWithMe(
|
|
2006
2006
|
this._commandService.onCommandExecuted((i) => {
|
|
2007
|
-
i.id ===
|
|
2007
|
+
i.id === ri.id && setTimeout(() => {
|
|
2008
2008
|
const e = i.params, { unitId: n, subUnitId: t } = e, r = this._drawingManagerService.drawingManagerData, s = [], o = [];
|
|
2009
2009
|
Object.keys(r).forEach((d) => {
|
|
2010
2010
|
const l = r[d];
|
|
@@ -2026,7 +2026,7 @@ let wt = class extends Z {
|
|
|
2026
2026
|
_sheetRefreshListener() {
|
|
2027
2027
|
this.disposeWithMe(
|
|
2028
2028
|
this._commandService.onCommandExecuted((i) => {
|
|
2029
|
-
|
|
2029
|
+
es.includes(i.id) && requestIdleCallback(() => {
|
|
2030
2030
|
const e = i.params, { unitId: n, subUnitId: t, ranges: r } = e;
|
|
2031
2031
|
this._refreshDrawingTransform(n, t, r);
|
|
2032
2032
|
});
|
|
@@ -2071,7 +2071,7 @@ let wt = class extends Z {
|
|
|
2071
2071
|
}), r.length !== 0 && (this._drawingManagerService.refreshTransform(r), this._commandService.syncExecuteCommand(W.id, [i]));
|
|
2072
2072
|
}
|
|
2073
2073
|
};
|
|
2074
|
-
wt =
|
|
2074
|
+
wt = Zi([
|
|
2075
2075
|
te(1, X),
|
|
2076
2076
|
te(2, G),
|
|
2077
2077
|
te(3, Ce),
|
|
@@ -2089,7 +2089,7 @@ var J = function() {
|
|
|
2089
2089
|
}
|
|
2090
2090
|
return i;
|
|
2091
2091
|
}, J.apply(this, arguments);
|
|
2092
|
-
},
|
|
2092
|
+
}, ts = function(i, e) {
|
|
2093
2093
|
var n = {};
|
|
2094
2094
|
for (var t in i) Object.prototype.hasOwnProperty.call(i, t) && e.indexOf(t) < 0 && (n[t] = i[t]);
|
|
2095
2095
|
if (i != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -2097,15 +2097,15 @@ var J = function() {
|
|
|
2097
2097
|
e.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(i, t[r]) && (n[t[r]] = i[t[r]]);
|
|
2098
2098
|
return n;
|
|
2099
2099
|
}, Rn = mn(function(i, e) {
|
|
2100
|
-
var n = i.icon, t = i.id, r = i.className, s = i.extend, o =
|
|
2100
|
+
var n = i.icon, t = i.id, r = i.className, s = i.extend, o = ts(i, ["icon", "id", "className", "extend"]), d = "univerjs-icon univerjs-icon-".concat(t, " ").concat(r || "").trim(), l = oi("_".concat(is()));
|
|
2101
2101
|
return Mn(n, "".concat(t), { defIds: n.defIds, idSuffix: l.current }, J({ ref: e, className: d }, o), s);
|
|
2102
2102
|
});
|
|
2103
2103
|
function Mn(i, e, n, t, r) {
|
|
2104
|
-
return fn(i.tag, J(J({ key: e },
|
|
2104
|
+
return fn(i.tag, J(J({ key: e }, ns(i, n, r)), t), (rs(i, n).children || []).map(function(s, o) {
|
|
2105
2105
|
return Mn(s, "".concat(e, "-").concat(i.tag, "-").concat(o), n, void 0, r);
|
|
2106
2106
|
}));
|
|
2107
2107
|
}
|
|
2108
|
-
function
|
|
2108
|
+
function ns(i, e, n) {
|
|
2109
2109
|
var t = J({}, i.attrs);
|
|
2110
2110
|
n != null && n.colorChannel1 && t.fill === "colorChannel1" && (t.fill = n.colorChannel1);
|
|
2111
2111
|
var r = e.defIds;
|
|
@@ -2114,21 +2114,21 @@ function ts(i, e, n) {
|
|
|
2114
2114
|
typeof d == "string" && (t[o] = d.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
2115
2115
|
})), t;
|
|
2116
2116
|
}
|
|
2117
|
-
function
|
|
2117
|
+
function rs(i, e) {
|
|
2118
2118
|
var n, t = e.defIds;
|
|
2119
2119
|
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) {
|
|
2120
2120
|
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;
|
|
2121
2121
|
}) }) : i;
|
|
2122
2122
|
}
|
|
2123
|
-
function
|
|
2123
|
+
function is() {
|
|
2124
2124
|
return Math.random().toString(36).substring(2, 8);
|
|
2125
2125
|
}
|
|
2126
2126
|
Rn.displayName = "UniverIcon";
|
|
2127
|
-
var
|
|
2127
|
+
var ss = { 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" } }] }, Dn = mn(function(i, e) {
|
|
2128
2128
|
return fn(Rn, Object.assign({}, i, {
|
|
2129
2129
|
id: "add-image-single",
|
|
2130
2130
|
ref: e,
|
|
2131
|
-
icon:
|
|
2131
|
+
icon: ss
|
|
2132
2132
|
}));
|
|
2133
2133
|
});
|
|
2134
2134
|
Dn.displayName = "AddImageSingle";
|
|
@@ -2191,17 +2191,17 @@ const bn = {
|
|
|
2191
2191
|
}) ? (n.syncExecuteCommand(W.id, [d]), !0) : !1;
|
|
2192
2192
|
}
|
|
2193
2193
|
}, yn = "addition-and-subtraction-single", On = "sheet.menu.image";
|
|
2194
|
-
function
|
|
2194
|
+
function os(i) {
|
|
2195
2195
|
return {
|
|
2196
2196
|
id: On,
|
|
2197
2197
|
type: _t.SUBITEMS,
|
|
2198
2198
|
icon: yn,
|
|
2199
2199
|
tooltip: "sheetImage.title",
|
|
2200
2200
|
hidden$: Ht(i, L.UNIVER_SHEET),
|
|
2201
|
-
disabled$:
|
|
2201
|
+
disabled$: Pr(i, { workbookTypes: [ut], worksheetTypes: [xe], rangeTypes: [ii] })
|
|
2202
2202
|
};
|
|
2203
2203
|
}
|
|
2204
|
-
function
|
|
2204
|
+
function as(i) {
|
|
2205
2205
|
return {
|
|
2206
2206
|
id: St.id,
|
|
2207
2207
|
title: "sheetImage.upload.float",
|
|
@@ -2209,29 +2209,29 @@ function os(i) {
|
|
|
2209
2209
|
hidden$: Ht(i, L.UNIVER_SHEET)
|
|
2210
2210
|
};
|
|
2211
2211
|
}
|
|
2212
|
-
function
|
|
2212
|
+
function cs(i) {
|
|
2213
2213
|
return {
|
|
2214
2214
|
id: It.id,
|
|
2215
2215
|
title: "sheetImage.upload.cell",
|
|
2216
2216
|
type: _t.BUTTON
|
|
2217
2217
|
};
|
|
2218
2218
|
}
|
|
2219
|
-
const
|
|
2220
|
-
imageCommonPanel:
|
|
2221
|
-
imageCommonPanelGrid:
|
|
2222
|
-
imageCommonPanelBorder:
|
|
2223
|
-
imageCommonPanelTitle:
|
|
2224
|
-
imageCommonPanelSubtitle:
|
|
2225
|
-
imageCommonPanelRow:
|
|
2226
|
-
imageCommonPanelRowVertical:
|
|
2227
|
-
imageCommonPanelColumn:
|
|
2228
|
-
imageCommonPanelColumnCenter:
|
|
2229
|
-
imageCommonPanelInline:
|
|
2230
|
-
imageCommonPanelSpan2:
|
|
2231
|
-
imageCommonPanelSpan3:
|
|
2232
|
-
imageCommonPanelInput:
|
|
2233
|
-
sheetImageMenu:
|
|
2234
|
-
sheetImageMenuInput:
|
|
2219
|
+
const ds = "univer-image-common-panel", ls = "univer-image-common-panel-grid", us = "univer-image-common-panel-border", hs = "univer-image-common-panel-title", gs = "univer-image-common-panel-subtitle", ms = "univer-image-common-panel-row", fs = "univer-image-common-panel-row-vertical", ps = "univer-image-common-panel-column", ws = "univer-image-common-panel-column-center", _s = "univer-image-common-panel-inline", vs = "univer-image-common-panel-span2", Ss = "univer-image-common-panel-span3", Is = "univer-image-common-panel-input", Cs = "univer-sheet-image-menu", Rs = "univer-sheet-image-menu-input", ne = {
|
|
2220
|
+
imageCommonPanel: ds,
|
|
2221
|
+
imageCommonPanelGrid: ls,
|
|
2222
|
+
imageCommonPanelBorder: us,
|
|
2223
|
+
imageCommonPanelTitle: hs,
|
|
2224
|
+
imageCommonPanelSubtitle: gs,
|
|
2225
|
+
imageCommonPanelRow: ms,
|
|
2226
|
+
imageCommonPanelRowVertical: fs,
|
|
2227
|
+
imageCommonPanelColumn: ps,
|
|
2228
|
+
imageCommonPanelColumnCenter: ws,
|
|
2229
|
+
imageCommonPanelInline: _s,
|
|
2230
|
+
imageCommonPanelSpan2: vs,
|
|
2231
|
+
imageCommonPanelSpan3: Ss,
|
|
2232
|
+
imageCommonPanelInput: Is,
|
|
2233
|
+
sheetImageMenu: Cs,
|
|
2234
|
+
sheetImageMenuInput: Rs
|
|
2235
2235
|
};
|
|
2236
2236
|
function Tn(i) {
|
|
2237
2237
|
var e, n, t = "";
|
|
@@ -2246,7 +2246,7 @@ function je() {
|
|
|
2246
2246
|
for (var i, e, n = 0, t = "", r = arguments.length; n < r; n++) (i = arguments[n]) && (e = Tn(i)) && (t && (t += " "), t += e);
|
|
2247
2247
|
return t;
|
|
2248
2248
|
}
|
|
2249
|
-
const
|
|
2249
|
+
const Ms = (i) => {
|
|
2250
2250
|
var S;
|
|
2251
2251
|
const e = le(G), n = le(Je), t = le(q), r = le(X), { drawings: s } = i, o = s[0];
|
|
2252
2252
|
if (o == null)
|
|
@@ -2309,13 +2309,13 @@ const Rs = (i) => {
|
|
|
2309
2309
|
const I = (R) => R ? "block" : "none";
|
|
2310
2310
|
return /* @__PURE__ */ $.jsxs("div", { className: je(ne.imageCommonPanelGrid, ne.imageCommonPanelBorder), style: { display: I(a) }, children: [
|
|
2311
2311
|
/* @__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") }) }) }),
|
|
2312
|
-
/* @__PURE__ */ $.jsx("div", { className: je(ne.imageCommonPanelRow), children: /* @__PURE__ */ $.jsx("div", { className: je(ne.imageCommonPanelColumn), children: /* @__PURE__ */ $.jsxs(
|
|
2312
|
+
/* @__PURE__ */ $.jsx("div", { className: je(ne.imageCommonPanelRow), children: /* @__PURE__ */ $.jsx("div", { className: je(ne.imageCommonPanelColumn), children: /* @__PURE__ */ $.jsxs(di, { value: m, onChange: v, direction: "vertical", children: [
|
|
2313
2313
|
/* @__PURE__ */ $.jsx(ot, { value: y.Both, children: n.t("drawing-anchor.both") }),
|
|
2314
2314
|
/* @__PURE__ */ $.jsx(ot, { value: y.Position, children: n.t("drawing-anchor.position") }),
|
|
2315
2315
|
/* @__PURE__ */ $.jsx(ot, { value: y.None, children: n.t("drawing-anchor.none") })
|
|
2316
2316
|
] }) }) })
|
|
2317
2317
|
] });
|
|
2318
|
-
},
|
|
2318
|
+
}, Ds = () => {
|
|
2319
2319
|
const i = le(q), e = i.getFocusDrawings(), [n, t] = mt(e);
|
|
2320
2320
|
return vt(() => {
|
|
2321
2321
|
const r = i.focus$.subscribe((s) => {
|
|
@@ -2325,21 +2325,21 @@ const Rs = (i) => {
|
|
|
2325
2325
|
r.unsubscribe();
|
|
2326
2326
|
};
|
|
2327
2327
|
}, []), !!(n != null && n.length) && /* @__PURE__ */ $.jsxs("div", { className: ne.imageCommonPanel, children: [
|
|
2328
|
-
/* @__PURE__ */ $.jsx(
|
|
2329
|
-
/* @__PURE__ */ $.jsx(
|
|
2328
|
+
/* @__PURE__ */ $.jsx(wr, { drawings: n }),
|
|
2329
|
+
/* @__PURE__ */ $.jsx(Ms, { drawings: n })
|
|
2330
2330
|
] });
|
|
2331
|
-
},
|
|
2332
|
-
[
|
|
2331
|
+
}, bs = {
|
|
2332
|
+
[$r.FORMULAS_INSERT]: {
|
|
2333
2333
|
[On]: {
|
|
2334
2334
|
order: 3,
|
|
2335
|
-
menuItemFactory:
|
|
2335
|
+
menuItemFactory: os,
|
|
2336
2336
|
[St.id]: {
|
|
2337
2337
|
order: 0,
|
|
2338
|
-
menuItemFactory:
|
|
2338
|
+
menuItemFactory: as
|
|
2339
2339
|
},
|
|
2340
2340
|
[It.id]: {
|
|
2341
2341
|
order: 1,
|
|
2342
|
-
menuItemFactory:
|
|
2342
|
+
menuItemFactory: cs
|
|
2343
2343
|
}
|
|
2344
2344
|
}
|
|
2345
2345
|
}
|
|
@@ -2347,7 +2347,7 @@ const Rs = (i) => {
|
|
|
2347
2347
|
function Me(i) {
|
|
2348
2348
|
return !i.getContextValue(Zn) && !i.getContextValue(Qn) && !i.getContextValue(er) && i.getContextValue(ve);
|
|
2349
2349
|
}
|
|
2350
|
-
const
|
|
2350
|
+
const ys = {
|
|
2351
2351
|
id: Re.id,
|
|
2352
2352
|
description: "shortcut.sheet.drawing-move-down",
|
|
2353
2353
|
group: "4_sheet-drawing-view",
|
|
@@ -2357,7 +2357,7 @@ const bs = {
|
|
|
2357
2357
|
staticParameters: {
|
|
2358
2358
|
direction: re.DOWN
|
|
2359
2359
|
}
|
|
2360
|
-
},
|
|
2360
|
+
}, Os = {
|
|
2361
2361
|
id: Re.id,
|
|
2362
2362
|
description: "shortcut.sheet.drawing-move-up",
|
|
2363
2363
|
group: "4_sheet-drawing-view",
|
|
@@ -2367,7 +2367,7 @@ const bs = {
|
|
|
2367
2367
|
staticParameters: {
|
|
2368
2368
|
direction: re.UP
|
|
2369
2369
|
}
|
|
2370
|
-
},
|
|
2370
|
+
}, Ts = {
|
|
2371
2371
|
id: Re.id,
|
|
2372
2372
|
description: "shortcut.sheet.drawing-move-left",
|
|
2373
2373
|
group: "4_sheet-drawing-view",
|
|
@@ -2377,7 +2377,7 @@ const bs = {
|
|
|
2377
2377
|
staticParameters: {
|
|
2378
2378
|
direction: re.LEFT
|
|
2379
2379
|
}
|
|
2380
|
-
},
|
|
2380
|
+
}, Es = {
|
|
2381
2381
|
id: Re.id,
|
|
2382
2382
|
description: "shortcut.sheet.drawing-move-right",
|
|
2383
2383
|
group: "4_sheet-drawing-view",
|
|
@@ -2387,7 +2387,7 @@ const bs = {
|
|
|
2387
2387
|
staticParameters: {
|
|
2388
2388
|
direction: re.RIGHT
|
|
2389
2389
|
}
|
|
2390
|
-
},
|
|
2390
|
+
}, Ps = {
|
|
2391
2391
|
id: bn.id,
|
|
2392
2392
|
description: "shortcut.sheet.drawing-delete",
|
|
2393
2393
|
group: "4_sheet-drawing-view",
|
|
@@ -2396,10 +2396,10 @@ const bs = {
|
|
|
2396
2396
|
binding: ge.DELETE,
|
|
2397
2397
|
mac: ge.BACKSPACE
|
|
2398
2398
|
};
|
|
2399
|
-
var
|
|
2400
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2399
|
+
var Us = Object.defineProperty, As = Object.getOwnPropertyDescriptor, Ns = (i, e, n, t) => {
|
|
2400
|
+
for (var r = t > 1 ? void 0 : t ? As(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
2401
2401
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
2402
|
-
return t && r &&
|
|
2402
|
+
return t && r && Us(e, n, r), r;
|
|
2403
2403
|
}, We = (i, e) => (n, t) => e(n, t, i);
|
|
2404
2404
|
let Xe = class extends Z {
|
|
2405
2405
|
constructor(i, e, n, t) {
|
|
@@ -2407,10 +2407,10 @@ let Xe = class extends Z {
|
|
|
2407
2407
|
}
|
|
2408
2408
|
_initCustomComponents() {
|
|
2409
2409
|
const i = this._componentManager;
|
|
2410
|
-
this.disposeWithMe(i.register(yn, Dn)), this.disposeWithMe(i.register(pn,
|
|
2410
|
+
this.disposeWithMe(i.register(yn, Dn)), this.disposeWithMe(i.register(pn, Ds));
|
|
2411
2411
|
}
|
|
2412
2412
|
_initMenus() {
|
|
2413
|
-
this._menuManagerService.mergeMenu(
|
|
2413
|
+
this._menuManagerService.mergeMenu(bs);
|
|
2414
2414
|
}
|
|
2415
2415
|
_initCommands() {
|
|
2416
2416
|
[
|
|
@@ -2432,11 +2432,11 @@ let Xe = class extends Z {
|
|
|
2432
2432
|
_initShortcuts() {
|
|
2433
2433
|
[
|
|
2434
2434
|
// sheet drawing shortcuts
|
|
2435
|
-
bs,
|
|
2436
2435
|
ys,
|
|
2437
2436
|
Os,
|
|
2438
2437
|
Ts,
|
|
2439
|
-
Es
|
|
2438
|
+
Es,
|
|
2439
|
+
Ps
|
|
2440
2440
|
].forEach((i) => {
|
|
2441
2441
|
this.disposeWithMe(this._shortcutService.registerShortcut(i));
|
|
2442
2442
|
});
|
|
@@ -2445,18 +2445,18 @@ let Xe = class extends Z {
|
|
|
2445
2445
|
this._initCommands(), this._initCustomComponents(), this._initMenus(), this._initShortcuts();
|
|
2446
2446
|
}
|
|
2447
2447
|
};
|
|
2448
|
-
Xe =
|
|
2449
|
-
We(0, N(
|
|
2450
|
-
We(1,
|
|
2448
|
+
Xe = Ns([
|
|
2449
|
+
We(0, N(Br)),
|
|
2450
|
+
We(1, Lr),
|
|
2451
2451
|
We(2, G),
|
|
2452
|
-
We(3,
|
|
2452
|
+
We(3, Gr)
|
|
2453
2453
|
], Xe);
|
|
2454
|
-
var
|
|
2455
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2454
|
+
var js = Object.defineProperty, Ws = Object.getOwnPropertyDescriptor, xs = (i, e, n, t) => {
|
|
2455
|
+
for (var r = t > 1 ? void 0 : t ? Ws(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
2456
2456
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
2457
|
-
return t && r &&
|
|
2457
|
+
return t && r && js(e, n, r), r;
|
|
2458
2458
|
}, de = (i, e) => (n, t) => e(n, t, i);
|
|
2459
|
-
function
|
|
2459
|
+
function $s(i, e, n, t) {
|
|
2460
2460
|
const { scaleX: r, scaleY: s } = e.getAncestorScale(), o = e.getViewport(kt.VIEW_MAIN), d = {
|
|
2461
2461
|
left: !0,
|
|
2462
2462
|
top: !0
|
|
@@ -2496,7 +2496,7 @@ const dt = (i, e, n, t) => {
|
|
|
2496
2496
|
right: s + d,
|
|
2497
2497
|
top: o,
|
|
2498
2498
|
bottom: o + l
|
|
2499
|
-
}, a =
|
|
2499
|
+
}, a = $s(c, r, n, t), { scaleX: h, scaleY: u } = r.getAncestorScale();
|
|
2500
2500
|
return {
|
|
2501
2501
|
startX: a.left,
|
|
2502
2502
|
endX: a.right,
|
|
@@ -2523,7 +2523,7 @@ let ze = class extends Z {
|
|
|
2523
2523
|
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();
|
|
2524
2524
|
}
|
|
2525
2525
|
_bindScrollEvent() {
|
|
2526
|
-
this._lifecycleService.lifecycle$.pipe(se((e) => e === nr.Rendered),
|
|
2526
|
+
this._lifecycleService.lifecycle$.pipe(se((e) => e === nr.Rendered), Vr(1)).subscribe(() => {
|
|
2527
2527
|
this._scrollUpdateListener();
|
|
2528
2528
|
});
|
|
2529
2529
|
}
|
|
@@ -2592,8 +2592,8 @@ let ze = class extends Z {
|
|
|
2592
2592
|
}, M = h === V.DRAWING_CHART;
|
|
2593
2593
|
M && (D.fill = "white", D.rotateEnabled = !1, u && u.border && (D.stroke = u.border), D.paintFirst = "stroke", D.strokeWidth = 1, D.borderEnabled = !1, D.radius = 8);
|
|
2594
2594
|
const U = new Ut(A, D);
|
|
2595
|
-
M && U.setObjectType(
|
|
2596
|
-
const x = this._ensureMap(t, r), ee = new rr(), Un = dt(U, m.renderObject, c.skeleton, o.worksheet), tt = new
|
|
2595
|
+
M && U.setObjectType(Ir.CHART), f.addObject(U, Cr), d.allowTransform !== !1 && f.attachTransformerTo(U);
|
|
2596
|
+
const x = this._ensureMap(t, r), ee = new rr(), Un = dt(U, m.renderObject, c.skeleton, o.worksheet), tt = new kr(Un), An = {
|
|
2597
2597
|
dispose: ee,
|
|
2598
2598
|
rect: U,
|
|
2599
2599
|
position$: tt,
|
|
@@ -2675,12 +2675,12 @@ let ze = class extends Z {
|
|
|
2675
2675
|
})
|
|
2676
2676
|
), this.disposeWithMe(this._commandService.onCommandExecuted((n) => {
|
|
2677
2677
|
var t, r;
|
|
2678
|
-
if (n.id ===
|
|
2678
|
+
if (n.id === Ur.id) {
|
|
2679
2679
|
const s = n.params, { unitId: o } = s;
|
|
2680
2680
|
Array.from((r = (t = this._domLayerMap.get(o)) == null ? void 0 : t.keys()) != null ? r : []).forEach((l) => {
|
|
2681
2681
|
e(o, l);
|
|
2682
2682
|
});
|
|
2683
|
-
} else if (n.id ===
|
|
2683
|
+
} else if (n.id === si.id) {
|
|
2684
2684
|
const { unitId: s, subUnitId: o } = n.params;
|
|
2685
2685
|
e(s, o);
|
|
2686
2686
|
}
|
|
@@ -2806,26 +2806,26 @@ let ze = class extends Z {
|
|
|
2806
2806
|
};
|
|
2807
2807
|
}
|
|
2808
2808
|
};
|
|
2809
|
-
ze =
|
|
2809
|
+
ze = xs([
|
|
2810
2810
|
de(0, N(X)),
|
|
2811
2811
|
de(1, fe),
|
|
2812
2812
|
de(2, N(G)),
|
|
2813
2813
|
de(3, q),
|
|
2814
|
-
de(4, N(
|
|
2814
|
+
de(4, N(Fr)),
|
|
2815
2815
|
de(5, z),
|
|
2816
2816
|
de(6, N(tr))
|
|
2817
2817
|
], ze);
|
|
2818
|
-
var En = Object.defineProperty,
|
|
2819
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2818
|
+
var En = Object.defineProperty, Bs = Object.getOwnPropertyDescriptor, Ls = (i, e, n) => e in i ? En(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n, Gs = (i, e, n, t) => {
|
|
2819
|
+
for (var r = t > 1 ? void 0 : t ? Bs(e, n) : e, s = i.length - 1, o; s >= 0; s--)
|
|
2820
2820
|
(o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
|
|
2821
2821
|
return t && r && En(e, n, r), r;
|
|
2822
|
-
}, lt = (i, e) => (n, t) => e(n, t, i), Pn = (i, e, n) =>
|
|
2823
|
-
const
|
|
2822
|
+
}, lt = (i, e) => (n, t) => e(n, t, i), Pn = (i, e, n) => Ls(i, typeof e != "symbol" ? e + "" : e, n);
|
|
2823
|
+
const Fs = "SHEET_IMAGE_UI_PLUGIN";
|
|
2824
2824
|
let Ke = class extends ar {
|
|
2825
|
-
constructor(i =
|
|
2825
|
+
constructor(i = ui, e, n, t) {
|
|
2826
2826
|
super(), this._config = i, this._injector = e, this._renderManagerService = n, this._configService = t;
|
|
2827
2827
|
const { menu: r, ...s } = this._config;
|
|
2828
|
-
r && this._configService.setConfig("menu", r, { merge: !0 }), this._configService.setConfig(
|
|
2828
|
+
r && this._configService.setConfig("menu", r, { merge: !0 }), this._configService.setConfig(li, s);
|
|
2829
2829
|
}
|
|
2830
2830
|
onStarting() {
|
|
2831
2831
|
cr(this._injector, [
|
|
@@ -2871,9 +2871,9 @@ let Ke = class extends ar {
|
|
|
2871
2871
|
}
|
|
2872
2872
|
};
|
|
2873
2873
|
Pn(Ke, "type", L.UNIVER_SHEET);
|
|
2874
|
-
Pn(Ke, "pluginName",
|
|
2875
|
-
Ke =
|
|
2876
|
-
or(
|
|
2874
|
+
Pn(Ke, "pluginName", Fs);
|
|
2875
|
+
Ke = Gs([
|
|
2876
|
+
or(hr, ur, _r, Rr),
|
|
2877
2877
|
lt(1, N(Ie)),
|
|
2878
2878
|
lt(2, X),
|
|
2879
2879
|
lt(3, dr)
|