@univerjs/sheets-ui 0.6.0-nightly.202502121606 → 0.6.0-nightly.202502141606

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