@univerjs/sheets-ui 0.15.2 → 0.15.3-insiders.20260131-b9b8805

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.
Files changed (67) hide show
  1. package/lib/cjs/facade.js +1 -1
  2. package/lib/cjs/index.js +14 -14
  3. package/lib/cjs/locale/ca-ES.js +1 -1
  4. package/lib/cjs/locale/en-US.js +1 -1
  5. package/lib/cjs/locale/es-ES.js +1 -1
  6. package/lib/cjs/locale/fa-IR.js +1 -1
  7. package/lib/cjs/locale/fr-FR.js +1 -1
  8. package/lib/cjs/locale/ja-JP.js +1 -1
  9. package/lib/cjs/locale/ko-KR.js +1 -1
  10. package/lib/cjs/locale/ru-RU.js +1 -1
  11. package/lib/cjs/locale/sk-SK.js +1 -0
  12. package/lib/cjs/locale/vi-VN.js +1 -1
  13. package/lib/cjs/locale/zh-CN.js +1 -1
  14. package/lib/cjs/locale/zh-TW.js +1 -1
  15. package/lib/es/facade.js +676 -621
  16. package/lib/es/index.js +7332 -7009
  17. package/lib/es/locale/ca-ES.js +4 -2
  18. package/lib/es/locale/en-US.js +4 -2
  19. package/lib/es/locale/es-ES.js +4 -2
  20. package/lib/es/locale/fa-IR.js +4 -2
  21. package/lib/es/locale/fr-FR.js +4 -2
  22. package/lib/es/locale/ja-JP.js +4 -2
  23. package/lib/es/locale/ko-KR.js +4 -2
  24. package/lib/es/locale/ru-RU.js +4 -2
  25. package/lib/es/locale/sk-SK.js +463 -0
  26. package/lib/es/locale/vi-VN.js +4 -2
  27. package/lib/es/locale/zh-CN.js +4 -2
  28. package/lib/es/locale/zh-TW.js +4 -2
  29. package/lib/facade.js +676 -621
  30. package/lib/index.css +1 -1
  31. package/lib/index.js +7332 -7009
  32. package/lib/locale/ca-ES.js +4 -2
  33. package/lib/locale/en-US.js +4 -2
  34. package/lib/locale/es-ES.js +4 -2
  35. package/lib/locale/fa-IR.js +4 -2
  36. package/lib/locale/fr-FR.js +4 -2
  37. package/lib/locale/ja-JP.js +4 -2
  38. package/lib/locale/ko-KR.js +4 -2
  39. package/lib/locale/ru-RU.js +4 -2
  40. package/lib/locale/sk-SK.js +463 -0
  41. package/lib/locale/vi-VN.js +4 -2
  42. package/lib/locale/zh-CN.js +4 -2
  43. package/lib/locale/zh-TW.js +4 -2
  44. package/lib/types/controllers/config.schema.d.ts +5 -0
  45. package/lib/types/controllers/editor/editing.render-controller.d.ts +3 -2
  46. package/lib/types/controllers/menu/text-to-number.menu.d.ts +6 -0
  47. package/lib/types/controllers/render-controllers/mobile/mobile-header-resize.render-controller.d.ts +44 -0
  48. package/lib/types/index.d.ts +1 -1
  49. package/lib/types/locale/en-US.d.ts +2 -0
  50. package/lib/types/locale/sk-SK.d.ts +3 -0
  51. package/lib/types/views/editor-container/EditorContainer.d.ts +16 -1
  52. package/lib/umd/facade.js +1 -1
  53. package/lib/umd/index.js +15 -15
  54. package/lib/umd/locale/ca-ES.js +1 -1
  55. package/lib/umd/locale/en-US.js +1 -1
  56. package/lib/umd/locale/es-ES.js +1 -1
  57. package/lib/umd/locale/fa-IR.js +1 -1
  58. package/lib/umd/locale/fr-FR.js +1 -1
  59. package/lib/umd/locale/ja-JP.js +1 -1
  60. package/lib/umd/locale/ko-KR.js +1 -1
  61. package/lib/umd/locale/ru-RU.js +1 -1
  62. package/lib/umd/locale/sk-SK.js +1 -0
  63. package/lib/umd/locale/vi-VN.js +1 -1
  64. package/lib/umd/locale/zh-CN.js +1 -1
  65. package/lib/umd/locale/zh-TW.js +1 -1
  66. package/package.json +13 -13
  67. package/LICENSE +0 -176
