@univerjs/sheets-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,12 +1,12 @@
1
- import { ICommandService as P, CanceledError as j, IUniverInstanceService as A, RichTextValue as O, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as W, LifecycleService as L, DisposableCollection as y, LifecycleStages as F, UniverInstanceType as ce, ILogService as T, toDisposable as b, awaitTime as de, InterceptorEffectEnum as he, generateRandomId as le } from "@univerjs/core";
2
- import { FUniver as te, FEventName as re } from "@univerjs/core/facade";
1
+ import { ICommandService as P, CanceledError as j, IUniverInstanceService as A, RichTextValue as O, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as W, LifecycleService as L, DisposableCollection as y, LifecycleStages as F, UniverInstanceType as ae, ILogService as D, toDisposable as b, awaitTime as ce, InterceptorEffectEnum as de, generateRandomId as he } from "@univerjs/core";
2
+ import { FUniver as te, FEventName as le } from "@univerjs/core/facade";
3
3
  import { RichTextEditingMutation as ge } from "@univerjs/docs";
4
4
  import { IRenderManagerService as m, DeviceInputEventType as N, SHEET_VIEWPORT_KEY as ue, sheetContentViewportKeys as ve } from "@univerjs/engine-render";
5
- import { SheetsSelectionsService as Ce, COMMAND_LISTENER_SKELETON_CHANGE as Se, getSkeletonChangedEffectedRange as me, InterceptCellContentPriority as be, SheetInterceptorService as Ee, INTERCEPTOR_POINT as pe } from "@univerjs/sheets";
6
- import { SetCellEditVisibleOperation as k, IEditorBridgeService as H, SetZoomRatioCommand as z, HoverManagerService as w, DragManagerService as U, SheetScrollManagerService as D, SheetPasteShortKeyCommand as V, ISheetClipboardService as ne, SheetSkeletonManagerService as R, SHEET_VIEW_KEY as f, ISheetSelectionRenderService as x, ChangeZoomRatioCommand as we, SheetsScrollRenderController as fe, SetWorksheetColAutoWidthCommand as ke, SetColumnHeaderHeightCommand as Ie, SetRowHeaderWidthCommand as _e, SheetCanvasPopManagerService as Z, CellAlertManagerService as Pe, IMarkSelectionService as Re } from "@univerjs/sheets-ui";
7
- import { FSheetHooks as $, FWorkbook as ie, FWorksheet as oe, FPermission as se, FRange as ae } from "@univerjs/sheets/facade";
5
+ import { SheetsSelectionsService as Se, COMMAND_LISTENER_SKELETON_CHANGE as Ce, getSkeletonChangedEffectedRange as me, SheetInterceptorService as be, INTERCEPTOR_POINT as Ee, InterceptCellContentPriority as pe } from "@univerjs/sheets";
6
+ import { SetCellEditVisibleOperation as k, IEditorBridgeService as H, SetZoomRatioCommand as z, HoverManagerService as f, DragManagerService as U, SheetScrollManagerService as T, SheetPasteShortKeyCommand as V, ISheetClipboardService as re, SheetSkeletonManagerService as R, SHEET_VIEW_KEY as w, ISheetSelectionRenderService as x, ChangeZoomRatioCommand as fe, SheetsScrollRenderController as we, SetWorksheetColAutoWidthCommand as ke, SetColumnHeaderHeightCommand as Ie, SetRowHeaderWidthCommand as _e, SheetCanvasPopManagerService as Z, CellAlertManagerService as Pe, IMarkSelectionService as Re } from "@univerjs/sheets-ui";
7
+ import { FSheetHooks as $, FWorkbook as ne, FWorksheet as ie, FPermission as oe, FRange as se } from "@univerjs/sheets/facade";
8
8
  import { KeyCode as B, CutCommand as K, CopyCommand as Y, PasteCommand as X, IClipboardInterfaceService as He, PLAIN_TEXT_CLIPBOARD_MIME_TYPE as J, HTML_CLIPBOARD_MIME_TYPE as G, supportClipboardAPI as q, ISidebarService as Me, IDialogService as ye, ComponentManager as Q } from "@univerjs/ui";
