@univerjs/sheets-drawing-ui 0.5.0-nightly.202411191606 → 0.5.0-nightly.202411211606

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/es/index.js CHANGED
@@ -1,18 +1,18 @@
1
1
  var mn = Object.defineProperty;
2
2
  var fn = (i, e, n) => e in i ? mn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n;
3
3
  var V = (i, e, n) => fn(i, typeof e != "symbol" ? e + "" : e, n);
4
- import { CommandType as H, ICommandService as B, IUndoRedoService as ue, sequenceExecute as It, LocaleService as Be, IUniverInstanceService as fe, useDependency as ae, Inject as W, Injector as Rt, IContextService as Dt, RxDisposable as pn, UniverInstanceType as Y, connectInjector as wn, toDisposable as _n, FOCUSING_COMMON_DRAWINGS as me, Disposable as ie, Direction as te, FOCUSING_FX_BAR_EDITOR as vn, EDITOR_ACTIVATED as Sn, FOCUSING_PANEL_EDITOR as Cn, Tools as ge, UserManagerService as In, IPermissionService as Rn, Rectangle as Dn, LifecycleService as Mn, LifecycleStages as bn, DisposableCollection as yn, fromEventSubject as On, generateRandomId as Tn, DependentOn as Pn, Plugin as En, registerDependencies as Un, touchDependencies as Xe, IConfigService as An } from "@univerjs/core";
4
+ import { CommandType as H, ICommandService as B, IUndoRedoService as ue, sequenceExecute as It, LocaleService as Be, IUniverInstanceService as fe, useDependency as ae, Inject as W, Injector as Rt, IContextService as Dt, RxDisposable as pn, UniverInstanceType as Y, connectInjector as wn, toDisposable as _n, FOCUSING_COMMON_DRAWINGS as me, Disposable as ie, Direction as te, FOCUSING_FX_BAR_EDITOR as vn, EDITOR_ACTIVATED as Sn, FOCUSING_PANEL_EDITOR as Cn, Tools as ge, UserManagerService as In, IPermissionService as Rn, Rectangle as Dn, LifecycleService as Mn, LifecycleStages as bn, DisposableCollection as yn, fromEventSubject as On, generateRandomId as Pn, DependentOn as Tn, Plugin as En, registerDependencies as Un, touchDependencies as Xe, IConfigService as An } from "@univerjs/core";
5
5
  import { IDrawingManagerService as K, IImageIoService as Mt, DrawingTypeEnum as k, ArrangeTypeEnum as ve, DRAWING_IMAGE_ALLOW_IMAGE_LIST as Nn, DRAWING_IMAGE_COUNT_LIMIT as mt, ImageUploadStatusType as He, DRAWING_IMAGE_ALLOW_SIZE as jn, getImageSize as Wn, DRAWING_IMAGE_WIDTH_LIMIT as ft, DRAWING_IMAGE_HEIGHT_LIMIT as pt, getDrawingShapeKeyByDrawingSearch as ze, UniverDrawingPlugin as xn } from "@univerjs/drawing";
6
6
  import { ImageCropperObject as $n, COMPONENT_IMAGE_POPUP_MENU as Ln, OpenImageCropOperation as Bn, ImageResetSizeOperation as Gn, DrawingCommonPanel as Vn, DrawingRenderService as kn, UniverDrawingUIPlugin as Yn } from "@univerjs/drawing-ui";
7
7
  import { IRenderManagerService as J, precisionTo as ne, getGroupState as Fn, transformObjectOutOfGroup as Xn, RENDER_CLASS_TYPE as de, Rect as wt, ObjectType as Hn, DRAWING_OBJECT_LAYER_INDEX as zn, SHEET_VIEWPORT_KEY as Kn } from "@univerjs/engine-render";
8
- import { ISheetDrawingService as F, SetDrawingApplyMutation as T, DrawingApplyType as P, SheetDrawingAnchorType as y, UniverSheetsDrawingPlugin as Jn } from "@univerjs/sheets-drawing";
9
- import { SheetCanvasPopManagerService as Zn, attachRangeWithCoord as Pe, ISheetSelectionRenderService as pe, SheetSkeletonManagerService as q, getCurrentRangeDisable$ as qn, COPY_TYPE as _t, PREDEFINED_HOOK_NAME as Se, virtualizeDiscreteRanges as Qn, ISheetClipboardService as er, SheetPrintInterceptorService as tr, VIEWPORT_KEY as nr, SetZoomRatioOperation as rr } from "@univerjs/sheets-ui";
8
+ import { ISheetDrawingService as F, SetDrawingApplyMutation as P, DrawingApplyType as T, SheetDrawingAnchorType as y, UniverSheetsDrawingPlugin as Jn } from "@univerjs/sheets-drawing";
9
+ import { SheetCanvasPopManagerService as Zn, attachRangeWithCoord as Te, ISheetSelectionRenderService as pe, SheetSkeletonManagerService as q, getCurrentRangeDisable$ as qn, COPY_TYPE as _t, PREDEFINED_HOOK_NAME as Se, virtualizeDiscreteRanges as Qn, ISheetClipboardService as er, SheetPrintInterceptorService as tr, VIEWPORT_KEY as nr, SetZoomRatioOperation as rr } from "@univerjs/sheets-ui";
10
10
  import { ISidebarService as ir, IUIPartsService as sr, BuiltInUIPart as or, ILocalFileService as ar, IMessageService as cr, MenuItemType as bt, getMenuHiddenObservable as yt, RibbonStartGroup as dr, KeyCode as le, ComponentManager as lr, IMenuManagerService as ur, IShortcutService as hr, CanvasFloatDomService as gr } from "@univerjs/ui";
