@univerjs/sheets-ui 0.8.0-nightly.202506051607 → 0.8.0-nightly.202506071606
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/index.js +2 -2
- package/lib/es/index.js +199 -170
- package/lib/index.js +199 -170
- package/lib/umd/index.js +2 -2
- package/package.json +13 -13
package/lib/index.js
CHANGED
|
@@ -2,12 +2,12 @@ var Mp = Object.defineProperty;
|
|
|
2
2
|
var Ep = (r, e, t) => e in r ? Mp(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
3
|
var b = (r, e, t) => Ep(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import { DOCS_VIEW_KEY as Tp, IEditorService as vi, getCanvasOffsetByEngine as ou, VIEWPORT_KEY as _s, DOCS_COMPONENT_MAIN_LAYER_INDEX as Pp, DocSelectionRenderService as gr, BreakLineCommand as xp, DeleteLeftCommand as Hh, DeleteRightCommand as Op, ReplaceSnapshotCommand as Vh, MoveSelectionOperation as Ap, MoveCursorOperation as Hp, SetInlineFormatBoldCommand as Vp, SetInlineFormatItalicCommand as kp, SetInlineFormatUnderlineCommand as Np, SetInlineFormatStrikethroughCommand as Dp, SetInlineFormatSubscriptCommand as Lp, SetInlineFormatSuperscriptCommand as Wp, SetInlineFormatFontSizeCommand as Bp, SetInlineFormatFontFamilyCommand as Fp, SetInlineFormatTextColorCommand as kh, SetInlineFormatCommand as Po, convertBodyToHtml as Up, NodePositionConvertToCursor as Nh, getLineBounding as Dh, DOC_VERTICAL_PADDING as Xp, IMEInputCommand as zp, InsertCommand as jp, CoverContentCommand as Yp } from "@univerjs/docs-ui";
|
|
5
|
-
import { CommandType as Q, createInterceptorKey as kn, ColorKit as xn, RANGE_TYPE as X, convertCellToRange as bs, UniverInstanceType as x, IUniverInstanceService as N, Quantity as uc, Disposable as oe, toDisposable as We, Tools as le, createIdentifier as jt, InterceptorManager as Si, ThemeService as At, Inject as k, Injector as bt, IConfigService as pn, generateRandomId as xo, ObjectMatrix as Ge, Direction as F, isFormulaString as ed, isFormulaId as Zp, CellValueType as Mt, numfmt as
|
|
5
|
+
import { CommandType as Q, createInterceptorKey as kn, ColorKit as xn, RANGE_TYPE as X, convertCellToRange as bs, UniverInstanceType as x, IUniverInstanceService as N, Quantity as uc, Disposable as oe, toDisposable as We, Tools as le, createIdentifier as jt, InterceptorManager as Si, ThemeService as At, Inject as k, Injector as bt, IConfigService as pn, generateRandomId as xo, ObjectMatrix as Ge, Direction as F, isFormulaString as ed, isFormulaId as Zp, CellValueType as Mt, numfmt as $t, ICommandService as L, IUndoRedoService as Yt, Rectangle as ae, sequenceExecute as Oo, IContextService as ke, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as Le, EDITOR_ACTIVATED as Je, FOCUSING_EDITOR_STANDALONE as yl, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as De, Workbook as Gp, Optional as td, FOCUSING_SHEET as Ht, RxDisposable as Nn, DisposableCollection as gt, IPermissionService as rt, fromEventSubject as Rs, sortRules as qp, LocaleService as Pe, getReverseDirection as Lh, FOCUSING_FX_BAR_EDITOR as Ot, BooleanNumber as Qe, nameCharacterCheck as Kp, throttle as Qp, debounce as hc, VerticalAlign as cn, HorizontalAlign as Rt, WrapStrategy as mr, FOCUSING_UNIVER_EDITOR as yr, FOCUSING_COMMON_DRAWINGS as Ml, FOCUSING_EDITOR_INPUT_FORMULA as Is, LocaleType as su, FOCUSING_EDITOR_BUT_HIDDEN as gc, DEFAULT_EMPTY_DOCUMENT_VALUE as Wh, LRUMap as Jp, BaselineOffset as lu, DataStreamTreeTokenType as $p, skipParseTagNames as ev, CustomRangeType as nd, DEFAULT_WORKSHEET_ROW_HEIGHT as mc, ILogService as El, ErrorService as tv, CellModeEnum as Bh, isNotNullOrUndefined as nv, extractPureTextFromCell as Fh, UserManagerService as Nt, DEFAULT_STYLES as rd, FontWeight as $o, FontItalic as es, composeStyles as rv, get as wa, Dimension as Uh, BorderStyleTypes as Ae, AbsoluteRefType as au, NilCommand as id, UndoCommandId as iv, willLoseNumericPrecision as ov, Range as gs, cellToRange as sv, handleStyleToString as cu, DEFAULT_WORKSHEET_COLUMN_WIDTH_KEY as du, DEFAULT_WORKSHEET_COLUMN_WIDTH as uu, PresetListType as lv, isRealNum as Xh, InterceptorEffectEnum as av, splitIntoGrid as cv, IAuthzIoService as Tl, isValidRange as dv, dayjs as hu, BuildTextUtils as uv, DependentOn as zh, Plugin as jh, DocumentFlavor as hv, set as gv, merge as mv, registerDependencies as gu, mergeOverrideWithDependencies as fv, touchDependencies as _a } from "@univerjs/core";
|
|
6
6
|
import { IRenderManagerService as Ce, withCurrentTypeOfRenderer as od, SHEET_VIEWPORT_KEY as U, CURSOR_TYPE as ye, Vector2 as Ve, Rect as we, ScrollTimer as Zr, ScrollTimerType as yt, DashedRect as pv, Group as ba, TRANSFORM_CHANGE_OBSERVABLE_TYPE as fc, cancelRequestFrame as vv, requestNewFrame as Sv, FIX_ONE_PIXEL_BLUR_OFFSET as Cv, Layer as wv, SpreadsheetSkeleton as _v, DeviceInputEventType as ze, convertTransformToOffsetX as Fr, convertTransformToOffsetY as Ur, convertTextRotation as sd, RENDER_RAW_FORMULA_KEY as bv, Spreadsheet as Yh, getCurrentTypeOfRenderer as Pl, RENDER_CLASS_TYPE as Rv, ScrollBar as ld, fixLineWidthByScale as mu, ptToPixel as fu, Shape as ad, SHEET_EXTENSION_PREFIX as pu, SpreadsheetRowHeader as Iv, SpreadsheetColumnHeader as yv, Viewport as Cn, hasCJKText as Mv, DEFAULT_PADDING_DATA as Ev, SheetExtension as Zh, RegularPolygon as Ui, precisionTo as Zn } from "@univerjs/engine-render";
|
|
7
|
-
import { useDependency as D, useObservable as ht, KeyCode as Y, ComponentManager as Zt, DISABLE_AUTO_FOCUS_KEY as vu, useEvent as Su, useSidebarClick as Gh, MetaKeys as Se, ISidebarService as Ci, useComponentsOfPart as qh, ComponentContainer as Kh, IConfirmService as
|
|
7
|
+
import { useDependency as D, useObservable as ht, KeyCode as Y, ComponentManager as Zt, DISABLE_AUTO_FOCUS_KEY as vu, useEvent as Su, useSidebarClick as Gh, MetaKeys as Se, ISidebarService as Ci, useComponentsOfPart as qh, ComponentContainer as Kh, IConfirmService as nn, useConfigValue as xl, UI_PLUGIN_CONFIG_KEY as Qh, UIMenu as Tv, ContextMenuPosition as Ct, Slider as Pv, IMessageService as Jh, IClipboardInterfaceService as Ol, IMenuManagerService as cd, ToolbarItem as xv, ILayoutService as Al, DEFAULT_BACKGROUND_COLOR_RGB as Ov, DEFAULT_BACKGROUND_COLOR_RGBA as Av, handleStringToStyle as Hv, textTrim as Cu, INotificationService as Vv, IPlatformService as kv, PLAIN_TEXT_CLIPBOARD_MIME_TYPE as wu, HTML_CLIPBOARD_MIME_TYPE as _u, imageMimeTypeSet as Nv, FILE__BMP_CLIPBOARD_MIME_TYPE as Dv, FILE__WEBP_CLIPBOARD_MIME_TYPE as Lv, FILE__JPEG_CLIPBOARD_MIME_TYPE as Wv, FILE_PNG_CLIPBOARD_MIME_TYPE as Bv, CopyCommand as Fv, CutCommand as Uv, PasteCommand as Xv, SheetPasteShortKeyCommandName as zv, IContextMenuService as Hl, getMenuHiddenObservable as ue, MenuItemType as J, COLOR_PICKER_COMPONENT as dd, FONT_SIZE_LIST as jv, FONT_SIZE_COMPONENT as Yv, FONT_FAMILY_LIST as Zv, FONT_FAMILY_COMPONENT as Gv, FONT_FAMILY_ITEM_COMPONENT as qv, IDialogService as Ao, ICanvasPopupService as Kv, ContextMenuGroup as Ke, RibbonPosition as Qv, RibbonStartGroup as ts, IShortcutService as Vl, IUIPartsService as kl, BuiltInUIPart as Zi, connectInjector as Gr, IZenZoneService as $h, RectPopup as Jv, UniverMobileUIPlugin as $v } from "@univerjs/ui";
|
|
8
8
|
import { forwardRef as dt, useRef as Tn, createElement as st, useState as re, useMemo as wt, useEffect as Me, useCallback as On, useLayoutEffect as eS } from "react";
|
|
9
|
-
import { BehaviorSubject as Ee, Subject as xe, of as Ie, merge as St, map as Be, startWith as xt, switchMap as at, takeUntil as ni, distinctUntilChanged as
|
|
10
|
-
import { SELECTION_CONTROL_BORDER_BUFFER_WIDTH as Ms, SELECTION_CONTROL_BORDER_BUFFER_COLOR as ns, SELECTIONS_ENABLED as Xr, REF_SELECTIONS_ENABLED as to, SheetSkeletonService as nS, SheetsSelectionsService as $, SheetInterceptorService as vn, MarkDirtyRowAutoHeightMutation as eg, CancelMarkDirtyRowAutoHeightMutation as tg, getSheetCommandTarget as Ue, SetWorksheetRowAutoHeightMutationFactory as ng, SetWorksheetRowAutoHeightMutation as Jn, rangeToDiscreteRange as Gi, SetSelectionsOperation as Te, SetRangeValuesMutation as be, generateNullCellValue as rS, SetRangeValuesUndoMutationFactory as
|
|
9
|
+
import { BehaviorSubject as Ee, Subject as xe, of as Ie, merge as St, map as Be, startWith as xt, switchMap as at, takeUntil as ni, distinctUntilChanged as dn, throttleTime as ys, EMPTY as bu, filter as Ho, combineLatest as ct, combineLatestWith as rr, Observable as je, Subscription as qn, withLatestFrom as tS, shareReplay as Ru } from "rxjs";
|
|
10
|
+
import { SELECTION_CONTROL_BORDER_BUFFER_WIDTH as Ms, SELECTION_CONTROL_BORDER_BUFFER_COLOR as ns, SELECTIONS_ENABLED as Xr, REF_SELECTIONS_ENABLED as to, SheetSkeletonService as nS, SheetsSelectionsService as $, SheetInterceptorService as vn, MarkDirtyRowAutoHeightMutation as eg, CancelMarkDirtyRowAutoHeightMutation as tg, getSheetCommandTarget as Ue, SetWorksheetRowAutoHeightMutationFactory as ng, SetWorksheetRowAutoHeightMutation as Jn, rangeToDiscreteRange as Gi, SetSelectionsOperation as Te, SetRangeValuesMutation as be, generateNullCellValue as rS, SetRangeValuesUndoMutationFactory as en, BEFORE_CELL_EDIT as iS, SetRangeValuesCommand as Nl, SetWorksheetActiveOperation as nt, MoveRangeMutation as $n, RemoveRowMutation as Vo, RemoveColMutation as ko, InsertRowMutation as No, InsertColMutation as Do, MoveRowsMutation as Dl, MoveColsMutation as Ll, SetWorksheetColWidthMutation as ln, SetWorksheetRowHeightMutation as no, RemoveSheetMutation as An, RemoveMergeUndoMutationFactory as Wl, RemoveWorksheetMergeMutation as Kt, AddWorksheetMergeMutation as Qt, getAddMergeMutationRangeByType as Bl, AddMergeUndoMutationFactory as Fl, WorkbookEditablePermission as K, WorksheetEditPermission as te, UnitAction as ro, alignToMergedCellsBorders as En, getSelectionsService as Lo, SelectionMoveType as Ft, getCellAtRowCol as ms, expandToContinuousRange as oS, ScrollToCellOperation as ud, SetWorksheetShowCommand as hd, WorksheetProtectionRuleModel as ft, RangeProtectionRuleModel as $e, RangeProtectionCache as Wo, WorksheetViewPermission as rg, SetWorksheetOrderMutation as gd, InsertSheetMutation as Mr, SetWorksheetNameMutation as md, SetWorksheetHideMutation as er, SetWorksheetActivateCommand as fd, WorkbookManageCollaboratorPermission as ig, WorkbookRenameSheetPermission as og, SetWorksheetOrderCommand as sS, SetWorksheetNameCommand as lS, SetTabColorMutation as aS, WorkbookCreateSheetPermission as sg, InsertSheetCommand as cS, ClearSelectionFormatCommand as qi, COMMAND_LISTENER_SKELETON_CHANGE as Es, adjustRangeOnMutation as dS, getPrimaryForRange as lg, SetRowHiddenCommand as ag, SetColHiddenCommand as cg, SetBoldCommand as pd, SetItalicCommand as vd, SetUnderlineCommand as Sd, SetStrikeThroughCommand as Cd, SetFontSizeCommand as wd, SetFontFamilyCommand as _d, SetTextColorCommand as dg, SetFrozenMutationFactory as ug, SetFrozenMutation as fr, RangeProtectionPermissionEditPoint as ie, IExclusiveRangeService as uS, CancelFrozenCommand as fs, SetWorksheetRowIsAutoHeightCommand as bd, WorksheetSetRowStylePermission as Er, SetRowHeightCommand as hg, SetRowHiddenMutation as gg, SetRowVisibleMutation as mg, SetSelectedRowsVisibleCommand as fg, WorksheetSetCellStylePermission as Ze, WorksheetSetCellValuePermission as qt, WorksheetSetColumnStylePermission as Tr, SetColWidthCommand as pg, SetColHiddenMutation as vg, SetColVisibleMutation as Sg, SetSelectedColsVisibleCommand as Cg, SetTextRotationCommand as pc, SetTextWrapCommand as vc, SetVerticalTextAlignCommand as Sc, SetHorizontalTextAlignCommand as Cc, ResetBackgroundColorCommand as wg, SetBackgroundColorCommand as Ts, WorksheetCopyPermission as Ps, RangeProtectionPermissionViewPoint as wc, WorkbookCopyPermission as Xi, SetWorksheetRowIsAutoHeightMutation as hS, SetFrozenCommand as gS, InsertRangeMoveDownCommand as _c, InsertRangeMoveRightCommand as bc, InsertRowCommand as mS, InsertColCommand as fS, MoveColsCommand as _g, MoveRowsCommand as bg, RemoveColCommand as Rg, RemoveRowCommand as Ig, MergeCellController as pS, MERGE_CELL_INTERCEPTOR_CHECK as vS, DeltaRowHeightCommand as SS, DeltaColumnWidthCommand as CS, COMMAND_LISTENER_VALUE_CHANGE as wS, AddMergeRedoSelectionsOperationFactory as _S, AddMergeUndoSelectionsOperationFactory as bS, DeleteRangeMoveLeftCommand as Iu, DeleteRangeMoveUpCommand as yu, EditStateEnum as an, ViewStateEnum as ri, UnitObject as Vt, DeleteWorksheetProtectionCommand as xs, DeleteRangeProtectionMutation as Mu, AddRangeProtectionMutation as RS, RemoveSheetCommand as IS, AddWorksheetProtectionCommand as yg, BorderStyleManagerService as Rc, RefRangeService as yS, IRefSelectionsService as Rd, SCOPE_WORKBOOK_VALUE_DEFINED_NAME as Ic, InsertDefinedNameCommand as MS, SetDefinedNameCommand as ES, RemoveDefinedNameCommand as TS, SetBorderBasicCommand as yc, ClearSelectionAllCommand as zi, ClearSelectionContentCommand as pr, WorksheetDeleteRowPermission as PS, WorksheetDeleteColumnPermission as xS, ToggleGridlinesCommand as Mg, ToggleGridlinesMutation as OS, InsertMultiRowsAfterCommand as Eg, WorksheetInsertRowPermission as Bo, InsertMultiRowsAboveCommand as Tg, InsertMultiColsRightCommand as Pg, InsertMultiColsLeftCommand as xg, InsertColBeforeCommand as Og, WorksheetInsertColumnPermission as Ag, InsertRowBeforeCommand as Hg, RemoveWorksheetMergeCommand as Vg, WorkbookCreateProtectPermission as Ul, WorksheetDeleteProtectionPermission as kg, WorksheetManageCollaboratorPermission as AS, SetWorksheetHideCommand as Ng, SetTabColorCommand as Dg, CopySheetCommand as Lg, WorkbookDeleteSheetPermission as HS, WorkbookHideSheetPermission as Wg, AddWorksheetMergeCommand as VS, AddWorksheetMergeHorizontalCommand as kS, AddWorksheetMergeVerticalCommand as NS, AddWorksheetMergeAllCommand as DS, ResetTextColorCommand as LS, MoveRangeCommand as Bg, MAX_CELL_PER_SHEET_KEY as WS, INTERCEPTOR_POINT as BS, SheetPermissionCheckController as Id, INumfmtService as FS, SetProtectionCommand as US, AddRangeProtectionCommand as XS, setEndForRange as zS, baseProtectionActions as jS, DeleteRangeProtectionCommand as YS, WorksheetProtectionPointModel as ZS, SetWorksheetPermissionPointsCommand as GS, getAllWorksheetPermissionPoint as qS, convertSelectionDataToRange as Fg, UniverSheetsPlugin as Ug, RefSelectionsService as Xg, ToggleCellCheckboxCommand as KS, SheetPermissionInitController as QS, SetSpecificRowsVisibleCommand as JS, SetSpecificColsVisibleCommand as $S } from "@univerjs/sheets";
|
|
11
11
|
import { DocSkeletonManagerService as Kn, DocSelectionManagerService as yd, RichTextEditingMutation as io, SetTextSelectionsOperation as Fo } from "@univerjs/docs";
|
|
12
12
|
import { IDefinedNamesService as Uo, FUNCTION_NAMES_STATISTICAL as Xe, FUNCTION_NAMES_MATH as Xl, FUNCTION_NAMES_TEXT as eC, sequenceNodeType as Ra, matchToken as zg, LexerTreeBuilder as jg, IFunctionService as Yg, SetFormulaCalculationNotificationMutation as tC, operatorToken as Br, isReferenceStrings as Zg, isReferenceStringWithEffectiveColumn as nC, serializeRangeWithSheet as Gg, NullValueObject as Eu, serializeRange as qg, deserializeRangeWithSheet as Kg } from "@univerjs/engine-formula";
|
|
13
13
|
import { isTextFormat as zl } from "@univerjs/engine-numfmt";
|
|
@@ -2678,8 +2678,8 @@ const DC = {
|
|
|
2678
2678
|
if (typeof r.s == "string") {
|
|
2679
2679
|
const i = e.get(N).getFocusedUnit().getStyles().get(r.s), o = (t = i == null ? void 0 : i.n) == null ? void 0 : t.pattern;
|
|
2680
2680
|
if (o)
|
|
2681
|
-
return
|
|
2682
|
-
} else if (r.s.n &&
|
|
2681
|
+
return $t.getFormatInfo(o).isDate;
|
|
2682
|
+
} else if (r.s.n && $t.getFormatInfo(r.s.n.pattern).isDate)
|
|
2683
2683
|
return !0;
|
|
2684
2684
|
}
|
|
2685
2685
|
return !1;
|
|
@@ -3151,7 +3151,7 @@ const xr = jt("univer.auto-fill-service"), hr = {
|
|
|
3151
3151
|
subUnitId: a,
|
|
3152
3152
|
unitId: l,
|
|
3153
3153
|
cellValue: rS([c])
|
|
3154
|
-
}, h =
|
|
3154
|
+
}, h = en(
|
|
3155
3155
|
r,
|
|
3156
3156
|
u
|
|
3157
3157
|
), { startColumn: g, startRow: m } = d, f = {
|
|
@@ -3480,7 +3480,7 @@ const qe = jt("univer.sheet-editor-bridge.service"), tt = {
|
|
|
3480
3480
|
function GC(r) {
|
|
3481
3481
|
return typeof r.isMainScene > "u";
|
|
3482
3482
|
}
|
|
3483
|
-
function
|
|
3483
|
+
function tn(r, e) {
|
|
3484
3484
|
const t = r instanceof Gp ? r : r.getCurrentUnitForType(x.UNIVER_SHEET);
|
|
3485
3485
|
if (!t) return null;
|
|
3486
3486
|
const n = t.getUnitId();
|
|
@@ -3544,7 +3544,7 @@ let ao = class extends oe {
|
|
|
3544
3544
|
return n ? (n.getConfig().zoomRatio = t, n === this._context.unit.getActiveSheet() && this._updateViewZoom(t), !0) : !1;
|
|
3545
3545
|
}
|
|
3546
3546
|
_initZoomEventListener() {
|
|
3547
|
-
const e =
|
|
3547
|
+
const e = tn(this._context.unit, this._context).scene;
|
|
3548
3548
|
this.disposeWithMe(
|
|
3549
3549
|
// hold ctrl & mousewheel ---> zoom
|
|
3550
3550
|
e.onMouseWheel$.subscribeEvent((t) => {
|
|
@@ -3586,7 +3586,7 @@ let ao = class extends oe {
|
|
|
3586
3586
|
*/
|
|
3587
3587
|
_updateViewZoom(e) {
|
|
3588
3588
|
this._zoom = e;
|
|
3589
|
-
const t =
|
|
3589
|
+
const t = tn(this._context.unit, this._context);
|
|
3590
3590
|
t == null || t.scene.scale(e, e), t == null || t.spreadsheet.makeForceDirty();
|
|
3591
3591
|
}
|
|
3592
3592
|
};
|
|
@@ -3658,7 +3658,7 @@ let Rr = class extends Nn {
|
|
|
3658
3658
|
this._renderManagerService.removeRender(t);
|
|
3659
3659
|
}
|
|
3660
3660
|
_initContextListener() {
|
|
3661
|
-
this.disposeWithMe(this._contextService.subscribeContextValue$(bv).pipe(
|
|
3661
|
+
this.disposeWithMe(this._contextService.subscribeContextValue$(bv).pipe(dn()).subscribe(() => {
|
|
3662
3662
|
this._renderManagerService.getRenderAll().forEach((e) => {
|
|
3663
3663
|
e.mainComponent instanceof Yh && e.mainComponent.makeForceDirty(!0);
|
|
3664
3664
|
});
|
|
@@ -3714,7 +3714,7 @@ let Ws = class extends oe {
|
|
|
3714
3714
|
Do.id,
|
|
3715
3715
|
Dl.id,
|
|
3716
3716
|
Ll.id,
|
|
3717
|
-
|
|
3717
|
+
ln.id,
|
|
3718
3718
|
no.id,
|
|
3719
3719
|
be.id
|
|
3720
3720
|
];
|
|
@@ -4039,7 +4039,7 @@ let Ws = class extends oe {
|
|
|
4039
4039
|
unitId: c,
|
|
4040
4040
|
cellValue: RC([a])
|
|
4041
4041
|
}, y = this._injector.invoke(
|
|
4042
|
-
|
|
4042
|
+
en,
|
|
4043
4043
|
R
|
|
4044
4044
|
);
|
|
4045
4045
|
o.push({ id: be.id, params: R }), i.unshift({ id: be.id, params: y });
|
|
@@ -4054,7 +4054,7 @@ let Ws = class extends oe {
|
|
|
4054
4054
|
unitId: c,
|
|
4055
4055
|
cellValue: E
|
|
4056
4056
|
}, P = this._injector.invoke(
|
|
4057
|
-
|
|
4057
|
+
en,
|
|
4058
4058
|
T
|
|
4059
4059
|
);
|
|
4060
4060
|
if (this._autoFillService.getActiveHooks().forEach((O) => {
|
|
@@ -4997,7 +4997,7 @@ let Et = class {
|
|
|
4997
4997
|
Et = h1([
|
|
4998
4998
|
g1(1, k(he))
|
|
4999
4999
|
], Et);
|
|
5000
|
-
const
|
|
5000
|
+
const un = {
|
|
5001
5001
|
id: "sheet.operation.set-scroll",
|
|
5002
5002
|
type: Q.OPERATION,
|
|
5003
5003
|
handler: (r, e) => {
|
|
@@ -5027,7 +5027,7 @@ const dn = {
|
|
|
5027
5027
|
offsetX: m = 0,
|
|
5028
5028
|
offsetY: f = 0
|
|
5029
5029
|
} = c || {};
|
|
5030
|
-
return t.executeCommand(
|
|
5030
|
+
return t.executeCommand(un.id, {
|
|
5031
5031
|
unitId: s,
|
|
5032
5032
|
sheetId: l,
|
|
5033
5033
|
// why + ySplit? receiver - ySplit in scroll.operation.ts
|
|
@@ -5040,7 +5040,7 @@ const dn = {
|
|
|
5040
5040
|
offsetY: f + u
|
|
5041
5041
|
});
|
|
5042
5042
|
}
|
|
5043
|
-
},
|
|
5043
|
+
}, hn = {
|
|
5044
5044
|
id: "sheet.command.scroll-view",
|
|
5045
5045
|
type: Q.COMMAND,
|
|
5046
5046
|
handler: (r, e) => {
|
|
@@ -5057,7 +5057,7 @@ const dn = {
|
|
|
5057
5057
|
offsetX: v,
|
|
5058
5058
|
offsetY: p
|
|
5059
5059
|
} = c || {}, { xSplit: C, ySplit: _ } = i.worksheet.getConfig().freeze;
|
|
5060
|
-
return r.get(L).syncExecuteCommand(
|
|
5060
|
+
return r.get(L).syncExecuteCommand(un.id, {
|
|
5061
5061
|
unitId: o.getUnitId(),
|
|
5062
5062
|
sheetId: s.getSheetId(),
|
|
5063
5063
|
// why + ySplit? receiver - ySplit in scroll.operation.ts
|
|
@@ -5083,7 +5083,7 @@ const dn = {
|
|
|
5083
5083
|
const e = r.get(N), t = Ue(e);
|
|
5084
5084
|
if (!t) return !1;
|
|
5085
5085
|
const { subUnitId: n, unitId: i } = t;
|
|
5086
|
-
return r.get(L).executeCommand(
|
|
5086
|
+
return r.get(L).executeCommand(un.id, {
|
|
5087
5087
|
unitId: i,
|
|
5088
5088
|
sheetId: n,
|
|
5089
5089
|
sheetViewStartRow: 0,
|
|
@@ -5190,7 +5190,7 @@ let ho = class extends oe {
|
|
|
5190
5190
|
o,
|
|
5191
5191
|
s
|
|
5192
5192
|
);
|
|
5193
|
-
this._commandService.executeCommand(
|
|
5193
|
+
this._commandService.executeCommand(hn.id, {
|
|
5194
5194
|
sheetViewStartRow: l,
|
|
5195
5195
|
sheetViewStartColumn: a,
|
|
5196
5196
|
offsetX: d,
|
|
@@ -5240,7 +5240,7 @@ let ho = class extends oe {
|
|
|
5240
5240
|
ySplit: n,
|
|
5241
5241
|
xSplit: i
|
|
5242
5242
|
} = t.getFreeze();
|
|
5243
|
-
return this._commandService.syncExecuteCommand(
|
|
5243
|
+
return this._commandService.syncExecuteCommand(hn.id, {
|
|
5244
5244
|
sheetViewStartRow: r - n,
|
|
5245
5245
|
sheetViewStartColumn: e - i,
|
|
5246
5246
|
offsetX: 0,
|
|
@@ -5307,7 +5307,7 @@ let ho = class extends oe {
|
|
|
5307
5307
|
}));
|
|
5308
5308
|
}
|
|
5309
5309
|
_getSheetObject() {
|
|
5310
|
-
return
|
|
5310
|
+
return tn(this._context.unit, this._context);
|
|
5311
5311
|
}
|
|
5312
5312
|
_scrollToSelectionByDirection(r) {
|
|
5313
5313
|
const e = this._getViewportBounding();
|
|
@@ -5398,7 +5398,7 @@ let ho = class extends oe {
|
|
|
5398
5398
|
const A = a.getHiddenRowsInRange({ startRow: _ - h, endRow: _ });
|
|
5399
5399
|
_ = _ - A.length;
|
|
5400
5400
|
}
|
|
5401
|
-
return this._commandService.syncExecuteCommand(
|
|
5401
|
+
return this._commandService.syncExecuteCommand(hn.id, {
|
|
5402
5402
|
// sheetViewStartRow & offsetX should never be undefined, it's rendering, there should always be a value!
|
|
5403
5403
|
// sheetViewStartRow: forceTop ? Math.max(0, row - freezeYSplit) : ((startSheetViewRow ?? 0) - freezeYSplit),
|
|
5404
5404
|
// sheetViewStartColumn: forceLeft ? Math.max(0, column - freezeXSplit) : ((startSheetViewColumn ?? 0) - freezeXSplit),
|
|
@@ -5704,7 +5704,7 @@ function z1() {
|
|
|
5704
5704
|
m(!1);
|
|
5705
5705
|
}, S = X1();
|
|
5706
5706
|
if (Me(() => r.onCommandExecuted((ce, ge) => {
|
|
5707
|
-
ce.id ===
|
|
5707
|
+
ce.id === un.id && S();
|
|
5708
5708
|
}).dispose, [S, r]), Me(() => {
|
|
5709
5709
|
const Z = v && We(
|
|
5710
5710
|
v.currentSkeleton$.subscribe((ce) => {
|
|
@@ -5738,7 +5738,7 @@ function z1() {
|
|
|
5738
5738
|
};
|
|
5739
5739
|
}, [l]), c.col < 0 || c.row < 0)
|
|
5740
5740
|
return null;
|
|
5741
|
-
const I =
|
|
5741
|
+
const I = tn(e, t);
|
|
5742
5742
|
if (!I || !p) return null;
|
|
5743
5743
|
const { scene: R } = I, y = v == null ? void 0 : v.getCurrentSkeleton(), M = p.getViewPort(), E = R == null ? void 0 : R.scaleX, T = R == null ? void 0 : R.scaleY, P = R == null ? void 0 : R.getViewportScrollXY(M);
|
|
5744
5744
|
if (!E || !R || !E || !T || !P) return null;
|
|
@@ -7097,7 +7097,7 @@ b(Yr, "DoubleClickDelay", 300);
|
|
|
7097
7097
|
let qr = Yr;
|
|
7098
7098
|
function nw() {
|
|
7099
7099
|
var _e;
|
|
7100
|
-
const [r, e] = re([]), [t, n] = re(""), [i, o] = re(""), [s, l] = re(!1), [a, c] = re([0, 0]), d = Tn({ slideTabBar: null }), u = Tn(null), h = D(L), g = D(Or), m = D(Pe), f = D(
|
|
7100
|
+
const [r, e] = re([]), [t, n] = re(""), [i, o] = re(""), [s, l] = re(!1), [a, c] = re([0, 0]), d = Tn({ slideTabBar: null }), u = Tn(null), h = D(L), g = D(Or), m = D(Pe), f = D(nn), v = D(qe, uc.OPTIONAL), p = D(ft), C = D($e), _ = ht(p.resetOrder$), S = Pr(), I = D(rt), R = On(() => {
|
|
7101
7101
|
var Fe;
|
|
7102
7102
|
const G = ((Fe = S.getActiveSheet()) == null ? void 0 : Fe.getSheetId()) || "";
|
|
7103
7103
|
n(G);
|
|
@@ -7536,7 +7536,7 @@ const ea = jt("univer.sheet-status-bar.service"), aw = [
|
|
|
7536
7536
|
};
|
|
7537
7537
|
function dw(r) {
|
|
7538
7538
|
const { pattern: e, value: t } = r;
|
|
7539
|
-
return typeof t != "number" ? 0 : t >= 1e8 ? t.toExponential(2) : e && aw.includes(r.name) ?
|
|
7539
|
+
return typeof t != "number" ? 0 : t >= 1e8 ? t.toExponential(2) : e && aw.includes(r.name) ? $t.format(e, t, { throws: !1 }) : t.toLocaleString();
|
|
7540
7540
|
}
|
|
7541
7541
|
const zu = 800, uw = 3, hw = () => {
|
|
7542
7542
|
var u, h;
|
|
@@ -7731,7 +7731,7 @@ let Us = class extends oe {
|
|
|
7731
7731
|
let S = c - l, I = d - a;
|
|
7732
7732
|
S < m && (S = Math.ceil(m)), I < f && (I = Math.ceil(f));
|
|
7733
7733
|
let R = 0;
|
|
7734
|
-
v ===
|
|
7734
|
+
v === cn.MIDDLE ? R = (I - f) / 2 / s : v === cn.TOP ? R = C.t || 0 : R = (I - f) / s;
|
|
7735
7735
|
let y = 0;
|
|
7736
7736
|
p === Rt.CENTER ? y = (S - m) / 2 / o : p === Rt.RIGHT ? y = (S - m) / o : y = C.l || 0, R = R < (C.t || 0) ? C.t || 0 : R, y = y < (C.l || 0) ? C.l || 0 : y, u.updateDocumentDataMargin({
|
|
7737
7737
|
t: R,
|
|
@@ -8040,7 +8040,7 @@ let Xs = class extends Nn {
|
|
|
8040
8040
|
});
|
|
8041
8041
|
}
|
|
8042
8042
|
_getSheetObject() {
|
|
8043
|
-
return
|
|
8043
|
+
return tn(this._context.unit, this._context);
|
|
8044
8044
|
}
|
|
8045
8045
|
_isCurrentSheetFocused() {
|
|
8046
8046
|
var e;
|
|
@@ -8307,7 +8307,7 @@ function Pw(r, e, t, n) {
|
|
|
8307
8307
|
if (i.startsWith("="))
|
|
8308
8308
|
return Ow(r, i, e, n);
|
|
8309
8309
|
const o = i.toLowerCase();
|
|
8310
|
-
return Nc[o] ? Nc[o] :
|
|
8310
|
+
return Nc[o] ? Nc[o] : $t.parseValue(i) == null ? r : i;
|
|
8311
8311
|
}
|
|
8312
8312
|
function xw(r) {
|
|
8313
8313
|
const e = /['"].*?['"]/g, t = [], n = r.split(e);
|
|
@@ -8340,11 +8340,11 @@ function Ow(r, e, t, n) {
|
|
|
8340
8340
|
const d = l.startIndex + s + 2, u = l.endIndex + s + 1;
|
|
8341
8341
|
o = Dr(r.slice(d, u), o, d, u);
|
|
8342
8342
|
} else if (l.nodeType !== Ra.ARRAY) {
|
|
8343
|
-
const d =
|
|
8343
|
+
const d = $t.parseValue(c);
|
|
8344
8344
|
if (d == null) {
|
|
8345
8345
|
const u = l.startIndex + s + 1, h = l.endIndex + s + 2;
|
|
8346
8346
|
o = Dr(r.slice(u, h), o, u, h);
|
|
8347
|
-
} else if (typeof d.v == "number" && (d.z === void 0 ||
|
|
8347
|
+
} else if (typeof d.v == "number" && (d.z === void 0 || !$t.getFormatInfo(d.z).isDate)) {
|
|
8348
8348
|
const u = `${d.v}`, h = l.startIndex + s + 1, g = l.endIndex + s + 2, { processedString: m, offset: f } = kw(c, u);
|
|
8349
8349
|
o = Dr(m, o, h, g), s += f;
|
|
8350
8350
|
}
|
|
@@ -8418,7 +8418,7 @@ let zs = class extends oe {
|
|
|
8418
8418
|
n && n.refreshEditorPosition();
|
|
8419
8419
|
}
|
|
8420
8420
|
})), this.disposeWithMe(
|
|
8421
|
-
this._editorBridgeService.visible$.pipe(
|
|
8421
|
+
this._editorBridgeService.visible$.pipe(dn((e, t) => e.visible === t.visible)).subscribe(async (e) => {
|
|
8422
8422
|
e.visible ? (this._editingUnit = e.unitId, this._handleEditorVisible(e)) : this._editingUnit && (await this._handleEditorInvisible(e), this._editingUnit = "");
|
|
8423
8423
|
})
|
|
8424
8424
|
);
|
|
@@ -9878,7 +9878,7 @@ const et = {
|
|
|
9878
9878
|
ci.use(r0);
|
|
9879
9879
|
ci.use(t0);
|
|
9880
9880
|
ci.use(n0);
|
|
9881
|
-
const
|
|
9881
|
+
const rn = jt("sheet.clipboard-service");
|
|
9882
9882
|
let Zs = class extends oe {
|
|
9883
9883
|
constructor(e, t, n, i, o, s, l, a, c, d, u, h, g, m) {
|
|
9884
9884
|
super();
|
|
@@ -10578,14 +10578,14 @@ function Hi() {
|
|
|
10578
10578
|
t: null
|
|
10579
10579
|
};
|
|
10580
10580
|
}
|
|
10581
|
-
const qd = 998,
|
|
10581
|
+
const qd = 998, gn = {
|
|
10582
10582
|
id: Fv.id,
|
|
10583
10583
|
name: "sheet.command.copy",
|
|
10584
10584
|
type: Q.COMMAND,
|
|
10585
10585
|
multi: !0,
|
|
10586
10586
|
priority: qd,
|
|
10587
10587
|
preconditions: jd,
|
|
10588
|
-
handler: async (r) => r.get(
|
|
10588
|
+
handler: async (r) => r.get(rn).copy()
|
|
10589
10589
|
}, Kd = {
|
|
10590
10590
|
id: Uv.id,
|
|
10591
10591
|
name: "sheet.command.cut",
|
|
@@ -10593,8 +10593,8 @@ const qd = 998, hn = {
|
|
|
10593
10593
|
multi: !0,
|
|
10594
10594
|
priority: qd,
|
|
10595
10595
|
preconditions: jd,
|
|
10596
|
-
handler: async (r) => r.get(
|
|
10597
|
-
},
|
|
10596
|
+
handler: async (r) => r.get(rn).cut()
|
|
10597
|
+
}, mn = {
|
|
10598
10598
|
id: Xv.id,
|
|
10599
10599
|
type: Q.COMMAND,
|
|
10600
10600
|
multi: !0,
|
|
@@ -10602,42 +10602,42 @@ const qd = 998, hn = {
|
|
|
10602
10602
|
priority: qd,
|
|
10603
10603
|
preconditions: jd,
|
|
10604
10604
|
handler: async (r, e) => {
|
|
10605
|
-
const n = await r.get(Ol).read(), i = r.get(
|
|
10605
|
+
const n = await r.get(Ol).read(), i = r.get(rn);
|
|
10606
10606
|
return n.length !== 0 ? i.paste(n[0], e == null ? void 0 : e.value) : !1;
|
|
10607
10607
|
}
|
|
10608
10608
|
}, Lc = {
|
|
10609
10609
|
id: zv,
|
|
10610
10610
|
type: Q.COMMAND,
|
|
10611
10611
|
handler: async (r, e) => {
|
|
10612
|
-
const t = r.get(
|
|
10612
|
+
const t = r.get(rn), { htmlContent: n, textContent: i, files: o } = e;
|
|
10613
10613
|
return t.legacyPaste(n, i, o), !0;
|
|
10614
10614
|
}
|
|
10615
10615
|
}, Qi = {
|
|
10616
10616
|
id: "sheet.command.paste-value",
|
|
10617
10617
|
type: Q.COMMAND,
|
|
10618
|
-
handler: async (r) => r.get(L).executeCommand(
|
|
10618
|
+
handler: async (r) => r.get(L).executeCommand(mn.id, { value: et.SPECIAL_PASTE_VALUE })
|
|
10619
10619
|
}, Ji = {
|
|
10620
10620
|
id: "sheet.command.paste-format",
|
|
10621
10621
|
type: Q.COMMAND,
|
|
10622
|
-
handler: async (r) => r.get(L).executeCommand(
|
|
10622
|
+
handler: async (r) => r.get(L).executeCommand(mn.id, {
|
|
10623
10623
|
value: et.SPECIAL_PASTE_FORMAT
|
|
10624
10624
|
})
|
|
10625
10625
|
}, Kr = {
|
|
10626
10626
|
id: "sheet.command.paste-col-width",
|
|
10627
10627
|
type: Q.COMMAND,
|
|
10628
|
-
handler: async (r) => r.get(L).executeCommand(
|
|
10628
|
+
handler: async (r) => r.get(L).executeCommand(mn.id, {
|
|
10629
10629
|
value: et.SPECIAL_PASTE_COL_WIDTH
|
|
10630
10630
|
})
|
|
10631
10631
|
}, $i = {
|
|
10632
10632
|
id: "sheet.command.paste-besides-border",
|
|
10633
10633
|
type: Q.COMMAND,
|
|
10634
|
-
handler: async (r) => r.get(L).executeCommand(
|
|
10634
|
+
handler: async (r) => r.get(L).executeCommand(mn.id, {
|
|
10635
10635
|
value: et.SPECIAL_PASTE_BESIDES_BORDER
|
|
10636
10636
|
})
|
|
10637
10637
|
}, jm = {
|
|
10638
10638
|
id: "sheet.command.optional-paste",
|
|
10639
10639
|
type: Q.COMMAND,
|
|
10640
|
-
handler: async (r, { type: e }) => r.get(
|
|
10640
|
+
handler: async (r, { type: e }) => r.get(rn).rePasteWithPasteType(e)
|
|
10641
10641
|
}, na = {
|
|
10642
10642
|
id: "sheet.command.hide-row-confirm",
|
|
10643
10643
|
type: Q.COMMAND,
|
|
@@ -10649,7 +10649,7 @@ const qd = 998, hn = {
|
|
|
10649
10649
|
if (!o) return !1;
|
|
10650
10650
|
const { worksheet: s } = o, l = s.getVisibleRows();
|
|
10651
10651
|
if (cm(l, t)) {
|
|
10652
|
-
const c = r.get(
|
|
10652
|
+
const c = r.get(nn), d = r.get(Pe);
|
|
10653
10653
|
return await c.confirm({
|
|
10654
10654
|
id: "sheet.confirm.hide-row",
|
|
10655
10655
|
title: {
|
|
@@ -10674,7 +10674,7 @@ const qd = 998, hn = {
|
|
|
10674
10674
|
if (!o) return !1;
|
|
10675
10675
|
const { worksheet: s } = o, l = s.getVisibleCols();
|
|
10676
10676
|
if (dm(l, t)) {
|
|
10677
|
-
const c = r.get(
|
|
10677
|
+
const c = r.get(nn), d = r.get(Pe);
|
|
10678
10678
|
return await c.confirm({
|
|
10679
10679
|
id: "sheet.confirm.hide-col",
|
|
10680
10680
|
title: {
|
|
@@ -10968,13 +10968,13 @@ let fo = class extends oe {
|
|
|
10968
10968
|
return {
|
|
10969
10969
|
undos: [
|
|
10970
10970
|
{
|
|
10971
|
-
id:
|
|
10971
|
+
id: ln.id,
|
|
10972
10972
|
params: h
|
|
10973
10973
|
}
|
|
10974
10974
|
],
|
|
10975
10975
|
redos: [
|
|
10976
10976
|
{
|
|
10977
|
-
id:
|
|
10977
|
+
id: ln.id,
|
|
10978
10978
|
params: u
|
|
10979
10979
|
}
|
|
10980
10980
|
]
|
|
@@ -11643,21 +11643,21 @@ const lh = [
|
|
|
11643
11643
|
{
|
|
11644
11644
|
label: "align.top",
|
|
11645
11645
|
icon: "AlignTopIcon",
|
|
11646
|
-
value:
|
|
11646
|
+
value: cn.TOP
|
|
11647
11647
|
},
|
|
11648
11648
|
{
|
|
11649
11649
|
label: "align.middle",
|
|
11650
11650
|
icon: "VerticalCenterIcon",
|
|
11651
|
-
value:
|
|
11651
|
+
value: cn.MIDDLE
|
|
11652
11652
|
},
|
|
11653
11653
|
{
|
|
11654
11654
|
label: "align.bottom",
|
|
11655
11655
|
icon: "AlignBottomIcon",
|
|
11656
|
-
value:
|
|
11656
|
+
value: cn.BOTTOM
|
|
11657
11657
|
}
|
|
11658
11658
|
];
|
|
11659
11659
|
function B0(r) {
|
|
11660
|
-
const e = r.get(N), t = r.get($), n =
|
|
11660
|
+
const e = r.get(N), t = r.get($), n = cn.BOTTOM;
|
|
11661
11661
|
return {
|
|
11662
11662
|
id: Sc.id,
|
|
11663
11663
|
icon: lh[2].icon,
|
|
@@ -11824,8 +11824,8 @@ function Zo(r) {
|
|
|
11824
11824
|
}
|
|
11825
11825
|
function Qr(r) {
|
|
11826
11826
|
return {
|
|
11827
|
-
id:
|
|
11828
|
-
commandId:
|
|
11827
|
+
id: gn.name,
|
|
11828
|
+
commandId: gn.id,
|
|
11829
11829
|
type: J.BUTTON,
|
|
11830
11830
|
title: "rightClick.copy",
|
|
11831
11831
|
icon: "CopyDoubleIcon",
|
|
@@ -11839,8 +11839,8 @@ function Qr(r) {
|
|
|
11839
11839
|
}
|
|
11840
11840
|
function Oa(r) {
|
|
11841
11841
|
return {
|
|
11842
|
-
id:
|
|
11843
|
-
commandId:
|
|
11842
|
+
id: mn.name,
|
|
11843
|
+
commandId: mn.id,
|
|
11844
11844
|
type: J.BUTTON,
|
|
11845
11845
|
title: "rightClick.paste",
|
|
11846
11846
|
icon: "PasteSpecialDoubleIcon",
|
|
@@ -12166,7 +12166,7 @@ function $0(r) {
|
|
|
12166
12166
|
}
|
|
12167
12167
|
const a = e.onCommandExecuted((c) => {
|
|
12168
12168
|
const d = c.id;
|
|
12169
|
-
if (d === be.id || d === Te.id || d ===
|
|
12169
|
+
if (d === be.id || d === Te.id || d === ln.id)
|
|
12170
12170
|
return l();
|
|
12171
12171
|
});
|
|
12172
12172
|
return l(), a.dispose;
|
|
@@ -12581,7 +12581,7 @@ let po = class extends oe {
|
|
|
12581
12581
|
endY: R.startY,
|
|
12582
12582
|
startX: 0,
|
|
12583
12583
|
endX: 0
|
|
12584
|
-
}), o & 2 && this._commandService.executeCommand(
|
|
12584
|
+
}), o & 2 && this._commandService.executeCommand(hn.id, {
|
|
12585
12585
|
sheetViewStartRow: 0,
|
|
12586
12586
|
offsetY: 0
|
|
12587
12587
|
}), g.resizeWhenFreezeChange({
|
|
@@ -12618,7 +12618,7 @@ let po = class extends oe {
|
|
|
12618
12618
|
endX: R.startX,
|
|
12619
12619
|
startY: 0,
|
|
12620
12620
|
endY: 0
|
|
12621
|
-
}), o & 1 && this._commandService.executeCommand(
|
|
12621
|
+
}), o & 1 && this._commandService.executeCommand(hn.id, {
|
|
12622
12622
|
sheetViewStartColumn: 0,
|
|
12623
12623
|
offsetX: 0
|
|
12624
12624
|
}), h.resizeWhenFreezeChange({
|
|
@@ -12656,7 +12656,7 @@ let po = class extends oe {
|
|
|
12656
12656
|
endY: R.startY,
|
|
12657
12657
|
startX: I.startX,
|
|
12658
12658
|
endX: R.startX
|
|
12659
|
-
}), o && this._commandService.executeCommand(
|
|
12659
|
+
}), o && this._commandService.executeCommand(hn.id, {
|
|
12660
12660
|
...o & 1 ? {
|
|
12661
12661
|
sheetViewStartColumn: 0,
|
|
12662
12662
|
offsetX: 0
|
|
@@ -12932,7 +12932,7 @@ let po = class extends oe {
|
|
|
12932
12932
|
e.params && n && this._refreshCurrent();
|
|
12933
12933
|
}
|
|
12934
12934
|
break;
|
|
12935
|
-
case
|
|
12935
|
+
case ln.id:
|
|
12936
12936
|
{
|
|
12937
12937
|
const t = this._getFreeze();
|
|
12938
12938
|
e.params && t && e.params.ranges.some(
|
|
@@ -13016,7 +13016,7 @@ let po = class extends oe {
|
|
|
13016
13016
|
return e.freeze;
|
|
13017
13017
|
}
|
|
13018
13018
|
_getSheetObject() {
|
|
13019
|
-
return
|
|
13019
|
+
return tn(this._context.unit, this._context);
|
|
13020
13020
|
}
|
|
13021
13021
|
/**
|
|
13022
13022
|
* Core function of _refreshCurrent
|
|
@@ -13914,7 +13914,7 @@ function rf(r, e, t, n) {
|
|
|
13914
13914
|
unitId: e,
|
|
13915
13915
|
subUnitId: s,
|
|
13916
13916
|
cellValue: a.getData()
|
|
13917
|
-
}, d =
|
|
13917
|
+
}, d = en(
|
|
13918
13918
|
r,
|
|
13919
13919
|
c
|
|
13920
13920
|
);
|
|
@@ -14051,7 +14051,7 @@ const ir = {
|
|
|
14051
14051
|
type: Q.COMMAND,
|
|
14052
14052
|
id: "sheet.command.add-worksheet-merge",
|
|
14053
14053
|
handler: async (r, e) => {
|
|
14054
|
-
const t = r.get(L), n = r.get(Yt), i = r.get(N), o = r.get(
|
|
14054
|
+
const t = r.get(L), n = r.get(Yt), i = r.get(N), o = r.get(nn), s = r.get(Pe), l = e.unitId, a = e.subUnitId, c = e.selections, d = Bl(c, e.value), u = i.getUniverSheetInstance(l).getSheetBySheetId(a), h = [], g = [], m = nf(u, d);
|
|
14055
14055
|
if (m && !e.defaultMerge && !await o.confirm({
|
|
14056
14056
|
id: "merge.confirm.add-worksheet-merge",
|
|
14057
14057
|
title: {
|
|
@@ -14151,7 +14151,7 @@ const ir = {
|
|
|
14151
14151
|
type: Q.COMMAND,
|
|
14152
14152
|
id: "sheet.command.delete-range-move-left-confirm",
|
|
14153
14153
|
handler: async (r) => {
|
|
14154
|
-
const e = r.get(
|
|
14154
|
+
const e = r.get(nn), t = r.get(L), n = r.get(Pe), i = r.get($), o = r.get(N), s = i.getCurrentSelections();
|
|
14155
14155
|
if (!s)
|
|
14156
14156
|
return !1;
|
|
14157
14157
|
const l = Ue(o);
|
|
@@ -14177,7 +14177,7 @@ const ir = {
|
|
|
14177
14177
|
type: Q.COMMAND,
|
|
14178
14178
|
id: "sheet.command.delete-range-move-up-confirm",
|
|
14179
14179
|
handler: async (r) => {
|
|
14180
|
-
const e = r.get(
|
|
14180
|
+
const e = r.get(nn), t = r.get(L), n = r.get(Pe), i = r.get($), o = r.get(N), s = i.getCurrentSelections();
|
|
14181
14181
|
if (!s) return !1;
|
|
14182
14182
|
const l = Ue(o);
|
|
14183
14183
|
if (!l) return !1;
|
|
@@ -14209,7 +14209,7 @@ const ir = {
|
|
|
14209
14209
|
type: Q.COMMAND,
|
|
14210
14210
|
id: "sheet.command.insert-range-move-down-confirm",
|
|
14211
14211
|
handler: async (r) => {
|
|
14212
|
-
const e = r.get(
|
|
14212
|
+
const e = r.get(nn), t = r.get(L), n = r.get(Pe), i = r.get($), o = r.get(N), s = i.getCurrentSelections();
|
|
14213
14213
|
if (!s)
|
|
14214
14214
|
return !1;
|
|
14215
14215
|
const l = Ue(o);
|
|
@@ -14243,7 +14243,7 @@ const ir = {
|
|
|
14243
14243
|
type: Q.COMMAND,
|
|
14244
14244
|
id: "sheet.command.insert-range-move-right-confirm",
|
|
14245
14245
|
handler: async (r) => {
|
|
14246
|
-
const e = r.get(
|
|
14246
|
+
const e = r.get(nn), t = r.get(L), n = r.get(Pe), i = r.get($), o = r.get(N), s = i.getCurrentSelections();
|
|
14247
14247
|
if (!s)
|
|
14248
14248
|
return !1;
|
|
14249
14249
|
const l = Ue(o);
|
|
@@ -14266,7 +14266,7 @@ const ir = {
|
|
|
14266
14266
|
}) ? t.executeCommand(bc.id) : !0 : t.executeCommand(bc.id);
|
|
14267
14267
|
}
|
|
14268
14268
|
};
|
|
14269
|
-
var sf = /* @__PURE__ */ ((r) => (r[r.UNIVER_UNKNOWN = 0] = "UNIVER_UNKNOWN", r[r.UNIVER_DOC = 1] = "UNIVER_DOC", r[r.UNIVER_SHEET = 2] = "UNIVER_SHEET", r[r.UNIVER_SLIDE = 3] = "UNIVER_SLIDE", r[r.UNIVER_PROJECT = 4] = "UNIVER_PROJECT", r[r.UNRECOGNIZED = -1] = "UNRECOGNIZED", r))(sf || {}), me = /* @__PURE__ */ ((r) => (r[r.View = 0] = "View", r[r.Edit = 1] = "Edit", r[r.ManageCollaborator = 2] = "ManageCollaborator", r[r.Print = 3] = "Print", r[r.Duplicate = 4] = "Duplicate", r[r.Comment = 5] = "Comment", r[r.Copy = 6] = "Copy", r[r.Share = 7] = "Share", r[r.Export = 8] = "Export", r[r.MoveWorksheet = 9] = "MoveWorksheet", r[r.DeleteWorksheet = 10] = "DeleteWorksheet", r[r.HideWorksheet = 11] = "HideWorksheet", r[r.RenameWorksheet = 12] = "RenameWorksheet", r[r.CreateWorksheet = 13] = "CreateWorksheet", r[r.SetWorksheetStyle = 14] = "SetWorksheetStyle", r[r.EditWorksheetCell = 15] = "EditWorksheetCell", r[r.InsertHyperlink = 16] = "InsertHyperlink", r[r.Sort = 17] = "Sort", r[r.Filter = 18] = "Filter", r[r.PivotTable = 19] = "PivotTable", r[r.FloatImg = 20] = "FloatImg", r[r.History = 21] = "History", r[r.RwHgtClWdt = 22] = "RwHgtClWdt", r[r.ViemRwHgtClWdt = 23] = "ViemRwHgtClWdt", r[r.ViewFilter = 24] = "ViewFilter", r[r.MoveSheet = 25] = "MoveSheet", r[r.DeleteSheet = 26] = "DeleteSheet", r[r.HideSheet = 27] = "HideSheet", r[r.CopySheet = 28] = "CopySheet", r[r.RenameSheet = 29] = "RenameSheet", r[r.CreateSheet = 30] = "CreateSheet", r[r.SelectProtectedCells = 31] = "SelectProtectedCells", r[r.SelectUnProtectedCells = 32] = "SelectUnProtectedCells", r[r.SetCellStyle = 33] = "SetCellStyle", r[r.SetCellValue = 34] = "SetCellValue", r[r.SetRowStyle = 35] = "SetRowStyle", r[r.SetColumnStyle = 36] = "SetColumnStyle", r[r.InsertRow = 37] = "InsertRow", r[r.InsertColumn = 38] = "InsertColumn", r[r.DeleteRow = 39] = "DeleteRow", r[r.DeleteColumn = 40] = "DeleteColumn", r[r.EditExtraObject = 41] = "EditExtraObject", r[r.Delete = 42] = "Delete", r[r.RecoverHistory = 43] = "RecoverHistory", r[r.ViewHistory = 44] = "ViewHistory", r[r.CreatePermissionObject = 45] = "CreatePermissionObject", r[r.UNRECOGNIZED = -1] = "UNRECOGNIZED", r))(me || {}), kt = /* @__PURE__ */ ((r) => (r[r.Reader = 0] = "Reader", r[r.Editor = 1] = "Editor", r[r.Owner = 2] = "Owner", r[r.UNRECOGNIZED = -1] = "UNRECOGNIZED", r))(kt || {}), yn = /* @__PURE__ */ ((r) => (r[r.Unkonwn = 0] = "Unkonwn", r[r.Workbook = 1] = "Workbook", r[r.Worksheet = 2] = "Worksheet", r[r.SelectRange = 3] = "SelectRange", r[r.Document = 4] = "Document", r[r.Slide = 5] = "Slide", r[r.UNRECOGNIZED = -1] = "UNRECOGNIZED", r))(yn || {}),
|
|
14269
|
+
var sf = /* @__PURE__ */ ((r) => (r[r.UNIVER_UNKNOWN = 0] = "UNIVER_UNKNOWN", r[r.UNIVER_DOC = 1] = "UNIVER_DOC", r[r.UNIVER_SHEET = 2] = "UNIVER_SHEET", r[r.UNIVER_SLIDE = 3] = "UNIVER_SLIDE", r[r.UNIVER_PROJECT = 4] = "UNIVER_PROJECT", r[r.UNRECOGNIZED = -1] = "UNRECOGNIZED", r))(sf || {}), me = /* @__PURE__ */ ((r) => (r[r.View = 0] = "View", r[r.Edit = 1] = "Edit", r[r.ManageCollaborator = 2] = "ManageCollaborator", r[r.Print = 3] = "Print", r[r.Duplicate = 4] = "Duplicate", r[r.Comment = 5] = "Comment", r[r.Copy = 6] = "Copy", r[r.Share = 7] = "Share", r[r.Export = 8] = "Export", r[r.MoveWorksheet = 9] = "MoveWorksheet", r[r.DeleteWorksheet = 10] = "DeleteWorksheet", r[r.HideWorksheet = 11] = "HideWorksheet", r[r.RenameWorksheet = 12] = "RenameWorksheet", r[r.CreateWorksheet = 13] = "CreateWorksheet", r[r.SetWorksheetStyle = 14] = "SetWorksheetStyle", r[r.EditWorksheetCell = 15] = "EditWorksheetCell", r[r.InsertHyperlink = 16] = "InsertHyperlink", r[r.Sort = 17] = "Sort", r[r.Filter = 18] = "Filter", r[r.PivotTable = 19] = "PivotTable", r[r.FloatImg = 20] = "FloatImg", r[r.History = 21] = "History", r[r.RwHgtClWdt = 22] = "RwHgtClWdt", r[r.ViemRwHgtClWdt = 23] = "ViemRwHgtClWdt", r[r.ViewFilter = 24] = "ViewFilter", r[r.MoveSheet = 25] = "MoveSheet", r[r.DeleteSheet = 26] = "DeleteSheet", r[r.HideSheet = 27] = "HideSheet", r[r.CopySheet = 28] = "CopySheet", r[r.RenameSheet = 29] = "RenameSheet", r[r.CreateSheet = 30] = "CreateSheet", r[r.SelectProtectedCells = 31] = "SelectProtectedCells", r[r.SelectUnProtectedCells = 32] = "SelectUnProtectedCells", r[r.SetCellStyle = 33] = "SetCellStyle", r[r.SetCellValue = 34] = "SetCellValue", r[r.SetRowStyle = 35] = "SetRowStyle", r[r.SetColumnStyle = 36] = "SetColumnStyle", r[r.InsertRow = 37] = "InsertRow", r[r.InsertColumn = 38] = "InsertColumn", r[r.DeleteRow = 39] = "DeleteRow", r[r.DeleteColumn = 40] = "DeleteColumn", r[r.EditExtraObject = 41] = "EditExtraObject", r[r.Delete = 42] = "Delete", r[r.RecoverHistory = 43] = "RecoverHistory", r[r.ViewHistory = 44] = "ViewHistory", r[r.CreatePermissionObject = 45] = "CreatePermissionObject", r[r.UNRECOGNIZED = -1] = "UNRECOGNIZED", r))(me || {}), kt = /* @__PURE__ */ ((r) => (r[r.Reader = 0] = "Reader", r[r.Editor = 1] = "Editor", r[r.Owner = 2] = "Owner", r[r.UNRECOGNIZED = -1] = "UNRECOGNIZED", r))(kt || {}), yn = /* @__PURE__ */ ((r) => (r[r.Unkonwn = 0] = "Unkonwn", r[r.Workbook = 1] = "Workbook", r[r.Worksheet = 2] = "Worksheet", r[r.SelectRange = 3] = "SelectRange", r[r.Document = 4] = "Document", r[r.Slide = 5] = "Slide", r[r.UNRECOGNIZED = -1] = "UNRECOGNIZED", r))(yn || {}), sn = /* @__PURE__ */ ((r) => (r[r.SomeCollaborator = 0] = "SomeCollaborator", r[r.AllCollaborator = 1] = "AllCollaborator", r[r.OneSelf = 2] = "OneSelf", r[r.UNRECOGNIZED = -1] = "UNRECOGNIZED", r))(sn || {});
|
|
14270
14270
|
const So = "UNIVER_SHEET_PERMISSION_PANEL", Co = "UNIVER_SHEET_PERMISSION_USER_PART", tu = "UNIVER_SHEET_PERMISSION_BACKGROUND", lf = "UNIVER_SHEET_PERMISSION_USER_DIALOG", af = "UNIVER_SHEET_PERMISSION_DIALOG", Js = "UNIVER_SHEET_PERMISSION_USER_DIALOG_ID", $s = "UNIVER_SHEET_PERMISSION_DIALOG_ID", ss = {
|
|
14271
14271
|
[me.Copy]: "Copy",
|
|
14272
14272
|
[me.SetCellStyle]: "SetCellStyle",
|
|
@@ -14306,7 +14306,7 @@ const So = "UNIVER_SHEET_PERMISSION_PANEL", Co = "UNIVER_SHEET_PERMISSION_USER_P
|
|
|
14306
14306
|
id: "",
|
|
14307
14307
|
ranges: [],
|
|
14308
14308
|
viewState: ri.OthersCanView,
|
|
14309
|
-
editState:
|
|
14309
|
+
editState: an.OnlyMe
|
|
14310
14310
|
};
|
|
14311
14311
|
class hi {
|
|
14312
14312
|
constructor() {
|
|
@@ -14481,7 +14481,7 @@ const Vn = {
|
|
|
14481
14481
|
if (!s) return !1;
|
|
14482
14482
|
const { worksheet: l } = s, a = l.getVisibleRows();
|
|
14483
14483
|
if (cm(a, [n])) {
|
|
14484
|
-
const d = r.get(
|
|
14484
|
+
const d = r.get(nn), u = r.get(Pe);
|
|
14485
14485
|
return await d.confirm({
|
|
14486
14486
|
id: "sheet.confirm.remove-row",
|
|
14487
14487
|
title: {
|
|
@@ -14507,7 +14507,7 @@ const Vn = {
|
|
|
14507
14507
|
if (!s) return !1;
|
|
14508
14508
|
const { worksheet: l } = s, a = l.getVisibleCols();
|
|
14509
14509
|
if (dm(a, [n])) {
|
|
14510
|
-
const d = r.get(
|
|
14510
|
+
const d = r.get(nn), u = r.get(Pe);
|
|
14511
14511
|
return await d.confirm({
|
|
14512
14512
|
id: "sheet.confirm.remove-col",
|
|
14513
14513
|
title: {
|
|
@@ -14524,7 +14524,7 @@ const Vn = {
|
|
|
14524
14524
|
id: "sheet.command.remove-sheet-confirm",
|
|
14525
14525
|
type: Q.COMMAND,
|
|
14526
14526
|
handler: async (r, e) => {
|
|
14527
|
-
const { subUnitId: t } = e, n = r.get(
|
|
14527
|
+
const { subUnitId: t } = e, n = r.get(nn), i = r.get(L), o = r.get(Pe);
|
|
14528
14528
|
return await n.confirm({
|
|
14529
14529
|
id: "sheet.confirm.remove-sheet",
|
|
14530
14530
|
title: {
|
|
@@ -15147,7 +15147,7 @@ let gi = class extends oe {
|
|
|
15147
15147
|
};
|
|
15148
15148
|
}, s = o(), l = new Ee(s), a = new gt();
|
|
15149
15149
|
return a.add(this._commandService.onCommandExecuted((c) => {
|
|
15150
|
-
(c.id ===
|
|
15150
|
+
(c.id === un.id || c.id === Jt.id) && l.next(o());
|
|
15151
15151
|
})), {
|
|
15152
15152
|
position: s,
|
|
15153
15153
|
position$: l,
|
|
@@ -15391,7 +15391,7 @@ let gi = class extends oe {
|
|
|
15391
15391
|
d();
|
|
15392
15392
|
return;
|
|
15393
15393
|
}
|
|
15394
|
-
(Es.indexOf(g.id) > -1 || g.id ===
|
|
15394
|
+
(Es.indexOf(g.id) > -1 || g.id === un.id || g.id === Jt.id) && d();
|
|
15395
15395
|
})), {
|
|
15396
15396
|
position$: c,
|
|
15397
15397
|
disposable: u,
|
|
@@ -15406,7 +15406,15 @@ let gi = class extends oe {
|
|
|
15406
15406
|
const { scene: s, engine: l } = n, a = i.getCellWithCoordByIndex(e, t), c = a.isMergedMainCell ? a.mergeInfo : a, { scaleX: d, scaleY: u } = s.getAncestorScale(), h = {
|
|
15407
15407
|
x: o.viewportScrollX,
|
|
15408
15408
|
y: o.viewportScrollY
|
|
15409
|
-
}, g = l.getCanvasElement()
|
|
15409
|
+
}, g = l.getCanvasElement();
|
|
15410
|
+
if (!g)
|
|
15411
|
+
return {
|
|
15412
|
+
left: 0,
|
|
15413
|
+
right: 0,
|
|
15414
|
+
top: 0,
|
|
15415
|
+
bottom: 0
|
|
15416
|
+
};
|
|
15417
|
+
const m = g.getBoundingClientRect(), f = ja(g.style.width), { top: v, left: p, width: C } = m, _ = C / f;
|
|
15410
15418
|
return {
|
|
15411
15419
|
left: (c.startX - h.x) * _ * d + p,
|
|
15412
15420
|
right: (c.endX - h.x) * _ * d + p,
|
|
@@ -15434,7 +15442,7 @@ let gi = class extends oe {
|
|
|
15434
15442
|
u();
|
|
15435
15443
|
return;
|
|
15436
15444
|
}
|
|
15437
|
-
(Es.indexOf(v.id) > -1 || v.id ===
|
|
15445
|
+
(Es.indexOf(v.id) > -1 || v.id === un.id || v.id === Jt.id) && u();
|
|
15438
15446
|
}));
|
|
15439
15447
|
const g = (v, p) => {
|
|
15440
15448
|
o = v, s = p, u();
|
|
@@ -16928,7 +16936,7 @@ const Nb = {
|
|
|
16928
16936
|
},
|
|
16929
16937
|
[Ct.MAIN_AREA]: {
|
|
16930
16938
|
[Ke.FORMAT]: {
|
|
16931
|
-
[
|
|
16939
|
+
[gn.name]: {
|
|
16932
16940
|
order: 0,
|
|
16933
16941
|
menuItemFactory: Qr
|
|
16934
16942
|
},
|
|
@@ -16936,7 +16944,7 @@ const Nb = {
|
|
|
16936
16944
|
// order: 1,
|
|
16937
16945
|
// menuItemFactory: CutMenuItemFactory,
|
|
16938
16946
|
// },
|
|
16939
|
-
[
|
|
16947
|
+
[mn.name]: {
|
|
16940
16948
|
order: 2,
|
|
16941
16949
|
menuItemFactory: Oa
|
|
16942
16950
|
},
|
|
@@ -17069,7 +17077,7 @@ const Nb = {
|
|
|
17069
17077
|
},
|
|
17070
17078
|
[Ct.COL_HEADER]: {
|
|
17071
17079
|
[Ke.FORMAT]: {
|
|
17072
|
-
[
|
|
17080
|
+
[gn.name]: {
|
|
17073
17081
|
order: 0,
|
|
17074
17082
|
menuItemFactory: Qr
|
|
17075
17083
|
},
|
|
@@ -17077,7 +17085,7 @@ const Nb = {
|
|
|
17077
17085
|
// order: 1,
|
|
17078
17086
|
// menuItemFactory: CutMenuItemFactory,
|
|
17079
17087
|
// },
|
|
17080
|
-
[
|
|
17088
|
+
[mn.name]: {
|
|
17081
17089
|
order: 2,
|
|
17082
17090
|
menuItemFactory: Oa
|
|
17083
17091
|
},
|
|
@@ -17190,7 +17198,7 @@ const Nb = {
|
|
|
17190
17198
|
},
|
|
17191
17199
|
[Ct.ROW_HEADER]: {
|
|
17192
17200
|
[Ke.FORMAT]: {
|
|
17193
|
-
[
|
|
17201
|
+
[gn.name]: {
|
|
17194
17202
|
order: 0,
|
|
17195
17203
|
menuItemFactory: Qr
|
|
17196
17204
|
},
|
|
@@ -17198,7 +17206,7 @@ const Nb = {
|
|
|
17198
17206
|
// order: 1,
|
|
17199
17207
|
// menuItemFactory: CutMenuItemFactory,
|
|
17200
17208
|
// },
|
|
17201
|
-
[
|
|
17209
|
+
[mn.name]: {
|
|
17202
17210
|
order: 2,
|
|
17203
17211
|
menuItemFactory: Oa
|
|
17204
17212
|
},
|
|
@@ -17703,7 +17711,7 @@ let tl = class extends oe {
|
|
|
17703
17711
|
_o,
|
|
17704
17712
|
na,
|
|
17705
17713
|
ra,
|
|
17706
|
-
|
|
17714
|
+
hn,
|
|
17707
17715
|
um,
|
|
17708
17716
|
Kl,
|
|
17709
17717
|
zd,
|
|
@@ -17729,7 +17737,7 @@ let tl = class extends oe {
|
|
|
17729
17737
|
Qd,
|
|
17730
17738
|
Yo,
|
|
17731
17739
|
la,
|
|
17732
|
-
|
|
17740
|
+
un,
|
|
17733
17741
|
uo,
|
|
17734
17742
|
Qn,
|
|
17735
17743
|
aa,
|
|
@@ -18105,7 +18113,7 @@ const Rh = 2, Qb = [
|
|
|
18105
18113
|
};
|
|
18106
18114
|
if (i.endRow < 0 || i.endCol < 0)
|
|
18107
18115
|
return null;
|
|
18108
|
-
const o = t.getRenderById(n.getUnitId()), s = o == null ? void 0 : o.with(he), l = o == null ? void 0 : o.with(lt), a =
|
|
18116
|
+
const o = t.getRenderById(n.getUnitId()), s = o == null ? void 0 : o.with(he), l = o == null ? void 0 : o.with(lt), a = tn(e, t);
|
|
18109
18117
|
if (!a || !l) return null;
|
|
18110
18118
|
const { scene: c } = a, d = s == null ? void 0 : s.getCurrentSkeleton(), u = l.getViewPort(), h = c == null ? void 0 : c.scaleX, g = c == null ? void 0 : c.scaleY, m = c == null ? void 0 : c.getViewportScrollXY(u), f = (P = c.getEngine()) == null ? void 0 : P.getCanvas();
|
|
18111
18119
|
if (!h || !c || !h || !g || !m) return null;
|
|
@@ -18118,7 +18126,7 @@ const Rh = 2, Qb = [
|
|
|
18118
18126
|
positionY: T
|
|
18119
18127
|
};
|
|
18120
18128
|
}, $b = () => {
|
|
18121
|
-
const r = D(
|
|
18129
|
+
const r = D(rn), e = ht(r.showMenu$, !1), t = ht(r.pasteOptionsCache$, null), n = D(Pe), i = D(L), [o, s] = re(!1), [l, a] = re(!1), c = t == null ? void 0 : t.target.pastedRange, d = Jb(c);
|
|
18122
18130
|
if (!d || !e || d.positionX < 50 || d.positionY < 30) return null;
|
|
18123
18131
|
const u = o || l, h = (g) => {
|
|
18124
18132
|
a(!1), i.executeCommand(jm.id, { type: g });
|
|
@@ -18179,7 +18187,7 @@ const Rh = 2, Qb = [
|
|
|
18179
18187
|
Do.id,
|
|
18180
18188
|
Dl.id,
|
|
18181
18189
|
Ll.id,
|
|
18182
|
-
|
|
18190
|
+
ln.id,
|
|
18183
18191
|
no.id,
|
|
18184
18192
|
Te.id,
|
|
18185
18193
|
iv
|
|
@@ -18355,7 +18363,7 @@ function tp(r, e, t, n) {
|
|
|
18355
18363
|
if (zl((I = y == null ? void 0 : y.n) == null ? void 0 : I.pattern))
|
|
18356
18364
|
S.t = Mt.STRING;
|
|
18357
18365
|
else {
|
|
18358
|
-
const M = String(p.v), E =
|
|
18366
|
+
const M = String(p.v), E = $t.parseValue(M);
|
|
18359
18367
|
(E == null ? void 0 : E.v) !== void 0 && typeof E.v == "number" && (!E.z && ov(M) ? S.t = Mt.FORCE_STRING : S.v = E.v);
|
|
18360
18368
|
}
|
|
18361
18369
|
}
|
|
@@ -18374,7 +18382,7 @@ function tp(r, e, t, n) {
|
|
|
18374
18382
|
id: be.id,
|
|
18375
18383
|
params: h
|
|
18376
18384
|
});
|
|
18377
|
-
const g =
|
|
18385
|
+
const g = en(
|
|
18378
18386
|
n,
|
|
18379
18387
|
h
|
|
18380
18388
|
);
|
|
@@ -18409,7 +18417,7 @@ function np(r, e, t, n, i = !1) {
|
|
|
18409
18417
|
if (C.v && !e && zl((M = y == null ? void 0 : y.n) == null ? void 0 : M.pattern))
|
|
18410
18418
|
_.s || (_.s = {}), _.s.n = y == null ? void 0 : y.n;
|
|
18411
18419
|
else {
|
|
18412
|
-
const T = String(C.v), P =
|
|
18420
|
+
const T = String(C.v), P = $t.parseValue(T);
|
|
18413
18421
|
P != null && P.z && (_.s || (_.s = {}), typeof _.s == "object" && ((E = _.s) != null && E.n ? _.s.n.pattern = P.z : _.s.n = { pattern: P.z }));
|
|
18414
18422
|
}
|
|
18415
18423
|
u.setValue(I, R, _);
|
|
@@ -18423,7 +18431,7 @@ function np(r, e, t, n, i = !1) {
|
|
|
18423
18431
|
id: be.id,
|
|
18424
18432
|
params: g
|
|
18425
18433
|
});
|
|
18426
|
-
const m =
|
|
18434
|
+
const m = en(
|
|
18427
18435
|
n,
|
|
18428
18436
|
g
|
|
18429
18437
|
);
|
|
@@ -18452,7 +18460,7 @@ function rp(r, e, t) {
|
|
|
18452
18460
|
id: be.id,
|
|
18453
18461
|
params: d
|
|
18454
18462
|
});
|
|
18455
|
-
const u =
|
|
18463
|
+
const u = en(
|
|
18456
18464
|
t,
|
|
18457
18465
|
d
|
|
18458
18466
|
);
|
|
@@ -18478,7 +18486,7 @@ function rR(r, e, t) {
|
|
|
18478
18486
|
id: be.id,
|
|
18479
18487
|
params: d
|
|
18480
18488
|
});
|
|
18481
|
-
const u =
|
|
18489
|
+
const u = en(
|
|
18482
18490
|
t,
|
|
18483
18491
|
d
|
|
18484
18492
|
);
|
|
@@ -18588,7 +18596,7 @@ var oR = Object.getOwnPropertyDescriptor, sR = (r, e, t, n) => {
|
|
|
18588
18596
|
for (var i = n > 1 ? void 0 : n ? oR(e, t) : e, o = r.length - 1, s; o >= 0; o--)
|
|
18589
18597
|
(s = r[o]) && (i = s(i) || i);
|
|
18590
18598
|
return i;
|
|
18591
|
-
},
|
|
18599
|
+
}, on = (r, e) => (t, n) => e(t, n, r);
|
|
18592
18600
|
const lR = [
|
|
18593
18601
|
Do.id,
|
|
18594
18602
|
No.id,
|
|
@@ -18633,7 +18641,7 @@ let fi = class extends Nn {
|
|
|
18633
18641
|
return t.length > 0 ? t : void 0;
|
|
18634
18642
|
}
|
|
18635
18643
|
_init() {
|
|
18636
|
-
[
|
|
18644
|
+
[gn, Kd, mn].forEach(
|
|
18637
18645
|
(t) => this.disposeWithMe(this._commandService.registerMultipleCommand(t))
|
|
18638
18646
|
), [
|
|
18639
18647
|
Qi,
|
|
@@ -18847,10 +18855,10 @@ let fi = class extends Nn {
|
|
|
18847
18855
|
}, {})
|
|
18848
18856
|
};
|
|
18849
18857
|
c.push({
|
|
18850
|
-
id:
|
|
18858
|
+
id: ln.id,
|
|
18851
18859
|
params: S
|
|
18852
18860
|
}), d.push({
|
|
18853
|
-
id:
|
|
18861
|
+
id: ln.id,
|
|
18854
18862
|
params: I
|
|
18855
18863
|
});
|
|
18856
18864
|
}
|
|
@@ -18891,24 +18899,45 @@ let fi = class extends Nn {
|
|
|
18891
18899
|
l = {
|
|
18892
18900
|
[i.rows[0]]: {
|
|
18893
18901
|
[i.cols[0]]: {
|
|
18894
|
-
p: d
|
|
18902
|
+
p: d,
|
|
18903
|
+
v: null,
|
|
18904
|
+
f: null
|
|
18895
18905
|
}
|
|
18896
18906
|
}
|
|
18897
18907
|
};
|
|
18898
|
-
} else
|
|
18899
|
-
|
|
18908
|
+
} else if (ed(t))
|
|
18909
|
+
l = {
|
|
18900
18910
|
[i.rows[0]]: {
|
|
18901
18911
|
[i.cols[0]]: {
|
|
18902
|
-
f: t
|
|
18912
|
+
f: t,
|
|
18913
|
+
v: null,
|
|
18914
|
+
p: null
|
|
18915
|
+
}
|
|
18916
|
+
}
|
|
18917
|
+
};
|
|
18918
|
+
else {
|
|
18919
|
+
const c = $t.parseNumber(t);
|
|
18920
|
+
c != null && c.z ? l = {
|
|
18921
|
+
[i.rows[0]]: {
|
|
18922
|
+
[i.cols[0]]: {
|
|
18923
|
+
v: c.v,
|
|
18924
|
+
s: {
|
|
18925
|
+
n: {
|
|
18926
|
+
pattern: c.z
|
|
18927
|
+
}
|
|
18928
|
+
},
|
|
18929
|
+
f: null
|
|
18903
18930
|
}
|
|
18904
18931
|
}
|
|
18905
18932
|
} : l = {
|
|
18906
18933
|
[i.rows[0]]: {
|
|
18907
18934
|
[i.cols[0]]: {
|
|
18908
|
-
v: t
|
|
18935
|
+
v: t,
|
|
18936
|
+
f: null
|
|
18909
18937
|
}
|
|
18910
18938
|
}
|
|
18911
18939
|
};
|
|
18940
|
+
}
|
|
18912
18941
|
const a = {
|
|
18913
18942
|
unitId: o,
|
|
18914
18943
|
subUnitId: s,
|
|
@@ -18924,7 +18953,7 @@ let fi = class extends Nn {
|
|
|
18924
18953
|
undos: [
|
|
18925
18954
|
{
|
|
18926
18955
|
id: be.id,
|
|
18927
|
-
params:
|
|
18956
|
+
params: en(this._injector, a)
|
|
18928
18957
|
}
|
|
18929
18958
|
]
|
|
18930
18959
|
};
|
|
@@ -19009,10 +19038,10 @@ let fi = class extends Nn {
|
|
|
19009
19038
|
}, {})
|
|
19010
19039
|
};
|
|
19011
19040
|
return h.push({
|
|
19012
|
-
id:
|
|
19041
|
+
id: ln.id,
|
|
19013
19042
|
params: R
|
|
19014
19043
|
}), g.push({
|
|
19015
|
-
id:
|
|
19044
|
+
id: ln.id,
|
|
19016
19045
|
params: y
|
|
19017
19046
|
}), {
|
|
19018
19047
|
redos: h,
|
|
@@ -19047,7 +19076,7 @@ let fi = class extends Nn {
|
|
|
19047
19076
|
params: v
|
|
19048
19077
|
});
|
|
19049
19078
|
const p = this._injector.invoke(
|
|
19050
|
-
|
|
19079
|
+
en,
|
|
19051
19080
|
v
|
|
19052
19081
|
);
|
|
19053
19082
|
u.push({
|
|
@@ -19086,7 +19115,7 @@ let fi = class extends Nn {
|
|
|
19086
19115
|
})
|
|
19087
19116
|
), this.disposeWithMe(
|
|
19088
19117
|
this._commandService.onCommandExecuted((n) => {
|
|
19089
|
-
if (n.id ===
|
|
19118
|
+
if (n.id === un.id) {
|
|
19090
19119
|
if (!this._sheetClipboardService.getPasteMenuVisible())
|
|
19091
19120
|
return;
|
|
19092
19121
|
const o = n.params.unitId, s = this._sheetClipboardService.getPasteOptionsCache(), l = s == null ? void 0 : s.target.unitId;
|
|
@@ -19104,16 +19133,16 @@ let fi = class extends Nn {
|
|
|
19104
19133
|
}
|
|
19105
19134
|
};
|
|
19106
19135
|
fi = sR([
|
|
19107
|
-
|
|
19108
|
-
|
|
19109
|
-
|
|
19110
|
-
|
|
19111
|
-
|
|
19112
|
-
|
|
19113
|
-
|
|
19114
|
-
|
|
19115
|
-
|
|
19116
|
-
|
|
19136
|
+
on(0, k(bt)),
|
|
19137
|
+
on(1, N),
|
|
19138
|
+
on(2, Ce),
|
|
19139
|
+
on(3, L),
|
|
19140
|
+
on(4, ke),
|
|
19141
|
+
on(5, pn),
|
|
19142
|
+
on(6, rn),
|
|
19143
|
+
on(7, Jh),
|
|
19144
|
+
on(8, k(Pe)),
|
|
19145
|
+
on(9, kl)
|
|
19117
19146
|
], fi);
|
|
19118
19147
|
var aR = Object.getOwnPropertyDescriptor, cR = (r, e, t, n) => {
|
|
19119
19148
|
for (var i = n > 1 ? void 0 : n ? aR(e, t) : e, o = r.length - 1, s; o >= 0; o--)
|
|
@@ -19124,7 +19153,7 @@ let Io = class extends oe {
|
|
|
19124
19153
|
constructor(e, t) {
|
|
19125
19154
|
super();
|
|
19126
19155
|
b(this, "_currentCell$", new xe());
|
|
19127
|
-
b(this, "currentCell$", this._currentCell$.asObservable().pipe(
|
|
19156
|
+
b(this, "currentCell$", this._currentCell$.asObservable().pipe(dn(
|
|
19128
19157
|
(e, t) => {
|
|
19129
19158
|
var n, i, o, s, l, a, c, d;
|
|
19130
19159
|
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);
|
|
@@ -19314,11 +19343,11 @@ function ip(r, e, t) {
|
|
|
19314
19343
|
const n = (u = (d = (c = e.documentSkeleton) == null ? void 0 : c.getSkeletonData()) == null ? void 0 : d.pages[0].height) != null ? u : 0, i = (m = (g = (h = e.documentSkeleton) == null ? void 0 : h.getSkeletonData()) == null ? void 0 : g.pages[0].width) != null ? m : 0, o = e.verticalAlign, s = e.horizontalAlign;
|
|
19315
19344
|
let l = 0;
|
|
19316
19345
|
switch (o) {
|
|
19317
|
-
case
|
|
19318
|
-
case
|
|
19346
|
+
case cn.UNSPECIFIED:
|
|
19347
|
+
case cn.BOTTOM:
|
|
19319
19348
|
l = r.mergeInfo.endY - r.mergeInfo.startY - n;
|
|
19320
19349
|
break;
|
|
19321
|
-
case
|
|
19350
|
+
case cn.MIDDLE:
|
|
19322
19351
|
l = (r.mergeInfo.endY - r.mergeInfo.startY - n) / 2;
|
|
19323
19352
|
break;
|
|
19324
19353
|
}
|
|
@@ -19432,7 +19461,7 @@ let Ir = class extends oe {
|
|
|
19432
19461
|
b(this, "_currentColHeaderPointerUp$", new xe());
|
|
19433
19462
|
// Notify when hovering over different cells
|
|
19434
19463
|
b(this, "currentCell$", this._currentCell$.asObservable().pipe(
|
|
19435
|
-
|
|
19464
|
+
dn(
|
|
19436
19465
|
(e, t) => {
|
|
19437
19466
|
var n, i, o, s, l, a, c, d;
|
|
19438
19467
|
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);
|
|
@@ -19453,7 +19482,7 @@ let Ir = class extends oe {
|
|
|
19453
19482
|
));
|
|
19454
19483
|
// Notify when hovering over different cells and different custom range or bullet
|
|
19455
19484
|
b(this, "currentRichText$", this._currentRichText$.pipe(
|
|
19456
|
-
|
|
19485
|
+
dn(
|
|
19457
19486
|
// eslint-disable-next-line complexity
|
|
19458
19487
|
(e, t) => {
|
|
19459
19488
|
var n, i, o, s, l, a, c, d, u, h, g, m, f, v, p, C, _, S;
|
|
@@ -19475,7 +19504,7 @@ let Ir = class extends oe {
|
|
|
19475
19504
|
* Nearly same as currentRichText$, but with event
|
|
19476
19505
|
*/
|
|
19477
19506
|
b(this, "currentCellPosWithEvent$", this._currentCellWithEvent$.pipe(
|
|
19478
|
-
|
|
19507
|
+
dn(
|
|
19479
19508
|
(e, t) => {
|
|
19480
19509
|
var n, i, o, s, l, a, c, d;
|
|
19481
19510
|
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);
|
|
@@ -19983,7 +20012,7 @@ function ER(r) {
|
|
|
19983
20012
|
const TR = {
|
|
19984
20013
|
[Ct.MAIN_AREA]: {
|
|
19985
20014
|
[Ke.FORMAT]: {
|
|
19986
|
-
[
|
|
20015
|
+
[gn.name]: {
|
|
19987
20016
|
order: 0,
|
|
19988
20017
|
menuItemFactory: Qr
|
|
19989
20018
|
}
|
|
@@ -19997,7 +20026,7 @@ const TR = {
|
|
|
19997
20026
|
},
|
|
19998
20027
|
[Ct.COL_HEADER]: {
|
|
19999
20028
|
[Ke.FORMAT]: {
|
|
20000
|
-
[
|
|
20029
|
+
[gn.name]: {
|
|
20001
20030
|
order: 0,
|
|
20002
20031
|
menuItemFactory: Qr
|
|
20003
20032
|
}
|
|
@@ -20014,7 +20043,7 @@ const TR = {
|
|
|
20014
20043
|
},
|
|
20015
20044
|
[Ct.ROW_HEADER]: {
|
|
20016
20045
|
[Ke.FORMAT]: {
|
|
20017
|
-
[
|
|
20046
|
+
[gn.name]: {
|
|
20018
20047
|
order: 0,
|
|
20019
20048
|
menuItemFactory: Qr
|
|
20020
20049
|
}
|
|
@@ -20062,7 +20091,7 @@ let al = class extends oe {
|
|
|
20062
20091
|
_o,
|
|
20063
20092
|
na,
|
|
20064
20093
|
ra,
|
|
20065
|
-
|
|
20094
|
+
hn,
|
|
20066
20095
|
um,
|
|
20067
20096
|
Kl,
|
|
20068
20097
|
zd,
|
|
@@ -20087,7 +20116,7 @@ let al = class extends oe {
|
|
|
20087
20116
|
Qd,
|
|
20088
20117
|
Yo,
|
|
20089
20118
|
la,
|
|
20090
|
-
|
|
20119
|
+
un,
|
|
20091
20120
|
uo,
|
|
20092
20121
|
Qn,
|
|
20093
20122
|
aa,
|
|
@@ -20287,7 +20316,7 @@ let yo = class extends oe {
|
|
|
20287
20316
|
worksheetTypes: [Ze, te]
|
|
20288
20317
|
}), i = this._localeService.t("permission.dialog.setStyleErr");
|
|
20289
20318
|
break;
|
|
20290
|
-
case
|
|
20319
|
+
case gn.id:
|
|
20291
20320
|
n = this._sheetPermissionCheckController.permissionCheckWithRanges({
|
|
20292
20321
|
workbookTypes: [Xi],
|
|
20293
20322
|
rangeTypes: [wc],
|
|
@@ -20553,7 +20582,7 @@ Mo = NR([
|
|
|
20553
20582
|
Di(0, N),
|
|
20554
20583
|
Di(1, k($)),
|
|
20555
20584
|
Di(2, k(Pe)),
|
|
20556
|
-
Di(3, k(
|
|
20585
|
+
Di(3, k(rn)),
|
|
20557
20586
|
Di(4, k(Id))
|
|
20558
20587
|
], Mo);
|
|
20559
20588
|
var LR = Object.getOwnPropertyDescriptor, WR = (r, e, t, n) => {
|
|
@@ -20582,7 +20611,7 @@ class FR {
|
|
|
20582
20611
|
if (!((g = a == null ? void 0 : a.n) != null && g.pattern))
|
|
20583
20612
|
return;
|
|
20584
20613
|
const { pattern: u } = a.n;
|
|
20585
|
-
d[u] || (d[u] =
|
|
20614
|
+
d[u] || (d[u] = $t.getFormatInfo(u)), d[u].isDate && s(c);
|
|
20586
20615
|
};
|
|
20587
20616
|
if (typeof o == "string" && i === Mt.NUMBER) {
|
|
20588
20617
|
const a = Number(o);
|
|
@@ -20868,7 +20897,7 @@ const sp = (r, e, t, n, i) => {
|
|
|
20868
20897
|
description: "",
|
|
20869
20898
|
id: "",
|
|
20870
20899
|
ranges: l,
|
|
20871
|
-
editState:
|
|
20900
|
+
editState: an.OnlyMe,
|
|
20872
20901
|
viewState: ri.OthersCanView
|
|
20873
20902
|
};
|
|
20874
20903
|
}, ZR = (r, e) => {
|
|
@@ -20908,12 +20937,12 @@ const sp = (r, e, t, n, i) => {
|
|
|
20908
20937
|
};
|
|
20909
20938
|
jR(i, p) && (S.unitType = Vt.Worksheet, S.ranges = []);
|
|
20910
20939
|
let R = m.selectUserList;
|
|
20911
|
-
S.editState ===
|
|
20940
|
+
S.editState === an.OnlyMe && (R = [], m.setSelectUserList([]));
|
|
20912
20941
|
const y = {
|
|
20913
|
-
read: S.viewState === ri.OthersCanView ?
|
|
20914
|
-
edit: S.editState ===
|
|
20942
|
+
read: S.viewState === ri.OthersCanView ? sn.AllCollaborator : sn.SomeCollaborator,
|
|
20943
|
+
edit: S.editState === an.DesignedUserCanEdit ? sn.SomeCollaborator : sn.OneSelf
|
|
20915
20944
|
};
|
|
20916
|
-
if (S.editState ===
|
|
20945
|
+
if (S.editState === an.DesignedUserCanEdit && R.length === 0 && (R = [], y.edit = sn.OneSelf), S.permissionId) {
|
|
20917
20946
|
const E = y_(R.filter((O) => O.role === kt.Editor), m.oldCollaboratorList.filter((O) => O.role === kt.Editor)), T = (l == null ? void 0 : l.viewState) === S.viewState, P = (l == null ? void 0 : l.editState) === S.editState, A = S.unitType === (l == null ? void 0 : l.unitType) && S.description === l.description && S.ranges === l.ranges, H = !E || !T || !P;
|
|
20918
20947
|
if (A && H)
|
|
20919
20948
|
await u.update({
|
|
@@ -21054,7 +21083,7 @@ const sp = (r, e, t, n, i) => {
|
|
|
21054
21083
|
] });
|
|
21055
21084
|
}, KR = (r) => {
|
|
21056
21085
|
var p, C;
|
|
21057
|
-
const { fromSheetBar: e, rule: t, oldRule: n } = r, i = D(bt), o = t ? ZR(i, t) : YR(i, e), [s, l] = re(o.ranges), [a, c] = re(() => sp(i, o.ranges, o.permissionId, o.unitId, o.subUnitId)), [d, u] = re(o.description), [h, g] = re((p = o.editState) != null ? p :
|
|
21086
|
+
const { fromSheetBar: e, rule: t, oldRule: n } = r, i = D(bt), o = t ? ZR(i, t) : YR(i, e), [s, l] = re(o.ranges), [a, c] = re(() => sp(i, o.ranges, o.permissionId, o.unitId, o.subUnitId)), [d, u] = re(o.description), [h, g] = re((p = o.editState) != null ? p : an.OnlyMe), [m, f] = re((C = o.viewState) != null ? C : ri.OthersCanView), v = qh(Co);
|
|
21058
21087
|
return Me(() => {
|
|
21059
21088
|
const _ = i.get(N), S = i.get(Ci), I = _.getCurrentUnitForType(x.UNIVER_SHEET);
|
|
21060
21089
|
if (!I) return;
|
|
@@ -21153,7 +21182,7 @@ function JR() {
|
|
|
21153
21182
|
};
|
|
21154
21183
|
}, [r]), Me(() => {
|
|
21155
21184
|
const O = _.activeSheet$.pipe(
|
|
21156
|
-
|
|
21185
|
+
dn((V, W) => (V == null ? void 0 : V.getSheetId()) === (W == null ? void 0 : W.getSheetId()))
|
|
21157
21186
|
).subscribe(async () => {
|
|
21158
21187
|
const V = await I(r);
|
|
21159
21188
|
y(V);
|
|
@@ -21446,8 +21475,8 @@ const $R = ({ showDetail: r, fromSheetBar: e, rule: t, oldRule: n }) => {
|
|
|
21446
21475
|
share: void 0,
|
|
21447
21476
|
name: "",
|
|
21448
21477
|
scope: {
|
|
21449
|
-
read:
|
|
21450
|
-
edit:
|
|
21478
|
+
read: sn.AllCollaborator,
|
|
21479
|
+
edit: sn.AllCollaborator
|
|
21451
21480
|
},
|
|
21452
21481
|
collaborators: void 0
|
|
21453
21482
|
}).then(() => {
|
|
@@ -21463,8 +21492,8 @@ const $R = ({ showDetail: r, fromSheetBar: e, rule: t, oldRule: n }) => {
|
|
|
21463
21492
|
name: "",
|
|
21464
21493
|
strategies: I,
|
|
21465
21494
|
scope: {
|
|
21466
|
-
read:
|
|
21467
|
-
edit:
|
|
21495
|
+
read: sn.AllCollaborator,
|
|
21496
|
+
edit: sn.AllCollaborator
|
|
21468
21497
|
}
|
|
21469
21498
|
}
|
|
21470
21499
|
}), d.executeCommand(GS.id, {
|
|
@@ -21720,7 +21749,7 @@ const dI = (r) => {
|
|
|
21720
21749
|
objectID: o,
|
|
21721
21750
|
unitID: f
|
|
21722
21751
|
})).filter((S) => S.role === kt.Editor);
|
|
21723
|
-
_.length > 0 && t(
|
|
21752
|
+
_.length > 0 && t(an.DesignedUserCanEdit), c.setSelectUserList(_), c.setOldCollaboratorList(_);
|
|
21724
21753
|
})() : (c.setSelectUserList([]), c.setOldCollaboratorList([]));
|
|
21725
21754
|
}, []), /* @__PURE__ */ q(tr, { children: [
|
|
21726
21755
|
/* @__PURE__ */ w(As, { className: "univer-font-medium", label: s.t("permission.panel.editPermission"), children: /* @__PURE__ */ q(
|
|
@@ -21730,12 +21759,12 @@ const dI = (r) => {
|
|
|
21730
21759
|
onChange: (p) => t(p),
|
|
21731
21760
|
className: "univer-flex univer-flex-col",
|
|
21732
21761
|
children: [
|
|
21733
|
-
/* @__PURE__ */ w(zr, { value:
|
|
21734
|
-
/* @__PURE__ */ w(zr, { value:
|
|
21762
|
+
/* @__PURE__ */ w(zr, { value: an.OnlyMe, children: /* @__PURE__ */ w("span", { children: s.t("permission.panel.onlyICanEdit") }) }),
|
|
21763
|
+
/* @__PURE__ */ w(zr, { value: an.DesignedUserCanEdit, children: /* @__PURE__ */ w("span", { children: s.t("permission.panel.designedUserCanEdit") }) })
|
|
21735
21764
|
]
|
|
21736
21765
|
}
|
|
21737
21766
|
) }),
|
|
21738
|
-
e ===
|
|
21767
|
+
e === an.DesignedUserCanEdit && /* @__PURE__ */ q(
|
|
21739
21768
|
"div",
|
|
21740
21769
|
{
|
|
21741
21770
|
className: He("univer-mb-2 univer-flex univer-h-[270px] univer-flex-col univer-rounded-lg univer-p-3", wi),
|
|
@@ -22150,7 +22179,7 @@ let zc = class extends oe {
|
|
|
22150
22179
|
o,
|
|
22151
22180
|
s
|
|
22152
22181
|
);
|
|
22153
|
-
this._commandService.executeCommand(
|
|
22182
|
+
this._commandService.executeCommand(hn.id, {
|
|
22154
22183
|
sheetViewStartRow: a + ((l == null ? void 0 : l.ySplit) || 0),
|
|
22155
22184
|
sheetViewStartColumn: c + ((l == null ? void 0 : l.xSplit) || 0),
|
|
22156
22185
|
offsetX: u,
|
|
@@ -22228,7 +22257,7 @@ let zc = class extends oe {
|
|
|
22228
22257
|
});
|
|
22229
22258
|
}
|
|
22230
22259
|
_getSheetObject() {
|
|
22231
|
-
return
|
|
22260
|
+
return tn(this._context.unit, this._context);
|
|
22232
22261
|
}
|
|
22233
22262
|
_scrollToSelectionByDirection(r) {
|
|
22234
22263
|
const e = this._getViewportBounding();
|
|
@@ -22306,7 +22335,7 @@ let zc = class extends oe {
|
|
|
22306
22335
|
}
|
|
22307
22336
|
if (p === void 0 && C === void 0) return !1;
|
|
22308
22337
|
const { offsetX: _, offsetY: S } = this._scrollManagerService.getCurrentScrollState() || {};
|
|
22309
|
-
return this._commandService.syncExecuteCommand(
|
|
22338
|
+
return this._commandService.syncExecuteCommand(hn.id, {
|
|
22310
22339
|
sheetViewStartRow: p,
|
|
22311
22340
|
sheetViewStartColumn: C,
|
|
22312
22341
|
offsetX: C === void 0 ? _ : 0,
|
|
@@ -22497,7 +22526,7 @@ function fp(r) {
|
|
|
22497
22526
|
onPanelChange: (m) => {
|
|
22498
22527
|
c(m);
|
|
22499
22528
|
},
|
|
22500
|
-
disabledDate: (m) =>
|
|
22529
|
+
disabledDate: (m) => !$t.parseDate(m.format("YYYY-MM-DD"))
|
|
22501
22530
|
}
|
|
22502
22531
|
),
|
|
22503
22532
|
/* @__PURE__ */ w(
|
|
@@ -22977,7 +23006,7 @@ let pl = class extends rm {
|
|
|
22977
23006
|
this.disposeWithMe(We(a)), this.disposeWithMe(We(c));
|
|
22978
23007
|
}
|
|
22979
23008
|
_initUserActionSyncListener() {
|
|
22980
|
-
this.disposeWithMe(this.selectionMoveStart$.subscribe((e) => this._updateSelections(e, Ft.MOVE_START))), this.disposeWithMe(this.selectionMoving$.subscribe((e) => this._updateSelections(e, Ft.MOVING))), this.disposeWithMe(this._contextService.subscribeContextValue$(to).pipe(xt(!1),
|
|
23009
|
+
this.disposeWithMe(this.selectionMoveStart$.subscribe((e) => this._updateSelections(e, Ft.MOVE_START))), this.disposeWithMe(this.selectionMoving$.subscribe((e) => this._updateSelections(e, Ft.MOVING))), this.disposeWithMe(this._contextService.subscribeContextValue$(to).pipe(xt(!1), dn()).subscribe((e) => {
|
|
22981
23010
|
var t;
|
|
22982
23011
|
e ? ((t = this._renderDisposable) == null || t.dispose(), this._renderDisposable = null, this._reset()) : this._renderDisposable = We(
|
|
22983
23012
|
this.selectionMoveEnd$.subscribe((n) => this._updateSelections(n, Ft.MOVE_END))
|
|
@@ -23108,7 +23137,7 @@ let pl = class extends rm {
|
|
|
23108
23137
|
}
|
|
23109
23138
|
// same as PC
|
|
23110
23139
|
_getSheetObject() {
|
|
23111
|
-
return
|
|
23140
|
+
return tn(this._context.unit, this._context);
|
|
23112
23141
|
}
|
|
23113
23142
|
// same as PC
|
|
23114
23143
|
_normalSelectionDisabled() {
|
|
@@ -23245,7 +23274,7 @@ let vl = class extends jh {
|
|
|
23245
23274
|
onStarting() {
|
|
23246
23275
|
[
|
|
23247
23276
|
[si],
|
|
23248
|
-
[
|
|
23277
|
+
[rn, { useClass: Zs }],
|
|
23249
23278
|
[Or, { useClass: Tm }],
|
|
23250
23279
|
[Wn, { useClass: Gs }],
|
|
23251
23280
|
[xr, { useClass: Ds }],
|
|
@@ -23605,7 +23634,7 @@ const YI = {
|
|
|
23605
23634
|
paragraphLineGapDefault: 0,
|
|
23606
23635
|
renderConfig: {
|
|
23607
23636
|
horizontalAlign: Rt.UNSPECIFIED,
|
|
23608
|
-
verticalAlign:
|
|
23637
|
+
verticalAlign: cn.TOP,
|
|
23609
23638
|
centerAngle: 0,
|
|
23610
23639
|
vertexAngle: 0,
|
|
23611
23640
|
wrapStrategy: mr.WRAP,
|
|
@@ -23837,7 +23866,7 @@ let _l = class extends oe {
|
|
|
23837
23866
|
unitId: r,
|
|
23838
23867
|
cellValue: _.getMatrix()
|
|
23839
23868
|
}, R = this._injector.invoke(
|
|
23840
|
-
|
|
23869
|
+
en,
|
|
23841
23870
|
S
|
|
23842
23871
|
), { undos: y, redos: M } = i.onCommandExecute({
|
|
23843
23872
|
id: Nl.id,
|
|
@@ -23980,7 +24009,7 @@ let Yc = class extends oe {
|
|
|
23980
24009
|
};
|
|
23981
24010
|
Yc = ty([
|
|
23982
24011
|
cc(1, k(he)),
|
|
23983
|
-
cc(2,
|
|
24012
|
+
cc(2, rn),
|
|
23984
24013
|
cc(3, k(fi))
|
|
23985
24014
|
], Yc);
|
|
23986
24015
|
var ny = Object.getOwnPropertyDescriptor, ry = (r, e, t, n) => {
|
|
@@ -24412,7 +24441,7 @@ let Qc = class extends Nn {
|
|
|
24412
24441
|
this._shapes.cols.forEach((e) => e.dispose()), this._shapes.rows.forEach((e) => e.dispose()), this._shapes = { cols: [], rows: [] };
|
|
24413
24442
|
}
|
|
24414
24443
|
_getSheetObject() {
|
|
24415
|
-
return
|
|
24444
|
+
return tn(this._workbook, this._context);
|
|
24416
24445
|
}
|
|
24417
24446
|
};
|
|
24418
24447
|
Qc = gy([
|
|
@@ -24543,9 +24572,9 @@ let $c = class extends rm {
|
|
|
24543
24572
|
* Handle events in spreadsheet. (e.g. drag and move to make a selection)
|
|
24544
24573
|
*/
|
|
24545
24574
|
_initUserActionSyncListener() {
|
|
24546
|
-
this.disposeWithMe(this.selectionMoveStart$.subscribe((e) => this._updateSelections(e, Ft.MOVE_START))), this.disposeWithMe(this.selectionMoving$.subscribe((e) => this._updateSelections(e, Ft.MOVING))), this.disposeWithMe(this._contextService.subscribeContextValue$(to).pipe(xt(!1),
|
|
24575
|
+
this.disposeWithMe(this.selectionMoveStart$.subscribe((e) => this._updateSelections(e, Ft.MOVE_START))), this.disposeWithMe(this.selectionMoving$.subscribe((e) => this._updateSelections(e, Ft.MOVING))), this.disposeWithMe(this._contextService.subscribeContextValue$(to).pipe(xt(!1), dn()).subscribe((e) => {
|
|
24547
24576
|
e && this._reset();
|
|
24548
|
-
})), this.disposeWithMe(this._contextService.subscribeContextValue$(Xr).pipe(xt(!0),
|
|
24577
|
+
})), this.disposeWithMe(this._contextService.subscribeContextValue$(Xr).pipe(xt(!0), dn()).subscribe((e) => {
|
|
24549
24578
|
var t;
|
|
24550
24579
|
e ? this._renderDisposable = We(
|
|
24551
24580
|
this.selectionMoveEnd$.subscribe((n) => {
|
|
@@ -24602,7 +24631,7 @@ let $c = class extends rm {
|
|
|
24602
24631
|
return t == null ? void 0 : t.scene.getActiveViewportByCoord(Ve.FromArray([e.offsetX, e.offsetY]));
|
|
24603
24632
|
}
|
|
24604
24633
|
_getSheetObject() {
|
|
24605
|
-
return
|
|
24634
|
+
return tn(this._context.unit, this._context);
|
|
24606
24635
|
}
|
|
24607
24636
|
/**
|
|
24608
24637
|
* Handle pointer down event, bind pointermove & pointerup handler.
|
|
@@ -24707,7 +24736,7 @@ let Rl = class extends jh {
|
|
|
24707
24736
|
gu(this._injector, fv([
|
|
24708
24737
|
[si],
|
|
24709
24738
|
[qe, { useClass: Ls }],
|
|
24710
|
-
[
|
|
24739
|
+
[rn, { useClass: Zs }],
|
|
24711
24740
|
[Or, { useClass: Tm }],
|
|
24712
24741
|
[Wn, { useClass: Gs }],
|
|
24713
24742
|
[Ql, { useClass: v1 }],
|
|
@@ -24958,7 +24987,7 @@ export {
|
|
|
24958
24987
|
$l as IFormulaEditorManagerService,
|
|
24959
24988
|
bi as IMarkSelectionService,
|
|
24960
24989
|
vp as ISheetCellDropdownManagerService,
|
|
24961
|
-
|
|
24990
|
+
rn as ISheetClipboardService,
|
|
24962
24991
|
lt as ISheetSelectionRenderService,
|
|
24963
24992
|
ea as IStatusBarService,
|
|
24964
24993
|
ui as InsertRangeMoveDownConfirmCommand,
|
|
@@ -24985,7 +25014,7 @@ export {
|
|
|
24985
25014
|
nm as SELECTION_SHAPE_DEPTH,
|
|
24986
25015
|
By as SHEET_UI_PLUGIN_NAME,
|
|
24987
25016
|
Ye as SHEET_VIEW_KEY,
|
|
24988
|
-
|
|
25017
|
+
hn as ScrollCommand,
|
|
24989
25018
|
um as ScrollToCellCommand,
|
|
24990
25019
|
hm as ScrollToRangeOperation,
|
|
24991
25020
|
Kl as SelectAllCommand,
|
|
@@ -25013,7 +25042,7 @@ export {
|
|
|
25013
25042
|
yi as SetRangeUnderlineCommand,
|
|
25014
25043
|
aa as SetRowFrozenCommand,
|
|
25015
25044
|
Ad as SetRowHeaderWidthCommand,
|
|
25016
|
-
|
|
25045
|
+
un as SetScrollOperation,
|
|
25017
25046
|
uo as SetScrollRelativeCommand,
|
|
25018
25047
|
Qn as SetSelectionFrozenCommand,
|
|
25019
25048
|
da as SetWorksheetColAutoWidthCommand,
|
|
@@ -25024,12 +25053,12 @@ export {
|
|
|
25024
25053
|
fl as SheetCellDropdownManagerService,
|
|
25025
25054
|
Us as SheetCellEditorResizeService,
|
|
25026
25055
|
Zs as SheetClipboardService,
|
|
25027
|
-
|
|
25056
|
+
gn as SheetCopyCommand,
|
|
25028
25057
|
Kd as SheetCutCommand,
|
|
25029
25058
|
E0 as SheetMenuPosition,
|
|
25030
25059
|
$i as SheetPasteBesidesBorderCommand,
|
|
25031
25060
|
Kr as SheetPasteColWidthCommand,
|
|
25032
|
-
|
|
25061
|
+
mn as SheetPasteCommand,
|
|
25033
25062
|
Ji as SheetPasteFormatCommand,
|
|
25034
25063
|
Lc as SheetPasteShortKeyCommand,
|
|
25035
25064
|
Qi as SheetPasteValueCommand,
|
|
@@ -25082,7 +25111,7 @@ export {
|
|
|
25082
25111
|
f0 as getMatrixPlainText,
|
|
25083
25112
|
Ei as getObservableWithExclusiveRange$,
|
|
25084
25113
|
zy as getRepeatRange,
|
|
25085
|
-
|
|
25114
|
+
tn as getSheetObject,
|
|
25086
25115
|
kd as getTopLeftSelectionOfCurrSheet,
|
|
25087
25116
|
ps as getTransformCoord,
|
|
25088
25117
|
Zy as isEmbeddingFormulaEditor,
|