@univerjs/sheets-ui 0.6.3-nightly.202503071606 → 0.6.4-nightly.202503101606
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/index.js
CHANGED
|
@@ -2,11 +2,11 @@ var bp = Object.defineProperty;
|
|
|
2
2
|
var _p = (r, e, t) => e in r ? bp(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
3
|
var _ = (r, e, t) => _p(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import { DOCS_VIEW_KEY as wp, IEditorService as kr, getCanvasOffsetByEngine as cu, VIEWPORT_KEY as Ms, DOCS_COMPONENT_MAIN_LAYER_INDEX as Rp, BreakLineCommand as Ip, DeleteLeftCommand as yp, DocSelectionRenderService as _r, ReplaceSnapshotCommand as Nh, MoveSelectionOperation as Mp, MoveCursorOperation as Pp, SetInlineFormatBoldCommand as Ep, SetInlineFormatItalicCommand as Tp, SetInlineFormatUnderlineCommand as Op, SetInlineFormatStrikethroughCommand as xp, SetInlineFormatSubscriptCommand as Ap, SetInlineFormatSuperscriptCommand as kp, SetInlineFormatFontSizeCommand as Hp, SetInlineFormatFontFamilyCommand as Np, SetInlineFormatTextColorCommand as Vh, SetInlineFormatCommand as ko, NodePositionConvertToCursor as Dh, getLineBounding as Lh, DOC_VERTICAL_PADDING as Vp, IMEInputCommand as Dp, InsertCommand as Lp, CoverContentCommand as Wp, IRangeSelectorService as Bp } from "@univerjs/docs-ui";
|
|
5
|
-
import { CommandType as Q, createInterceptorKey as cr, ColorKit as Hn, RANGE_TYPE as z, convertCellToRange as Ps, UniverInstanceType as x, IUniverInstanceService as V, Quantity as dc, Disposable as de, toDisposable as We, Tools as ie, createIdentifier as vn, InterceptorManager as yi, ThemeService as Lt, Inject as N, Injector as It, IConfigService as Fn, ObjectMatrix as Je, Direction as W, isFormulaString as od, isFormulaId as Fp, CellValueType as jt, numfmt as Nn, ICommandService as D, IUndoRedoService as qt, Rectangle as he, sequenceExecute as yl, IContextService as He, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as De, EDITOR_ACTIVATED as $e, FOCUSING_EDITOR_STANDALONE as Ml, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Le, Workbook as Up, Optional as sd, FOCUSING_SHEET as kt, RxDisposable as Un, DisposableCollection as bt, IPermissionService as ot, fromEventSubject as Wh, sortRules as Xp, LocaleService as
|
|
5
|
+
import { CommandType as Q, createInterceptorKey as cr, ColorKit as Hn, RANGE_TYPE as z, convertCellToRange as Ps, UniverInstanceType as x, IUniverInstanceService as V, Quantity as dc, Disposable as de, toDisposable as We, Tools as ie, createIdentifier as vn, InterceptorManager as yi, ThemeService as Lt, Inject as N, Injector as It, IConfigService as Fn, ObjectMatrix as Je, Direction as W, isFormulaString as od, isFormulaId as Fp, CellValueType as jt, numfmt as Nn, ICommandService as D, IUndoRedoService as qt, Rectangle as he, sequenceExecute as yl, IContextService as He, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as De, EDITOR_ACTIVATED as $e, FOCUSING_EDITOR_STANDALONE as Ml, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Le, Workbook as Up, Optional as sd, FOCUSING_SHEET as kt, RxDisposable as Un, DisposableCollection as bt, IPermissionService as ot, fromEventSubject as Wh, sortRules as Xp, LocaleService as Ae, getReverseDirection as Bh, FOCUSING_FX_BAR_EDITOR as At, BooleanNumber as Ke, nameCharacterCheck as zp, debounce as uc, VerticalAlign as dn, HorizontalAlign as yt, WrapStrategy as wr, FOCUSING_UNIVER_EDITOR as Hr, FOCUSING_COMMON_DRAWINGS as Pl, FOCUSING_EDITOR_INPUT_FORMULA as Es, LocaleType as du, FOCUSING_EDITOR_BUT_HIDDEN as hc, generateRandomId as ld, DEFAULT_EMPTY_DOCUMENT_VALUE as Fh, LRUMap as jp, BaselineOffset as uu, DataStreamTreeTokenType as Yp, skipParseTagNames as Zp, CustomRangeType as ad, DEFAULT_WORKSHEET_ROW_HEIGHT as gc, ILogService as El, ErrorService as Gp, CellModeEnum as Uh, isNotNullOrUndefined as qp, extractPureTextFromCell as Xh, UserManagerService as Wt, DEFAULT_STYLES as cd, FontWeight as ts, FontItalic as ns, Dimension as zh, BorderStyleTypes as Oe, AbsoluteRefType as hu, NilCommand as dd, UndoCommandId as Qp, Range as Ss, cellToRange as Kp, handleStyleToString as gu, convertBodyToHtml as Jp, DEFAULT_WORKSHEET_COLUMN_WIDTH_KEY as mu, DEFAULT_WORKSHEET_COLUMN_WIDTH as fu, PresetListType as $p, isRealNum as jh, InterceptorEffectEnum as eS, splitIntoGrid as tS, IAuthzIoService as Tl, isValidRange as nS, DependentOn as Yh, Plugin as Zh, DocumentFlavor as rS, merge as iS, registerDependencies as pu, mergeOverrideWithDependencies as oS, touchDependencies as Sa } from "@univerjs/core";
|
|
6
6
|
import { IRenderManagerService as be, withCurrentTypeOfRenderer as ud, SHEET_VIEWPORT_KEY as U, CURSOR_TYPE as ye, Vector2 as ke, Rect as Ce, ScrollTimer as ri, ScrollTimerType as Et, DashedRect as sS, Group as va, TRANSFORM_CHANGE_OBSERVABLE_TYPE as mc, cancelRequestFrame as lS, requestNewFrame as aS, FIX_ONE_PIXEL_BLUR_OFFSET as cS, Layer as dS, SpreadsheetSkeleton as uS, DeviceInputEventType as Ye, convertTransformToOffsetX as Kr, convertTransformToOffsetY as Jr, convertTextRotation as hd, RENDER_RAW_FORMULA_KEY as hS, Spreadsheet as Gh, getCurrentTypeOfRenderer as gd, RENDER_CLASS_TYPE as gS, ScrollBar as md, fixLineWidthByScale as Su, ptToPixel as vu, Shape as fd, SHEET_EXTENSION_PREFIX as Cu, SpreadsheetRowHeader as mS, SpreadsheetColumnHeader as fS, Viewport as _n, hasCJKText as pS, DEFAULT_PADDING_DATA as SS, SheetExtension as qh, RegularPolygon as Yi, precisionTo as tr } from "@univerjs/engine-render";
|
|
7
7
|
import { useDependency as L, useObservable as gt, KeyCode as Z, Slider as vS, ComponentManager as Xn, DISABLE_AUTO_FOCUS_KEY as bu, useEvent as _u, useSidebarClick as Qh, MetaKeys as Te, ISidebarService as Mi, useComponentsOfPart as Kh, ComponentContainer as Jh, IConfirmService as rn, UI_PLUGIN_CONFIG_KEY as $h, UIMenu as CS, ContextMenuPosition as Rt, IMessageService as eg, IClipboardInterfaceService as Ol, IMenuManagerService as pd, ToolbarItem as bS, ILayoutService as xl, DEFAULT_BACKGROUND_COLOR_RGB as _S, DEFAULT_BACKGROUND_COLOR_RGBA as wS, handleStringToStyle as RS, textTrim as wu, INotificationService as IS, IPlatformService as yS, PLAIN_TEXT_CLIPBOARD_MIME_TYPE as Ru, HTML_CLIPBOARD_MIME_TYPE as Iu, imageMimeTypeSet as MS, FILE__BMP_CLIPBOARD_MIME_TYPE as PS, FILE__WEBP_CLIPBOARD_MIME_TYPE as ES, FILE__JPEG_CLIPBOARD_MIME_TYPE as TS, FILE_PNG_CLIPBOARD_MIME_TYPE as OS, CopyCommand as xS, CutCommand as AS, PasteCommand as kS, SheetPasteShortKeyCommandName as HS, IContextMenuService as Al, getMenuHiddenObservable as ue, MenuItemType as K, FONT_SIZE_LIST as NS, FONT_FAMILY_LIST as VS, IDialogService as Pi, ContextMenuGroup as Qe, RibbonStartGroup as Ca, IShortcutService as kl, IUIPartsService as Hl, FontFamily as tg, FontFamilyItem as ng, FontSize as rg, BuiltInUIPart as Ki, connectInjector as ii, ICanvasPopupService as DS, IZenZoneService as LS, UniverMobileUIPlugin as WS } from "@univerjs/ui";
|
|
8
8
|
import BS, { forwardRef as ft, useRef as An, createElement as ht, useState as ne, useMemo as Dt, useEffect as Ee, useCallback as Vn, useLayoutEffect as FS } from "react";
|
|
9
|
-
import { BehaviorSubject as Me, Subject as
|
|
9
|
+
import { BehaviorSubject as Me, Subject as xe, of as Re, merge as _t, map as Be, startWith as Gt, switchMap as ct, takeUntil as gi, distinctUntilChanged as un, throttleTime as ig, EMPTY as yu, filter as Nl, combineLatest as dt, combineLatestWith as dr, Observable as Xe, Subscription as rr, withLatestFrom as US } from "rxjs";
|
|
10
10
|
import { SELECTION_CONTROL_BORDER_BUFFER_WIDTH as Ts, SELECTION_CONTROL_BORDER_BUFFER_COLOR as rs, SELECTIONS_ENABLED as $r, REF_SELECTIONS_ENABLED as oo, SheetSkeletonService as XS, SheetsSelectionsService as $, SheetInterceptorService as zn, SetWorksheetRowAutoHeightMutationFactory as og, SetWorksheetRowAutoHeightMutation as yr, SetRangeValuesCommand as Ho, SetWorksheetRowIsAutoHeightCommand as Vl, SetStyleCommand as zS, MoveRangeCommand as Sd, ReorderRangeCommand as jS, rangeToDiscreteRange as Ji, SetSelectionsOperation as Pe, SetRangeValuesMutation as we, getSheetCommandTarget as Ue, generateNullCellValue as YS, SetRangeValuesUndoMutationFactory as nn, IRefSelectionsService as Dl, BEFORE_CELL_EDIT as ZS, SetWorksheetActiveOperation as rt, MoveRangeMutation as sr, RemoveRowMutation as No, RemoveColMutation as Vo, InsertRowMutation as Do, InsertColMutation as Lo, MoveRowsMutation as Ll, MoveColsMutation as Wl, SetWorksheetColWidthMutation as an, SetWorksheetRowHeightMutation as so, RemoveSheetMutation as Dn, RemoveMergeUndoMutationFactory as Bl, RemoveWorksheetMergeMutation as $t, AddWorksheetMergeMutation as en, getAddMergeMutationRangeByType as Fl, AddMergeUndoMutationFactory as Ul, WorkbookEditablePermission as J, WorksheetEditPermission as te, UnitAction as lo, alignToMergedCellsBorders as xn, getSelectionsService as Wo, SelectionMoveType as Yt, getCellAtRowCol as vs, expandToContinuousRange as GS, ScrollToCellOperation as vd, SetWorksheetShowCommand as Cd, WorksheetProtectionRuleModel as pt, RangeProtectionRuleModel as et, RangeProtectionCache as Bo, WorksheetViewPermission as sg, SetWorksheetOrderMutation as bd, InsertSheetMutation as Nr, SetWorksheetNameMutation as _d, SetWorksheetHideMutation as lr, SetWorksheetActivateCommand as wd, WorkbookManageCollaboratorPermission as lg, WorkbookRenameSheetPermission as ag, SetWorksheetOrderCommand as qS, SetWorksheetNameCommand as QS, SetTabColorMutation as KS, WorkbookCreateSheetPermission as cg, InsertSheetCommand as JS, COMMAND_LISTENER_SKELETON_CHANGE as Os, adjustRangeOnMutation as $S, getPrimaryForRange as dg, SetRowHiddenCommand as ug, SetColHiddenCommand as hg, SetBoldCommand as Rd, SetItalicCommand as Id, SetUnderlineCommand as yd, SetStrikeThroughCommand as Md, SetFontSizeCommand as Pd, SetFontFamilyCommand as Ed, SetTextColorCommand as gg, SetFrozenMutationFactory as mg, SetFrozenMutation as Rr, RangeProtectionPermissionEditPoint as re, IExclusiveRangeService as ev, CancelFrozenCommand as Cs, WorksheetSetRowStylePermission as Vr, SetRowHeightCommand as fg, SetRowHiddenMutation as pg, SetRowVisibleMutation as Sg, SetSelectedRowsVisibleCommand as vg, WorksheetSetCellStylePermission as Ge, WorksheetSetCellValuePermission as Jt, WorksheetSetColumnStylePermission as Dr, SetColWidthCommand as Cg, SetColHiddenMutation as bg, SetColVisibleMutation as _g, SetSelectedColsVisibleCommand as wg, SetTextRotationCommand as fc, SetTextWrapCommand as pc, SetVerticalTextAlignCommand as Sc, SetHorizontalTextAlignCommand as vc, ResetBackgroundColorCommand as Rg, SetBackgroundColorCommand as xs, WorksheetCopyPermission as As, RangeProtectionPermissionViewPoint as Cc, WorkbookCopyPermission as Zi, SetWorksheetRowIsAutoHeightMutation as tv, SetFrozenCommand as nv, InsertRangeMoveDownCommand as bc, InsertRangeMoveRightCommand as _c, InsertRowCommand as rv, InsertColCommand as iv, MoveColsCommand as Ig, MoveRowsCommand as yg, RemoveColCommand as Mg, RemoveRowCommand as Pg, MergeCellController as ov, MERGE_CELL_INTERCEPTOR_CHECK as sv, DeltaRowHeightCommand as lv, DeltaColumnWidthCommand as av, COMMAND_LISTENER_VALUE_CHANGE as cv, AddMergeRedoSelectionsOperationFactory as dv, AddMergeUndoSelectionsOperationFactory as uv, DeleteRangeMoveLeftCommand as Mu, DeleteRangeMoveUpCommand as Pu, EditStateEnum as cn, ViewStateEnum as mi, UnitObject as Nt, DeleteWorksheetProtectionCommand as ks, DeleteRangeProtectionMutation as Eu, AddRangeProtectionMutation as hv, RemoveSheetCommand as gv, AddWorksheetProtectionCommand as Eg, BorderStyleManagerService as wc, SCOPE_WORKBOOK_VALUE_DEFINED_NAME as Rc, InsertDefinedNameCommand as mv, SetDefinedNameCommand as fv, RemoveDefinedNameCommand as pv, SetBorderBasicCommand as Ic, ClearSelectionAllCommand as bs, ClearSelectionFormatCommand as $i, ClearSelectionContentCommand as oi, WorksheetDeleteRowPermission as Sv, WorksheetDeleteColumnPermission as vv, ToggleGridlinesCommand as Tg, ToggleGridlinesMutation as Cv, InsertMultiRowsAfterCommand as Og, WorksheetInsertRowPermission as Fo, InsertMultiRowsAboveCommand as Td, InsertMultiColsLeftCommand as xg, InsertColBeforeCommand as Ag, WorksheetInsertColumnPermission as kg, InsertRowBeforeCommand as Hg, RemoveWorksheetMergeCommand as Ng, WorkbookCreateProtectPermission as Xl, WorksheetDeleteProtectionPermission as Vg, WorksheetManageCollaboratorPermission as bv, SetWorksheetHideCommand as Dg, SetTabColorCommand as Lg, CopySheetCommand as Wg, WorkbookDeleteSheetPermission as _v, WorkbookHideSheetPermission as Bg, InsertMultiColsRightCommand as wv, AddWorksheetMergeCommand as Rv, AddWorksheetMergeHorizontalCommand as Iv, AddWorksheetMergeVerticalCommand as yv, AddWorksheetMergeAllCommand as Mv, ResetTextColorCommand as Pv, RefRangeService as Ev, MAX_CELL_PER_SHEET_KEY as Tv, INTERCEPTOR_POINT as Ov, SheetPermissionCheckController as Fg, INumfmtService as xv, SetProtectionCommand as Av, AddRangeProtectionCommand as kv, setEndForRange as Hv, baseProtectionActions as Nv, DeleteRangeProtectionCommand as Vv, WorksheetProtectionPointModel as Dv, SetWorksheetPermissionPointsCommand as Lv, getAllWorksheetPermissionPoint as Wv, convertSelectionDataToRange as Ug, UniverSheetsPlugin as Xg, RefSelectionsService as zg, ToggleCellCheckboxCommand as Bv, SheetPermissionInitController as Fv, SetSpecificRowsVisibleCommand as Uv, SetSpecificColsVisibleCommand as Xv } from "@univerjs/sheets";
|
|
11
11
|
import { DocSkeletonManagerService as ir, DocSelectionManagerService as Od, RichTextEditingMutation as Hs, SetTextSelectionsOperation as Uo } from "@univerjs/docs";
|
|
12
12
|
import { IDefinedNamesService as Xo, FUNCTION_NAMES_STATISTICAL as Fe, FUNCTION_NAMES_MATH as zl, FUNCTION_NAMES_TEXT as zv, sequenceNodeType as ba, matchToken as jg, LexerTreeBuilder as Yg, IFunctionService as Zg, SetFormulaCalculationNotificationMutation as jv, operatorToken as Qr, isReferenceStrings as Gg, isReferenceStringWithEffectiveColumn as Yv, serializeRangeWithSheet as qg, NullValueObject as Tu, serializeRange as Qg, deserializeRangeWithSheet as Kg } from "@univerjs/engine-formula";
|
|
@@ -785,12 +785,12 @@ class Dd extends de {
|
|
|
785
785
|
* eventSource: selectionShapeExtension selectionMoving$.next,
|
|
786
786
|
* Observer: prompt.controller
|
|
787
787
|
*/
|
|
788
|
-
_(this, "selectionMoving$", new
|
|
789
|
-
_(this, "selectionMoveEnd$", new
|
|
790
|
-
_(this, "selectionScaling$", new
|
|
791
|
-
_(this, "selectionScaled$", new
|
|
792
|
-
_(this, "selectionFilling$", new
|
|
793
|
-
_(this, "_selectionFilled$", new
|
|
788
|
+
_(this, "selectionMoving$", new xe());
|
|
789
|
+
_(this, "selectionMoveEnd$", new xe());
|
|
790
|
+
_(this, "selectionScaling$", new xe());
|
|
791
|
+
_(this, "selectionScaled$", new xe());
|
|
792
|
+
_(this, "selectionFilling$", new xe());
|
|
793
|
+
_(this, "_selectionFilled$", new xe());
|
|
794
794
|
_(this, "selectionFilled$", this._selectionFilled$.asObservable());
|
|
795
795
|
_(this, "_antLineOffset", 0);
|
|
796
796
|
_(this, "_antRequestNewFrame", -1);
|
|
@@ -1411,12 +1411,12 @@ class im extends de {
|
|
|
1411
1411
|
/**
|
|
1412
1412
|
* Mainly emit by pointermove in spreadsheet
|
|
1413
1413
|
*/
|
|
1414
|
-
_(this, "_selectionMoving$", new
|
|
1414
|
+
_(this, "_selectionMoving$", new xe());
|
|
1415
1415
|
/**
|
|
1416
1416
|
* Pointermove in spreadsheet
|
|
1417
1417
|
*/
|
|
1418
1418
|
_(this, "selectionMoving$", this._selectionMoving$.asObservable());
|
|
1419
|
-
_(this, "_selectionMoveStart$", new
|
|
1419
|
+
_(this, "_selectionMoveStart$", new xe());
|
|
1420
1420
|
_(this, "selectionMoveStart$", this._selectionMoveStart$.asObservable());
|
|
1421
1421
|
_(this, "_selectionMoving", !1);
|
|
1422
1422
|
_(this, "_selectionTheme");
|
|
@@ -4267,7 +4267,7 @@ let Si = class {
|
|
|
4267
4267
|
};
|
|
4268
4268
|
Si = ZC([
|
|
4269
4269
|
Uu(0, V),
|
|
4270
|
-
Uu(1, N(
|
|
4270
|
+
Uu(1, N(Ae))
|
|
4271
4271
|
], Si);
|
|
4272
4272
|
var Gl = /* @__PURE__ */ ((r) => (r.MergeAll = "mergeAll", r.MergeVertical = "mergeVertical", r.MergeHorizontal = "mergeHorizontal", r))(Gl || {});
|
|
4273
4273
|
function nr(r, e, t, n, i = !0, o = 1, s = !0) {
|
|
@@ -5657,7 +5657,7 @@ const O1 = () => {
|
|
|
5657
5657
|
const [, r] = ne({});
|
|
5658
5658
|
return Vn(() => r((e) => !e), []);
|
|
5659
5659
|
}, x1 = () => {
|
|
5660
|
-
const r = L(D), e = L(V), t = L(be), n = L(Lr), i = L(
|
|
5660
|
+
const r = L(D), e = L(V), t = L(be), n = L(Lr), i = L(Ae), [o, s] = ne([]), [l, a] = ne(!1), [c, d] = ne({ row: -1, col: -1 }), [u, h] = ne(Ve.SERIES), [g, m] = ne(!1), f = ur(), { sheetSkeletonManagerService: p, selectionRenderService: S } = Dt(() => {
|
|
5661
5661
|
if (f) {
|
|
5662
5662
|
const Y = t.getRenderById(f.getUnitId());
|
|
5663
5663
|
return {
|
|
@@ -5936,9 +5936,9 @@ class B1 {
|
|
|
5936
5936
|
_(this, "_focus", !1);
|
|
5937
5937
|
_(this, "_focus$", new Me(this._focus));
|
|
5938
5938
|
_(this, "focus$", this._focus$.asObservable());
|
|
5939
|
-
_(this, "_fxBtnClick$", new
|
|
5939
|
+
_(this, "_fxBtnClick$", new xe());
|
|
5940
5940
|
_(this, "fxBtnClick$", this._fxBtnClick$.asObservable());
|
|
5941
|
-
_(this, "_foldBtnStatus$", new
|
|
5941
|
+
_(this, "_foldBtnStatus$", new xe());
|
|
5942
5942
|
_(this, "foldBtnStatus$", this._foldBtnStatus$.asObservable());
|
|
5943
5943
|
}
|
|
5944
5944
|
dispose() {
|
|
@@ -5971,7 +5971,7 @@ const Kl = vn(
|
|
|
5971
5971
|
handler: async (r, e) => {
|
|
5972
5972
|
const t = r.get(Mi);
|
|
5973
5973
|
r.get(kr);
|
|
5974
|
-
const n = r.get(
|
|
5974
|
+
const n = r.get(Ae), i = r.get(V), o = Ue(i);
|
|
5975
5975
|
if (!o) return !1;
|
|
5976
5976
|
const { unitId: s } = o;
|
|
5977
5977
|
switch (e.value) {
|
|
@@ -5994,7 +5994,7 @@ const Kl = vn(
|
|
|
5994
5994
|
}
|
|
5995
5995
|
};
|
|
5996
5996
|
function F1(r) {
|
|
5997
|
-
const e = L(D), t = L(
|
|
5997
|
+
const e = L(D), t = L(Ae), n = L(Xo), i = L(V), o = L(Mi), l = i.getCurrentUnitForType(x.UNIVER_SHEET).getUnitId(), a = () => {
|
|
5998
5998
|
const g = n.getDefinedNameMap(l);
|
|
5999
5999
|
return g ? Array.from(Object.values(g)) : [];
|
|
6000
6000
|
}, [c, d] = ne(a());
|
|
@@ -6409,7 +6409,7 @@ class Mm extends de {
|
|
|
6409
6409
|
_(this, "_scrollX$");
|
|
6410
6410
|
_(this, "_addSheet$");
|
|
6411
6411
|
_(this, "_currentHandler", null);
|
|
6412
|
-
this._renameId$ = new
|
|
6412
|
+
this._renameId$ = new xe(), this.renameId$ = this._renameId$.asObservable(), this._removeId$ = new xe(), this.removeId$ = this._removeId$.asObservable(), this._scroll$ = new xe(), this.scroll$ = this._scroll$.asObservable(), this._scrollX$ = new xe(), this.scrollX$ = this._scrollX$.asObservable(), this._addSheet$ = new xe(), this.addSheet$ = this._addSheet$.asObservable();
|
|
6413
6413
|
}
|
|
6414
6414
|
setRenameId(t) {
|
|
6415
6415
|
this._renameId$.next(t);
|
|
@@ -6512,10 +6512,10 @@ function yb() {
|
|
|
6512
6512
|
}, [u, s, d, a]);
|
|
6513
6513
|
const m = Dt(() => r.map((f) => ({
|
|
6514
6514
|
type: "item",
|
|
6515
|
-
children: /* @__PURE__ */ q("div", { className: "univer-
|
|
6515
|
+
children: /* @__PURE__ */ q("div", { className: "univer-relative univer-box-border univer-pl-6", children: [
|
|
6516
6516
|
(f.selected || f.hidden) && /* @__PURE__ */ q("span", { className: "univer-absolute univer-left-1 univer-top-0.5", children: [
|
|
6517
|
-
f.selected && /* @__PURE__ */ b(Wr, { className: "univer-text-primary-600
|
|
6518
|
-
f.hidden && /* @__PURE__ */ b(Cm, { className: "univer-text-gray-400
|
|
6517
|
+
f.selected && /* @__PURE__ */ b(Wr, { className: "univer-size-4 univer-text-primary-600" }),
|
|
6518
|
+
f.hidden && /* @__PURE__ */ b(Cm, { className: "univer-size-4 univer-text-gray-400" })
|
|
6519
6519
|
] }),
|
|
6520
6520
|
/* @__PURE__ */ b(
|
|
6521
6521
|
"span",
|
|
@@ -7144,7 +7144,7 @@ _(ni, "DoubleClickDelay", 300);
|
|
|
7144
7144
|
let si = ni;
|
|
7145
7145
|
function Lb() {
|
|
7146
7146
|
var Ie;
|
|
7147
|
-
const [r, e] = ne([]), [t, n] = ne(""), [i, o] = ne(""), [s, l] = ne(!1), [a, c] = ne([0, 0]), d = An({ slideTabBar: null }), u = An(null), h = L(D), g = L(Br), m = L(
|
|
7147
|
+
const [r, e] = ne([]), [t, n] = ne(""), [i, o] = ne(""), [s, l] = ne(!1), [a, c] = ne([0, 0]), d = An({ slideTabBar: null }), u = An(null), h = L(D), g = L(Br), m = L(Ae), f = L(rn), p = L(Fn), S = L(it, dc.OPTIONAL), v = L(pt), C = L(et), w = gt(v.resetOrder$), R = ur(), I = L(ot), y = Vn(() => {
|
|
7148
7148
|
var ve;
|
|
7149
7149
|
const G = ((ve = R.getActiveSheet()) == null ? void 0 : ve.getSheetId()) || "";
|
|
7150
7150
|
n(G);
|
|
@@ -7519,7 +7519,7 @@ const Jl = vn("univer.sheet-status-bar.service"), Fb = "univer-status-bar", Ub =
|
|
|
7519
7519
|
[Fe.COUNTA]: "statusbar.countA",
|
|
7520
7520
|
[zv.CONCATENATE]: "concatenate"
|
|
7521
7521
|
}, Zb = (r) => {
|
|
7522
|
-
const e = L(
|
|
7522
|
+
const e = L(Ae), t = L(eg), n = L(Ol), i = Gb(r), o = async () => {
|
|
7523
7523
|
await n.writeText(r.value.toString()), t.show({
|
|
7524
7524
|
type: $g.Success,
|
|
7525
7525
|
content: e.t("statusbar.copied")
|
|
@@ -8578,7 +8578,7 @@ Lc = C_([
|
|
|
8578
8578
|
Mt(8, Zg),
|
|
8579
8579
|
Mt(9, N(Od)),
|
|
8580
8580
|
Mt(10, D),
|
|
8581
|
-
Mt(11, N(
|
|
8581
|
+
Mt(11, N(Ae)),
|
|
8582
8582
|
Mt(12, kr),
|
|
8583
8583
|
Mt(13, N(Ys)),
|
|
8584
8584
|
Mt(14, V),
|
|
@@ -10301,7 +10301,7 @@ qs = Z_([
|
|
|
10301
10301
|
Ot(8, yS),
|
|
10302
10302
|
Ot(9, be),
|
|
10303
10303
|
Ot(10, N(Lt)),
|
|
10304
|
-
Ot(11, N(
|
|
10304
|
+
Ot(11, N(Ae)),
|
|
10305
10305
|
Ot(12, N(Gp)),
|
|
10306
10306
|
Ot(13, N(It))
|
|
10307
10307
|
], qs);
|
|
@@ -10421,7 +10421,7 @@ const Kd = 998, mn = {
|
|
|
10421
10421
|
if (!o) return !1;
|
|
10422
10422
|
const { worksheet: s } = o, l = s.getVisibleRows();
|
|
10423
10423
|
if (um(l, t)) {
|
|
10424
|
-
const c = r.get(rn), d = r.get(
|
|
10424
|
+
const c = r.get(rn), d = r.get(Ae);
|
|
10425
10425
|
return await c.confirm({
|
|
10426
10426
|
id: "sheet.confirm.hide-row",
|
|
10427
10427
|
title: {
|
|
@@ -10446,7 +10446,7 @@ const Kd = 998, mn = {
|
|
|
10446
10446
|
if (!o) return !1;
|
|
10447
10447
|
const { worksheet: s } = o, l = s.getVisibleCols();
|
|
10448
10448
|
if (hm(l, t)) {
|
|
10449
|
-
const c = r.get(rn), d = r.get(
|
|
10449
|
+
const c = r.get(rn), d = r.get(Ae);
|
|
10450
10450
|
return await c.confirm({
|
|
10451
10451
|
id: "sheet.confirm.hide-col",
|
|
10452
10452
|
title: {
|
|
@@ -10790,7 +10790,7 @@ const la = {
|
|
|
10790
10790
|
sheetsUiContextMenuInputContainer: sw,
|
|
10791
10791
|
sheetsUiContextMenuInputNumber: lw
|
|
10792
10792
|
}, qm = (r) => {
|
|
10793
|
-
const { prefix: e, suffix: t, value: n, onChange: i, min: o = Number.MIN_SAFE_INTEGER, max: s = Number.MAX_SAFE_INTEGER } = r, l = L(
|
|
10793
|
+
const { prefix: e, suffix: t, value: n, onChange: i, min: o = Number.MIN_SAFE_INTEGER, max: s = Number.MAX_SAFE_INTEGER } = r, l = L(Ae), a = L(Al), [c, d] = ne(), u = (g) => {
|
|
10794
10794
|
var m;
|
|
10795
10795
|
d(g == null ? void 0 : g.toString()), i((m = g == null ? void 0 : g.toString()) != null ? m : "");
|
|
10796
10796
|
};
|
|
@@ -13300,9 +13300,11 @@ const l0 = 60;
|
|
|
13300
13300
|
let $s = class extends Un {
|
|
13301
13301
|
constructor(e, t, n, i, o) {
|
|
13302
13302
|
super();
|
|
13303
|
+
_(this, "_renderMetric$", new xe());
|
|
13304
|
+
_(this, "renderMetric$", this._renderMetric$.asObservable());
|
|
13303
13305
|
_(this, "_renderFrameTimeMetric", null);
|
|
13304
13306
|
_(this, "_renderFrameTags", {});
|
|
13305
|
-
_(this, "_afterRenderMetric$", new
|
|
13307
|
+
_(this, "_afterRenderMetric$", new xe());
|
|
13306
13308
|
this._context = e, this._sheetSkeletonManagerService = t, this._sheetRenderService = n, this._commandService = i, this._telemetryService = o, this._addNewRender(), this._initRenderMetricSubscriber();
|
|
13307
13309
|
}
|
|
13308
13310
|
_addNewRender() {
|
|
@@ -13319,7 +13321,6 @@ let $s = class extends Un {
|
|
|
13319
13321
|
}));
|
|
13320
13322
|
}
|
|
13321
13323
|
_initRenderMetricSubscriber() {
|
|
13322
|
-
if (!this._telemetryService) return;
|
|
13323
13324
|
const { engine: e } = this._context;
|
|
13324
13325
|
e.beginFrame$.subscribe(() => {
|
|
13325
13326
|
this._renderFrameTimeMetric = null, this._renderFrameTags = {};
|
|
@@ -13341,31 +13342,35 @@ let $s = class extends Un {
|
|
|
13341
13342
|
frameTime: Math.round(i.frameTime * 100) / 100,
|
|
13342
13343
|
...n.frameTimeMetric,
|
|
13343
13344
|
...n.tags
|
|
13344
|
-
}), t.length > l0 && (this.
|
|
13345
|
+
}), t.length > l0 && (this._captureRenderMetric(t), t.length = 0);
|
|
13345
13346
|
});
|
|
13346
13347
|
}
|
|
13347
|
-
|
|
13348
|
-
|
|
13348
|
+
/**
|
|
13349
|
+
* Send render metric to telemetry service
|
|
13350
|
+
* @param frameInfoList
|
|
13351
|
+
*/
|
|
13352
|
+
_captureRenderMetric(e) {
|
|
13353
|
+
var u;
|
|
13349
13354
|
const t = e;
|
|
13350
13355
|
if (t.length === 0) return;
|
|
13351
|
-
const n = (
|
|
13352
|
-
let
|
|
13353
|
-
const
|
|
13354
|
-
const
|
|
13355
|
-
return
|
|
13356
|
+
const n = (h) => {
|
|
13357
|
+
let g = 0;
|
|
13358
|
+
const f = Object.entries(h).filter(([S, v]) => Array.isArray(v)).map(([S]) => S).reduce((S, v) => {
|
|
13359
|
+
const C = h[v].reduce((w, R) => w + R, 0);
|
|
13360
|
+
return S[v] = C, S;
|
|
13356
13361
|
}, {});
|
|
13357
|
-
return Object.keys(
|
|
13358
|
-
|
|
13359
|
-
}), { ...
|
|
13360
|
-
}, i = e.map((
|
|
13361
|
-
const
|
|
13362
|
-
return
|
|
13363
|
-
max: Math.round(
|
|
13364
|
-
min: Math.round(
|
|
13365
|
-
avg: Math.round(
|
|
13366
|
-
},
|
|
13362
|
+
return Object.keys(h).filter((S) => S.startsWith(Cu)).forEach((S) => {
|
|
13363
|
+
g += f[S];
|
|
13364
|
+
}), { ...f, extensionTotal: g };
|
|
13365
|
+
}, i = e.map((h) => ({ ...h, ...n(h) })), s = ((h) => Object.entries(h[0]).filter(([f, p]) => !["elapsedTime"].includes(f)).filter(([f, p]) => typeof p == "number").map(([f]) => f).reduce((f, p) => {
|
|
13366
|
+
const S = h.map((R) => R[p]), v = Math.max(...S), C = Math.min(...S), w = S.reduce((R, I) => R + I, 0) / S.length;
|
|
13367
|
+
return f[p] = {
|
|
13368
|
+
max: Math.round(v * 100) / 100,
|
|
13369
|
+
min: Math.round(C * 100) / 100,
|
|
13370
|
+
avg: Math.round(w * 100) / 100
|
|
13371
|
+
}, f;
|
|
13367
13372
|
}, {}))(i), l = t[t.length - 1].elapsedTime, a = this._context.unit.getActiveSheet().getSheetId(), c = this._context.unit.getUnitId(), d = { sheetId: a, unitId: c, elapsedTimeToStart: l, ...s };
|
|
13368
|
-
this._telemetryService.capture("sheet_render_cost", d);
|
|
13373
|
+
this._renderMetric$.next(d), (u = this._telemetryService) == null || u.capture("sheet_render_cost", d);
|
|
13369
13374
|
}
|
|
13370
13375
|
_addComponent(e) {
|
|
13371
13376
|
const { scene: t, components: n } = this._context, i = e.getActiveSheet(), o = new Gh(Ze.MAIN);
|
|
@@ -13715,7 +13720,7 @@ const hr = {
|
|
|
13715
13720
|
type: Q.COMMAND,
|
|
13716
13721
|
id: "sheet.command.add-worksheet-merge",
|
|
13717
13722
|
handler: async (r, e) => {
|
|
13718
|
-
const t = r.get(D), n = r.get(qt), i = r.get(V), o = r.get(rn), s = r.get(
|
|
13723
|
+
const t = r.get(D), n = r.get(qt), i = r.get(V), o = r.get(rn), s = r.get(Ae), l = e.unitId, a = e.subUnitId, c = e.selections, d = Fl(c, e.value), u = i.getUniverSheetInstance(l).getSheetBySheetId(a), h = [], g = [], m = tf(u, d);
|
|
13719
13724
|
if (m && !e.defaultMerge && !await o.confirm({
|
|
13720
13725
|
id: "merge.confirm.add-worksheet-merge",
|
|
13721
13726
|
title: {
|
|
@@ -13815,7 +13820,7 @@ const hr = {
|
|
|
13815
13820
|
type: Q.COMMAND,
|
|
13816
13821
|
id: "sheet.command.delete-range-move-left-confirm",
|
|
13817
13822
|
handler: async (r) => {
|
|
13818
|
-
const e = r.get(rn), t = r.get(D), n = r.get(
|
|
13823
|
+
const e = r.get(rn), t = r.get(D), n = r.get(Ae), i = r.get($), o = r.get(V), s = i.getCurrentSelections();
|
|
13819
13824
|
if (!s)
|
|
13820
13825
|
return !1;
|
|
13821
13826
|
const l = Ue(o);
|
|
@@ -13841,7 +13846,7 @@ const hr = {
|
|
|
13841
13846
|
type: Q.COMMAND,
|
|
13842
13847
|
id: "sheet.command.delete-range-move-up-confirm",
|
|
13843
13848
|
handler: async (r) => {
|
|
13844
|
-
const e = r.get(rn), t = r.get(D), n = r.get(
|
|
13849
|
+
const e = r.get(rn), t = r.get(D), n = r.get(Ae), i = r.get($), o = r.get(V), s = i.getCurrentSelections();
|
|
13845
13850
|
if (!s) return !1;
|
|
13846
13851
|
const l = Ue(o);
|
|
13847
13852
|
if (!l) return !1;
|
|
@@ -13873,7 +13878,7 @@ const hr = {
|
|
|
13873
13878
|
type: Q.COMMAND,
|
|
13874
13879
|
id: "sheet.command.insert-range-move-down-confirm",
|
|
13875
13880
|
handler: async (r) => {
|
|
13876
|
-
const e = r.get(rn), t = r.get(D), n = r.get(
|
|
13881
|
+
const e = r.get(rn), t = r.get(D), n = r.get(Ae), i = r.get($), o = r.get(V), s = i.getCurrentSelections();
|
|
13877
13882
|
if (!s)
|
|
13878
13883
|
return !1;
|
|
13879
13884
|
const l = Ue(o);
|
|
@@ -13907,7 +13912,7 @@ const hr = {
|
|
|
13907
13912
|
type: Q.COMMAND,
|
|
13908
13913
|
id: "sheet.command.insert-range-move-right-confirm",
|
|
13909
13914
|
handler: async (r) => {
|
|
13910
|
-
const e = r.get(rn), t = r.get(D), n = r.get(
|
|
13915
|
+
const e = r.get(rn), t = r.get(D), n = r.get(Ae), i = r.get($), o = r.get(V), s = i.getCurrentSelections();
|
|
13911
13916
|
if (!s)
|
|
13912
13917
|
return !1;
|
|
13913
13918
|
const l = Ue(o);
|
|
@@ -14145,7 +14150,7 @@ const Bn = {
|
|
|
14145
14150
|
if (!s) return !1;
|
|
14146
14151
|
const { worksheet: l } = s, a = l.getVisibleRows();
|
|
14147
14152
|
if (um(a, [n])) {
|
|
14148
|
-
const d = r.get(rn), u = r.get(
|
|
14153
|
+
const d = r.get(rn), u = r.get(Ae);
|
|
14149
14154
|
return await d.confirm({
|
|
14150
14155
|
id: "sheet.confirm.remove-row",
|
|
14151
14156
|
title: {
|
|
@@ -14171,7 +14176,7 @@ const Bn = {
|
|
|
14171
14176
|
if (!s) return !1;
|
|
14172
14177
|
const { worksheet: l } = s, a = l.getVisibleCols();
|
|
14173
14178
|
if (hm(a, [n])) {
|
|
14174
|
-
const d = r.get(rn), u = r.get(
|
|
14179
|
+
const d = r.get(rn), u = r.get(Ae);
|
|
14175
14180
|
return await d.confirm({
|
|
14176
14181
|
id: "sheet.confirm.remove-col",
|
|
14177
14182
|
title: {
|
|
@@ -14188,7 +14193,7 @@ const Bn = {
|
|
|
14188
14193
|
id: "sheet.command.remove-sheet-confirm",
|
|
14189
14194
|
type: Q.COMMAND,
|
|
14190
14195
|
handler: async (r, e) => {
|
|
14191
|
-
const { subUnitId: t } = e, n = r.get(rn), i = r.get(D), o = r.get(
|
|
14196
|
+
const { subUnitId: t } = e, n = r.get(rn), i = r.get(D), o = r.get(Ae);
|
|
14192
14197
|
return await n.confirm({
|
|
14193
14198
|
id: "sheet.confirm.remove-sheet",
|
|
14194
14199
|
title: {
|
|
@@ -14729,7 +14734,7 @@ const Xa = {
|
|
|
14729
14734
|
hidden: d = !1,
|
|
14730
14735
|
// 是否对用户隐藏,与excel兼容,暂时用不上。
|
|
14731
14736
|
id: u
|
|
14732
|
-
} = r, g = L(V).getCurrentUnitForType(x.UNIVER_SHEET), m = L(
|
|
14737
|
+
} = r, g = L(V).getCurrentUnitForType(x.UNIVER_SHEET), m = L(Ae), f = L(Xo), p = L(Zg), S = L(Yg), v = L(Xn), C = Dt(() => v.get(nm), []), w = Dt(() => v.get(Hd), []);
|
|
14733
14738
|
if (g == null)
|
|
14734
14739
|
return;
|
|
14735
14740
|
const R = Dt(() => g.getUnitId(), []), I = Dt(() => g.getActiveSheet().getSheetId(), []), [y, M] = ne(s), [P, E] = ne(l), [T, A] = ne(a), [k, O] = ne(c), [H, F] = ne(""), [X, B] = ne(n), [j, Y] = ne(!0), le = [{
|
|
@@ -14860,7 +14865,7 @@ const Xa = {
|
|
|
14860
14865
|
] })
|
|
14861
14866
|
] });
|
|
14862
14867
|
}, mf = () => {
|
|
14863
|
-
const r = L(D), t = L(V).getCurrentUnitForType(x.UNIVER_SHEET), n = L(
|
|
14868
|
+
const r = L(D), t = L(V).getCurrentUnitForType(x.UNIVER_SHEET), n = L(Ae), i = L(Xo), o = L($);
|
|
14864
14869
|
if (t == null)
|
|
14865
14870
|
return;
|
|
14866
14871
|
const s = t.getUnitId(), l = () => {
|
|
@@ -17401,7 +17406,7 @@ var _R = Object.getOwnPropertyDescriptor, wR = (r, e, t, n) => {
|
|
|
17401
17406
|
let Po = class extends de {
|
|
17402
17407
|
constructor(e, t) {
|
|
17403
17408
|
super();
|
|
17404
|
-
_(this, "_currentAlert$", new
|
|
17409
|
+
_(this, "_currentAlert$", new xe());
|
|
17405
17410
|
_(this, "_currentAlert", /* @__PURE__ */ new Map());
|
|
17406
17411
|
_(this, "currentAlert$", this._currentAlert$.asObservable());
|
|
17407
17412
|
this._renderManagerService = e, this._canvasPopManagerService = t, this.disposeWithMe(() => {
|
|
@@ -17530,7 +17535,7 @@ const HR = "univer-sheet-paste-options-wrapper", NR = "univer-sheet-paste-option
|
|
|
17530
17535
|
positionY: E
|
|
17531
17536
|
};
|
|
17532
17537
|
}, UR = () => {
|
|
17533
|
-
const r = L(on), e = gt(r.showMenu$, !1), t = gt(r.pasteOptionsCache$, null), n = L(
|
|
17538
|
+
const r = L(on), e = gt(r.showMenu$, !1), t = gt(r.pasteOptionsCache$, null), n = L(Ae), i = L(D), [o, s] = ne(!1), [l, a] = ne(!1), c = t == null ? void 0 : t.target.pastedRange, d = FR(c);
|
|
17534
17539
|
if (!d || !e || d.positionX < 50 || d.positionY < 30) return null;
|
|
17535
17540
|
const u = o || l, h = (g) => {
|
|
17536
17541
|
a(!1), i.executeCommand(jm.id, { type: g });
|
|
@@ -18024,7 +18029,7 @@ const QR = [
|
|
|
18024
18029
|
let Ri = class extends Un {
|
|
18025
18030
|
constructor(e, t, n, i, o, s, l, a, c, d) {
|
|
18026
18031
|
super();
|
|
18027
|
-
_(this, "_refreshOptionalPaste$", new
|
|
18032
|
+
_(this, "_refreshOptionalPaste$", new xe());
|
|
18028
18033
|
_(this, "refreshOptionalPaste$", this._refreshOptionalPaste$.asObservable());
|
|
18029
18034
|
this._injector = e, this._instanceService = t, this._renderManagerService = n, this._commandService = i, this._contextService = o, this._configService = s, this._sheetClipboardService = l, this._messageService = a, this._localService = c, this._uiPartsService = d, this._init(), this._initCommandListener(), this._initUIComponents(), this._pasteWithDoc();
|
|
18030
18035
|
}
|
|
@@ -18534,7 +18539,7 @@ Ri = qR([
|
|
|
18534
18539
|
sn(5, Fn),
|
|
18535
18540
|
sn(6, on),
|
|
18536
18541
|
sn(7, eg),
|
|
18537
|
-
sn(8, N(
|
|
18542
|
+
sn(8, N(Ae)),
|
|
18538
18543
|
sn(9, Hl)
|
|
18539
18544
|
], Ri);
|
|
18540
18545
|
var KR = Object.getOwnPropertyDescriptor, JR = (r, e, t, n) => {
|
|
@@ -18545,14 +18550,14 @@ var KR = Object.getOwnPropertyDescriptor, JR = (r, e, t, n) => {
|
|
|
18545
18550
|
let Eo = class extends de {
|
|
18546
18551
|
constructor(e, t) {
|
|
18547
18552
|
super();
|
|
18548
|
-
_(this, "_currentCell$", new
|
|
18553
|
+
_(this, "_currentCell$", new xe());
|
|
18549
18554
|
_(this, "currentCell$", this._currentCell$.asObservable().pipe(un(
|
|
18550
18555
|
(e, t) => {
|
|
18551
18556
|
var n, i, o, s, l, a, c, d;
|
|
18552
18557
|
return ((n = e == null ? void 0 : e.location) == null ? void 0 : n.unitId) === ((i = t == null ? void 0 : t.location) == null ? void 0 : i.unitId) && ((o = e == null ? void 0 : e.location) == null ? void 0 : o.subUnitId) === ((s = t == null ? void 0 : t.location) == null ? void 0 : s.subUnitId) && ((l = e == null ? void 0 : e.location) == null ? void 0 : l.row) === ((a = t == null ? void 0 : t.location) == null ? void 0 : a.row) && ((c = e == null ? void 0 : e.location) == null ? void 0 : c.col) === ((d = t == null ? void 0 : t.location) == null ? void 0 : d.col);
|
|
18553
18558
|
}
|
|
18554
18559
|
)));
|
|
18555
|
-
_(this, "_endCell$", new
|
|
18560
|
+
_(this, "_endCell$", new xe());
|
|
18556
18561
|
_(this, "endCell$", this._endCell$.asObservable());
|
|
18557
18562
|
this._univerInstanceService = e, this._renderManagerService = t, this._initCellDisposableListener();
|
|
18558
18563
|
}
|
|
@@ -18836,21 +18841,21 @@ let Ar = class extends de {
|
|
|
18836
18841
|
super();
|
|
18837
18842
|
_(this, "_currentCell$", new Me(null));
|
|
18838
18843
|
_(this, "_currentRichText$", new Me(null));
|
|
18839
|
-
_(this, "_currentClickedCell$", new
|
|
18840
|
-
_(this, "_currentDbClickedCell$", new
|
|
18841
|
-
_(this, "_currentCellWithEvent$", new
|
|
18842
|
-
_(this, "_currentPointerDownCell$", new
|
|
18843
|
-
_(this, "_currentPointerUpCell$", new
|
|
18844
|
+
_(this, "_currentClickedCell$", new xe());
|
|
18845
|
+
_(this, "_currentDbClickedCell$", new xe());
|
|
18846
|
+
_(this, "_currentCellWithEvent$", new xe());
|
|
18847
|
+
_(this, "_currentPointerDownCell$", new xe());
|
|
18848
|
+
_(this, "_currentPointerUpCell$", new xe());
|
|
18844
18849
|
_(this, "_currentHoveredRowHeader$", new Me(null));
|
|
18845
18850
|
_(this, "_currentHoveredColHeader$", new Me(null));
|
|
18846
|
-
_(this, "_currentRowHeaderClick$", new
|
|
18847
|
-
_(this, "_currentColHeaderClick$", new
|
|
18848
|
-
_(this, "_currentRowHeaderDbClick$", new
|
|
18849
|
-
_(this, "_currentColHeaderDbClick$", new
|
|
18850
|
-
_(this, "_currentRowHeaderPointerDown$", new
|
|
18851
|
-
_(this, "_currentColHeaderPointerDown$", new
|
|
18852
|
-
_(this, "_currentRowHeaderPointerUp$", new
|
|
18853
|
-
_(this, "_currentColHeaderPointerUp$", new
|
|
18851
|
+
_(this, "_currentRowHeaderClick$", new xe());
|
|
18852
|
+
_(this, "_currentColHeaderClick$", new xe());
|
|
18853
|
+
_(this, "_currentRowHeaderDbClick$", new xe());
|
|
18854
|
+
_(this, "_currentColHeaderDbClick$", new xe());
|
|
18855
|
+
_(this, "_currentRowHeaderPointerDown$", new xe());
|
|
18856
|
+
_(this, "_currentColHeaderPointerDown$", new xe());
|
|
18857
|
+
_(this, "_currentRowHeaderPointerUp$", new xe());
|
|
18858
|
+
_(this, "_currentColHeaderPointerUp$", new xe());
|
|
18854
18859
|
// Notify when hovering over different cells
|
|
18855
18860
|
_(this, "currentCell$", this._currentCell$.asObservable().pipe(
|
|
18856
18861
|
un(
|
|
@@ -19165,7 +19170,7 @@ let sl = class extends de {
|
|
|
19165
19170
|
sl = aI([
|
|
19166
19171
|
cs(1, N(Ar)),
|
|
19167
19172
|
cs(2, N(Po)),
|
|
19168
|
-
cs(3, N(
|
|
19173
|
+
cs(3, N(Ae)),
|
|
19169
19174
|
cs(4, LS)
|
|
19170
19175
|
], sl);
|
|
19171
19176
|
var cI = Object.getOwnPropertyDescriptor, dI = (r, e, t, n) => {
|
|
@@ -19751,7 +19756,7 @@ To = yI([
|
|
|
19751
19756
|
Rn(3, Pi),
|
|
19752
19757
|
Rn(4, N(et)),
|
|
19753
19758
|
Rn(5, Lr),
|
|
19754
|
-
Rn(6, N(
|
|
19759
|
+
Rn(6, N(Ae)),
|
|
19755
19760
|
Rn(7, He),
|
|
19756
19761
|
Rn(8, N(Fg))
|
|
19757
19762
|
], To);
|
|
@@ -19945,7 +19950,7 @@ let Oo = class extends de {
|
|
|
19945
19950
|
Oo = TI([
|
|
19946
19951
|
Ui(0, V),
|
|
19947
19952
|
Ui(1, N($)),
|
|
19948
|
-
Ui(2, N(
|
|
19953
|
+
Ui(2, N(Ae)),
|
|
19949
19954
|
Ui(3, N(on)),
|
|
19950
19955
|
Ui(4, N(Fg))
|
|
19951
19956
|
], Oo);
|
|
@@ -20214,7 +20219,7 @@ hl = DI([
|
|
|
20214
20219
|
us(4, N(Bo))
|
|
20215
20220
|
], hl);
|
|
20216
20221
|
const op = (r, e, t, n, i) => {
|
|
20217
|
-
const o = r.get(
|
|
20222
|
+
const o = r.get(Ae), s = r.get(pt), l = r.get(et);
|
|
20218
20223
|
let a = "";
|
|
20219
20224
|
if (e.length === 0)
|
|
20220
20225
|
a = o.t("permission.panel.emptyRangeError");
|
|
@@ -20292,7 +20297,7 @@ const op = (r, e, t, n, i) => {
|
|
|
20292
20297
|
sheetPermissionPanelTitle: $I,
|
|
20293
20298
|
sheetPermissionPanelFooter: ey
|
|
20294
20299
|
}, ty = (r) => {
|
|
20295
|
-
const { viewState: e, editState: t, permissionId: n, ranges: i, rangesErrMsg: o, desc: s, oldRule: l, id: a } = r, c = L(wi), d = L(Mi), u = L(Tl), h = L(
|
|
20300
|
+
const { viewState: e, editState: t, permissionId: n, ranges: i, rangesErrMsg: o, desc: s, oldRule: l, id: a } = r, c = L(wi), d = L(Mi), u = L(Tl), h = L(Ae), g = L(D), m = L(Fr), p = L(V).getCurrentUnitForType(x.UNIVER_SHEET), S = p == null ? void 0 : p.getActiveSheet();
|
|
20296
20301
|
if (!p || !S)
|
|
20297
20302
|
return null;
|
|
20298
20303
|
const v = p.getUnitId(), C = S.getSheetId();
|
|
@@ -20418,7 +20423,7 @@ const op = (r, e, t, n, i) => {
|
|
|
20418
20423
|
)
|
|
20419
20424
|
] });
|
|
20420
20425
|
}, ny = (r) => {
|
|
20421
|
-
const { ranges: e, onRangesChange: t, desc: n, onDescChange: i, rangesErrMsg: o, permissionId: s } = r, l = L(Xn), a = Dt(() => l.get(nm), []), c = L(V), d = L(
|
|
20426
|
+
const { ranges: e, onRangesChange: t, desc: n, onDescChange: i, rangesErrMsg: o, permissionId: s } = r, l = L(Xn), a = Dt(() => l.get(nm), []), c = L(V), d = L(Ae), u = L(It), h = c.getCurrentUnitForType(x.UNIVER_SHEET), g = h == null ? void 0 : h.getActiveSheet();
|
|
20422
20427
|
if (!h || !g)
|
|
20423
20428
|
return null;
|
|
20424
20429
|
const m = h.getUnitId(), f = g.getSheetId(), p = (S) => {
|
|
@@ -20538,7 +20543,7 @@ const op = (r, e, t, n, i) => {
|
|
|
20538
20543
|
sheetPermissionPanelAddButton: Iy
|
|
20539
20544
|
}, yy = () => {
|
|
20540
20545
|
var k;
|
|
20541
|
-
const [r, e] = ne(!0), [t, n] = ne(!1), i = L(
|
|
20546
|
+
const [r, e] = ne(!0), [t, n] = ne(!1), i = L(Ae), o = L(et), s = L(pt), l = L(V), a = L(D), c = L(Mi), d = L(Tl), u = L(ot), g = L(Wt).getCurrentUser(), [m, f] = ne([]), p = L(Fr), S = gt(s.ruleRefresh$, ""), v = gt(o.ruleRefresh$, ""), C = l.getCurrentUnitForType(x.UNIVER_SHEET);
|
|
20542
20547
|
if (!C)
|
|
20543
20548
|
return null;
|
|
20544
20549
|
const w = C == null ? void 0 : C.getUnitId(), R = Vn(async (O) => {
|
|
@@ -20759,7 +20764,7 @@ const op = (r, e, t, n, i) => {
|
|
|
20759
20764
|
sheetPermissionUserDialogFooterConfirm: Vy,
|
|
20760
20765
|
sheetPermissionUserDialogButton: Dy
|
|
20761
20766
|
}, Ly = () => {
|
|
20762
|
-
const r = L(
|
|
20767
|
+
const r = L(Ae), e = L(V), t = L(Tl), n = L(Dv), i = L(Pi), o = L(ot), s = e.getCurrentUnitForType(x.UNIVER_SHEET), l = s.getActiveSheet();
|
|
20763
20768
|
if (!l)
|
|
20764
20769
|
throw new Error("No active sheet found");
|
|
20765
20770
|
const [a, c] = ne([]), d = L(D), [u, h] = ne(() => !!n.getRule(s.getUnitId(), l.getSheetId())), [g, m] = ne(() => Object.keys(as).reduce((p, S) => (p[S] = {
|
|
@@ -20901,7 +20906,7 @@ const op = (r, e, t, n, i) => {
|
|
|
20901
20906
|
sheetPermissionUserDialogButton: qy
|
|
20902
20907
|
}, Qy = () => {
|
|
20903
20908
|
var d;
|
|
20904
|
-
const [r, e] = ne(""), t = L(
|
|
20909
|
+
const [r, e] = ne(""), t = L(Ae), n = L(Pi), i = L(Fr), o = gt(i.userList$, i.userList), s = (d = o == null ? void 0 : o.filter((u) => {
|
|
20905
20910
|
var h;
|
|
20906
20911
|
return ((h = u.subject) == null ? void 0 : h.name.toLocaleLowerCase().includes(r.toLocaleLowerCase())) && u.role === Vt.Editor;
|
|
20907
20912
|
})) != null ? d : [], [l, a] = ne(i.selectUserList), c = (u) => {
|
|
@@ -20964,7 +20969,7 @@ const op = (r, e, t, n, i) => {
|
|
|
20964
20969
|
sheetPermissionAlertDialogTitle: Jy,
|
|
20965
20970
|
sheetPermissionAlertDialogButton: $y
|
|
20966
20971
|
}, eM = ({ errorMsg: r }) => {
|
|
20967
|
-
const e = L(
|
|
20972
|
+
const e = L(Ae), t = L(Pi);
|
|
20968
20973
|
return /* @__PURE__ */ q("div", { className: ic.sheetPermissionAlertDialog, children: [
|
|
20969
20974
|
/* @__PURE__ */ b("h1", { className: ic.sheetPermissionAlertDialogTitle, children: e.t("permission.dialog.alert") }),
|
|
20970
20975
|
/* @__PURE__ */ b("p", { children: r || e.t("permission.dialog.alertContent") }),
|
|
@@ -21059,7 +21064,7 @@ class sM extends qh {
|
|
|
21059
21064
|
}
|
|
21060
21065
|
}
|
|
21061
21066
|
const lM = (r) => {
|
|
21062
|
-
const { editState: e, onEditStateChange: t, viewState: n, onViewStateChange: i, permissionId: o } = r, s = L(
|
|
21067
|
+
const { editState: e, onEditStateChange: t, viewState: n, onViewStateChange: i, permissionId: o } = r, s = L(Ae), l = L(Pi), a = L(Tl), c = L(Fr), d = L(Wt), u = L(V), h = gt(c.selectUserList$, c.selectUserList), g = u.getCurrentUnitForType(x.UNIVER_SHEET), m = g == null ? void 0 : g.getActiveSheet();
|
|
21063
21068
|
if (!g || !m)
|
|
21064
21069
|
return null;
|
|
21065
21070
|
const f = g.getUnitId(), p = async () => {
|
|
@@ -1,21 +1,34 @@
|
|
|
1
1
|
import { Workbook, ICommandService, RxDisposable } from '@univerjs/core';
|
|
2
|
-
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
2
|
+
import { IRenderContext, IRenderModule, ISummaryMetric } from '@univerjs/engine-render';
|
|
3
3
|
import { ITelemetryService } from '@univerjs/telemetry';
|
|
4
4
|
import { SheetSkeletonManagerService } from '../../services/sheet-skeleton-manager.service';
|
|
5
5
|
import { SheetsRenderService } from '../../services/sheets-render.service';
|
|
6
|
+
export interface ITelemetryData {
|
|
7
|
+
unitId: string;
|
|
8
|
+
sheetId: string;
|
|
9
|
+
FPS: ISummaryMetric;
|
|
10
|
+
frameTime: ISummaryMetric;
|
|
11
|
+
elapsedTimeToStart: number;
|
|
12
|
+
}
|
|
6
13
|
export declare class SheetRenderController extends RxDisposable implements IRenderModule {
|
|
7
14
|
private readonly _context;
|
|
8
15
|
private readonly _sheetSkeletonManagerService;
|
|
9
16
|
private readonly _sheetRenderService;
|
|
10
17
|
private readonly _commandService;
|
|
11
18
|
private readonly _telemetryService?;
|
|
19
|
+
private _renderMetric$;
|
|
20
|
+
renderMetric$: import('rxjs').Observable<ITelemetryData>;
|
|
12
21
|
constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _sheetRenderService: SheetsRenderService, _commandService: ICommandService, _telemetryService?: ITelemetryService | undefined);
|
|
13
22
|
private _addNewRender;
|
|
14
23
|
private _renderFrameTimeMetric;
|
|
15
24
|
private _renderFrameTags;
|
|
16
25
|
private _afterRenderMetric$;
|
|
17
26
|
private _initRenderMetricSubscriber;
|
|
18
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Send render metric to telemetry service
|
|
29
|
+
* @param frameInfoList
|
|
30
|
+
*/
|
|
31
|
+
private _captureRenderMetric;
|
|
19
32
|
private _addComponent;
|
|
20
33
|
private _initViewports;
|
|
21
34
|
/**
|
|
@@ -161,9 +161,20 @@ interface IFRangeSheetsUIMixin {
|
|
|
161
161
|
* const fRange = fWorksheet.getRange('C3:E5');
|
|
162
162
|
* fRange.highlight();
|
|
163
163
|
*
|
|
164
|
-
* // Highlight the range C7:E9 with custom style
|
|
164
|
+
* // Highlight the range C7:E9 with custom style and primary cell D8
|
|
165
165
|
* const fRange2 = fWorksheet.getRange('C7:E9');
|
|
166
|
-
* const
|
|
166
|
+
* const primaryCell = fWorksheet.getRange('D8').getRange();
|
|
167
|
+
* const disposable = fRange2.highlight(
|
|
168
|
+
* {
|
|
169
|
+
* stroke: 'red',
|
|
170
|
+
* fill: 'yellow'
|
|
171
|
+
* },
|
|
172
|
+
* {
|
|
173
|
+
* ...primaryCell,
|
|
174
|
+
* actualRow: primaryCell.startRow,
|
|
175
|
+
* actualColumn: primaryCell.startColumn
|
|
176
|
+
* }
|
|
177
|
+
* );
|
|
167
178
|
*
|
|
168
179
|
* // Remove the range C7:E9 highlight after 5 seconds
|
|
169
180
|
* setTimeout(() => {
|
package/lib/types/index.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export { HeaderFreezeRenderController } from './controllers/render-controllers/f
|
|
|
27
27
|
export { HeaderMoveRenderController } from './controllers/render-controllers/header-move.render-controller';
|
|
28
28
|
export { HeaderResizeRenderController } from './controllers/render-controllers/header-resize.render-controller';
|
|
29
29
|
export { SheetsScrollRenderController } from './controllers/render-controllers/scroll.render-controller';
|
|
30
|
-
export { SheetRenderController } from './controllers/render-controllers/sheet.render-controller';
|
|
30
|
+
export { type ITelemetryData, SheetRenderController } from './controllers/render-controllers/sheet.render-controller';
|
|
31
31
|
export { SheetUIController } from './controllers/sheet-ui.controller';
|
|
32
32
|
export { whenFormulaEditorActivated, whenSheetEditorFocused } from './controllers/shortcuts/utils';
|
|
33
33
|
export { getCoordByCell, getCoordByOffset, getSheetObject, getTransformCoord } from './controllers/utils/component-tools';
|