11
11
  import { takeUntil as vt, combineLatest as Ce, map as Ee, filter as re, distinctUntilChanged as Ie, Subject as Ke, take as mr, BehaviorSubject as fr, switchMap as St } from "rxjs";
12
- import { SheetInterceptorService as at, getSheetCommandTarget as ce, SheetsSelectionsService as pr, WorkbookEditablePermission as tt, WorksheetEditPermission as Te, RangeProtectionPermissionEditPoint as wr, WorkbookViewPermission as Ct, WorksheetViewPermission as Je, InsertRowCommand as Ot, InsertColCommand as Tt, RemoveRowCommand as Pt, RemoveColCommand as Et, DeleteRangeMoveLeftCommand as Ut, DeleteRangeMoveUpCommand as At, InsertRangeMoveDownCommand as Nt, InsertRangeMoveRightCommand as jt, DeltaRowHeightCommand as nt, SetRowHeightCommand as rt, DeltaColumnWidthCommand as Wt, SetColWidthCommand as xt, SetRowHiddenCommand as $t, SetSpecificRowsVisibleCommand as Lt, SetSpecificColsVisibleCommand as Bt, SetColHiddenCommand as Gt, MoveColsCommand as Vt, MoveRowsCommand as kt, MoveRangeCommand as Yt, SetRowVisibleMutation as _r, SetRowHiddenMutation as vr, SetColVisibleMutation as Sr, SetColHiddenMutation as Cr, SetWorksheetRowHeightMutation as Ir, SetWorksheetColWidthMutation as Rr, SetWorksheetActiveOperation as Dr, SetFrozenMutation as Mr } from "@univerjs/sheets";
12
+ import { SheetInterceptorService as at, getSheetCommandTarget as ce, SheetsSelectionsService as pr, WorkbookEditablePermission as tt, WorksheetEditPermission as Pe, RangeProtectionPermissionEditPoint as wr, WorkbookViewPermission as Ct, WorksheetViewPermission as Je, InsertRowCommand as Ot, InsertColCommand as Pt, RemoveRowCommand as Tt, RemoveColCommand as Et, DeleteRangeMoveLeftCommand as Ut, DeleteRangeMoveUpCommand as At, InsertRangeMoveDownCommand as Nt, InsertRangeMoveRightCommand as jt, DeltaRowHeightCommand as nt, SetRowHeightCommand as rt, DeltaColumnWidthCommand as Wt, SetColWidthCommand as xt, SetRowHiddenCommand as $t, SetSpecificRowsVisibleCommand as Lt, SetSpecificColsVisibleCommand as Bt, SetColHiddenCommand as Gt, MoveColsCommand as Vt, MoveRowsCommand as kt, MoveRangeCommand as Yt, SetRowVisibleMutation as _r, SetRowHiddenMutation as vr, SetColVisibleMutation as Sr, SetColHiddenMutation as Cr, SetWorksheetRowHeightMutation as Ir, SetWorksheetColWidthMutation as Rr, SetWorksheetActiveOperation as Dr, SetFrozenMutation as Mr } from "@univerjs/sheets";
13
13
  import Ft, { useEffect as ct, forwardRef as Xt, useRef as br, createElement as Ht, useState as it } from "react";
14
14
  import { MessageType as Re, RadioGroup as yr, Radio as Ze } from "@univerjs/design";
