@univerjs/sheets-ui 0.6.10-nightly.202504161609 → 0.6.10-nightly.202504181606

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/facade.js CHANGED
@@ -1,13 +1,13 @@
1
- import { ICommandService as I, CanceledError as E, IUniverInstanceService as $, RichTextValue as j, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as D, LifecycleService as ie, DisposableCollection as B, LifecycleStages as O, UniverInstanceType as oe, ILogService as U, toDisposable as C, awaitTime as se, InterceptorEffectEnum as ae, generateRandomId as ce } from "@univerjs/core";
1
+ import { ICommandService as I, CanceledError as E, IUniverInstanceService as $, RichTextValue as j, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as T, LifecycleService as ie, DisposableCollection as B, LifecycleStages as O, UniverInstanceType as oe, ILogService as U, toDisposable as C, awaitTime as se, InterceptorEffectEnum as ae, generateRandomId as ce } from "@univerjs/core";
2
2
  import { FUniver as q, FEventName as de } from "@univerjs/core/facade";
3
3
  import { RichTextEditingMutation as he } from "@univerjs/docs";
4
4
  import { IRenderManagerService as S, DeviceInputEventType as z, SHEET_VIEWPORT_KEY as le, sheetContentViewportKeys as ge } from "@univerjs/engine-render";
5
5
  import { SheetsSelectionsService as ue, COMMAND_LISTENER_SKELETON_CHANGE as ve, getSkeletonChangedEffectedRange as Se, SetWorksheetRowIsAutoHeightCommand as Ce, InterceptCellContentPriority as me, SheetInterceptorService as be, INTERCEPTOR_POINT as Ee } from "@univerjs/sheets";
6
- import { SetCellEditVisibleOperation as f, IEditorBridgeService as R, SetZoomRatioCommand as A, HoverManagerService as p, DragManagerService as M, SheetScrollManagerService as x, SheetPasteShortKeyCommand as L, ISheetClipboardService as Q, SheetSkeletonManagerService as _, SHEET_VIEW_KEY as w, ISheetSelectionRenderService as y, SheetsScrollRenderController as pe, SetWorksheetColAutoWidthCommand as we, SetColumnHeaderHeightCommand as fe, SetRowHeaderWidthCommand as ke, SheetCanvasPopManagerService as N, CellAlertManagerService as Ie, IMarkSelectionService as _e } from "@univerjs/sheets-ui";
6
+ import { SetCellEditVisibleOperation as f, IEditorBridgeService as R, SetZoomRatioCommand as A, HoverManagerService as p, DragManagerService as M, SheetScrollManagerService as x, SheetPasteShortKeyCommand as L, ISheetClipboardService as Q, SheetSkeletonManagerService as _, SHEET_VIEW_KEY as w, ISheetSelectionRenderService as y, SheetsScrollRenderController as pe, SetWorksheetColAutoWidthCommand as we, SetColumnHeaderHeightCommand as fe, SetRowHeaderWidthCommand as ke, SheetCanvasPopManagerService as N, CellAlertManagerService as Ie, IMarkSelectionService as _e, ISheetCellDropdownManagerService as Pe } from "@univerjs/sheets-ui";
7
7
  import { FSheetHooks as W, FWorkbook as ee, FWorksheet as te, FPermission as re, FRange as ne } from "@univerjs/sheets/facade";