9
- import { filter as C, combineLatest as Ue } from "rxjs";
9
+ import { filter as S, combineLatest as Ue } from "rxjs";
10
10
  class xe extends te {
11
11
  // eslint-disable-next-line max-lines-per-function
12
12
  _initSheetUIEvent(e) {
@@ -17,12 +17,12 @@ class xe extends te {
17
17
  if (t.id !== k.id) return;
18
18
  const n = this.getActiveSheet();
19
19
  if (!n) return;
20
- const { workbook: o, worksheet: s } = n, c = e.get(H), g = t.params, { visible: u, keycode: l, eventType: S } = g, v = c.getEditLocation();
20
+ const { workbook: o, worksheet: s } = n, c = e.get(H), g = t.params, { visible: u, keycode: l, eventType: C } = g, v = c.getEditLocation();
21
21
  if (u) {
22
22
  const h = {
23
23
  row: v.row,
24
24
  column: v.column,
25
- eventType: S,
25
+ eventType: C,
26
26
  keycode: l,
27
27
  workbook: o,
28
28
  worksheet: s,
@@ -38,18 +38,18 @@ class xe extends te {
38
38
  if (t.id !== k.id) return;
39
39
  const n = this.getActiveSheet();
40
40
  if (!n) return;
41
- const { workbook: o, worksheet: s } = n, c = e.get(H), g = e.get(A), u = t.params, { visible: l, keycode: S, eventType: v } = u, h = c.getEditLocation();
41
+ const { workbook: o, worksheet: s } = n, c = e.get(H), g = e.get(A), u = t.params, { visible: l, keycode: C, eventType: v } = u, h = c.getEditLocation();
42
42
  if (!l) {
43
43
  const I = {
44
44
  row: h.row,
45
45
  column: h.column,
46
46
  eventType: v,
47
- keycode: S,
47
+ keycode: C,
48
48
  workbook: o,
49
49
  worksheet: s,
50
50
  isZenEditor: !1,
51
51
  value: O.create(g.getUnit(W).getSnapshot()),
52
- isConfirm: S !== B.ESC
52
+ isConfirm: C !== B.ESC
53
53
  };
54
54
  if (this.fireEvent(this.Event.BeforeSheetEditEnd, I), I.cancel)
55
55
  throw new j();
@@ -61,12 +61,12 @@ class xe extends te {
61
61
  if (t.id !== k.id) return;
62
62
  const n = this.getCommandSheetTarget(t);
63
63
  if (!n) return;
64
- const { workbook: o, worksheet: s } = n, c = e.get(H), g = t.params, { visible: u, keycode: l, eventType: S } = g, v = c.getEditLocation();
64
+ const { workbook: o, worksheet: s } = n, c = e.get(H), g = t.params, { visible: u, keycode: l, eventType: C } = g, v = c.getEditLocation();
65
65
  if (u) {
66
66
  const h = {
67
67
  row: v.row,
68
68
  column: v.column,
69
- eventType: S,
69
+ eventType: C,
70
70
  keycode: l,
71
71
  workbook: o,
72
72
  worksheet: s,
@@ -81,12 +81,12 @@ class xe extends te {
81
81
  if (t.id !== k.id) return;
82
82
  const n = this.getCommandSheetTarget(t);
83
83
  if (!n) return;
84
- const { workbook: o, worksheet: s } = n, c = e.get(H), g = t.params, { visible: u, keycode: l, eventType: S } = g, v = c.getEditLocation();
84
+ const { workbook: o, worksheet: s } = n, c = e.get(H), g = t.params, { visible: u, keycode: l, eventType: C } = g, v = c.getEditLocation();
85
85
  if (!u) {
86
86
  const h = {
87
87
  row: v.row,
88
88
  column: v.column,
89
- eventType: S,
89
+ eventType: C,
90
90
  keycode: l,
91
91
  workbook: o,
92
92
  worksheet: s,
@@ -100,16 +100,16 @@ class xe extends te {
100
100
  this.Event.SheetEditChanging,
101
101
  () => r.onCommandExecuted((t) => {
102
102
  if (t.id !== ge.id) return;
103
- const n = this.getCommandSheetTarget(t);
103
+ const n = this.getActiveSheet();
104
104
  if (!n) return;
105
105
  const { workbook: o, worksheet: s } = n, c = e.get(H), g = e.get(A), u = t.params;
106
106
  if (!c.isVisible().visible) return;
107
107
  const { unitId: l } = u;
108
108
  if (l === W) {
109
- const { row: S, column: v } = c.getEditLocation(), h = {
109
+ const { row: C, column: v } = c.getEditLocation(), h = {
110
110
  workbook: o,
111
111
  worksheet: s,
112
- row: S,
112
+ row: C,
113
113
  column: v,
114
114
  value: O.create(g.getUnit(W).getSnapshot()),
115
115
  isZenEditor: !1
@@ -149,16 +149,16 @@ class xe extends te {
149
149
  _initObserverListener(e) {
150
150
  const t = e.get(A).getFocusedUnit(), n = t == null ? void 0 : t.getUnitId(), o = e.get(m);
151
151
  if (n) {
152
- const l = e.get(L), S = new y();
152
+ const l = e.get(L), C = new y();
153
153
  this.disposeWithMe(l.lifecycle$.subscribe((v) => {
154
154
  if (v < F.Rendered) return;
155
- S.dispose();
156
- const h = e.get(w), I = e.get(U);
155
+ C.dispose();
156
+ const h = e.get(f), I = e.get(U);
157
157
  h && (this.registerEventHandler(
158
158
  this.Event.CellClicked,
159
159
  () => {
160
160
  var d;
161
- return (d = h.currentClickedCell$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
161
+ return (d = h.currentClickedCell$) == null ? void 0 : d.pipe(S((i) => !!i)).subscribe((i) => {
162
162
  const a = this.getSheetTarget(i.location.unitId, i.location.subUnitId);
163
163
  a && this.fireEvent(this.Event.CellClicked, {
164
164
  ...a,
@@ -172,7 +172,7 @@ class xe extends te {
172
172
  this.Event.CellHover,
173
173
  () => {
174
174
  var d;
175
- return (d = h.currentRichText$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
175
+ return (d = h.currentRichText$) == null ? void 0 : d.pipe(S((i) => !!i)).subscribe((i) => {
176
176
  const a = this.getSheetTarget(i.unitId, i.subUnitId);
177
177
  a && this.fireEvent(this.Event.CellHover, {
178
178
  ...a,
@@ -186,7 +186,7 @@ class xe extends te {
186
186
  this.Event.CellPointerDown,
187
187
  () => {
188
188
  var d;
189
- return (d = h.currentPointerDownCell$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
189
+ return (d = h.currentPointerDownCell$) == null ? void 0 : d.pipe(S((i) => !!i)).subscribe((i) => {
190
190
  const a = this.getSheetTarget(i.unitId, i.subUnitId);
191
191
  a && this.fireEvent(this.Event.CellPointerDown, {
192
192
  ...a,
@@ -200,7 +200,7 @@ class xe extends te {
200
200
  this.Event.CellPointerUp,
201
201
  () => {
202
202
  var d;
203
- return (d = h.currentPointerUpCell$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
203
+ return (d = h.currentPointerUpCell$) == null ? void 0 : d.pipe(S((i) => !!i)).subscribe((i) => {
204
204
  const a = this.getSheetTarget(i.unitId, i.subUnitId);
205
205
  a && this.fireEvent(this.Event.CellPointerUp, {
206
206
  ...a,
@@ -214,7 +214,7 @@ class xe extends te {
214
214
  this.Event.CellPointerMove,
215
215
  () => {
216
216
  var d;
217
- return (d = h.currentCellPosWithEvent$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
217
+ return (d = h.currentCellPosWithEvent$) == null ? void 0 : d.pipe(S((i) => !!i)).subscribe((i) => {
218
218
  const a = this.getSheetTarget(i.unitId, i.subUnitId);
219
219
  a && this.fireEvent(this.Event.CellPointerMove, {
220
220
  ...a,
@@ -228,7 +228,7 @@ class xe extends te {
228
228
  this.Event.DragOver,
229
229
  () => {
230
230
  var d;
231
- return (d = I.currentCell$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
231
+ return (d = I.currentCell$) == null ? void 0 : d.pipe(S((i) => !!i)).subscribe((i) => {
232
232
  const a = this.getSheetTarget(i.location.unitId, i.location.subUnitId);
233
233
  a && this.fireEvent(this.Event.DragOver, {
234
234
  ...a,
@@ -242,7 +242,7 @@ class xe extends te {
242
242
  this.Event.Drop,
243
243
  () => {
244
244
  var d;
245
- return (d = I.endCell$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
245
+ return (d = I.endCell$) == null ? void 0 : d.pipe(S((i) => !!i)).subscribe((i) => {
246
246
  const a = this.getSheetTarget(i.location.unitId, i.location.subUnitId);
247
247
  a && this.fireEvent(this.Event.Drop, {
248
248
  ...a,
@@ -256,7 +256,7 @@ class xe extends te {
256
256
  this.Event.RowHeaderClick,
257
257
  () => {
258
258
  var d;
259
- return (d = h.currentRowHeaderClick$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
259
+ return (d = h.currentRowHeaderClick$) == null ? void 0 : d.pipe(S((i) => !!i)).subscribe((i) => {
260
260
  const a = this.getSheetTarget(i.unitId, i.subUnitId);
261
261
  a && this.fireEvent(this.Event.RowHeaderClick, {
262
262
  ...a,
@@ -268,7 +268,7 @@ class xe extends te {
268
268
  this.Event.RowHeaderPointerDown,
269
269
  () => {
270
270
  var d;
271
- return (d = h.currentRowHeaderPointerDown$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
271
+ return (d = h.currentRowHeaderPointerDown$) == null ? void 0 : d.pipe(S((i) => !!i)).subscribe((i) => {
272
272
  const a = this.getSheetTarget(i.unitId, i.subUnitId);
273
273
  a && this.fireEvent(this.Event.RowHeaderPointerDown, {
274
274
  ...a,
@@ -280,7 +280,7 @@ class xe extends te {
280
280
  this.Event.RowHeaderPointerUp,
281
281
  () => {
282
282
  var d;
283
- return (d = h.currentRowHeaderPointerUp$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
283
+ return (d = h.currentRowHeaderPointerUp$) == null ? void 0 : d.pipe(S((i) => !!i)).subscribe((i) => {
284
284
  const a = this.getSheetTarget(i.unitId, i.subUnitId);
285
285
  a && this.fireEvent(this.Event.RowHeaderPointerUp, {
286
286
  ...a,
@@ -292,7 +292,7 @@ class xe extends te {
292
292
  this.Event.RowHeaderHover,
293
293
  () => {
294
294
  var d;
295
- return (d = h.currentHoveredRowHeader$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
295
+ return (d = h.currentHoveredRowHeader$) == null ? void 0 : d.pipe(S((i) => !!i)).subscribe((i) => {
296
296
  const a = this.getSheetTarget(i.unitId, i.subUnitId);
297
297
  a && this.fireEvent(this.Event.RowHeaderHover, {
298
298
  ...a,
@@ -304,7 +304,7 @@ class xe extends te {
304
304
  this.Event.ColumnHeaderClick,
305
305
  () => {
306
306
  var d;
307
- return (d = h.currentColHeaderClick$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
307
+ return (d = h.currentColHeaderClick$) == null ? void 0 : d.pipe(S((i) => !!i)).subscribe((i) => {
308
308
  const a = this.getSheetTarget(i.unitId, i.subUnitId);
309
309
  a && this.fireEvent(this.Event.ColumnHeaderClick, {
310
310
  ...a,
@@ -316,7 +316,7 @@ class xe extends te {
316
316
  this.Event.ColumnHeaderPointerDown,
317
317
  () => {
318
318
  var d;
319
- return (d = h.currentColHeaderPointerDown$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
319
+ return (d = h.currentColHeaderPointerDown$) == null ? void 0 : d.pipe(S((i) => !!i)).subscribe((i) => {
320
320
  const a = this.getSheetTarget(i.unitId, i.subUnitId);
321
321
  a && this.fireEvent(this.Event.ColumnHeaderPointerDown, {
322
322
  ...a,
@@ -328,7 +328,7 @@ class xe extends te {
328
328
  this.Event.ColumnHeaderPointerUp,
329
329
  () => {
330
330
  var d;
331
- return (d = h.currentColHeaderPointerUp$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
331
+ return (d = h.currentColHeaderPointerUp$) == null ? void 0 : d.pipe(S((i) => !!i)).subscribe((i) => {
332
332
  const a = this.getSheetTarget(i.unitId, i.subUnitId);
333
333
  a && this.fireEvent(this.Event.ColumnHeaderPointerUp, {
334
334
  ...a,
@@ -340,7 +340,7 @@ class xe extends te {
340
340
  this.Event.ColumnHeaderHover,
341
341
  () => {
342
342
  var d;
343
- return (d = h.currentHoveredColHeader$) == null ? void 0 : d.pipe(C((i) => !!i)).subscribe((i) => {
343
+ return (d = h.currentHoveredColHeader$) == null ? void 0 : d.pipe(S((i) => !!i)).subscribe((i) => {
344
344
  const a = this.getSheetTarget(i.unitId, i.subUnitId);
345
345
  a && this.fireEvent(this.Event.ColumnHeaderHover, {
346
346
  ...a,
@@ -349,7 +349,7 @@ class xe extends te {
349
349
  });
350
350
  }
351
351
  ));
352
- })), this.disposeWithMe(S);
352
+ })), this.disposeWithMe(C);
353
353
  }
354
354
  const s = /* @__PURE__ */ new Map();
355
355
  let c;
@@ -357,15 +357,15 @@ class xe extends te {
357
357
  o.created$,
358
358
  g.lifecycle$
359
359
  ]);
360
- this.disposeWithMe(u.subscribe(([l, S]) => {
360
+ this.disposeWithMe(u.subscribe(([l, C]) => {
361
361
  var i;
362
- if (l.type === ce.UNIVER_SHEET && (c = l), S <= F.Rendered) return;
362
+ if (l.type === ae.UNIVER_SHEET && (c = l), C <= F.Rendered) return;
363
363
  const v = new y();
364
364
  if (!c) return;
365
365
  const h = this.getWorkbook(c.unitId);
366
366
  if (!h) return;
367
367
  s.get(c.unitId) && ((i = s.get(c.unitId)) == null || i.dispose()), s.set(c.unitId, v);
368
- const I = c.with(D), d = c.with(Ce);
368
+ const I = c.with(T), d = c.with(Se);
369
369
  v.add(this.registerEventHandler(
370
370
  this.Event.Scroll,
371
371
  () => I.validViewportScrollInfo$.subscribe((a) => {
@@ -417,8 +417,8 @@ class xe extends te {
417
417
  })
418
418
  )), c = null, this.disposeWithMe(v);
419
419
  })), this.disposeWithMe(o.disposed$.subscribe((l) => {
420
- var S;
421
- (S = s.get(l)) == null || S.dispose(), s.delete(l);
420
+ var C;
421
+ (C = s.get(l)) == null || C.dispose(), s.delete(l);
422
422
  })), this.disposeWithMe(() => {
423
423
  s.forEach((l) => {
424
424
  l.dispose();
@@ -468,7 +468,7 @@ class xe extends te {
468
468
  ), t;
469
469
  }
470
470
  ), this.disposeWithMe(r.onCommandExecuted((t) => {
471
- if (Se.indexOf(t.id) > -1) {
471
+ if (Ce.indexOf(t.id) > -1) {
472
472
  const n = this.getActiveSheet();
473
473
  if (!n) return;
474
474
  const o = me(t, n.worksheet.getMaxColumns()).map((s) => {
@@ -512,7 +512,7 @@ class xe extends te {
512
512
  const e = this.getActiveWorkbook(), r = e == null ? void 0 : e.getActiveSheet(), t = e == null ? void 0 : e.getActiveRange();
513
513
  if (!e || !r || !t)
514
514
  return;
515
- const o = this._injector.get(ne).generateCopyContent(e.getId(), r.getSheetId(), t.getRange());
515
+ const o = this._injector.get(re).generateCopyContent(e.getId(), r.getSheetId(), t.getRange());
516
516
  if (!o)
517
517
  return;
518
518
  const { html: s, plain: c } = o;
@@ -575,7 +575,7 @@ class xe extends te {
575
575
  }
576
576
  async _beforeClipboardPasteAsync() {
577
577
  if (!q()) {
578
- this._injector.get(T).warn("[Facade]: The navigator object only supports the browser environment");
578
+ this._injector.get(D).warn("[Facade]: The navigator object only supports the browser environment");
579
579
  return;
580
580
  }
581
581
  const e = await this._generateClipboardPasteParamAsync();
@@ -584,7 +584,7 @@ class xe extends te {
584
584
  }
585
585
  async _clipboardPasteAsync() {
586
586
  if (!q()) {
587
- this._injector.get(T).warn("[Facade]: The navigator object only supports the browser environment");
587
+ this._injector.get(D).warn("[Facade]: The navigator object only supports the browser environment");
588
588
  return;
589
589
  }
590
590
  const e = await this._generateClipboardPasteParamAsync();
@@ -599,7 +599,7 @@ class xe extends te {
599
599
  return;
600
600
  }
601
601
  const t = r == null ? void 0 : r.getId(), n = this._injector.get(m), o = r.getActiveSheet(), s = o.getSheetId(), c = n.getRenderById(t);
602
- c && ((u = e.headerStyle) != null && u.size) && (c.with(R).setColumnHeaderSize(c, s, (l = e.headerStyle) == null ? void 0 : l.size), o == null || o.refreshCanvas()), this._getSheetRenderComponent(t, f.COLUMN).setCustomHeader(e), o == null || o.refreshCanvas();
602
+ c && ((u = e.headerStyle) != null && u.size) && (c.with(R).setColumnHeaderSize(c, s, (l = e.headerStyle) == null ? void 0 : l.size), o == null || o.refreshCanvas()), this._getSheetRenderComponent(t, w.COLUMN).setCustomHeader(e), o == null || o.refreshCanvas();
603
603
  }
604
604
  customizeRowHeader(e) {
605
605
  const r = this.getActiveWorkbook();
@@ -608,22 +608,22 @@ class xe extends te {
608
608
  return;
609
609
  }
610
610
  const t = r == null ? void 0 : r.getId();
611
- this._getSheetRenderComponent(t, f.ROW).setCustomHeader(e);
611
+ this._getSheetRenderComponent(t, w.ROW).setCustomHeader(e);
612
612
  }
613
613
  registerSheetRowHeaderExtension(e, ...r) {
614
- const t = this._getSheetRenderComponent(e, f.ROW), n = t.register(...r);
614
+ const t = this._getSheetRenderComponent(e, w.ROW), n = t.register(...r);
615
615
  return b(() => {
616
616
  n.dispose(), t.makeDirty(!0);
617
617
  });
618
618
  }
619
619
  registerSheetColumnHeaderExtension(e, ...r) {
620
- const t = this._getSheetRenderComponent(e, f.COLUMN), n = t.register(...r);
620
+ const t = this._getSheetRenderComponent(e, w.COLUMN), n = t.register(...r);
621
621
  return b(() => {
622
622
  n.dispose(), t.makeDirty(!0);
623
623
  });
624
624
  }
625
625
  registerSheetMainExtension(e, ...r) {
626
- const t = this._getSheetRenderComponent(e, f.MAIN), n = t.register(...r);
626
+ const t = this._getSheetRenderComponent(e, w.MAIN), n = t.register(...r);
627
627
  return b(() => {
628
628
  n.dispose(), t.makeDirty(!0);
629
629
  });
@@ -653,7 +653,7 @@ class xe extends te {
653
653
  }
654
654
  }
655
655
  te.extend(xe);
656
- class Te extends ie {
656
+ class De extends ne {
657
657
  openSiderbar(e) {
658
658
  return this._logDeprecation("openSiderbar"), this._injector.get(Me).open(e);
659
659
  }
@@ -668,7 +668,7 @@ class Te extends ie {
668
668
  return t;
669
669
  }
670
670
  _logDeprecation(e) {
671
- this._injector.get(T).warn("[FWorkbook]", `${e} is deprecated. Please use the function of the same name on "FUniver".`);
671
+ this._injector.get(D).warn("[FWorkbook]", `${e} is deprecated. Please use the function of the same name on "FUniver".`);
672
672
  }
673
673
  generateCellParams(e) {
674
674
  const r = this.getActiveSheet();
@@ -680,35 +680,35 @@ class Te extends ie {
680
680
  };
681
681
  }
682
682
  onCellClick(e) {
683
- const r = this._injector.get(w);
683
+ const r = this._injector.get(f);
684
684
  return b(
685
- r.currentClickedCell$.pipe(C((t) => !!t)).subscribe((t) => {
685
+ r.currentClickedCell$.pipe(S((t) => !!t)).subscribe((t) => {
686
686
  e(t);
687
687
  })
688
688
  );
689
689
  }
690
690
  onCellHover(e) {
691
- const r = this._injector.get(w);
691
+ const r = this._injector.get(f);
692
692
  return b(
693
- r.currentRichText$.pipe(C((t) => !!t)).subscribe(e)
693
+ r.currentRichText$.pipe(S((t) => !!t)).subscribe(e)
694
694
  );
695
695
  }
696
696
  onCellPointerDown(e) {
697
- const r = this._injector.get(w);
697
+ const r = this._injector.get(f);
698
698
  return b(
699
699
  r.currentPointerDownCell$.subscribe(e)
700
700
  );
701
701
  }
702
702
  onCellPointerUp(e) {
703
- const r = this._injector.get(w);
703
+ const r = this._injector.get(f);
704
704
  return b(
705
705
  r.currentPointerUpCell$.subscribe(e)
706
706
  );
707
707
  }
708
708
  onCellPointerMove(e) {
709
- const r = this._injector.get(w);
709
+ const r = this._injector.get(f);
710
710
  return b(
711
- r.currentCellPosWithEvent$.pipe(C((t) => !!t)).subscribe((t) => {
711
+ r.currentCellPosWithEvent$.pipe(S((t) => !!t)).subscribe((t) => {
712
712
  e(t, t.event);
713
713
  })
714
714
  );
@@ -716,7 +716,7 @@ class Te extends ie {
716
716
  onDragOver(e) {
717
717
  const r = this._injector.get(U);
718
718
  return b(
719
- r.currentCell$.pipe(C((t) => !!t)).subscribe((t) => {
719
+ r.currentCell$.pipe(S((t) => !!t)).subscribe((t) => {
720
720
  e(t);
721
721
  })
722
722
  );
@@ -724,7 +724,7 @@ class Te extends ie {
724
724
  onDrop(e) {
725
725
  const r = this._injector.get(U);
726
726
  return b(
727
- r.endCell$.pipe(C((t) => !!t)).subscribe((t) => {
727
+ r.endCell$.pipe(S((t) => !!t)).subscribe((t) => {
728
728
  e(t);
729
729
  })
730
730
  );
@@ -742,7 +742,7 @@ class Te extends ie {
742
742
  keycode: e ? B.ENTER : B.ESC,
743
743
  visible: !1,
744
744
  unitId: this._workbook.getUnitId()
745
- }), await de(0), !0;
745
+ }), await ce(0), !0;
746
746
  }
747
747
  endEditingAsync(e = !0) {
748
748
  return this.endEditing(e);
@@ -758,7 +758,7 @@ class Te extends ie {
758
758
  */
759
759
  getScrollStateBySheetId(e) {
760
760
  const r = this._workbook.getUnitId(), n = this._injector.get(m).getRenderById(r);
761
- return n ? n.with(D).getScrollStateByParam({ unitId: r, sheetId: e }) : null;
761
+ return n ? n.with(T).getScrollStateByParam({ unitId: r, sheetId: e }) : null;
762
762
  }
763
763
  disableSelection() {
764
764
  const e = this._workbook.getUnitId(), t = this._injector.get(m).getRenderById(e);
@@ -777,8 +777,8 @@ class Te extends ie {
777
777
  return t && t.with(x).showSelection(), this;
778
778
  }
779
779
  }
780
- ie.extend(Te);
781
- class De extends oe {
780
+ ne.extend(De);
781
+ class Te extends ie {
782
782
  refreshCanvas() {
783
783
  const e = this._injector.get(m), r = this._fWorkbook.id, t = e.getRenderById(r);
784
784
  if (!t)
@@ -790,7 +790,7 @@ class De extends oe {
790
790
  return n.makeDirty(), this;
791
791
  }
792
792
  zoom(e) {
793
- return this._injector.get(P).syncExecuteCommand(we.id, {
793
+ return this._injector.get(P).syncExecuteCommand(fe.id, {
794
794
  unitId: this._workbook.getUnitId(),
795
795
  subUnitId: this._worksheet.getSheetId(),
796
796
  zoomRatio: e
@@ -819,7 +819,7 @@ class De extends oe {
819
819
  }
820
820
  scrollToCell(e, r) {
821
821
  const t = this._workbook.getUnitId(), o = this._injector.get(m).getRenderById(t);
822
- return o && (o == null ? void 0 : o.with(fe)).scrollToCell(e, r), this;
822
+ return o && (o == null ? void 0 : o.with(we)).scrollToCell(e, r), this;
823
823
  }
824
824
  getScrollState() {
825
825
  const e = {
@@ -828,11 +828,11 @@ class De extends oe {
828
828
  sheetViewStartColumn: 0,
829
829
  sheetViewStartRow: 0
830
830
  }, r = this._workbook.getUnitId(), t = this._worksheet.getSheetId(), o = this._injector.get(m).getRenderById(r);
831
- return o && o.with(D).getScrollStateByParam({ unitId: r, sheetId: t }) || e;
831
+ return o && o.with(T).getScrollStateByParam({ unitId: r, sheetId: t }) || e;
832
832
  }
833
833
  onScroll(e) {
834
834
  var o;
835
- const r = this._workbook.getUnitId(), n = (o = this._injector.get(m).getRenderById(r)) == null ? void 0 : o.with(D);
835
+ const r = this._workbook.getUnitId(), n = (o = this._injector.get(m).getRenderById(r)) == null ? void 0 : o.with(T);
836
836
  if (n) {
837
837
  const s = n.validViewportScrollInfo$.subscribe((c) => {
838
838
  e(c);
@@ -866,12 +866,12 @@ class De extends oe {
866
866
  var g, u;
867
867
  const r = this, t = this._fWorkbook.getId(), n = this._injector.get(m), o = r.getSheetId(), s = n.getRenderById(t);
868
868
  s && ((g = e.headerStyle) != null && g.size) && (s.with(R).setColumnHeaderSize(s, o, (u = e.headerStyle) == null ? void 0 : u.size), r == null || r.refreshCanvas());
869
- const c = this._getSheetRenderComponent(t, f.COLUMN);
869
+ const c = this._getSheetRenderComponent(t, w.COLUMN);
870
870
  c && (c.setCustomHeader(e), r == null || r.refreshCanvas());
871
871
  }
872
872
  customizeRowHeader(e) {
873
873
  const r = this._fWorkbook.getId();
874
- this._getSheetRenderComponent(r, f.ROW).setCustomHeader(e);
874
+ this._getSheetRenderComponent(r, w.ROW).setCustomHeader(e);
875
875
  }
876
876
  setColumnHeaderHeight(e) {
877
877
  const r = this, t = this._fWorkbook.getId(), n = r.getSheetId();
@@ -888,7 +888,7 @@ class De extends oe {
888
888
  subUnitId: n,
889
889
  size: e
890
890
  });
891
- const o = this._getSheetRenderComponent(t, f.ROW);
891
+ const o = this._getSheetRenderComponent(t, w.ROW);
892
892
  return o && o.setCustomHeader({ headerStyle: { size: e } }), r == null || r.refreshCanvas(), this;
893
893
  }
894
894
  /**
@@ -908,19 +908,19 @@ class De extends oe {
908
908
  return s;
909
909
  }
910
910
  }
911
- oe.extend(De);
912
- class Be extends se {
911
+ ie.extend(Te);
912
+ class Be extends oe {
913
913
  setPermissionDialogVisible(e) {
914
914
  this._permissionService.setShowComponents(e);
915
915
  }
916
916
  }
917
- se.extend(Be);
917
+ oe.extend(Be);
918
918
  class Ae extends $ {
919
919
  onCellPointerMove(e) {
920
- return b(this._injector.get(w).currentPosition$.subscribe(e));
920
+ return b(this._injector.get(f).currentPosition$.subscribe(e));
921
921
  }
922
922
  onCellPointerOver(e) {
923
- return b(this._injector.get(w).currentCell$.subscribe(e));
923
+ return b(this._injector.get(f).currentCell$.subscribe(e));
924
924
  }
925
925
  onCellDragOver(e) {
926
926
  return b(this._injector.get(U).currentCell$.subscribe(e));
@@ -928,8 +928,8 @@ class Ae extends $ {
928
928
  onCellDrop(e) {
929
929
  return b(this._injector.get(U).endCell$.subscribe(e));
930
930
  }
931
- onCellRender(e, r = he.Style, t = be.DATA_VALIDATION) {
932
- return this._injector.get(Ee).intercept(pe.CELL_CONTENT, {
931
+ onCellRender(e, r = de.Style, t = pe.DATA_VALIDATION) {
932
+ return this._injector.get(be).intercept(Ee.CELL_CONTENT, {
933
933
  effect: r,
934
934
  handler: (n, o, s) => s({
935
935
  ...n,
@@ -960,9 +960,16 @@ const M = {
960
960
  CellPointerDown: "CellPointerDown",
961
961
  CellPointerUp: "CellPointerUp",
962
962
  CellPointerMove: "CellPointerMove",
963
- CellHover: "CellHover"
963
+ CellHover: "CellHover",
964
+ DragOver: "DragOver",
965
+ Drop: "Drop",
966
+ Scroll: "Scroll",
967
+ SelectionMoveStart: "SelectionMoveStart",
968
+ SelectionMoving: "SelectionMoving",
969
+ SelectionMoveEnd: "SelectionMoveEnd",
970
+ SelectionChanged: "SelectionChanged"
964
971
  };
965
- class We extends re {
972
+ class We {
966
973
  get BeforeClipboardChange() {
967
974
  return "BeforeClipboardChange";
968
975
  }
@@ -1053,12 +1060,18 @@ class We extends re {
1053
1060
  get SheetSkeletonChanged() {
1054
1061
  return "SheetSkeletonChanged";
1055
1062
  }
1063
+ get BeforeSheetZoomChange() {
1064
+ return "BeforeSheetZoomChange";
1065
+ }
1066
+ get SheetZoomChanged() {
1067
+ return "SheetZoomChanged";
1068
+ }
1056
1069
  }
1057
- re.extend(We);
1058
- class $e extends ae {
1070
+ le.extend(We);
1071
+ class $e extends se {
1059
1072
  getCell() {
1060
1073
  var c;
1061
- const e = this._injector.get(m), r = this._injector.get(T), t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), o = e.getRenderById(t), s = (c = o == null ? void 0 : o.with(R).getSkeletonParam(n)) == null ? void 0 : c.skeleton;
1074
+ const e = this._injector.get(m), r = this._injector.get(D), t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), o = e.getRenderById(t), s = (c = o == null ? void 0 : o.with(R).getSkeletonParam(n)) == null ? void 0 : c.skeleton;
1062
1075
  if (!s)
1063
1076
  throw r.error("[Facade]: `FRange.getCell` can only be called in current worksheet"), new Error("`FRange.getCell` can only be called in current worksheet");
1064
1077
  return s.getCellWithCoordByIndex(this._range.startRow, this._range.startColumn);
@@ -1069,7 +1082,7 @@ class $e extends ae {
1069
1082
  }
1070
1083
  generateHTML() {
1071
1084
  var r;
1072
- const e = this._injector.get(ne).generateCopyContent(
1085
+ const e = this._injector.get(re).generateCopyContent(
1073
1086
  this._workbook.getUnitId(),
1074
1087
  this._worksheet.getSheetId(),
1075
1088
  this._range
@@ -1138,12 +1151,12 @@ class $e extends ae {
1138
1151
  });
1139
1152
  }
1140
1153
  }
1141
- ae.extend($e);
1154
+ se.extend($e);
1142
1155
  function ee(p, e) {
1143
1156
  const { componentKey: r, isVue3: t } = p;
1144
1157
  let n;
1145
1158
  const o = new y();
1146
- return typeof r == "string" ? n = r : (n = `External_${le(6)}`, o.add(e.register(n, r, { framework: t ? "vue3" : "react" }))), {
1159
+ return typeof r == "string" ? n = r : (n = `External_${he(6)}`, o.add(e.register(n, r, { framework: t ? "vue3" : "react" }))), {
1147
1160
  key: n,
1148
1161
  disposableCollection: o
1149
1162
  };