@univerjs/sheets-drawing-ui 0.5.3 → 0.5.4

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,81 +1,81 @@
1
- var E = Object.defineProperty;
2
- var P = (e, t, i) => t in e ? E(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
3
- var R = (e, t, i) => P(e, typeof t != "symbol" ? t + "" : t, i);
4
- import { Inject as O, Injector as k, ICommandService as U, generateRandomId as W, DrawingTypeEnum as x, ImageSourceType as _, FBase as F } from "@univerjs/core";
5
- import { getImageSize as M } from "@univerjs/drawing";
6
- import { IRenderManagerService as C } from "@univerjs/engine-render";
7
- import { SetSheetDrawingCommand as h, SheetCanvasFloatDomManagerService as z, InsertSheetDrawingCommand as D, RemoveSheetDrawingCommand as A } from "@univerjs/sheets-drawing-ui";
8
- import { SheetSkeletonManagerService as y, ISheetSelectionRenderService as G, convertPositionSheetOverGridToAbsolute as $, convertPositionCellToSheetOverGrid as L } from "@univerjs/sheets-ui";
9
- import { ISheetDrawingService as g } from "@univerjs/sheets-drawing";
10
- import { transformComponentKey as X } from "@univerjs/sheets-ui/facade";
11
- import { FWorksheet as j } from "@univerjs/sheets/facade";
12
- import { ComponentManager as Y } from "@univerjs/ui";
13
- var H = Object.defineProperty, K = Object.getOwnPropertyDescriptor, T = (e, t, i, s) => {
14
- for (var n = s > 1 ? void 0 : s ? K(t, i) : t, o = e.length - 1, r; o >= 0; o--)
15
- (r = e[o]) && (n = (s ? r(t, i, n) : r(n)) || n);
16
- return s && n && H(t, i, n), n;
17
- }, v = (e, t) => (i, s) => t(i, s, e);
18
- function V(e, t) {
19
- const { from: i, to: s, flipY: n = !1, flipX: o = !1, angle: r = 0, skewX: m = 0, skewY: a = 0 } = e.sheetTransform, { column: d, columnOffset: u, row: f, rowOffset: I } = i, w = $(
20
- e.unitId,
21
- e.subUnitId,
22
- { from: i, to: s },
1
+ var $ = Object.defineProperty;
2
+ var L = (i, t, e) => t in i ? $(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
+ var D = (i, t, e) => L(i, typeof t != "symbol" ? t + "" : t, e);
4
+ import { Inject as A, Injector as x, ICommandService as P, generateRandomId as X, DrawingTypeEnum as _, ImageSourceType as I, FBase as Y, ArrangeTypeEnum as f, toDisposable as C, FEnum as F, FEventName as W, FUniver as U } from "@univerjs/core";
5
+ import { getImageSize as H, SetDrawingSelectedOperation as B, IDrawingManagerService as u } from "@univerjs/drawing";
6
+ import { IRenderManagerService as j } from "@univerjs/engine-render";
7
+ import { SetSheetDrawingCommand as g, SetDrawingArrangeCommand as w, SheetCanvasFloatDomManagerService as K, InsertSheetDrawingCommand as S, RemoveSheetDrawingCommand as G } from "@univerjs/sheets-drawing-ui";
8
+ import { SheetSkeletonManagerService as T, ISheetSelectionRenderService as V, convertPositionSheetOverGridToAbsolute as q, convertPositionCellToSheetOverGrid as J } from "@univerjs/sheets-ui";
9
+ import { ISheetDrawingService as h, SheetDrawingAnchorType as Q } from "@univerjs/sheets-drawing";
10
+ import { transformComponentKey as Z } from "@univerjs/sheets-ui/facade";
11
+ import { FWorksheet as M } from "@univerjs/sheets/facade";
12
+ import { ComponentManager as ee } from "@univerjs/ui";
13
+ var te = Object.defineProperty, re = Object.getOwnPropertyDescriptor, z = (i, t, e, r) => {
14
+ for (var n = r > 1 ? void 0 : r ? re(t, e) : t, s = i.length - 1, a; s >= 0; s--)
15
+ (a = i[s]) && (n = (r ? a(t, e, n) : a(n)) || n);
16
+ return r && n && te(t, e, n), n;
17
+ }, E = (i, t) => (e, r) => t(e, r, i);
18
+ function ie(i, t) {
19
+ const { from: e, to: r, flipY: n = !1, flipX: s = !1, angle: a = 0, skewX: o = 0, skewY: c = 0 } = i.sheetTransform, { column: m, columnOffset: l, row: v, rowOffset: O } = e, p = q(
20
+ i.unitId,
21
+ i.subUnitId,
22
+ { from: e, to: r },
23
23
  t
24
- ), { left: p, top: b, width: S, height: B } = w;
24
+ ), { left: y, top: R, width: k, height: N } = p;
25
25
  return {
26
- ...e,
27
- column: d,
28
- columnOffset: u,
29
- row: f,
30
- rowOffset: I,
31
- width: S,
32
- height: B,
26
+ ...i,
27
+ column: m,
28
+ columnOffset: l,
29
+ row: v,
30
+ rowOffset: O,
31
+ width: k,
32
+ height: N,
33
33
  flipY: n,
34
- flipX: o,
35
- angle: r,
36
- skewX: m,
37
- skewY: a
34
+ flipX: s,
35
+ angle: a,
36
+ skewX: o,
37
+ skewY: c
38
38
  };
39
39
  }
40
- function N(e, t, i) {
41
- const { column: s, columnOffset: n, row: o, rowOffset: r, flipY: m = !1, flipX: a = !1, angle: d = 0, skewX: u = 0, skewY: f = 0, width: I, height: w } = e, p = L(
42
- e.unitId,
43
- e.subUnitId,
44
- { column: s, columnOffset: n, row: o, rowOffset: r },
45
- I,
46
- w,
40
+ function ne(i, t, e) {
41
+ const { column: r, columnOffset: n, row: s, rowOffset: a, flipY: o = !1, flipX: c = !1, angle: m = 0, skewX: l = 0, skewY: v = 0, width: O, height: p } = i, y = J(
42
+ i.unitId,
43
+ i.subUnitId,
44
+ { column: r, columnOffset: n, row: s, rowOffset: a },
45
+ O,
46
+ p,
47
47
  t,
48
- i
49
- ), { sheetTransform: b, transform: S } = p;
48
+ e
49
+ ), { sheetTransform: R, transform: k } = y;
50
50
  return {
51
- ...e,
51
+ ...i,
52
52
  sheetTransform: {
53
- ...b,
54
- flipY: m,
55
- flipX: a,
56
- angle: d,
57
- skewX: u,
58
- skewY: f
53
+ ...R,
54
+ flipY: o,
55
+ flipX: c,
56
+ angle: m,
57
+ skewX: l,
58
+ skewY: v
59
59
  },
60
60
  transform: {
61
- ...S,
62
- flipY: m,
63
- flipX: a,
64
- angle: d,
65
- skewX: u,
66
- skewY: f
61
+ ...k,
62
+ flipY: o,
63
+ flipX: c,
64
+ angle: m,
65
+ skewX: l,
66
+ skewY: v
67
67
  }
68
68
  };
69
69
  }
70
- let l = class {
71
- constructor(e, t, i) {
72
- R(this, "_image");
73
- this._injector = i, this._image = {
74
- drawingId: W(6),
75
- drawingType: x.DRAWING_IMAGE,
76
- imageSourceType: _.BASE64,
70
+ let b = class {
71
+ constructor(i, t, e) {
72
+ D(this, "_image");
73
+ this._injector = e, this._image = {
74
+ drawingId: X(6),
75
+ drawingType: _.DRAWING_IMAGE,
76
+ imageSourceType: I.BASE64,
77
77
  source: "",
78
- unitId: e,
78
+ unitId: i,
79
79
  subUnitId: t,
80
80
  column: 0,
81
81
  columnOffset: 0,
@@ -85,16 +85,50 @@ let l = class {
85
85
  height: 0
86
86
  };
87
87
  }
88
- setImage(e) {
89
- const i = this._injector.get(C).getRenderById(e.unitId);
90
- if (!i)
91
- throw new Error(`Render Unit with unitId ${e.unitId} not found`);
92
- const s = i.with(y);
93
- return this._image = V(e, s), this;
88
+ /**
89
+ * Set the initial image configuration for the image builder.
90
+ * @param image The image to be set. {@link ISheetImage}
91
+ * @returns The builder. {@link FOverGridImageBuilder}
92
+ * @example
93
+ * ```ts
94
+ * // create a new image builder.
95
+ * const activeSpreadsheet = univerAPI.getActiveWorkbook();
96
+ * const activeSheet = activeSpreadsheet.getActiveSheet();
97
+ * const imageBuilder = activeSheet.newOverGridImage();
98
+ * const param = await imageBuilder.setImage({
99
+ * drawingId: '123456',
100
+ * drawingType: univerAPI.Enum.DrawingType.DRAWING_IMAGE,
101
+ * imageSourceType: univerAPI.Enum.ImageSourceType.BASE64,
102
+ * source: 'https://avatars.githubusercontent.com/u/61444807?s=48&v=4',
103
+ * unitId: activeSpreadsheet.getId(),
104
+ * subUnitId: activeSheet.getSheetId(),
105
+ * }).setColumn(5).setRow(5).buildAsync();
106
+ * activeSheet.insertImages([param]);
107
+ * ```
108
+ */
109
+ setImage(i) {
110
+ const e = this._injector.get(j).getRenderById(i.unitId);
111
+ if (!e)
112
+ throw new Error(`Render Unit with unitId ${i.unitId} not found`);
113
+ const r = e.with(T);
114
+ return i.sheetTransform == null && (i.sheetTransform = {
115
+ from: {
116
+ column: 0,
117
+ columnOffset: 0,
118
+ row: 0,
119
+ rowOffset: 0
120
+ },
121
+ to: {
122
+ column: 0,
123
+ columnOffset: 0,
124
+ row: 0,
125
+ rowOffset: 0
126
+ }
127
+ }), this._image = ie(i, r), this;
94
128
  }
95
- setSource(e, t) {
96
- const i = t != null ? t : _.URL;
97
- return this._image.source = e, this._image.imageSourceType = i, this;
129
+ setSource(i, t) {
130
+ const e = t != null ? t : I.URL;
131
+ return this._image.source = i, this._image.imageSourceType = e, this;
98
132
  }
99
133
  getsource() {
100
134
  return this._image.source;
@@ -102,38 +136,192 @@ let l = class {
102
136
  getSourceType() {
103
137
  return this._image.imageSourceType;
104
138
  }
105
- setColumn(e) {
106
- return this._image.column = e, this;
139
+ /**
140
+ * Set the position of the image
141
+ * @param column The sheet start column of the image
142
+ * @returns The builder. {@link FOverGridImageBuilder}
143
+ * @example
144
+ * ```ts
145
+ * // create a new image builder.
146
+ * const activeSpreadsheet = univerAPI.getActiveWorkbook();
147
+ * const activeSheet = activeSpreadsheet.getActiveSheet();
148
+ * const imageBuilder = activeSheet.newOverGridImage();
149
+ * const param = await imageBuilder.setSource('https://avatars.githubusercontent.com/u/61444807?s=48&v=4').setColumn(5).setRow(5).buildAsync();
150
+ * activeSheet.insertImages([param]);
151
+ * ```
152
+ */
153
+ setColumn(i) {
154
+ return this._image.column = i, this;
107
155
  }
108
- setRow(e) {
109
- return this._image.row = e, this;
156
+ /**
157
+ * Set the position of the image
158
+ * @param row The sheet start row of the image
159
+ * @returns The builder. {@link FOverGridImageBuilder}
160
+ * @example
161
+ * ```ts
162
+ * // create a new image builder.
163
+ * const activeSpreadsheet = univerAPI.getActiveWorkbook();
164
+ * const activeSheet = activeSpreadsheet.getActiveSheet();
165
+ * const imageBuilder = activeSheet.newOverGridImage();
166
+ * const param = await imageBuilder.setSource('https://avatars.githubusercontent.com/u/61444807?s=48&v=4').setColumn(5).setRow(5).buildAsync();
167
+ * activeSheet.insertImages([param]);
168
+ * ```
169
+ */
170
+ setRow(i) {
171
+ return this._image.row = i, this;
110
172
  }
111
- setColumnOffset(e) {
112
- return this._image.columnOffset = e, this;
173
+ /**
174
+ * Set the column offset of the image in a unit
175
+ * @param offset The offset in pixels
176
+ * @returns The builder. {@link FOverGridImageBuilder}
177
+ * @example
178
+ * ```ts
179
+ * // create a new image builder.
180
+ * const activeSpreadsheet = univerAPI.getActiveWorkbook();
181
+ * const activeSheet = activeSpreadsheet.getActiveSheet();
182
+ * const imageBuilder = activeSheet.newOverGridImage();
183
+ * const param = await imageBuilder.setSource('https://avatars.githubusercontent.com/u/61444807?s=48&v=4').setColumn(5).setRow(5).setColumnOffset(10).setRowOffset(10).buildAsync();
184
+ * activeSheet.insertImages([param]);
185
+ * ```
186
+ */
187
+ setColumnOffset(i) {
188
+ return this._image.columnOffset = i, this;
113
189
  }
114
- setRowOffset(e) {
115
- return this._image.rowOffset = e, this;
190
+ /**
191
+ * Set the row offset of the image in a unit
192
+ * @param offset The offset in pixels
193
+ * @returns The builder. {@link FOverGridImageBuilder}
194
+ * @example
195
+ * ```ts
196
+ * // create a new image builder.
197
+ * const activeSpreadsheet = univerAPI.getActiveWorkbook();
198
+ * const activeSheet = activeSpreadsheet.getActiveSheet();
199
+ * const imageBuilder = activeSheet.newOverGridImage();
200
+ * const param = await imageBuilder.setSource('https://avatars.githubusercontent.com/u/61444807?s=48&v=4').setColumn(5).setRow(5).setColumnOffset(10).setRowOffset(10).buildAsync();
201
+ * activeSheet.insertImages([param]);
202
+ * ```
203
+ */
204
+ setRowOffset(i) {
205
+ return this._image.rowOffset = i, this;
116
206
  }
117
- setWidth(e) {
118
- return this._image.width = e, this;
207
+ /**
208
+ * set the width of the image
209
+ * @param width The width of the image, in pixels
210
+ * @returns The builder. {@link FOverGridImageBuilder}
211
+ * @example
212
+ * ```ts
213
+ * // create a new image builder.
214
+ * const activeSpreadsheet = univerAPI.getActiveWorkbook();
215
+ * const activeSheet = activeSpreadsheet.getActiveSheet();
216
+ * const imageBuilder = activeSheet.newOverGridImage();
217
+ * const param = await imageBuilder.setSource('https://avatars.githubusercontent.com/u/61444807?s=48&v=4').setColumn(5).setRow(5).setWidth(120).setHeight(50).buildAsync();
218
+ * activeSheet.insertImages([param]);
219
+ * ```
220
+ */
221
+ setWidth(i) {
222
+ return this._image.width = i, this;
119
223
  }
120
- setHeight(e) {
121
- return this._image.height = e, this;
224
+ /**
225
+ * Set the height of the image
226
+ * @param height The height of the image, in pixels
227
+ * @returns The builder. {@link FOverGridImageBuilder}
228
+ * @example
229
+ * ```ts
230
+ * // create a new image builder.
231
+ * const activeSpreadsheet = univerAPI.getActiveWorkbook();
232
+ * const activeSheet = activeSpreadsheet.getActiveSheet();
233
+ * const imageBuilder = activeSheet.newOverGridImage();
234
+ * const param = await imageBuilder.setSource('https://avatars.githubusercontent.com/u/61444807?s=48&v=4').setColumn(5).setRow(5).setWidth(120).setHeight(50).buildAsync();
235
+ * activeSheet.insertImages([param]);
236
+ * ```
237
+ */
238
+ setHeight(i) {
239
+ return this._image.height = i, this;
122
240
  }
123
- setAnchorType(e) {
124
- return this._image.anchorType = e, this;
241
+ /**
242
+ * Set the anchor type of the image, whether the position and size change with the cell
243
+ * @param anchorType The anchor type {@link SheetDrawingAnchorType}
244
+ * @returns The builder. {@link FOverGridImageBuilder}
245
+ * @example
246
+ * ```ts
247
+ * // create a new image builder.
248
+ * const activeSpreadsheet = univerAPI.getActiveWorkbook();
249
+ * const activeSheet = activeSpreadsheet.getActiveSheet();
250
+ * const imageBuilder = activeSheet.newOverGridImage();
251
+ * const param = await imageBuilder.setSource('https://avatars.githubusercontent.com/u/61444807?s=48&v=4').setColumn(5).setRow(5).setAnchorType(univerAPI.Enum.SheetDrawingAnchorType.None).buildAsync();
252
+ * activeSheet.insertImages([param]);
253
+ * ```
254
+ */
255
+ setAnchorType(i) {
256
+ return this._image.anchorType = i, this;
125
257
  }
126
- setCropTop(e) {
127
- return this._initializeSrcRect(), this._image.srcRect.top = e, this;
258
+ /**
259
+ * Set the cropping region of the image by defining the top edges, thereby displaying the specific part of the image you want.
260
+ * @param top The number of pixels to crop from the top of the image.
261
+ * @returns The builder. {@link FOverGridImageBuilder}
262
+ * @example
263
+ * ```ts
264
+ * // create a new image builder.
265
+ * const activeSpreadsheet = univerAPI.getActiveWorkbook();
266
+ * const activeSheet = activeSpreadsheet.getActiveSheet();
267
+ * const imageBuilder = activeSheet.newOverGridImage();
268
+ * const param = await imageBuilder.setSource('https://avatars.githubusercontent.com/u/61444807?s=48&v=4').setColumn(5).setRow(5).setCropTop(10).setCropLeft(10).setCropBottom(10).setCropRight(10).buildAsync();
269
+ * activeSheet.insertImages([param]);
270
+ * ```
271
+ */
272
+ setCropTop(i) {
273
+ return this._initializeSrcRect(), this._image.srcRect.top = i, this;
128
274
  }
129
- setCropLeft(e) {
130
- return this._initializeSrcRect(), this._image.srcRect.left = e, this;
275
+ /**
276
+ * Set the cropping region of the image by defining the left edges, thereby displaying the specific part of the image you want.
277
+ * @param left The number of pixels to crop from the left side of the image.
278
+ * @returns The builder. {@link FOverGridImageBuilder}
279
+ * @example
280
+ * ```ts
281
+ * // create a new image builder.
282
+ * const activeSpreadsheet = univerAPI.getActiveWorkbook();
283
+ * const activeSheet = activeSpreadsheet.getActiveSheet();
284
+ * const imageBuilder = activeSheet.newOverGridImage();
285
+ * const param = await imageBuilder.setSource('https://avatars.githubusercontent.com/u/61444807?s=48&v=4').setColumn(5).setRow(5).setCropTop(10).setCropLeft(10).setCropBottom(10).setCropRight(10).buildAsync();
286
+ * activeSheet.insertImages([param]);
287
+ * ```
288
+ */
289
+ setCropLeft(i) {
290
+ return this._initializeSrcRect(), this._image.srcRect.left = i, this;
131
291
  }
132
- setCropBottom(e) {
133
- return this._initializeSrcRect(), this._image.srcRect.bottom = e, this;
292
+ /**
293
+ * Set the cropping region of the image by defining the bottom edges, thereby displaying the specific part of the image you want.
294
+ * @param bottom The number of pixels to crop from the bottom of the image.
295
+ * @returns The builder. {@link FOverGridImageBuilder}
296
+ * @example
297
+ * ```ts
298
+ * // create a new image builder.
299
+ * const activeSpreadsheet = univerAPI.getActiveWorkbook();
300
+ * const activeSheet = activeSpreadsheet.getActiveSheet();
301
+ * const imageBuilder = activeSheet.newOverGridImage();
302
+ * const param = await imageBuilder.setSource('https://avatars.githubusercontent.com/u/61444807?s=48&v=4').setColumn(5).setRow(5).setCropTop(10).setCropLeft(10).setCropBottom(10).setCropRight(10).buildAsync();
303
+ * activeSheet.insertImages([param]);
304
+ * ```
305
+ */
306
+ setCropBottom(i) {
307
+ return this._initializeSrcRect(), this._image.srcRect.bottom = i, this;
134
308
  }
135
- setCropRight(e) {
136
- return this._initializeSrcRect(), this._image.srcRect.right = e, this;
309
+ /**
310
+ * Set the cropping region of the image by defining the right edges, thereby displaying the specific part of the image you want.
311
+ * @param right The number of pixels to crop from the right side of the image.
312
+ * @returns The builder. {@link FOverGridImageBuilder}
313
+ * @example
314
+ * ```ts
315
+ * // create a new image builder.
316
+ * const activeSpreadsheet = univerAPI.getActiveWorkbook();
317
+ * const activeSheet = activeSpreadsheet.getActiveSheet();
318
+ * const imageBuilder = activeSheet.newOverGridImage();
319
+ * const param = await imageBuilder.setSource('https://avatars.githubusercontent.com/u/61444807?s=48&v=4').setColumn(5).setRow(5).setCropTop(10).setCropLeft(10).setCropBottom(10).setCropRight(10).buildAsync();
320
+ * activeSheet.insertImages([param]);
321
+ * ```
322
+ */
323
+ setCropRight(i) {
324
+ return this._initializeSrcRect(), this._image.srcRect.right = i, this;
137
325
  }
138
326
  _initializeSrcRect() {
139
327
  this._image.srcRect == null && (this._image.srcRect = {
@@ -146,39 +334,48 @@ let l = class {
146
334
  /**
147
335
  * Set the rotation angle of the image
148
336
  * @param angle Degree of rotation of the image, for example, 90, 180, 270, etc.
149
- * @returns The builder
337
+ * @returns The builder {@link FOverGridImageBuilder}
338
+ * @example
339
+ * ```ts
340
+ * // create a new image builder.
341
+ * const activeSpreadsheet = univerAPI.getActiveWorkbook();
342
+ * const activeSheet = activeSpreadsheet.getActiveSheet();
343
+ * const imageBuilder = activeSheet.newOverGridImage();
344
+ * const param = await imageBuilder.setSource('https://avatars.githubusercontent.com/u/61444807?s=48&v=4').setColumn(5).setRow(5).setRotate(90).buildAsync();
345
+ * activeSheet.insertImages([param]);
346
+ * ```
150
347
  */
151
- setRotate(e) {
152
- return this._image.angle = e, this;
348
+ setRotate(i) {
349
+ return this._image.angle = i, this;
153
350
  }
154
351
  // setPresetGeometry(prstGeom: PresetGeometryType): FOverGridImageBuilder {
155
352
  // this._image.prstGeom = prstGeom;
156
353
  // return this;
157
354
  // }
158
- setUnitId(e) {
159
- return this._image.unitId = e, this;
355
+ setUnitId(i) {
356
+ return this._image.unitId = i, this;
160
357
  }
161
- setSubUnitId(e) {
162
- return this._image.subUnitId = e, this;
358
+ setSubUnitId(i) {
359
+ return this._image.subUnitId = i, this;
163
360
  }
164
- async build() {
165
- const t = this._injector.get(C).getRenderById(this._image.unitId);
361
+ async buildAsync() {
362
+ const t = this._injector.get(j).getRenderById(this._image.unitId);
166
363
  if (!t)
167
364
  throw new Error(`Render Unit with unitId ${this._image.unitId} not found`);
168
- const i = t.with(G), s = t.with(y);
365
+ const e = t.with(V), r = t.with(T);
169
366
  if (this._image.width === 0 || this._image.height === 0) {
170
- const n = await M(this._image.source), o = n.width, r = n.height;
171
- this._image.width === 0 && (this._image.width = o), this._image.height === 0 && (this._image.height = r);
367
+ const n = await H(this._image.source), s = n.width, a = n.height;
368
+ this._image.width === 0 && (this._image.width = s), this._image.height === 0 && (this._image.height = a);
172
369
  }
173
- return N(this._image, i, s);
370
+ return ne(this._image, e, r);
174
371
  }
175
372
  };
176
- l = T([
177
- v(2, O(k))
178
- ], l);
179
- let c = class extends F {
180
- constructor(e, t, i) {
181
- super(), this._image = e, this._commandService = t, this._injector = i;
373
+ b = z([
374
+ E(2, A(x))
375
+ ], b);
376
+ let d = class extends Y {
377
+ constructor(i, t, e) {
378
+ super(), this._image = i, this._commandService = t, this._injector = e;
182
379
  }
183
380
  getId() {
184
381
  return this._image.drawingId;
@@ -194,12 +391,12 @@ let c = class extends F {
194
391
  * // remove the image from the sheet
195
392
  * const activeSpreadsheet = univerAPI.getActiveWorkbook();
196
393
  * const activeSheet = activeSpreadsheet.getActiveSheet();
197
- * const image = activeSheet.getImages[0];
394
+ * const image = activeSheet.getImages()[0];
198
395
  * console.log('Delete state is ', image?.remove());
199
396
  * ```
200
397
  */
201
398
  remove() {
202
- return this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [this._image] });
399
+ return this._commandService.syncExecuteCommand(g.id, { unitId: this._image.unitId, drawings: [this._image] });
203
400
  }
204
401
  /**
205
402
  * Convert the image to a FOverGridImageBuilder
@@ -209,33 +406,44 @@ let c = class extends F {
209
406
  * // convert the image to a builder
210
407
  * const activeSpreadsheet = univerAPI.getActiveWorkbook();
211
408
  * const activeSheet = activeSpreadsheet.getActiveSheet();
212
- * const image = activeSheet.getImages[0];
409
+ * const image = activeSheet.getImages()[0];
213
410
  * const builder = image.toBuilder();
214
- * builder.setSource('https://avatars.githubusercontent.com/u/61444807?s=48&v=4').setColumn(5).setRow(5).build();
215
- * activeSheet.updateImages([builder.build()]);
411
+ * const param = await builder.setSource('https://avatars.githubusercontent.com/u/61444807?s=48&v=4').setColumn(5).setRow(5).buildAsync();
412
+ * activeSheet.updateImages([param]);
216
413
  * ```
217
414
  */
218
415
  toBuilder() {
219
- const e = this._injector.createInstance(l);
220
- return e.setImage(this._image), e;
416
+ const i = this._injector.createInstance(b);
417
+ return i.setImage(this._image), i;
221
418
  }
222
- setSource(e, t) {
223
- const i = t != null ? t : _.URL;
224
- return this._image.source = e, this._image.imageSourceType = i, this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [this._image] });
419
+ setSource(i, t) {
420
+ const e = t != null ? t : I.URL;
421
+ return this._image.source = i, this._image.imageSourceType = e, this._commandService.syncExecuteCommand(g.id, { unitId: this._image.unitId, drawings: [this._image] });
225
422
  }
226
- setPosition(e, t, i, s) {
423
+ async setPositionAsync(i, t, e, r) {
227
424
  const n = this.toBuilder();
228
- return n.setColumn(t), n.setRow(e), i != null && n.setRowOffset(i), s != null && n.setColumnOffset(s), this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [n.build()] });
425
+ n.setColumn(t), n.setRow(i), e != null && n.setRowOffset(e), r != null && n.setColumnOffset(r);
426
+ const s = await n.buildAsync();
427
+ return this._commandService.syncExecuteCommand(g.id, { unitId: this._image.unitId, drawings: [s] });
229
428
  }
230
429
  /**
231
430
  * Set the size of the image
232
431
  * @param width The width of the image
233
432
  * @param height The height of the image
234
433
  * @returns success or not
434
+ * @example
435
+ * ```ts
436
+ * // set the size of the image
437
+ * const activeSpreadsheet = univerAPI.getActiveWorkbook();
438
+ * const activeSheet = activeSpreadsheet.getActiveSheet();
439
+ * const image = activeSheet.getImages()[0];
440
+ * console.log('Set size state is ', image.setSize(50, 120));
235
441
  */
236
- setSize(e, t) {
237
- const i = this.toBuilder();
238
- return i.setWidth(e), i.setHeight(t), this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [i.build()] });
442
+ async setSizeAsync(i, t) {
443
+ const e = this.toBuilder();
444
+ e.setWidth(i), e.setHeight(t);
445
+ const r = await e.buildAsync();
446
+ return this._commandService.syncExecuteCommand(g.id, { unitId: this._image.unitId, drawings: [r] });
239
447
  }
240
448
  /**
241
449
  * 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.
@@ -249,17 +457,17 @@ let c = class extends F {
249
457
  * // set the crop of the image
250
458
  * const activeSpreadsheet = univerAPI.getActiveWorkbook();
251
459
  * const activeSheet = activeSpreadsheet.getActiveSheet();
252
- * const image = activeSheet.getImages[0];
253
- * console.log('Set crop state is ', image.setCrop(0, 0, 0, 0));
460
+ * const image = activeSheet.getImages()[0];
461
+ * console.log('Set crop state is ', image.setCrop(10, 10, 10, 10));
254
462
  * ```
255
463
  */
256
- setCrop(e, t, i, s) {
464
+ setCrop(i, t, e, r) {
257
465
  return this._image.srcRect == null && (this._image.srcRect = {
258
466
  top: 0,
259
467
  left: 0,
260
468
  bottom: 0,
261
469
  right: 0
262
- }), e != null && (this._image.srcRect.top = e), t != null && (this._image.srcRect.left = t), i != null && (this._image.srcRect.bottom = i), s != null && (this._image.srcRect.right = s), this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [this._image] });
470
+ }), i != null && (this._image.srcRect.top = i), t != null && (this._image.srcRect.left = t), e != null && (this._image.srcRect.bottom = e), r != null && (this._image.srcRect.right = r), this._commandService.syncExecuteCommand(g.id, { unitId: this._image.unitId, drawings: [this._image] });
263
471
  }
264
472
  // setPresetGeometry(prstGeom: PresetGeometryType): boolean {
265
473
  // this._image.prstGeom = prstGeom;
@@ -269,103 +477,379 @@ let c = class extends F {
269
477
  * Set the rotation angle of the image
270
478
  * @param angle Degree of rotation of the image, for example, 90, 180, 270, etc.
271
479
  * @returns success or not
480
+ * @example
481
+ * ```ts
482
+ * // set the rotation angle of the image
483
+ * const activeSpreadsheet = univerAPI.getActiveWorkbook();
484
+ * const activeSheet = activeSpreadsheet.getActiveSheet();
485
+ * const image = activeSheet.getImages()[0];
486
+ * console.log('Set rotate state is ', image.setRotate(90));
487
+ * ```
488
+ */
489
+ setRotate(i) {
490
+ return this._image.sheetTransform.angle = i, this._commandService.syncExecuteCommand(g.id, { unitId: this._image.unitId, drawings: [this._image] });
491
+ }
492
+ /**
493
+ * Move the image layer forward by one level
494
+ * @returns success or not
495
+ * @example
496
+ * ```ts
497
+ * // move the image forward
498
+ * const activeSpreadsheet = univerAPI.getActiveWorkbook();
499
+ * const activeSheet = activeSpreadsheet.getActiveSheet();
500
+ * const image = activeSheet.getImages()[0];
501
+ * console.log('Move forward state is ', image.setForward());
502
+ * ```
503
+ */
504
+ setForward() {
505
+ return this._commandService.syncExecuteCommand(w.id, {
506
+ unitId: this._image.unitId,
507
+ subUnitId: this._image.subUnitId,
508
+ drawingIds: [this._image.drawingId],
509
+ arrangeType: f.forward
510
+ });
511
+ }
512
+ /**
513
+ * Move the image layer backward by one level
514
+ * @returns success or not
515
+ * @example
516
+ * ```ts
517
+ * // move the image backward
518
+ * const activeSpreadsheet = univerAPI.getActiveWorkbook();
519
+ * const activeSheet = activeSpreadsheet.getActiveSheet();
520
+ * const image = activeSheet.getImages()[0];
521
+ * console.log('Move backward state is ', image.setBackward());
522
+ * ```
523
+ */
524
+ setBackward() {
525
+ return this._commandService.syncExecuteCommand(w.id, {
526
+ unitId: this._image.unitId,
527
+ subUnitId: this._image.subUnitId,
528
+ drawingIds: [this._image.drawingId],
529
+ arrangeType: f.backward
530
+ });
531
+ }
532
+ /**
533
+ * Move the image layer to the back
534
+ * @returns success or not
535
+ * @example
536
+ * ```ts
537
+ * // move the image to the back
538
+ * const activeSpreadsheet = univerAPI.getActiveWorkbook();
539
+ * const activeSheet = activeSpreadsheet.getActiveSheet();
540
+ * const image = activeSheet.getImages()[0];
541
+ * console.log('Move back state is ', image.setBack());
542
+ * ```
543
+ */
544
+ setBack() {
545
+ return this._commandService.syncExecuteCommand(w.id, {
546
+ unitId: this._image.unitId,
547
+ subUnitId: this._image.subUnitId,
548
+ drawingIds: [this._image.drawingId],
549
+ arrangeType: f.back
550
+ });
551
+ }
552
+ /**
553
+ * Move the image layer to the front
554
+ * @returns success or not
555
+ * @example
556
+ * ```ts
557
+ * // move the image to the front
558
+ * const activeSpreadsheet = univerAPI.getActiveWorkbook();
559
+ * const activeSheet = activeSpreadsheet.getActiveSheet();
560
+ * const image = activeSheet.getImages()[0];
561
+ * console.log('Move front state is ', image.setFront());
562
+ * ```
272
563
  */
273
- setRotate(e) {
274
- return this._image.sheetTransform.angle = e, this._commandService.syncExecuteCommand(h.id, { unitId: this._image.unitId, drawings: [this._image] });
564
+ setFront() {
565
+ return this._commandService.syncExecuteCommand(w.id, {
566
+ unitId: this._image.unitId,
567
+ subUnitId: this._image.subUnitId,
568
+ drawingIds: [this._image.drawingId],
569
+ arrangeType: f.front
570
+ });
275
571
  }
276
572
  };
277
- c = T([
278
- v(1, U),
279
- v(2, O(k))
280
- ], c);
281
- class q extends j {
282
- addFloatDomToPosition(t, i) {
283
- const s = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), { key: o, disposableCollection: r } = X(t, this._injector.get(Y)), a = this._injector.get(z).addFloatDomToPosition({ ...t, componentKey: o, unitId: s, subUnitId: n }, i);
284
- return a ? (r.add(a.dispose), {
285
- id: a.id,
573
+ d = z([
574
+ E(1, P),
575
+ E(2, A(x))
576
+ ], d);
577
+ class se extends M {
578
+ addFloatDomToPosition(t, e) {
579
+ const r = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), { key: s, disposableCollection: a } = Z(t, this._injector.get(ee)), c = this._injector.get(K).addFloatDomToPosition({ ...t, componentKey: s, unitId: r, subUnitId: n }, e);
580
+ return c ? (a.add(c.dispose), {
581
+ id: c.id,
286
582
  dispose: () => {
287
- r.dispose(), a.dispose();
583
+ a.dispose(), c.dispose();
288
584
  }
289
- }) : (r.dispose(), null);
585
+ }) : (a.dispose(), null);
290
586
  }
291
- async insertImage(t, i, s, n, o) {
292
- const r = this.newOverGridImage();
587
+ async insertImage(t, e, r, n, s) {
588
+ const a = this.newOverGridImage();
293
589
  if (typeof t == "string")
294
- r.setSource(t);
590
+ a.setSource(t);
295
591
  else {
296
- const d = await t.getBlob().getDataAsString();
297
- r.setSource(d, _.BASE64);
592
+ const m = await t.getBlob().getDataAsString();
593
+ a.setSource(m, I.BASE64);
298
594
  }
299
- i !== void 0 ? r.setColumn(i) : r.setColumn(0), s !== void 0 ? r.setRow(s) : r.setRow(0), n !== void 0 ? r.setColumnOffset(n) : r.setColumnOffset(0), o !== void 0 ? r.setRowOffset(o) : r.setRowOffset(0);
300
- const m = await r.build();
301
- return this._commandService.syncExecuteCommand(D.id, { unitId: this._fWorkbook.getId(), drawings: [m] });
595
+ e !== void 0 ? a.setColumn(e) : a.setColumn(0), r !== void 0 ? a.setRow(r) : a.setRow(0), n !== void 0 ? a.setColumnOffset(n) : a.setColumnOffset(0), s !== void 0 ? a.setRowOffset(s) : a.setRowOffset(0);
596
+ const o = await a.buildAsync();
597
+ return this._commandService.syncExecuteCommand(S.id, { unitId: this._fWorkbook.getId(), drawings: [o] });
302
598
  }
303
599
  insertImages(t) {
304
- const i = t.map((s) => (s.unitId = this._fWorkbook.getId(), s.subUnitId = this.getSheetId(), s));
305
- this._commandService.syncExecuteCommand(D.id, { unitId: this._fWorkbook.getId(), drawings: i });
600
+ const e = t.map((r) => (r.unitId = this._fWorkbook.getId(), r.subUnitId = this.getSheetId(), r));
601
+ return this._commandService.syncExecuteCommand(S.id, { unitId: this._fWorkbook.getId(), drawings: e }), this;
306
602
  }
307
603
  deleteImages(t) {
308
- const i = t.map((s) => ({
604
+ const e = t.map((r) => ({
309
605
  unitId: this._fWorkbook.getId(),
310
- drawingId: s.getId(),
606
+ drawingId: r.getId(),
311
607
  subUnitId: this.getSheetId(),
312
- drawingType: s.getType()
608
+ drawingType: r.getType()
313
609
  }));
314
- this._commandService.syncExecuteCommand(A.id, { unitId: this._fWorkbook.getId(), drawings: i });
610
+ return this._commandService.syncExecuteCommand(G.id, { unitId: this._fWorkbook.getId(), drawings: e }), this;
315
611
  }
316
612
  getImages() {
317
- const i = this._injector.get(g).getDrawingData(this._fWorkbook.getId(), this.getSheetId()), s = [];
318
- for (const n in i) {
319
- const o = i[n];
320
- s.push(this._injector.createInstance(c, o));
613
+ const e = this._injector.get(h).getDrawingData(this._fWorkbook.getId(), this.getSheetId()), r = [];
614
+ for (const n in e) {
615
+ const s = e[n];
616
+ s.drawingType === _.DRAWING_IMAGE && r.push(this._injector.createInstance(d, s));
321
617
  }
322
- return s;
618
+ return r;
323
619
  }
324
620
  getImageById(t) {
325
- const s = this._injector.get(g).getDrawingByParam({ unitId: this._fWorkbook.getId(), subUnitId: this.getSheetId(), drawingId: t });
326
- return s ? this._injector.createInstance(c, s) : null;
621
+ const r = this._injector.get(h).getDrawingByParam({ unitId: this._fWorkbook.getId(), subUnitId: this.getSheetId(), drawingId: t });
622
+ return r && r.drawingType === _.DRAWING_IMAGE ? this._injector.createInstance(d, r) : null;
327
623
  }
328
624
  getActiveImages() {
329
- const i = this._injector.get(g).getFocusDrawings(), s = [];
330
- for (const n in i) {
331
- const o = i[n];
332
- s.push(this._injector.createInstance(c, o));
625
+ const e = this._injector.get(h).getFocusDrawings(), r = [];
626
+ for (const n in e) {
627
+ const s = e[n];
628
+ r.push(this._injector.createInstance(d, s));
333
629
  }
334
- return s;
630
+ return r;
335
631
  }
336
632
  updateImages(t) {
337
- this._commandService.syncExecuteCommand(h.id, { unitId: this._fWorkbook.getId(), drawings: t });
633
+ return this._commandService.syncExecuteCommand(g.id, { unitId: this._fWorkbook.getId(), drawings: t }), this;
338
634
  }
339
635
  onImageInserted(t) {
340
- const i = this._injector.get(g);
341
- i.add$.subscribe((s) => {
342
- const n = s.map(
343
- (o) => this._injector.createInstance(c, i.getDrawingByParam(o))
636
+ const e = this._injector.get(h);
637
+ return C(e.add$.subscribe((r) => {
638
+ const n = r.map(
639
+ (s) => this._injector.createInstance(d, e.getDrawingByParam(s))
344
640
  );
345
641
  t(n);
346
- });
642
+ }));
347
643
  }
348
644
  onImageDeleted(t) {
349
- const i = this._injector.get(g);
350
- i.remove$.subscribe((s) => {
351
- const n = s.map(
352
- (o) => this._injector.createInstance(c, i.getDrawingByParam(o))
645
+ const e = this._injector.get(h);
646
+ return C(e.remove$.subscribe((r) => {
647
+ const n = r.map(
648
+ (s) => this._injector.createInstance(d, e.getDrawingByParam(s))
353
649
  );
354
650
  t(n);
355
- });
651
+ }));
356
652
  }
357
653
  onImageChanged(t) {
358
- const i = this._injector.get(g);
359
- i.update$.subscribe((s) => {
360
- const n = s.map(
361
- (o) => this._injector.createInstance(c, i.getDrawingByParam(o))
654
+ const e = this._injector.get(h);
655
+ return C(e.update$.subscribe((r) => {
656
+ const n = r.map(
657
+ (s) => this._injector.createInstance(d, e.getDrawingByParam(s))
362
658
  );
363
659
  t(n);
364
- });
660
+ }));
365
661
  }
366
662
  newOverGridImage() {
367
- const t = this._fWorkbook.getId(), i = this.getSheetId();
368
- return this._injector.createInstance(l, t, i);
663
+ const t = this._fWorkbook.getId(), e = this.getSheetId();
664
+ return this._injector.createInstance(b, t, e);
665
+ }
666
+ }
667
+ M.extend(se);
668
+ class ae extends F {
669
+ get DrawingType() {
670
+ return _;
671
+ }
672
+ get ImageSourceType() {
673
+ return I;
674
+ }
675
+ get SheetDrawingAnchorType() {
676
+ return Q;
677
+ }
678
+ }
679
+ F.extend(ae);
680
+ class oe extends W {
681
+ get BeforeOverGridImageChange() {
682
+ return "BeforeOverGridImageChange";
683
+ }
684
+ get OverGridImageChanged() {
685
+ return "OverGridImageChanged";
686
+ }
687
+ get BeforeOverGridImageInsert() {
688
+ return "BeforeOverGridImageInsert";
689
+ }
690
+ get OverGridImageInserted() {
691
+ return "OverGridImageInserted";
692
+ }
693
+ get BeforeOverGridImageRemove() {
694
+ return "BeforeOverGridImageRemove";
695
+ }
696
+ get OverGridImageRemoved() {
697
+ return "OverGridImageRemoved";
698
+ }
699
+ get BeforeOverGridImageSelect() {
700
+ return "BeforeOverGridImageSelect";
701
+ }
702
+ get OverGridImageSelected() {
703
+ return "OverGridImageSelected";
704
+ }
705
+ }
706
+ W.extend(oe);
707
+ class ce extends U {
708
+ _initialize(t) {
709
+ const e = t.get(P);
710
+ this.disposeWithMe(e.beforeCommandExecuted((r) => {
711
+ switch (r.id) {
712
+ case S.id:
713
+ this._beforeOverGridImageInsert(r.params);
714
+ break;
715
+ case G.id:
716
+ this._beforeOverGridImageRemove(r.params);
717
+ break;
718
+ case g.id:
719
+ this._beforeOverGridImageChange(r.params);
720
+ break;
721
+ case B.id:
722
+ this._beforeOverGridImageSelect(r.params);
723
+ break;
724
+ }
725
+ })), this.disposeWithMe(e.onCommandExecuted((r) => {
726
+ switch (r.id) {
727
+ case S.id:
728
+ this._overGridImageInserted(r.params);
729
+ break;
730
+ case G.id:
731
+ this._overGridImageRemoved(r.params);
732
+ break;
733
+ case g.id:
734
+ this._overGridImageChanged(r.params);
735
+ break;
736
+ case B.id:
737
+ this._overGridImageSelected(r.params);
738
+ break;
739
+ }
740
+ }));
741
+ }
742
+ _beforeOverGridImageInsert(t) {
743
+ if (!this.hasEventCallback(this.Event.BeforeOverGridImageInsert))
744
+ return;
745
+ const e = this.getActiveWorkbook();
746
+ if (e == null || t == null)
747
+ return;
748
+ const { drawings: r } = t, n = {
749
+ workbook: e,
750
+ insertImageParams: r
751
+ };
752
+ if (this.fireEvent(this.Event.BeforeOverGridImageInsert, n), n.cancel)
753
+ throw new Error("Canceled by BeforeOverGridImageInsert event");
754
+ }
755
+ _overGridImageInserted(t) {
756
+ if (!this.hasEventCallback(this.Event.OverGridImageInserted))
757
+ return;
758
+ const e = this.getActiveWorkbook();
759
+ if (e == null || t == null)
760
+ return;
761
+ const { drawings: r } = t;
762
+ this.fireEvent(this.Event.OverGridImageInserted, {
763
+ workbook: e,
764
+ images: this._createFOverGridImage(r)
765
+ });
766
+ }
767
+ _beforeOverGridImageRemove(t) {
768
+ if (!this.hasEventCallback(this.Event.BeforeOverGridImageRemove))
769
+ return;
770
+ const e = this.getActiveWorkbook();
771
+ if (e == null || t == null)
772
+ return;
773
+ const { drawings: r } = t, n = this._injector.get(u), s = r.map((o) => n.getDrawingByParam(o)), a = {
774
+ workbook: e,
775
+ images: this._createFOverGridImage(s)
776
+ };
777
+ if (this.fireEvent(this.Event.BeforeOverGridImageRemove, a), a.cancel)
778
+ throw new Error("Canceled by BeforeOverGridImageRemove event");
779
+ }
780
+ _overGridImageRemoved(t) {
781
+ if (!this.hasEventCallback(this.Event.OverGridImageRemoved))
782
+ return;
783
+ const e = this.getActiveWorkbook();
784
+ if (e == null || t == null)
785
+ return;
786
+ const { drawings: r } = t;
787
+ this.fireEvent(this.Event.OverGridImageRemoved, {
788
+ workbook: e,
789
+ removeImageParams: r
790
+ });
791
+ }
792
+ _beforeOverGridImageChange(t) {
793
+ if (!this.hasEventCallback(this.Event.BeforeOverGridImageChange))
794
+ return;
795
+ const e = this.getActiveWorkbook();
796
+ if (e == null || t == null)
797
+ return;
798
+ const { drawings: r } = t, n = this._injector.get(u), s = [];
799
+ r.forEach((o) => {
800
+ const c = n.getDrawingByParam(o);
801
+ c != null && s.push({
802
+ changeParam: o,
803
+ image: this._injector.createInstance(d, c)
804
+ });
805
+ });
806
+ const a = {
807
+ workbook: e,
808
+ images: s
809
+ };
810
+ if (this.fireEvent(this.Event.BeforeOverGridImageChange, a), a.cancel)
811
+ throw n.updateNotification(r), new Error("Canceled by BeforeOverGridImageChange event");
812
+ }
813
+ _overGridImageChanged(t) {
814
+ if (!this.hasEventCallback(this.Event.OverGridImageChanged))
815
+ return;
816
+ const e = this.getActiveWorkbook();
817
+ if (e == null || t == null)
818
+ return;
819
+ const { drawings: r } = t, n = this._injector.get(u), s = r.map((a) => this._injector.createInstance(d, n.getDrawingByParam(a)));
820
+ this.fireEvent(this.Event.OverGridImageChanged, {
821
+ workbook: e,
822
+ images: s
823
+ });
824
+ }
825
+ _beforeOverGridImageSelect(t) {
826
+ if (!this.hasEventCallback(this.Event.BeforeOverGridImageSelect))
827
+ return;
828
+ const e = this._injector.get(u), r = this.getActiveWorkbook();
829
+ if (r == null)
830
+ return;
831
+ const n = e.getFocusDrawings(), s = t.map((o) => e.getDrawingByParam(o)), a = {
832
+ workbook: r,
833
+ selectedImages: this._createFOverGridImage(s),
834
+ oldSelectedImages: this._createFOverGridImage(n)
835
+ };
836
+ if (this.fireEvent(this.Event.BeforeOverGridImageSelect, a), a.cancel)
837
+ throw new Error("Canceled by BeforeOverGridImageSelect event");
838
+ }
839
+ _overGridImageSelected(t) {
840
+ if (!this.hasEventCallback(this.Event.OverGridImageSelected))
841
+ return;
842
+ const e = this.getActiveWorkbook(), r = this._injector.get(u);
843
+ if (e == null)
844
+ return;
845
+ const n = t.map((s) => r.getDrawingByParam(s));
846
+ this.fireEvent(this.Event.OverGridImageSelected, {
847
+ workbook: e,
848
+ selectedImages: this._createFOverGridImage(n)
849
+ });
850
+ }
851
+ _createFOverGridImage(t) {
852
+ return t.map((e) => this._injector.createInstance(d, e));
369
853
  }
370
854
  }
371
- j.extend(q);
855
+ U.extend(ce);