8
- import { KeyCode as T, CutCommand as F, CopyCommand as V, PasteCommand as Z, IClipboardInterfaceService as Pe, PLAIN_TEXT_CLIPBOARD_MIME_TYPE as K, HTML_CLIPBOARD_MIME_TYPE as Y, supportClipboardAPI as X, ISidebarService as Re, IDialogService as He, ComponentManager as J } from "@univerjs/ui";
9
- import { filter as u, combineLatest as Me } from "rxjs";
10
- class ye extends q {
8
+ import { KeyCode as D, CutCommand as F, CopyCommand as V, PasteCommand as Z, IClipboardInterfaceService as Re, PLAIN_TEXT_CLIPBOARD_MIME_TYPE as K, HTML_CLIPBOARD_MIME_TYPE as Y, supportClipboardAPI as X, ISidebarService as He, IDialogService as Me, ComponentManager as J } from "@univerjs/ui";
9
+ import { filter as u, combineLatest as ye } from "rxjs";
10
+ class Ue extends q {
11
11
  // eslint-disable-next-line max-lines-per-function
12
12
  _initSheetUIEvent(e) {
13
13
  const r = e.get(I);
@@ -48,8 +48,8 @@ class ye extends q {
48
48
  workbook: o,
49
49
  worksheet: a,
50
50
  isZenEditor: !1,
51
- value: j.create(l.getUnit(D).getSnapshot()),
52
- isConfirm: s !== T.ESC
51
+ value: j.create(l.getUnit(T).getSnapshot()),
52
+ isConfirm: s !== D.ESC
53
53
  };
54
54
  if (this.fireEvent(this.Event.BeforeSheetEditEnd, P), P.cancel)
55
55
  throw new E();
@@ -91,7 +91,7 @@ class ye extends q {
91
91
  workbook: o,
92
92
  worksheet: a,
93
93
  isZenEditor: !1,
94
- isConfirm: g !== T.ESC
94
+ isConfirm: g !== D.ESC
95
95
  };
96
96
  this.fireEvent(this.Event.SheetEditEnded, c);
97
97
  }
@@ -105,13 +105,13 @@ class ye extends q {
105
105
  const { workbook: o, worksheet: a } = i, d = e.get(R), l = e.get($), h = t.params;
106
106
  if (!d.isVisible().visible) return;
107
107
  const { unitId: g } = h;
108
- if (g === D) {
108
+ if (g === T) {
109
109
  const { row: s, column: n } = d.getEditLocation(), c = {
110
110
  workbook: o,
111
111
  worksheet: a,
112
112
  row: s,
113
113
  column: n,
114
- value: j.create(l.getUnit(D).getSnapshot()),
114
+ value: j.create(l.getUnit(T).getSnapshot()),
115
115
  isZenEditor: !1
116
116
  };
117
117
  this.fireEvent(this.Event.SheetEditChanging, c);
@@ -351,7 +351,7 @@ class ye extends q {
351
351
  })), this.disposeWithMe(i);
352
352
  const o = /* @__PURE__ */ new Map();
353
353
  let a;
354
- const d = Me([
354
+ const d = ye([
355
355
  r.created$,
356
356
  t.lifecycle$
357
357
  ]);
@@ -534,7 +534,7 @@ class ye extends q {
534
534
  const e = this.getActiveWorkbook(), r = e == null ? void 0 : e.getActiveSheet();
535
535
  if (!e || !r)
536
536
  return;
537
- const o = (await this._injector.get(Pe).read())[0];
537
+ const o = (await this._injector.get(Re).read())[0];
538
538
  let a;
539
539
  if (o) {
540
540
  const d = o.types, l = d.indexOf(K) !== -1 ? await o.getType(K).then((g) => g && g.text()) : "", h = d.indexOf(Y) !== -1 ? await o.getType(Y).then((g) => g && g.text()) : "";
@@ -636,14 +636,14 @@ class ye extends q {
636
636
  return this._injector.createInstance(W);
637
637
  }
638
638
  }
639
- q.extend(ye);
640
- class Ue extends ee {
639
+ q.extend(Ue);
640
+ class xe extends ee {
641
641
  openSiderbar(e) {
642
- return this._logDeprecation("openSiderbar"), this._injector.get(Re).open(e);
642
+ return this._logDeprecation("openSiderbar"), this._injector.get(He).open(e);
643
643
  }
644
644
  openDialog(e) {
645
645
  this._logDeprecation("openDialog");
646
- const t = this._injector.get(He).open({
646
+ const t = this._injector.get(Me).open({
647
647
  ...e,
648
648
  onClose: () => {
649
649
  t.dispose();
@@ -723,7 +723,7 @@ class Ue extends ee {
723
723
  async endEditing(e) {
724
724
  return this._injector.get(I).syncExecuteCommand(f.id, {
725
725
  eventType: z.Keyboard,
726
- keycode: e ? T.ENTER : T.ESC,
726
+ keycode: e ? D.ENTER : D.ESC,
727
727
  visible: !1,
728
728
  unitId: this._workbook.getUnitId()
729
729
  }), await se(0), !0;
@@ -761,8 +761,8 @@ class Ue extends ee {
761
761
  return t && t.with(y).showSelection(), this;
762
762
  }
763
763
  }
764
- ee.extend(Ue);
765
- class xe extends te {
764
+ ee.extend(xe);
765
+ class De extends te {
766
766
  refreshCanvas() {
767
767
  const e = this._injector.get(S), r = this._fWorkbook.id, t = e.getRenderById(r);
768
768
  if (!t)
@@ -914,14 +914,14 @@ class xe extends te {
914
914
  return a;
915
915
  }
916
916
  }
917
- te.extend(xe);
917
+ te.extend(De);
918
918
  class Te extends re {
919
919
  setPermissionDialogVisible(e) {
920
920
  this._permissionService.setShowComponents(e);
921
921
  }
922
922
  }
923
923
  re.extend(Te);
924
- class De extends W {
924
+ class Be extends W {
925
925
  onCellPointerMove(e) {
926
926
  return C(this._injector.get(p).currentPosition$.subscribe(e));
927
927
  }
@@ -960,7 +960,7 @@ class De extends W {
960
960
  });
961
961
  }
962
962
  }
963
- W.extend(De);
963
+ W.extend(Be);
964
964
  const H = {
965
965
  CellClicked: "CellClicked",
966
966
  CellPointerDown: "CellPointerDown",
@@ -968,7 +968,7 @@ const H = {
968
968
  CellPointerMove: "CellPointerMove",
969
969
  CellHover: "CellHover"
970
970
  };
971
- class Be {
971
+ class Ae {
972
972
  get BeforeClipboardChange() {
973
973
  return "BeforeClipboardChange";
974
974
  }
@@ -1066,8 +1066,8 @@ class Be {
1066
1066
  return "SheetZoomChanged";
1067
1067
  }
1068
1068
  }
1069
- de.extend(Be);
1070
- class Ae extends ne {
1069
+ de.extend(Ae);
1070
+ class We extends ne {
1071
1071
  getCell() {
1072
1072
  var d;
1073
1073
  const e = this._injector.get(S), r = this._injector.get(U), t = this._workbook.getUnitId(), i = this._worksheet.getSheetId(), o = e.getRenderById(t), a = (d = o == null ? void 0 : o.with(_).getSkeletonParam(i)) == null ? void 0 : d.skeleton;
@@ -1149,8 +1149,11 @@ class Ae extends ne {
1149
1149
  t.removeShape(i);
1150
1150
  });
1151
1151
  }
1152
+ showDropdown(e) {
1153
+ return this._injector.get(Pe).showDropdown(e);
1154
+ }
1152
1155
  }
1153
- ne.extend(Ae);
1156
+ ne.extend(We);
1154
1157
  function G(b, e) {
1155
1158
  const { componentKey: r, isVue3: t } = b;
1156
1159
  let i;