@univerjs/sheets-ui 0.7.0 → 0.8.0-nightly.202505261607
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/cjs/facade.js +1 -1
- package/lib/cjs/index.js +20 -20
- package/lib/es/facade.js +16 -13
- package/lib/es/index.js +3751 -3585
- package/lib/facade.js +16 -13
- package/lib/index.css +1 -1
- package/lib/index.js +3751 -3585
- package/lib/types/controllers/config.schema.d.ts +11 -0
- package/lib/types/controllers/force-string-alert-render.controller.d.ts +3 -2
- package/lib/types/controllers/force-string-render.controller.d.ts +3 -2
- package/lib/types/controllers/menu/clear.menu.d.ts +1 -1
- package/lib/types/facade/f-workbook.d.ts +12 -0
- package/lib/types/index.d.ts +0 -2
- package/lib/types/locale/en-US.d.ts +464 -2
- package/lib/types/locale/fa-IR.d.ts +2 -2
- package/lib/types/locale/ru-RU.d.ts +2 -2
- package/lib/types/locale/vi-VN.d.ts +2 -2
- package/lib/types/locale/zh-CN.d.ts +2 -464
- package/lib/types/locale/zh-TW.d.ts +2 -2
- package/lib/types/views/sheet-bar/sheet-bar-tabs/SheetBarItem.d.ts +4 -3
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +20 -20
- package/package.json +14 -14
- package/LICENSE +0 -176
- package/lib/types/components/color-picker/index.d.ts +0 -17
- package/lib/types/components/color-picker/interface.d.ts +0 -16
- package/lib/types/components/font-family/index.d.ts +0 -18
- package/lib/types/components/font-family/interface.d.ts +0 -17
- package/lib/types/components/font-size/index.d.ts +0 -17
- package/lib/types/components/font-size/interface.d.ts +0 -16
package/lib/es/facade.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ICommandService as I, CanceledError as
|
|
1
|
+
import { ICommandService as I, CanceledError as b, 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
|
-
import { SheetsSelectionsService as ue, COMMAND_LISTENER_SKELETON_CHANGE as ve, getSkeletonChangedEffectedRange as Se, SetWorksheetRowIsAutoHeightCommand as Ce, InterceptCellContentPriority as me, SheetInterceptorService as
|
|
5
|
+
import { SheetsSelectionsService as ue, COMMAND_LISTENER_SKELETON_CHANGE as ve, getSkeletonChangedEffectedRange as Se, SetWorksheetRowIsAutoHeightCommand as Ce, InterceptCellContentPriority as me, SheetInterceptorService as Ee, INTERCEPTOR_POINT as be } from "@univerjs/sheets";
|
|
6
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
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";
|
|
@@ -29,7 +29,7 @@ class Ue extends q {
|
|
|
29
29
|
isZenEditor: !1
|
|
30
30
|
};
|
|
31
31
|
if (this.fireEvent(this.Event.BeforeSheetEditStart, c), c.cancel)
|
|
32
|
-
throw new
|
|
32
|
+
throw new b();
|
|
33
33
|
}
|
|
34
34
|
})
|
|
35
35
|
), this.registerEventHandler(
|
|
@@ -52,7 +52,7 @@ class Ue extends q {
|
|
|
52
52
|
isConfirm: s !== D.ESC
|
|
53
53
|
};
|
|
54
54
|
if (this.fireEvent(this.Event.BeforeSheetEditEnd, P), P.cancel)
|
|
55
|
-
throw new
|
|
55
|
+
throw new b();
|
|
56
56
|
}
|
|
57
57
|
})
|
|
58
58
|
), this.registerEventHandler(
|
|
@@ -129,7 +129,7 @@ class Ue extends q {
|
|
|
129
129
|
worksheet: a
|
|
130
130
|
};
|
|
131
131
|
if (this.fireEvent(this.Event.BeforeSheetZoomChange, d), d.cancel)
|
|
132
|
-
throw new
|
|
132
|
+
throw new b();
|
|
133
133
|
})
|
|
134
134
|
), this.registerEventHandler(
|
|
135
135
|
this.Event.SheetZoomChanged,
|
|
@@ -513,7 +513,7 @@ class Ue extends q {
|
|
|
513
513
|
_beforeClipboardChange() {
|
|
514
514
|
const e = this._generateClipboardCopyParam();
|
|
515
515
|
if (e && (this.fireEvent(this.Event.BeforeClipboardChange, e), e.cancel))
|
|
516
|
-
throw new
|
|
516
|
+
throw new b();
|
|
517
517
|
}
|
|
518
518
|
_clipboardChanged() {
|
|
519
519
|
const e = this._generateClipboardCopyParam();
|
|
@@ -550,12 +550,12 @@ class Ue extends q {
|
|
|
550
550
|
_beforeClipboardPaste(e) {
|
|
551
551
|
const r = this._generateClipboardPasteParam(e);
|
|
552
552
|
if (r && (this.fireEvent(this.Event.BeforeClipboardPaste, r), r.cancel))
|
|
553
|
-
throw new
|
|
553
|
+
throw new b();
|
|
554
554
|
}
|
|
555
555
|
_clipboardPaste(e) {
|
|
556
556
|
const r = this._generateClipboardPasteParam(e);
|
|
557
557
|
if (r && (this.fireEvent(this.Event.ClipboardPasted, r), r.cancel))
|
|
558
|
-
throw new
|
|
558
|
+
throw new b();
|
|
559
559
|
}
|
|
560
560
|
async _beforeClipboardPasteAsync() {
|
|
561
561
|
if (!X()) {
|
|
@@ -564,7 +564,7 @@ class Ue extends q {
|
|
|
564
564
|
}
|
|
565
565
|
const e = await this._generateClipboardPasteParamAsync();
|
|
566
566
|
if (e && (this.fireEvent(this.Event.BeforeClipboardPaste, e), e.cancel))
|
|
567
|
-
throw new
|
|
567
|
+
throw new b();
|
|
568
568
|
}
|
|
569
569
|
async _clipboardPasteAsync() {
|
|
570
570
|
if (!X()) {
|
|
@@ -573,7 +573,7 @@ class Ue extends q {
|
|
|
573
573
|
}
|
|
574
574
|
const e = await this._generateClipboardPasteParamAsync();
|
|
575
575
|
if (e && (this.fireEvent(this.Event.ClipboardPasted, e), e.cancel))
|
|
576
|
-
throw new
|
|
576
|
+
throw new b();
|
|
577
577
|
}
|
|
578
578
|
customizeColumnHeader(e) {
|
|
579
579
|
var h, g;
|
|
@@ -731,6 +731,9 @@ class xe extends ee {
|
|
|
731
731
|
endEditingAsync(e = !0) {
|
|
732
732
|
return this.endEditing(e);
|
|
733
733
|
}
|
|
734
|
+
abortEditingAsync() {
|
|
735
|
+
return this.endEditingAsync(!1);
|
|
736
|
+
}
|
|
734
737
|
/**
|
|
735
738
|
* Get scroll state of specified sheet.
|
|
736
739
|
* @param {string} sheetId - sheet id
|
|
@@ -935,7 +938,7 @@ class Be extends W {
|
|
|
935
938
|
return C(this._injector.get(M).endCell$.subscribe(e));
|
|
936
939
|
}
|
|
937
940
|
onCellRender(e, r = ae.Style, t = me.DATA_VALIDATION) {
|
|
938
|
-
return this._injector.get(
|
|
941
|
+
return this._injector.get(Ee).intercept(be.CELL_CONTENT, {
|
|
939
942
|
effect: r,
|
|
940
943
|
handler: (i, o, a) => a({
|
|
941
944
|
...i,
|
|
@@ -1154,8 +1157,8 @@ class We extends ne {
|
|
|
1154
1157
|
}
|
|
1155
1158
|
}
|
|
1156
1159
|
ne.extend(We);
|
|
1157
|
-
function G(
|
|
1158
|
-
const { componentKey: r, isVue3: t } =
|
|
1160
|
+
function G(E, e) {
|
|
1161
|
+
const { componentKey: r, isVue3: t } = E;
|
|
1159
1162
|
let i;
|
|
1160
1163
|
const o = new B();
|
|
1161
1164
|
return typeof r == "string" ? i = r : (i = `External_${ce(6)}`, o.add(e.register(i, r, { framework: t ? "vue3" : "react" }))), {
|