@univerjs/sheets-drawing-ui 0.6.0-nightly.202502131606 → 0.6.0-nightly.202502151605

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 L = Object.defineProperty;
2
- var X = (t, r, e) => r in t ? L(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
3
- var x = (t, r, e) => X(t, typeof r != "symbol" ? r + "" : r, e);
4
- import { Inject as P, Injector as j, ICommandService as W, ImageSourceType as f, ArrangeTypeEnum as v, DrawingTypeEnum as _, generateRandomId as Y, toDisposable as E } from "@univerjs/core";
2
+ var X = (r, t, e) => t in r ? L(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
+ var x = (r, t, e) => X(r, typeof t != "symbol" ? t + "" : t, e);
4
+ import { Inject as P, Injector as j, ICommandService as W, generateRandomId as Y, DrawingTypeEnum as _, ImageSourceType as I, ArrangeTypeEnum as v, toDisposable as k } from "@univerjs/core";
5
5
  import { FBase as V, FEnum as M, FEventName as H, FUniver as z } from "@univerjs/core/facade";
6
- import { getImageSize as q, IDrawingManagerService as I, SetDrawingSelectedOperation as A } from "@univerjs/drawing";
6
+ import { getImageSize as q, IDrawingManagerService as f, SetDrawingSelectedOperation as A } from "@univerjs/drawing";
7
7
  import { IRenderManagerService as F } from "@univerjs/engine-render";
8
8
  import { SetSheetDrawingCommand as h, SetDrawingArrangeCommand as w, SheetCanvasFloatDomManagerService as C, InsertSheetDrawingCommand as S, RemoveSheetDrawingCommand as R } from "@univerjs/sheets-drawing-ui";
9
9
  import { SheetSkeletonManagerService as U, ISheetSelectionRenderService as J, convertPositionSheetOverGridToAbsolute as Q, convertPositionCellToSheetOverGrid as Z } from "@univerjs/sheets-ui";
@@ -11,25 +11,25 @@ import { ISheetDrawingService as l, SheetDrawingAnchorType as ee } from "@univer
11
11
  import { transformComponentKey as y } from "@univerjs/sheets-ui/facade";
12
12
  import { FWorksheet as N } from "@univerjs/sheets/facade";
13
13
  import { ComponentManager as D } from "@univerjs/ui";
14
- var te = Object.getOwnPropertyDescriptor, $ = (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 = o(n) || n);
17
- return n;
18
- }, G = (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: b } = e, O = Q(
21
- t.unitId,
22
- t.subUnitId,
14
+ var te = Object.defineProperty, re = Object.getOwnPropertyDescriptor, $ = (r, t, e, i) => {
15
+ for (var n = i > 1 ? void 0 : i ? re(t, e) : t, s = r.length - 1, o; s >= 0; s--)
16
+ (o = r[s]) && (n = (i ? o(t, e, n) : o(n)) || n);
17
+ return i && n && te(t, e, n), n;
18
+ }, G = (r, t) => (e, i) => t(e, i, r);
19
+ function ie(r, t) {
20
+ const { from: e, 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: b } = e, O = Q(
21
+ r.unitId,
22
+ r.subUnitId,
23
23
  { from: e, to: i },
24
- r
25
- ), { left: B, top: T, width: k, height: K } = O;
24
+ t
25
+ ), { left: B, top: T, width: E, height: K } = O;
26
26
  return {
27
- ...t,
27
+ ...r,
28
28
  column: g,
29
29
  columnOffset: c,
30
30
  row: u,
31
31
  rowOffset: b,
32
- width: k,
32
+ width: E,
33
33
  height: K,
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: b, height: O } = t, B = Z(
43
- t.unitId,
44
- t.subUnitId,
41
+ function ne(r, t, 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: b, height: O } = r, B = Z(
43
+ r.unitId,
44
+ r.subUnitId,
45
45
  { column: i, columnOffset: n, row: s, rowOffset: o },
46
46
  b,
47
47
  O,
48
- r,
48
+ t,
49
49
  e
50
- ), { sheetTransform: T, transform: k } = B;
50
+ ), { sheetTransform: T, transform: E } = B;
51
51
  return {
52
- ...t,
52
+ ...r,
53
53
  sheetTransform: {
54
54
  ...T,
55
55
  flipY: d,
@@ -59,7 +59,7 @@ function ie(t, r, e) {
59
59
  skewY: u
60
60
  },
61
61
  transform: {
62
- ...k,
62
+ ...E,
63
63
  flipY: d,
64
64
  flipX: a,
65
65
  angle: g,
@@ -69,15 +69,15 @@ function ie(t, r, e) {
69
69
  };
70
70
  }
71
71
  let p = class {
72
- constructor(t, r, e) {
72
+ constructor(r, t, e) {
73
73
  x(this, "_image");
74
74
  this._injector = e, this._image = {
75
75
  drawingId: Y(6),
76
76
  drawingType: _.DRAWING_IMAGE,
77
- imageSourceType: f.BASE64,
77
+ imageSourceType: I.BASE64,
78
78
  source: "",
79
- unitId: t,
80
- subUnitId: r,
79
+ unitId: r,
80
+ subUnitId: t,
81
81
  column: 0,
82
82
  columnOffset: 0,
83
83
  row: 0,
@@ -107,12 +107,12 @@ let p = class {
107
107
  * activeSheet.insertImages([param]);
108
108
  * ```
109
109
  */
110
- setImage(t) {
111
- const e = this._injector.get(F).getRenderById(t.unitId);
110
+ setImage(r) {
111
+ const e = this._injector.get(F).getRenderById(r.unitId);
112
112
  if (!e)
113
- throw new Error(`Render Unit with unitId ${t.unitId} not found`);
113
+ throw new Error(`Render Unit with unitId ${r.unitId} not found`);
114
114
  const i = e.with(U);
115
- return t.sheetTransform == null && (t.sheetTransform = {
115
+ return r.sheetTransform == null && (r.sheetTransform = {
116
116
  from: {
117
117
  column: 0,
118
118
  columnOffset: 0,
@@ -125,11 +125,11 @@ let p = class {
125
125
  row: 0,
126
126
  rowOffset: 0
127
127
  }
128
- }), this._image = re(t, i), this;
128
+ }), this._image = ie(r, i), this;
129
129
  }
130
- setSource(t, r) {
131
- const e = r != null ? r : f.URL;
132
- return this._image.source = t, this._image.imageSourceType = e, this;
130
+ setSource(r, t) {
131
+ const e = t != null ? t : I.URL;
132
+ return this._image.source = r, this._image.imageSourceType = e, this;
133
133
  }
134
134
  getsource() {
135
135
  return this._image.source;
@@ -151,8 +151,8 @@ let p = class {
151
151
  * activeSheet.insertImages([param]);
152
152
  * ```
153
153
  */
154
- setColumn(t) {
155
- return this._image.column = t, this;
154
+ setColumn(r) {
155
+ return this._image.column = r, this;
156
156
  }
157
157
  /**
158
158
  * Set the position of the image
@@ -168,8 +168,8 @@ let p = class {
168
168
  * activeSheet.insertImages([param]);
169
169
  * ```
170
170
  */
171
- setRow(t) {
172
- return this._image.row = t, this;
171
+ setRow(r) {
172
+ return this._image.row = r, this;
173
173
  }
174
174
  /**
175
175
  * Set the column offset of the image in a unit
@@ -185,8 +185,8 @@ let p = class {
185
185
  * activeSheet.insertImages([param]);
186
186
  * ```
187
187
  */
188
- setColumnOffset(t) {
189
- return this._image.columnOffset = t, this;
188
+ setColumnOffset(r) {
189
+ return this._image.columnOffset = r, this;
190
190
  }
191
191
  /**
192
192
  * Set the row offset of the image in a unit
@@ -202,8 +202,8 @@ let p = class {
202
202
  * activeSheet.insertImages([param]);
203
203
  * ```
204
204
  */
205
- setRowOffset(t) {
206
- return this._image.rowOffset = t, this;
205
+ setRowOffset(r) {
206
+ return this._image.rowOffset = r, this;
207
207
  }
208
208
  /**
209
209
  * set the width of the image
@@ -219,8 +219,8 @@ let p = class {
219
219
  * activeSheet.insertImages([param]);
220
220
  * ```
221
221
  */
222
- setWidth(t) {
223
- return this._image.width = t, this;
222
+ setWidth(r) {
223
+ return this._image.width = r, this;
224
224
  }
225
225
  /**
226
226
  * Set the height of the image
@@ -236,8 +236,8 @@ let p = class {
236
236
  * activeSheet.insertImages([param]);
237
237
  * ```
238
238
  */
239
- setHeight(t) {
240
- return this._image.height = t, this;
239
+ setHeight(r) {
240
+ return this._image.height = r, this;
241
241
  }
242
242
  /**
243
243
  * Set the anchor type of the image, whether the position and size change with the cell
@@ -253,8 +253,8 @@ let p = class {
253
253
  * activeSheet.insertImages([param]);
254
254
  * ```
255
255
  */
256
- setAnchorType(t) {
257
- return this._image.anchorType = t, this;
256
+ setAnchorType(r) {
257
+ return this._image.anchorType = r, this;
258
258
  }
259
259
  /**
260
260
  * Set the cropping region of the image by defining the top edges, thereby displaying the specific part of the image you want.
@@ -270,8 +270,8 @@ let p = class {
270
270
  * activeSheet.insertImages([param]);
271
271
  * ```
272
272
  */
273
- setCropTop(t) {
274
- return this._initializeSrcRect(), this._image.srcRect.top = t, this;
273
+ setCropTop(r) {
274
+ return this._initializeSrcRect(), this._image.srcRect.top = r, this;
275
275
  }
276
276
  /**
277
277
  * Set the cropping region of the image by defining the left edges, thereby displaying the specific part of the image you want.
@@ -287,8 +287,8 @@ let p = class {
287
287
  * activeSheet.insertImages([param]);
288
288
  * ```
289
289
  */
290
- setCropLeft(t) {
291
- return this._initializeSrcRect(), this._image.srcRect.left = t, this;
290
+ setCropLeft(r) {
291
+ return this._initializeSrcRect(), this._image.srcRect.left = r, this;
292
292
  }
293
293
  /**
294
294
  * Set the cropping region of the image by defining the bottom edges, thereby displaying the specific part of the image you want.
@@ -304,8 +304,8 @@ let p = class {
304
304
  * activeSheet.insertImages([param]);
305
305
  * ```
306
306
  */
307
- setCropBottom(t) {
308
- return this._initializeSrcRect(), this._image.srcRect.bottom = t, this;
307
+ setCropBottom(r) {
308
+ return this._initializeSrcRect(), this._image.srcRect.bottom = r, this;
309
309
  }
310
310
  /**
311
311
  * Set the cropping region of the image by defining the right edges, thereby displaying the specific part of the image you want.
@@ -321,8 +321,8 @@ let p = class {
321
321
  * activeSheet.insertImages([param]);
322
322
  * ```
323
323
  */
324
- setCropRight(t) {
325
- return this._initializeSrcRect(), this._image.srcRect.right = t, this;
324
+ setCropRight(r) {
325
+ return this._initializeSrcRect(), this._image.srcRect.right = r, this;
326
326
  }
327
327
  _initializeSrcRect() {
328
328
  this._image.srcRect == null && (this._image.srcRect = {
@@ -346,37 +346,37 @@ let p = class {
346
346
  * activeSheet.insertImages([param]);
347
347
  * ```
348
348
  */
349
- setRotate(t) {
350
- return this._image.angle = t, this;
349
+ setRotate(r) {
350
+ return this._image.angle = r, this;
351
351
  }
352
352
  // setPresetGeometry(prstGeom: PresetGeometryType): FOverGridImageBuilder {
353
353
  // this._image.prstGeom = prstGeom;
354
354
  // return this;
355
355
  // }
356
- setUnitId(t) {
357
- return this._image.unitId = t, this;
356
+ setUnitId(r) {
357
+ return this._image.unitId = r, this;
358
358
  }
359
- setSubUnitId(t) {
360
- return this._image.subUnitId = t, this;
359
+ setSubUnitId(r) {
360
+ return this._image.subUnitId = r, this;
361
361
  }
362
362
  async buildAsync() {
363
- const r = this._injector.get(F).getRenderById(this._image.unitId);
364
- if (!r)
363
+ const t = this._injector.get(F).getRenderById(this._image.unitId);
364
+ if (!t)
365
365
  throw new Error(`Render Unit with unitId ${this._image.unitId} not found`);
366
- const e = r.with(J), i = r.with(U);
366
+ const e = t.with(J), i = t.with(U);
367
367
  if (this._image.width === 0 || this._image.height === 0) {
368
368
  const n = await q(this._image.source), s = n.width, o = n.height;
369
369
  this._image.width === 0 && (this._image.width = s), this._image.height === 0 && (this._image.height = o);
370
370
  }
371
- return ie(this._image, e, i);
371
+ return ne(this._image, e, i);
372
372
  }
373
373
  };
374
374
  p = $([
375
375
  G(2, P(j))
376
376
  ], p);
377
377
  let m = class extends V {
378
- constructor(t, r, e) {
379
- super(), this._image = t, this._commandService = r, this._injector = e;
378
+ constructor(r, t, e) {
379
+ super(), this._image = r, this._commandService = t, this._injector = e;
380
380
  }
381
381
  getId() {
382
382
  return this._image.drawingId;
@@ -414,16 +414,16 @@ let m = class extends V {
414
414
  * ```
415
415
  */
416
416
  toBuilder() {
417
- const t = this._injector.createInstance(p);
418
- return t.setImage(this._image), t;
417
+ const r = this._injector.createInstance(p);
418
+ return r.setImage(this._image), r;
419
419
  }
420
- setSource(t, r) {
421
- const e = r != null ? r : f.URL;
422
- return this._image.source = t, this._image.imageSourceType = e, this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [this._image] });
420
+ setSource(r, t) {
421
+ const e = t != null ? t : I.URL;
422
+ return this._image.source = r, this._image.imageSourceType = e, this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [this._image] });
423
423
  }
424
- async setPositionAsync(t, r, e, i) {
424
+ async setPositionAsync(r, t, e, i) {
425
425
  const n = this.toBuilder();
426
- n.setColumn(r), n.setRow(t), e != null && n.setRowOffset(e), i != null && n.setColumnOffset(i);
426
+ n.setColumn(t), n.setRow(r), e != null && n.setRowOffset(e), i != null && n.setColumnOffset(i);
427
427
  const s = await n.buildAsync();
428
428
  return this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [s] });
429
429
  }
@@ -440,9 +440,9 @@ let m = class extends V {
440
440
  * const image = activeSheet.getImages()[0];
441
441
  * console.log('Set size state is ', image.setSize(50, 120));
442
442
  */
443
- async setSizeAsync(t, r) {
443
+ async setSizeAsync(r, t) {
444
444
  const e = this.toBuilder();
445
- e.setWidth(t), e.setHeight(r);
445
+ e.setWidth(r), e.setHeight(t);
446
446
  const i = await e.buildAsync();
447
447
  return this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [i] });
448
448
  }
@@ -462,13 +462,13 @@ let m = class extends V {
462
462
  * console.log('Set crop state is ', image.setCrop(10, 10, 10, 10));
463
463
  * ```
464
464
  */
465
- setCrop(t, r, e, i) {
465
+ setCrop(r, t, e, i) {
466
466
  return this._image.srcRect == null && (this._image.srcRect = {
467
467
  top: 0,
468
468
  left: 0,
469
469
  bottom: 0,
470
470
  right: 0
471
- }), 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] });
471
+ }), r != null && (this._image.srcRect.top = r), t != null && (this._image.srcRect.left = t), 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] });
472
472
  }
473
473
  // setPresetGeometry(prstGeom: PresetGeometryType): boolean {
474
474
  // this._image.prstGeom = prstGeom;
@@ -487,8 +487,8 @@ let m = class extends V {
487
487
  * console.log('Set rotate state is ', image.setRotate(90));
488
488
  * ```
489
489
  */
490
- setRotate(t) {
491
- return this._image.sheetTransform.angle = t, this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [this._image] });
490
+ setRotate(r) {
491
+ return this._image.sheetTransform.angle = r, this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [this._image] });
492
492
  }
493
493
  /**
494
494
  * Move the image layer forward by one level
@@ -575,9 +575,9 @@ m = $([
575
575
  G(1, W),
576
576
  G(2, P(j))
577
577
  ], m);
578
- class ne extends N {
579
- addFloatDomToPosition(r, e) {
580
- const i = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), { key: s, disposableCollection: o } = y(r, this._injector.get(D)), a = this._injector.get(C).addFloatDomToPosition({ ...r, componentKey: s, unitId: i, subUnitId: n }, e);
578
+ class se extends N {
579
+ addFloatDomToPosition(t, e) {
580
+ const i = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), { key: s, disposableCollection: o } = y(t, this._injector.get(D)), a = this._injector.get(C).addFloatDomToPosition({ ...t, componentKey: s, unitId: i, subUnitId: n }, e);
581
581
  return a ? (o.add(a.dispose), {
582
582
  id: a.id,
583
583
  dispose: () => {
@@ -585,8 +585,8 @@ class ne extends N {
585
585
  }
586
586
  }) : (o.dispose(), null);
587
587
  }
588
- addFloatDomToRange(r, e, i, n) {
589
- const s = this._workbook.getUnitId(), o = this._worksheet.getSheetId(), { key: d, disposableCollection: a } = y(e, this._injector.get(D)), c = this._injector.get(C).addFloatDomToRange(r.getRange(), { ...e, componentKey: d, unitId: s, subUnitId: o }, i, n);
588
+ addFloatDomToRange(t, e, i, n) {
589
+ const s = this._workbook.getUnitId(), o = this._worksheet.getSheetId(), { key: d, disposableCollection: a } = y(e, this._injector.get(D)), c = this._injector.get(C).addFloatDomToRange(t.getRange(), { ...e, componentKey: d, unitId: s, subUnitId: o }, i, n);
590
590
  return c ? (a.add(c.dispose), {
591
591
  id: c.id,
592
592
  dispose: () => {
@@ -594,8 +594,8 @@ class ne extends N {
594
594
  }
595
595
  }) : (a.dispose(), null);
596
596
  }
597
- addFloatDomToColumnHeader(r, e, i, n) {
598
- const s = this._workbook.getUnitId(), o = this._worksheet.getSheetId(), { key: d, disposableCollection: a } = y(e, this._injector.get(D)), c = this._injector.get(C).addFloatDomToColumnHeader(r, { ...e, componentKey: d, unitId: s, subUnitId: o }, i, n);
597
+ addFloatDomToColumnHeader(t, e, i, n) {
598
+ const s = this._workbook.getUnitId(), o = this._worksheet.getSheetId(), { key: d, disposableCollection: a } = y(e, this._injector.get(D)), c = this._injector.get(C).addFloatDomToColumnHeader(t, { ...e, componentKey: d, unitId: s, subUnitId: o }, i, n);
599
599
  return c ? (a.add(c.dispose), {
600
600
  id: c.id,
601
601
  dispose: () => {
@@ -603,24 +603,24 @@ class ne extends N {
603
603
  }
604
604
  }) : (a.dispose(), null);
605
605
  }
606
- async insertImage(r, e, i, n, s) {
606
+ async insertImage(t, e, i, n, s) {
607
607
  const o = this.newOverGridImage();
608
- if (typeof r == "string")
609
- o.setSource(r);
608
+ if (typeof t == "string")
609
+ o.setSource(t);
610
610
  else {
611
- const g = await r.getBlob().getDataAsString();
612
- o.setSource(g, f.BASE64);
611
+ const g = await t.getBlob().getDataAsString();
612
+ o.setSource(g, I.BASE64);
613
613
  }
614
614
  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);
615
615
  const d = await o.buildAsync();
616
616
  return this._commandService.syncExecuteCommand(S.id, { unitId: this._fWorkbook.getId(), drawings: [d] });
617
617
  }
618
- insertImages(r) {
619
- const e = r.map((i) => (i.unitId = this._fWorkbook.getId(), i.subUnitId = this.getSheetId(), i));
618
+ insertImages(t) {
619
+ const e = t.map((i) => (i.unitId = this._fWorkbook.getId(), i.subUnitId = this.getSheetId(), i));
620
620
  return this._commandService.syncExecuteCommand(S.id, { unitId: this._fWorkbook.getId(), drawings: e }), this;
621
621
  }
622
- deleteImages(r) {
623
- const e = r.map((i) => ({
622
+ deleteImages(t) {
623
+ const e = t.map((i) => ({
624
624
  unitId: this._fWorkbook.getId(),
625
625
  drawingId: i.getId(),
626
626
  subUnitId: this.getSheetId(),
@@ -636,8 +636,8 @@ class ne extends N {
636
636
  }
637
637
  return i;
638
638
  }
639
- getImageById(r) {
640
- const i = this._injector.get(l).getDrawingByParam({ unitId: this._fWorkbook.getId(), subUnitId: this.getSheetId(), drawingId: r });
639
+ getImageById(t) {
640
+ const i = this._injector.get(l).getDrawingByParam({ unitId: this._fWorkbook.getId(), subUnitId: this.getSheetId(), drawingId: t });
641
641
  return i && i.drawingType === _.DRAWING_IMAGE ? this._injector.createInstance(m, i) : null;
642
642
  }
643
643
  getActiveImages() {
@@ -648,55 +648,55 @@ class ne extends N {
648
648
  }
649
649
  return i;
650
650
  }
651
- updateImages(r) {
652
- return this._commandService.syncExecuteCommand(h.id, { unitId: this._fWorkbook.getId(), drawings: r }), this;
651
+ updateImages(t) {
652
+ return this._commandService.syncExecuteCommand(h.id, { unitId: this._fWorkbook.getId(), drawings: t }), this;
653
653
  }
654
- onImageInserted(r) {
654
+ onImageInserted(t) {
655
655
  const e = this._injector.get(l);
656
- return E(e.add$.subscribe((i) => {
656
+ return k(e.add$.subscribe((i) => {
657
657
  const n = i.map(
658
658
  (s) => this._injector.createInstance(m, e.getDrawingByParam(s))
659
659
  );
660
- r(n);
660
+ t(n);
661
661
  }));
662
662
  }
663
- onImageDeleted(r) {
663
+ onImageDeleted(t) {
664
664
  const e = this._injector.get(l);
665
- return E(e.remove$.subscribe((i) => {
665
+ return k(e.remove$.subscribe((i) => {
666
666
  const n = i.map(
667
667
  (s) => this._injector.createInstance(m, e.getDrawingByParam(s))
668
668
  );
669
- r(n);
669
+ t(n);
670
670
  }));
671
671
  }
672
- onImageChanged(r) {
672
+ onImageChanged(t) {
673
673
  const e = this._injector.get(l);
674
- return E(e.update$.subscribe((i) => {
674
+ return k(e.update$.subscribe((i) => {
675
675
  const n = i.map(
676
676
  (s) => this._injector.createInstance(m, e.getDrawingByParam(s))
677
677
  );
678
- r(n);
678
+ t(n);
679
679
  }));
680
680
  }
681
681
  newOverGridImage() {
682
- const r = this._fWorkbook.getId(), e = this.getSheetId();
683
- return this._injector.createInstance(p, r, e);
682
+ const t = this._fWorkbook.getId(), e = this.getSheetId();
683
+ return this._injector.createInstance(p, t, e);
684
684
  }
685
685
  }
686
- N.extend(ne);
687
- class se extends M {
686
+ N.extend(se);
687
+ class oe extends M {
688
688
  get DrawingType() {
689
689
  return _;
690
690
  }
691
691
  get ImageSourceType() {
692
- return f;
692
+ return I;
693
693
  }
694
694
  get SheetDrawingAnchorType() {
695
695
  return ee;
696
696
  }
697
697
  }
698
- M.extend(se);
699
- class oe extends H {
698
+ M.extend(oe);
699
+ class ae extends H {
700
700
  get BeforeOverGridImageChange() {
701
701
  return "BeforeOverGridImageChange";
702
702
  }
@@ -722,14 +722,14 @@ class oe extends H {
722
722
  return "OverGridImageSelected";
723
723
  }
724
724
  }
725
- H.extend(oe);
726
- class ae extends z {
725
+ H.extend(ae);
726
+ class de extends z {
727
727
  /**
728
728
  * @ignore
729
729
  */
730
730
  // eslint-disable-next-line max-lines-per-function
731
- _initialize(r) {
732
- const e = r.get(W);
731
+ _initialize(t) {
732
+ const e = t.get(W);
733
733
  this.registerEventHandler(
734
734
  this.Event.BeforeOverGridImageInsert,
735
735
  () => e.beforeCommandExecuted((i) => {
@@ -751,7 +751,7 @@ class ae extends z {
751
751
  const n = i.params, s = this.getActiveWorkbook();
752
752
  if (s == null || n == null)
753
753
  return;
754
- const o = r.get(I), { drawings: d } = n, a = d.map((c) => o.getDrawingByParam(c)), g = {
754
+ const o = t.get(f), { drawings: d } = n, a = d.map((c) => o.getDrawingByParam(c)), g = {
755
755
  workbook: s,
756
756
  images: this._createFOverGridImage(a)
757
757
  };
@@ -765,7 +765,7 @@ class ae extends z {
765
765
  const n = i.params, s = this.getActiveWorkbook();
766
766
  if (s == null || n == null)
767
767
  return;
768
- const { drawings: o } = n, d = r.get(I), a = [];
768
+ const { drawings: o } = n, d = t.get(f), a = [];
769
769
  o.forEach((c) => {
770
770
  const u = d.getDrawingByParam(c);
771
771
  u != null && a.push({
@@ -787,7 +787,7 @@ class ae extends z {
787
787
  const n = i.params, s = this.getActiveWorkbook();
788
788
  if (s == null)
789
789
  return;
790
- const o = r.get(I), d = o.getFocusDrawings(), a = n.map((c) => o.getDrawingByParam(c)), g = {
790
+ const o = t.get(f), d = o.getFocusDrawings(), a = n.map((c) => o.getDrawingByParam(c)), g = {
791
791
  workbook: s,
792
792
  selectedImages: this._createFOverGridImage(a),
793
793
  oldSelectedImages: this._createFOverGridImage(d)
@@ -828,7 +828,7 @@ class ae extends z {
828
828
  const n = i.params, s = this.getActiveWorkbook();
829
829
  if (s == null || n == null)
830
830
  return;
831
- const { drawings: o } = n, d = r.get(I), a = o.map((g) => this._injector.createInstance(m, d.getDrawingByParam(g)));
831
+ const { drawings: o } = n, d = t.get(f), a = o.map((g) => this._injector.createInstance(m, d.getDrawingByParam(g)));
832
832
  this.fireEvent(this.Event.OverGridImageChanged, {
833
833
  workbook: s,
834
834
  images: a
@@ -841,7 +841,7 @@ class ae extends z {
841
841
  const n = i.params, s = this.getActiveWorkbook();
842
842
  if (s == null)
843
843
  return;
844
- const o = r.get(I), d = n.map((a) => o.getDrawingByParam(a));
844
+ const o = t.get(f), d = n.map((a) => o.getDrawingByParam(a));
845
845
  this.fireEvent(this.Event.OverGridImageSelected, {
846
846
  workbook: s,
847
847
  selectedImages: this._createFOverGridImage(d)
@@ -849,8 +849,8 @@ class ae extends z {
849
849
  })
850
850
  );
851
851
  }
852
- _createFOverGridImage(r) {
853
- return r.map((e) => this._injector.createInstance(m, e));
852
+ _createFOverGridImage(t) {
853
+ return t.map((e) => this._injector.createInstance(m, e));
854
854
  }
855
855
  }
856
- z.extend(ae);
856
+ z.extend(de);