package/lib/facade.js CHANGED
@@ -1,511 +1,566 @@
1
- import { ICommandService as R, CanceledError as b, IUniverInstanceService as O, RichTextValue as F, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as D, LifecycleService as ae, DisposableCollection as j, LifecycleStages as z, UniverInstanceType as ce, ILogService as U, toDisposable as m, IPermissionService as de, awaitTime as he, InterceptorEffectEnum as ge, Rectangle as le, generateRandomId as ue } from "@univerjs/core";
2
- import { FUniver as Q, FEventName as ve, FEnum as Se } from "@univerjs/core/facade";
3
- import { RichTextEditingMutation as me } from "@univerjs/docs";
4
- import { IRenderManagerService as v, DeviceInputEventType as L, SHEET_VIEWPORT_KEY as ee } from "@univerjs/engine-render";
5
- import { SheetsSelectionsService as Ce, COMMAND_LISTENER_SKELETON_CHANGE as we, getSkeletonChangedEffectedRange as Ee, SetWorksheetRowIsAutoHeightCommand as be, InterceptCellContentPriority as pe, SheetInterceptorService as fe, INTERCEPTOR_POINT as ke } from "@univerjs/sheets";
6
- import { SetCellEditVisibleOperation as I, IEditorBridgeService as f, SetZoomRatioCommand as $, HoverManagerService as k, DragManagerService as M, SheetScrollManagerService as x, SheetPasteShortKeyCommand as T, ISheetClipboardService as te, SheetSkeletonManagerService as p, SHEET_VIEW_KEY as E, SheetPermissionRenderManagerService as A, ISheetSelectionRenderService as y, IMarkSelectionService as re, SheetsScrollRenderController as Ie, SetWorksheetColAutoWidthCommand as _e, SetColumnHeaderHeightCommand as Re, SetRowHeaderWidthCommand as Pe, SheetCanvasPopManagerService as N, CellAlertManagerService as He, ISheetCellDropdownManagerService as Me, AutoFillCommand as ye } from "@univerjs/sheets-ui";
7
- import { FSheetHooks as W, FWorkbook as ne, FWorksheet as ie, FPermission as oe, FRange as se } from "@univerjs/sheets/facade";
8
- import { KeyCode as B, CutCommand as V, CopyCommand as Z, PasteCommand as K, IClipboardInterfaceService as Ue, PLAIN_TEXT_CLIPBOARD_MIME_TYPE as Y, HTML_CLIPBOARD_MIME_TYPE as X, supportClipboardAPI as J, ISidebarService as xe, IDialogService as Be, ComponentManager as G } from "@univerjs/ui";
9
- import { filter as u, combineLatest as De } from "rxjs";
10
- class Te extends Q {
1
+ import { ICommandService as _, CanceledError as E, IUniverInstanceService as W, RichTextValue as $, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as x, LifecycleService as oe, DisposableCollection as T, LifecycleStages as O, UniverInstanceType as se, ILogService as H, toDisposable as S, IPermissionService as ae, awaitTime as ce, InterceptorEffectEnum as de, Rectangle as he, generateRandomId as ge } from "@univerjs/core";
2
+ import { FUniver as G, FEventName as le, FEnum as ue } from "@univerjs/core/facade";
3
+ import { RichTextEditingMutation as ve } from "@univerjs/docs";
4
+ import { IRenderManagerService as v, DeviceInputEventType as F, SHEET_VIEWPORT_KEY as q } from "@univerjs/engine-render";
5
+ import { SheetsSelectionsService as Se, COMMAND_LISTENER_SKELETON_CHANGE as me, getSkeletonChangedEffectedRange as Ce, SetWorksheetRowIsAutoHeightCommand as we, InterceptCellContentPriority as Ee, SheetInterceptorService as be, INTERCEPTOR_POINT as pe } from "@univerjs/sheets";
6
+ import { SetCellEditVisibleOperation as k, IEditorBridgeService as p, SetZoomRatioCommand as A, HoverManagerService as f, DragManagerService as P, SheetScrollManagerService as y, SheetPasteShortKeyCommand as B, ISheetClipboardService as Q, SheetSkeletonManagerService as b, SHEET_VIEW_KEY as w, SheetPermissionRenderManagerService as D, ISheetSelectionRenderService as M, IMarkSelectionService as ee, SheetsScrollRenderController as fe, SetWorksheetColAutoWidthCommand as ke, SetColumnHeaderHeightCommand as Ie, SetRowHeaderWidthCommand as _e, SheetCanvasPopManagerService as z, CellAlertManagerService as Re, ISheetCellDropdownManagerService as Pe, AutoFillCommand as Me } from "@univerjs/sheets-ui";
7
+ import { FSheetHooks as j, FWorkbook as te, FWorksheet as re, FPermission as ne, FRange as ie } from "@univerjs/sheets/facade";
8
+ import { KeyCode as U, CutCommand as L, CopyCommand as N, PasteCommand as V, IClipboardInterfaceService as He, PLAIN_TEXT_CLIPBOARD_MIME_TYPE as Z, HTML_CLIPBOARD_MIME_TYPE as K, supportClipboardAPI as Y, ISidebarService as ye, IDialogService as Ue, ComponentManager as X } from "@univerjs/ui";
9
+ import { filter as u, combineLatest as xe } from "rxjs";
10
+ class Be extends G {
11
11
  // eslint-disable-next-line max-lines-per-function
12
12
  _initSheetUIEvent(e) {
13
- const r = e.get(R);
14
- this.registerEventHandler(
15
- this.Event.BeforeSheetEditStart,
16
- () => r.beforeCommandExecuted((t) => {
17
- if (t.id !== I.id) return;
18
- const i = this.getActiveSheet();
19
- if (!i) return;
20
- const { workbook: o, worksheet: s } = i, d = e.get(f), h = t.params, { visible: g, keycode: l, eventType: a } = h, n = d.getEditLocation();
21
- if (g) {
22
- const c = {
23
- row: n.row,
24
- column: n.column,
25
- eventType: a,
26
- keycode: l,
27
- workbook: o,
28
- worksheet: s,
29
- isZenEditor: !1
30
- };
31
- if (this.fireEvent(this.Event.BeforeSheetEditStart, c), c.cancel)
32
- throw new b();
33
- }
34
- })
35
- ), this.registerEventHandler(
36
- this.Event.BeforeSheetEditEnd,
37
- () => r.beforeCommandExecuted((t) => {
38
- if (t.id !== I.id) return;
39
- const i = this.getActiveSheet();
40
- if (!i) return;
41
- const { workbook: o, worksheet: s } = i, d = e.get(f), h = e.get(O), g = t.params, { visible: l, keycode: a, eventType: n } = g, c = d.getEditLocation();
42
- if (!l) {
43
- const P = {
44
- row: c.row,
45
- column: c.column,
46
- eventType: n,
47
- keycode: a,
48
- workbook: o,
49
- worksheet: s,
50
- isZenEditor: !1,
51
- value: F.create(h.getUnit(D).getSnapshot()),
52
- isConfirm: a !== B.ESC
53
- };
54
- if (this.fireEvent(this.Event.BeforeSheetEditEnd, P), P.cancel)
55
- throw new b();
56
- }
57
- })
58
- ), this.registerEventHandler(
59
- this.Event.SheetEditStarted,
60
- () => r.onCommandExecuted((t) => {
61
- if (t.id !== I.id) return;
62
- const i = this.getCommandSheetTarget(t);
63
- if (!i) return;
64
- const { workbook: o, worksheet: s } = i, d = e.get(f), h = t.params, { visible: g, keycode: l, eventType: a } = h, n = d.getEditLocation();
65
- if (g) {
66
- const c = {
67
- row: n.row,
68
- column: n.column,
69
- eventType: a,
70
- keycode: l,
71
- workbook: o,
72
- worksheet: s,
73
- isZenEditor: !1
74
- };
75
- this.fireEvent(this.Event.SheetEditStarted, c);
76
- }
77
- })
78
- ), this.registerEventHandler(
79
- this.Event.SheetEditEnded,
80
- () => r.onCommandExecuted((t) => {
81
- if (t.id !== I.id) return;
82
- const i = this.getCommandSheetTarget(t);
83
- if (!i) return;
84
- const { workbook: o, worksheet: s } = i, d = e.get(f), h = t.params, { visible: g, keycode: l, eventType: a } = h, n = d.getEditLocation();
85
- if (!g) {
86
- const c = {
87
- row: n.row,
88
- column: n.column,
89
- eventType: a,
90
- keycode: l,
13
+ const r = e.get(_);
14
+ this.disposeWithMe(
15
+ this.registerEventHandler(
16
+ this.Event.BeforeSheetEditStart,
17
+ () => r.beforeCommandExecuted((t) => {
18
+ if (t.id !== k.id) return;
19
+ const i = this.getActiveSheet();
20
+ if (!i) return;
21
+ const { workbook: o, worksheet: a } = i, d = e.get(p), h = t.params, { visible: l, keycode: g, eventType: c } = h, n = d.getEditLocation();
22
+ if (l) {
23
+ const s = {
24
+ row: n.row,
25
+ column: n.column,
26
+ eventType: c,
27
+ keycode: g,
28
+ workbook: o,
29
+ worksheet: a,
30
+ isZenEditor: !1
31
+ };
32
+ if (this.fireEvent(this.Event.BeforeSheetEditStart, s), s.cancel)
33
+ throw new E();
34
+ }
35
+ })
36
+ )
37
+ ), this.disposeWithMe(
38
+ this.registerEventHandler(
39
+ this.Event.BeforeSheetEditEnd,
40
+ () => r.beforeCommandExecuted((t) => {
41
+ if (t.id !== k.id) return;
42
+ const i = this.getActiveSheet();
43
+ if (!i) return;
44
+ const { workbook: o, worksheet: a } = i, d = e.get(p), h = e.get(W), l = t.params, { visible: g, keycode: c, eventType: n } = l, s = d.getEditLocation();
45
+ if (!g) {
46
+ const m = {
47
+ row: s.row,
48
+ column: s.column,
49
+ eventType: n,
50
+ keycode: c,
51
+ workbook: o,
52
+ worksheet: a,
53
+ isZenEditor: !1,
54
+ value: $.create(h.getUnit(x).getSnapshot()),
55
+ isConfirm: c !== U.ESC
56
+ };
57
+ if (this.fireEvent(this.Event.BeforeSheetEditEnd, m), m.cancel)
58
+ throw new E();
59
+ }
60
+ })
61
+ )
62
+ ), this.disposeWithMe(
63
+ this.registerEventHandler(
64
+ this.Event.SheetEditStarted,
65
+ () => r.onCommandExecuted((t) => {
66
+ if (t.id !== k.id) return;
67
+ const i = this.getCommandSheetTarget(t);
68
+ if (!i) return;
69
+ const { workbook: o, worksheet: a } = i, d = e.get(p), h = t.params, { visible: l, keycode: g, eventType: c } = h, n = d.getEditLocation();
70
+ if (l) {
71
+ const s = {
72
+ row: n.row,
73
+ column: n.column,
74
+ eventType: c,
75
+ keycode: g,
76
+ workbook: o,
77
+ worksheet: a,
78
+ isZenEditor: !1
79
+ };
80
+ this.fireEvent(this.Event.SheetEditStarted, s);
81
+ }
82
+ })
83
+ )
84
+ ), this.disposeWithMe(
85
+ this.registerEventHandler(
86
+ this.Event.SheetEditEnded,
87
+ () => r.onCommandExecuted((t) => {
88
+ if (t.id !== k.id) return;
89
+ const i = this.getCommandSheetTarget(t);
90
+ if (!i) return;
91
+ const { workbook: o, worksheet: a } = i, d = e.get(p), h = t.params, { visible: l, keycode: g, eventType: c } = h, n = d.getEditLocation();
92
+ if (!l) {
93
+ const s = {
94
+ row: n.row,
95
+ column: n.column,
96
+ eventType: c,
97
+ keycode: g,
98
+ workbook: o,
99
+ worksheet: a,
100
+ isZenEditor: !1,
101
+ isConfirm: g !== U.ESC
102
+ };
103
+ this.fireEvent(this.Event.SheetEditEnded, s);
104
+ }
105
+ })
106
+ )
107
+ ), this.disposeWithMe(
108
+ this.registerEventHandler(
109
+ this.Event.SheetEditChanging,
110
+ () => r.onCommandExecuted((t) => {
111
+ if (t.id !== ve.id) return;
112
+ const i = this.getActiveSheet();
113
+ if (!i) return;
114
+ const { workbook: o, worksheet: a } = i, d = e.get(p), h = e.get(W), l = t.params;
115
+ if (!d.isVisible().visible) return;
116
+ const { unitId: g } = l;
117
+ if (g === x) {
118
+ const { row: c, column: n } = d.getEditLocation(), s = {
119
+ workbook: o,
120
+ worksheet: a,
121
+ row: c,
122
+ column: n,
123
+ value: $.create(h.getUnit(x).getSnapshot()),
124
+ isZenEditor: !1
125
+ };
126
+ this.fireEvent(this.Event.SheetEditChanging, s);
127
+ }
128
+ })
129
+ )
130
+ ), this.disposeWithMe(
131
+ this.registerEventHandler(
132
+ this.Event.BeforeSheetZoomChange,
133
+ () => r.beforeCommandExecuted((t) => {
134
+ if (t.id !== A.id) return;
135
+ const i = this.getCommandSheetTarget(t);
136
+ if (!i) return;
137
+ const { workbook: o, worksheet: a } = i, d = {
138
+ zoom: t.params.zoomRatio,
91
139
  workbook: o,
92
- worksheet: s,
93
- isZenEditor: !1,
94
- isConfirm: l !== B.ESC
140
+ worksheet: a
95
141
  };
96
- this.fireEvent(this.Event.SheetEditEnded, c);
97
- }
98
- })
99
- ), this.registerEventHandler(
100
- this.Event.SheetEditChanging,
101
- () => r.onCommandExecuted((t) => {
102
- if (t.id !== me.id) return;
103
- const i = this.getActiveSheet();
104
- if (!i) return;
105
- const { workbook: o, worksheet: s } = i, d = e.get(f), h = e.get(O), g = t.params;
106
- if (!d.isVisible().visible) return;
107
- const { unitId: l } = g;
108
- if (l === D) {
109
- const { row: a, column: n } = d.getEditLocation(), c = {
142
+ if (this.fireEvent(this.Event.BeforeSheetZoomChange, d), d.cancel)
143
+ throw new E();
144
+ })
145
+ )
146
+ ), this.disposeWithMe(
147
+ this.registerEventHandler(
148
+ this.Event.SheetZoomChanged,
149
+ () => r.onCommandExecuted((t) => {
150
+ if (t.id !== A.id) return;
151
+ const i = this.getCommandSheetTarget(t);
152
+ if (!i) return;
153
+ const { workbook: o, worksheet: a } = i;
154
+ this.fireEvent(this.Event.SheetZoomChanged, {
155
+ zoom: a.getZoom(),
110
156
  workbook: o,
111
- worksheet: s,
112
- row: a,
113
- column: n,
114
- value: F.create(h.getUnit(D).getSnapshot()),
115
- isZenEditor: !1
116
- };
117
- this.fireEvent(this.Event.SheetEditChanging, c);
118
- }
119
- })
120
- ), this.registerEventHandler(
121
- this.Event.BeforeSheetZoomChange,
122
- () => r.beforeCommandExecuted((t) => {
123
- if (t.id !== $.id) return;
124
- const i = this.getCommandSheetTarget(t);
125
- if (!i) return;
126
- const { workbook: o, worksheet: s } = i, d = {
127
- zoom: t.params.zoomRatio,
128
- workbook: o,
129
- worksheet: s
130
- };
131
- if (this.fireEvent(this.Event.BeforeSheetZoomChange, d), d.cancel)
132
- throw new b();
133
- })
134
- ), this.registerEventHandler(
135
- this.Event.SheetZoomChanged,
136
- () => r.onCommandExecuted((t) => {
137
- if (t.id !== $.id) return;
138
- const i = this.getCommandSheetTarget(t);
139
- if (!i) return;
140
- const { workbook: o, worksheet: s } = i;
141
- this.fireEvent(this.Event.SheetZoomChanged, {
142
- zoom: s.getZoom(),
143
- workbook: o,
144
- worksheet: s
145
- });
146
- })
157
+ worksheet: a
158
+ });
159
+ })
160
+ )
147
161
  );
148
162
  }
149
163
  // eslint-disable-next-line max-lines-per-function
150
164
  _initObserverListener(e) {
151
- const r = e.get(v), t = e.get(ae), i = new j();
165
+ const r = e.get(v), t = e.get(oe), i = new T();
152
166
  this.disposeWithMe(t.lifecycle$.subscribe((h) => {
153
- if (h !== z.Rendered) return;
154
- i.dispose();
155
- const g = e.get(k), l = e.get(M);
156
- g && (this.registerEventHandler(
157
- this.Event.CellClicked,
158
- () => {
159
- var a;
160
- return (a = g.currentClickedCell$) == null ? void 0 : a.pipe(u((n) => !!n)).subscribe((n) => {
161
- const c = this.getSheetTarget(n.location.unitId, n.location.subUnitId);
162
- c && this.fireEvent(this.Event.CellClicked, {
163
- ...c,
164
- ...n,
165
- row: n.location.row,
166
- column: n.location.col
167
+ if (h !== O.Rendered) return;
168
+ const l = e.get(f), g = e.get(P);
169
+ l && (i.dispose(), i.add(
170
+ this.registerEventHandler(
171
+ this.Event.CellClicked,
172
+ () => {
173
+ var c;
174
+ return (c = l.currentClickedCell$) == null ? void 0 : c.pipe(u((n) => !!n)).subscribe((n) => {
175
+ const s = this.getSheetTarget(n.location.unitId, n.location.subUnitId);
176
+ s && this.fireEvent(this.Event.CellClicked, {
177
+ ...s,
178
+ ...n,
179
+ row: n.location.row,
180
+ column: n.location.col
181
+ });
167
182
  });
168
- });
169
- }
170
- ), this.registerEventHandler(
171
- this.Event.CellHover,
172
- () => {
173
- var a;
174
- return (a = g.currentRichText$) == null ? void 0 : a.pipe(u((n) => !!n)).subscribe((n) => {
175
- const c = this.getSheetTarget(n.unitId, n.subUnitId);
176
- c && this.fireEvent(this.Event.CellHover, {
177
- ...c,
178
- ...n,
179
- row: n.row,
180
- column: n.col
183
+ }
184
+ )
185
+ ), i.add(
186
+ this.registerEventHandler(
187
+ this.Event.CellHover,
188
+ () => {
189
+ var c;
190
+ return (c = l.currentRichText$) == null ? void 0 : c.pipe(u((n) => !!n)).subscribe((n) => {
191
+ const s = this.getSheetTarget(n.unitId, n.subUnitId);
192
+ s && this.fireEvent(this.Event.CellHover, {
193
+ ...s,
194
+ ...n,
195
+ row: n.row,
196
+ column: n.col
197
+ });
181
198
  });
182
- });
183
- }
184
- ), this.registerEventHandler(
185
- this.Event.CellPointerDown,
186
- () => {
187
- var a;
188
- return (a = g.currentPointerDownCell$) == null ? void 0 : a.pipe(u((n) => !!n)).subscribe((n) => {
189
- const c = this.getSheetTarget(n.unitId, n.subUnitId);
190
- c && this.fireEvent(this.Event.CellPointerDown, {
191
- ...c,
192
- ...n,
193
- row: n.row,
194
- column: n.col
199
+ }
200
+ )
201
+ ), i.add(
202
+ this.registerEventHandler(
203
+ this.Event.CellPointerDown,
204
+ () => {
205
+ var c;
206
+ return (c = l.currentPointerDownCell$) == null ? void 0 : c.pipe(u((n) => !!n)).subscribe((n) => {
207
+ const s = this.getSheetTarget(n.unitId, n.subUnitId);
208
+ s && this.fireEvent(this.Event.CellPointerDown, {
209
+ ...s,
210
+ ...n,
211
+ row: n.row,
212
+ column: n.col
213
+ });
195
214
  });
196
- });
197
- }
198
- ), this.registerEventHandler(
199
- this.Event.CellPointerUp,
200
- () => {
201
- var a;
202
- return (a = g.currentPointerUpCell$) == null ? void 0 : a.pipe(u((n) => !!n)).subscribe((n) => {
203
- const c = this.getSheetTarget(n.unitId, n.subUnitId);
204
- c && this.fireEvent(this.Event.CellPointerUp, {
205
- ...c,
206
- ...n,
207
- row: n.row,
208
- column: n.col
215
+ }
216
+ )
217
+ ), i.add(
218
+ this.registerEventHandler(
219
+ this.Event.CellPointerUp,
220
+ () => {
221
+ var c;
222
+ return (c = l.currentPointerUpCell$) == null ? void 0 : c.pipe(u((n) => !!n)).subscribe((n) => {
223
+ const s = this.getSheetTarget(n.unitId, n.subUnitId);
224
+ s && this.fireEvent(this.Event.CellPointerUp, {
225
+ ...s,
226
+ ...n,
227
+ row: n.row,
228
+ column: n.col
229
+ });
209
230
  });
210
- });
211
- }
212
- ), this.registerEventHandler(
213
- this.Event.CellPointerMove,
214
- () => {
215
- var a;
216
- return (a = g.currentCellPosWithEvent$) == null ? void 0 : a.pipe(u((n) => !!n)).subscribe((n) => {
217
- const c = this.getSheetTarget(n.unitId, n.subUnitId);
218
- c && this.fireEvent(this.Event.CellPointerMove, {
219
- ...c,
220
- ...n,
221
- row: n.row,
222
- column: n.col
231
+ }
232
+ )
233
+ ), i.add(
234
+ this.registerEventHandler(
235
+ this.Event.CellPointerMove,
236
+ () => {
237
+ var c;
238
+ return (c = l.currentCellPosWithEvent$) == null ? void 0 : c.pipe(u((n) => !!n)).subscribe((n) => {
239
+ const s = this.getSheetTarget(n.unitId, n.subUnitId);
240
+ s && this.fireEvent(this.Event.CellPointerMove, {
241
+ ...s,
242
+ ...n,
243
+ row: n.row,
244
+ column: n.col
245
+ });
223
246
  });
224
- });
225
- }
226
- ), this.registerEventHandler(
227
- this.Event.DragOver,
228
- () => {
229
- var a;
230
- return (a = l.currentCell$) == null ? void 0 : a.pipe(u((n) => !!n)).subscribe((n) => {
231
- const c = this.getSheetTarget(n.location.unitId, n.location.subUnitId);
232
- c && this.fireEvent(this.Event.DragOver, {
233
- ...c,
234
- ...n,
235
- row: n.location.row,
236
- column: n.location.col
247
+ }
248
+ )
249
+ ), i.add(
250
+ this.registerEventHandler(
251
+ this.Event.DragOver,
252
+ () => {
253
+ var c;
254
+ return (c = g.currentCell$) == null ? void 0 : c.pipe(u((n) => !!n)).subscribe((n) => {
255
+ const s = this.getSheetTarget(n.location.unitId, n.location.subUnitId);
256
+ s && this.fireEvent(this.Event.DragOver, {
257
+ ...s,
258
+ ...n,
259
+ row: n.location.row,
260
+ column: n.location.col
261
+ });
237
262
  });
238
- });
239
- }
240
- ), this.registerEventHandler(
241
- this.Event.Drop,
242
- () => {
243
- var a;
244
- return (a = l.endCell$) == null ? void 0 : a.pipe(u((n) => !!n)).subscribe((n) => {
245
- const c = this.getSheetTarget(n.location.unitId, n.location.subUnitId);
246
- c && this.fireEvent(this.Event.Drop, {
247
- ...c,
248
- ...n,
249
- row: n.location.row,
250
- column: n.location.col
263
+ }
264
+ )
265
+ ), i.add(
266
+ this.registerEventHandler(
267
+ this.Event.Drop,
268
+ () => {
269
+ var c;
270
+ return (c = g.endCell$) == null ? void 0 : c.pipe(u((n) => !!n)).subscribe((n) => {
271
+ const s = this.getSheetTarget(n.location.unitId, n.location.subUnitId);
272
+ s && this.fireEvent(this.Event.Drop, {
273
+ ...s,
274
+ ...n,
275
+ row: n.location.row,
276
+ column: n.location.col
277
+ });
251
278
  });
252
- });
253
- }
254
- ), this.registerEventHandler(
255
- this.Event.RowHeaderClick,
256
- () => {
257
- var a;
258
- return (a = g.currentRowHeaderClick$) == null ? void 0 : a.pipe(u((n) => !!n)).subscribe((n) => {
259
- const c = this.getSheetTarget(n.unitId, n.subUnitId);
260
- c && this.fireEvent(this.Event.RowHeaderClick, {
261
- ...c,
262
- row: n.index
279
+ }
280
+ )
281
+ ), i.add(
282
+ this.registerEventHandler(
283
+ this.Event.RowHeaderClick,
284
+ () => {
285
+ var c;
286
+ return (c = l.currentRowHeaderClick$) == null ? void 0 : c.pipe(u((n) => !!n)).subscribe((n) => {
287
+ const s = this.getSheetTarget(n.unitId, n.subUnitId);
288
+ s && this.fireEvent(this.Event.RowHeaderClick, {
289
+ ...s,
290
+ row: n.index
291
+ });
263
292
  });
264
- });
265
- }
266
- ), this.registerEventHandler(
267
- this.Event.RowHeaderPointerDown,
268
- () => {
269
- var a;
270
- return (a = g.currentRowHeaderPointerDown$) == null ? void 0 : a.pipe(u((n) => !!n)).subscribe((n) => {
271
- const c = this.getSheetTarget(n.unitId, n.subUnitId);
272
- c && this.fireEvent(this.Event.RowHeaderPointerDown, {
273
- ...c,
274
- row: n.index
293
+ }
294
+ )
295
+ ), i.add(
296
+ this.registerEventHandler(
297
+ this.Event.RowHeaderPointerDown,
298
+ () => {
299
+ var c;
300
+ return (c = l.currentRowHeaderPointerDown$) == null ? void 0 : c.pipe(u((n) => !!n)).subscribe((n) => {
301
+ const s = this.getSheetTarget(n.unitId, n.subUnitId);
302
+ s && this.fireEvent(this.Event.RowHeaderPointerDown, {
303
+ ...s,
304
+ row: n.index
305
+ });
275
306
  });
276
- });
277
- }
278
- ), this.registerEventHandler(
279
- this.Event.RowHeaderPointerUp,
280
- () => {
281
- var a;
282
- return (a = g.currentRowHeaderPointerUp$) == null ? void 0 : a.pipe(u((n) => !!n)).subscribe((n) => {
283
- const c = this.getSheetTarget(n.unitId, n.subUnitId);
284
- c && this.fireEvent(this.Event.RowHeaderPointerUp, {
285
- ...c,
286
- row: n.index
307
+ }
308
+ )
309
+ ), i.add(
310
+ this.registerEventHandler(
311
+ this.Event.RowHeaderPointerUp,
312
+ () => {
313
+ var c;
314
+ return (c = l.currentRowHeaderPointerUp$) == null ? void 0 : c.pipe(u((n) => !!n)).subscribe((n) => {
315
+ const s = this.getSheetTarget(n.unitId, n.subUnitId);
316
+ s && this.fireEvent(this.Event.RowHeaderPointerUp, {
317
+ ...s,
318
+ row: n.index
319
+ });
287
320
  });
288
- });
289
- }
290
- ), this.registerEventHandler(
291
- this.Event.RowHeaderHover,
292
- () => {
293
- var a;
294
- return (a = g.currentHoveredRowHeader$) == null ? void 0 : a.pipe(u((n) => !!n)).subscribe((n) => {
295
- const c = this.getSheetTarget(n.unitId, n.subUnitId);
296
- c && this.fireEvent(this.Event.RowHeaderHover, {
297
- ...c,
298
- row: n.index
321
+ }
322
+ )
323
+ ), i.add(
324
+ this.registerEventHandler(
325
+ this.Event.RowHeaderHover,
326
+ () => {
327
+ var c;
328
+ return (c = l.currentHoveredRowHeader$) == null ? void 0 : c.pipe(u((n) => !!n)).subscribe((n) => {
329
+ const s = this.getSheetTarget(n.unitId, n.subUnitId);
330
+ s && this.fireEvent(this.Event.RowHeaderHover, {
331
+ ...s,
332
+ row: n.index
333
+ });
299
334
  });
300
- });
301
- }
302
- ), this.registerEventHandler(
303
- this.Event.ColumnHeaderClick,
304
- () => {
305
- var a;
306
- return (a = g.currentColHeaderClick$) == null ? void 0 : a.pipe(u((n) => !!n)).subscribe((n) => {
307
- const c = this.getSheetTarget(n.unitId, n.subUnitId);
308
- c && this.fireEvent(this.Event.ColumnHeaderClick, {
309
- ...c,
310
- column: n.index
335
+ }
336
+ )
337
+ ), i.add(
338
+ this.registerEventHandler(
339
+ this.Event.ColumnHeaderClick,
340
+ () => {
341
+ var c;
342
+ return (c = l.currentColHeaderClick$) == null ? void 0 : c.pipe(u((n) => !!n)).subscribe((n) => {
343
+ const s = this.getSheetTarget(n.unitId, n.subUnitId);
344
+ s && this.fireEvent(this.Event.ColumnHeaderClick, {
345
+ ...s,
346
+ column: n.index
347
+ });
311
348
  });
312
- });
313
- }
314
- ), this.registerEventHandler(
315
- this.Event.ColumnHeaderPointerDown,
316
- () => {
317
- var a;
318
- return (a = g.currentColHeaderPointerDown$) == null ? void 0 : a.pipe(u((n) => !!n)).subscribe((n) => {
319
- const c = this.getSheetTarget(n.unitId, n.subUnitId);
320
- c && this.fireEvent(this.Event.ColumnHeaderPointerDown, {
321
- ...c,
322
- column: n.index
349
+ }
350
+ )
351
+ ), i.add(
352
+ this.registerEventHandler(
353
+ this.Event.ColumnHeaderPointerDown,
354
+ () => {
355
+ var c;
356
+ return (c = l.currentColHeaderPointerDown$) == null ? void 0 : c.pipe(u((n) => !!n)).subscribe((n) => {
357
+ const s = this.getSheetTarget(n.unitId, n.subUnitId);
358
+ s && this.fireEvent(this.Event.ColumnHeaderPointerDown, {
359
+ ...s,
360
+ column: n.index
361
+ });
323
362
  });
324
- });
325
- }
326
- ), this.registerEventHandler(
327
- this.Event.ColumnHeaderPointerUp,
328
- () => {
329
- var a;
330
- return (a = g.currentColHeaderPointerUp$) == null ? void 0 : a.pipe(u((n) => !!n)).subscribe((n) => {
331
- const c = this.getSheetTarget(n.unitId, n.subUnitId);
332
- c && this.fireEvent(this.Event.ColumnHeaderPointerUp, {
333
- ...c,
334
- column: n.index
363
+ }
364
+ )
365
+ ), i.add(
366
+ this.registerEventHandler(
367
+ this.Event.ColumnHeaderPointerUp,
368
+ () => {
369
+ var c;
370
+ return (c = l.currentColHeaderPointerUp$) == null ? void 0 : c.pipe(u((n) => !!n)).subscribe((n) => {
371
+ const s = this.getSheetTarget(n.unitId, n.subUnitId);
372
+ s && this.fireEvent(this.Event.ColumnHeaderPointerUp, {
373
+ ...s,
374
+ column: n.index
375
+ });
335
376
  });
336
- });
337
- }
338
- ), this.registerEventHandler(
339
- this.Event.ColumnHeaderHover,
340
- () => {
341
- var a;
342
- return (a = g.currentHoveredColHeader$) == null ? void 0 : a.pipe(u((n) => !!n)).subscribe((n) => {
343
- const c = this.getSheetTarget(n.unitId, n.subUnitId);
344
- c && this.fireEvent(this.Event.ColumnHeaderHover, {
345
- ...c,
346
- column: n.index
377
+ }
378
+ )
379
+ ), i.add(
380
+ this.registerEventHandler(
381
+ this.Event.ColumnHeaderHover,
382
+ () => {
383
+ var c;
384
+ return (c = l.currentHoveredColHeader$) == null ? void 0 : c.pipe(u((n) => !!n)).subscribe((n) => {
385
+ const s = this.getSheetTarget(n.unitId, n.subUnitId);
386
+ s && this.fireEvent(this.Event.ColumnHeaderHover, {
387
+ ...s,
388
+ column: n.index
389
+ });
347
390
  });
348
- });
349
- }
350
- ));
351
- })), this.disposeWithMe(i);
352
- const o = /* @__PURE__ */ new Map();
353
- let s;
354
- const d = De([
391
+ }
392
+ )
393
+ ), this.disposeWithMe(i));
394
+ }));
395
+ let o;
396
+ const a = xe([
355
397
  r.created$,
356
398
  t.lifecycle$
357
- ]);
358
- this.disposeWithMe(d.subscribe(([h, g]) => {
359
- var P;
360
- if (h.type === ce.UNIVER_SHEET && (s = h), g <= z.Rendered || !s) return;
361
- const l = new j(), a = this.getWorkbook(s.unitId);
362
- if (!a) return;
363
- o.get(s.unitId) && ((P = o.get(s.unitId)) == null || P.dispose()), o.set(s.unitId, l);
364
- const n = s.with(x), c = s.with(Ce);
365
- l.add(this.registerEventHandler(
366
- this.Event.Scroll,
367
- () => n.validViewportScrollInfo$.subscribe((S) => {
368
- S && this.fireEvent(this.Event.Scroll, {
369
- workbook: a,
370
- worksheet: a.getActiveSheet(),
371
- ...S
372
- });
373
- })
374
- )), l.add(this.registerEventHandler(
375
- this.Event.SelectionMoveStart,
376
- () => c.selectionMoveStart$.subscribe((S) => {
377
- var C;
378
- this.fireEvent(this.Event.SelectionMoveStart, {
379
- workbook: a,
380
- worksheet: a.getActiveSheet(),
381
- selections: (C = S == null ? void 0 : S.map((_) => _.range)) != null ? C : []
382
- });
383
- })
384
- )), l.add(this.registerEventHandler(
385
- this.Event.SelectionMoving,
386
- () => c.selectionMoving$.subscribe((S) => {
387
- var C;
388
- this.fireEvent(this.Event.SelectionMoving, {
389
- workbook: a,
390
- worksheet: a.getActiveSheet(),
391
- selections: (C = S == null ? void 0 : S.map((_) => _.range)) != null ? C : []
392
- });
393
- })
394
- )), l.add(this.registerEventHandler(
395
- this.Event.SelectionMoveEnd,
396
- () => c.selectionMoveEnd$.subscribe((S) => {
397
- var C;
398
- this.fireEvent(this.Event.SelectionMoveEnd, {
399
- workbook: a,
400
- worksheet: a.getActiveSheet(),
401
- selections: (C = S == null ? void 0 : S.map((_) => _.range)) != null ? C : []
402
- });
403
- })
404
- )), l.add(this.registerEventHandler(
405
- this.Event.SelectionChanged,
406
- () => c.selectionChanged$.subscribe((S) => {
407
- var C;
408
- this.fireEvent(this.Event.SelectionChanged, {
409
- workbook: a,
410
- worksheet: a.getActiveSheet(),
411
- selections: (C = S == null ? void 0 : S.map((_) => _.range)) != null ? C : []
412
- });
413
- })
414
- )), s = null, this.disposeWithMe(l);
415
- })), this.disposeWithMe(r.disposed$.subscribe((h) => {
416
- var g;
417
- (g = o.get(h)) == null || g.dispose(), o.delete(h);
418
- })), this.disposeWithMe(() => {
419
- o.forEach((h) => {
420
- h.dispose();
421
- });
422
- });
399
+ ]), d = new T();
400
+ this.disposeWithMe(a.subscribe(([h, l]) => {
401
+ if (h.type === se.UNIVER_SHEET && (o = h), l <= O.Rendered || !o) return;
402
+ const g = this.getWorkbook(o.unitId);
403
+ if (!g) return;
404
+ d.dispose();
405
+ const c = o.with(y), n = o.with(Se);
406
+ d.add(
407
+ this.registerEventHandler(
408
+ this.Event.Scroll,
409
+ () => c.validViewportScrollInfo$.subscribe((s) => {
410
+ s && this.fireEvent(this.Event.Scroll, {
411
+ workbook: g,
412
+ worksheet: g.getActiveSheet(),
413
+ ...s
414
+ });
415
+ })
416
+ )
417
+ ), d.add(
418
+ this.registerEventHandler(
419
+ this.Event.SelectionMoveStart,
420
+ () => n.selectionMoveStart$.subscribe((s) => {
421
+ var m;
422
+ this.fireEvent(this.Event.SelectionMoveStart, {
423
+ workbook: g,
424
+ worksheet: g.getActiveSheet(),
425
+ selections: (m = s == null ? void 0 : s.map((I) => I.range)) != null ? m : []
426
+ });
427
+ })
428
+ )
429
+ ), d.add(
430
+ this.registerEventHandler(
431
+ this.Event.SelectionMoving,
432
+ () => n.selectionMoving$.subscribe((s) => {
433
+ var m;
434
+ this.fireEvent(this.Event.SelectionMoving, {
435
+ workbook: g,
436
+ worksheet: g.getActiveSheet(),
437
+ selections: (m = s == null ? void 0 : s.map((I) => I.range)) != null ? m : []
438
+ });
439
+ })
440
+ )
441
+ ), d.add(
442
+ this.registerEventHandler(
443
+ this.Event.SelectionMoveEnd,
444
+ () => n.selectionMoveEnd$.subscribe((s) => {
445
+ var m;
446
+ this.fireEvent(this.Event.SelectionMoveEnd, {
447
+ workbook: g,
448
+ worksheet: g.getActiveSheet(),
449
+ selections: (m = s == null ? void 0 : s.map((I) => I.range)) != null ? m : []
450
+ });
451
+ })
452
+ )
453
+ ), d.add(
454
+ this.registerEventHandler(
455
+ this.Event.SelectionChanged,
456
+ () => n.selectionChanged$.subscribe((s) => {
457
+ var m;
458
+ this.fireEvent(this.Event.SelectionChanged, {
459
+ workbook: g,
460
+ worksheet: g.getActiveSheet(),
461
+ selections: (m = s == null ? void 0 : s.map((I) => I.range)) != null ? m : []
462
+ });
463
+ })
464
+ )
465
+ ), o = null, this.disposeWithMe(d);
466
+ }));
423
467
  }
424
468
  /**
425
469
  * @ignore
426
470
  */
471
+ // eslint-disable-next-line max-lines-per-function
427
472
  _initialize(e) {
428
473
  this._initSheetUIEvent(e), this._initObserverListener(e);
429
- const r = e.get(R);
430
- this.registerEventHandler(
431
- this.Event.BeforeClipboardChange,
432
- () => r.beforeCommandExecuted((t) => {
433
- switch (t.id) {
434
- case Z.id:
435
- case V.id:
436
- this._beforeClipboardChange();
437
- break;
438
- }
439
- })
440
- ), this.registerEventHandler(
441
- this.Event.ClipboardChanged,
442
- () => r.onCommandExecuted((t) => {
443
- switch (t.id) {
444
- case Z.id:
445
- case V.id:
446
- this._clipboardChanged();
447
- break;
448
- }
449
- })
450
- ), this.registerEventHandler(
451
- this.Event.BeforeClipboardPaste,
452
- () => r.beforeCommandExecuted((t) => {
453
- switch (t.id) {
454
- case T.id:
455
- this._beforeClipboardPaste(t.params);
456
- break;
457
- case K.id:
458
- this._beforeClipboardPasteAsync();
459
- break;
460
- }
461
- })
462
- ), this.registerEventHandler(
463
- this.Event.ClipboardPasted,
464
- () => r.onCommandExecuted((t) => {
465
- switch (t.id) {
466
- case T.id:
467
- this._clipboardPaste(t.params);
468
- break;
469
- case K.id:
470
- this._clipboardPasteAsync();
471
- break;
472
- }
473
- })
474
- ), this.registerEventHandler(
475
- this.Event.SheetSkeletonChanged,
476
- () => r.onCommandExecuted((t) => {
477
- if (we.indexOf(t.id) > -1) {
478
- const i = this.getActiveSheet();
479
- if (!i) return;
480
- const o = Ee(t, i.worksheet.getMaxColumns()).map((s) => {
481
- var d, h;
482
- return (h = (d = this.getWorkbook(s.unitId)) == null ? void 0 : d.getSheetBySheetId(s.subUnitId)) == null ? void 0 : h.getRange(s.range);
483
- }).filter(Boolean);
484
- if (!o.length) return;
485
- this.fireEvent(this.Event.SheetSkeletonChanged, {
486
- workbook: i.workbook,
487
- worksheet: i.worksheet,
488
- payload: t,
489
- skeleton: i.worksheet.getSkeleton(),
490
- effectedRanges: o
491
- });
492
- }
493
- })
474
+ const r = e.get(_);
475
+ this.disposeWithMe(
476
+ this.registerEventHandler(
477
+ this.Event.BeforeClipboardChange,
478
+ () => r.beforeCommandExecuted((t) => {
479
+ switch (t.id) {
480
+ case N.id:
481
+ case L.id:
482
+ this._beforeClipboardChange();
483
+ break;
484
+ }
485
+ })
486
+ )
487
+ ), this.disposeWithMe(
488
+ this.registerEventHandler(
489
+ this.Event.ClipboardChanged,
490
+ () => r.onCommandExecuted((t) => {
491
+ switch (t.id) {
492
+ case N.id:
493
+ case L.id:
494
+ this._clipboardChanged();
495
+ break;
496
+ }
497
+ })
498
+ )
499
+ ), this.disposeWithMe(
500
+ this.registerEventHandler(
501
+ this.Event.BeforeClipboardPaste,
502
+ () => r.beforeCommandExecuted((t) => {
503
+ switch (t.id) {
504
+ case B.id:
505
+ this._beforeClipboardPaste(t.params);
506
+ break;
507
+ case V.id:
508
+ this._beforeClipboardPasteAsync();
509
+ break;
510
+ }
511
+ })
512
+ )
513
+ ), this.disposeWithMe(
514
+ this.registerEventHandler(
515
+ this.Event.ClipboardPasted,
516
+ () => r.onCommandExecuted((t) => {
517
+ switch (t.id) {
518
+ case B.id:
519
+ this._clipboardPaste(t.params);
520
+ break;
521
+ case V.id:
522
+ this._clipboardPasteAsync();
523
+ break;
524
+ }
525
+ })
526
+ )
527
+ ), this.disposeWithMe(
528
+ this.registerEventHandler(
529
+ this.Event.SheetSkeletonChanged,
530
+ () => r.onCommandExecuted((t) => {
531
+ if (me.indexOf(t.id) > -1) {
532
+ const i = this.getActiveSheet();
533
+ if (!i) return;
534
+ const o = Ce(t, i.worksheet.getMaxColumns()).map((a) => {
535
+ var d, h;
536
+ return (h = (d = this.getWorkbook(a.unitId)) == null ? void 0 : d.getSheetBySheetId(a.subUnitId)) == null ? void 0 : h.getRange(a.range);
537
+ }).filter(Boolean);
538
+ if (!o.length) return;
539
+ this.fireEvent(this.Event.SheetSkeletonChanged, {
540
+ workbook: i.workbook,
541
+ worksheet: i.worksheet,
542
+ payload: t,
543
+ skeleton: i.worksheet.getSkeleton(),
544
+ effectedRanges: o
545
+ });
546
+ }
547
+ })
548
+ )
494
549
  );
495
550
  }
496
551
  _generateClipboardCopyParam() {
497
552
  const e = this.getActiveWorkbook(), r = e == null ? void 0 : e.getActiveSheet(), t = e == null ? void 0 : e.getActiveRange();
498
553
  if (!e || !r || !t)
499
554
  return;
500
- const o = this._injector.get(te).generateCopyContent(e.getId(), r.getSheetId(), t.getRange());
555
+ const o = this._injector.get(Q).generateCopyContent(e.getId(), r.getSheetId(), t.getRange());
501
556
  if (!o)
502
557
  return;
503
- const { html: s, plain: d } = o;
558
+ const { html: a, plain: d } = o;
504
559
  return {
505
560
  workbook: e,
506
561
  worksheet: r,
507
562
  text: d,
508
- html: s,
563
+ html: a,
509
564
  fromSheet: r,
510
565
  fromRange: t
511
566
  };
@@ -513,7 +568,7 @@ class Te extends Q {
513
568
  _beforeClipboardChange() {
514
569
  const e = this._generateClipboardCopyParam();
515
570
  if (e && (this.fireEvent(this.Event.BeforeClipboardChange, e), e.cancel))
516
- throw new b();
571
+ throw new E();
517
572
  }
518
573
  _clipboardChanged() {
519
574
  const e = this._generateClipboardCopyParam();
@@ -534,56 +589,56 @@ class Te extends Q {
534
589
  const e = this.getActiveWorkbook(), r = e == null ? void 0 : e.getActiveSheet();
535
590
  if (!e || !r)
536
591
  return;
537
- const o = (await this._injector.get(Ue).read())[0];
538
- let s;
592
+ const o = (await this._injector.get(He).read())[0];
593
+ let a;
539
594
  if (o) {
540
- const d = o.types, h = d.indexOf(Y) !== -1 ? await o.getType(Y).then((l) => l && l.text()) : "", g = d.indexOf(X) !== -1 ? await o.getType(X).then((l) => l && l.text()) : "";
541
- s = {
595
+ const d = o.types, h = d.indexOf(Z) !== -1 ? await o.getType(Z).then((g) => g && g.text()) : "", l = d.indexOf(K) !== -1 ? await o.getType(K).then((g) => g && g.text()) : "";
596
+ a = {
542
597
  workbook: e,
543
598
  worksheet: r,
544
599
  text: h,
545
- html: g
600
+ html: l
546
601
  };
547
602
  }
548
- return s;
603
+ return a;
549
604
  }
550
605
  _beforeClipboardPaste(e) {
551
606
  const r = this._generateClipboardPasteParam(e);
552
607
  if (r && (this.fireEvent(this.Event.BeforeClipboardPaste, r), r.cancel))
553
- throw new b();
608
+ throw new E();
554
609
  }
555
610
  _clipboardPaste(e) {
556
611
  const r = this._generateClipboardPasteParam(e);
557
612
  if (r && (this.fireEvent(this.Event.ClipboardPasted, r), r.cancel))
558
- throw new b();
613
+ throw new E();
559
614
  }
560
615
  async _beforeClipboardPasteAsync() {
561
- if (!J()) {
562
- this._injector.get(U).warn("[Facade]: The navigator object only supports the browser environment");
616
+ if (!Y()) {
617
+ this._injector.get(H).warn("[Facade]: The navigator object only supports the browser environment");
563
618
  return;
564
619
  }
565
620
  const e = await this._generateClipboardPasteParamAsync();
566
621
  if (e && (this.fireEvent(this.Event.BeforeClipboardPaste, e), e.cancel))
567
- throw new b();
622
+ throw new E();
568
623
  }
569
624
  async _clipboardPasteAsync() {
570
- if (!J()) {
571
- this._injector.get(U).warn("[Facade]: The navigator object only supports the browser environment");
625
+ if (!Y()) {
626
+ this._injector.get(H).warn("[Facade]: The navigator object only supports the browser environment");
572
627
  return;
573
628
  }
574
629
  const e = await this._generateClipboardPasteParamAsync();
575
630
  if (e && (this.fireEvent(this.Event.ClipboardPasted, e), e.cancel))
576
- throw new b();
631
+ throw new E();
577
632
  }
578
633
  customizeColumnHeader(e) {
579
- var g, l;
634
+ var l, g;
580
635
  const r = this.getActiveWorkbook();
581
636
  if (!r) {
582
637
  console.error("WorkBook not exist");
583
638
  return;
584
639
  }
585
- const t = r == null ? void 0 : r.getId(), i = this._injector.get(v), o = r.getActiveSheet(), s = o.getSheetId(), d = i.getRenderById(t);
586
- d && ((g = e.headerStyle) != null && g.size) && (d.with(p).setColumnHeaderSize(d, s, (l = e.headerStyle) == null ? void 0 : l.size), o == null || o.refreshCanvas()), this._getSheetRenderComponent(t, E.COLUMN).setCustomHeader(e), o == null || o.refreshCanvas();
640
+ const t = r == null ? void 0 : r.getId(), i = this._injector.get(v), o = r.getActiveSheet(), a = o.getSheetId(), d = i.getRenderById(t);
641
+ d && ((l = e.headerStyle) != null && l.size) && (d.with(b).setColumnHeaderSize(d, a, (g = e.headerStyle) == null ? void 0 : g.size), o == null || o.refreshCanvas()), this._getSheetRenderComponent(t, w.COLUMN).setCustomHeader(e), o == null || o.refreshCanvas();
587
642
  }
588
643
  customizeRowHeader(e) {
589
644
  const r = this.getActiveWorkbook();
@@ -592,23 +647,23 @@ class Te extends Q {
592
647
  return;
593
648
  }
594
649
  const t = r == null ? void 0 : r.getId();
595
- this._getSheetRenderComponent(t, E.ROW).setCustomHeader(e);
650
+ this._getSheetRenderComponent(t, w.ROW).setCustomHeader(e);
596
651
  }
597
652
  registerSheetRowHeaderExtension(e, ...r) {
598
- const t = this._getSheetRenderComponent(e, E.ROW), i = t.register(...r);
599
- return m(() => {
653
+ const t = this._getSheetRenderComponent(e, w.ROW), i = t.register(...r);
654
+ return S(() => {
600
655
  i.dispose(), t.makeDirty(!0);
601
656
  });
602
657
  }
603
658
  registerSheetColumnHeaderExtension(e, ...r) {
604
- const t = this._getSheetRenderComponent(e, E.COLUMN), i = t.register(...r);
605
- return m(() => {
659
+ const t = this._getSheetRenderComponent(e, w.COLUMN), i = t.register(...r);
660
+ return S(() => {
606
661
  i.dispose(), t.makeDirty(!0);
607
662
  });
608
663
  }
609
664
  registerSheetMainExtension(e, ...r) {
610
- const t = this._getSheetRenderComponent(e, E.MAIN), i = t.register(...r);
611
- return m(() => {
665
+ const t = this._getSheetRenderComponent(e, w.MAIN), i = t.register(...r);
666
+ return S(() => {
612
667
  i.dispose(), t.makeDirty(!0);
613
668
  });
614
669
  }
@@ -623,42 +678,42 @@ class Te extends Q {
623
678
  const i = this._injector.get(v).getRenderById(e);
624
679
  if (!i)
625
680
  throw new Error(`Render Unit with unitId ${e} not found`);
626
- const { components: o } = i, s = o.get(r);
627
- if (!s)
681
+ const { components: o } = i, a = o.get(r);
682
+ if (!a)
628
683
  throw new Error("Render component not found");
629
- return s;
684
+ return a;
630
685
  }
631
686
  /**
632
687
  * Get sheet hooks.
633
688
  * @returns {FSheetHooks} FSheetHooks instance
634
689
  */
635
690
  getSheetHooks() {
636
- return this._injector.createInstance(W);
691
+ return this._injector.createInstance(j);
637
692
  }
638
693
  pasteIntoSheet(e, r, t) {
639
- return this._commandService.executeCommand(T.id, { htmlContent: e, textContent: r, files: t });
694
+ return this._commandService.executeCommand(B.id, { htmlContent: e, textContent: r, files: t });
640
695
  }
641
696
  setProtectedRangeShadowStrategy(e) {
642
- this._injector.get(A).setProtectedRangeShadowStrategy(e);
697
+ this._injector.get(D).setProtectedRangeShadowStrategy(e);
643
698
  }
644
699
  getProtectedRangeShadowStrategy() {
645
- return this._injector.get(A).getProtectedRangeShadowStrategy();
700
+ return this._injector.get(D).getProtectedRangeShadowStrategy();
646
701
  }
647
702
  getProtectedRangeShadowStrategy$() {
648
- return this._injector.get(A).getProtectedRangeShadowStrategy$();
703
+ return this._injector.get(D).getProtectedRangeShadowStrategy$();
649
704
  }
650
705
  setPermissionDialogVisible(e) {
651
- this._injector.get(de).setShowComponents(e);
706
+ this._injector.get(ae).setShowComponents(e);
652
707
  }
653
708
  }
654
- Q.extend(Te);
655
- class Ae extends ne {
709
+ G.extend(Be);
710
+ class De extends te {
656
711
  openSiderbar(e) {
657
- return this._logDeprecation("openSiderbar"), this._injector.get(xe).open(e);
712
+ return this._logDeprecation("openSiderbar"), this._injector.get(ye).open(e);
658
713
  }
659
714
  openDialog(e) {
660
715
  this._logDeprecation("openDialog");
661
- const t = this._injector.get(Be).open({
716
+ const t = this._injector.get(Ue).open({
662
717
  ...e,
663
718
  onClose: () => {
664
719
  t.dispose();
@@ -668,11 +723,11 @@ class Ae extends ne {
668
723
  }
669
724
  customizeColumnHeader(e) {
670
725
  const r = this._workbook.getUnitId();
671
- this._getSheetRenderComponent(r, E.COLUMN).setCustomHeader(e);
726
+ this._getSheetRenderComponent(r, w.COLUMN).setCustomHeader(e);
672
727
  }
673
728
  customizeRowHeader(e) {
674
729
  const r = this._workbook.getUnitId();
675
- this._getSheetRenderComponent(r, E.ROW).setCustomHeader(e);
730
+ this._getSheetRenderComponent(r, w.ROW).setCustomHeader(e);
676
731
  }
677
732
  /**
678
733
  * Get sheet render component from render by unitId and view key.
@@ -685,13 +740,13 @@ class Ae extends ne {
685
740
  const i = this._injector.get(v).getRenderById(e);
686
741
  if (!i)
687
742
  throw new Error(`Render Unit with unitId ${e} not found`);
688
- const { components: o } = i, s = o.get(r);
689
- if (!s)
743
+ const { components: o } = i, a = o.get(r);
744
+ if (!a)
690
745
  throw new Error("Render component not found");
691
- return s;
746
+ return a;
692
747
  }
693
748
  _logDeprecation(e) {
694
- this._injector.get(U).warn("[FWorkbook]", `${e} is deprecated. Please use the function of the same name on "FUniver".`);
749
+ this._injector.get(H).warn("[FWorkbook]", `${e} is deprecated. Please use the function of the same name on "FUniver".`);
695
750
  }
696
751
  generateCellParams(e) {
697
752
  const r = this.getActiveSheet();
@@ -703,71 +758,71 @@ class Ae extends ne {
703
758
  };
704
759
  }
705
760
  onCellClick(e) {
706
- const r = this._injector.get(k);
707
- return m(
761
+ const r = this._injector.get(f);
762
+ return S(
708
763
  r.currentClickedCell$.pipe(u((t) => !!t)).subscribe((t) => {
709
764
  e(t);
710
765
  })
711
766
  );
712
767
  }
713
768
  onCellHover(e) {
714
- const r = this._injector.get(k);
715
- return m(
769
+ const r = this._injector.get(f);
770
+ return S(
716
771
  r.currentRichText$.pipe(u((t) => !!t)).subscribe(e)
717
772
  );
718
773
  }
719
774
  onCellPointerDown(e) {
720
- const r = this._injector.get(k);
721
- return m(
775
+ const r = this._injector.get(f);
776
+ return S(
722
777
  r.currentPointerDownCell$.subscribe(e)
723
778
  );
724
779
  }
725
780
  onCellPointerUp(e) {
726
- const r = this._injector.get(k);
727
- return m(
781
+ const r = this._injector.get(f);
782
+ return S(
728
783
  r.currentPointerUpCell$.subscribe(e)
729
784
  );
730
785
  }
731
786
  onCellPointerMove(e) {
732
- const r = this._injector.get(k);
733
- return m(
787
+ const r = this._injector.get(f);
788
+ return S(
734
789
  r.currentCellPosWithEvent$.pipe(u((t) => !!t)).subscribe((t) => {
735
790
  e(t, t.event);
736
791
  })
737
792
  );
738
793
  }
739
794
  onDragOver(e) {
740
- const r = this._injector.get(M);
741
- return m(
795
+ const r = this._injector.get(P);
796
+ return S(
742
797
  r.currentCell$.pipe(u((t) => !!t)).subscribe((t) => {
743
798
  e(t);
744
799
  })
745
800
  );
746
801
  }
747
802
  onDrop(e) {
748
- const r = this._injector.get(M);
749
- return m(
803
+ const r = this._injector.get(P);
804
+ return S(
750
805
  r.endCell$.pipe(u((t) => !!t)).subscribe((t) => {
751
806
  e(t);
752
807
  })
753
808
  );
754
809
  }
755
810
  startEditing() {
756
- const e = this._injector.get(R);
757
- return this._injector.get(f).isVisible().visible ? !0 : e.syncExecuteCommand(I.id, {
758
- eventType: L.Dblclick,
811
+ const e = this._injector.get(_);
812
+ return this._injector.get(p).isVisible().visible ? !0 : e.syncExecuteCommand(k.id, {
813
+ eventType: F.Dblclick,
759
814
  unitId: this._workbook.getUnitId(),
760
815
  visible: !0
761
816
  });
762
817
  }
763
818
  async endEditing(e) {
764
- const r = this._injector.get(R);
765
- return this._injector.get(f).isVisible().visible && r.syncExecuteCommand(I.id, {
766
- eventType: L.Keyboard,
767
- keycode: e ? B.ENTER : B.ESC,
819
+ const r = this._injector.get(_);
820
+ return this._injector.get(p).isVisible().visible && r.syncExecuteCommand(k.id, {
821
+ eventType: F.Keyboard,
822
+ keycode: e ? U.ENTER : U.ESC,
768
823
  visible: !1,
769
824
  unitId: this._workbook.getUnitId()
770
- }), await he(0), !0;
825
+ }), await ce(0), !0;
771
826
  }
772
827
  endEditingAsync(e = !0) {
773
828
  return this.endEditing(e);
@@ -776,7 +831,7 @@ class Ae extends ne {
776
831
  return this.endEditingAsync(!1);
777
832
  }
778
833
  isCellEditing() {
779
- return this._injector.get(f).isVisible().visible;
834
+ return this._injector.get(p).isVisible().visible;
780
835
  }
781
836
  /**
782
837
  * Get scroll state of specified sheet.
@@ -789,54 +844,54 @@ class Ae extends ne {
789
844
  */
790
845
  getScrollStateBySheetId(e) {
791
846
  const r = this._workbook.getUnitId(), i = this._injector.get(v).getRenderById(r);
792
- return i ? i.with(x).getScrollStateByParam({ unitId: r, sheetId: e }) : null;
847
+ return i ? i.with(y).getScrollStateByParam({ unitId: r, sheetId: e }) : null;
793
848
  }
794
849
  disableSelection() {
795
850
  const e = this._workbook.getUnitId(), t = this._injector.get(v).getRenderById(e);
796
- return t && t.with(y).disableSelection(), this;
851
+ return t && t.with(M).disableSelection(), this;
797
852
  }
798
853
  enableSelection() {
799
854
  const e = this._workbook.getUnitId(), t = this._injector.get(v).getRenderById(e);
800
- return t && t.with(y).enableSelection(), this;
855
+ return t && t.with(M).enableSelection(), this;
801
856
  }
802
857
  transparentSelection() {
803
858
  const e = this._workbook.getUnitId(), t = this._injector.get(v).getRenderById(e);
804
- return t && t.with(y).transparentSelection(), this;
859
+ return t && t.with(M).transparentSelection(), this;
805
860
  }
806
861
  showSelection() {
807
862
  const e = this._workbook.getUnitId(), t = this._injector.get(v).getRenderById(e);
808
- return t && t.with(y).showSelection(), this;
863
+ return t && t.with(M).showSelection(), this;
809
864
  }
810
865
  }
811
- ne.extend(Ae);
812
- class je extends ie {
866
+ te.extend(De);
867
+ class Te extends re {
813
868
  refreshCanvas() {
814
869
  const e = this._injector.get(v), r = this._fWorkbook.id, t = e.getRenderById(r);
815
870
  if (!t)
816
871
  throw new Error(`Render Unit with unitId ${r} not found`);
817
- t.with(p).reCalculate();
872
+ t.with(b).reCalculate();
818
873
  const i = t.mainComponent;
819
874
  if (!i)
820
875
  throw new Error("Main component not found");
821
876
  return i.makeDirty(), this;
822
877
  }
823
878
  highlightRanges(e, r, t) {
824
- const i = this._injector.get(re), o = [];
825
- for (const s of e) {
826
- const d = s.getRange(), h = i.addShapeWithNoFresh({ range: d, style: r, primary: t });
879
+ const i = this._injector.get(ee), o = [];
880
+ for (const a of e) {
881
+ const d = a.getRange(), h = i.addShapeWithNoFresh({ range: d, style: r, primary: t });
827
882
  h && o.push(h);
828
883
  }
829
884
  if (i.refreshShapes(), o.length === 0)
830
885
  throw new Error("Failed to highlight current range");
831
- return m(() => {
832
- o.forEach((s) => {
833
- i.removeShape(s);
886
+ return S(() => {
887
+ o.forEach((a) => {
888
+ i.removeShape(a);
834
889
  });
835
890
  });
836
891
  }
837
892
  zoom(e) {
838
- const r = this._injector.get(R), t = Math.min(Math.max(e, 0.1), 4);
839
- return r.executeCommand($.id, {
893
+ const r = this._injector.get(_), t = Math.min(Math.max(e, 0.1), 4);
894
+ return r.executeCommand(A.id, {
840
895
  unitId: this._workbook.getUnitId(),
841
896
  subUnitId: this._worksheet.getSheetId(),
842
897
  zoomRatio: t
@@ -848,18 +903,18 @@ class je extends ie {
848
903
  getVisibleRange() {
849
904
  const e = this._workbook.getUnitId(), t = this._injector.get(v).getRenderById(e);
850
905
  if (!t) return null;
851
- const o = t.with(p).getCurrentSkeleton();
852
- return o ? o.getVisibleRangeByViewport(ee.VIEW_MAIN) : null;
906
+ const o = t.with(b).getCurrentSkeleton();
907
+ return o ? o.getVisibleRangeByViewport(q.VIEW_MAIN) : null;
853
908
  }
854
909
  getVisibleRangesOfAllViewports() {
855
910
  const e = this._workbook.getUnitId(), t = this._injector.get(v).getRenderById(e);
856
911
  if (!t) return null;
857
- const o = t.with(p).getCurrentSkeleton();
912
+ const o = t.with(b).getCurrentSkeleton();
858
913
  return o ? o.getVisibleRanges() : null;
859
914
  }
860
915
  scrollToCell(e, r, t) {
861
- const i = this._workbook.getUnitId(), s = this._injector.get(v).getRenderById(i);
862
- return s && (s == null ? void 0 : s.with(Ie)).scrollToCell(e, r, t), this;
916
+ const i = this._workbook.getUnitId(), a = this._injector.get(v).getRenderById(i);
917
+ return a && (a == null ? void 0 : a.with(fe)).scrollToCell(e, r, t), this;
863
918
  }
864
919
  getScrollState() {
865
920
  const e = {
@@ -868,23 +923,23 @@ class je extends ie {
868
923
  sheetViewStartColumn: 0,
869
924
  sheetViewStartRow: 0
870
925
  }, r = this._workbook.getUnitId(), t = this._worksheet.getSheetId(), o = this._injector.get(v).getRenderById(r);
871
- return o && o.with(x).getScrollStateByParam({ unitId: r, sheetId: t }) || e;
926
+ return o && o.with(y).getScrollStateByParam({ unitId: r, sheetId: t }) || e;
872
927
  }
873
928
  onScroll(e) {
874
929
  var o;
875
- const r = this._workbook.getUnitId(), i = (o = this._injector.get(v).getRenderById(r)) == null ? void 0 : o.with(x);
930
+ const r = this._workbook.getUnitId(), i = (o = this._injector.get(v).getRenderById(r)) == null ? void 0 : o.with(y);
876
931
  if (i) {
877
- const s = i.validViewportScrollInfo$.subscribe((d) => {
932
+ const a = i.validViewportScrollInfo$.subscribe((d) => {
878
933
  e(d);
879
934
  });
880
- return m(s);
935
+ return S(a);
881
936
  }
882
- return m(() => {
937
+ return S(() => {
883
938
  });
884
939
  }
885
940
  getSkeleton() {
886
941
  var r, t;
887
- const e = (r = this._injector.get(v).getRenderById(this._workbook.getUnitId())) == null ? void 0 : r.with(p);
942
+ const e = (r = this._injector.get(v).getRenderById(this._workbook.getUnitId())) == null ? void 0 : r.with(b);
888
943
  return (t = e == null ? void 0 : e.getWorksheetSkeleton(this._worksheet.getSheetId())) == null ? void 0 : t.skeleton;
889
944
  }
890
945
  autoResizeColumn(e) {
@@ -899,7 +954,7 @@ class je extends ie {
899
954
  endRow: this._worksheet.getRowCount() - 1
900
955
  }
901
956
  ];
902
- return this._commandService.syncExecuteCommand(_e.id, {
957
+ return this._commandService.syncExecuteCommand(ke.id, {
903
958
  unitId: t,
904
959
  subUnitId: i,
905
960
  ranges: o
@@ -917,7 +972,7 @@ class je extends ie {
917
972
  endColumn: this._worksheet.getColumnCount() - 1
918
973
  }
919
974
  ];
920
- return this._commandService.syncExecuteCommand(be.id, {
975
+ return this._commandService.syncExecuteCommand(we.id, {
921
976
  unitId: t,
922
977
  subUnitId: i,
923
978
  ranges: o
@@ -926,16 +981,16 @@ class je extends ie {
926
981
  customizeColumnHeader(e) {
927
982
  var d, h;
928
983
  const r = this._workbook.getUnitId(), t = this._worksheet.getSheetId(), o = this._injector.get(v).getRenderById(r);
929
- o && ((d = e.headerStyle) != null && d.size) && o.with(p).setColumnHeaderSize(o, t, (h = e.headerStyle) == null ? void 0 : h.size), this._getSheetRenderComponent(r, E.COLUMN).setCustomHeader(e, t);
984
+ o && ((d = e.headerStyle) != null && d.size) && o.with(b).setColumnHeaderSize(o, t, (h = e.headerStyle) == null ? void 0 : h.size), this._getSheetRenderComponent(r, w.COLUMN).setCustomHeader(e, t);
930
985
  }
931
986
  customizeRowHeader(e) {
932
987
  var d, h;
933
988
  const r = this._workbook.getUnitId(), t = this._worksheet.getSheetId(), o = this._injector.get(v).getRenderById(r);
934
- o && ((d = e.headerStyle) != null && d.size) && o.with(p).setRowHeaderSize(o, t, (h = e.headerStyle) == null ? void 0 : h.size), this._getSheetRenderComponent(r, E.ROW).setCustomHeader(e, t);
989
+ o && ((d = e.headerStyle) != null && d.size) && o.with(b).setRowHeaderSize(o, t, (h = e.headerStyle) == null ? void 0 : h.size), this._getSheetRenderComponent(r, w.ROW).setCustomHeader(e, t);
935
990
  }
936
991
  setColumnHeaderHeight(e) {
937
992
  const r = this._workbook.getUnitId(), t = this._worksheet.getSheetId();
938
- return this._commandService.executeCommand(Re.id, {
993
+ return this._commandService.executeCommand(Ie.id, {
939
994
  unitId: r,
940
995
  subUnitId: t,
941
996
  size: e
@@ -943,7 +998,7 @@ class je extends ie {
943
998
  }
944
999
  setRowHeaderWidth(e) {
945
1000
  const r = this._workbook.getUnitId(), t = this._worksheet.getSheetId();
946
- return this._commandService.executeCommand(Pe.id, {
1001
+ return this._commandService.executeCommand(_e.id, {
947
1002
  unitId: r,
948
1003
  subUnitId: t,
949
1004
  size: e
@@ -960,61 +1015,61 @@ class je extends ie {
960
1015
  const i = this._injector.get(v).getRenderById(e);
961
1016
  if (!i)
962
1017
  throw new Error(`Render Unit with unitId ${e} not found`);
963
- const { components: o } = i, s = o.get(r);
964
- if (!s)
1018
+ const { components: o } = i, a = o.get(r);
1019
+ if (!a)
965
1020
  throw new Error("Render component not found");
966
- return s;
1021
+ return a;
967
1022
  }
968
1023
  }
969
- ie.extend(je);
970
- class $e extends oe {
1024
+ re.extend(Te);
1025
+ class Ae extends ne {
971
1026
  setPermissionDialogVisible(e) {
972
1027
  this._permissionService.setShowComponents(e);
973
1028
  }
974
1029
  }
975
- oe.extend($e);
976
- class We extends W {
1030
+ ne.extend(Ae);
1031
+ class je extends j {
977
1032
  onCellPointerMove(e) {
978
- return m(this._injector.get(k).currentPosition$.subscribe(e));
1033
+ return S(this._injector.get(f).currentPosition$.subscribe(e));
979
1034
  }
980
1035
  onCellPointerOver(e) {
981
- return m(this._injector.get(k).currentCell$.subscribe(e));
1036
+ return S(this._injector.get(f).currentCell$.subscribe(e));
982
1037
  }
983
1038
  onCellDragOver(e) {
984
- return m(this._injector.get(M).currentCell$.subscribe(e));
1039
+ return S(this._injector.get(P).currentCell$.subscribe(e));
985
1040
  }
986
1041
  onCellDrop(e) {
987
- return m(this._injector.get(M).endCell$.subscribe(e));
1042
+ return S(this._injector.get(P).endCell$.subscribe(e));
988
1043
  }
989
- onCellRender(e, r = ge.Style, t = pe.DATA_VALIDATION) {
990
- return this._injector.get(fe).intercept(ke.CELL_CONTENT, {
1044
+ onCellRender(e, r = de.Style, t = Ee.DATA_VALIDATION) {
1045
+ return this._injector.get(be).intercept(pe.CELL_CONTENT, {
991
1046
  effect: r,
992
- handler: (i, o, s) => (i && !i.customRender && e && (i.customRender = [...e]), s(i)),
1047
+ handler: (i, o, a) => (i && !i.customRender && e && (i.customRender = [...e]), a(i)),
993
1048
  priority: t
994
1049
  });
995
1050
  }
996
1051
  onBeforeCellEdit(e) {
997
- return this._injector.get(R).beforeCommandExecuted((r) => {
1052
+ return this._injector.get(_).beforeCommandExecuted((r) => {
998
1053
  const t = r.params;
999
- r.id === I.id && t.visible && e(t);
1054
+ r.id === k.id && t.visible && e(t);
1000
1055
  });
1001
1056
  }
1002
1057
  onAfterCellEdit(e) {
1003
- return this._injector.get(R).onCommandExecuted((r) => {
1058
+ return this._injector.get(_).onCommandExecuted((r) => {
1004
1059
  const t = r.params;
1005
- r.id === I.id && !t.visible && e(t);
1060
+ r.id === k.id && !t.visible && e(t);
1006
1061
  });
1007
1062
  }
1008
1063
  }
1009
- W.extend(We);
1010
- const H = {
1064
+ j.extend(je);
1065
+ const R = {
1011
1066
  CellClicked: "CellClicked",
1012
1067
  CellPointerDown: "CellPointerDown",
1013
1068
  CellPointerUp: "CellPointerUp",
1014
1069
  CellPointerMove: "CellPointerMove",
1015
1070
  CellHover: "CellHover"
1016
1071
  };
1017
- class Oe {
1072
+ class We {
1018
1073
  get BeforeClipboardChange() {
1019
1074
  return "BeforeClipboardChange";
1020
1075
  }
@@ -1043,19 +1098,19 @@ class Oe {
1043
1098
  return "SheetEditEnded";
1044
1099
  }
1045
1100
  get CellClicked() {
1046
- return H.CellClicked;
1101
+ return R.CellClicked;
1047
1102
  }
1048
1103
  get CellHover() {
1049
- return H.CellHover;
1104
+ return R.CellHover;
1050
1105
  }
1051
1106
  get CellPointerDown() {
1052
- return H.CellPointerDown;
1107
+ return R.CellPointerDown;
1053
1108
  }
1054
1109
  get CellPointerUp() {
1055
- return H.CellPointerUp;
1110
+ return R.CellPointerUp;
1056
1111
  }
1057
1112
  get CellPointerMove() {
1058
- return H.CellPointerMove;
1113
+ return R.CellPointerMove;
1059
1114
  }
1060
1115
  get DragOver() {
1061
1116
  return "DragOver";
@@ -1112,20 +1167,20 @@ class Oe {
1112
1167
  return "SheetZoomChanged";
1113
1168
  }
1114
1169
  }
1115
- ve.extend(Oe);
1116
- class Fe {
1170
+ le.extend(We);
1171
+ class $e {
1117
1172
  get SHEET_VIEWPORT_KEY() {
1118
- return ee;
1173
+ return q;
1119
1174
  }
1120
1175
  }
1121
- Se.extend(Fe);
1122
- class ze extends se {
1176
+ ue.extend($e);
1177
+ class Oe extends ie {
1123
1178
  getCell() {
1124
1179
  var d;
1125
- const e = this._injector.get(v), r = this._injector.get(U), t = this._workbook.getUnitId(), i = this._worksheet.getSheetId(), o = e.getRenderById(t), s = (d = o == null ? void 0 : o.with(p).getSkeletonParam(i)) == null ? void 0 : d.skeleton;
1126
- if (!s)
1180
+ const e = this._injector.get(v), r = this._injector.get(H), t = this._workbook.getUnitId(), i = this._worksheet.getSheetId(), o = e.getRenderById(t), a = (d = o == null ? void 0 : o.with(b).getSkeletonParam(i)) == null ? void 0 : d.skeleton;
1181
+ if (!a)
1127
1182
  throw r.error("[Facade]: `FRange.getCell` can only be called in current worksheet"), new Error("`FRange.getCell` can only be called in current worksheet");
1128
- return s.getCellWithCoordByIndex(this._range.startRow, this._range.startColumn);
1183
+ return a.getCellWithCoordByIndex(this._range.startRow, this._range.startColumn);
1129
1184
  }
1130
1185
  getCellRect() {
1131
1186
  const { startX: e, startY: r, endX: t, endY: i } = this.getCell(), o = { x: e, y: r, width: t - e, height: i - r, top: r, left: e, bottom: i, right: t };
@@ -1133,7 +1188,7 @@ class ze extends se {
1133
1188
  }
1134
1189
  generateHTML() {
1135
1190
  var t;
1136
- const r = this._injector.get(te).generateCopyContent(
1191
+ const r = this._injector.get(Q).generateCopyContent(
1137
1192
  this._workbook.getUnitId(),
1138
1193
  this._worksheet.getSheetId(),
1139
1194
  this._range
@@ -1141,9 +1196,9 @@ class ze extends se {
1141
1196
  return (t = r == null ? void 0 : r.html) != null ? t : "";
1142
1197
  }
1143
1198
  attachPopup(e) {
1144
- var s, d, h;
1145
- e.direction = (s = e.direction) != null ? s : "horizontal", e.extraProps = (d = e.extraProps) != null ? d : {}, e.offset = (h = e.offset) != null ? h : [0, 0];
1146
- const { key: r, disposableCollection: t } = q(e, this._injector.get(G)), o = this._injector.get(N).attachPopupToCell(
1199
+ var a, d, h;
1200
+ e.direction = (a = e.direction) != null ? a : "horizontal", e.extraProps = (d = e.extraProps) != null ? d : {}, e.offset = (h = e.offset) != null ? h : [0, 0];
1201
+ const { key: r, disposableCollection: t } = J(e, this._injector.get(X)), o = this._injector.get(z).attachPopupToCell(
1147
1202
  this._range.startRow,
1148
1203
  this._range.startColumn,
1149
1204
  { ...e, componentKey: r },
@@ -1153,7 +1208,7 @@ class ze extends se {
1153
1208
  return o ? (t.add(o), t) : (t.dispose(), null);
1154
1209
  }
1155
1210
  attachAlertPopup(e) {
1156
- const r = this._injector.get(He), t = {
1211
+ const r = this._injector.get(Re), t = {
1157
1212
  workbook: this._workbook,
1158
1213
  worksheet: this._worksheet,
1159
1214
  row: this._range.startRow,
@@ -1183,9 +1238,9 @@ class ze extends se {
1183
1238
  });
1184
1239
  */
1185
1240
  attachRangePopup(e) {
1186
- var s, d, h;
1187
- e.direction = (s = e.direction) != null ? s : "top-center", e.extraProps = (d = e.extraProps) != null ? d : {}, e.offset = (h = e.offset) != null ? h : [0, 0];
1188
- const { key: r, disposableCollection: t } = q(e, this._injector.get(G)), o = this._injector.get(N).attachRangePopup(
1241
+ var a, d, h;
1242
+ e.direction = (a = e.direction) != null ? a : "top-center", e.extraProps = (d = e.extraProps) != null ? d : {}, e.offset = (h = e.offset) != null ? h : [0, 0];
1243
+ const { key: r, disposableCollection: t } = J(e, this._injector.get(X)), o = this._injector.get(z).attachRangePopup(
1189
1244
  this._range,
1190
1245
  { ...e, componentKey: r },
1191
1246
  this.getUnitId(),
@@ -1194,28 +1249,28 @@ class ze extends se {
1194
1249
  return o ? (t.add(o), t) : (t.dispose(), null);
1195
1250
  }
1196
1251
  highlight(e, r) {
1197
- const t = this._injector.get(re), i = t.addShape({ range: this._range, style: e, primary: r });
1252
+ const t = this._injector.get(ee), i = t.addShape({ range: this._range, style: e, primary: r });
1198
1253
  if (!i)
1199
1254
  throw new Error("Failed to highlight current range");
1200
- return m(() => {
1255
+ return S(() => {
1201
1256
  t.removeShape(i);
1202
1257
  });
1203
1258
  }
1204
1259
  showDropdown(e) {
1205
- return this._injector.get(Me).showDropdown(e);
1260
+ return this._injector.get(Pe).showDropdown(e);
1206
1261
  }
1207
1262
  async autoFill(e, r) {
1208
1263
  const t = this.getRange(), i = e.getRange();
1209
- if (!le.contains(i, t))
1264
+ if (!he.contains(i, t))
1210
1265
  throw new Error("AutoFill target range must contain source range");
1211
- const { startRow: o, startColumn: s, endRow: d, endColumn: h } = t, { startRow: g, startColumn: l, endRow: a, endColumn: n } = i;
1212
- if (d - o !== a - g && h - s !== n - l)
1266
+ const { startRow: o, startColumn: a, endRow: d, endColumn: h } = t, { startRow: l, startColumn: g, endRow: c, endColumn: n } = i;
1267
+ if (d - o !== c - l && h - a !== n - g)
1213
1268
  throw new Error("AutoFill can only fill in one direction");
1214
- if (d - o === a - g && s !== l && h !== n)
1269
+ if (d - o === c - l && a !== g && h !== n)
1215
1270
  throw new Error("AutoFill can only fill in one direction");
1216
- if (h - s === n - l && o !== g && d !== a)
1271
+ if (h - a === n - g && o !== l && d !== c)
1217
1272
  throw new Error("AutoFill can only fill in one direction");
1218
- return this._commandService.executeCommand(ye.id, {
1273
+ return this._commandService.executeCommand(Me.id, {
1219
1274
  sourceRange: t,
1220
1275
  targetRange: i,
1221
1276
  unitId: this.getUnitId(),
@@ -1224,17 +1279,17 @@ class ze extends se {
1224
1279
  });
1225
1280
  }
1226
1281
  }
1227
- se.extend(ze);
1228
- function q(w, e) {
1229
- const { componentKey: r, isVue3: t } = w;
1282
+ ie.extend(Oe);
1283
+ function J(C, e) {
1284
+ const { componentKey: r, isVue3: t } = C;
1230
1285
  let i;
1231
- const o = new j();
1232
- return typeof r == "string" ? i = r : (i = `External_${ue(6)}`, o.add(e.register(i, r, { framework: t ? "vue3" : "react" }))), {
1286
+ const o = new T();
1287
+ return typeof r == "string" ? i = r : (i = `External_${ge(6)}`, o.add(e.register(i, r, { framework: t ? "vue3" : "react" }))), {
1233
1288
  key: i,
1234
1289
  disposableCollection: o
1235
1290
  };
1236
1291
  }
1237
1292
  export {
1238
- Fe as FSheetsUIEnum,
1239
- q as transformComponentKey
1293
+ $e as FSheetsUIEnum,
1294
+ J as transformComponentKey
1240
1295
  };