@univerjs/sheets-ui 0.5.5 → 0.6.0-experimental.20250125-1d060b9

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 (107) hide show
  1. package/lib/cjs/facade.js +1 -1
  2. package/lib/cjs/index.js +30 -34
  3. package/lib/es/facade.js +374 -322
  4. package/lib/es/index.js +11136 -10953
  5. package/lib/index.css +1 -1
  6. package/lib/types/commands/commands/clipboard.command.d.ts +1 -0
  7. package/lib/types/commands/commands/headersize-changed.command.d.ts +8 -0
  8. package/lib/types/components/border-panel/BorderPanel.d.ts +1 -2
  9. package/lib/types/components/border-panel/border-line/BorderLine.d.ts +1 -2
  10. package/lib/types/components/border-panel/border-line/icons/BorderDashDot.d.ts +16 -2
  11. package/lib/types/components/border-panel/border-line/icons/BorderDashDotDot.d.ts +16 -2
  12. package/lib/types/components/border-panel/border-line/icons/BorderDashed.d.ts +16 -2
  13. package/lib/types/components/border-panel/border-line/icons/BorderDotted.d.ts +16 -2
  14. package/lib/types/components/border-panel/border-line/icons/BorderHair.d.ts +16 -2
  15. package/lib/types/components/border-panel/border-line/icons/BorderMedium.d.ts +16 -2
  16. package/lib/types/components/border-panel/border-line/icons/BorderMediumDashDot.d.ts +16 -2
  17. package/lib/types/components/border-panel/border-line/icons/BorderMediumDashDotDot.d.ts +16 -2
  18. package/lib/types/components/border-panel/border-line/icons/BorderMediumDashed.d.ts +16 -2
  19. package/lib/types/components/border-panel/border-line/icons/BorderThick.d.ts +16 -2
  20. package/lib/types/components/border-panel/border-line/icons/BorderThin.d.ts +16 -2
  21. package/lib/types/components/menu-item-input/MenuItemInput.d.ts +1 -2
  22. package/lib/types/controllers/clipboard/clipboard.controller.d.ts +1 -0
  23. package/lib/types/controllers/editor/formula-editor.controller.d.ts +0 -1
  24. package/lib/types/controllers/render-controllers/freeze.render-controller.d.ts +10 -4
  25. package/lib/types/controllers/render-controllers/zoom.render-controller.d.ts +4 -0
  26. package/lib/types/facade/f-event.d.ts +56 -32
  27. package/lib/types/facade/f-permission.d.ts +3 -0
  28. package/lib/types/facade/f-range.d.ts +27 -5
  29. package/lib/types/facade/f-sheet-hooks.d.ts +3 -0
  30. package/lib/types/facade/f-univer.d.ts +12 -1
  31. package/lib/types/facade/f-workbook.d.ts +3 -0
  32. package/lib/types/facade/f-worksheet.d.ts +86 -1
  33. package/lib/types/index.d.ts +1 -0
  34. package/lib/types/services/clipboard/clipboard.service.d.ts +5 -2
  35. package/lib/types/services/clipboard/type.d.ts +9 -1
  36. package/lib/types/services/clipboard/utils.d.ts +1 -1
  37. package/lib/types/services/selection/base-selection-render.service.d.ts +1 -0
  38. package/lib/types/services/selection/selection-control.d.ts +2 -2
  39. package/lib/types/services/sheet-skeleton-manager.service.d.ts +3 -1
  40. package/lib/types/views/cell-alert/CellAlertPopup.d.ts +1 -2
  41. package/lib/types/views/clipboard/ClipboardPopupMenu.d.ts +16 -2
  42. package/lib/types/views/count-bar/CountBar.d.ts +16 -2
  43. package/lib/types/views/count-bar/ZoomSlider.d.ts +16 -2
  44. package/lib/types/views/defined-name/DefinedName.d.ts +16 -2
  45. package/lib/types/views/defined-name/DefinedNameContainer.d.ts +16 -2
  46. package/lib/types/views/defined-name/DefinedNameInput.d.ts +1 -2
  47. package/lib/types/views/defined-name/DefinedNameOverlay.d.ts +16 -2
  48. package/lib/types/views/formula-bar/FormulaBar.d.ts +16 -2
  49. package/lib/types/views/mobile/sheet-bar/MobileSheetBar.d.ts +16 -2
  50. package/lib/types/views/permission/error-msg-dialog/index.d.ts +16 -2
  51. package/lib/types/views/permission/panel/index.d.ts +1 -2
  52. package/lib/types/views/permission/panel-detail/PermissionDetailFooterPart.d.ts +1 -2
  53. package/lib/types/views/permission/panel-detail/PermissionDetailMainPart.d.ts +1 -1
  54. package/lib/types/views/permission/panel-detail/PermissionDetailPanel.d.ts +1 -2
  55. package/lib/types/views/permission/panel-detail/PermissionDetailUserPart.d.ts +1 -2
  56. package/lib/types/views/permission/panel-list/index.d.ts +16 -2
  57. package/lib/types/views/permission/permission-dialog/index.d.ts +16 -2
  58. package/lib/types/views/permission/spin/index.d.ts +1 -1
  59. package/lib/types/views/permission/user-dialog/index.d.ts +16 -2
  60. package/lib/types/views/sheet-bar/SheetBar.d.ts +16 -2
  61. package/lib/types/views/sheet-bar/sheet-bar-button/SheetBarButton.d.ts +1 -1
  62. package/lib/types/views/sheet-bar/sheet-bar-menu/SheetBarMenu.d.ts +1 -1
  63. package/lib/types/views/sheet-bar/sheet-bar-tabs/SheetBarItem.d.ts +1 -1
  64. package/lib/types/views/sheet-bar/sheet-bar-tabs/SheetBarTabs.d.ts +16 -2
  65. package/lib/types/views/sheet-container/SheetContainer.d.ts +18 -4
  66. package/lib/types/views/status-bar/StatusBar.d.ts +16 -2
  67. package/lib/umd/facade.js +1 -1
  68. package/lib/umd/index.js +33 -37
  69. package/package.json +16 -16
  70. package/LICENSE +0 -176
  71. package/lib/types/commands/commands/__tests__/add-worksheet-merge.command.spec.d.ts +0 -16
  72. package/lib/types/commands/commands/__tests__/auto-fill.controller.spec.d.ts +0 -16
  73. package/lib/types/commands/commands/__tests__/create-command-test-bed.d.ts +0 -7
  74. package/lib/types/commands/commands/__tests__/create-selection-command-test-bed.d.ts +0 -28
  75. package/lib/types/commands/commands/__tests__/create-sheet-skeleton-test-bed.d.ts +0 -22
  76. package/lib/types/commands/commands/__tests__/hide-row-col-confirm.command.spec.d.ts +0 -16
  77. package/lib/types/commands/commands/__tests__/remove-row-col-confirm.command.spec.d.ts +0 -16
  78. package/lib/types/commands/commands/__tests__/selection-utils.spec.d.ts +0 -16
  79. package/lib/types/commands/commands/__tests__/set-format-painter.command.spec.d.ts +0 -16
  80. package/lib/types/commands/commands/__tests__/set-frozen.command.spec.d.ts +0 -16
  81. package/lib/types/commands/commands/__tests__/set-selections.command.spec.d.ts +0 -16
  82. package/lib/types/commands/commands/__tests__/sheet-skeleton.spec.d.ts +0 -16
  83. package/lib/types/controllers/editor/__tests__/create-test-bed.d.ts +0 -7
  84. package/lib/types/controllers/editor/__tests__/end-edit.controller.spec.d.ts +0 -16
  85. package/lib/types/controllers/editor/__tests__/mock-function.service.d.ts +0 -5
  86. package/lib/types/controllers/menu/__tests__/create-menu-test-bed.d.ts +0 -13
  87. package/lib/types/controllers/menu/__tests__/menu.spec.d.ts +0 -16
  88. package/lib/types/controllers/menu/__tests__/row-col.menu.spec.d.ts +0 -16
  89. package/lib/types/controllers/utils/__tests__/cell-tools.spec.d.ts +0 -16
  90. package/lib/types/facade/__tests__/create-test-bed.d.ts +0 -10
  91. package/lib/types/facade/__tests__/f-sheet-hooks.spec.d.ts +0 -16
  92. package/lib/types/services/auto-fill/__tests__/tool.spec.d.ts +0 -16
  93. package/lib/types/services/clipboard/__tests__/clipboard-copy-filter.spec.d.ts +0 -16
  94. package/lib/types/services/clipboard/__tests__/clipboard-paste-alignment.spec.d.ts +0 -16
  95. package/lib/types/services/clipboard/__tests__/clipboard-paste-border.spec.d.ts +0 -16
  96. package/lib/types/services/clipboard/__tests__/clipboard-paste-col-width.spec.d.ts +0 -16
  97. package/lib/types/services/clipboard/__tests__/clipboard-paste-font.spec.d.ts +0 -16
  98. package/lib/types/services/clipboard/__tests__/clipboard-paste-form-excel.spec.d.ts +0 -16
  99. package/lib/types/services/clipboard/__tests__/clipboard-paste-from-google.spec.d.ts +0 -16
  100. package/lib/types/services/clipboard/__tests__/clipboard-paste-from-notepad.spec.d.ts +0 -16
  101. package/lib/types/services/clipboard/__tests__/clipboard-paste-rotate.spec.d.ts +0 -16
  102. package/lib/types/services/clipboard/__tests__/clipboard-service.spec.d.ts +0 -16
  103. package/lib/types/services/clipboard/__tests__/clipboard-test-bed.d.ts +0 -29
  104. package/lib/types/services/clipboard/__tests__/constant.d.ts +0 -28
  105. package/lib/types/services/clipboard/__tests__/mock-clipboard.d.ts +0 -39
  106. package/lib/types/services/clipboard/__tests__/sheet-paste.spec.d.ts +0 -16
  107. package/lib/types/services/clipboard/__tests__/utils.spec.d.ts +0 -16
