@univerjs/sheets-drawing-ui 0.8.1-nightly.202506181607 → 0.8.1-nightly.202506191607

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/facade.js CHANGED
@@ -1,36 +1,36 @@
1
- var L = Object.defineProperty;
2
- var V = (r, e, t) => e in r ? L(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
- var U = (r, e, t) => V(r, typeof e != "symbol" ? e + "" : e, t);
4
- import { Inject as A, Injector as j, ICommandService as P, ImageSourceType as f, ArrangeTypeEnum as v, DrawingTypeEnum as _, generateRandomId as X, toDisposable as y, UniverInstanceType as Y, IUniverInstanceService as q } from "@univerjs/core";
5
- import { FBase as J, FEnum as W, FEventName as M, FUniver as H } from "@univerjs/core/facade";
6
- import { getImageSize as Q, IDrawingManagerService as I, SetDrawingSelectedOperation as x } from "@univerjs/drawing";
7
- import { IRenderManagerService as B, getCurrentTypeOfRenderer as Z } from "@univerjs/engine-render";
8
- import { RemoveSheetDrawingCommand as S, SetSheetDrawingCommand as h, SetDrawingArrangeCommand as w, SheetCanvasFloatDomManagerService as D, InsertSheetDrawingCommand as p, SheetDrawingUpdateController as ee } from "@univerjs/sheets-drawing-ui";
9
- import { SheetSkeletonManagerService as F, ISheetSelectionRenderService as te, convertPositionSheetOverGridToAbsolute as re, convertPositionCellToSheetOverGrid as ie } from "@univerjs/sheets-ui";
10
- import { ISheetDrawingService as l, SheetDrawingAnchorType as ne } from "@univerjs/sheets-drawing";
11
- import { transformComponentKey as R } from "@univerjs/sheets-ui/facade";
12
- import { FWorksheet as z, FRange as N } from "@univerjs/sheets/facade";
13
- import { ComponentManager as G } from "@univerjs/ui";
14
- var se = Object.getOwnPropertyDescriptor, $ = (r, e, t, i) => {
15
- for (var n = i > 1 ? void 0 : i ? se(e, t) : e, s = r.length - 1, o; s >= 0; s--)
16
- (o = r[s]) && (n = o(n) || n);
1
+ var V = Object.defineProperty;
2
+ var X = (i, e, t) => e in i ? V(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
+ var x = (i, e, t) => X(i, typeof e != "symbol" ? e + "" : e, t);
4
+ import { Inject as j, Injector as P, ICommandService as W, ImageSourceType as f, ArrangeTypeEnum as w, DrawingTypeEnum as S, generateRandomId as Y, toDisposable as D, CanceledError as v, UniverInstanceType as q, IUniverInstanceService as J } from "@univerjs/core";
5
+ import { FBase as Q, FEnum as M, FEventName as H, FUniver as z } from "@univerjs/core/facade";
6
+ import { getImageSize as Z, IDrawingManagerService as I, SetDrawingSelectedOperation as F } from "@univerjs/drawing";
7
+ import { IRenderManagerService as T, getCurrentTypeOfRenderer as ee } from "@univerjs/engine-render";
8
+ import { RemoveSheetDrawingCommand as p, SetSheetDrawingCommand as h, SetDrawingArrangeCommand as _, SheetCanvasFloatDomManagerService as R, InsertSheetDrawingCommand as b, SheetDrawingUpdateController as te } from "@univerjs/sheets-drawing-ui";
9
+ import { SheetSkeletonManagerService as A, ISheetSelectionRenderService as ie, convertPositionSheetOverGridToAbsolute as re, convertPositionCellToSheetOverGrid as ne } from "@univerjs/sheets-ui";
10
+ import { ISheetDrawingService as l, SheetDrawingAnchorType as se } from "@univerjs/sheets-drawing";
11
+ import { transformComponentKey as G } from "@univerjs/sheets-ui/facade";
12
+ import { FWorksheet as N, FRange as $ } from "@univerjs/sheets/facade";
13
+ import { ComponentManager as B } from "@univerjs/ui";
14
+ var oe = Object.getOwnPropertyDescriptor, K = (i, e, t, r) => {
15
+ for (var n = r > 1 ? void 0 : r ? oe(e, t) : e, s = i.length - 1, o; s >= 0; s--)
16
+ (o = i[s]) && (n = o(n) || n);
17
17
  return n;
18
- }, T = (r, e) => (t, i) => e(t, i, r);
19
- function oe(r, e) {
20
- const { from: t, to: i, flipY: n = !1, flipX: s = !1, angle: o = 0, skewX: d = 0, skewY: a = 0 } = r.sheetTransform, { column: g, columnOffset: c, row: u, rowOffset: O } = t, k = re(
21
- r.unitId,
22
- r.subUnitId,
23
- { from: t, to: i },
18
+ }, U = (i, e) => (t, r) => e(t, r, i);
19
+ function ae(i, e) {
20
+ const { from: t, to: r, flipY: n = !1, flipX: s = !1, angle: o = 0, skewX: d = 0, skewY: a = 0 } = i.sheetTransform, { column: g, columnOffset: c, row: u, rowOffset: O } = t, E = re(
21
+ i.unitId,
22
+ i.subUnitId,
23
+ { from: t, to: r },
24
24
  e
25
- ), { width: E, height: C } = k;
25
+ ), { width: C, height: y } = E;
26
26
  return {
27
- ...r,
27
+ ...i,
28
28
  column: g,
29
29
  columnOffset: c,
30
30
  row: u,
31
31
  rowOffset: O,
32
- width: E,
33
- height: C,
32
+ width: C,
33
+ height: y,
34
34
  flipY: n,
35
35
  flipX: s,
36
36
  angle: o,
@@ -38,20 +38,20 @@ function oe(r, e) {
38
38
  skewY: a
39
39
  };
40
40
  }
41
- function ae(r, e, t) {
42
- const { column: i, columnOffset: n, row: s, rowOffset: o, flipY: d = !1, flipX: a = !1, angle: g = 0, skewX: c = 0, skewY: u = 0, width: O, height: k } = r, E = ie(
43
- r.unitId,
44
- r.subUnitId,
45
- { column: i, columnOffset: n, row: s, rowOffset: o },
41
+ function de(i, e, t) {
42
+ const { column: r, columnOffset: n, row: s, rowOffset: o, flipY: d = !1, flipX: a = !1, angle: g = 0, skewX: c = 0, skewY: u = 0, width: O, height: E } = i, C = ne(
43
+ i.unitId,
44
+ i.subUnitId,
45
+ { column: r, columnOffset: n, row: s, rowOffset: o },
46
46
  O,
47
- k,
47
+ E,
48
48
  e,
49
49
  t
50
- ), { sheetTransform: C, transform: K } = E;
50
+ ), { sheetTransform: y, transform: L } = C;
51
51
  return {
52
- ...r,
52
+ ...i,
53
53
  sheetTransform: {
54
- ...C,
54
+ ...y,
55
55
  flipY: d,
56
56
  flipX: a,
57
57
  angle: g,
@@ -59,7 +59,7 @@ function ae(r, e, t) {
59
59
  skewY: u
60
60
  },
61
61
  transform: {
62
- ...K,
62
+ ...L,
63
63
  flipY: d,
64
64
  flipX: a,
65
65
  angle: g,
@@ -68,15 +68,15 @@ function ae(r, e, t) {
68
68
  }
69
69
  };
70
70
  }
71
- let b = class {
72
- constructor(r, e, t) {
73
- U(this, "_image");
71
+ let k = class {
72
+ constructor(i, e, t) {
73
+ x(this, "_image");
74
74
  this._injector = t, this._image = {
75
- drawingId: X(6),
76
- drawingType: _.DRAWING_IMAGE,
75
+ drawingId: Y(6),
76
+ drawingType: S.DRAWING_IMAGE,
77
77
  imageSourceType: f.BASE64,
78
78
  source: "",
79
- unitId: r,
79
+ unitId: i,
80
80
  subUnitId: e,
81
81
  column: 0,
82
82
  columnOffset: 0,
@@ -111,12 +111,12 @@ let b = class {
111
111
  * fWorksheet.insertImages([image]);
112
112
  * ```
113
113
  */
114
- setImage(r) {
115
- const t = this._injector.get(B).getRenderById(r.unitId);
114
+ setImage(i) {
115
+ const t = this._injector.get(T).getRenderById(i.unitId);
116
116
  if (!t)
117
- throw new Error(`Render Unit with unitId ${r.unitId} not found`);
118
- const i = t.with(F);
119
- return r.sheetTransform == null && (r.sheetTransform = {
117
+ throw new Error(`Render Unit with unitId ${i.unitId} not found`);
118
+ const r = t.with(A);
119
+ return i.sheetTransform == null && (i.sheetTransform = {
120
120
  from: {
121
121
  column: 0,
122
122
  columnOffset: 0,
@@ -129,11 +129,11 @@ let b = class {
129
129
  row: 0,
130
130
  rowOffset: 0
131
131
  }
132
- }), this._image = oe(r, i), this;
132
+ }), this._image = ae(i, r), this;
133
133
  }
134
- setSource(r, e) {
134
+ setSource(i, e) {
135
135
  const t = e != null ? e : f.URL;
136
- return this._image.source = r, this._image.imageSourceType = t, this;
136
+ return this._image.source = i, this._image.imageSourceType = t, this;
137
137
  }
138
138
  /**
139
139
  * Get the source of the image
@@ -185,8 +185,8 @@ let b = class {
185
185
  * fWorksheet.insertImages([image]);
186
186
  * ```
187
187
  */
188
- setColumn(r) {
189
- return this._image.column = r, this;
188
+ setColumn(i) {
189
+ return this._image.column = i, this;
190
190
  }
191
191
  /**
192
192
  * Set the vertical position of the image
@@ -206,8 +206,8 @@ let b = class {
206
206
  * fWorksheet.insertImages([image]);
207
207
  * ```
208
208
  */
209
- setRow(r) {
210
- return this._image.row = r, this;
209
+ setRow(i) {
210
+ return this._image.row = i, this;
211
211
  }
212
212
  /**
213
213
  * Set the horizontal offset of the image
@@ -228,8 +228,8 @@ let b = class {
228
228
  * fWorksheet.insertImages([image]);
229
229
  * ```
230
230
  */
231
- setColumnOffset(r) {
232
- return this._image.columnOffset = r, this;
231
+ setColumnOffset(i) {
232
+ return this._image.columnOffset = i, this;
233
233
  }
234
234
  /**
235
235
  * Set the vertical offset of the image
@@ -250,8 +250,8 @@ let b = class {
250
250
  * fWorksheet.insertImages([image]);
251
251
  * ```
252
252
  */
253
- setRowOffset(r) {
254
- return this._image.rowOffset = r, this;
253
+ setRowOffset(i) {
254
+ return this._image.rowOffset = i, this;
255
255
  }
256
256
  /**
257
257
  * Set the width of the image
@@ -273,8 +273,8 @@ let b = class {
273
273
  * fWorksheet.insertImages([image]);
274
274
  * ```
275
275
  */
276
- setWidth(r) {
277
- return this._image.width = r, this;
276
+ setWidth(i) {
277
+ return this._image.width = i, this;
278
278
  }
279
279
  /**
280
280
  * Set the height of the image
@@ -296,8 +296,8 @@ let b = class {
296
296
  * fWorksheet.insertImages([image]);
297
297
  * ```
298
298
  */
299
- setHeight(r) {
300
- return this._image.height = r, this;
299
+ setHeight(i) {
300
+ return this._image.height = i, this;
301
301
  }
302
302
  /**
303
303
  * Set the anchor type of the image, whether the position and size change with the cell
@@ -345,8 +345,8 @@ let b = class {
345
345
  * }, 2000);
346
346
  * ```
347
347
  */
348
- setAnchorType(r) {
349
- return this._image.anchorType = r, this;
348
+ setAnchorType(i) {
349
+ return this._image.anchorType = i, this;
350
350
  }
351
351
  /**
352
352
  * Set the cropping region of the image by defining the top edges, thereby displaying the specific part of the image you want.
@@ -367,8 +367,8 @@ let b = class {
367
367
  * fWorksheet.insertImages([image]);
368
368
  * ```
369
369
  */
370
- setCropTop(r) {
371
- return this._initializeSrcRect(), this._image.srcRect.top = r, this;
370
+ setCropTop(i) {
371
+ return this._initializeSrcRect(), this._image.srcRect.top = i, this;
372
372
  }
373
373
  /**
374
374
  * Set the cropping region of the image by defining the left edges, thereby displaying the specific part of the image you want.
@@ -389,8 +389,8 @@ let b = class {
389
389
  * fWorksheet.insertImages([image]);
390
390
  * ```
391
391
  */
392
- setCropLeft(r) {
393
- return this._initializeSrcRect(), this._image.srcRect.left = r, this;
392
+ setCropLeft(i) {
393
+ return this._initializeSrcRect(), this._image.srcRect.left = i, this;
394
394
  }
395
395
  /**
396
396
  * Set the cropping region of the image by defining the bottom edges, thereby displaying the specific part of the image you want.
@@ -411,8 +411,8 @@ let b = class {
411
411
  * fWorksheet.insertImages([image]);
412
412
  * ```
413
413
  */
414
- setCropBottom(r) {
415
- return this._initializeSrcRect(), this._image.srcRect.bottom = r, this;
414
+ setCropBottom(i) {
415
+ return this._initializeSrcRect(), this._image.srcRect.bottom = i, this;
416
416
  }
417
417
  /**
418
418
  * Set the cropping region of the image by defining the right edges, thereby displaying the specific part of the image you want.
@@ -433,8 +433,8 @@ let b = class {
433
433
  * fWorksheet.insertImages([image]);
434
434
  * ```
435
435
  */
436
- setCropRight(r) {
437
- return this._initializeSrcRect(), this._image.srcRect.right = r, this;
436
+ setCropRight(i) {
437
+ return this._initializeSrcRect(), this._image.srcRect.right = i, this;
438
438
  }
439
439
  _initializeSrcRect() {
440
440
  this._image.srcRect == null && (this._image.srcRect = {
@@ -463,33 +463,33 @@ let b = class {
463
463
  * fWorksheet.insertImages([image]);
464
464
  * ```
465
465
  */
466
- setRotate(r) {
467
- return this._image.angle = r, this;
466
+ setRotate(i) {
467
+ return this._image.angle = i, this;
468
468
  }
469
- setUnitId(r) {
470
- return this._image.unitId = r, this;
469
+ setUnitId(i) {
470
+ return this._image.unitId = i, this;
471
471
  }
472
- setSubUnitId(r) {
473
- return this._image.subUnitId = r, this;
472
+ setSubUnitId(i) {
473
+ return this._image.subUnitId = i, this;
474
474
  }
475
475
  async buildAsync() {
476
- const e = this._injector.get(B).getRenderById(this._image.unitId);
476
+ const e = this._injector.get(T).getRenderById(this._image.unitId);
477
477
  if (!e)
478
478
  throw new Error(`Render Unit with unitId ${this._image.unitId} not found`);
479
- const t = e.with(te), i = e.with(F);
479
+ const t = e.with(ie), r = e.with(A);
480
480
  if (this._image.width === 0 || this._image.height === 0) {
481
- const n = await Q(this._image.source), s = n.width, o = n.height;
481
+ const n = await Z(this._image.source), s = n.width, o = n.height;
482
482
  this._image.width === 0 && (this._image.width = s), this._image.height === 0 && (this._image.height = o);
483
483
  }
484
- return ae(this._image, t, i);
484
+ return de(this._image, t, r);
485
485
  }
486
486
  };
487
- b = $([
488
- T(2, A(j))
489
- ], b);
490
- let m = class extends J {
491
- constructor(r, e, t) {
492
- super(), this._image = r, this._commandService = e, this._injector = t;
487
+ k = K([
488
+ U(2, j(P))
489
+ ], k);
490
+ let m = class extends Q {
491
+ constructor(i, e, t) {
492
+ super(), this._image = i, this._commandService = e, this._injector = t;
493
493
  }
494
494
  /**
495
495
  * Get the id of the image
@@ -536,7 +536,7 @@ let m = class extends J {
536
536
  * ```
537
537
  */
538
538
  remove() {
539
- return this._commandService.syncExecuteCommand(S.id, { unitId: this._image.unitId, drawings: [this._image] });
539
+ return this._commandService.syncExecuteCommand(p.id, { unitId: this._image.unitId, drawings: [this._image] });
540
540
  }
541
541
  /**
542
542
  * Convert the image to a FOverGridImageBuilder
@@ -552,16 +552,16 @@ let m = class extends J {
552
552
  * ```
553
553
  */
554
554
  toBuilder() {
555
- const r = this._injector.createInstance(b);
556
- return r.setImage(this._image), r;
555
+ const i = this._injector.createInstance(k);
556
+ return i.setImage(this._image), i;
557
557
  }
558
- setSource(r, e) {
558
+ setSource(i, e) {
559
559
  const t = e != null ? e : f.URL;
560
- return this._image.source = r, this._image.imageSourceType = t, this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [this._image] });
560
+ return this._image.source = i, this._image.imageSourceType = t, this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [this._image] });
561
561
  }
562
- async setPositionAsync(r, e, t, i) {
562
+ async setPositionAsync(i, e, t, r) {
563
563
  const n = this.toBuilder();
564
- n.setColumn(e), n.setRow(r), t != null && n.setRowOffset(t), i != null && n.setColumnOffset(i);
564
+ n.setColumn(e), n.setRow(i), t != null && n.setRowOffset(t), r != null && n.setColumnOffset(r);
565
565
  const s = await n.buildAsync();
566
566
  return this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [s] });
567
567
  }
@@ -580,11 +580,11 @@ let m = class extends J {
580
580
  * console.log(result);
581
581
  * ```
582
582
  */
583
- async setSizeAsync(r, e) {
583
+ async setSizeAsync(i, e) {
584
584
  const t = this.toBuilder();
585
- t.setWidth(r), t.setHeight(e);
586
- const i = await t.buildAsync();
587
- return this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [i] });
585
+ t.setWidth(i), t.setHeight(e);
586
+ const r = await t.buildAsync();
587
+ return this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [r] });
588
588
  }
589
589
  /**
590
590
  * Set the cropping region of the image by defining the top, bottom, left, and right edges, thereby displaying the specific part of the image you want.
@@ -603,13 +603,13 @@ let m = class extends J {
603
603
  * console.log(result);
604
604
  * ```
605
605
  */
606
- setCrop(r, e, t, i) {
606
+ setCrop(i, e, t, r) {
607
607
  return this._image.srcRect == null && (this._image.srcRect = {
608
608
  top: 0,
609
609
  left: 0,
610
610
  bottom: 0,
611
611
  right: 0
612
- }), r != null && (this._image.srcRect.top = r), e != null && (this._image.srcRect.left = e), t != null && (this._image.srcRect.bottom = t), i != null && (this._image.srcRect.right = i), this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [this._image] });
612
+ }), i != null && (this._image.srcRect.top = i), e != null && (this._image.srcRect.left = e), t != null && (this._image.srcRect.bottom = t), r != null && (this._image.srcRect.right = r), this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [this._image] });
613
613
  }
614
614
  /**
615
615
  * Set the rotation angle of the image
@@ -625,8 +625,8 @@ let m = class extends J {
625
625
  * console.log(result);
626
626
  * ```
627
627
  */
628
- setRotate(r) {
629
- return this._image.sheetTransform.angle = r, this._image.transform && (this._image.transform.angle = r), this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [this._image] });
628
+ setRotate(i) {
629
+ return this._image.sheetTransform.angle = i, this._image.transform && (this._image.transform.angle = i), this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [this._image] });
630
630
  }
631
631
  /**
632
632
  * Move the image layer forward by one level
@@ -641,11 +641,11 @@ let m = class extends J {
641
641
  * ```
642
642
  */
643
643
  setForward() {
644
- return this._commandService.syncExecuteCommand(w.id, {
644
+ return this._commandService.syncExecuteCommand(_.id, {
645
645
  unitId: this._image.unitId,
646
646
  subUnitId: this._image.subUnitId,
647
647
  drawingIds: [this._image.drawingId],
648
- arrangeType: v.forward
648
+ arrangeType: w.forward
649
649
  });
650
650
  }
651
651
  /**
@@ -661,11 +661,11 @@ let m = class extends J {
661
661
  * ```
662
662
  */
663
663
  setBackward() {
664
- return this._commandService.syncExecuteCommand(w.id, {
664
+ return this._commandService.syncExecuteCommand(_.id, {
665
665
  unitId: this._image.unitId,
666
666
  subUnitId: this._image.subUnitId,
667
667
  drawingIds: [this._image.drawingId],
668
- arrangeType: v.backward
668
+ arrangeType: w.backward
669
669
  });
670
670
  }
671
671
  /**
@@ -681,11 +681,11 @@ let m = class extends J {
681
681
  * ```
682
682
  */
683
683
  setBack() {
684
- return this._commandService.syncExecuteCommand(w.id, {
684
+ return this._commandService.syncExecuteCommand(_.id, {
685
685
  unitId: this._image.unitId,
686
686
  subUnitId: this._image.subUnitId,
687
687
  drawingIds: [this._image.drawingId],
688
- arrangeType: v.back
688
+ arrangeType: w.back
689
689
  });
690
690
  }
691
691
  /**
@@ -701,21 +701,21 @@ let m = class extends J {
701
701
  * ```
702
702
  */
703
703
  setFront() {
704
- return this._commandService.syncExecuteCommand(w.id, {
704
+ return this._commandService.syncExecuteCommand(_.id, {
705
705
  unitId: this._image.unitId,
706
706
  subUnitId: this._image.subUnitId,
707
707
  drawingIds: [this._image.drawingId],
708
- arrangeType: v.front
708
+ arrangeType: w.front
709
709
  });
710
710
  }
711
711
  };
712
- m = $([
713
- T(1, P),
714
- T(2, A(j))
712
+ m = K([
713
+ U(1, W),
714
+ U(2, j(P))
715
715
  ], m);
716
- class de extends z {
716
+ class ce extends N {
717
717
  addFloatDomToPosition(e, t) {
718
- const i = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), { key: s, disposableCollection: o } = R(e, this._injector.get(G)), a = this._injector.get(D).addFloatDomToPosition({ ...e, componentKey: s, unitId: i, subUnitId: n }, t);
718
+ const r = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), { key: s, disposableCollection: o } = G(e, this._injector.get(B)), a = this._injector.get(R).addFloatDomToPosition({ ...e, componentKey: s, unitId: r, subUnitId: n }, t);
719
719
  return a ? (o.add(a.dispose), {
720
720
  id: a.id,
721
721
  dispose: () => {
@@ -723,8 +723,8 @@ class de extends z {
723
723
  }
724
724
  }) : (o.dispose(), null);
725
725
  }
726
- addFloatDomToRange(e, t, i, n) {
727
- const s = this._workbook.getUnitId(), o = this._worksheet.getSheetId(), { key: d, disposableCollection: a } = R(t, this._injector.get(G)), c = this._injector.get(D).addFloatDomToRange(e.getRange(), { ...t, componentKey: d, unitId: s, subUnitId: o }, i, n);
726
+ addFloatDomToRange(e, t, r, n) {
727
+ const s = this._workbook.getUnitId(), o = this._worksheet.getSheetId(), { key: d, disposableCollection: a } = G(t, this._injector.get(B)), c = this._injector.get(R).addFloatDomToRange(e.getRange(), { ...t, componentKey: d, unitId: s, subUnitId: o }, r, n);
728
728
  return c ? (a.add(c.dispose), {
729
729
  id: c.id,
730
730
  dispose: () => {
@@ -732,8 +732,8 @@ class de extends z {
732
732
  }
733
733
  }) : (a.dispose(), null);
734
734
  }
735
- addFloatDomToColumnHeader(e, t, i, n) {
736
- const s = this._workbook.getUnitId(), o = this._worksheet.getSheetId(), { key: d, disposableCollection: a } = R(t, this._injector.get(G)), c = this._injector.get(D).addFloatDomToColumnHeader(e, { ...t, componentKey: d, unitId: s, subUnitId: o }, i, n);
735
+ addFloatDomToColumnHeader(e, t, r, n) {
736
+ const s = this._workbook.getUnitId(), o = this._worksheet.getSheetId(), { key: d, disposableCollection: a } = G(t, this._injector.get(B)), c = this._injector.get(R).addFloatDomToColumnHeader(e, { ...t, componentKey: d, unitId: s, subUnitId: o }, r, n);
737
737
  return c ? (a.add(c.dispose), {
738
738
  id: c.id,
739
739
  dispose: () => {
@@ -741,7 +741,7 @@ class de extends z {
741
741
  }
742
742
  }) : (a.dispose(), null);
743
743
  }
744
- async insertImage(e, t, i, n, s) {
744
+ async insertImage(e, t, r, n, s) {
745
745
  const o = this.newOverGridImage();
746
746
  if (typeof e == "string")
747
747
  o.setSource(e);
@@ -749,50 +749,50 @@ class de extends z {
749
749
  const g = await e.getBlob().getDataAsString();
750
750
  o.setSource(g, f.BASE64);
751
751
  }
752
- t !== void 0 ? o.setColumn(t) : o.setColumn(0), i !== void 0 ? o.setRow(i) : o.setRow(0), n !== void 0 ? o.setColumnOffset(n) : o.setColumnOffset(0), s !== void 0 ? o.setRowOffset(s) : o.setRowOffset(0);
752
+ t !== void 0 ? o.setColumn(t) : o.setColumn(0), r !== void 0 ? o.setRow(r) : o.setRow(0), n !== void 0 ? o.setColumnOffset(n) : o.setColumnOffset(0), s !== void 0 ? o.setRowOffset(s) : o.setRowOffset(0);
753
753
  const d = await o.buildAsync();
754
- return this._commandService.syncExecuteCommand(p.id, { unitId: this._fWorkbook.getId(), drawings: [d] });
754
+ return this._commandService.syncExecuteCommand(b.id, { unitId: this._fWorkbook.getId(), drawings: [d] });
755
755
  }
756
756
  insertImages(e) {
757
- const t = e.map((i) => (i.unitId = this._fWorkbook.getId(), i.subUnitId = this.getSheetId(), i));
758
- return this._commandService.syncExecuteCommand(p.id, { unitId: this._fWorkbook.getId(), drawings: t }), this;
757
+ const t = e.map((r) => (r.unitId = this._fWorkbook.getId(), r.subUnitId = this.getSheetId(), r));
758
+ return this._commandService.syncExecuteCommand(b.id, { unitId: this._fWorkbook.getId(), drawings: t }), this;
759
759
  }
760
760
  deleteImages(e) {
761
- const t = e.map((i) => ({
761
+ const t = e.map((r) => ({
762
762
  unitId: this._fWorkbook.getId(),
763
- drawingId: i.getId(),
763
+ drawingId: r.getId(),
764
764
  subUnitId: this.getSheetId(),
765
- drawingType: i.getType()
765
+ drawingType: r.getType()
766
766
  }));
767
- return this._commandService.syncExecuteCommand(S.id, { unitId: this._fWorkbook.getId(), drawings: t }), this;
767
+ return this._commandService.syncExecuteCommand(p.id, { unitId: this._fWorkbook.getId(), drawings: t }), this;
768
768
  }
769
769
  getImages() {
770
- const t = this._injector.get(l).getDrawingData(this._fWorkbook.getId(), this.getSheetId()), i = [];
770
+ const t = this._injector.get(l).getDrawingData(this._fWorkbook.getId(), this.getSheetId()), r = [];
771
771
  for (const n in t) {
772
772
  const s = t[n];
773
- s.drawingType === _.DRAWING_IMAGE && i.push(this._injector.createInstance(m, s));
773
+ s.drawingType === S.DRAWING_IMAGE && r.push(this._injector.createInstance(m, s));
774
774
  }
775
- return i;
775
+ return r;
776
776
  }
777
777
  getImageById(e) {
778
- const i = this._injector.get(l).getDrawingByParam({ unitId: this._fWorkbook.getId(), subUnitId: this.getSheetId(), drawingId: e });
779
- return i && i.drawingType === _.DRAWING_IMAGE ? this._injector.createInstance(m, i) : null;
778
+ const r = this._injector.get(l).getDrawingByParam({ unitId: this._fWorkbook.getId(), subUnitId: this.getSheetId(), drawingId: e });
779
+ return r && r.drawingType === S.DRAWING_IMAGE ? this._injector.createInstance(m, r) : null;
780
780
  }
781
781
  getActiveImages() {
782
- const t = this._injector.get(l).getFocusDrawings(), i = [];
782
+ const t = this._injector.get(l).getFocusDrawings(), r = [];
783
783
  for (const n in t) {
784
784
  const s = t[n];
785
- i.push(this._injector.createInstance(m, s));
785
+ r.push(this._injector.createInstance(m, s));
786
786
  }
787
- return i;
787
+ return r;
788
788
  }
789
789
  updateImages(e) {
790
790
  return this._commandService.syncExecuteCommand(h.id, { unitId: this._fWorkbook.getId(), drawings: e }), this;
791
791
  }
792
792
  onImageInserted(e) {
793
793
  const t = this._injector.get(l);
794
- return y(t.add$.subscribe((i) => {
795
- const n = i.map(
794
+ return D(t.add$.subscribe((r) => {
795
+ const n = r.map(
796
796
  (s) => this._injector.createInstance(m, t.getDrawingByParam(s))
797
797
  );
798
798
  e(n);
@@ -800,8 +800,8 @@ class de extends z {
800
800
  }
801
801
  onImageDeleted(e) {
802
802
  const t = this._injector.get(l);
803
- return y(t.remove$.subscribe((i) => {
804
- const n = i.map(
803
+ return D(t.remove$.subscribe((r) => {
804
+ const n = r.map(
805
805
  (s) => this._injector.createInstance(m, t.getDrawingByParam(s))
806
806
  );
807
807
  e(n);
@@ -809,8 +809,8 @@ class de extends z {
809
809
  }
810
810
  onImageChanged(e) {
811
811
  const t = this._injector.get(l);
812
- return y(t.update$.subscribe((i) => {
813
- const n = i.map(
812
+ return D(t.update$.subscribe((r) => {
813
+ const n = r.map(
814
814
  (s) => this._injector.createInstance(m, t.getDrawingByParam(s))
815
815
  );
816
816
  e(n);
@@ -818,23 +818,23 @@ class de extends z {
818
818
  }
819
819
  newOverGridImage() {
820
820
  const e = this._fWorkbook.getId(), t = this.getSheetId();
821
- return this._injector.createInstance(b, e, t);
821
+ return this._injector.createInstance(k, e, t);
822
822
  }
823
823
  }
824
- z.extend(de);
825
- class ce extends W {
824
+ N.extend(ce);
825
+ class ge extends M {
826
826
  get DrawingType() {
827
- return _;
827
+ return S;
828
828
  }
829
829
  get ImageSourceType() {
830
830
  return f;
831
831
  }
832
832
  get SheetDrawingAnchorType() {
833
- return ne;
833
+ return se;
834
834
  }
835
835
  }
836
- W.extend(ce);
837
- class ge extends M {
836
+ M.extend(ge);
837
+ class me extends H {
838
838
  get BeforeOverGridImageChange() {
839
839
  return "BeforeOverGridImageChange";
840
840
  }
@@ -860,19 +860,19 @@ class ge extends M {
860
860
  return "OverGridImageSelected";
861
861
  }
862
862
  }
863
- M.extend(ge);
864
- class me extends H {
863
+ H.extend(me);
864
+ class he extends z {
865
865
  /**
866
866
  * @ignore
867
867
  */
868
868
  // eslint-disable-next-line max-lines-per-function
869
869
  _initialize(e) {
870
- const t = e.get(P);
870
+ const t = e.get(W);
871
871
  this.registerEventHandler(
872
872
  this.Event.BeforeOverGridImageInsert,
873
- () => t.beforeCommandExecuted((i) => {
874
- if (i.id !== p.id) return;
875
- const n = i.params, s = this.getActiveWorkbook();
873
+ () => t.beforeCommandExecuted((r) => {
874
+ if (r.id !== b.id) return;
875
+ const n = r.params, s = this.getActiveWorkbook();
876
876
  if (s == null || n == null)
877
877
  return;
878
878
  const { drawings: o } = n, d = {
@@ -880,13 +880,13 @@ class me extends H {
880
880
  insertImageParams: o
881
881
  };
882
882
  if (this.fireEvent(this.Event.BeforeOverGridImageInsert, d), d.cancel)
883
- throw new Error("Canceled by BeforeOverGridImageInsert event");
883
+ throw new v();
884
884
  })
885
885
  ), this.registerEventHandler(
886
886
  this.Event.BeforeOverGridImageRemove,
887
- () => t.beforeCommandExecuted((i) => {
888
- if (i.id !== S.id) return;
889
- const n = i.params, s = this.getActiveWorkbook();
887
+ () => t.beforeCommandExecuted((r) => {
888
+ if (r.id !== p.id) return;
889
+ const n = r.params, s = this.getActiveWorkbook();
890
890
  if (s == null || n == null)
891
891
  return;
892
892
  const o = e.get(I), { drawings: d } = n, a = d.map((c) => o.getDrawingByParam(c)), g = {
@@ -894,13 +894,13 @@ class me extends H {
894
894
  images: this._createFOverGridImage(a)
895
895
  };
896
896
  if (this.fireEvent(this.Event.BeforeOverGridImageRemove, g), g.cancel)
897
- throw new Error("Canceled by BeforeOverGridImageRemove event");
897
+ throw new v();
898
898
  })
899
899
  ), this.registerEventHandler(
900
900
  this.Event.BeforeOverGridImageChange,
901
- () => t.beforeCommandExecuted((i) => {
902
- if (i.id !== h.id) return;
903
- const n = i.params, s = this.getActiveWorkbook();
901
+ () => t.beforeCommandExecuted((r) => {
902
+ if (r.id !== h.id) return;
903
+ const n = r.params, s = this.getActiveWorkbook();
904
904
  if (s == null || n == null)
905
905
  return;
906
906
  const { drawings: o } = n, d = e.get(I), a = [];
@@ -916,13 +916,13 @@ class me extends H {
916
916
  images: a
917
917
  };
918
918
  if (this.fireEvent(this.Event.BeforeOverGridImageChange, g), g.cancel)
919
- throw d.updateNotification(o), new Error("Canceled by BeforeOverGridImageChange event");
919
+ throw d.updateNotification(o), new v();
920
920
  })
921
921
  ), this.registerEventHandler(
922
922
  this.Event.BeforeOverGridImageSelect,
923
- () => t.beforeCommandExecuted((i) => {
924
- if (i.id !== x.id) return;
925
- const n = i.params, s = this.getActiveWorkbook();
923
+ () => t.beforeCommandExecuted((r) => {
924
+ if (r.id !== F.id) return;
925
+ const n = r.params, s = this.getActiveWorkbook();
926
926
  if (s == null)
927
927
  return;
928
928
  const o = e.get(I), d = o.getFocusDrawings(), a = n.map((c) => o.getDrawingByParam(c)), g = {
@@ -931,13 +931,13 @@ class me extends H {
931
931
  oldSelectedImages: this._createFOverGridImage(d)
932
932
  };
933
933
  if (this.fireEvent(this.Event.BeforeOverGridImageSelect, g), g.cancel)
934
- throw new Error("Canceled by BeforeOverGridImageSelect event");
934
+ throw new v();
935
935
  })
936
936
  ), this.registerEventHandler(
937
937
  this.Event.OverGridImageInserted,
938
- () => t.onCommandExecuted((i) => {
939
- if (i.id !== p.id) return;
940
- const n = i.params, s = this.getActiveWorkbook();
938
+ () => t.onCommandExecuted((r) => {
939
+ if (r.id !== b.id) return;
940
+ const n = r.params, s = this.getActiveWorkbook();
941
941
  if (s == null || n == null)
942
942
  return;
943
943
  const { drawings: o } = n;
@@ -948,9 +948,9 @@ class me extends H {
948
948
  })
949
949
  ), this.registerEventHandler(
950
950
  this.Event.OverGridImageRemoved,
951
- () => t.onCommandExecuted((i) => {
952
- if (i.id !== S.id) return;
953
- const n = i.params, s = this.getActiveWorkbook();
951
+ () => t.onCommandExecuted((r) => {
952
+ if (r.id !== p.id) return;
953
+ const n = r.params, s = this.getActiveWorkbook();
954
954
  if (s == null || n == null)
955
955
  return;
956
956
  const { drawings: o } = n;
@@ -961,9 +961,9 @@ class me extends H {
961
961
  })
962
962
  ), this.registerEventHandler(
963
963
  this.Event.OverGridImageChanged,
964
- () => t.onCommandExecuted((i) => {
965
- if (i.id !== h.id) return;
966
- const n = i.params, s = this.getActiveWorkbook();
964
+ () => t.onCommandExecuted((r) => {
965
+ if (r.id !== h.id) return;
966
+ const n = r.params, s = this.getActiveWorkbook();
967
967
  if (s == null || n == null)
968
968
  return;
969
969
  const { drawings: o } = n, d = e.get(I), a = o.map((g) => this._injector.createInstance(m, d.getDrawingByParam(g)));
@@ -974,9 +974,9 @@ class me extends H {
974
974
  })
975
975
  ), this.registerEventHandler(
976
976
  this.Event.OverGridImageSelected,
977
- () => t.onCommandExecuted((i) => {
978
- if (i.id !== x.id) return;
979
- const n = i.params, s = this.getActiveWorkbook();
977
+ () => t.onCommandExecuted((r) => {
978
+ if (r.id !== F.id) return;
979
+ const n = r.params, s = this.getActiveWorkbook();
980
980
  if (s == null)
981
981
  return;
982
982
  const o = e.get(I), d = n.map((a) => o.getDrawingByParam(a));
@@ -991,12 +991,12 @@ class me extends H {
991
991
  return e.map((t) => this._injector.createInstance(m, t));
992
992
  }
993
993
  }
994
- H.extend(me);
995
- class he extends N {
994
+ z.extend(he);
995
+ class ue extends $ {
996
996
  async insertCellImageAsync(e) {
997
997
  var s;
998
- const t = this._injector.get(B), i = (s = Z(Y.UNIVER_SHEET, this._injector.get(q), t)) == null ? void 0 : s.with(ee);
999
- if (!i)
998
+ const t = this._injector.get(T), r = (s = ee(q.UNIVER_SHEET, this._injector.get(J), t)) == null ? void 0 : s.with(te);
999
+ if (!r)
1000
1000
  return !1;
1001
1001
  const n = {
1002
1002
  unitId: this._workbook.getUnitId(),
@@ -1004,7 +1004,7 @@ class he extends N {
1004
1004
  row: this.getRow(),
1005
1005
  col: this.getColumn()
1006
1006
  };
1007
- return typeof e == "string" ? i.insertCellImageByUrl(e, n) : i.insertCellImageByFile(e, n);
1007
+ return typeof e == "string" ? r.insertCellImageByUrl(e, n) : r.insertCellImageByFile(e, n);
1008
1008
  }
1009
1009
  }
1010
- N.extend(he);
1010
+ $.extend(ue);