@univerjs/sheets-drawing-ui 0.6.0-nightly.202502191606 → 0.6.0-nightly.202502201606

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/facade.js CHANGED
@@ -1,9 +1,9 @@
1
1
  var K = Object.defineProperty;
2
- var L = (t, r, e) => r in t ? K(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
3
- var T = (t, r, e) => L(t, typeof r != "symbol" ? r + "" : r, e);
4
- import { Inject as U, Injector as P, ICommandService as j, generateRandomId as X, DrawingTypeEnum as _, ImageSourceType as I, ArrangeTypeEnum as v, toDisposable as y } from "@univerjs/core";
2
+ var L = (e, r, t) => r in e ? K(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;
3
+ var T = (e, r, t) => L(e, typeof r != "symbol" ? r + "" : r, t);
4
+ import { Inject as U, Injector as P, ICommandService as j, ImageSourceType as f, ArrangeTypeEnum as v, DrawingTypeEnum as _, generateRandomId as X, toDisposable as y } from "@univerjs/core";
5
5
  import { FBase as Y, FEnum as W, FEventName as M, FUniver as H } from "@univerjs/core/facade";
6
- import { getImageSize as V, IDrawingManagerService as f, SetDrawingSelectedOperation as x } from "@univerjs/drawing";
6
+ import { getImageSize as V, IDrawingManagerService as I, SetDrawingSelectedOperation as x } from "@univerjs/drawing";
7
7
  import { IRenderManagerService as A } from "@univerjs/engine-render";
8
8
  import { RemoveSheetDrawingCommand as S, SetSheetDrawingCommand as h, SetDrawingArrangeCommand as w, SheetCanvasFloatDomManagerService as D, InsertSheetDrawingCommand as p } from "@univerjs/sheets-drawing-ui";
9
9
  import { SheetSkeletonManagerService as F, ISheetSelectionRenderService as q, convertPositionSheetOverGridToAbsolute as J, convertPositionCellToSheetOverGrid as Q } from "@univerjs/sheets-ui";
@@ -11,25 +11,25 @@ import { ISheetDrawingService as l, SheetDrawingAnchorType as Z } from "@univerj
11
11
  import { transformComponentKey as R } from "@univerjs/sheets-ui/facade";
12
12
  import { FWorksheet as z } from "@univerjs/sheets/facade";
13
13
  import { ComponentManager as G } from "@univerjs/ui";
14
- var ee = Object.defineProperty, te = Object.getOwnPropertyDescriptor, N = (t, r, e, i) => {
15
- for (var n = i > 1 ? void 0 : i ? te(r, e) : r, s = t.length - 1, o; s >= 0; s--)
16
- (o = t[s]) && (n = (i ? o(r, e, n) : o(n)) || n);
17
- return i && n && ee(r, e, n), n;
18
- }, B = (t, r) => (e, i) => r(e, i, t);
19
- function re(t, r) {
20
- const { from: e, to: i, flipY: n = !1, flipX: s = !1, angle: o = 0, skewX: d = 0, skewY: a = 0 } = t.sheetTransform, { column: g, columnOffset: c, row: u, rowOffset: O } = e, E = J(
21
- t.unitId,
22
- t.subUnitId,
23
- { from: e, to: i },
14
+ var ee = Object.getOwnPropertyDescriptor, N = (e, r, t, i) => {
15
+ for (var n = i > 1 ? void 0 : i ? ee(r, t) : r, s = e.length - 1, o; s >= 0; s--)
16
+ (o = e[s]) && (n = o(n) || n);
17
+ return n;
18
+ }, B = (e, r) => (t, i) => r(t, i, e);
19
+ function te(e, r) {
20
+ const { from: t, to: i, flipY: n = !1, flipX: s = !1, angle: o = 0, skewX: d = 0, skewY: a = 0 } = e.sheetTransform, { column: g, columnOffset: c, row: u, rowOffset: O } = t, k = J(
21
+ e.unitId,
22
+ e.subUnitId,
23
+ { from: t, to: i },
24
24
  r
25
- ), { width: k, height: C } = E;
25
+ ), { width: E, height: C } = k;
26
26
  return {
27
- ...t,
27
+ ...e,
28
28
  column: g,
29
29
  columnOffset: c,
30
30
  row: u,
31
31
  rowOffset: O,
32
- width: k,
32
+ width: E,
33
33
  height: C,
34
34
  flipY: n,
35
35
  flipX: s,
@@ -38,18 +38,18 @@ function re(t, r) {
38
38
  skewY: a
39
39
  };
40
40
  }
41
- function ie(t, r, e) {
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: E } = t, k = Q(
43
- t.unitId,
44
- t.subUnitId,
41
+ function re(e, r, 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 } = e, E = Q(
43
+ e.unitId,
44
+ e.subUnitId,
45
45
  { column: i, columnOffset: n, row: s, rowOffset: o },
46
46
  O,
47
- E,
47
+ k,
48
48
  r,
49
- e
50
- ), { sheetTransform: C, transform: $ } = k;
49
+ t
50
+ ), { sheetTransform: C, transform: $ } = E;
51
51
  return {
52
- ...t,
52
+ ...e,
53
53
  sheetTransform: {
54
54
  ...C,
55
55
  flipY: d,
@@ -69,14 +69,14 @@ function ie(t, r, e) {
69
69
  };
70
70
  }
71
71
  let b = class {
72
- constructor(t, r, e) {
72
+ constructor(e, r, t) {
73
73
  T(this, "_image");
74
- this._injector = e, this._image = {
74
+ this._injector = t, this._image = {
75
75
  drawingId: X(6),
76
76
  drawingType: _.DRAWING_IMAGE,
77
- imageSourceType: I.BASE64,
77
+ imageSourceType: f.BASE64,
78
78
  source: "",
79
- unitId: t,
79
+ unitId: e,
80
80
  subUnitId: r,
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(t) {
115
- const e = this._injector.get(A).getRenderById(t.unitId);
116
- if (!e)
117
- throw new Error(`Render Unit with unitId ${t.unitId} not found`);
118
- const i = e.with(F);
119
- return t.sheetTransform == null && (t.sheetTransform = {
114
+ setImage(e) {
115
+ const t = this._injector.get(A).getRenderById(e.unitId);
116
+ if (!t)
117
+ throw new Error(`Render Unit with unitId ${e.unitId} not found`);
118
+ const i = t.with(F);
119
+ return e.sheetTransform == null && (e.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 = re(t, i), this;
132
+ }), this._image = te(e, i), this;
133
133
  }
134
- setSource(t, r) {
135
- const e = r != null ? r : I.URL;
136
- return this._image.source = t, this._image.imageSourceType = e, this;
134
+ setSource(e, r) {
135
+ const t = r != null ? r : f.URL;
136
+ return this._image.source = e, 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(t) {
189
- return this._image.column = t, this;
188
+ setColumn(e) {
189
+ return this._image.column = e, 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(t) {
210
- return this._image.row = t, this;
209
+ setRow(e) {
210
+ return this._image.row = e, 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(t) {
232
- return this._image.columnOffset = t, this;
231
+ setColumnOffset(e) {
232
+ return this._image.columnOffset = e, 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(t) {
254
- return this._image.rowOffset = t, this;
253
+ setRowOffset(e) {
254
+ return this._image.rowOffset = e, 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(t) {
277
- return this._image.width = t, this;
276
+ setWidth(e) {
277
+ return this._image.width = e, 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(t) {
300
- return this._image.height = t, this;
299
+ setHeight(e) {
300
+ return this._image.height = e, 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(t) {
349
- return this._image.anchorType = t, this;
348
+ setAnchorType(e) {
349
+ return this._image.anchorType = e, 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(t) {
371
- return this._initializeSrcRect(), this._image.srcRect.top = t, this;
370
+ setCropTop(e) {
371
+ return this._initializeSrcRect(), this._image.srcRect.top = e, 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(t) {
393
- return this._initializeSrcRect(), this._image.srcRect.left = t, this;
392
+ setCropLeft(e) {
393
+ return this._initializeSrcRect(), this._image.srcRect.left = e, 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(t) {
415
- return this._initializeSrcRect(), this._image.srcRect.bottom = t, this;
414
+ setCropBottom(e) {
415
+ return this._initializeSrcRect(), this._image.srcRect.bottom = e, 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(t) {
437
- return this._initializeSrcRect(), this._image.srcRect.right = t, this;
436
+ setCropRight(e) {
437
+ return this._initializeSrcRect(), this._image.srcRect.right = e, 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(t) {
467
- return this._image.angle = t, this;
466
+ setRotate(e) {
467
+ return this._image.angle = e, this;
468
468
  }
469
- setUnitId(t) {
470
- return this._image.unitId = t, this;
469
+ setUnitId(e) {
470
+ return this._image.unitId = e, this;
471
471
  }
472
- setSubUnitId(t) {
473
- return this._image.subUnitId = t, this;
472
+ setSubUnitId(e) {
473
+ return this._image.subUnitId = e, this;
474
474
  }
475
475
  async buildAsync() {
476
476
  const r = this._injector.get(A).getRenderById(this._image.unitId);
477
477
  if (!r)
478
478
  throw new Error(`Render Unit with unitId ${this._image.unitId} not found`);
479
- const e = r.with(q), i = r.with(F);
479
+ const t = r.with(q), i = r.with(F);
480
480
  if (this._image.width === 0 || this._image.height === 0) {
481
481
  const n = await V(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 ie(this._image, e, i);
484
+ return re(this._image, t, i);
485
485
  }
486
486
  };
487
487
  b = N([
488
488
  B(2, U(P))
489
489
  ], b);
490
490
  let m = class extends Y {
491
- constructor(t, r, e) {
492
- super(), this._image = t, this._commandService = r, this._injector = e;
491
+ constructor(e, r, t) {
492
+ super(), this._image = e, this._commandService = r, this._injector = t;
493
493
  }
494
494
  /**
495
495
  * Get the id of the image
@@ -552,16 +552,16 @@ let m = class extends Y {
552
552
  * ```
553
553
  */
554
554
  toBuilder() {
555
- const t = this._injector.createInstance(b);
556
- return t.setImage(this._image), t;
555
+ const e = this._injector.createInstance(b);
556
+ return e.setImage(this._image), e;
557
557
  }
558
- setSource(t, r) {
559
- const e = r != null ? r : I.URL;
560
- return this._image.source = t, this._image.imageSourceType = e, this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [this._image] });
558
+ setSource(e, r) {
559
+ const t = r != null ? r : f.URL;
560
+ return this._image.source = e, this._image.imageSourceType = t, this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [this._image] });
561
561
  }
562
- async setPositionAsync(t, r, e, i) {
562
+ async setPositionAsync(e, r, t, i) {
563
563
  const n = this.toBuilder();
564
- n.setColumn(r), n.setRow(t), e != null && n.setRowOffset(e), i != null && n.setColumnOffset(i);
564
+ n.setColumn(r), n.setRow(e), t != null && n.setRowOffset(t), i != null && n.setColumnOffset(i);
565
565
  const s = await n.buildAsync();
566
566
  return this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [s] });
567
567
  }
@@ -580,10 +580,10 @@ let m = class extends Y {
580
580
  * console.log(result);
581
581
  * ```
582
582
  */
583
- async setSizeAsync(t, r) {
584
- const e = this.toBuilder();
585
- e.setWidth(t), e.setHeight(r);
586
- const i = await e.buildAsync();
583
+ async setSizeAsync(e, r) {
584
+ const t = this.toBuilder();
585
+ t.setWidth(e), t.setHeight(r);
586
+ const i = await t.buildAsync();
587
587
  return this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [i] });
588
588
  }
589
589
  /**
@@ -603,13 +603,13 @@ let m = class extends Y {
603
603
  * console.log(result);
604
604
  * ```
605
605
  */
606
- setCrop(t, r, e, i) {
606
+ setCrop(e, r, t, i) {
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
- }), t != null && (this._image.srcRect.top = t), r != null && (this._image.srcRect.left = r), e != null && (this._image.srcRect.bottom = e), i != null && (this._image.srcRect.right = i), this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [this._image] });
612
+ }), e != null && (this._image.srcRect.top = e), r != null && (this._image.srcRect.left = r), 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] });
613
613
  }
614
614
  /**
615
615
  * Set the rotation angle of the image
@@ -625,8 +625,8 @@ let m = class extends Y {
625
625
  * console.log(result);
626
626
  * ```
627
627
  */
628
- setRotate(t) {
629
- return this._image.sheetTransform.angle = t, this._image.transform && (this._image.transform.angle = t), this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [this._image] });
628
+ setRotate(e) {
629
+ return this._image.sheetTransform.angle = e, this._image.transform && (this._image.transform.angle = e), 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
@@ -713,9 +713,9 @@ m = N([
713
713
  B(1, j),
714
714
  B(2, U(P))
715
715
  ], m);
716
- class ne extends z {
717
- addFloatDomToPosition(r, e) {
718
- const i = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), { key: s, disposableCollection: o } = R(r, this._injector.get(G)), a = this._injector.get(D).addFloatDomToPosition({ ...r, componentKey: s, unitId: i, subUnitId: n }, e);
716
+ class ie extends z {
717
+ addFloatDomToPosition(r, t) {
718
+ const i = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), { key: s, disposableCollection: o } = R(r, this._injector.get(G)), a = this._injector.get(D).addFloatDomToPosition({ ...r, componentKey: s, unitId: i, subUnitId: n }, t);
719
719
  return a ? (o.add(a.dispose), {
720
720
  id: a.id,
721
721
  dispose: () => {
@@ -723,8 +723,8 @@ class ne extends z {
723
723
  }
724
724
  }) : (o.dispose(), null);
725
725
  }
726
- addFloatDomToRange(r, e, i, n) {
727
- const s = this._workbook.getUnitId(), o = this._worksheet.getSheetId(), { key: d, disposableCollection: a } = R(e, this._injector.get(G)), c = this._injector.get(D).addFloatDomToRange(r.getRange(), { ...e, componentKey: d, unitId: s, subUnitId: o }, i, n);
726
+ addFloatDomToRange(r, 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(r.getRange(), { ...t, componentKey: d, unitId: s, subUnitId: o }, i, n);
728
728
  return c ? (a.add(c.dispose), {
729
729
  id: c.id,
730
730
  dispose: () => {
@@ -732,8 +732,8 @@ class ne extends z {
732
732
  }
733
733
  }) : (a.dispose(), null);
734
734
  }
735
- addFloatDomToColumnHeader(r, e, i, n) {
736
- const s = this._workbook.getUnitId(), o = this._worksheet.getSheetId(), { key: d, disposableCollection: a } = R(e, this._injector.get(G)), c = this._injector.get(D).addFloatDomToColumnHeader(r, { ...e, componentKey: d, unitId: s, subUnitId: o }, i, n);
735
+ addFloatDomToColumnHeader(r, 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(r, { ...t, componentKey: d, unitId: s, subUnitId: o }, i, n);
737
737
  return c ? (a.add(c.dispose), {
738
738
  id: c.id,
739
739
  dispose: () => {
@@ -741,35 +741,35 @@ class ne extends z {
741
741
  }
742
742
  }) : (a.dispose(), null);
743
743
  }
744
- async insertImage(r, e, i, n, s) {
744
+ async insertImage(r, t, i, n, s) {
745
745
  const o = this.newOverGridImage();
746
746
  if (typeof r == "string")
747
747
  o.setSource(r);
748
748
  else {
749
749
  const g = await r.getBlob().getDataAsString();
750
- o.setSource(g, I.BASE64);
750
+ o.setSource(g, f.BASE64);
751
751
  }
752
- e !== void 0 ? o.setColumn(e) : 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), 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);
753
753
  const d = await o.buildAsync();
754
754
  return this._commandService.syncExecuteCommand(p.id, { unitId: this._fWorkbook.getId(), drawings: [d] });
755
755
  }
756
756
  insertImages(r) {
757
- const e = r.map((i) => (i.unitId = this._fWorkbook.getId(), i.subUnitId = this.getSheetId(), i));
758
- return this._commandService.syncExecuteCommand(p.id, { unitId: this._fWorkbook.getId(), drawings: e }), this;
757
+ const t = r.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;
759
759
  }
760
760
  deleteImages(r) {
761
- const e = r.map((i) => ({
761
+ const t = r.map((i) => ({
762
762
  unitId: this._fWorkbook.getId(),
763
763
  drawingId: i.getId(),
764
764
  subUnitId: this.getSheetId(),
765
765
  drawingType: i.getType()
766
766
  }));
767
- return this._commandService.syncExecuteCommand(S.id, { unitId: this._fWorkbook.getId(), drawings: e }), this;
767
+ return this._commandService.syncExecuteCommand(S.id, { unitId: this._fWorkbook.getId(), drawings: t }), this;
768
768
  }
769
769
  getImages() {
770
- const e = this._injector.get(l).getDrawingData(this._fWorkbook.getId(), this.getSheetId()), i = [];
771
- for (const n in e) {
772
- const s = e[n];
770
+ const t = this._injector.get(l).getDrawingData(this._fWorkbook.getId(), this.getSheetId()), i = [];
771
+ for (const n in t) {
772
+ const s = t[n];
773
773
  s.drawingType === _.DRAWING_IMAGE && i.push(this._injector.createInstance(m, s));
774
774
  }
775
775
  return i;
@@ -779,9 +779,9 @@ class ne extends z {
779
779
  return i && i.drawingType === _.DRAWING_IMAGE ? this._injector.createInstance(m, i) : null;
780
780
  }
781
781
  getActiveImages() {
782
- const e = this._injector.get(l).getFocusDrawings(), i = [];
783
- for (const n in e) {
784
- const s = e[n];
782
+ const t = this._injector.get(l).getFocusDrawings(), i = [];
783
+ for (const n in t) {
784
+ const s = t[n];
785
785
  i.push(this._injector.createInstance(m, s));
786
786
  }
787
787
  return i;
@@ -790,51 +790,51 @@ class ne extends z {
790
790
  return this._commandService.syncExecuteCommand(h.id, { unitId: this._fWorkbook.getId(), drawings: r }), this;
791
791
  }
792
792
  onImageInserted(r) {
793
- const e = this._injector.get(l);
794
- return y(e.add$.subscribe((i) => {
793
+ const t = this._injector.get(l);
794
+ return y(t.add$.subscribe((i) => {
795
795
  const n = i.map(
796
- (s) => this._injector.createInstance(m, e.getDrawingByParam(s))
796
+ (s) => this._injector.createInstance(m, t.getDrawingByParam(s))
797
797
  );
798
798
  r(n);
799
799
  }));
800
800
  }
801
801
  onImageDeleted(r) {
802
- const e = this._injector.get(l);
803
- return y(e.remove$.subscribe((i) => {
802
+ const t = this._injector.get(l);
803
+ return y(t.remove$.subscribe((i) => {
804
804
  const n = i.map(
805
- (s) => this._injector.createInstance(m, e.getDrawingByParam(s))
805
+ (s) => this._injector.createInstance(m, t.getDrawingByParam(s))
806
806
  );
807
807
  r(n);
808
808
  }));
809
809
  }
810
810
  onImageChanged(r) {
811
- const e = this._injector.get(l);
812
- return y(e.update$.subscribe((i) => {
811
+ const t = this._injector.get(l);
812
+ return y(t.update$.subscribe((i) => {
813
813
  const n = i.map(
814
- (s) => this._injector.createInstance(m, e.getDrawingByParam(s))
814
+ (s) => this._injector.createInstance(m, t.getDrawingByParam(s))
815
815
  );
816
816
  r(n);
817
817
  }));
818
818
  }
819
819
  newOverGridImage() {
820
- const r = this._fWorkbook.getId(), e = this.getSheetId();
821
- return this._injector.createInstance(b, r, e);
820
+ const r = this._fWorkbook.getId(), t = this.getSheetId();
821
+ return this._injector.createInstance(b, r, t);
822
822
  }
823
823
  }
824
- z.extend(ne);
825
- class se extends W {
824
+ z.extend(ie);
825
+ class ne extends W {
826
826
  get DrawingType() {
827
827
  return _;
828
828
  }
829
829
  get ImageSourceType() {
830
- return I;
830
+ return f;
831
831
  }
832
832
  get SheetDrawingAnchorType() {
833
833
  return Z;
834
834
  }
835
835
  }
836
- W.extend(se);
837
- class oe extends M {
836
+ W.extend(ne);
837
+ class se extends M {
838
838
  get BeforeOverGridImageChange() {
839
839
  return "BeforeOverGridImageChange";
840
840
  }
@@ -860,17 +860,17 @@ class oe extends M {
860
860
  return "OverGridImageSelected";
861
861
  }
862
862
  }
863
- M.extend(oe);
864
- class ae extends H {
863
+ M.extend(se);
864
+ class oe extends H {
865
865
  /**
866
866
  * @ignore
867
867
  */
868
868
  // eslint-disable-next-line max-lines-per-function
869
869
  _initialize(r) {
870
- const e = r.get(j);
870
+ const t = r.get(j);
871
871
  this.registerEventHandler(
872
872
  this.Event.BeforeOverGridImageInsert,
873
- () => e.beforeCommandExecuted((i) => {
873
+ () => t.beforeCommandExecuted((i) => {
874
874
  if (i.id !== p.id) return;
875
875
  const n = i.params, s = this.getActiveWorkbook();
876
876
  if (s == null || n == null)
@@ -884,12 +884,12 @@ class ae extends H {
884
884
  })
885
885
  ), this.registerEventHandler(
886
886
  this.Event.BeforeOverGridImageRemove,
887
- () => e.beforeCommandExecuted((i) => {
887
+ () => t.beforeCommandExecuted((i) => {
888
888
  if (i.id !== S.id) return;
889
889
  const n = i.params, s = this.getActiveWorkbook();
890
890
  if (s == null || n == null)
891
891
  return;
892
- const o = r.get(f), { drawings: d } = n, a = d.map((c) => o.getDrawingByParam(c)), g = {
892
+ const o = r.get(I), { drawings: d } = n, a = d.map((c) => o.getDrawingByParam(c)), g = {
893
893
  workbook: s,
894
894
  images: this._createFOverGridImage(a)
895
895
  };
@@ -898,12 +898,12 @@ class ae extends H {
898
898
  })
899
899
  ), this.registerEventHandler(
900
900
  this.Event.BeforeOverGridImageChange,
901
- () => e.beforeCommandExecuted((i) => {
901
+ () => t.beforeCommandExecuted((i) => {
902
902
  if (i.id !== h.id) return;
903
903
  const n = i.params, s = this.getActiveWorkbook();
904
904
  if (s == null || n == null)
905
905
  return;
906
- const { drawings: o } = n, d = r.get(f), a = [];
906
+ const { drawings: o } = n, d = r.get(I), a = [];
907
907
  o.forEach((c) => {
908
908
  const u = d.getDrawingByParam(c);
909
909
  u != null && a.push({
@@ -920,12 +920,12 @@ class ae extends H {
920
920
  })
921
921
  ), this.registerEventHandler(
922
922
  this.Event.BeforeOverGridImageSelect,
923
- () => e.beforeCommandExecuted((i) => {
923
+ () => t.beforeCommandExecuted((i) => {
924
924
  if (i.id !== x.id) return;
925
925
  const n = i.params, s = this.getActiveWorkbook();
926
926
  if (s == null)
927
927
  return;
928
- const o = r.get(f), d = o.getFocusDrawings(), a = n.map((c) => o.getDrawingByParam(c)), g = {
928
+ const o = r.get(I), d = o.getFocusDrawings(), a = n.map((c) => o.getDrawingByParam(c)), g = {
929
929
  workbook: s,
930
930
  selectedImages: this._createFOverGridImage(a),
931
931
  oldSelectedImages: this._createFOverGridImage(d)
@@ -935,7 +935,7 @@ class ae extends H {
935
935
  })
936
936
  ), this.registerEventHandler(
937
937
  this.Event.OverGridImageInserted,
938
- () => e.onCommandExecuted((i) => {
938
+ () => t.onCommandExecuted((i) => {
939
939
  if (i.id !== p.id) return;
940
940
  const n = i.params, s = this.getActiveWorkbook();
941
941
  if (s == null || n == null)
@@ -948,7 +948,7 @@ class ae extends H {
948
948
  })
949
949
  ), this.registerEventHandler(
950
950
  this.Event.OverGridImageRemoved,
951
- () => e.onCommandExecuted((i) => {
951
+ () => t.onCommandExecuted((i) => {
952
952
  if (i.id !== S.id) return;
953
953
  const n = i.params, s = this.getActiveWorkbook();
954
954
  if (s == null || n == null)
@@ -961,12 +961,12 @@ class ae extends H {
961
961
  })
962
962
  ), this.registerEventHandler(
963
963
  this.Event.OverGridImageChanged,
964
- () => e.onCommandExecuted((i) => {
964
+ () => t.onCommandExecuted((i) => {
965
965
  if (i.id !== h.id) return;
966
966
  const n = i.params, s = this.getActiveWorkbook();
967
967
  if (s == null || n == null)
968
968
  return;
969
- const { drawings: o } = n, d = r.get(f), a = o.map((g) => this._injector.createInstance(m, d.getDrawingByParam(g)));
969
+ const { drawings: o } = n, d = r.get(I), a = o.map((g) => this._injector.createInstance(m, d.getDrawingByParam(g)));
970
970
  this.fireEvent(this.Event.OverGridImageChanged, {
971
971
  workbook: s,
972
972
  images: a
@@ -974,12 +974,12 @@ class ae extends H {
974
974
  })
975
975
  ), this.registerEventHandler(
976
976
  this.Event.OverGridImageSelected,
977
- () => e.onCommandExecuted((i) => {
977
+ () => t.onCommandExecuted((i) => {
978
978
  if (i.id !== x.id) return;
979
979
  const n = i.params, s = this.getActiveWorkbook();
980
980
  if (s == null)
981
981
  return;
982
- const o = r.get(f), d = n.map((a) => o.getDrawingByParam(a));
982
+ const o = r.get(I), d = n.map((a) => o.getDrawingByParam(a));
983
983
  this.fireEvent(this.Event.OverGridImageSelected, {
984
984
  workbook: s,
985
985
  selectedImages: this._createFOverGridImage(d)
@@ -988,7 +988,7 @@ class ae extends H {
988
988
  );
989
989
  }
990
990
  _createFOverGridImage(r) {
991
- return r.map((e) => this._injector.createInstance(m, e));
991
+ return r.map((t) => this._injector.createInstance(m, t));
992
992
  }
993
993
  }
994
- H.extend(ae);
994
+ H.extend(oe);