package/lib/es/facade.js CHANGED
@@ -1,76 +1,76 @@
1
- import { FUniver as ue, ICommandService as I, IUniverInstanceService as L, CanceledError as G, RichTextValue as q, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as A, LifecycleService as Q, DisposableCollection as W, LifecycleStages as ee, UniverInstanceType as fe, ILogService as D, toDisposable as C, awaitTime as Ee, InterceptorEffectEnum as we, FEventName as ve, generateRandomId as _e } from "@univerjs/core";
1
+ import { FUniver as ue, ICommandService as P, IUniverInstanceService as L, CanceledError as G, RichTextValue as q, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as A, LifecycleService as Q, DisposableCollection as $, LifecycleStages as ee, UniverInstanceType as pe, ILogService as D, toDisposable as b, awaitTime as Ee, InterceptorEffectEnum as we, FEventName as ve, generateRandomId as _e } from "@univerjs/core";
2
2
  import { RichTextEditingMutation as ke } from "@univerjs/docs";
3
3
  import { IRenderManagerService as m, DeviceInputEventType as te, SHEET_VIEWPORT_KEY as Ie, sheetContentViewportKeys as Pe } from "@univerjs/engine-render";
4
- import { SheetsSelectionsService as Me, COMMAND_LISTENER_SKELETON_CHANGE as Re, getSkeletonChangedEffectedRange as ye, SheetInterceptorService as Ue, INTERCEPTOR_POINT as He, InterceptCellContentPriority as xe } from "@univerjs/sheets";
5
- import { SetCellEditVisibleOperation as P, IEditorBridgeService as $, SetZoomRatioCommand as re, HoverManagerService as _, DragManagerService as U, SheetScrollManagerService as T, SheetPasteShortKeyCommand as ne, ISheetClipboardService as Se, SHEET_VIEW_KEY as R, ISheetSelectionRenderService as H, SheetSkeletonManagerService as x, ChangeZoomRatioCommand as De, SheetsScrollRenderController as Te, SetWorksheetColAutoWidthCommand as Be, SheetCanvasPopManagerService as ie, CellAlertManagerService as Le, IMarkSelectionService as Ae } from "@univerjs/sheets-ui";
6
- import { FSheetHooks as j, FWorkbook as Ce, FWorksheet as be, FPermission as pe, FRange as me } from "@univerjs/sheets/facade";
7
- import { KeyCode as B, CutCommand as oe, CopyCommand as se, PasteCommand as ae, IClipboardInterfaceService as $e, PLAIN_TEXT_CLIPBOARD_MIME_TYPE as ce, HTML_CLIPBOARD_MIME_TYPE as de, supportClipboardAPI as he, ISidebarService as We, IDialogService as je, ComponentManager as le } from "@univerjs/ui";
8
- import { filter as v, combineLatest as Oe } from "rxjs";
9
- class Fe extends ue {
4
+ import { SheetsSelectionsService as Re, COMMAND_LISTENER_SKELETON_CHANGE as Me, getSkeletonChangedEffectedRange as ye, SheetInterceptorService as Ue, INTERCEPTOR_POINT as He, InterceptCellContentPriority as xe } from "@univerjs/sheets";
5
+ import { SetCellEditVisibleOperation as M, IEditorBridgeService as W, SetZoomRatioCommand as re, HoverManagerService as _, DragManagerService as H, SheetScrollManagerService as B, SheetPasteShortKeyCommand as ne, ISheetClipboardService as Se, SheetSkeletonManagerService as R, SHEET_VIEW_KEY as k, ISheetSelectionRenderService as x, ChangeZoomRatioCommand as De, SheetsScrollRenderController as Be, SetWorksheetColAutoWidthCommand as Te, SetColumnHeaderHeightCommand as Le, SetRowHeaderWidthCommand as Ae, SheetCanvasPopManagerService as ie, CellAlertManagerService as We, IMarkSelectionService as $e } from "@univerjs/sheets-ui";
6
+ import { FSheetHooks as j, FWorkbook as Ce, FWorksheet as me, FPermission as be, FRange as fe } from "@univerjs/sheets/facade";
7
+ import { KeyCode as T, CutCommand as oe, CopyCommand as se, PasteCommand as ae, IClipboardInterfaceService as je, PLAIN_TEXT_CLIPBOARD_MIME_TYPE as ce, HTML_CLIPBOARD_MIME_TYPE as de, supportClipboardAPI as he, ISidebarService as Oe, IDialogService as Fe, ComponentManager as le } from "@univerjs/ui";
8
+ import { filter as S, combineLatest as Ne } from "rxjs";
9
+ class ze extends ue {
10
10
  // eslint-disable-next-line max-lines-per-function
11
11
  _initSheetUIEvent(e) {
12
- const r = e.get(I);
13
- this.disposeWithMe(r.beforeCommandExecuted((t) => {
14
- if (t.id === P.id) {
12
+ const t = e.get(P);
13
+ this.disposeWithMe(t.beforeCommandExecuted((r) => {
14
+ if (r.id === M.id) {
15
15
  if (!this._eventListend(this.Event.BeforeSheetEditStart) && !this._eventListend(this.Event.BeforeSheetEditEnd))
16
16
  return;
17
- const i = this.getCommandSheetTarget(t);
17
+ const i = this.getActiveSheet();
18
18
  if (!i)
19
19
  return;
20
- const { workbook: o, worksheet: s } = i, c = e.get($), g = e.get(L), b = t.params, { visible: l, keycode: h, eventType: S } = b, d = c.getEditLocation();
20
+ const { workbook: o, worksheet: s } = i, a = e.get(W), g = e.get(L), v = r.params, { visible: l, keycode: h, eventType: C } = v, d = a.getEditLocation();
21
21
  if (l) {
22
- const f = {
22
+ const p = {
23
23
  row: d.row,
24
24
  column: d.column,
25
- eventType: S,
25
+ eventType: C,
26
26
  keycode: h,
27
27
  workbook: o,
28
28
  worksheet: s,
29
29
  isZenEditor: !1
30
30
  };
31
- if (this.fireEvent(this.Event.BeforeSheetEditStart, f), f.cancel)
31
+ if (this.fireEvent(this.Event.BeforeSheetEditStart, p), p.cancel)
32
32
  throw new G();
33
33
  } else {
34
- const f = {
34
+ const p = {
35
35
  row: d.row,
36
36
  column: d.column,
37
- eventType: S,
37
+ eventType: C,
38
38
  keycode: h,
39
39
  workbook: o,
40
40
  worksheet: s,
41
41
  isZenEditor: !1,
42
42
  value: q.create(g.getUnit(A).getSnapshot()),
43
- isConfirm: h !== B.ESC
43
+ isConfirm: h !== T.ESC
44
44
  };
45
- if (this.fireEvent(this.Event.BeforeSheetEditEnd, f), f.cancel)
45
+ if (this.fireEvent(this.Event.BeforeSheetEditEnd, p), p.cancel)
46
46
  throw new G();
47
47
  }
48
48
  }
49
- if (t.id === re.id) {
49
+ if (r.id === re.id) {
50
50
  if (!this._eventListend(this.Event.BeforeSheetZoomChange))
51
51
  return;
52
- const i = this.getCommandSheetTarget(t);
52
+ const i = this.getCommandSheetTarget(r);
53
53
  if (!i)
54
54
  return;
55
55
  const { workbook: o, worksheet: s } = i;
56
56
  this.fireEvent(this.Event.BeforeSheetZoomChange, {
57
- zoom: t.params.zoomRatio,
57
+ zoom: r.params.zoomRatio,
58
58
  workbook: o,
59
59
  worksheet: s
60
60
  });
61
61
  }
62
- })), this.disposeWithMe(r.onCommandExecuted((t) => {
63
- if (t.id === P.id) {
62
+ })), this.disposeWithMe(t.onCommandExecuted((r) => {
63
+ if (r.id === M.id) {
64
64
  if (!this._eventListend(this.Event.SheetEditStarted) && !this._eventListend(this.Event.SheetEditEnded))
65
65
  return;
66
- const i = this.getCommandSheetTarget(t);
66
+ const i = this.getCommandSheetTarget(r);
67
67
  if (!i)
68
68
  return;
69
- const { workbook: o, worksheet: s } = i, c = e.get($), g = t.params, { visible: b, keycode: l, eventType: h } = g, S = c.getEditLocation();
70
- if (b) {
69
+ const { workbook: o, worksheet: s } = i, a = e.get(W), g = r.params, { visible: v, keycode: l, eventType: h } = g, C = a.getEditLocation();
70
+ if (v) {
71
71
  const d = {
72
- row: S.row,
73
- column: S.column,
72
+ row: C.row,
73
+ column: C.column,
74
74
  eventType: h,
75
75
  keycode: l,
76
76
  workbook: o,
@@ -80,43 +80,43 @@ class Fe extends ue {
80
80
  this.fireEvent(this.Event.SheetEditStarted, d);
81
81
  } else {
82
82
  const d = {
83
- row: S.row,
84
- column: S.column,
83
+ row: C.row,
84
+ column: C.column,
85
85
  eventType: h,
86
86
  keycode: l,
87
87
  workbook: o,
88
88
  worksheet: s,
89
89
  isZenEditor: !1,
90
- isConfirm: l !== B.ESC
90
+ isConfirm: l !== T.ESC
91
91
  };
92
92
  this.fireEvent(this.Event.SheetEditEnded, d);
93
93
  }
94
94
  }
95
- if (t.id === ke.id) {
95
+ if (r.id === ke.id) {
96
96
  if (!this._eventListend(this.Event.SheetEditChanging))
97
97
  return;
98
- const i = this.getCommandSheetTarget(t);
98
+ const i = this.getCommandSheetTarget(r);
99
99
  if (!i)
100
100
  return;
101
- const { workbook: o, worksheet: s } = i, c = e.get($), g = e.get(L), b = t.params;
102
- if (!c.isVisible().visible) return;
103
- const { unitId: l } = b;
101
+ const { workbook: o, worksheet: s } = i, a = e.get(W), g = e.get(L), v = r.params;
102
+ if (!a.isVisible().visible) return;
103
+ const { unitId: l } = v;
104
104
  if (l === A) {
105
- const { row: h, column: S } = c.getEditLocation(), d = {
105
+ const { row: h, column: C } = a.getEditLocation(), d = {
106
106
  workbook: o,
107
107
  worksheet: s,
108
108
  row: h,
109
- column: S,
109
+ column: C,
110
110
  value: q.create(g.getUnit(A).getSnapshot()),
111
111
  isZenEditor: !1
112
112
  };
113
113
  this.fireEvent(this.Event.SheetEditChanging, d);
114
114
  }
115
115
  }
116
- if (t.id === re.id) {
116
+ if (r.id === re.id) {
117
117
  if (!this._eventListend(this.Event.SheetZoomChanged))
118
118
  return;
119
- const i = this.getCommandSheetTarget(t);
119
+ const i = this.getCommandSheetTarget(r);
120
120
  if (!i)
121
121
  return;
122
122
  const { workbook: o, worksheet: s } = i;
@@ -128,162 +128,165 @@ class Fe extends ue {
128
128
  }
129
129
  })), this._initObserverListener(e);
130
130
  }
131
+ /**
132
+ * @ignore
133
+ */
131
134
  // eslint-disable-next-line max-lines-per-function
132
135
  _initObserverListener(e) {
133
- const t = e.get(L).getFocusedUnit(), i = t == null ? void 0 : t.getUnitId(), o = e.get(m);
136
+ const r = e.get(L).getFocusedUnit(), i = r == null ? void 0 : r.getUnitId(), o = e.get(m);
134
137
  if (i) {
135
- const l = e.get(Q), h = new W();
136
- this.disposeWithMe(l.lifecycle$.subscribe((S) => {
137
- var k, M, u, p, E, O, F, N, V, Z, K, z, Y, X, J;
138
- if (S < ee.Rendered) return;
138
+ const l = e.get(Q), h = new $();
139
+ this.disposeWithMe(l.lifecycle$.subscribe((C) => {
140
+ var I, y, u, f, E, O, F, N, z, V, Z, K, Y, X, J;
141
+ if (C < ee.Rendered) return;
139
142
  h.dispose();
140
- const d = e.get(_), f = e.get(U);
143
+ const d = e.get(_), p = e.get(H);
141
144
  d && (h.add(
142
- (k = d.currentClickedCell$) == null ? void 0 : k.pipe(v((n) => !!n)).subscribe((n) => {
145
+ (I = d.currentClickedCell$) == null ? void 0 : I.pipe(S((n) => !!n)).subscribe((n) => {
143
146
  if (!this._eventListend(this.Event.CellClicked)) return;
144
- const a = this.getSheetTarget(n.location.unitId, n.location.subUnitId);
145
- a && this.fireEvent(this.Event.CellClicked, {
146
- ...a,
147
+ const c = this.getSheetTarget(n.location.unitId, n.location.subUnitId);
148
+ c && this.fireEvent(this.Event.CellClicked, {
149
+ ...c,
147
150
  ...n,
148
151
  row: n.location.row,
149
152
  column: n.location.col
150
153
  });
151
154
  })
152
155
  ), h.add(
153
- (M = d.currentRichText$) == null ? void 0 : M.pipe(v((n) => !!n)).subscribe((n) => {
156
+ (y = d.currentRichText$) == null ? void 0 : y.pipe(S((n) => !!n)).subscribe((n) => {
154
157
  if (!this._eventListend(this.Event.CellHover)) return;
155
- const a = this.getSheetTarget(n.unitId, n.subUnitId);
156
- a && this.fireEvent(this.Event.CellHover, {
157
- ...a,
158
+ const c = this.getSheetTarget(n.unitId, n.subUnitId);
159
+ c && this.fireEvent(this.Event.CellHover, {
160
+ ...c,
158
161
  ...n,
159
162
  row: n.row,
160
163
  column: n.col
161
164
  });
162
165
  })
163
166
  ), h.add(
164
- (u = d.currentPointerDownCell$) == null ? void 0 : u.pipe(v((n) => !!n)).subscribe((n) => {
167
+ (u = d.currentPointerDownCell$) == null ? void 0 : u.pipe(S((n) => !!n)).subscribe((n) => {
165
168
  if (!this._eventListend(this.Event.CellPointerDown)) return;
166
- const a = this.getSheetTarget(n.unitId, n.subUnitId);
167
- a && this.fireEvent(this.Event.CellPointerDown, {
168
- ...a,
169
+ const c = this.getSheetTarget(n.unitId, n.subUnitId);
170
+ c && this.fireEvent(this.Event.CellPointerDown, {
171
+ ...c,
169
172
  ...n,
170
173
  row: n.row,
171
174
  column: n.col
172
175
  });
173
176
  })
174
177
  ), h.add(
175
- (p = d.currentPointerUpCell$) == null ? void 0 : p.pipe(v((n) => !!n)).subscribe((n) => {
178
+ (f = d.currentPointerUpCell$) == null ? void 0 : f.pipe(S((n) => !!n)).subscribe((n) => {
176
179
  if (!this._eventListend(this.Event.CellPointerUp)) return;
177
- const a = this.getSheetTarget(n.unitId, n.subUnitId);
178
- a && this.fireEvent(this.Event.CellPointerUp, {
179
- ...a,
180
+ const c = this.getSheetTarget(n.unitId, n.subUnitId);
181
+ c && this.fireEvent(this.Event.CellPointerUp, {
182
+ ...c,
180
183
  ...n,
181
184
  row: n.row,
182
185
  column: n.col
183
186
  });
184
187
  })
185
188
  ), h.add(
186
- (E = d.currentCellPosWithEvent$) == null ? void 0 : E.pipe(v((n) => !!n)).subscribe((n) => {
189
+ (E = d.currentCellPosWithEvent$) == null ? void 0 : E.pipe(S((n) => !!n)).subscribe((n) => {
187
190
  if (!this._eventListend(this.Event.CellPointerMove)) return;
188
- const a = this.getSheetTarget(n.unitId, n.subUnitId);
189
- a && this.fireEvent(this.Event.CellPointerMove, {
190
- ...a,
191
+ const c = this.getSheetTarget(n.unitId, n.subUnitId);
192
+ c && this.fireEvent(this.Event.CellPointerMove, {
193
+ ...c,
191
194
  ...n,
192
195
  row: n.row,
193
196
  column: n.col
194
197
  });
195
198
  })
196
199
  ), h.add(
197
- (O = f.currentCell$) == null ? void 0 : O.pipe(v((n) => !!n)).subscribe((n) => {
200
+ (O = p.currentCell$) == null ? void 0 : O.pipe(S((n) => !!n)).subscribe((n) => {
198
201
  if (!this._eventListend(this.Event.DragOver)) return;
199
- const a = this.getSheetTarget(n.location.unitId, n.location.subUnitId);
200
- a && this.fireEvent(this.Event.DragOver, {
201
- ...a,
202
+ const c = this.getSheetTarget(n.location.unitId, n.location.subUnitId);
203
+ c && this.fireEvent(this.Event.DragOver, {
204
+ ...c,
202
205
  ...n,
203
206
  row: n.location.row,
204
207
  column: n.location.col
205
208
  });
206
209
  })
207
210
  ), h.add(
208
- (F = f.endCell$) == null ? void 0 : F.pipe(v((n) => !!n)).subscribe((n) => {
211
+ (F = p.endCell$) == null ? void 0 : F.pipe(S((n) => !!n)).subscribe((n) => {
209
212
  if (!this._eventListend(this.Event.Drop)) return;
210
- const a = this.getSheetTarget(n.location.unitId, n.location.subUnitId);
211
- a && this.fireEvent(this.Event.Drop, {
212
- ...a,
213
+ const c = this.getSheetTarget(n.location.unitId, n.location.subUnitId);
214
+ c && this.fireEvent(this.Event.Drop, {
215
+ ...c,
213
216
  ...n,
214
217
  row: n.location.row,
215
218
  column: n.location.col
216
219
  });
217
220
  })
218
221
  ), h.add(
219
- (N = d.currentRowHeaderClick$) == null ? void 0 : N.pipe(v((n) => !!n)).subscribe((n) => {
222
+ (N = d.currentRowHeaderClick$) == null ? void 0 : N.pipe(S((n) => !!n)).subscribe((n) => {
220
223
  if (!this._eventListend(this.Event.RowHeaderClick)) return;
221
- const a = this.getSheetTarget(n.unitId, n.subUnitId);
222
- a && this.fireEvent(this.Event.RowHeaderClick, {
223
- ...a,
224
+ const c = this.getSheetTarget(n.unitId, n.subUnitId);
225
+ c && this.fireEvent(this.Event.RowHeaderClick, {
226
+ ...c,
224
227
  row: n.index
225
228
  });
226
229
  })
227
230
  ), h.add(
228
- (V = d.currentRowHeaderPointerDown$) == null ? void 0 : V.pipe(v((n) => !!n)).subscribe((n) => {
231
+ (z = d.currentRowHeaderPointerDown$) == null ? void 0 : z.pipe(S((n) => !!n)).subscribe((n) => {
229
232
  if (!this._eventListend(this.Event.RowHeaderPointerDown)) return;
230
- const a = this.getSheetTarget(n.unitId, n.subUnitId);
231
- a && this.fireEvent(this.Event.RowHeaderPointerDown, {
232
- ...a,
233
+ const c = this.getSheetTarget(n.unitId, n.subUnitId);
234
+ c && this.fireEvent(this.Event.RowHeaderPointerDown, {
235
+ ...c,
233
236
  row: n.index
234
237
  });
235
238
  })
236
239
  ), h.add(
237
- (Z = d.currentRowHeaderPointerUp$) == null ? void 0 : Z.pipe(v((n) => !!n)).subscribe((n) => {
240
+ (V = d.currentRowHeaderPointerUp$) == null ? void 0 : V.pipe(S((n) => !!n)).subscribe((n) => {
238
241
  if (!this._eventListend(this.Event.RowHeaderPointerUp)) return;
239
- const a = this.getSheetTarget(n.unitId, n.subUnitId);
240
- a && this.fireEvent(this.Event.RowHeaderPointerUp, {
241
- ...a,
242
+ const c = this.getSheetTarget(n.unitId, n.subUnitId);
243
+ c && this.fireEvent(this.Event.RowHeaderPointerUp, {
244
+ ...c,
242
245
  row: n.index
243
246
  });
244
247
  })
245
248
  ), h.add(
246
- (K = d.currentHoveredRowHeader$) == null ? void 0 : K.pipe(v((n) => !!n)).subscribe((n) => {
249
+ (Z = d.currentHoveredRowHeader$) == null ? void 0 : Z.pipe(S((n) => !!n)).subscribe((n) => {
247
250
  if (!this._eventListend(this.Event.RowHeaderHover)) return;
248
- const a = this.getSheetTarget(n.unitId, n.subUnitId);
249
- a && this.fireEvent(this.Event.RowHeaderHover, {
250
- ...a,
251
+ const c = this.getSheetTarget(n.unitId, n.subUnitId);
252
+ c && this.fireEvent(this.Event.RowHeaderHover, {
253
+ ...c,
251
254
  row: n.index
252
255
  });
253
256
  })
254
257
  ), h.add(
255
- (z = d.currentColHeaderClick$) == null ? void 0 : z.pipe(v((n) => !!n)).subscribe((n) => {
258
+ (K = d.currentColHeaderClick$) == null ? void 0 : K.pipe(S((n) => !!n)).subscribe((n) => {
256
259
  if (!this._eventListend(this.Event.ColumnHeaderClick)) return;
257
- const a = this.getSheetTarget(n.unitId, n.subUnitId);
258
- a && this.fireEvent(this.Event.ColumnHeaderClick, {
259
- ...a,
260
+ const c = this.getSheetTarget(n.unitId, n.subUnitId);
261
+ c && this.fireEvent(this.Event.ColumnHeaderClick, {
262
+ ...c,
260
263
  column: n.index
261
264
  });
262
265
  })
263
266
  ), h.add(
264
- (Y = d.currentColHeaderPointerDown$) == null ? void 0 : Y.pipe(v((n) => !!n)).subscribe((n) => {
267
+ (Y = d.currentColHeaderPointerDown$) == null ? void 0 : Y.pipe(S((n) => !!n)).subscribe((n) => {
265
268
  if (!this._eventListend(this.Event.ColumnHeaderPointerDown)) return;
266
- const a = this.getSheetTarget(n.unitId, n.subUnitId);
267
- a && this.fireEvent(this.Event.ColumnHeaderPointerDown, {
268
- ...a,
269
+ const c = this.getSheetTarget(n.unitId, n.subUnitId);
270
+ c && this.fireEvent(this.Event.ColumnHeaderPointerDown, {
271
+ ...c,
269
272
  column: n.index
270
273
  });
271
274
  })
272
275
  ), h.add(
273
- (X = d.currentColHeaderPointerUp$) == null ? void 0 : X.pipe(v((n) => !!n)).subscribe((n) => {
276
+ (X = d.currentColHeaderPointerUp$) == null ? void 0 : X.pipe(S((n) => !!n)).subscribe((n) => {
274
277
  if (!this._eventListend(this.Event.ColumnHeaderPointerUp)) return;
275
- const a = this.getSheetTarget(n.unitId, n.subUnitId);
276
- a && this.fireEvent(this.Event.ColumnHeaderPointerUp, {
277
- ...a,
278
+ const c = this.getSheetTarget(n.unitId, n.subUnitId);
279
+ c && this.fireEvent(this.Event.ColumnHeaderPointerUp, {
280
+ ...c,
278
281
  column: n.index
279
282
  });
280
283
  })
281
284
  ), h.add(
282
- (J = d.currentHoveredColHeader$) == null ? void 0 : J.pipe(v((n) => !!n)).subscribe((n) => {
285
+ (J = d.currentHoveredColHeader$) == null ? void 0 : J.pipe(S((n) => !!n)).subscribe((n) => {
283
286
  if (!this._eventListend(this.Event.ColumnHeaderHover)) return;
284
- const a = this.getSheetTarget(n.unitId, n.subUnitId);
285
- a && this.fireEvent(this.Event.ColumnHeaderHover, {
286
- ...a,
287
+ const c = this.getSheetTarget(n.unitId, n.subUnitId);
288
+ c && this.fireEvent(this.Event.ColumnHeaderHover, {
289
+ ...c,
287
290
  column: n.index
288
291
  });
289
292
  })
@@ -291,57 +294,57 @@ class Fe extends ue {
291
294
  })), this.disposeWithMe(h);
292
295
  }
293
296
  const s = /* @__PURE__ */ new Map();
294
- let c;
295
- const g = e.get(Q), b = Oe([
297
+ let a;
298
+ const g = e.get(Q), v = Ne([
296
299
  o.created$,
297
300
  g.lifecycle$
298
301
  ]);
299
- this.disposeWithMe(b.subscribe(([l, h]) => {
300
- var M;
301
- if (l.type === fe.UNIVER_SHEET && (c = l), h <= ee.Rendered) return;
302
- const S = new W();
303
- if (!c) return;
304
- const d = this.getWorkbook(c.unitId);
302
+ this.disposeWithMe(v.subscribe(([l, h]) => {
303
+ var y;
304
+ if (l.type === pe.UNIVER_SHEET && (a = l), h <= ee.Rendered) return;
305
+ const C = new $();
306
+ if (!a) return;
307
+ const d = this.getWorkbook(a.unitId);
305
308
  if (!d) return;
306
- s.get(c.unitId) && ((M = s.get(c.unitId)) == null || M.dispose()), s.set(c.unitId, S);
307
- const f = c.with(T);
308
- S.add(f.validViewportScrollInfo$.subscribe((u) => {
309
+ s.get(a.unitId) && ((y = s.get(a.unitId)) == null || y.dispose()), s.set(a.unitId, C);
310
+ const p = a.with(B);
311
+ C.add(p.validViewportScrollInfo$.subscribe((u) => {
309
312
  u && this._eventListend(this.Event.Scroll) && this.fireEvent(this.Event.Scroll, {
310
313
  workbook: d,
311
314
  worksheet: d.getActiveSheet(),
312
315
  ...u
313
316
  });
314
317
  }));
315
- const k = c.with(Me);
316
- S.add(k.selectionMoveStart$.subscribe((u) => {
317
- var p;
318
+ const I = a.with(Re);
319
+ C.add(I.selectionMoveStart$.subscribe((u) => {
320
+ var f;
318
321
  this._eventListend(this.Event.SelectionMoveStart) && this.fireEvent(this.Event.SelectionMoveStart, {
319
322
  workbook: d,
320
323
  worksheet: d.getActiveSheet(),
321
- selections: (p = u == null ? void 0 : u.map((E) => E.range)) != null ? p : []
324
+ selections: (f = u == null ? void 0 : u.map((E) => E.range)) != null ? f : []
322
325
  });
323
- })), S.add(k.selectionMoving$.subscribe((u) => {
324
- var p;
326
+ })), C.add(I.selectionMoving$.subscribe((u) => {
327
+ var f;
325
328
  this._eventListend(this.Event.SelectionMoving) && this.fireEvent(this.Event.SelectionMoving, {
326
329
  workbook: d,
327
330
  worksheet: d.getActiveSheet(),
328
- selections: (p = u == null ? void 0 : u.map((E) => E.range)) != null ? p : []
331
+ selections: (f = u == null ? void 0 : u.map((E) => E.range)) != null ? f : []
329
332
  });
330
- })), S.add(k.selectionMoveEnd$.subscribe((u) => {
331
- var p;
333
+ })), C.add(I.selectionMoveEnd$.subscribe((u) => {
334
+ var f;
332
335
  this._eventListend(this.Event.SelectionMoveEnd) && this.fireEvent(this.Event.SelectionMoveEnd, {
333
336
  workbook: d,
334
337
  worksheet: d.getActiveSheet(),
335
- selections: (p = u == null ? void 0 : u.map((E) => E.range)) != null ? p : []
338
+ selections: (f = u == null ? void 0 : u.map((E) => E.range)) != null ? f : []
336
339
  });
337
- })), S.add(k.selectionChanged$.subscribe((u) => {
338
- var p;
340
+ })), C.add(I.selectionChanged$.subscribe((u) => {
341
+ var f;
339
342
  this._eventListend(this.Event.SelectionChanged) && this.fireEvent(this.Event.SelectionChanged, {
340
343
  workbook: d,
341
344
  worksheet: d.getActiveSheet(),
342
- selections: (p = u == null ? void 0 : u.map((E) => E.range)) != null ? p : []
345
+ selections: (f = u == null ? void 0 : u.map((E) => E.range)) != null ? f : []
343
346
  });
344
- })), c = null, this.disposeWithMe(S);
347
+ })), a = null, this.disposeWithMe(C);
345
348
  })), this.disposeWithMe(o.disposed$.subscribe((l) => {
346
349
  var h;
347
350
  (h = s.get(l)) == null || h.dispose(), s.delete(l);
@@ -351,39 +354,42 @@ class Fe extends ue {
351
354
  });
352
355
  });
353
356
  }
357
+ /**
358
+ * @ignore
359
+ */
354
360
  _initialize(e) {
355
361
  this._initSheetUIEvent(e);
356
- const r = e.get(I);
357
- this.disposeWithMe(r.beforeCommandExecuted((t) => {
358
- switch (t.id) {
362
+ const t = e.get(P);
363
+ this.disposeWithMe(t.beforeCommandExecuted((r) => {
364
+ switch (r.id) {
359
365
  case se.id:
360
366
  case oe.id:
361
367
  this._beforeClipboardChange();
362
368
  break;
363
369
  case ne.id:
364
- this._beforeClipboardPaste(t.params);
370
+ this._beforeClipboardPaste(r.params);
365
371
  break;
366
372
  }
367
- })), this.disposeWithMe(r.onCommandExecuted((t) => {
368
- if (Re.indexOf(t.id) > -1) {
373
+ })), this.disposeWithMe(t.onCommandExecuted((r) => {
374
+ if (Me.indexOf(r.id) > -1) {
369
375
  if (!this._eventListend(this.Event.SheetSkeletonChanged)) return;
370
376
  const i = this.getActiveSheet();
371
377
  if (!i) return;
372
- const o = ye(t).map((s) => {
373
- var c, g;
374
- return (g = (c = this.getWorkbook(s.unitId)) == null ? void 0 : c.getSheetBySheetId(s.subUnitId)) == null ? void 0 : g.getRange(s.range);
378
+ const o = ye(r).map((s) => {
379
+ var a, g;
380
+ return (g = (a = this.getWorkbook(s.unitId)) == null ? void 0 : a.getSheetBySheetId(s.subUnitId)) == null ? void 0 : g.getRange(s.range);
375
381
  }).filter(Boolean);
376
382
  if (!o.length) return;
377
383
  this.fireEvent(this.Event.SheetSkeletonChanged, {
378
384
  workbook: i.workbook,
379
385
  worksheet: i.worksheet,
380
- payload: t,
386
+ payload: r,
381
387
  skeleton: i.worksheet.getSkeleton(),
382
388
  effectedRanges: o
383
389
  });
384
390
  return;
385
391
  }
386
- switch (t.id) {
392
+ switch (r.id) {
387
393
  case se.id:
388
394
  case oe.id:
389
395
  this._clipboardChanged();
@@ -395,8 +401,8 @@ class Fe extends ue {
395
401
  this._clipboardPasteAsync();
396
402
  break;
397
403
  }
398
- })), this.disposeWithMe(r.beforeCommandExecuted(async (t) => {
399
- switch (t.id) {
404
+ })), this.disposeWithMe(t.beforeCommandExecuted(async (r) => {
405
+ switch (r.id) {
400
406
  case ae.id:
401
407
  await this._beforeClipboardPasteAsync();
402
408
  break;
@@ -404,20 +410,20 @@ class Fe extends ue {
404
410
  }));
405
411
  }
406
412
  _generateClipboardCopyParam() {
407
- const e = this.getActiveWorkbook(), r = e == null ? void 0 : e.getActiveSheet(), t = e == null ? void 0 : e.getActiveRange();
408
- if (!e || !r || !t)
413
+ const e = this.getActiveWorkbook(), t = e == null ? void 0 : e.getActiveSheet(), r = e == null ? void 0 : e.getActiveRange();
414
+ if (!e || !t || !r)
409
415
  return;
410
- const o = this._injector.get(Se).generateCopyContent(e.getId(), r.getSheetId(), t.getRange());
416
+ const o = this._injector.get(Se).generateCopyContent(e.getId(), t.getSheetId(), r.getRange());
411
417
  if (!o)
412
418
  return;
413
- const { html: s, plain: c } = o;
419
+ const { html: s, plain: a } = o;
414
420
  return {
415
421
  workbook: e,
416
- worksheet: r,
417
- text: c,
422
+ worksheet: t,
423
+ text: a,
418
424
  html: s,
419
- fromSheet: r,
420
- fromRange: t
425
+ fromSheet: t,
426
+ fromRange: r
421
427
  };
422
428
  }
423
429
  _beforeClipboardChange() {
@@ -437,27 +443,27 @@ class Fe extends ue {
437
443
  _generateClipboardPasteParam(e) {
438
444
  if (!e)
439
445
  return;
440
- const { htmlContent: r, textContent: t } = e, i = this.getActiveWorkbook(), o = i == null ? void 0 : i.getActiveSheet();
446
+ const { htmlContent: t, textContent: r } = e, i = this.getActiveWorkbook(), o = i == null ? void 0 : i.getActiveSheet();
441
447
  return !i || !o ? void 0 : {
442
448
  workbook: i,
443
449
  worksheet: o,
444
- text: t,
445
- html: r
450
+ text: r,
451
+ html: t
446
452
  };
447
453
  }
448
454
  async _generateClipboardPasteParamAsync() {
449
- const e = this.getActiveWorkbook(), r = e == null ? void 0 : e.getActiveSheet();
450
- if (!e || !r)
455
+ const e = this.getActiveWorkbook(), t = e == null ? void 0 : e.getActiveSheet();
456
+ if (!e || !t)
451
457
  return;
452
- const o = (await this._injector.get($e).read())[0];
458
+ const o = (await this._injector.get(je).read())[0];
453
459
  let s;
454
460
  if (o) {
455
- const c = o.types, g = c.indexOf(ce) !== -1 ? await o.getType(ce).then((l) => l && l.text()) : "", b = c.indexOf(de) !== -1 ? await o.getType(de).then((l) => l && l.text()) : "";
461
+ const a = o.types, g = a.indexOf(ce) !== -1 ? await o.getType(ce).then((l) => l && l.text()) : "", v = a.indexOf(de) !== -1 ? await o.getType(de).then((l) => l && l.text()) : "";
456
462
  s = {
457
463
  workbook: e,
458
- worksheet: r,
464
+ worksheet: t,
459
465
  text: g,
460
- html: b
466
+ html: v
461
467
  };
462
468
  }
463
469
  return s;
@@ -465,15 +471,15 @@ class Fe extends ue {
465
471
  _beforeClipboardPaste(e) {
466
472
  if (!this.hasEventCallback(this.Event.BeforeClipboardPaste))
467
473
  return;
468
- const r = this._generateClipboardPasteParam(e);
469
- if (r && (this.fireEvent(this.Event.BeforeClipboardPaste, r), r.cancel))
474
+ const t = this._generateClipboardPasteParam(e);
475
+ if (t && (this.fireEvent(this.Event.BeforeClipboardPaste, t), t.cancel))
470
476
  throw new Error("Before clipboard paste is canceled");
471
477
  }
472
478
  _clipboardPaste(e) {
473
479
  if (!this.hasEventCallback(this.Event.BeforeClipboardPaste))
474
480
  return;
475
- const r = this._generateClipboardPasteParam(e);
476
- if (r && (this.fireEvent(this.Event.BeforeClipboardPaste, r), r.cancel))
481
+ const t = this._generateClipboardPasteParam(e);
482
+ if (t && (this.fireEvent(this.Event.BeforeClipboardPaste, t), t.cancel))
477
483
  throw new Error("Clipboard pasted is canceled");
478
484
  }
479
485
  async _beforeClipboardPasteAsync() {
@@ -499,39 +505,40 @@ class Fe extends ue {
499
505
  throw new Error("Clipboard pasted is canceled");
500
506
  }
501
507
  customizeColumnHeader(e) {
502
- const r = this.getActiveWorkbook();
503
- if (!r) {
508
+ var v, l;
509
+ const t = this.getActiveWorkbook();
510
+ if (!t) {
504
511
  console.error("WorkBook not exist");
505
512
  return;
506
513
  }
507
- const t = r == null ? void 0 : r.getId();
508
- this._getSheetRenderComponent(t, R.COLUMN).setCustomHeader(e);
514
+ const r = t == null ? void 0 : t.getId(), i = this._injector.get(m), o = t.getActiveSheet(), s = o.getSheetId(), a = i.getRenderById(r);
515
+ a && ((v = e.headerStyle) != null && v.size) && (a.with(R).setColumnHeaderSize(a, s, (l = e.headerStyle) == null ? void 0 : l.size), o == null || o.refreshCanvas()), this._getSheetRenderComponent(r, k.COLUMN).setCustomHeader(e), o == null || o.refreshCanvas();
509
516
  }
510
517
  customizeRowHeader(e) {
511
- const r = this.getActiveWorkbook();
512
- if (!r) {
518
+ const t = this.getActiveWorkbook();
519
+ if (!t) {
513
520
  console.error("WorkBook not exist");
514
521
  return;
515
522
  }
516
- const t = r == null ? void 0 : r.getId();
517
- this._getSheetRenderComponent(t, R.ROW).setCustomHeader(e);
523
+ const r = t == null ? void 0 : t.getId();
524
+ this._getSheetRenderComponent(r, k.ROW).setCustomHeader(e);
518
525
  }
519
- registerSheetRowHeaderExtension(e, ...r) {
520
- const t = this._getSheetRenderComponent(e, R.ROW), i = t.register(...r);
521
- return C(() => {
522
- i.dispose(), t.makeDirty(!0);
526
+ registerSheetRowHeaderExtension(e, ...t) {
527
+ const r = this._getSheetRenderComponent(e, k.ROW), i = r.register(...t);
528
+ return b(() => {
529
+ i.dispose(), r.makeDirty(!0);
523
530
  });
524
531
  }
525
- registerSheetColumnHeaderExtension(e, ...r) {
526
- const t = this._getSheetRenderComponent(e, R.COLUMN), i = t.register(...r);
527
- return C(() => {
528
- i.dispose(), t.makeDirty(!0);
532
+ registerSheetColumnHeaderExtension(e, ...t) {
533
+ const r = this._getSheetRenderComponent(e, k.COLUMN), i = r.register(...t);
534
+ return b(() => {
535
+ i.dispose(), r.makeDirty(!0);
529
536
  });
530
537
  }
531
- registerSheetMainExtension(e, ...r) {
532
- const t = this._getSheetRenderComponent(e, R.MAIN), i = t.register(...r);
533
- return C(() => {
534
- i.dispose(), t.makeDirty(!0);
538
+ registerSheetMainExtension(e, ...t) {
539
+ const r = this._getSheetRenderComponent(e, k.MAIN), i = r.register(...t);
540
+ return b(() => {
541
+ i.dispose(), r.makeDirty(!0);
535
542
  });
536
543
  }
537
544
  /**
@@ -541,11 +548,11 @@ class Fe extends ue {
541
548
  * @param {SHEET_VIEW_KEY} viewKey The view key of the spreadsheet.
542
549
  * @returns {Nullable<RenderComponentType>} The render component.
543
550
  */
544
- _getSheetRenderComponent(e, r) {
551
+ _getSheetRenderComponent(e, t) {
545
552
  const i = this._injector.get(m).getRenderById(e);
546
553
  if (!i)
547
554
  throw new Error(`Render Unit with unitId ${e} not found`);
548
- const { components: o } = i, s = o.get(r);
555
+ const { components: o } = i, s = o.get(t);
549
556
  if (!s)
550
557
  throw new Error("Render component not found");
551
558
  return s;
@@ -558,94 +565,94 @@ class Fe extends ue {
558
565
  return this._injector.createInstance(j);
559
566
  }
560
567
  }
561
- ue.extend(Fe);
562
- class Ne extends Ce {
568
+ ue.extend(ze);
569
+ class Ve extends Ce {
563
570
  openSiderbar(e) {
564
- return this._logDeprecation("openSiderbar"), this._injector.get(We).open(e);
571
+ return this._logDeprecation("openSiderbar"), this._injector.get(Oe).open(e);
565
572
  }
566
573
  openDialog(e) {
567
574
  this._logDeprecation("openDialog");
568
- const t = this._injector.get(je).open({
575
+ const r = this._injector.get(Fe).open({
569
576
  ...e,
570
577
  onClose: () => {
571
- t.dispose();
578
+ r.dispose();
572
579
  }
573
580
  });
574
- return t;
581
+ return r;
575
582
  }
576
583
  _logDeprecation(e) {
577
584
  this._injector.get(D).warn("[FWorkbook]", `${e} is deprecated. Please use the function of the same name on "FUniver".`);
578
585
  }
579
586
  generateCellParams(e) {
580
- const r = this.getActiveSheet();
587
+ const t = this.getActiveSheet();
581
588
  return {
582
589
  row: e.row,
583
590
  column: e.col,
584
591
  workbook: this,
585
- worksheet: r
592
+ worksheet: t
586
593
  };
587
594
  }
588
595
  onCellClick(e) {
589
- const r = this._injector.get(_);
590
- return C(
591
- r.currentClickedCell$.pipe(v((t) => !!t)).subscribe((t) => {
592
- e(t);
596
+ const t = this._injector.get(_);
597
+ return b(
598
+ t.currentClickedCell$.pipe(S((r) => !!r)).subscribe((r) => {
599
+ e(r);
593
600
  })
594
601
  );
595
602
  }
596
603
  onCellHover(e) {
597
- const r = this._injector.get(_);
598
- return C(
599
- r.currentRichText$.pipe(v((t) => !!t)).subscribe(e)
604
+ const t = this._injector.get(_);
605
+ return b(
606
+ t.currentRichText$.pipe(S((r) => !!r)).subscribe(e)
600
607
  );
601
608
  }
602
609
  onCellPointerDown(e) {
603
- const r = this._injector.get(_);
604
- return C(
605
- r.currentPointerDownCell$.subscribe(e)
610
+ const t = this._injector.get(_);
611
+ return b(
612
+ t.currentPointerDownCell$.subscribe(e)
606
613
  );
607
614
  }
608
615
  onCellPointerUp(e) {
609
- const r = this._injector.get(_);
610
- return C(
611
- r.currentPointerUpCell$.subscribe(e)
616
+ const t = this._injector.get(_);
617
+ return b(
618
+ t.currentPointerUpCell$.subscribe(e)
612
619
  );
613
620
  }
614
621
  onCellPointerMove(e) {
615
- const r = this._injector.get(_);
616
- return C(
617
- r.currentCellPosWithEvent$.pipe(v((t) => !!t)).subscribe((t) => {
618
- e(t, t.event);
622
+ const t = this._injector.get(_);
623
+ return b(
624
+ t.currentCellPosWithEvent$.pipe(S((r) => !!r)).subscribe((r) => {
625
+ e(r, r.event);
619
626
  })
620
627
  );
621
628
  }
622
629
  onDragOver(e) {
623
- const r = this._injector.get(U);
624
- return C(
625
- r.currentCell$.pipe(v((t) => !!t)).subscribe((t) => {
626
- e(t);
630
+ const t = this._injector.get(H);
631
+ return b(
632
+ t.currentCell$.pipe(S((r) => !!r)).subscribe((r) => {
633
+ e(r);
627
634
  })
628
635
  );
629
636
  }
630
637
  onDrop(e) {
631
- const r = this._injector.get(U);
632
- return C(
633
- r.endCell$.pipe(v((t) => !!t)).subscribe((t) => {
634
- e(t);
638
+ const t = this._injector.get(H);
639
+ return b(
640
+ t.endCell$.pipe(S((r) => !!r)).subscribe((r) => {
641
+ e(r);
635
642
  })
636
643
  );
637
644
  }
638
645
  startEditing() {
639
- return this._injector.get(I).syncExecuteCommand(P.id, {
646
+ return this._injector.get(P).syncExecuteCommand(M.id, {
640
647
  eventType: te.Dblclick,
641
648
  unitId: this._workbook.getUnitId(),
642
649
  visible: !0
643
650
  });
644
651
  }
645
652
  async endEditing(e) {
646
- return this._injector.get(I).syncExecuteCommand(P.id, {
653
+ return this._injector.get(P).syncExecuteCommand(M.id, {
647
654
  eventType: te.Keyboard,
648
- keycode: e ? B.ENTER : B.ESC,
655
+ keycode: e ? T.ENTER : T.ESC,
649
656
  visible: !1,
650
657
  unitId: this._workbook.getUnitId()
651
658
  }), await Ee(0), !0;
@@ -663,40 +670,40 @@ class Ne extends Ce {
663
670
  * ```
664
671
  */
665
672
  getScrollStateBySheetId(e) {
666
- const r = this._workbook.getUnitId(), i = this._injector.get(m).getRenderById(r);
667
- return i ? i.with(T).getScrollStateByParam({ unitId: r, sheetId: e }) : null;
673
+ const t = this._workbook.getUnitId(), i = this._injector.get(m).getRenderById(t);
674
+ return i ? i.with(B).getScrollStateByParam({ unitId: t, sheetId: e }) : null;
668
675
  }
669
676
  disableSelection() {
670
- const e = this._workbook.getUnitId(), t = this._injector.get(m).getRenderById(e);
671
- return t && t.with(H).disableSelection(), this;
677
+ const e = this._workbook.getUnitId(), r = this._injector.get(m).getRenderById(e);
678
+ return r && r.with(x).disableSelection(), this;
672
679
  }
673
680
  enableSelection() {
674
- const e = this._workbook.getUnitId(), t = this._injector.get(m).getRenderById(e);
675
- return t && t.with(H).enableSelection(), this;
681
+ const e = this._workbook.getUnitId(), r = this._injector.get(m).getRenderById(e);
682
+ return r && r.with(x).enableSelection(), this;
676
683
  }
677
684
  transparentSelection() {
678
- const e = this._workbook.getUnitId(), t = this._injector.get(m).getRenderById(e);
679
- return t && t.with(H).transparentSelection(), this;
685
+ const e = this._workbook.getUnitId(), r = this._injector.get(m).getRenderById(e);
686
+ return r && r.with(x).transparentSelection(), this;
680
687
  }
681
688
  showSelection() {
682
- const e = this._workbook.getUnitId(), t = this._injector.get(m).getRenderById(e);
683
- return t && t.with(H).showSelection(), this;
689
+ const e = this._workbook.getUnitId(), r = this._injector.get(m).getRenderById(e);
690
+ return r && r.with(x).showSelection(), this;
684
691
  }
685
692
  }
686
- Ce.extend(Ne);
687
- class Ve extends be {
693
+ Ce.extend(Ve);
694
+ class Ze extends me {
688
695
  refreshCanvas() {
689
- const e = this._injector.get(m), r = this._fWorkbook.id, t = e.getRenderById(r);
690
- if (!t)
691
- throw new Error(`Render Unit with unitId ${r} not found`);
692
- t.with(x).reCalculate();
693
- const i = t.mainComponent;
696
+ const e = this._injector.get(m), t = this._fWorkbook.id, r = e.getRenderById(t);
697
+ if (!r)
698
+ throw new Error(`Render Unit with unitId ${t} not found`);
699
+ r.with(R).reCalculate();
700
+ const i = r.mainComponent;
694
701
  if (!i)
695
702
  throw new Error("Main component not found");
696
703
  return i.makeDirty(), this;
697
704
  }
698
705
  zoom(e) {
699
- return this._injector.get(I).syncExecuteCommand(De.id, {
706
+ return this._injector.get(P).syncExecuteCommand(De.id, {
700
707
  unitId: this._workbook.getUnitId(),
701
708
  subUnitId: this._worksheet.getSheetId(),
702
709
  zoomRatio: e
@@ -706,26 +713,26 @@ class Ve extends be {
706
713
  return this._worksheet.getZoomRatio();
707
714
  }
708
715
  getVisibleRange() {
709
- const e = this._workbook.getUnitId(), t = this._injector.get(m).getRenderById(e);
716
+ const e = this._workbook.getUnitId(), r = this._injector.get(m).getRenderById(e);
710
717
  let i = {
711
718
  startColumn: 0,
712
719
  startRow: 0,
713
720
  endColumn: 0,
714
721
  endRow: 0
715
722
  };
716
- if (!t) return i;
717
- const s = t.with(x).getCurrentSkeleton();
723
+ if (!r) return i;
724
+ const s = r.with(R).getCurrentSkeleton();
718
725
  if (!s) return i;
719
- const c = s == null ? void 0 : s.getVisibleRanges();
720
- if (!c) return i;
726
+ const a = s == null ? void 0 : s.getVisibleRanges();
727
+ if (!a) return i;
721
728
  i = s.getVisibleRangeByViewport(Ie.VIEW_MAIN);
722
- for (const [g, b] of c)
723
- Pe.indexOf(g) !== -1 && (i.startColumn = Math.min(i.startColumn, b.startColumn), i.startRow = Math.min(i.startRow, b.startRow), i.endColumn = Math.max(i.endColumn, b.endColumn), i.endRow = Math.max(i.endRow, b.endRow));
729
+ for (const [g, v] of a)
730
+ Pe.indexOf(g) !== -1 && (i.startColumn = Math.min(i.startColumn, v.startColumn), i.startRow = Math.min(i.startRow, v.startRow), i.endColumn = Math.max(i.endColumn, v.endColumn), i.endRow = Math.max(i.endRow, v.endRow));
724
731
  return i;
725
732
  }
726
- scrollToCell(e, r) {
727
- const t = this._workbook.getUnitId(), o = this._injector.get(m).getRenderById(t);
728
- return o && (o == null ? void 0 : o.with(Te)).scrollToCell(e, r), this;
733
+ scrollToCell(e, t) {
734
+ const r = this._workbook.getUnitId(), o = this._injector.get(m).getRenderById(r);
735
+ return o && (o == null ? void 0 : o.with(Be)).scrollToCell(e, t), this;
729
736
  }
730
737
  getScrollState() {
731
738
  const e = {
@@ -733,65 +740,110 @@ class Ve extends be {
733
740
  offsetY: 0,
734
741
  sheetViewStartColumn: 0,
735
742
  sheetViewStartRow: 0
736
- }, r = this._workbook.getUnitId(), t = this._worksheet.getSheetId(), o = this._injector.get(m).getRenderById(r);
737
- return o && o.with(T).getScrollStateByParam({ unitId: r, sheetId: t }) || e;
743
+ }, t = this._workbook.getUnitId(), r = this._worksheet.getSheetId(), o = this._injector.get(m).getRenderById(t);
744
+ return o && o.with(B).getScrollStateByParam({ unitId: t, sheetId: r }) || e;
738
745
  }
739
746
  onScroll(e) {
740
747
  var o;
741
- const r = this._workbook.getUnitId(), i = (o = this._injector.get(m).getRenderById(r)) == null ? void 0 : o.with(T);
748
+ const t = this._workbook.getUnitId(), i = (o = this._injector.get(m).getRenderById(t)) == null ? void 0 : o.with(B);
742
749
  if (i) {
743
- const s = i.validViewportScrollInfo$.subscribe((c) => {
744
- e(c);
750
+ const s = i.validViewportScrollInfo$.subscribe((a) => {
751
+ e(a);
745
752
  });
746
- return C(s);
753
+ return b(s);
747
754
  }
748
- return C(() => {
755
+ return b(() => {
749
756
  });
750
757
  }
751
758
  getSkeleton() {
752
- var r, t;
753
- const e = (r = this._injector.get(m).getRenderById(this._workbook.getUnitId())) == null ? void 0 : r.with(x);
754
- return (t = e == null ? void 0 : e.getWorksheetSkeleton(this._worksheet.getSheetId())) == null ? void 0 : t.skeleton;
759
+ var t, r;
760
+ const e = (t = this._injector.get(m).getRenderById(this._workbook.getUnitId())) == null ? void 0 : t.with(R);
761
+ return (r = e == null ? void 0 : e.getWorksheetSkeleton(this._worksheet.getSheetId())) == null ? void 0 : r.skeleton;
755
762
  }
756
- setColumnAutoWidth(e, r) {
757
- const t = this._workbook.getUnitId(), i = this._worksheet.getSheetId(), o = [
763
+ setColumnAutoWidth(e, t) {
764
+ const r = this._workbook.getUnitId(), i = this._worksheet.getSheetId(), o = [
758
765
  {
759
766
  startColumn: e,
760
- endColumn: e + r - 1,
767
+ endColumn: e + t - 1,
761
768
  startRow: 0,
762
769
  endRow: this._worksheet.getRowCount() - 1
763
770
  }
764
771
  ];
765
- return this._commandService.syncExecuteCommand(Be.id, {
766
- unitId: t,
772
+ return this._commandService.syncExecuteCommand(Te.id, {
773
+ unitId: r,
767
774
  subUnitId: i,
768
775
  ranges: o
769
776
  }), this;
770
777
  }
778
+ customizeColumnHeader(e) {
779
+ var g, v;
780
+ const t = this, r = this._fWorkbook.getId(), i = this._injector.get(m), o = t.getSheetId(), s = i.getRenderById(r);
781
+ s && ((g = e.headerStyle) != null && g.size) && (s.with(R).setColumnHeaderSize(s, o, (v = e.headerStyle) == null ? void 0 : v.size), t == null || t.refreshCanvas());
782
+ const a = this._getSheetRenderComponent(r, k.COLUMN);
783
+ a && (a.setCustomHeader(e), t == null || t.refreshCanvas());
784
+ }
785
+ customizeRowHeader(e) {
786
+ const t = this._fWorkbook.getId();
787
+ this._getSheetRenderComponent(t, k.ROW).setCustomHeader(e);
788
+ }
789
+ setColumnHeaderHeight(e) {
790
+ const t = this, r = this._fWorkbook.getId(), i = t.getSheetId();
791
+ return this._commandService.executeCommand(Le.id, {
792
+ unitId: r,
793
+ subUnitId: i,
794
+ size: e
795
+ }), t == null || t.refreshCanvas(), this;
796
+ }
797
+ setRowHeaderWidth(e) {
798
+ const t = this, r = this._fWorkbook.getId(), i = t.getSheetId();
799
+ this._commandService.executeCommand(Ae.id, {
800
+ unitId: r,
801
+ subUnitId: i,
802
+ size: e
803
+ });
804
+ const o = this._getSheetRenderComponent(r, k.ROW);
805
+ return o && o.setCustomHeader({ headerStyle: { size: e } }), t == null || t.refreshCanvas(), this;
806
+ }
807
+ /**
808
+ * Get sheet render component from render by unitId and view key.
809
+ * @private
810
+ * @param {string} unitId The unit id of the spreadsheet.
811
+ * @param {SHEET_VIEW_KEY} viewKey The view key of the spreadsheet.
812
+ * @returns {Nullable<RenderComponentType>} The render component.
813
+ */
814
+ _getSheetRenderComponent(e, t) {
815
+ const i = this._injector.get(m).getRenderById(e);
816
+ if (!i)
817
+ throw new Error(`Render Unit with unitId ${e} not found`);
818
+ const { components: o } = i, s = o.get(t);
819
+ if (!s)
820
+ throw new Error("Render component not found");
821
+ return s;
822
+ }
771
823
  }
772
- be.extend(Ve);
773
- class Ze extends pe {
824
+ me.extend(Ze);
825
+ class Ke extends be {
774
826
  setPermissionDialogVisible(e) {
775
827
  this._permissionService.setShowComponents(e);
776
828
  }
777
829
  }
778
- pe.extend(Ze);
779
- class Ke extends j {
830
+ be.extend(Ke);
831
+ class Ye extends j {
780
832
  onCellPointerMove(e) {
781
- return C(this._injector.get(_).currentPosition$.subscribe(e));
833
+ return b(this._injector.get(_).currentPosition$.subscribe(e));
782
834
  }
783
835
  onCellPointerOver(e) {
784
- return C(this._injector.get(_).currentCell$.subscribe(e));
836
+ return b(this._injector.get(_).currentCell$.subscribe(e));
785
837
  }
786
838
  onCellDragOver(e) {
787
- return C(this._injector.get(U).currentCell$.subscribe(e));
839
+ return b(this._injector.get(H).currentCell$.subscribe(e));
788
840
  }
789
841
  onCellDrop(e) {
790
- return C(this._injector.get(U).endCell$.subscribe(e));
842
+ return b(this._injector.get(H).endCell$.subscribe(e));
791
843
  }
792
- onCellRender(e, r = we.Style, t = xe.DATA_VALIDATION) {
844
+ onCellRender(e, t = we.Style, r = xe.DATA_VALIDATION) {
793
845
  return this._injector.get(Ue).intercept(He.CELL_CONTENT, {
794
- effect: r,
846
+ effect: t,
795
847
  handler: (i, o, s) => s({
796
848
  ...i,
797
849
  customRender: [
@@ -799,24 +851,24 @@ class Ke extends j {
799
851
  ...e || []
800
852
  ]
801
853
  }),
802
- priority: t
854
+ priority: r
803
855
  });
804
856
  }
805
857
  onBeforeCellEdit(e) {
806
- return this._injector.get(I).beforeCommandExecuted((r) => {
807
- const t = r.params;
808
- r.id === P.id && t.visible && e(t);
858
+ return this._injector.get(P).beforeCommandExecuted((t) => {
859
+ const r = t.params;
860
+ t.id === M.id && r.visible && e(r);
809
861
  });
810
862
  }
811
863
  onAfterCellEdit(e) {
812
- return this._injector.get(I).onCommandExecuted((r) => {
813
- const t = r.params;
814
- r.id === P.id && !t.visible && e(t);
864
+ return this._injector.get(P).onCommandExecuted((t) => {
865
+ const r = t.params;
866
+ t.id === M.id && !r.visible && e(r);
815
867
  });
816
868
  }
817
869
  }
818
- j.extend(Ke);
819
- const y = {
870
+ j.extend(Ye);
871
+ const U = {
820
872
  CellClicked: "CellClicked",
821
873
  CellPointerDown: "CellPointerDown",
822
874
  CellPointerUp: "CellPointerUp",
@@ -830,7 +882,7 @@ const y = {
830
882
  SelectionMoveEnd: "SelectionMoveEnd",
831
883
  SelectionChanged: "SelectionChanged"
832
884
  };
833
- class ze extends ve {
885
+ class Xe extends ve {
834
886
  get BeforeClipboardChange() {
835
887
  return "BeforeClipboardChange";
836
888
  }
@@ -859,19 +911,19 @@ class ze extends ve {
859
911
  return "SheetEditEnded";
860
912
  }
861
913
  get CellClicked() {
862
- return y.CellClicked;
914
+ return U.CellClicked;
863
915
  }
864
916
  get CellHover() {
865
- return y.CellHover;
917
+ return U.CellHover;
866
918
  }
867
919
  get CellPointerDown() {
868
- return y.CellPointerDown;
920
+ return U.CellPointerDown;
869
921
  }
870
922
  get CellPointerUp() {
871
- return y.CellPointerUp;
923
+ return U.CellPointerUp;
872
924
  }
873
925
  get CellPointerMove() {
874
- return y.CellPointerMove;
926
+ return U.CellPointerMove;
875
927
  }
876
928
  get DragOver() {
877
929
  return "DragOver";
@@ -922,42 +974,42 @@ class ze extends ve {
922
974
  return "SheetSkeletonChanged";
923
975
  }
924
976
  }
925
- ve.extend(ze);
926
- class Ye extends me {
977
+ ve.extend(Xe);
978
+ class Je extends fe {
927
979
  getCell() {
928
- var c;
929
- const e = this._injector.get(m), r = this._injector.get(D), t = this._workbook.getUnitId(), i = this._worksheet.getSheetId(), o = e.getRenderById(t), s = (c = o == null ? void 0 : o.with(x).getWorksheetSkeleton(i)) == null ? void 0 : c.skeleton;
980
+ var a;
981
+ const e = this._injector.get(m), t = this._injector.get(D), r = this._workbook.getUnitId(), i = this._worksheet.getSheetId(), o = e.getRenderById(r), s = (a = o == null ? void 0 : o.with(R).getWorksheetSkeleton(i)) == null ? void 0 : a.skeleton;
930
982
  if (!s)
931
- throw r.error("[Facade]: `FRange.getCell` can only be called in current worksheet"), new Error("`FRange.getCell` can only be called in current worksheet");
983
+ throw t.error("[Facade]: `FRange.getCell` can only be called in current worksheet"), new Error("`FRange.getCell` can only be called in current worksheet");
932
984
  return s.getCellWithCoordByIndex(this._range.startRow, this._range.startColumn);
933
985
  }
934
986
  getCellRect() {
935
- 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 };
987
+ const { startX: e, startY: t, endX: r, endY: i } = this.getCell(), o = { x: e, y: t, width: r - e, height: i - t, top: t, left: e, bottom: i, right: r };
936
988
  return { ...o, toJSON: () => JSON.stringify(o) };
937
989
  }
938
990
  generateHTML() {
939
- var r;
991
+ var t;
940
992
  const e = this._injector.get(Se).generateCopyContent(
941
993
  this._workbook.getUnitId(),
942
994
  this._worksheet.getSheetId(),
943
995
  this._range
944
996
  );
945
- return (r = e == null ? void 0 : e.html) != null ? r : "";
997
+ return (t = e == null ? void 0 : e.html) != null ? t : "";
946
998
  }
947
999
  attachPopup(e) {
948
- var s, c, g;
949
- e.direction = (s = e.direction) != null ? s : "horizontal", e.extraProps = (c = e.extraProps) != null ? c : {}, e.offset = (g = e.offset) != null ? g : [0, 0];
950
- const { key: r, disposableCollection: t } = ge(e, this._injector.get(le)), o = this._injector.get(ie).attachPopupToCell(
1000
+ var s, a, g;
1001
+ e.direction = (s = e.direction) != null ? s : "horizontal", e.extraProps = (a = e.extraProps) != null ? a : {}, e.offset = (g = e.offset) != null ? g : [0, 0];
1002
+ const { key: t, disposableCollection: r } = ge(e, this._injector.get(le)), o = this._injector.get(ie).attachPopupToCell(
951
1003
  this._range.startRow,
952
1004
  this._range.startColumn,
953
- { ...e, componentKey: r },
1005
+ { ...e, componentKey: t },
954
1006
  this.getUnitId(),
955
1007
  this._worksheet.getSheetId()
956
1008
  );
957
- return o ? (t.add(o), t) : (t.dispose(), null);
1009
+ return o ? (r.add(o), r) : (r.dispose(), null);
958
1010
  }
959
1011
  attachAlertPopup(e) {
960
- const r = this._injector.get(Le), t = {
1012
+ const t = this._injector.get(We), r = {
961
1013
  workbook: this._workbook,
962
1014
  worksheet: this._worksheet,
963
1015
  row: this._range.startRow,
@@ -965,12 +1017,12 @@ class Ye extends me {
965
1017
  unitId: this.getUnitId(),
966
1018
  subUnitId: this._worksheet.getSheetId()
967
1019
  };
968
- return r.showAlert({
1020
+ return t.showAlert({
969
1021
  ...e,
970
- location: t
1022
+ location: r
971
1023
  }), {
972
1024
  dispose: () => {
973
- r.removeAlert(e.key);
1025
+ t.removeAlert(e.key);
974
1026
  }
975
1027
  };
976
1028
  }
@@ -987,31 +1039,31 @@ class Ye extends me {
987
1039
  });
988
1040
  */
989
1041
  attachRangePopup(e) {
990
- var s, c, g;
991
- e.direction = (s = e.direction) != null ? s : "horizontal", e.extraProps = (c = e.extraProps) != null ? c : {}, e.offset = (g = e.offset) != null ? g : [0, 0];
992
- const { key: r, disposableCollection: t } = ge(e, this._injector.get(le)), o = this._injector.get(ie).attachRangePopup(
1042
+ var s, a, g;
1043
+ e.direction = (s = e.direction) != null ? s : "top-center", e.extraProps = (a = e.extraProps) != null ? a : {}, e.offset = (g = e.offset) != null ? g : [0, 0];
1044
+ const { key: t, disposableCollection: r } = ge(e, this._injector.get(le)), o = this._injector.get(ie).attachRangePopup(
993
1045
  this._range,
994
- { ...e, componentKey: r },
1046
+ { ...e, componentKey: t },
995
1047
  this.getUnitId(),
996
1048
  this._worksheet.getSheetId()
997
1049
  );
998
- return o ? (t.add(o), t) : (t.dispose(), null);
1050
+ return o ? (r.add(o), r) : (r.dispose(), null);
999
1051
  }
1000
- highlight(e, r) {
1001
- const t = this._injector.get(Ae), i = t.addShape({ range: this._range, style: e, primary: r });
1052
+ highlight(e, t) {
1053
+ const r = this._injector.get($e), i = r.addShape({ range: this._range, style: e, primary: t });
1002
1054
  if (!i)
1003
1055
  throw new Error("Failed to highlight current range");
1004
- return C(() => {
1005
- t.removeShape(i);
1056
+ return b(() => {
1057
+ r.removeShape(i);
1006
1058
  });
1007
1059
  }
1008
1060
  }
1009
- me.extend(Ye);
1061
+ fe.extend(Je);
1010
1062
  function ge(w, e) {
1011
- const { componentKey: r, isVue3: t } = w;
1063
+ const { componentKey: t, isVue3: r } = w;
1012
1064
  let i;
1013
- const o = new W();
1014
- return typeof r == "string" ? i = r : (i = `External_${_e(6)}`, o.add(e.register(i, r, { framework: t ? "vue3" : "react" }))), {
1065
+ const o = new $();
1066
+ return typeof t == "string" ? i = t : (i = `External_${_e(6)}`, o.add(e.register(i, t, { framework: r ? "vue3" : "react" }))), {
1015
1067
  key: i,
1016
1068
  disposableCollection: o
1017
1069
  };