15
- const Or = "sheets-drawing-ui.config", Tr = {}, j = {
15
+ const Or = "sheets-drawing-ui.config", Pr = {}, j = {
16
16
  id: "sheet.operation.clear-drawing-transformer",
17
17
  type: H.MUTATION,
18
18
  handler: (i, e) => {
@@ -34,7 +34,7 @@ const Or = "sheets-drawing-ui.config", Tr = {}, j = {
34
34
  const { unitId: I } = _;
35
35
  d.push(I);
36
36
  });
37
- const l = s.getBatchRemoveOp(o), { unitId: g, subUnitId: c, undo: a, redo: h, objects: u } = l, m = r.onCommandExecute({ id: Ge.id, params: e }), f = { id: T.id, params: { unitId: g, subUnitId: c, op: h, objects: u, type: P.REMOVE } }, p = { id: T.id, params: { unitId: g, subUnitId: c, op: a, objects: u, type: P.INSERT } };
37
+ const l = s.getBatchRemoveOp(o), { unitId: g, subUnitId: c, undo: a, redo: h, objects: u } = l, m = r.onCommandExecute({ id: Ge.id, params: e }), f = { id: P.id, params: { unitId: g, subUnitId: c, op: h, objects: u, type: T.REMOVE } }, p = { id: P.id, params: { unitId: g, subUnitId: c, op: a, objects: u, type: T.INSERT } };
38
38
  return It([...(S = m.preRedos) != null ? S : [], f, ...m.redos], n) ? (t.pushUndoRedo({
39
39
  unitID: g,
40
40
  undoMutations: [
@@ -93,7 +93,7 @@ var Zt = { exports: {} }, Ve = {};
93
93
  * This source code is licensed under the MIT license found in the
94
94
  * LICENSE file in the root directory of this source tree.
95
95
  */
96
- var Pr = Ft, Er = Symbol.for("react.element"), Ur = Symbol.for("react.fragment"), Ar = Object.prototype.hasOwnProperty, Nr = Pr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, jr = { key: !0, ref: !0, __self: !0, __source: !0 };
96
+ var Tr = Ft, Er = Symbol.for("react.element"), Ur = Symbol.for("react.fragment"), Ar = Object.prototype.hasOwnProperty, Nr = Tr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, jr = { key: !0, ref: !0, __self: !0, __source: !0 };
97
97
  function qt(i, e, n) {
98
98
  var t, r = {}, s = null, o = null;
99
99
  n !== void 0 && (s = "" + n), e.key !== void 0 && (s = "" + e.key), e.ref !== void 0 && (o = e.ref);
@@ -183,18 +183,22 @@ let Ue = class extends pn {
183
183
  if (!g)
184
184
  return;
185
185
  const { unitId: c, subUnitId: a, drawingId: h, drawingType: u } = g, m = g.data;
186
- m && m.disablePopup || (r == null || r.dispose(), r = this.disposeWithMe(this._canvasPopManagerService.attachPopupToObject(d, {
186
+ if (m && m.disablePopup)
187
+ return;
188
+ r == null || r.dispose();
189
+ const f = this._canvasPopManagerService.getFeatureMenu(c, a, h, u);
190
+ r = this.disposeWithMe(this._canvasPopManagerService.attachPopupToObject(d, {
187
191
  componentKey: Ln,
188
192
  direction: "horizontal",
189
193
  offset: [2, 0],
190
194
  extraProps: {
191
- menuItems: this._getImageMenuItems(c, a, h, u)
195
+ menuItems: f || this._getImageMenuItems(c, a, h, u)
192
196
  }
193
197
  })), this._drawingManagerService.focusDrawing([{
194
198
  unitId: c,
195
199
  subUnitId: a,
196
200
  drawingId: h
197
- }]));
201
+ }]);
198
202
  })
199
203
  )
200
204
  ), this.disposeWithMe(
@@ -250,7 +254,7 @@ Ue = Yr([
250
254
  se(6, W(sr))
251
255
  ], Ue);
252
256
  function L(i, e, n) {
253
- 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: C } = r, S = n.getCurrentSkeleton(), v = Pe(S, {
257
+ 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: C } = r, S = n.getCurrentSkeleton(), v = Te(S, {
254
258
  startColumn: c,
255
259
  endColumn: c,
256
260
  startRow: h,
@@ -258,7 +262,7 @@ function L(i, e, n) {
258
262
  });
259
263
  if (v == null)
260
264
  return;
261
- const R = Pe(S, {
265
+ const R = Te(S, {
262
266
  startColumn: m,
263
267
  endColumn: m,
264
268
  startRow: p,
@@ -487,14 +491,14 @@ const rn = {
487
491
  });
488
492
  });
489
493
  const o = r.getGroupDrawingOp(e), { unitId: d, subUnitId: l, undo: g, redo: c, objects: a } = o;
490
- return n.syncExecuteCommand(T.id, { op: c, unitId: d, subUnitId: l, objects: a, type: P.GROUP }) ? (t.pushUndoRedo({
494
+ return n.syncExecuteCommand(P.id, { op: c, unitId: d, subUnitId: l, objects: a, type: T.GROUP }) ? (t.pushUndoRedo({
491
495
  unitID: d,
492
496
  undoMutations: [
493
- { id: T.id, params: { op: g, unitId: d, subUnitId: l, objects: ei(a), type: P.UNGROUP } },
497
+ { id: P.id, params: { op: g, unitId: d, subUnitId: l, objects: ei(a), type: T.UNGROUP } },
494
498
  { id: j.id, params: s }
495
499
  ],
496
500
  redoMutations: [
497
- { id: T.id, params: { op: c, unitId: d, subUnitId: l, objects: a, type: P.GROUP } },
501
+ { id: P.id, params: { op: c, unitId: d, subUnitId: l, objects: a, type: T.GROUP } },
498
502
  { id: j.id, params: s }
499
503
  ]
500
504
  }), !0) : !1;
@@ -506,7 +510,7 @@ const rn = {
506
510
  var S, v, R;
507
511
  const n = i.get(B), t = i.get(ue), r = i.get(F), s = i.get(at);
508
512
  if (!e) return !1;
509
- const o = e.drawings, d = o.map((_) => _.unitId), l = r.getBatchAddOp(o), { unitId: g, subUnitId: c, undo: a, redo: h, objects: u } = l, m = s.onCommandExecute({ id: ke.id, params: e }), f = { id: T.id, params: { op: h, unitId: g, subUnitId: c, objects: u, type: P.INSERT } }, p = { id: T.id, params: { op: a, unitId: g, subUnitId: c, objects: u, type: P.REMOVE } };
513
+ const o = e.drawings, d = o.map((_) => _.unitId), l = r.getBatchAddOp(o), { unitId: g, subUnitId: c, undo: a, redo: h, objects: u } = l, m = s.onCommandExecute({ id: ke.id, params: e }), f = { id: P.id, params: { op: h, unitId: g, subUnitId: c, objects: u, type: T.INSERT } }, p = { id: P.id, params: { op: a, unitId: g, subUnitId: c, objects: u, type: T.REMOVE } };
510
514
  return It([...(S = m.preRedos) != null ? S : [], f, ...m.redos], n) ? (t.pushUndoRedo({
511
515
  unitID: g,
512
516
  undoMutations: [
@@ -534,13 +538,13 @@ const rn = {
534
538
  if (l === ve.forward ? c = r.getForwardDrawingsOp(g) : l === ve.backward ? c = r.getBackwardDrawingOp(g) : l === ve.front ? c = r.getFrontDrawingsOp(g) : l === ve.back && (c = r.getBackDrawingsOp(g)), c == null)
535
539
  return !1;
536
540
  const { objects: a, redo: h, undo: u } = c;
537
- return n.syncExecuteCommand(T.id, { op: h, unitId: s, subUnitId: o, objects: a, type: P.ARRANGE }) ? (t.pushUndoRedo({
541
+ return n.syncExecuteCommand(P.id, { op: h, unitId: s, subUnitId: o, objects: a, type: T.ARRANGE }) ? (t.pushUndoRedo({
538
542
  unitID: s,
539
543
  undoMutations: [
540
- { id: T.id, params: { op: u, unitId: s, subUnitId: o, objects: a, type: P.ARRANGE } }
544
+ { id: P.id, params: { op: u, unitId: s, subUnitId: o, objects: a, type: T.ARRANGE } }
541
545
  ],
542
546
  redoMutations: [
543
- { id: T.id, params: { op: h, unitId: s, subUnitId: o, objects: a, type: P.ARRANGE } }
547
+ { id: P.id, params: { op: h, unitId: s, subUnitId: o, objects: a, type: T.ARRANGE } }
544
548
  ]
545
549
  }), !0) : !1;
546
550
  }
@@ -551,14 +555,14 @@ const rn = {
551
555
  const n = i.get(B), t = i.get(ue), r = i.get(F);
552
556
  if (!e) return !1;
553
557
  const { drawings: s } = e, o = r.getBatchUpdateOp(s), { unitId: d, subUnitId: l, undo: g, redo: c, objects: a } = o;
554
- return n.syncExecuteCommand(T.id, { unitId: d, subUnitId: l, op: c, objects: a, type: P.UPDATE }) ? (t.pushUndoRedo({
558
+ return n.syncExecuteCommand(P.id, { unitId: d, subUnitId: l, op: c, objects: a, type: T.UPDATE }) ? (t.pushUndoRedo({
555
559
  unitID: d,
556
560
  undoMutations: [
557
- { id: T.id, params: { unitId: d, subUnitId: l, op: g, objects: a, type: P.UPDATE } },
561
+ { id: P.id, params: { unitId: d, subUnitId: l, op: g, objects: a, type: T.UPDATE } },
558
562
  { id: j.id, params: [d] }
559
563
  ],
560
564
  redoMutations: [
561
- { id: T.id, params: { unitId: d, subUnitId: l, op: c, objects: a, type: P.UPDATE } },
565
+ { id: P.id, params: { unitId: d, subUnitId: l, op: c, objects: a, type: T.UPDATE } },
562
566
  { id: j.id, params: [d] }
563
567
  ]
564
568
  }), !0) : !1;
@@ -576,14 +580,14 @@ const rn = {
576
580
  });
577
581
  });
578
582
  const o = r.getUngroupDrawingOp(e), { unitId: d, subUnitId: l, undo: g, redo: c, objects: a } = o;
579
- return n.syncExecuteCommand(T.id, { op: c, unitId: d, subUnitId: l, objects: a, type: P.UNGROUP }) ? (t.pushUndoRedo({
583
+ return n.syncExecuteCommand(P.id, { op: c, unitId: d, subUnitId: l, objects: a, type: T.UNGROUP }) ? (t.pushUndoRedo({
580
584
  unitID: d,
581
585
  undoMutations: [
582
- { id: T.id, params: { op: g, unitId: d, subUnitId: l, objects: Qr(a), type: P.GROUP } },
586
+ { id: P.id, params: { op: g, unitId: d, subUnitId: l, objects: Qr(a), type: T.GROUP } },
583
587
  { id: j.id, params: s }
584
588
  ],
585
589
  redoMutations: [
586
- { id: T.id, params: { op: c, unitId: d, subUnitId: l, objects: a, type: P.UNGROUP } },
590
+ { id: P.id, params: { op: c, unitId: d, subUnitId: l, objects: a, type: T.UNGROUP } },
587
591
  { id: j.id, params: s }
588
592
  ]
589
593
  }), !0) : !1;
@@ -670,7 +674,7 @@ let Ae = class extends ie {
670
674
  endColumn: 0
671
675
  };
672
676
  s && s.length > 0 && (o = s[s.length - 1].range);
673
- const d = Pe(this._skeletonManagerService.getCurrent().skeleton, o);
677
+ const d = Te(this._skeletonManagerService.getCurrent().skeleton, o);
674
678
  if (d == null)
675
679
  return;
676
680
  let { startColumn: l, startRow: g, startX: c, startY: a } = d, h = !1;
@@ -803,7 +807,7 @@ function ii(i) {
803
807
  icon: an,
804
808
  tooltip: "sheetImage.title",
805
809
  hidden$: yt(i, Y.UNIVER_SHEET),
806
- disabled$: qn(i, { workbookTypes: [tt], worksheetTypes: [Te], rangeTypes: [wr] })
810
+ disabled$: qn(i, { workbookTypes: [tt], worksheetTypes: [Pe], rangeTypes: [wr] })
807
811
  };
808
812
  }
809
813
  function si(i) {
@@ -990,10 +994,10 @@ const Di = {
990
994
  binding: le.DELETE,
991
995
  mac: le.BACKSPACE
992
996
  };
993
- var Ti = Object.defineProperty, Pi = Object.getOwnPropertyDescriptor, Ei = (i, e, n, t) => {
994
- for (var r = t > 1 ? void 0 : t ? Pi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
997
+ var Pi = Object.defineProperty, Ti = Object.getOwnPropertyDescriptor, Ei = (i, e, n, t) => {
998
+ for (var r = t > 1 ? void 0 : t ? Ti(e, n) : e, s = i.length - 1, o; s >= 0; s--)
995
999
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
996
- return t && r && Ti(e, n, r), r;
1000
+ return t && r && Pi(e, n, r), r;
997
1001
  }, ye = (i, e) => (n, t) => e(n, t, i);
998
1002
  let Ne = class extends ie {
999
1003
  constructor(i, e, n, t) {
@@ -1147,27 +1151,27 @@ let je = class extends ie {
1147
1151
  if (w) {
1148
1152
  const { undo: U, redo: x, objects: Z } = O.getBatchUpdateOp([D]);
1149
1153
  C.push({
1150
- id: T.id,
1154
+ id: P.id,
1151
1155
  params: {
1152
1156
  unitId: s,
1153
1157
  subUnitId: o,
1154
- type: P.UPDATE,
1158
+ type: T.UPDATE,
1155
1159
  op: x,
1156
1160
  objects: Z
1157
1161
  }
1158
1162
  }), S.push({
1159
- id: T.id,
1163
+ id: P.id,
1160
1164
  params: {
1161
1165
  unitId: s,
1162
1166
  subUnitId: o,
1163
- type: P.UPDATE,
1167
+ type: T.UPDATE,
1164
1168
  op: U,
1165
1169
  objects: Z
1166
1170
  }
1167
1171
  });
1168
1172
  } else {
1169
1173
  const { undo: U, redo: x, objects: Z } = O.getBatchAddOp([D]);
1170
- C.push({ id: T.id, params: { op: x, unitId: s, subUnitId: o, objects: Z, type: P.INSERT } }), S.push({ id: T.id, params: { op: U, unitId: s, subUnitId: o, objects: Z, type: P.REMOVE } });
1174
+ C.push({ id: P.id, params: { op: x, unitId: s, subUnitId: o, objects: Z, type: T.INSERT } }), S.push({ id: P.id, params: { op: U, unitId: s, subUnitId: o, objects: Z, type: T.REMOVE } });
1171
1175
  }
1172
1176
  }), {
1173
1177
  redos: C,
@@ -1232,7 +1236,7 @@ let We = class extends ie {
1232
1236
  return;
1233
1237
  }
1234
1238
  const r = e.getUnitId(), s = t.getSheetId();
1235
- if (this._permissionService.composePermission([new tt(r).id, new Te(r, s).id]).every((d) => d.value))
1239
+ if (this._permissionService.composePermission([new tt(r).id, new Pe(r, s).id]).every((d) => d.value))
1236
1240
  this._drawingManagerService.setDrawingEditable(!0);
1237
1241
  else {
1238
1242
  this._drawingManagerService.setDrawingEditable(!1);
@@ -1299,7 +1303,7 @@ let We = class extends ie {
1299
1303
  const d = this._renderManagerService.getRenderById(r), l = d == null ? void 0 : d.scene;
1300
1304
  if (l == null)
1301
1305
  return;
1302
- const g = l.getTransformerByCreate(), c = this._permissionService.composePermission$([new tt(r).id, new Te(r, s).id]).pipe(Ee((h) => h.every((u) => u.value)));
1306
+ const g = l.getTransformerByCreate(), c = this._permissionService.composePermission$([new tt(r).id, new Pe(r, s).id]).pipe(Ee((h) => h.every((u) => u.value)));
1303
1307
  c == null || c.pipe(
1304
1308
  re((h) => h !== o),
1305
1309
  Ie()
@@ -1313,7 +1317,7 @@ let We = class extends ie {
1313
1317
  p.classType === de.IMAGE && f.some((C) => p.oKey.includes(C.drawingId)) && l.detachTransformerFrom(p);
1314
1318
  }), g.clearSelectedObjects());
1315
1319
  }
1316
- }), (a = this._permissionService.getPermissionPoint$(new Te(r, s).id)) == null || a.pipe(
1320
+ }), (a = this._permissionService.getPermissionPoint$(new Pe(r, s).id)) == null || a.pipe(
1317
1321
  re((h) => h.value !== o),
1318
1322
  Ie()
1319
1323
  ).subscribe({
@@ -1401,8 +1405,8 @@ var Gi = Object.defineProperty, Vi = Object.getOwnPropertyDescriptor, ki = (i, e
1401
1405
  }, Q = (i, e) => (n, t) => e(n, t, i);
1402
1406
  const Yi = [
1403
1407
  Ot.id,
1404
- Tt.id,
1405
1408
  Pt.id,
1409
+ Tt.id,
1406
1410
  Et.id,
1407
1411
  Ut.id,
1408
1412
  At.id,
@@ -1444,9 +1448,9 @@ let ot = class extends ie {
1444
1448
  return this._moveRowInterceptor(i.params, "insert");
1445
1449
  if ([Vt.id, kt.id, Yt.id].includes(e))
1446
1450
  return this._moveRangeInterceptor(i.params);
1447
- if (e === Tt.id)
1448
- return this._moveColInterceptor(i.params, "insert");
1449
1451
  if (e === Pt.id)
1452
+ return this._moveColInterceptor(i.params, "insert");
1453
+ if (e === Tt.id)
1450
1454
  return this._moveRowInterceptor(i.params, "remove");
1451
1455
  if (e === Et.id)
1452
1456
  return this._moveColInterceptor(i.params, "remove");
@@ -1505,11 +1509,11 @@ let ot = class extends ie {
1505
1509
  return { redos: [], undos: [] };
1506
1510
  if (l.length > 0) {
1507
1511
  const c = this._sheetDrawingService.getBatchUpdateOp(l), { undo: a, redo: h, objects: u } = c;
1508
- s.push({ id: T.id, params: { unitId: t, subUnitId: r, op: h, objects: u, type: P.UPDATE } }), o.push({ id: T.id, params: { unitId: t, subUnitId: r, op: a, objects: u, type: P.UPDATE } });
1512
+ s.push({ id: P.id, params: { unitId: t, subUnitId: r, op: h, objects: u, type: T.UPDATE } }), o.push({ id: P.id, params: { unitId: t, subUnitId: r, op: a, objects: u, type: T.UPDATE } });
1509
1513
  }
1510
1514
  if (g.length > 0) {
1511
1515
  const c = this._sheetDrawingService.getBatchRemoveOp(g), a = c.undo, h = c.redo, u = c.objects;
1512
- s.push({ id: T.id, params: { unitId: t, subUnitId: r, op: h, objects: u, type: P.REMOVE } }), o.push({ id: T.id, params: { unitId: t, subUnitId: r, op: a, objects: u, type: P.INSERT } });
1516
+ s.push({ id: P.id, params: { unitId: t, subUnitId: r, op: h, objects: u, type: T.REMOVE } }), o.push({ id: P.id, params: { unitId: t, subUnitId: r, op: a, objects: u, type: T.INSERT } });
1513
1517
  }
1514
1518
  return s.push({ id: j.id, params: [t] }), o.push({ id: j.id, params: [t] }), {
1515
1519
  redos: s,
@@ -1642,10 +1646,10 @@ let ot = class extends ie {
1642
1646
  }
1643
1647
  _createUndoAndRedoMutation(i, e, n) {
1644
1648
  const t = this._sheetDrawingService.getBatchUpdateOp(n), { undo: r, redo: s, objects: o } = t, d = [
1645
- { id: T.id, params: { unitId: i, subUnitId: e, op: s, objects: o, type: P.UPDATE } },
1649
+ { id: P.id, params: { unitId: i, subUnitId: e, op: s, objects: o, type: T.UPDATE } },
1646
1650
  { id: j.id, params: [i] }
1647
1651
  ], l = [
1648
- { id: T.id, params: { unitId: i, subUnitId: e, op: r, objects: o, type: P.UPDATE } },
1652
+ { id: P.id, params: { unitId: i, subUnitId: e, op: r, objects: o, type: T.UPDATE } },
1649
1653
  { id: j.id, params: [i] }
1650
1654
  ];
1651
1655
  return {
@@ -1786,7 +1790,7 @@ let ot = class extends ie {
1786
1790
  const { unitId: r, subUnitId: s } = t, o = (R = (v = this._renderManagerService.getRenderById(r)) == null ? void 0 : v.with(q)) == null ? void 0 : R.getCurrentSkeleton();
1787
1791
  if (!o)
1788
1792
  return { redos: [], undos: [] };
1789
- const d = Pe(o, n);
1793
+ const d = Te(o, n);
1790
1794
  if (!d)
1791
1795
  return { redos: [], undos: [] };
1792
1796
  const { startX: l, endX: g, startY: c, endY: a } = d, h = this._sheetDrawingService.getDrawingData(r, s), u = [];
@@ -1820,7 +1824,7 @@ let ot = class extends ie {
1820
1824
  });
1821
1825
  if (S.length) {
1822
1826
  const _ = this._sheetDrawingService.getBatchUpdateOp(S), { undo: I, redo: w, objects: O } = _;
1823
- m.push({ id: T.id, params: { unitId: r, subUnitId: s, op: w, objects: O, type: P.UPDATE } }), f.push({ id: T.id, params: { unitId: r, subUnitId: s, op: I, objects: O, type: P.UPDATE } });
1827
+ m.push({ id: P.id, params: { unitId: r, subUnitId: s, op: w, objects: O, type: T.UPDATE } }), f.push({ id: P.id, params: { unitId: r, subUnitId: s, op: I, objects: O, type: T.UPDATE } });
1824
1828
  }
1825
1829
  return { redos: m, undos: f };
1826
1830
  }
@@ -1854,11 +1858,11 @@ let ot = class extends ie {
1854
1858
  return { redos: [], undos: [] };
1855
1859
  if (a.length > 0) {
1856
1860
  const u = this._sheetDrawingService.getBatchUpdateOp(a), { undo: m, redo: f, objects: p } = u;
1857
- l.push({ id: T.id, params: { unitId: t, subUnitId: r, op: f, objects: p, type: P.UPDATE } }), g.push({ id: T.id, params: { unitId: t, subUnitId: r, op: m, objects: p, type: P.UPDATE } });
1861
+ l.push({ id: P.id, params: { unitId: t, subUnitId: r, op: f, objects: p, type: T.UPDATE } }), g.push({ id: P.id, params: { unitId: t, subUnitId: r, op: m, objects: p, type: T.UPDATE } });
1858
1862
  }
1859
1863
  if (h.length > 0) {
1860
1864
  const u = this._sheetDrawingService.getBatchRemoveOp(h), m = u.undo, f = u.redo, p = u.objects;
1861
- l.push({ id: T.id, params: { unitId: t, subUnitId: r, op: f, objects: p, type: P.REMOVE } }), g.push({ id: T.id, params: { unitId: t, subUnitId: r, op: m, objects: p, type: P.INSERT } });
1865
+ l.push({ id: P.id, params: { unitId: t, subUnitId: r, op: f, objects: p, type: T.REMOVE } }), g.push({ id: P.id, params: { unitId: t, subUnitId: r, op: m, objects: p, type: T.INSERT } });
1862
1866
  }
1863
1867
  return l.push({ id: j.id, params: [t] }), g.push({ id: j.id, params: [t] }), {
1864
1868
  redos: l,
@@ -1895,11 +1899,11 @@ let ot = class extends ie {
1895
1899
  return { redos: [], undos: [] };
1896
1900
  if (a.length > 0) {
1897
1901
  const u = this._sheetDrawingService.getBatchUpdateOp(a), { undo: m, redo: f, objects: p } = u;
1898
- l.push({ id: T.id, params: { unitId: t, subUnitId: r, op: f, objects: p, type: P.UPDATE } }), g.push({ id: T.id, params: { unitId: t, subUnitId: r, op: m, objects: p, type: P.UPDATE } });
1902
+ l.push({ id: P.id, params: { unitId: t, subUnitId: r, op: f, objects: p, type: T.UPDATE } }), g.push({ id: P.id, params: { unitId: t, subUnitId: r, op: m, objects: p, type: T.UPDATE } });
1899
1903
  }
1900
1904
  if (h.length > 0) {
1901
1905
  const u = this._sheetDrawingService.getBatchRemoveOp(h), m = u.undo, f = u.redo, p = u.objects;
1902
- l.push({ id: T.id, params: { unitId: t, subUnitId: r, op: f, objects: p, type: P.REMOVE } }), g.push({ id: T.id, params: { unitId: t, subUnitId: r, op: m, objects: p, type: P.INSERT } });
1906
+ l.push({ id: P.id, params: { unitId: t, subUnitId: r, op: f, objects: p, type: T.REMOVE } }), g.push({ id: P.id, params: { unitId: t, subUnitId: r, op: m, objects: p, type: T.INSERT } });
1903
1907
  }
1904
1908
  return l.push({ id: j.id, params: [t] }), g.push({ id: j.id, params: [t] }), { redos: l, undos: g };
1905
1909
  }
@@ -2453,7 +2457,7 @@ let $e = class extends ie {
2453
2457
  });
2454
2458
  if (!t)
2455
2459
  throw new Error("cannot find current target!");
2456
- const { unitId: r, subUnitId: s } = t, { initPosition: o, componentKey: d, data: l, allowTransform: g = !0 } = e, c = n != null ? n : Tn(), a = this._getPosition(o, r);
2460
+ const { unitId: r, subUnitId: s } = t, { initPosition: o, componentKey: d, data: l, allowTransform: g = !0 } = e, c = n != null ? n : Pn(), a = this._getPosition(o, r);
2457
2461
  if (a == null)
2458
2462
  return;
2459
2463
  this._ensureMap(r, s).set(c, e);
@@ -2496,7 +2500,7 @@ let $e = class extends ie {
2496
2500
  if (!l)
2497
2501
  return;
2498
2502
  const g = this._sheetDrawingService.getBatchRemoveOp([l]), { redo: c, objects: a } = g;
2499
- this._commandService.syncExecuteCommand(T.id, { unitId: r, subUnitId: s, op: c, objects: a, type: P.REMOVE });
2503
+ this._commandService.syncExecuteCommand(P.id, { unitId: r, subUnitId: s, op: c, objects: a, type: T.REMOVE });
2500
2504
  }
2501
2505
  }
2502
2506
  addHook(e) {
@@ -2524,7 +2528,7 @@ var ln = Object.defineProperty, Ji = Object.getOwnPropertyDescriptor, Zi = (i, e
2524
2528
  }, et = (i, e) => (n, t) => e(n, t, i), un = (i, e, n) => Zi(i, typeof e != "symbol" ? e + "" : e, n);
2525
2529
  const Qi = "SHEET_IMAGE_UI_PLUGIN";
2526
2530
  let Le = class extends En {
2527
- constructor(i = Tr, e, n, t) {
2531
+ constructor(i = Pr, e, n, t) {
2528
2532
  super(), this._config = i, this._injector = e, this._renderManagerService = n, this._configService = t;
2529
2533
  const { menu: r, ...s } = this._config;
2530
2534
  r && this._configService.setConfig("menu", r, { merge: !0 }), this._configService.setConfig(Or, s);
@@ -2569,7 +2573,7 @@ let Le = class extends En {
2569
2573
  un(Le, "type", Y.UNIVER_SHEET);
2570
2574
  un(Le, "pluginName", Qi);
2571
2575
  Le = qi([
2572
- Pn(xn, Yn, Jn),
2576
+ Tn(xn, Yn, Jn),
2573
2577
  et(1, W(Rt)),
2574
2578
  et(2, J),
2575
2579
  et(3, An)