@univerjs/sheets-ui 0.10.10-experimental.20251016-33b0941 → 0.10.10-nightly.202510170942
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 +1 -1
- package/lib/es/index.js +156 -147
- package/lib/index.js +156 -147
- package/lib/umd/index.js +1 -1
- package/package.json +11 -11
package/lib/es/index.js
CHANGED
|
@@ -3,9 +3,9 @@ var Wp = (r, e, t) => e in r ? Lp(r, e, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var b = (r, e, t) => Wp(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import { DOCS_VIEW_KEY as Bp, SetInlineFormatBoldCommand as Fp, SetInlineFormatItalicCommand as Up, SetInlineFormatUnderlineCommand as Xp, SetInlineFormatStrikethroughCommand as zp, SetInlineFormatSubscriptCommand as jp, SetInlineFormatSuperscriptCommand as Yp, SetInlineFormatFontSizeCommand as Zp, SetInlineFormatFontFamilyCommand as Gp, SetInlineFormatTextColorCommand as Fh, IEditorService as Ni, getCanvasOffsetByEngine as gu, VIEWPORT_KEY as Ns, DOCS_COMPONENT_MAIN_LAYER_INDEX as qp, DocSelectionRenderService as Kn, BreakLineCommand as Qp, DeleteLeftCommand as Uh, DeleteRightCommand as Kp, ReplaceSnapshotCommand as Xh, MoveSelectionOperation as Jp, MoveCursorOperation as $p, CoverContentCommand as ev, NodePositionConvertToCursor as zh, getLineBounding as jh, DOC_VERTICAL_PADDING as tv, SetInlineFormatCommand as Wo, IMEInputCommand as nv, InsertCommand as rv, convertBodyToHtml as iv } from "@univerjs/docs-ui";
|
|
5
5
|
import { CommandType as J, createInterceptorKey as Nn, ColorKit as pn, RANGE_TYPE as z, convertCellToRange as Ds, UniverInstanceType as O, IUniverInstanceService as N, Quantity as bc, Disposable as se, toDisposable as We, Tools as ce, createIdentifier as Zt, InterceptorManager as Di, ThemeService as Ht, Inject as k, Injector as Rt, IConfigService as Bt, generateRandomId as On, ObjectMatrix as Ge, Direction as U, isFormulaString as od, isFormulaId as ov, CellValueType as yt, numfmt as Wt, ICommandService as W, IUndoRedoService as Gt, Rectangle as oe, sequenceExecute as Bo, FOCUSING_SHEET as Vt, FOCUSING_UNIVER_EDITOR as xr, EDITOR_ACTIVATED as Je, FOCUSING_COMMON_DRAWINGS as Dl, FOCUSING_FX_BAR_EDITOR as xt, FOCUSING_EDITOR_INPUT_FORMULA as Ls, FOCUSING_EDITOR_STANDALONE as Ll, LRUMap as sv, BaselineOffset as mu, BooleanNumber as Ke, DataStreamTreeTokenType as lv, skipParseTagNames as av, CustomRangeType as sd, DEFAULT_WORKSHEET_ROW_HEIGHT as Rc, ILogService as Wl, LocaleService as xe, ErrorService as cv, CellModeEnum as Yh, isNotNullOrUndefined as dv, extractPureTextFromCell as Zh, getReverseDirection as Gh, IContextService as De, Workbook as uv, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as Oe, Optional as ld, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Ae, RxDisposable as Dn, DisposableCollection as ht, IPermissionService as rt, fromEventSubject as Ws, sortRules as hv, nameCharacterCheck as gv, throttle as mv, debounce as Ic, VerticalAlign as dn, HorizontalAlign as It, WrapStrategy as fr, LocaleType as fu, FOCUSING_EDITOR_BUT_HIDDEN as yc, DEFAULT_EMPTY_DOCUMENT_VALUE as qh, isTextFormat as Bl, PresetListType as fv, UserManagerService as Ft, DEFAULT_STYLES as Fo, FontWeight as gs, FontItalic as ms, composeStyles as pv, Dimension as Qh, get as Ha, BorderStyleTypes as Pe, AbsoluteRefType as pu, NilCommand as ad, splitIntoGrid as vv, UndoCommandId as Sv, willLoseNumericPrecision as Cv, Range as Ts, cellToRange as wv, handleStyleToString as vu, DEFAULT_WORKSHEET_COLUMN_WIDTH_KEY as Su, DEFAULT_WORKSHEET_COLUMN_WIDTH as Cu, DocumentFlavor as _v, isRealNum as Kh, InterceptorEffectEnum as bv, IAuthzIoService as Fl, isValidRange as Rv, dayjs as fs, BuildTextUtils as Iv, DependentOn as Jh, Plugin as $h, merge as eg, registerDependencies as Bs, mergeOverrideWithDependencies as tg, touchDependencies as ei, set as yv } from "@univerjs/core";
|
|
6
|
-
import { SELECTION_CONTROL_BORDER_BUFFER_WIDTH as Fs, SELECTION_CONTROL_BORDER_BUFFER_COLOR as ps, convertPrimaryWithCoordToPrimary as Mv, SELECTIONS_ENABLED as Gr, REF_SELECTIONS_ENABLED as So, SheetSkeletonService as Ev, SheetsSelectionsService as Q, SheetInterceptorService as Sn, MarkDirtyRowAutoHeightMutation as ng, CancelMarkDirtyRowAutoHeightMutation as rg, getSheetCommandTarget as Xe, SetWorksheetRowAutoHeightMutationFactory as ig, SetWorksheetRowAutoHeightMutation as tr, rangeToDiscreteRange as uo, SetSelectionsOperation as Ie, SetRangeValuesMutation as
|
|
6
|
+
import { SELECTION_CONTROL_BORDER_BUFFER_WIDTH as Fs, SELECTION_CONTROL_BORDER_BUFFER_COLOR as ps, convertPrimaryWithCoordToPrimary as Mv, SELECTIONS_ENABLED as Gr, REF_SELECTIONS_ENABLED as So, SheetSkeletonService as Ev, SheetsSelectionsService as Q, SheetInterceptorService as Sn, MarkDirtyRowAutoHeightMutation as ng, CancelMarkDirtyRowAutoHeightMutation as rg, getSheetCommandTarget as Xe, SetWorksheetRowAutoHeightMutationFactory as ig, SetWorksheetRowAutoHeightMutation as tr, rangeToDiscreteRange as uo, SetSelectionsOperation as Ie, SetRangeValuesMutation as we, generateNullCellValue as Tv, SetRangeValuesUndoMutationFactory as en, SetWorksheetActiveOperation as nt, getPrimaryForRange as og, DeleteRangeMoveLeftCommand as wu, DeleteRangeMoveUpCommand as _u, alignToMergedCellsBorders as Tn, SetRowHiddenCommand as sg, SetColHiddenCommand as lg, SetBoldCommand as cd, SetItalicCommand as dd, SetUnderlineCommand as ud, SetStrikeThroughCommand as hd, SetFontSizeCommand as gd, SetFontFamilyCommand as md, SetTextColorCommand as ag, InsertRangeMoveDownCommand as Mc, InsertRangeMoveRightCommand as Ec, EditStateEnum as ln, ViewStateEnum as ui, UnitObject as Nt, WorksheetProtectionRuleModel as ft, DeleteWorksheetProtectionCommand as Us, RangeProtectionRuleModel as $e, DeleteRangeProtectionMutation as bu, AddRangeProtectionMutation as Pv, RemoveRowCommand as cg, RemoveColCommand as dg, RemoveSheetCommand as xv, SetFrozenMutationFactory as ug, SetFrozenMutation as pr, getSelectionsService as Uo, SelectionMoveType as Ot, getCellAtRowCol as Ps, expandToContinuousRange as Ov, ScrollToCellOperation as fd, SetWorksheetColWidthMutation as an, BEFORE_CELL_EDIT as Av, AddWorksheetProtectionCommand as hg, SetRangeValuesCommand as Ul, MoveRangeMutation as nr, RemoveRowMutation as Xo, RemoveColMutation as zo, InsertRowMutation as jo, InsertColMutation as Yo, MoveRowsMutation as Xl, MoveColsMutation as zl, SetWorksheetRowHeightMutation as Co, RemoveSheetMutation as An, RemoveMergeUndoMutationFactory as jl, RemoveWorksheetMergeMutation as Kt, AddWorksheetMergeMutation as Jt, getAddMergeMutationRangeByType as Yl, AddMergeUndoMutationFactory as Zl, WorkbookEditablePermission as K, WorksheetEditPermission as te, UnitAction as wo, SetWorksheetShowCommand as pd, RangeProtectionCache as Zo, WorksheetViewPermission as gg, SetWorksheetOrderMutation as vd, InsertSheetMutation as Or, SetWorksheetNameMutation as Sd, SetWorksheetHideMutation as rr, SetWorksheetActivateCommand as Cd, WorkbookManageCollaboratorPermission as mg, WorkbookRenameSheetPermission as fg, SetWorksheetOrderCommand as Hv, SetWorksheetNameCommand as Vv, SetTabColorMutation as kv, WorkbookCreateSheetPermission as pg, InsertSheetCommand as Nv, ClearSelectionFormatCommand as ho, COMMAND_LISTENER_SKELETON_CHANGE as Xs, adjustRangeOnMutation as Dv, RangeProtectionPermissionEditPoint as ie, IExclusiveRangeService as Lv, BorderStyleManagerService as Tc, WorksheetSetCellStylePermission as Ze, SetBorderBasicCommand as Pc, ClearSelectionAllCommand as oo, WorksheetSetCellValuePermission as Qt, ClearSelectionContentCommand as vr, WorkbookDeleteRowPermission as Wv, WorksheetDeleteRowPermission as Bv, WorkbookDeleteColumnPermission as Fv, WorksheetDeleteColumnPermission as Uv, ToggleGridlinesCommand as vg, ToggleGridlinesMutation as Xv, InsertMultiRowsAfterCommand as Sg, WorkbookInsertRowPermission as Gl, WorksheetInsertRowPermission as ql, InsertMultiRowsAboveCommand as Cg, InsertMultiColsRightCommand as wg, WorkbookInsertColumnPermission as Ql, WorksheetInsertColumnPermission as Kl, InsertMultiColsLeftCommand as _g, InsertColBeforeCommand as bg, InsertRowBeforeCommand as Rg, CancelFrozenCommand as xs, SetWorksheetRowIsAutoHeightCommand as wd, WorksheetSetRowStylePermission as Ar, SetRowHeightCommand as Ig, SetRowHiddenMutation as yg, SetRowVisibleMutation as Mg, SetSelectedRowsVisibleCommand as Eg, WorksheetSetColumnStylePermission as Hr, SetColWidthCommand as Tg, SetColHiddenMutation as Pg, SetColVisibleMutation as xg, SetSelectedColsVisibleCommand as Og, SetTextRotationCommand as xc, SetTextWrapCommand as Oc, SetVerticalTextAlignCommand as Ac, SetHorizontalTextAlignCommand as Hc, ResetBackgroundColorCommand as Ag, SetBackgroundColorCommand as zs, WorksheetCopyPermission as js, RangeProtectionPermissionViewPoint as Vc, WorkbookCopyPermission as so, SetWorksheetRowIsAutoHeightMutation as zv, AddMergeRedoSelectionsOperationFactory as jv, AddMergeUndoSelectionsOperationFactory as Yv, MergeCellController as Zv, MERGE_CELL_INTERCEPTOR_CHECK as Gv, RemoveWorksheetMergeCommand as Hg, WorkbookCreateProtectPermission as Jl, WorksheetDeleteProtectionPermission as Vg, WorksheetManageCollaboratorPermission as qv, SetWorksheetHideCommand as kg, SetTabColorCommand as Ng, CopySheetCommand as Dg, WorkbookDeleteSheetPermission as Qv, WorkbookHideSheetPermission as Lg, AddWorksheetMergeCommand as Kv, AddWorksheetMergeHorizontalCommand as Jv, AddWorksheetMergeVerticalCommand as $v, AddWorksheetMergeAllCommand as eS, ResetTextColorCommand as tS, SheetPermissionCheckController as _d, SetFrozenCommand as nS, InsertRowCommand as rS, InsertColCommand as iS, MoveColsCommand as Wg, MoveRowsCommand as Bg, DeltaRowHeightCommand as oS, DeltaColumnWidthCommand as sS, COMMAND_LISTENER_VALUE_CHANGE as lS, RefRangeService as aS, IRefSelectionsService as bd, SCOPE_WORKBOOK_VALUE_DEFINED_NAME as kc, InsertDefinedNameCommand as cS, SetDefinedNameCommand as dS, RemoveDefinedNameCommand as uS, INumfmtService as hS, ToggleCellCheckboxCommand as gS, MoveRangeCommand as Fg, MAX_CELL_PER_SHEET_KEY as mS, INTERCEPTOR_POINT as fS, SheetPermissionInitController as pS, SetProtectionCommand as vS, AddRangeProtectionCommand as SS, setEndForRange as CS, baseProtectionActions as wS, DeleteRangeProtectionCommand as _S, WorksheetProtectionPointModel as bS, SetWorksheetPermissionPointsCommand as RS, getAllWorksheetPermissionPoint as IS, SetSpecificRowsVisibleCommand as yS, SetSpecificColsVisibleCommand as MS, convertSelectionDataToRange as Ug, UniverSheetsPlugin as Xg, RefSelectionsService as zg } from "@univerjs/sheets";
|
|
7
7
|
import { IRenderManagerService as ve, withCurrentTypeOfRenderer as Rd, SHEET_VIEWPORT_KEY as F, CURSOR_TYPE as ye, Vector2 as Ne, Rect as Se, ScrollTimer as ti, ScrollTimerType as _t, DashedRect as ES, Group as Va, TRANSFORM_CHANGE_OBSERVABLE_TYPE as Nc, cancelRequestFrame as TS, requestNewFrame as PS, FIX_ONE_PIXEL_BLUR_OFFSET as xS, Layer as OS, SpreadsheetSkeleton as AS, ptToPixel as Ru, RENDER_CLASS_TYPE as HS, DeviceInputEventType as je, convertTransformToOffsetX as qr, convertTransformToOffsetY as Qr, convertTextRotation as Id, RENDER_RAW_FORMULA_KEY as VS, Spreadsheet as jg, getCurrentTypeOfRenderer as Go, ScrollBar as yd, fixLineWidthByScale as Iu, Shape as Md, SHEET_EXTENSION_PREFIX as yu, SpreadsheetRowHeader as kS, SpreadsheetColumnHeader as NS, Viewport as wn, hasCJKText as DS, DEFAULT_PADDING_DATA as LS, SheetExtension as Yg, RegularPolygon as lo, precisionTo as qn } from "@univerjs/engine-render";
|
|
8
|
-
import { BehaviorSubject as Me, Subject as He, switchMap as lt, map as Be, of as
|
|
8
|
+
import { BehaviorSubject as Me, Subject as He, switchMap as lt, map as Be, of as Ce, merge as St, startWith as Pt, takeUntil as hi, distinctUntilChanged as un, throttleTime as Ys, EMPTY as Mu, filter as qo, combineLatest as at, Observable as Fe, combineLatestWith as sr, shareReplay as Eu, Subscription as Jn, withLatestFrom as WS } from "rxjs";
|
|
9
9
|
import { DEFAULT_BACKGROUND_COLOR_RGB as BS, DEFAULT_BACKGROUND_COLOR_RGBA as FS, handleStringToStyle as US, textTrim as Tu, IClipboardInterfaceService as $l, INotificationService as XS, IPlatformService as zS, PLAIN_TEXT_CLIPBOARD_MIME_TYPE as Pu, HTML_CLIPBOARD_MIME_TYPE as xu, imageMimeTypeSet as jS, FILE__BMP_CLIPBOARD_MIME_TYPE as YS, FILE__WEBP_CLIPBOARD_MIME_TYPE as ZS, FILE__JPEG_CLIPBOARD_MIME_TYPE as GS, FILE_PNG_CLIPBOARD_MIME_TYPE as qS, CopyCommand as QS, CutCommand as KS, PasteCommand as JS, SheetPasteShortKeyCommandName as $S, IConfirmService as nn, ISidebarService as Li, KeyCode as Y, IDialogService as Qo, useDependency as L, useObservable as ut, ComponentManager as kt, DISABLE_AUTO_FOCUS_KEY as Ou, useEvent as Au, useSidebarClick as Zg, MetaKeys as pe, useComponentsOfPart as eC, ComponentContainer as tC, useConfigValue as ea, UI_PLUGIN_CONFIG_KEY as ta, UIMenu as nC, ContextMenuPosition as bt, Slider as rC, IMessageService as Gg, IMenuManagerService as Ed, ToolbarItem as iC, ILayoutService as Td, getMenuHiddenObservable as ae, MenuItemType as $, IContextMenuService as Pd, COLOR_PICKER_COMPONENT as xd, FONT_SIZE_LIST as oC, FONT_SIZE_COMPONENT as sC, FONT_FAMILY_LIST as lC, FONT_FAMILY_COMPONENT as aC, FONT_FAMILY_ITEM_COMPONENT as cC, ContextMenuGroup as Qe, RibbonPosition as dC, RibbonStartGroup as vs, ICanvasPopupService as uC, IShortcutService as na, IUIPartsService as Od, BuiltInUIPart as ni, connectInjector as ri, IZenZoneService as qg, RectPopup as hC, UniverMobileUIPlugin as gC } from "@univerjs/ui";
|
|
10
10
|
import { forwardRef as ct, useRef as Pn, createElement as st, useState as re, useMemo as Ct, useEffect as Ee, useCallback as Hn, useLayoutEffect as mC } from "react";
|
|
11
11
|
import { DocSkeletonManagerService as $n, DocSelectionManagerService as Ad, RichTextEditingMutation as _o, SetTextSelectionsOperation as Ko } from "@univerjs/docs";
|
|
@@ -1645,18 +1645,18 @@ class cm extends se {
|
|
|
1645
1645
|
return !1;
|
|
1646
1646
|
const ge = d < t.left && w > t.left || d > t.left && w < t.left, Re = u < t.top && S > t.top || u > t.top && S < t.top;
|
|
1647
1647
|
ge && (a += 1), Re && (c += 1);
|
|
1648
|
-
const
|
|
1649
|
-
if (
|
|
1648
|
+
const _e = g.viewportKey, ke = T.viewportKey;
|
|
1649
|
+
if (_e === F.VIEW_ROW_TOP)
|
|
1650
1650
|
C < t.top && ((A = E == null ? void 0 : E.endRow) != null ? A : 0) < ((x = M == null ? void 0 : M.startRow) != null ? x : 0) ? R = t.top : Re && c % 2 === 1 && t.scrollToViewportPos({
|
|
1651
1651
|
viewportScrollY: 0
|
|
1652
1652
|
});
|
|
1653
|
-
else if (
|
|
1653
|
+
else if (_e === F.VIEW_COLUMN_LEFT)
|
|
1654
1654
|
p < t.left && ((V = E == null ? void 0 : E.endColumn) != null ? V : 0) < ((D = M == null ? void 0 : M.startColumn) != null ? D : 0) ? I = t.left : ge && a % 2 === 1 && t.scrollToViewportPos({
|
|
1655
1655
|
viewportScrollX: 0
|
|
1656
1656
|
});
|
|
1657
|
-
else if (
|
|
1657
|
+
else if (_e === ke) {
|
|
1658
1658
|
let Z = !1, ee = !1;
|
|
1659
|
-
|
|
1659
|
+
_e === F.VIEW_MAIN_LEFT_TOP ? (Z = !0, ee = !0) : _e === F.VIEW_MAIN_TOP ? ee = !0 : _e === F.VIEW_MAIN_LEFT && (Z = !0), ((X = E == null ? void 0 : E.endRow) != null ? X : 0) > ((B = M == null ? void 0 : M.startRow) != null ? B : 0) && (ee = !1), ((j = E == null ? void 0 : E.endColumn) != null ? j : 0) > ((G = M == null ? void 0 : M.startColumn) != null ? G : 0) && (Z = !1), Z && (I = t.left), ee && (R = t.top);
|
|
1660
1660
|
} else {
|
|
1661
1661
|
const Z = {
|
|
1662
1662
|
x: g.scrollX,
|
|
@@ -1668,7 +1668,7 @@ class cm extends se {
|
|
|
1668
1668
|
(ne || fe) && (t.scrollToBarPos({
|
|
1669
1669
|
x: ne ? Z.x : void 0,
|
|
1670
1670
|
y: fe ? Z.y : void 0
|
|
1671
|
-
}), ne || (I = t.left), fe || (R = t.top)), (
|
|
1671
|
+
}), ne || (I = t.left), fe || (R = t.top)), (_e === F.VIEW_MAIN_LEFT_TOP && ke === F.VIEW_MAIN_LEFT || ke === F.VIEW_MAIN_LEFT_TOP && _e === F.VIEW_MAIN_LEFT) && (I = t.left), (_e === F.VIEW_MAIN_LEFT_TOP && ke === F.VIEW_MAIN_TOP || ke === F.VIEW_MAIN_LEFT_TOP && _e === F.VIEW_MAIN_TOP) && (R = t.top);
|
|
1672
1672
|
}
|
|
1673
1673
|
d = w, u = S;
|
|
1674
1674
|
}
|
|
@@ -3077,7 +3077,7 @@ let el = class extends se {
|
|
|
3077
3077
|
});
|
|
3078
3078
|
const h = u.every((w) => this._commandService.syncExecuteCommand(w.id, w.params)), g = [];
|
|
3079
3079
|
e !== Le.NO_FORMAT && u.forEach((w) => {
|
|
3080
|
-
if (w.id ===
|
|
3080
|
+
if (w.id === we.id) {
|
|
3081
3081
|
const { cellValue: S } = w.params;
|
|
3082
3082
|
new Ge(S).forValue((R, y, M) => {
|
|
3083
3083
|
const E = Object.keys(c.getStyles().get(M == null ? void 0 : M.s) || {});
|
|
@@ -3157,17 +3157,17 @@ const Vr = Zt("univer.auto-fill-service"), mr = {
|
|
|
3157
3157
|
unitId: l,
|
|
3158
3158
|
subUnitId: a
|
|
3159
3159
|
};
|
|
3160
|
-
if (n.executeCommand(Ie.id, f), n.syncExecuteCommand(
|
|
3160
|
+
if (n.executeCommand(Ie.id, f), n.syncExecuteCommand(we.id, u)) {
|
|
3161
3161
|
const p = o.afterCommandExecute({
|
|
3162
|
-
id:
|
|
3162
|
+
id: we.id,
|
|
3163
3163
|
params: u
|
|
3164
3164
|
});
|
|
3165
3165
|
return Bo(p.redos, n), i.pushUndoRedo({
|
|
3166
3166
|
// If there are multiple mutations that form an encapsulated project, they must be encapsulated in the same undo redo element.
|
|
3167
3167
|
// Hooks can be used to hook the code of external controllers to add new actions.
|
|
3168
3168
|
unitID: l,
|
|
3169
|
-
undoMutations: [{ id:
|
|
3170
|
-
redoMutations: [{ id:
|
|
3169
|
+
undoMutations: [{ id: we.id, params: h }, ...p.undos],
|
|
3170
|
+
redoMutations: [{ id: we.id, params: u }, ...p.redos]
|
|
3171
3171
|
}), !0;
|
|
3172
3172
|
}
|
|
3173
3173
|
return !1;
|
|
@@ -3627,9 +3627,9 @@ const Nl = class Nl {
|
|
|
3627
3627
|
let h = US(void 0, u.style);
|
|
3628
3628
|
if ((p = (v = (f = (m = u == null ? void 0 : u.richTextParma) == null ? void 0 : m.p) == null ? void 0 : f.body) == null ? void 0 : v.textRuns) != null && p.length) {
|
|
3629
3629
|
const Re = (w = (C = u == null ? void 0 : u.richTextParma) == null ? void 0 : C.v) == null ? void 0 : w.length;
|
|
3630
|
-
for (let
|
|
3631
|
-
const ke = (T = (E = (M = u == null ? void 0 : u.richTextParma) == null ? void 0 : M.p) == null ? void 0 : E.body) == null ? void 0 : T.textRuns[
|
|
3632
|
-
ke.st === 0 && ke.ed === Re && (h = { ...ke.ts, ...h }, (A = (H = (P = u == null ? void 0 : u.richTextParma) == null ? void 0 : P.p) == null ? void 0 : H.body) == null || A.textRuns.splice(
|
|
3630
|
+
for (let _e = 0; _e < ((y = (R = (I = (S = u == null ? void 0 : u.richTextParma) == null ? void 0 : S.p) == null ? void 0 : I.body) == null ? void 0 : R.textRuns) == null ? void 0 : y.length); _e++) {
|
|
3631
|
+
const ke = (T = (E = (M = u == null ? void 0 : u.richTextParma) == null ? void 0 : M.p) == null ? void 0 : E.body) == null ? void 0 : T.textRuns[_e];
|
|
3632
|
+
ke.st === 0 && ke.ed === Re && (h = { ...ke.ts, ...h }, (A = (H = (P = u == null ? void 0 : u.richTextParma) == null ? void 0 : P.p) == null ? void 0 : H.body) == null || A.textRuns.splice(_e, 1), _e--);
|
|
3633
3633
|
}
|
|
3634
3634
|
((X = (D = (V = (x = u == null ? void 0 : u.richTextParma) == null ? void 0 : x.p) == null ? void 0 : V.body) == null ? void 0 : D.textRuns) == null ? void 0 : X.length) === 0 && (u.content = (B = u == null ? void 0 : u.richTextParma) == null ? void 0 : B.v, delete u.richTextParma);
|
|
3635
3635
|
}
|
|
@@ -4131,7 +4131,7 @@ function $u(r) {
|
|
|
4131
4131
|
const e = [];
|
|
4132
4132
|
for (let t = 0; t < r.length; ) {
|
|
4133
4133
|
let n = 1;
|
|
4134
|
-
if (r[t].id ===
|
|
4134
|
+
if (r[t].id === we.id) {
|
|
4135
4135
|
const i = r[t], o = [i];
|
|
4136
4136
|
for (; t + n < r.length && x1(i, r[t + n]); )
|
|
4137
4137
|
o.push(r[t + n]), n += 1;
|
|
@@ -5917,7 +5917,7 @@ let sl = class extends se {
|
|
|
5917
5917
|
if (t) {
|
|
5918
5918
|
const n = mm(this._themeService);
|
|
5919
5919
|
e === 2 ? this._markId = this._markSelectionService.addShape({ ...t, style: n }) : this._markId = this._markSelectionService.addShape({ ...t, style: n }, [
|
|
5920
|
-
|
|
5920
|
+
we.id
|
|
5921
5921
|
]);
|
|
5922
5922
|
}
|
|
5923
5923
|
}
|
|
@@ -7516,7 +7516,7 @@ function Am(r, e, t, n) {
|
|
|
7516
7516
|
r,
|
|
7517
7517
|
c
|
|
7518
7518
|
);
|
|
7519
|
-
i.push({ id:
|
|
7519
|
+
i.push({ id: we.id, params: d }), o.push({ id: we.id, params: c });
|
|
7520
7520
|
}), {
|
|
7521
7521
|
undos: i,
|
|
7522
7522
|
redos: o
|
|
@@ -7652,7 +7652,7 @@ function Dr() {
|
|
|
7652
7652
|
function Yy(r) {
|
|
7653
7653
|
return ut(() => {
|
|
7654
7654
|
var t;
|
|
7655
|
-
return (t = r == null ? void 0 : r.activeSheet$) != null ? t :
|
|
7655
|
+
return (t = r == null ? void 0 : r.activeSheet$) != null ? t : Ce(null);
|
|
7656
7656
|
}, void 0, void 0, [r]);
|
|
7657
7657
|
}
|
|
7658
7658
|
function Zy() {
|
|
@@ -7769,7 +7769,7 @@ let bi = class extends se {
|
|
|
7769
7769
|
zl.id,
|
|
7770
7770
|
an.id,
|
|
7771
7771
|
Co.id,
|
|
7772
|
-
|
|
7772
|
+
we.id
|
|
7773
7773
|
];
|
|
7774
7774
|
this.disposeWithMe(this._commandService.onCommandExecuted((t, n) => {
|
|
7775
7775
|
var l, a;
|
|
@@ -8095,7 +8095,7 @@ let bi = class extends se {
|
|
|
8095
8095
|
en,
|
|
8096
8096
|
R
|
|
8097
8097
|
);
|
|
8098
|
-
o.push({ id:
|
|
8098
|
+
o.push({ id: we.id, params: R }), i.unshift({ id: we.id, params: y });
|
|
8099
8099
|
const M = new Ge();
|
|
8100
8100
|
m.forEach((x, V) => {
|
|
8101
8101
|
g.forEach((D, X) => {
|
|
@@ -8113,7 +8113,7 @@ let bi = class extends se {
|
|
|
8113
8113
|
if (this._autoFillService.getActiveHooks().forEach((x) => {
|
|
8114
8114
|
var V;
|
|
8115
8115
|
(V = x.onBeforeSubmit) == null || V.call(x, e, t, n, E);
|
|
8116
|
-
}), i.unshift({ id:
|
|
8116
|
+
}), i.unshift({ id: we.id, params: P }), o.push({ id: we.id, params: T }), S != null && S.length) {
|
|
8117
8117
|
const x = Yl(S), V = {
|
|
8118
8118
|
unitId: c,
|
|
8119
8119
|
subUnitId: d,
|
|
@@ -8656,9 +8656,9 @@ function r0() {
|
|
|
8656
8656
|
})
|
|
8657
8657
|
).dispose, [n]), Ee(() => We(
|
|
8658
8658
|
n.showMenu$.subscribe((ge) => {
|
|
8659
|
-
const { source: Re, target:
|
|
8660
|
-
if (ge && Re &&
|
|
8661
|
-
const ke = Math.max(Re.rows[Re.rows.length - 1],
|
|
8659
|
+
const { source: Re, target: _e } = n.autoFillLocation || { source: null, target: null };
|
|
8660
|
+
if (ge && Re && _e) {
|
|
8661
|
+
const ke = Math.max(Re.rows[Re.rows.length - 1], _e.rows[_e.rows.length - 1]), Z = Math.max(Re.cols[Re.cols.length - 1], _e.cols[_e.cols.length - 1]);
|
|
8662
8662
|
d({ row: ke, col: Z });
|
|
8663
8663
|
} else
|
|
8664
8664
|
d({ row: -1, col: -1 });
|
|
@@ -9039,7 +9039,7 @@ function l0(r) {
|
|
|
9039
9039
|
ut(Ct(() => P.subscribeContextValue$(xt), [P]));
|
|
9040
9040
|
const H = P.getContextValue(xt), A = Pn(null), x = L(Ni);
|
|
9041
9041
|
mC(() => {
|
|
9042
|
-
const
|
|
9042
|
+
const be = I.activeSheet$.pipe(
|
|
9043
9043
|
lt((le) => le ? St(
|
|
9044
9044
|
c.ruleChange$,
|
|
9045
9045
|
d.ruleChange$,
|
|
@@ -9051,11 +9051,11 @@ function l0(r) {
|
|
|
9051
9051
|
const it = I.getUnitId(), ot = le.getSheetId();
|
|
9052
9052
|
if (!((Fn = h.getCurrentLastSelection()) == null ? void 0 : Fn.range)) return Mu;
|
|
9053
9053
|
const wt = (Un = h.getCurrentLastSelection()) == null ? void 0 : Un.primary;
|
|
9054
|
-
return wt ?
|
|
9054
|
+
return wt ? Ce({
|
|
9055
9055
|
unitId: it,
|
|
9056
9056
|
subUnitId: ot,
|
|
9057
9057
|
primary: wt
|
|
9058
|
-
}) :
|
|
9058
|
+
}) : Ce(null);
|
|
9059
9059
|
})
|
|
9060
9060
|
) : Mu)
|
|
9061
9061
|
).subscribe((le) => {
|
|
@@ -9082,28 +9082,28 @@ function l0(r) {
|
|
|
9082
9082
|
});
|
|
9083
9083
|
});
|
|
9084
9084
|
return () => {
|
|
9085
|
-
|
|
9085
|
+
be.unsubscribe();
|
|
9086
9086
|
};
|
|
9087
9087
|
}, [I]), Ee(() => {
|
|
9088
|
-
const
|
|
9088
|
+
const be = a.visible$.subscribe((le) => {
|
|
9089
9089
|
i(le.visible);
|
|
9090
9090
|
});
|
|
9091
|
-
return () =>
|
|
9091
|
+
return () => be.unsubscribe();
|
|
9092
9092
|
}, [a.visible$]), Ee(() => {
|
|
9093
|
-
const
|
|
9093
|
+
const be = a.currentEditCellState$.subscribe((le) => {
|
|
9094
9094
|
var it, ot, vt;
|
|
9095
9095
|
(vt = (ot = (it = le == null ? void 0 : le.documentLayoutObject.documentModel) == null ? void 0 : it.getBody()) == null ? void 0 : ot.customBlocks) != null && vt.length ? w(!0) : w(!1);
|
|
9096
9096
|
});
|
|
9097
|
-
return () =>
|
|
9097
|
+
return () => be.unsubscribe();
|
|
9098
9098
|
}, [a.currentEditCellState$]), Ee(() => {
|
|
9099
|
-
const
|
|
9099
|
+
const be = () => {
|
|
9100
9100
|
if (!A.current) return;
|
|
9101
9101
|
const le = A.current.getBoundingClientRect();
|
|
9102
9102
|
l.setPosition(le);
|
|
9103
9103
|
};
|
|
9104
9104
|
if (A.current) {
|
|
9105
|
-
|
|
9106
|
-
const le = new ResizeObserver(
|
|
9105
|
+
be();
|
|
9106
|
+
const le = new ResizeObserver(be);
|
|
9107
9107
|
return le.observe(A.current), () => le.disconnect();
|
|
9108
9108
|
}
|
|
9109
9109
|
}, [l]);
|
|
@@ -9136,7 +9136,7 @@ function l0(r) {
|
|
|
9136
9136
|
function B() {
|
|
9137
9137
|
l.handleFxBtnClick(!0);
|
|
9138
9138
|
}
|
|
9139
|
-
const { viewDisable: j, editDisable: G } = v, ge = G || C, Re = Pn(!1),
|
|
9139
|
+
const { viewDisable: j, editDisable: G } = v, ge = G || C, Re = Pn(!1), _e = () => {
|
|
9140
9140
|
try {
|
|
9141
9141
|
if (a.isVisible().visible === !1 && !f.syncExecuteCommand(
|
|
9142
9142
|
tt.id,
|
|
@@ -9150,8 +9150,8 @@ function l0(r) {
|
|
|
9150
9150
|
return;
|
|
9151
9151
|
}
|
|
9152
9152
|
P.setContextValue(xt, !0);
|
|
9153
|
-
} catch (
|
|
9154
|
-
throw Re.current = !0,
|
|
9153
|
+
} catch (be) {
|
|
9154
|
+
throw Re.current = !0, be;
|
|
9155
9155
|
}
|
|
9156
9156
|
}, ke = () => {
|
|
9157
9157
|
Re.current && setTimeout(() => {
|
|
@@ -9212,7 +9212,7 @@ function l0(r) {
|
|
|
9212
9212
|
{
|
|
9213
9213
|
ref: A,
|
|
9214
9214
|
className: "univer-relative univer-flex-1",
|
|
9215
|
-
onPointerDown:
|
|
9215
|
+
onPointerDown: _e,
|
|
9216
9216
|
onPointerUp: ke,
|
|
9217
9217
|
style: { pointerEvents: ee ? "none" : "auto" },
|
|
9218
9218
|
children: [
|
|
@@ -9232,8 +9232,8 @@ function l0(r) {
|
|
|
9232
9232
|
resetSelectionOnBlur: !1,
|
|
9233
9233
|
isSingle: !1,
|
|
9234
9234
|
keyboardEventConfig: M,
|
|
9235
|
-
onFormulaSelectingChange: (
|
|
9236
|
-
R.current =
|
|
9235
|
+
onFormulaSelectingChange: (be, le) => {
|
|
9236
|
+
R.current = be, le && (be ? a.enableForceKeepVisible() : a.disableForceKeepVisible());
|
|
9237
9237
|
},
|
|
9238
9238
|
autoScrollbar: !1,
|
|
9239
9239
|
disableContextMenu: !1
|
|
@@ -9971,7 +9971,7 @@ function m0() {
|
|
|
9971
9971
|
var Ue;
|
|
9972
9972
|
const Z = ((Ue = S.getActiveSheet()) == null ? void 0 : Ue.getSheetId()) || "";
|
|
9973
9973
|
n(Z);
|
|
9974
|
-
const ee = S.getSheets(), ne = S.getActiveSheet(), fe = ee.filter((me) => !me.isSheetHidden()).map((me,
|
|
9974
|
+
const ee = S.getSheets(), ne = S.getActiveSheet(), fe = ee.filter((me) => !me.isSheetHidden()).map((me, be) => {
|
|
9975
9975
|
var wt;
|
|
9976
9976
|
const le = p.getRule(S.getUnitId(), me.getSheetId()), it = C.getSubunitRuleList(S.getUnitId(), me.getSheetId()).length > 0, vt = (le == null ? void 0 : le.permissionId) || it ? /* @__PURE__ */ q($o, { children: [
|
|
9977
9977
|
/* @__PURE__ */ _(iu, {}),
|
|
@@ -9980,7 +9980,7 @@ function m0() {
|
|
|
9980
9980
|
return {
|
|
9981
9981
|
sheetId: me.getSheetId(),
|
|
9982
9982
|
label: vt,
|
|
9983
|
-
index:
|
|
9983
|
+
index: be,
|
|
9984
9984
|
selected: ne === me,
|
|
9985
9985
|
color: (wt = me.getTabColor()) != null ? wt : void 0
|
|
9986
9986
|
};
|
|
@@ -10032,7 +10032,7 @@ function m0() {
|
|
|
10032
10032
|
subUnitId: fe,
|
|
10033
10033
|
unitId: S.getUnitId()
|
|
10034
10034
|
}).then(() => {
|
|
10035
|
-
ne.button === 2 &&
|
|
10035
|
+
ne.button === 2 && _e(!0);
|
|
10036
10036
|
});
|
|
10037
10037
|
},
|
|
10038
10038
|
onScroll: (ne) => {
|
|
@@ -10044,8 +10044,8 @@ function m0() {
|
|
|
10044
10044
|
const ne = S.getUnitId(), fe = S == null ? void 0 : S.getActiveSheet();
|
|
10045
10045
|
if (!fe)
|
|
10046
10046
|
throw new Error("No active sheet found");
|
|
10047
|
-
const Ue = fe.getSheetId(), me = p.getRule(ne, Ue),
|
|
10048
|
-
return me ||
|
|
10047
|
+
const Ue = fe.getSheetId(), me = p.getRule(ne, Ue), be = C.getSubunitRuleList(ne, Ue).length > 0;
|
|
10048
|
+
return me || be ? (it = (le = I.getPermissionPoint(new mg(ne).id)) == null ? void 0 : le.value) != null ? it : !1 : (vt = (ot = I.getPermissionPoint(new fg(ne).id)) == null ? void 0 : ot.value) != null ? vt : !1;
|
|
10049
10049
|
}
|
|
10050
10050
|
});
|
|
10051
10051
|
d.current.slideTabBar = Z;
|
|
@@ -10162,12 +10162,12 @@ function m0() {
|
|
|
10162
10162
|
ge(Z);
|
|
10163
10163
|
});
|
|
10164
10164
|
return ne.observe(ee), () => ne.disconnect();
|
|
10165
|
-
},
|
|
10165
|
+
}, _e = (Z) => {
|
|
10166
10166
|
var ee, ne, fe, Ue, me;
|
|
10167
10167
|
if (E && !(v != null && v.isForceKeepVisible())) {
|
|
10168
10168
|
if (Z) {
|
|
10169
|
-
const { left:
|
|
10170
|
-
|
|
10169
|
+
const { left: be } = (ne = (ee = u.current) == null ? void 0 : ee.getBoundingClientRect()) != null ? ne : {}, { left: le } = (me = (Ue = (fe = d.current.slideTabBar) == null ? void 0 : fe.getActiveItem()) == null ? void 0 : Ue.getSlideTabItem().getBoundingClientRect()) != null ? me : {};
|
|
10170
|
+
be !== void 0 && le !== void 0 && c([le - be, 0]);
|
|
10171
10171
|
}
|
|
10172
10172
|
l(Z);
|
|
10173
10173
|
}
|
|
@@ -10189,7 +10189,7 @@ function m0() {
|
|
|
10189
10189
|
}
|
|
10190
10190
|
}
|
|
10191
10191
|
),
|
|
10192
|
-
onVisibleChange:
|
|
10192
|
+
onVisibleChange: _e,
|
|
10193
10193
|
children: /* @__PURE__ */ _(
|
|
10194
10194
|
"div",
|
|
10195
10195
|
{
|
|
@@ -10862,7 +10862,7 @@ let Vo = class extends Dn {
|
|
|
10862
10862
|
if (this._editorBridgeService.isVisible().visible) return;
|
|
10863
10863
|
this._editorBridgeService.refreshEditCellState();
|
|
10864
10864
|
}
|
|
10865
|
-
if (n.id ===
|
|
10865
|
+
if (n.id === we.id) {
|
|
10866
10866
|
const i = n.params, { cellValue: o, unitId: s, subUnitId: l } = i;
|
|
10867
10867
|
if (!o) return;
|
|
10868
10868
|
const a = this._editorBridgeService.getEditLocation();
|
|
@@ -12144,7 +12144,7 @@ let Er = class extends se {
|
|
|
12144
12144
|
this._univerInstanceService = e, this._renderManagerService = t, this._initCellDisposableListener();
|
|
12145
12145
|
}
|
|
12146
12146
|
dispose() {
|
|
12147
|
-
super.dispose(), this._currentCell$.complete(), this._currentClickedCell$.complete(), this._currentPointerDownCell$.complete(), this._currentPointerUpCell$.complete(), this._currentCellWithEvent$.complete();
|
|
12147
|
+
super.dispose(), this._currentCell$.complete(), this._currentClickedCell$.complete(), this._currentPointerDownCell$.complete(), this._currentPointerUpCell$.complete(), this._currentCellWithEvent$.complete(), this._currentRichText$.complete(), this._currentDbClickedCell$.complete(), this._currentHoveredRowHeader$.complete(), this._currentHoveredColHeader$.complete(), this._currentRowHeaderClick$.complete(), this._currentColHeaderClick$.complete(), this._currentRowHeaderDbClick$.complete(), this._currentColHeaderDbClick$.complete(), this._currentRowHeaderPointerDown$.complete(), this._currentColHeaderPointerDown$.complete(), this._currentRowHeaderPointerUp$.complete(), this._currentColHeaderPointerUp$.complete(), this.currentCellPosWithEvent$ = Ce(null), this.currentRichText$ = Ce(null);
|
|
12148
12148
|
}
|
|
12149
12149
|
_initCellDisposableListener() {
|
|
12150
12150
|
this.disposeWithMe(this._univerInstanceService.getCurrentTypeOfUnit$(O.UNIVER_SHEET).subscribe((e) => {
|
|
@@ -12491,10 +12491,10 @@ const ff = "UI_PLUGIN_SHEETS", lu = `${ff}_BORDER_PANEL_COMPONENT`, pf = [
|
|
|
12491
12491
|
}
|
|
12492
12492
|
];
|
|
12493
12493
|
function o_(r) {
|
|
12494
|
-
return r.getCurrentTypeOfUnit$(O.UNIVER_SHEET).pipe(xn((e) => e ? e.activeSheet$.pipe(vn((t) => t ? { workbook: e, worksheet: t } : null)) :
|
|
12494
|
+
return r.getCurrentTypeOfUnit$(O.UNIVER_SHEET).pipe(xn((e) => e ? e.activeSheet$.pipe(vn((t) => t ? { workbook: e, worksheet: t } : null)) : Ce(null)));
|
|
12495
12495
|
}
|
|
12496
12496
|
function pt(r, e, t) {
|
|
12497
|
-
return o_(r).pipe(xn((n) => n ? t(n) :
|
|
12497
|
+
return o_(r).pipe(xn((n) => n ? t(n) : Ce(e)));
|
|
12498
12498
|
}
|
|
12499
12499
|
function s_(r, e) {
|
|
12500
12500
|
const t = r.get(N), n = r.get(Lv), i = r.get(Q);
|
|
@@ -12502,17 +12502,17 @@ function s_(r, e) {
|
|
|
12502
12502
|
xn((s) => s ? at([i.selectionMoveEnd$, s.activeSheet$]).pipe(
|
|
12503
12503
|
xn(([l, a]) => {
|
|
12504
12504
|
if (!a)
|
|
12505
|
-
return
|
|
12505
|
+
return Ce(!1);
|
|
12506
12506
|
if (l.length === 0)
|
|
12507
|
-
return
|
|
12507
|
+
return Ce(!1);
|
|
12508
12508
|
const c = n.getInterestGroupId(l);
|
|
12509
12509
|
if (e) {
|
|
12510
12510
|
const d = c.filter((u) => e.has(u));
|
|
12511
|
-
return
|
|
12511
|
+
return Ce(d.length > 0);
|
|
12512
12512
|
} else
|
|
12513
|
-
return
|
|
12513
|
+
return Ce(c.length > 0);
|
|
12514
12514
|
})
|
|
12515
|
-
) :
|
|
12515
|
+
) : Ce(!1))
|
|
12516
12516
|
);
|
|
12517
12517
|
}
|
|
12518
12518
|
function ji(r, e, t) {
|
|
@@ -12522,7 +12522,7 @@ function ji(r, e, t) {
|
|
|
12522
12522
|
}
|
|
12523
12523
|
function he(r, e = {}, t = !1) {
|
|
12524
12524
|
var h;
|
|
12525
|
-
const i = r.get(N).getCurrentTypeOfUnit$(O.UNIVER_SHEET), o = r.get(Ft), s = r.has(qe) ? r.get(qe) : null, l = r.get(De), c = ((h = s == null ? void 0 : s.visible$) != null ? h :
|
|
12525
|
+
const i = r.get(N).getCurrentTypeOfUnit$(O.UNIVER_SHEET), o = r.get(Ft), s = r.has(qe) ? r.get(qe) : null, l = r.get(De), c = ((h = s == null ? void 0 : s.visible$) != null ? h : Ce(null)).pipe(
|
|
12526
12526
|
Na(null),
|
|
12527
12527
|
Vu(1)
|
|
12528
12528
|
), d = l.subscribeContextValue$(xt).pipe(
|
|
@@ -12530,15 +12530,15 @@ function he(r, e = {}, t = !1) {
|
|
|
12530
12530
|
Vu(1)
|
|
12531
12531
|
);
|
|
12532
12532
|
return at([o.currentUser$, i, c, d]).pipe(
|
|
12533
|
-
xn(([g, m, f, v]) => !m || f != null && f.visible && f.unitId === m.getUnitId() && !t || v && !t ?
|
|
12533
|
+
xn(([g, m, f, v]) => !m || f != null && f.visible && f.unitId === m.getUnitId() && !t || v && !t ? Ce(!0) : m.activeSheet$.pipe(
|
|
12534
12534
|
xn((p) => {
|
|
12535
12535
|
if (!p)
|
|
12536
|
-
return
|
|
12536
|
+
return Ce(!0);
|
|
12537
12537
|
const C = r.get(Q), w = r.get($e), S = r.get(ft), R = r.get(De).subscribeContextValue$(Dl).pipe(Na(!1));
|
|
12538
12538
|
return at([C.selectionMoveEnd$, R]).pipe(
|
|
12539
12539
|
xn(([y, M]) => {
|
|
12540
12540
|
if (M)
|
|
12541
|
-
return
|
|
12541
|
+
return Ce(!0);
|
|
12542
12542
|
const E = m.getUnitId(), T = p.getSheetId(), P = r.get(rt), { workbookTypes: H = [K], worksheetTypes: A, rangeTypes: x } = e, V = [];
|
|
12543
12543
|
if (H == null || H.forEach((j) => {
|
|
12544
12544
|
V.push(new j(E).id);
|
|
@@ -12632,7 +12632,7 @@ function Zi(r, e) {
|
|
|
12632
12632
|
xn(([a, c]) => c ? c.activeSheet$.pipe(
|
|
12633
12633
|
xn((d) => {
|
|
12634
12634
|
if (!d)
|
|
12635
|
-
return
|
|
12635
|
+
return Ce(!0);
|
|
12636
12636
|
const u = c.getUnitId(), h = [];
|
|
12637
12637
|
return e.forEach((m) => h.push(new m(u).id)), s.composePermission$(h).pipe(vn((m) => m.every((f) => f.value === !0))).pipe(
|
|
12638
12638
|
vn((m) => {
|
|
@@ -12643,7 +12643,7 @@ function Zi(r, e) {
|
|
|
12643
12643
|
})
|
|
12644
12644
|
);
|
|
12645
12645
|
})
|
|
12646
|
-
) :
|
|
12646
|
+
) : Ce(!0))
|
|
12647
12647
|
);
|
|
12648
12648
|
}
|
|
12649
12649
|
function l_(r) {
|
|
@@ -13096,7 +13096,7 @@ function R_(r) {
|
|
|
13096
13096
|
const l = e.onCommandExecuted((u) => {
|
|
13097
13097
|
var g, m;
|
|
13098
13098
|
const h = u.id;
|
|
13099
|
-
if (h ===
|
|
13099
|
+
if (h === we.id || h === Ie.id || h === nt.id) {
|
|
13100
13100
|
const f = (g = i.getCurrentLastSelection()) == null ? void 0 : g.primary;
|
|
13101
13101
|
let v = gs.NORMAL;
|
|
13102
13102
|
if (f != null) {
|
|
@@ -13149,7 +13149,7 @@ function I_(r) {
|
|
|
13149
13149
|
const l = e.onCommandExecuted((u) => {
|
|
13150
13150
|
var g, m;
|
|
13151
13151
|
const h = u.id;
|
|
13152
|
-
if (h ===
|
|
13152
|
+
if (h === we.id || h === Ie.id || h === nt.id) {
|
|
13153
13153
|
const f = (g = n.getCurrentLastSelection()) == null ? void 0 : g.primary;
|
|
13154
13154
|
let v = ms.NORMAL;
|
|
13155
13155
|
if (f != null) {
|
|
@@ -13188,7 +13188,7 @@ function y_(r) {
|
|
|
13188
13188
|
const l = e.onCommandExecuted((u) => {
|
|
13189
13189
|
var g, m;
|
|
13190
13190
|
const h = u.id;
|
|
13191
|
-
if (h ===
|
|
13191
|
+
if (h === we.id || h === Ie.id || h === nt.id) {
|
|
13192
13192
|
const f = (g = n.getCurrentLastSelection()) == null ? void 0 : g.primary;
|
|
13193
13193
|
let v;
|
|
13194
13194
|
if (f != null) {
|
|
@@ -13237,7 +13237,7 @@ function M_(r) {
|
|
|
13237
13237
|
const l = e.onCommandExecuted((u) => {
|
|
13238
13238
|
var g, m;
|
|
13239
13239
|
const h = u.id;
|
|
13240
|
-
if (h ===
|
|
13240
|
+
if (h === we.id || h === Ie.id || h === nt.id) {
|
|
13241
13241
|
const f = (g = n.getCurrentLastSelection()) == null ? void 0 : g.primary;
|
|
13242
13242
|
let v;
|
|
13243
13243
|
if (f != null) {
|
|
@@ -13294,7 +13294,7 @@ function E_(r) {
|
|
|
13294
13294
|
s.next(c);
|
|
13295
13295
|
}, a = e.onCommandExecuted((c) => {
|
|
13296
13296
|
const d = c.id;
|
|
13297
|
-
(d ===
|
|
13297
|
+
(d === we.id || d === Ie.id || d === nt.id) && l();
|
|
13298
13298
|
});
|
|
13299
13299
|
return l(), a.dispose;
|
|
13300
13300
|
})),
|
|
@@ -13340,7 +13340,7 @@ function T_(r) {
|
|
|
13340
13340
|
}
|
|
13341
13341
|
}, u = e.onCommandExecuted((h) => {
|
|
13342
13342
|
const g = h.id;
|
|
13343
|
-
(g ===
|
|
13343
|
+
(g === we.id || g === Ie.id || g === nt.id) && c(), (g === Ko.id || g === Wo.id) && i.getContextValue(Je) && i.getContextValue(Vt) && d();
|
|
13344
13344
|
});
|
|
13345
13345
|
return c(), u.dispose;
|
|
13346
13346
|
})),
|
|
@@ -14000,7 +14000,7 @@ function Y_(r) {
|
|
|
14000
14000
|
}
|
|
14001
14001
|
const a = e.onCommandExecuted((c) => {
|
|
14002
14002
|
const d = c.id;
|
|
14003
|
-
if (d ===
|
|
14003
|
+
if (d === we.id || d === Ie.id || d === zv.id)
|
|
14004
14004
|
return l();
|
|
14005
14005
|
});
|
|
14006
14006
|
return l(), a.dispose;
|
|
@@ -14035,7 +14035,7 @@ function Z_(r) {
|
|
|
14035
14035
|
}
|
|
14036
14036
|
const a = e.onCommandExecuted((c) => {
|
|
14037
14037
|
const d = c.id;
|
|
14038
|
-
if (d ===
|
|
14038
|
+
if (d === we.id || d === Ie.id || d === an.id)
|
|
14039
14039
|
return l();
|
|
14040
14040
|
});
|
|
14041
14041
|
return l(), a.dispose;
|
|
@@ -14170,7 +14170,7 @@ function G_(r) {
|
|
|
14170
14170
|
})),
|
|
14171
14171
|
o.pipe(lt((s) => {
|
|
14172
14172
|
var l;
|
|
14173
|
-
return (l = s == null ? void 0 : s.activeSheet$) != null ? l :
|
|
14173
|
+
return (l = s == null ? void 0 : s.activeSheet$) != null ? l : Ce(null);
|
|
14174
14174
|
}))
|
|
14175
14175
|
]).pipe(
|
|
14176
14176
|
Be(([s, l, a]) => {
|
|
@@ -14260,7 +14260,7 @@ function eb(r) {
|
|
|
14260
14260
|
lt(([i, o]) => i ? i.activeSheet$.pipe(
|
|
14261
14261
|
lt((s) => {
|
|
14262
14262
|
if (!s)
|
|
14263
|
-
return
|
|
14263
|
+
return Ce(!0);
|
|
14264
14264
|
const l = r.get($e), a = r.get(ft), c = r.get(Q);
|
|
14265
14265
|
return St(
|
|
14266
14266
|
c.selectionMoveEnd$,
|
|
@@ -14276,7 +14276,7 @@ function eb(r) {
|
|
|
14276
14276
|
})
|
|
14277
14277
|
);
|
|
14278
14278
|
})
|
|
14279
|
-
) :
|
|
14279
|
+
) : Ce(!0))
|
|
14280
14280
|
);
|
|
14281
14281
|
}
|
|
14282
14282
|
function tb(r) {
|
|
@@ -14285,7 +14285,7 @@ function tb(r) {
|
|
|
14285
14285
|
lt(([o, s]) => o ? o.activeSheet$.pipe(
|
|
14286
14286
|
lt((l) => {
|
|
14287
14287
|
if (!l)
|
|
14288
|
-
return
|
|
14288
|
+
return Ce(!0);
|
|
14289
14289
|
const a = r.get($e), c = r.get(ft), d = r.get(rt), u = r.get(Q);
|
|
14290
14290
|
return St(
|
|
14291
14291
|
u.selectionMoveEnd$,
|
|
@@ -14316,7 +14316,7 @@ function tb(r) {
|
|
|
14316
14316
|
})
|
|
14317
14317
|
);
|
|
14318
14318
|
})
|
|
14319
|
-
) :
|
|
14319
|
+
) : Ce(!0))
|
|
14320
14320
|
);
|
|
14321
14321
|
}
|
|
14322
14322
|
function nb(r) {
|
|
@@ -14326,8 +14326,8 @@ function nb(r) {
|
|
|
14326
14326
|
lt((l) => {
|
|
14327
14327
|
var m;
|
|
14328
14328
|
if (!l)
|
|
14329
|
-
return
|
|
14330
|
-
const a = o.getUnitId(), c = r.get(Q), d = r.get($e), u = r.get(ft), h = (m = t.composePermission$([new K(a).id]).pipe(Be((f) => f.every((v) => v.value)))) != null ? m :
|
|
14329
|
+
return Ce(!0);
|
|
14330
|
+
const a = o.getUnitId(), c = r.get(Q), d = r.get($e), u = r.get(ft), h = (m = t.composePermission$([new K(a).id]).pipe(Be((f) => f.every((v) => v.value)))) != null ? m : Ce(!1), g = St(
|
|
14331
14331
|
d.ruleChange$,
|
|
14332
14332
|
u.ruleChange$
|
|
14333
14333
|
).pipe(
|
|
@@ -14342,7 +14342,7 @@ function nb(r) {
|
|
|
14342
14342
|
})
|
|
14343
14343
|
);
|
|
14344
14344
|
})
|
|
14345
|
-
) :
|
|
14345
|
+
) : Ce(!0))
|
|
14346
14346
|
);
|
|
14347
14347
|
}
|
|
14348
14348
|
function yf(r) {
|
|
@@ -14353,14 +14353,14 @@ function yf(r) {
|
|
|
14353
14353
|
), a = (c = o == null ? void 0 : o.visible$.pipe(
|
|
14354
14354
|
Pt(null),
|
|
14355
14355
|
Eu(1)
|
|
14356
|
-
)) != null ? c :
|
|
14356
|
+
)) != null ? c : Ce(null);
|
|
14357
14357
|
return at([n, i.currentUser$, a, l]).pipe(
|
|
14358
|
-
lt(([d, u, h, g]) => !d || h != null && h.visible && h.unitId === d.getUnitId() || g ?
|
|
14358
|
+
lt(([d, u, h, g]) => !d || h != null && h.visible && h.unitId === d.getUnitId() || g ? Ce(!0) : d.activeSheet$.pipe(
|
|
14359
14359
|
lt((m) => {
|
|
14360
14360
|
var M;
|
|
14361
14361
|
if (!m)
|
|
14362
|
-
return
|
|
14363
|
-
const v = r.get(De).subscribeContextValue$(Dl).pipe(Pt(!1)), p = d.getUnitId(), C = m.getSheetId(), w = r.get($e), S = r.get(ft), I = r.get(Q), R = (M = t.composePermission$([new Jl(p).id]).pipe(Be((E) => E.every((T) => T.value)))) != null ? M :
|
|
14362
|
+
return Ce(!0);
|
|
14363
|
+
const v = r.get(De).subscribeContextValue$(Dl).pipe(Pt(!1)), p = d.getUnitId(), C = m.getSheetId(), w = r.get($e), S = r.get(ft), I = r.get(Q), R = (M = t.composePermission$([new Jl(p).id]).pipe(Be((E) => E.every((T) => T.value)))) != null ? M : Ce(!1), y = St(
|
|
14364
14364
|
w.ruleChange$,
|
|
14365
14365
|
S.ruleChange$
|
|
14366
14366
|
).pipe(
|
|
@@ -14391,8 +14391,8 @@ function rb(r) {
|
|
|
14391
14391
|
lt((l) => {
|
|
14392
14392
|
var m;
|
|
14393
14393
|
if (!l)
|
|
14394
|
-
return
|
|
14395
|
-
const a = o.getUnitId(), c = l.getSheetId(), d = r.get($e), u = r.get(ft), h = (m = t.composePermission$([new Jl(a).id]).pipe(Be((f) => f.every((v) => v.value)))) != null ? m :
|
|
14394
|
+
return Ce(!0);
|
|
14395
|
+
const a = o.getUnitId(), c = l.getSheetId(), d = r.get($e), u = r.get(ft), h = (m = t.composePermission$([new Jl(a).id]).pipe(Be((f) => f.every((v) => v.value)))) != null ? m : Ce(!1), g = St(
|
|
14396
14396
|
d.ruleChange$,
|
|
14397
14397
|
u.ruleChange$
|
|
14398
14398
|
).pipe(
|
|
@@ -14407,7 +14407,7 @@ function rb(r) {
|
|
|
14407
14407
|
})
|
|
14408
14408
|
);
|
|
14409
14409
|
})
|
|
14410
|
-
) :
|
|
14410
|
+
) : Ce(!0))
|
|
14411
14411
|
);
|
|
14412
14412
|
}
|
|
14413
14413
|
function ib(r) {
|
|
@@ -14416,7 +14416,7 @@ function ib(r) {
|
|
|
14416
14416
|
lt(([o, s]) => o ? o.activeSheet$.pipe(
|
|
14417
14417
|
lt((l) => {
|
|
14418
14418
|
if (!l)
|
|
14419
|
-
return
|
|
14419
|
+
return Ce(!0);
|
|
14420
14420
|
const a = o.getUnitId(), c = l.getSheetId(), d = r.get(ft);
|
|
14421
14421
|
return d.ruleChange$.pipe(Pt(null)).pipe(
|
|
14422
14422
|
Be(() => {
|
|
@@ -14425,7 +14425,7 @@ function ib(r) {
|
|
|
14425
14425
|
})
|
|
14426
14426
|
);
|
|
14427
14427
|
})
|
|
14428
|
-
) :
|
|
14428
|
+
) : Ce(!0))
|
|
14429
14429
|
);
|
|
14430
14430
|
}
|
|
14431
14431
|
function ob(r) {
|
|
@@ -14435,8 +14435,8 @@ function ob(r) {
|
|
|
14435
14435
|
lt((l) => {
|
|
14436
14436
|
var m;
|
|
14437
14437
|
if (!l)
|
|
14438
|
-
return
|
|
14439
|
-
const a = o.getUnitId(), c = r.get($e), d = r.get(ft), u = (m = t.composePermission$([new Jl(a).id, new mg(a).id]).pipe(Be((f) => f.every((v) => v.value)))) != null ? m :
|
|
14438
|
+
return Ce(!0);
|
|
14439
|
+
const a = o.getUnitId(), c = r.get($e), d = r.get(ft), u = (m = t.composePermission$([new Jl(a).id, new mg(a).id]).pipe(Be((f) => f.every((v) => v.value)))) != null ? m : Ce(!1), h = d.ruleChange$.pipe(Pt(null)), g = c.ruleChange$.pipe(Pt(null));
|
|
14440
14440
|
return at([u, h, g]).pipe(
|
|
14441
14441
|
Be(([f, v, p]) => {
|
|
14442
14442
|
if (!f)
|
|
@@ -14446,7 +14446,7 @@ function ob(r) {
|
|
|
14446
14446
|
})
|
|
14447
14447
|
);
|
|
14448
14448
|
})
|
|
14449
|
-
) :
|
|
14449
|
+
) : Ce(!0))
|
|
14450
14450
|
);
|
|
14451
14451
|
}
|
|
14452
14452
|
function sb(r) {
|
|
@@ -14455,7 +14455,7 @@ function sb(r) {
|
|
|
14455
14455
|
lt(([o, s]) => o ? o.activeSheet$.pipe(
|
|
14456
14456
|
lt((l) => {
|
|
14457
14457
|
if (!l)
|
|
14458
|
-
return
|
|
14458
|
+
return Ce(!0);
|
|
14459
14459
|
const a = o.getUnitId(), c = l.getSheetId(), d = r.get(Q), u = r.get($e), h = r.get(ft), g = St(
|
|
14460
14460
|
u.ruleChange$,
|
|
14461
14461
|
h.ruleChange$,
|
|
@@ -14486,20 +14486,20 @@ function sb(r) {
|
|
|
14486
14486
|
})
|
|
14487
14487
|
);
|
|
14488
14488
|
})
|
|
14489
|
-
) :
|
|
14489
|
+
) : Ce(!0))
|
|
14490
14490
|
);
|
|
14491
14491
|
}
|
|
14492
14492
|
function Mf(r) {
|
|
14493
14493
|
var c;
|
|
14494
|
-
const e = r.get(N), t = r.get(rt), n = e.getCurrentTypeOfUnit$(O.UNIVER_SHEET), i = r.get(Ft), o = r.has(qe) ? r.get(qe) : null, l = r.get(De).subscribeContextValue$(xt), a = (c = o == null ? void 0 : o.visible$) != null ? c :
|
|
14494
|
+
const e = r.get(N), t = r.get(rt), n = e.getCurrentTypeOfUnit$(O.UNIVER_SHEET), i = r.get(Ft), o = r.has(qe) ? r.get(qe) : null, l = r.get(De).subscribeContextValue$(xt), a = (c = o == null ? void 0 : o.visible$) != null ? c : Ce(null);
|
|
14495
14495
|
return at([n, i.currentUser$, a, l]).pipe(
|
|
14496
|
-
lt(([d, u, h, g]) => !d || h != null && h.visible && h.unitId === d.getUnitId() || g ?
|
|
14496
|
+
lt(([d, u, h, g]) => !d || h != null && h.visible && h.unitId === d.getUnitId() || g ? Ce(!0) : d.activeSheet$.pipe(
|
|
14497
14497
|
lt((m) => {
|
|
14498
14498
|
var p, C;
|
|
14499
14499
|
if (!m)
|
|
14500
|
-
return
|
|
14500
|
+
return Ce(!0);
|
|
14501
14501
|
const f = d.getUnitId();
|
|
14502
|
-
return ((C = (p = t.getPermissionPoint$(new K(f).id)) == null ? void 0 : p.pipe(Be((w) => !!w.value))) != null ? C :
|
|
14502
|
+
return ((C = (p = t.getPermissionPoint$(new K(f).id)) == null ? void 0 : p.pipe(Be((w) => !!w.value))) != null ? C : Ce(!1)).pipe(
|
|
14503
14503
|
Be((w) => !w)
|
|
14504
14504
|
);
|
|
14505
14505
|
})
|
|
@@ -16419,7 +16419,7 @@ let No = class extends se {
|
|
|
16419
16419
|
}
|
|
16420
16420
|
// eslint-disable-next-line max-lines-per-function
|
|
16421
16421
|
_rowColumnMoving(e, t, n, i, o) {
|
|
16422
|
-
var B, j, G, ge, Re,
|
|
16422
|
+
var B, j, G, ge, Re, _e, ke;
|
|
16423
16423
|
const s = this._context.scene, l = (B = this._sheetSkeletonManagerService.getCurrentParam()) == null ? void 0 : B.skeleton;
|
|
16424
16424
|
if (l == null)
|
|
16425
16425
|
return;
|
|
@@ -16476,7 +16476,7 @@ let No = class extends se {
|
|
|
16476
16476
|
Z = I - X / 2, this._changeToColumn = p + 1;
|
|
16477
16477
|
else
|
|
16478
16478
|
return;
|
|
16479
|
-
(
|
|
16479
|
+
(_e = this._moveHelperLineShape) == null || _e.transformByState({
|
|
16480
16480
|
height: d,
|
|
16481
16481
|
width: X,
|
|
16482
16482
|
left: Z,
|
|
@@ -16714,11 +16714,11 @@ let Do = class extends se {
|
|
|
16714
16714
|
top: 0
|
|
16715
16715
|
});
|
|
16716
16716
|
const x = ((ge = this._columnResizeRect) == null ? void 0 : ge.left) || 0, V = ((Re = this._rowResizeRect) == null ? void 0 : Re.top) || 0;
|
|
16717
|
-
s.addObject(this._resizeHelperShape, ir), s.disableObjectsEvent(), this._scenePointerMoveSub = s.onPointerMove$.subscribeEvent((
|
|
16717
|
+
s.addObject(this._resizeHelperShape, ir), s.disableObjectsEvent(), this._scenePointerMoveSub = s.onPointerMove$.subscribeEvent((_e) => {
|
|
16718
16718
|
var it, ot, vt, wt, Fn, Un;
|
|
16719
16719
|
const ke = s.getCoordRelativeToViewport(
|
|
16720
16720
|
Ne.FromArray([this._startOffsetX, this._startOffsetY])
|
|
16721
|
-
), Z = s.getScrollXYInfoByViewport(ke, d), ee = Os(
|
|
16721
|
+
), Z = s.getScrollXYInfoByViewport(ke, d), ee = Os(_e.offsetX, _e.offsetY, s), { x: ne, y: fe } = ee, { scaleX: Ue, scaleY: me } = s.getAncestorScale(), be = Math.max(Ue, me), le = Kc / be;
|
|
16722
16722
|
S = ne - this._startOffsetX - le / 2, I = fe - this._startOffsetY - le / 2, Math.abs(e === 0 ? I : S) >= Fb && (w = !0), e === 0 ? (I > a - u + Z.y - C.startY && (I = a - u + Z.y - C.startY), I < -(C.endY - C.startY) + 2 && (I = -(C.endY - C.startY) + 2), w && ((it = this._resizeHelperShape) == null || it.transformByState({
|
|
16723
16723
|
top: p + I
|
|
16724
16724
|
}), (ot = this._rowResizeRect) == null || ot.transformByState({
|
|
@@ -16728,7 +16728,7 @@ let Do = class extends se {
|
|
|
16728
16728
|
}), (Fn = this._columnResizeRect) == null || Fn.transformByState({
|
|
16729
16729
|
left: x + S + le / 2
|
|
16730
16730
|
}), (Un = this._columnResizeRect) == null || Un.show(), s.setCursor(ye.COLUMN_RESIZE)));
|
|
16731
|
-
}), this._scenePointerUpSub = s.onPointerUp$.subscribeEvent((
|
|
16731
|
+
}), this._scenePointerUpSub = s.onPointerUp$.subscribeEvent((_e) => {
|
|
16732
16732
|
var Z, ee, ne;
|
|
16733
16733
|
const ke = this._context.scene;
|
|
16734
16734
|
this._clearObserverEvent(), (Z = this._resizeHelperShape) == null || Z.dispose(), this._resizeHelperShape = null, ke.enableObjectsEvent(), w && (ke.resetCursor(), (ee = this._rowResizeRect) == null || ee.hide(), (ne = this._columnResizeRect) == null || ne.hide(), e === 0 ? this._commandService.executeCommand(oS.id, {
|
|
@@ -17013,7 +17013,7 @@ let fl = class extends Dn {
|
|
|
17013
17013
|
const { mainComponent: t, scene: n } = this._context;
|
|
17014
17014
|
if (e.id === pC.id && e.params.stageInfo != null || (t && t.makeDirty(), n.makeDirty(), !e.params)) return;
|
|
17015
17015
|
const i = e.params, o = this._spreadsheetViewports(n);
|
|
17016
|
-
if (e.id ===
|
|
17016
|
+
if (e.id === we.id && i.cellValue) {
|
|
17017
17017
|
const s = this._cellValueToRange(i.cellValue), l = this._rangeToBounds([s]);
|
|
17018
17018
|
this._markViewportDirty(o, l), t.setDirtyArea(l);
|
|
17019
17019
|
}
|
|
@@ -17649,7 +17649,7 @@ let Mi = class extends se {
|
|
|
17649
17649
|
// #region attach to position
|
|
17650
17650
|
attachPopupByPosition(e, t, n) {
|
|
17651
17651
|
var v;
|
|
17652
|
-
|
|
17652
|
+
let i = this._univerInstanceService.getCurrentUnitForType(O.UNIVER_SHEET), o = i.getActiveSheet();
|
|
17653
17653
|
if (!o)
|
|
17654
17654
|
return null;
|
|
17655
17655
|
const s = i.getUnitId(), l = o.getSheetId();
|
|
@@ -17679,7 +17679,7 @@ let Mi = class extends se {
|
|
|
17679
17679
|
});
|
|
17680
17680
|
return {
|
|
17681
17681
|
dispose: () => {
|
|
17682
|
-
this._globalPopupManagerService.removePopup(f), u.complete(), h.dispose(), m.dispose();
|
|
17682
|
+
this._globalPopupManagerService.removePopup(f), u.complete(), h.dispose(), m.dispose(), i = null, o = null;
|
|
17683
17683
|
},
|
|
17684
17684
|
canDispose: () => this._globalPopupManagerService.activePopupId !== f
|
|
17685
17685
|
};
|
|
@@ -17728,7 +17728,7 @@ let Mi = class extends se {
|
|
|
17728
17728
|
* @returns
|
|
17729
17729
|
*/
|
|
17730
17730
|
attachPopupToCell(e, t, n, i, o, s) {
|
|
17731
|
-
|
|
17731
|
+
let l = this._univerInstanceService.getCurrentUnitForType(O.UNIVER_SHEET), a = l.getActiveSheet();
|
|
17732
17732
|
if (!a)
|
|
17733
17733
|
return null;
|
|
17734
17734
|
const c = l.getUnitId(), d = a.getSheetId();
|
|
@@ -17765,7 +17765,7 @@ let Mi = class extends se {
|
|
|
17765
17765
|
E ? C(E.startRow, E.startColumn) : R.dispose();
|
|
17766
17766
|
})), {
|
|
17767
17767
|
dispose() {
|
|
17768
|
-
R.dispose();
|
|
17768
|
+
R.dispose(), a = null, l = null;
|
|
17769
17769
|
},
|
|
17770
17770
|
canDispose: () => this._globalPopupManagerService.activePopupId !== I
|
|
17771
17771
|
};
|
|
@@ -17852,7 +17852,15 @@ let Mi = class extends se {
|
|
|
17852
17852
|
}
|
|
17853
17853
|
// TODO @lumixraku to a normal function, not method.
|
|
17854
17854
|
_calcCellPositionByCell(e, t, n, i, o) {
|
|
17855
|
-
const { scene: s, engine: l } = n
|
|
17855
|
+
const { scene: s, engine: l } = n;
|
|
17856
|
+
if (i._disposed || s._disposed)
|
|
17857
|
+
return {
|
|
17858
|
+
left: 0,
|
|
17859
|
+
right: 0,
|
|
17860
|
+
top: 0,
|
|
17861
|
+
bottom: 0
|
|
17862
|
+
};
|
|
17863
|
+
const a = i.getCellWithCoordByIndex(e, t), c = a.isMergedMainCell ? a.mergeInfo : a, { scaleX: d, scaleY: u } = s.getAncestorScale(), h = {
|
|
17856
17864
|
x: o.viewportScrollX,
|
|
17857
17865
|
y: o.viewportScrollY
|
|
17858
17866
|
}, g = l.getCanvasElement();
|
|
@@ -18051,13 +18059,13 @@ const Pf = (r) => {
|
|
|
18051
18059
|
let me = l;
|
|
18052
18060
|
l.substring(0, 1) === Zr.EQUALS ? B("formula") : Re(l) ? (B("formula"), me = Zr.EQUALS + l) : B("range"), T(me), D("");
|
|
18053
18061
|
}, [t]), g.getSheetOrders().forEach((me) => {
|
|
18054
|
-
const
|
|
18062
|
+
const be = g.getSheetBySheetId(me);
|
|
18055
18063
|
ge.push({
|
|
18056
|
-
label: (
|
|
18064
|
+
label: (be == null ? void 0 : be.getName()) || "",
|
|
18057
18065
|
value: me
|
|
18058
18066
|
});
|
|
18059
18067
|
});
|
|
18060
|
-
const
|
|
18068
|
+
const _e = (me) => {
|
|
18061
18069
|
T(me);
|
|
18062
18070
|
}, ke = (me) => {
|
|
18063
18071
|
T(me || "");
|
|
@@ -18093,17 +18101,17 @@ const Pf = (r) => {
|
|
|
18093
18101
|
D(m.t("definedName.nameConflict"));
|
|
18094
18102
|
return;
|
|
18095
18103
|
}
|
|
18096
|
-
const
|
|
18104
|
+
const be = g.getActiveSheet().getName();
|
|
18097
18105
|
i && i({
|
|
18098
18106
|
id: u || "",
|
|
18099
18107
|
name: y,
|
|
18100
|
-
formulaOrRefString: p.convertRefersToAbsolute(E, pu.ALL, pu.ALL,
|
|
18108
|
+
formulaOrRefString: p.convertRefersToAbsolute(E, pu.ALL, pu.ALL, be),
|
|
18101
18109
|
comment: P,
|
|
18102
18110
|
localSheetId: A
|
|
18103
18111
|
});
|
|
18104
18112
|
}, ee = (me) => {
|
|
18105
|
-
const
|
|
18106
|
-
|
|
18113
|
+
const be = me;
|
|
18114
|
+
be === "formula" ? l[0] === Zr.EQUALS ? T(l) : T(`${Zr.EQUALS}`) : l[0] === Zr.EQUALS ? T("") : T(l), B(be);
|
|
18107
18115
|
}, ne = Pn(null), [fe, Ue] = re(!1);
|
|
18108
18116
|
return Zg((me) => {
|
|
18109
18117
|
var le;
|
|
@@ -18135,7 +18143,7 @@ const Pf = (r) => {
|
|
|
18135
18143
|
unitId: I,
|
|
18136
18144
|
subUnitId: R,
|
|
18137
18145
|
initialValue: E,
|
|
18138
|
-
onChange: (me,
|
|
18146
|
+
onChange: (me, be) => _e(be),
|
|
18139
18147
|
supportAcrossSheet: !0
|
|
18140
18148
|
}
|
|
18141
18149
|
) : S && /* @__PURE__ */ _("div", { className: "univer-relative univer-mt-4 univer-h-full", children: /* @__PURE__ */ _("div", { className: "univer-relative univer-h-8 univer-select-none", children: /* @__PURE__ */ _(
|
|
@@ -19016,7 +19024,7 @@ let Tr = class extends se {
|
|
|
19016
19024
|
)
|
|
19017
19025
|
), this.disposeWithMe(
|
|
19018
19026
|
this._commandService.onCommandExecuted((n) => {
|
|
19019
|
-
if (n.id ===
|
|
19027
|
+
if (n.id === we.id) {
|
|
19020
19028
|
const i = this._selectionManagerService.getCurrentSelections();
|
|
19021
19029
|
i && e(i);
|
|
19022
19030
|
}
|
|
@@ -19252,6 +19260,7 @@ let Lo = class extends se {
|
|
|
19252
19260
|
return this._currentAlert;
|
|
19253
19261
|
}
|
|
19254
19262
|
showAlert(e) {
|
|
19263
|
+
var d;
|
|
19255
19264
|
let t = this._currentAlert.get(e.key);
|
|
19256
19265
|
t && t.dispose.dispose(), t ? t.dispose.dispose() : (t = {
|
|
19257
19266
|
alert: e,
|
|
@@ -19279,7 +19288,7 @@ let Lo = class extends se {
|
|
|
19279
19288
|
priority: 1
|
|
19280
19289
|
}
|
|
19281
19290
|
);
|
|
19282
|
-
c && (t.dispose = c), this._currentAlert$.next(Array.from(this._currentAlert.entries()));
|
|
19291
|
+
c && (t && ((d = t.dispose) == null || d.dispose()), t.dispose = c), this._currentAlert$.next(Array.from(this._currentAlert.entries()));
|
|
19283
19292
|
}
|
|
19284
19293
|
removeAlert(e) {
|
|
19285
19294
|
const t = this._currentAlert.get(e);
|
|
@@ -19669,7 +19678,7 @@ function fp(r, e, t, n) {
|
|
|
19669
19678
|
cellValue: ce.deepClone(u.getMatrix())
|
|
19670
19679
|
};
|
|
19671
19680
|
a.push({
|
|
19672
|
-
id:
|
|
19681
|
+
id: we.id,
|
|
19673
19682
|
params: h
|
|
19674
19683
|
});
|
|
19675
19684
|
const g = en(
|
|
@@ -19677,7 +19686,7 @@ function fp(r, e, t, n) {
|
|
|
19677
19686
|
h
|
|
19678
19687
|
);
|
|
19679
19688
|
return c.push({
|
|
19680
|
-
id:
|
|
19689
|
+
id: we.id,
|
|
19681
19690
|
params: g
|
|
19682
19691
|
}), {
|
|
19683
19692
|
undos: c,
|
|
@@ -19718,7 +19727,7 @@ function pp(r, e, t, n, i = !1) {
|
|
|
19718
19727
|
cellValue: ce.deepClone(u.getMatrix())
|
|
19719
19728
|
};
|
|
19720
19729
|
o.push({
|
|
19721
|
-
id:
|
|
19730
|
+
id: we.id,
|
|
19722
19731
|
params: g
|
|
19723
19732
|
});
|
|
19724
19733
|
const m = en(
|
|
@@ -19726,7 +19735,7 @@ function pp(r, e, t, n, i = !1) {
|
|
|
19726
19735
|
g
|
|
19727
19736
|
);
|
|
19728
19737
|
return s.push({
|
|
19729
|
-
id:
|
|
19738
|
+
id: we.id,
|
|
19730
19739
|
params: m
|
|
19731
19740
|
}), {
|
|
19732
19741
|
undos: s,
|
|
@@ -19747,7 +19756,7 @@ function vp(r, e, t) {
|
|
|
19747
19756
|
cellValue: ce.deepClone(o.getMatrix())
|
|
19748
19757
|
};
|
|
19749
19758
|
n.push({
|
|
19750
|
-
id:
|
|
19759
|
+
id: we.id,
|
|
19751
19760
|
params: d
|
|
19752
19761
|
});
|
|
19753
19762
|
const u = en(
|
|
@@ -19755,7 +19764,7 @@ function vp(r, e, t) {
|
|
|
19755
19764
|
d
|
|
19756
19765
|
);
|
|
19757
19766
|
i.push({
|
|
19758
|
-
id:
|
|
19767
|
+
id: we.id,
|
|
19759
19768
|
params: u
|
|
19760
19769
|
});
|
|
19761
19770
|
}
|
|
@@ -19773,7 +19782,7 @@ function VR(r, e, t) {
|
|
|
19773
19782
|
cellValue: ce.deepClone(o.getMatrix())
|
|
19774
19783
|
};
|
|
19775
19784
|
n.push({
|
|
19776
|
-
id:
|
|
19785
|
+
id: we.id,
|
|
19777
19786
|
params: d
|
|
19778
19787
|
});
|
|
19779
19788
|
const u = en(
|
|
@@ -19781,7 +19790,7 @@ function VR(r, e, t) {
|
|
|
19781
19790
|
d
|
|
19782
19791
|
);
|
|
19783
19792
|
i.push({
|
|
19784
|
-
id:
|
|
19793
|
+
id: we.id,
|
|
19785
19794
|
params: u
|
|
19786
19795
|
});
|
|
19787
19796
|
}
|
|
@@ -20238,13 +20247,13 @@ let Pr = class extends Dn {
|
|
|
20238
20247
|
return {
|
|
20239
20248
|
redos: [
|
|
20240
20249
|
{
|
|
20241
|
-
id:
|
|
20250
|
+
id: we.id,
|
|
20242
20251
|
params: a
|
|
20243
20252
|
}
|
|
20244
20253
|
],
|
|
20245
20254
|
undos: [
|
|
20246
20255
|
{
|
|
20247
|
-
id:
|
|
20256
|
+
id: we.id,
|
|
20248
20257
|
params: en(this._injector, a)
|
|
20249
20258
|
}
|
|
20250
20259
|
]
|
|
@@ -20364,7 +20373,7 @@ let Pr = class extends Dn {
|
|
|
20364
20373
|
cellValue: f.getData()
|
|
20365
20374
|
};
|
|
20366
20375
|
d.push({
|
|
20367
|
-
id:
|
|
20376
|
+
id: we.id,
|
|
20368
20377
|
params: v
|
|
20369
20378
|
});
|
|
20370
20379
|
const p = this._injector.invoke(
|
|
@@ -20372,7 +20381,7 @@ let Pr = class extends Dn {
|
|
|
20372
20381
|
v
|
|
20373
20382
|
);
|
|
20374
20383
|
u.push({
|
|
20375
|
-
id:
|
|
20384
|
+
id: we.id,
|
|
20376
20385
|
params: p
|
|
20377
20386
|
});
|
|
20378
20387
|
const { undos: C, redos: w } = this._injector.invoke((S) => Jc(l, a, S));
|
|
@@ -20592,7 +20601,7 @@ let Oi = class extends se {
|
|
|
20592
20601
|
}
|
|
20593
20602
|
})
|
|
20594
20603
|
);
|
|
20595
|
-
const e = [
|
|
20604
|
+
const e = [we.id, nr.id];
|
|
20596
20605
|
this.disposeWithMe(
|
|
20597
20606
|
this._commandService.onCommandExecuted((t) => {
|
|
20598
20607
|
var n, i, o, s, l, a, c;
|
|
@@ -20602,7 +20611,7 @@ let Oi = class extends se {
|
|
|
20602
20611
|
return;
|
|
20603
20612
|
let u = !1;
|
|
20604
20613
|
const { row: h, column: g } = d;
|
|
20605
|
-
if (t.id ===
|
|
20614
|
+
if (t.id === we.id && t.params ? (i = (n = t.params.cellValue) == null ? void 0 : n[h]) != null && i[g] && (u = !0) : t.id === nr.id && t.params && (s = (o = t.params.to.value) == null ? void 0 : o[h]) != null && s[g] && (u = !0), u) {
|
|
20606
20615
|
const m = ce.deepClone((l = d.documentLayoutObject.documentModel) == null ? void 0 : l.getBody()), f = ce.deepClone((a = d.documentLayoutObject.documentModel) == null ? void 0 : a.drawings), v = ce.deepClone((c = d.documentLayoutObject.documentModel) == null ? void 0 : c.getDrawingsOrder());
|
|
20607
20616
|
if (m == null)
|
|
20608
20617
|
return;
|
|
@@ -20935,14 +20944,14 @@ let Ai = class extends se {
|
|
|
20935
20944
|
}
|
|
20936
20945
|
return {
|
|
20937
20946
|
undos: [
|
|
20938
|
-
{ id:
|
|
20939
|
-
{ id:
|
|
20947
|
+
{ id: we.id, params: R },
|
|
20948
|
+
{ id: we.id, params: M },
|
|
20940
20949
|
...E,
|
|
20941
20950
|
...H
|
|
20942
20951
|
],
|
|
20943
20952
|
redos: [
|
|
20944
|
-
{ id:
|
|
20945
|
-
{ id:
|
|
20953
|
+
{ id: we.id, params: R },
|
|
20954
|
+
{ id: we.id, params: y },
|
|
20946
20955
|
...T,
|
|
20947
20956
|
...P
|
|
20948
20957
|
]
|
|
@@ -22046,8 +22055,8 @@ function RI() {
|
|
|
22046
22055
|
objectIDs: G,
|
|
22047
22056
|
unitID: D,
|
|
22048
22057
|
actions: wS
|
|
22049
|
-
}), Re = l.getSubunitRuleList(D, X).map((ee) => ee.permissionId),
|
|
22050
|
-
|
|
22058
|
+
}), Re = l.getSubunitRuleList(D, X).map((ee) => ee.permissionId), _e = (Z = a.getRule(D, X)) == null ? void 0 : Z.permissionId;
|
|
22059
|
+
_e && Re.push(_e);
|
|
22051
22060
|
const ke = ge.filter((ee) => {
|
|
22052
22061
|
var ne;
|
|
22053
22062
|
return Re.includes(ee.objectID) || ee.objectID === ((ne = a.getRule(D, X)) == null ? void 0 : ne.permissionId);
|
|
@@ -22135,11 +22144,11 @@ function RI() {
|
|
|
22135
22144
|
] })
|
|
22136
22145
|
] }),
|
|
22137
22146
|
(R == null ? void 0 : R.length) > 0 ? /* @__PURE__ */ _("div", { children: R == null ? void 0 : R.map((x) => {
|
|
22138
|
-
var ne, fe, Ue, me,
|
|
22147
|
+
var ne, fe, Ue, me, be;
|
|
22139
22148
|
const V = E.get(x.objectID);
|
|
22140
22149
|
if (!V)
|
|
22141
22150
|
return null;
|
|
22142
|
-
const D = x.actions.find((le) => le.action === ue.Edit), X = D == null ? void 0 : D.allowed, B = x.actions.find((le) => le.action === ue.View), j = B == null ? void 0 : B.allowed, G = x.actions.find((le) => le.action === ue.ManageCollaborator), ge = x.actions.find((le) => le.action === ue.Delete), Re = (G == null ? void 0 : G.allowed) || f.userID === ((ne = x.creator) == null ? void 0 : ne.userID),
|
|
22151
|
+
const D = x.actions.find((le) => le.action === ue.Edit), X = D == null ? void 0 : D.allowed, B = x.actions.find((le) => le.action === ue.View), j = B == null ? void 0 : B.allowed, G = x.actions.find((le) => le.action === ue.ManageCollaborator), ge = x.actions.find((le) => le.action === ue.Delete), Re = (G == null ? void 0 : G.allowed) || f.userID === ((ne = x.creator) == null ? void 0 : ne.userID), _e = (ge == null ? void 0 : ge.allowed) || f.userID === ((fe = x.creator) == null ? void 0 : fe.userID);
|
|
22143
22152
|
let ke = "";
|
|
22144
22153
|
const Z = w.getSheetBySheetId(V.subUnitId), ee = Z == null ? void 0 : Z.getName();
|
|
22145
22154
|
if (V.unitType === Mn.SelectRange) {
|
|
@@ -22178,7 +22187,7 @@ function RI() {
|
|
|
22178
22187
|
children: ke
|
|
22179
22188
|
}
|
|
22180
22189
|
) }),
|
|
22181
|
-
(Re ||
|
|
22190
|
+
(Re || _e) && /* @__PURE__ */ q("div", { className: "univer-flex univer-items-center", children: [
|
|
22182
22191
|
Re && /* @__PURE__ */ _(Gn, { title: s.t("permission.panel.edit"), children: /* @__PURE__ */ _(
|
|
22183
22192
|
"div",
|
|
22184
22193
|
{
|
|
@@ -22187,7 +22196,7 @@ function RI() {
|
|
|
22187
22196
|
children: /* @__PURE__ */ _(ou, {})
|
|
22188
22197
|
}
|
|
22189
22198
|
) }),
|
|
22190
|
-
|
|
22199
|
+
_e && /* @__PURE__ */ _(Gn, { title: s.t("permission.panel.delete"), children: /* @__PURE__ */ _(
|
|
22191
22200
|
"div",
|
|
22192
22201
|
{
|
|
22193
22202
|
className: "univer-box-border univer-h-6 univer-rounded-sm univer-p-1 hover:univer-bg-gray-200",
|
|
@@ -22200,7 +22209,7 @@ function RI() {
|
|
|
22200
22209
|
/* @__PURE__ */ _("div", { className: "univer-my-2 univer-h-px univer-bg-gray-200" }),
|
|
22201
22210
|
/* @__PURE__ */ q("div", { children: [
|
|
22202
22211
|
/* @__PURE__ */ q("div", { className: "univer-flex univer-items-center", children: [
|
|
22203
|
-
/* @__PURE__ */ _(Gn, { title: (me = (Ue = x.creator) == null ? void 0 : Ue.name) != null ? me : "", children: /* @__PURE__ */ _("div", { children: /* @__PURE__ */ _(Nd, { src: (
|
|
22212
|
+
/* @__PURE__ */ _(Gn, { title: (me = (Ue = x.creator) == null ? void 0 : Ue.name) != null ? me : "", children: /* @__PURE__ */ _("div", { children: /* @__PURE__ */ _(Nd, { src: (be = x.creator) == null ? void 0 : be.avatar, className: "univer-mr-1.5", size: 24 }) }) }),
|
|
22204
22213
|
/* @__PURE__ */ _(
|
|
22205
22214
|
"span",
|
|
22206
22215
|
{
|