@univerjs/sheets-ui 0.6.6-nightly.202503141606 → 0.6.6-nightly.202503151606
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 +27 -27
- package/lib/es/index.js +110 -104
- package/lib/types/controllers/auto-height.controller.d.ts +4 -10
- package/lib/umd/index.js +1 -1
- package/package.json +12 -12
package/lib/es/index.js
CHANGED
|
@@ -6,10 +6,10 @@ import { CommandType as Q, createInterceptorKey as cr, ColorKit as Hn, RANGE_TYP
|
|
|
6
6
|
import { IRenderManagerService as be, withCurrentTypeOfRenderer as ud, SHEET_VIEWPORT_KEY as U, CURSOR_TYPE as ye, Vector2 as ke, Rect as Ce, ScrollTimer as ri, ScrollTimerType as Pt, DashedRect as sS, Group as va, TRANSFORM_CHANGE_OBSERVABLE_TYPE as mc, cancelRequestFrame as lS, requestNewFrame as aS, FIX_ONE_PIXEL_BLUR_OFFSET as cS, Layer as dS, SpreadsheetSkeleton as uS, DeviceInputEventType as Ye, convertTransformToOffsetX as Kr, convertTransformToOffsetY as Jr, convertTextRotation as hd, RENDER_RAW_FORMULA_KEY as hS, Spreadsheet as Gh, getCurrentTypeOfRenderer as gd, RENDER_CLASS_TYPE as gS, ScrollBar as md, fixLineWidthByScale as Su, ptToPixel as vu, Shape as fd, SHEET_EXTENSION_PREFIX as Cu, SpreadsheetRowHeader as mS, SpreadsheetColumnHeader as fS, Viewport as _n, hasCJKText as pS, DEFAULT_PADDING_DATA as SS, SheetExtension as qh, RegularPolygon as Yi, precisionTo as tr } from "@univerjs/engine-render";
|
|
7
7
|
import { useDependency as L, useObservable as gt, KeyCode as Z, Slider as vS, ComponentManager as zn, DISABLE_AUTO_FOCUS_KEY as bu, useEvent as _u, useSidebarClick as Qh, MetaKeys as Te, ISidebarService as Mi, useComponentsOfPart as Kh, ComponentContainer as Jh, IConfirmService as rn, UI_PLUGIN_CONFIG_KEY as $h, UIMenu as CS, ContextMenuPosition as Rt, IMessageService as eg, IClipboardInterfaceService as Ol, IMenuManagerService as pd, ToolbarItem as bS, ILayoutService as xl, DEFAULT_BACKGROUND_COLOR_RGB as _S, DEFAULT_BACKGROUND_COLOR_RGBA as wS, handleStringToStyle as RS, textTrim as wu, INotificationService as IS, IPlatformService as yS, PLAIN_TEXT_CLIPBOARD_MIME_TYPE as Ru, HTML_CLIPBOARD_MIME_TYPE as Iu, imageMimeTypeSet as MS, FILE__BMP_CLIPBOARD_MIME_TYPE as ES, FILE__WEBP_CLIPBOARD_MIME_TYPE as PS, FILE__JPEG_CLIPBOARD_MIME_TYPE as TS, FILE_PNG_CLIPBOARD_MIME_TYPE as OS, CopyCommand as xS, CutCommand as AS, PasteCommand as kS, SheetPasteShortKeyCommandName as HS, IContextMenuService as Al, getMenuHiddenObservable as ue, MenuItemType as K, FONT_SIZE_LIST as VS, FONT_FAMILY_LIST as NS, IDialogService as Ei, ContextMenuGroup as Qe, RibbonStartGroup as Ca, IShortcutService as kl, IUIPartsService as Hl, FontFamily as tg, FontFamilyItem as ng, FontSize as rg, BuiltInUIPart as Ki, connectInjector as ii, ICanvasPopupService as DS, IZenZoneService as LS, UniverMobileUIPlugin as WS } from "@univerjs/ui";
|
|
8
8
|
import BS, { forwardRef as ft, useRef as An, createElement as ht, useState as ne, useMemo as Dt, useEffect as Pe, useCallback as Nn, useLayoutEffect as FS } from "react";
|
|
9
|
-
import { BehaviorSubject as Me, Subject as xe, of as Re, merge as _t, map as
|
|
10
|
-
import { SELECTION_CONTROL_BORDER_BUFFER_WIDTH as Ts, SELECTION_CONTROL_BORDER_BUFFER_COLOR as rs, SELECTIONS_ENABLED as $r, REF_SELECTIONS_ENABLED as oo, SheetSkeletonService as zS, SheetsSelectionsService as $, SheetInterceptorService as Xn, SetWorksheetRowAutoHeightMutationFactory as og, SetWorksheetRowAutoHeightMutation as yr, SetRangeValuesCommand as Ho, SetWorksheetRowIsAutoHeightCommand as Nl, SetStyleCommand as XS, MoveRangeCommand as Sd, ReorderRangeCommand as jS, rangeToDiscreteRange as Ji, SetSelectionsOperation as Ee, SetRangeValuesMutation as we,
|
|
9
|
+
import { BehaviorSubject as Me, Subject as xe, of as Re, merge as _t, map as Fe, startWith as Gt, switchMap as ct, takeUntil as gi, distinctUntilChanged as un, throttleTime as ig, EMPTY as yu, filter as Vl, combineLatest as dt, combineLatestWith as dr, Observable as ze, Subscription as rr, withLatestFrom as US } from "rxjs";
|
|
10
|
+
import { SELECTION_CONTROL_BORDER_BUFFER_WIDTH as Ts, SELECTION_CONTROL_BORDER_BUFFER_COLOR as rs, SELECTIONS_ENABLED as $r, REF_SELECTIONS_ENABLED as oo, SheetSkeletonService as zS, SheetsSelectionsService as $, SheetInterceptorService as Xn, getSheetCommandTarget as Be, SetWorksheetRowAutoHeightMutationFactory as og, SetWorksheetRowAutoHeightMutation as yr, SetRangeValuesCommand as Ho, SetWorksheetRowIsAutoHeightCommand as Nl, SetStyleCommand as XS, MoveRangeCommand as Sd, ReorderRangeCommand as jS, rangeToDiscreteRange as Ji, SetSelectionsOperation as Ee, SetRangeValuesMutation as we, generateNullCellValue as YS, SetRangeValuesUndoMutationFactory as nn, IRefSelectionsService as Dl, BEFORE_CELL_EDIT as ZS, SetWorksheetActiveOperation as rt, MoveRangeMutation as sr, RemoveRowMutation as Vo, RemoveColMutation as No, InsertRowMutation as Do, InsertColMutation as Lo, MoveRowsMutation as Ll, MoveColsMutation as Wl, SetWorksheetColWidthMutation as an, SetWorksheetRowHeightMutation as so, RemoveSheetMutation as Dn, RemoveMergeUndoMutationFactory as Bl, RemoveWorksheetMergeMutation as $t, AddWorksheetMergeMutation as en, getAddMergeMutationRangeByType as Fl, AddMergeUndoMutationFactory as Ul, WorkbookEditablePermission as J, WorksheetEditPermission as te, UnitAction as lo, alignToMergedCellsBorders as xn, getSelectionsService as Wo, SelectionMoveType as Yt, getCellAtRowCol as vs, expandToContinuousRange as GS, ScrollToCellOperation as vd, SetWorksheetShowCommand as Cd, WorksheetProtectionRuleModel as pt, RangeProtectionRuleModel as et, RangeProtectionCache as Bo, WorksheetViewPermission as sg, SetWorksheetOrderMutation as bd, InsertSheetMutation as Vr, SetWorksheetNameMutation as _d, SetWorksheetHideMutation as lr, SetWorksheetActivateCommand as wd, WorkbookManageCollaboratorPermission as lg, WorkbookRenameSheetPermission as ag, SetWorksheetOrderCommand as qS, SetWorksheetNameCommand as QS, SetTabColorMutation as KS, WorkbookCreateSheetPermission as cg, InsertSheetCommand as JS, COMMAND_LISTENER_SKELETON_CHANGE as Os, adjustRangeOnMutation as $S, getPrimaryForRange as dg, SetRowHiddenCommand as ug, SetColHiddenCommand as hg, SetBoldCommand as Rd, SetItalicCommand as Id, SetUnderlineCommand as yd, SetStrikeThroughCommand as Md, SetFontSizeCommand as Ed, SetFontFamilyCommand as Pd, SetTextColorCommand as gg, SetFrozenMutationFactory as mg, SetFrozenMutation as Rr, RangeProtectionPermissionEditPoint as ie, IExclusiveRangeService as ev, CancelFrozenCommand as Cs, WorksheetSetRowStylePermission as Nr, SetRowHeightCommand as fg, SetRowHiddenMutation as pg, SetRowVisibleMutation as Sg, SetSelectedRowsVisibleCommand as vg, WorksheetSetCellStylePermission as Ge, WorksheetSetCellValuePermission as Jt, WorksheetSetColumnStylePermission as Dr, SetColWidthCommand as Cg, SetColHiddenMutation as bg, SetColVisibleMutation as _g, SetSelectedColsVisibleCommand as wg, SetTextRotationCommand as fc, SetTextWrapCommand as pc, SetVerticalTextAlignCommand as Sc, SetHorizontalTextAlignCommand as vc, ResetBackgroundColorCommand as Rg, SetBackgroundColorCommand as xs, WorksheetCopyPermission as As, RangeProtectionPermissionViewPoint as Cc, WorkbookCopyPermission as Zi, SetWorksheetRowIsAutoHeightMutation as tv, SetFrozenCommand as nv, InsertRangeMoveDownCommand as bc, InsertRangeMoveRightCommand as _c, InsertRowCommand as rv, InsertColCommand as iv, MoveColsCommand as Ig, MoveRowsCommand as yg, RemoveColCommand as Mg, RemoveRowCommand as Eg, MergeCellController as ov, MERGE_CELL_INTERCEPTOR_CHECK as sv, DeltaRowHeightCommand as lv, DeltaColumnWidthCommand as av, COMMAND_LISTENER_VALUE_CHANGE as cv, AddMergeRedoSelectionsOperationFactory as dv, AddMergeUndoSelectionsOperationFactory as uv, DeleteRangeMoveLeftCommand as Mu, DeleteRangeMoveUpCommand as Eu, EditStateEnum as cn, ViewStateEnum as mi, UnitObject as Vt, DeleteWorksheetProtectionCommand as ks, DeleteRangeProtectionMutation as Pu, AddRangeProtectionMutation as hv, RemoveSheetCommand as gv, AddWorksheetProtectionCommand as Pg, BorderStyleManagerService as wc, SCOPE_WORKBOOK_VALUE_DEFINED_NAME as Rc, InsertDefinedNameCommand as mv, SetDefinedNameCommand as fv, RemoveDefinedNameCommand as pv, SetBorderBasicCommand as Ic, ClearSelectionAllCommand as bs, ClearSelectionFormatCommand as $i, ClearSelectionContentCommand as oi, WorksheetDeleteRowPermission as Sv, WorksheetDeleteColumnPermission as vv, ToggleGridlinesCommand as Tg, ToggleGridlinesMutation as Cv, InsertMultiRowsAfterCommand as Og, WorksheetInsertRowPermission as Fo, InsertMultiRowsAboveCommand as Td, InsertMultiColsLeftCommand as xg, InsertColBeforeCommand as Ag, WorksheetInsertColumnPermission as kg, InsertRowBeforeCommand as Hg, RemoveWorksheetMergeCommand as Vg, WorkbookCreateProtectPermission as zl, WorksheetDeleteProtectionPermission as Ng, WorksheetManageCollaboratorPermission as bv, SetWorksheetHideCommand as Dg, SetTabColorCommand as Lg, CopySheetCommand as Wg, WorkbookDeleteSheetPermission as _v, WorkbookHideSheetPermission as Bg, InsertMultiColsRightCommand as wv, AddWorksheetMergeCommand as Rv, AddWorksheetMergeHorizontalCommand as Iv, AddWorksheetMergeVerticalCommand as yv, AddWorksheetMergeAllCommand as Mv, ResetTextColorCommand as Ev, RefRangeService as Pv, MAX_CELL_PER_SHEET_KEY as Tv, INTERCEPTOR_POINT as Ov, SheetPermissionCheckController as Fg, INumfmtService as xv, SetProtectionCommand as Av, AddRangeProtectionCommand as kv, setEndForRange as Hv, baseProtectionActions as Vv, DeleteRangeProtectionCommand as Nv, WorksheetProtectionPointModel as Dv, SetWorksheetPermissionPointsCommand as Lv, getAllWorksheetPermissionPoint as Wv, convertSelectionDataToRange as Ug, UniverSheetsPlugin as zg, RefSelectionsService as Xg, ToggleCellCheckboxCommand as Bv, SheetPermissionInitController as Fv, SetSpecificRowsVisibleCommand as Uv, SetSpecificColsVisibleCommand as zv } from "@univerjs/sheets";
|
|
11
11
|
import { DocSkeletonManagerService as ir, DocSelectionManagerService as Od, RichTextEditingMutation as Hs, SetTextSelectionsOperation as Uo } from "@univerjs/docs";
|
|
12
|
-
import { IDefinedNamesService as zo, FUNCTION_NAMES_STATISTICAL as
|
|
12
|
+
import { IDefinedNamesService as zo, FUNCTION_NAMES_STATISTICAL as Ue, FUNCTION_NAMES_MATH as Xl, FUNCTION_NAMES_TEXT as Xv, sequenceNodeType as ba, matchToken as jg, LexerTreeBuilder as Yg, IFunctionService as Zg, SetFormulaCalculationNotificationMutation as jv, operatorToken as Qr, isReferenceStrings as Gg, isReferenceStringWithEffectiveColumn as Yv, serializeRangeWithSheet as qg, NullValueObject as Tu, serializeRange as Qg, deserializeRangeWithSheet as Kg } from "@univerjs/engine-formula";
|
|
13
13
|
import { isTextFormat as Zv } from "@univerjs/engine-numfmt";
|
|
14
14
|
import { jsx as b, jsxs as q, Fragment as Mr } from "react/jsx-runtime";
|
|
15
15
|
import { DropdownMenu as Jg, clsx as qe, Dropdown as Vs, DropdownLegacy as Gv, Tooltip as er, MessageType as $g, InputNumber as qv, Separator as Qv, ColorPicker as xd, Input as Ns, RadioGroup as yc, Radio as ei, Select as em, Button as pn, Confirm as Kv, FormLayout as Ds, Avatar as Ad, Switch as Jv } from "@univerjs/design";
|
|
@@ -2074,7 +2074,7 @@ function PE() {
|
|
|
2074
2074
|
r.getTypeOfUnitAdded$(x.UNIVER_SHEET),
|
|
2075
2075
|
r.getTypeOfUnitDisposed$(x.UNIVER_SHEET)
|
|
2076
2076
|
]).pipe(
|
|
2077
|
-
|
|
2077
|
+
Fe(() => r.getAllUnitsForType(x.UNIVER_SHEET)),
|
|
2078
2078
|
Gt(r.getAllUnitsForType(x.UNIVER_SHEET))
|
|
2079
2079
|
), [], void 0, [r]);
|
|
2080
2080
|
}
|
|
@@ -2101,39 +2101,45 @@ let co = class extends de {
|
|
|
2101
2101
|
e = e === void 0 ? n : Math.min(e, n), t = t === void 0 ? i : Math.max(t, i);
|
|
2102
2102
|
return t - e + 1;
|
|
2103
2103
|
}
|
|
2104
|
-
getUndoRedoParamsOfAutoHeight(r) {
|
|
2105
|
-
var
|
|
2106
|
-
const { _univerInstanceService:
|
|
2107
|
-
|
|
2104
|
+
getUndoRedoParamsOfAutoHeight(r, e) {
|
|
2105
|
+
var S;
|
|
2106
|
+
const { _univerInstanceService: t, _configService: n } = this, i = t.getCurrentUnitForType(x.UNIVER_SHEET), o = i.getUnitId();
|
|
2107
|
+
let s = i.getActiveSheet(), l = s.getSheetId();
|
|
2108
|
+
if (e) {
|
|
2109
|
+
const v = Be(t, { unitId: o, subUnitId: e });
|
|
2110
|
+
v && (s = v.worksheet, l = s.getSheetId());
|
|
2111
|
+
}
|
|
2112
|
+
const c = this._renderManagerService.getRenderById(o).with(ge).ensureSkeleton(l);
|
|
2113
|
+
if (!c)
|
|
2108
2114
|
return {
|
|
2109
2115
|
redos: [],
|
|
2110
2116
|
undos: []
|
|
2111
2117
|
};
|
|
2112
|
-
const
|
|
2113
|
-
let
|
|
2114
|
-
Array.isArray(r) || (r && r.startRow !== void 0 && r.startRow !== void 0 ?
|
|
2115
|
-
const
|
|
2116
|
-
if (((
|
|
2118
|
+
const d = n.getConfig(Ln);
|
|
2119
|
+
let u = r;
|
|
2120
|
+
Array.isArray(r) || (r && r.startRow !== void 0 && r.startRow !== void 0 ? u = [r] : u = []);
|
|
2121
|
+
const h = this._getRangesScope(u);
|
|
2122
|
+
if (((S = d == null ? void 0 : d.maxAutoHeightCount) != null ? S : 1e3) < h)
|
|
2117
2123
|
return {
|
|
2118
2124
|
redos: [],
|
|
2119
2125
|
undos: []
|
|
2120
2126
|
};
|
|
2121
|
-
const
|
|
2122
|
-
subUnitId:
|
|
2127
|
+
const m = c.calculateAutoHeightInRange(r), f = {
|
|
2128
|
+
subUnitId: l,
|
|
2123
2129
|
unitId: o,
|
|
2124
|
-
rowsAutoHeightInfo:
|
|
2125
|
-
},
|
|
2130
|
+
rowsAutoHeightInfo: m
|
|
2131
|
+
}, p = og(f, s);
|
|
2126
2132
|
return {
|
|
2127
2133
|
undos: [
|
|
2128
2134
|
{
|
|
2129
2135
|
id: yr.id,
|
|
2130
|
-
params:
|
|
2136
|
+
params: p
|
|
2131
2137
|
}
|
|
2132
2138
|
],
|
|
2133
2139
|
redos: [
|
|
2134
2140
|
{
|
|
2135
2141
|
id: yr.id,
|
|
2136
|
-
params:
|
|
2142
|
+
params: f
|
|
2137
2143
|
}
|
|
2138
2144
|
]
|
|
2139
2145
|
};
|
|
@@ -2145,7 +2151,7 @@ let co = class extends de {
|
|
|
2145
2151
|
getMutations: (t) => {
|
|
2146
2152
|
if (t.id === Ho.id) {
|
|
2147
2153
|
const n = t.params;
|
|
2148
|
-
return this.getUndoRedoParamsOfAutoHeight(n.range);
|
|
2154
|
+
return this.getUndoRedoParamsOfAutoHeight(n.range, n.subUnitId);
|
|
2149
2155
|
}
|
|
2150
2156
|
return {
|
|
2151
2157
|
redos: [],
|
|
@@ -2156,7 +2162,7 @@ let co = class extends de {
|
|
|
2156
2162
|
getMutations: (t) => t.id !== Nl.id ? {
|
|
2157
2163
|
redos: [],
|
|
2158
2164
|
undos: []
|
|
2159
|
-
} : this.getUndoRedoParamsOfAutoHeight(t.params.ranges)
|
|
2165
|
+
} : this.getUndoRedoParamsOfAutoHeight(t.params.ranges, t.params.subUnitId)
|
|
2160
2166
|
})), this.disposeWithMe(r.interceptCommand({
|
|
2161
2167
|
getMutations: (t) => {
|
|
2162
2168
|
var i, o;
|
|
@@ -2171,7 +2177,7 @@ let co = class extends de {
|
|
|
2171
2177
|
undos: []
|
|
2172
2178
|
};
|
|
2173
2179
|
const n = (o = e.getCurrentSelections()) == null ? void 0 : o.map((s) => s.range);
|
|
2174
|
-
return n != null && n.length ? this.getUndoRedoParamsOfAutoHeight(n) : {
|
|
2180
|
+
return n != null && n.length ? this.getUndoRedoParamsOfAutoHeight(n, t.params.subUnitId) : {
|
|
2175
2181
|
redos: [],
|
|
2176
2182
|
undos: []
|
|
2177
2183
|
};
|
|
@@ -3147,7 +3153,7 @@ const Lr = vn("univer.auto-fill-service"), br = {
|
|
|
3147
3153
|
type: Q.COMMAND,
|
|
3148
3154
|
id: "sheet.command.auto-fill",
|
|
3149
3155
|
handler: async (r, e) => {
|
|
3150
|
-
const t = r.get(Lr), n = r.get(N), { sourceRange: i, targetRange: o } = e, s =
|
|
3156
|
+
const t = r.get(Lr), n = r.get(N), { sourceRange: i, targetRange: o } = e, s = Be(n);
|
|
3151
3157
|
if (!s) return !1;
|
|
3152
3158
|
const { subUnitId: l, unitId: a } = s;
|
|
3153
3159
|
return t.triggerAutoFill(a, l, i, o);
|
|
@@ -3156,7 +3162,7 @@ const Lr = vn("univer.auto-fill-service"), br = {
|
|
|
3156
3162
|
id: "sheet.command.auto-clear-content",
|
|
3157
3163
|
type: Q.COMMAND,
|
|
3158
3164
|
handler: async (r, e) => {
|
|
3159
|
-
const t = r.get(N), n = r.get(D), i = r.get(qt), o = r.get(Xn), s =
|
|
3165
|
+
const t = r.get(N), n = r.get(D), i = r.get(qt), o = r.get(Xn), s = Be(t);
|
|
3160
3166
|
if (!s) return !1;
|
|
3161
3167
|
const { unitId: l, subUnitId: a } = s, { clearRange: c, selectionRange: d } = e, u = {
|
|
3162
3168
|
subUnitId: a,
|
|
@@ -3231,7 +3237,7 @@ let Ac = class extends de {
|
|
|
3231
3237
|
_(this, "_currentEditCellLayout$", new Me(null));
|
|
3232
3238
|
_(this, "currentEditCellLayout$", this._currentEditCellLayout$.asObservable());
|
|
3233
3239
|
_(this, "currentEditCell$", this._currentEditCellState$.pipe(
|
|
3234
|
-
ct((e) => this._currentEditCellLayout$.pipe(
|
|
3240
|
+
ct((e) => this._currentEditCellLayout$.pipe(Fe((t) => e && t ? { ...e, ...t } : null)))
|
|
3235
3241
|
));
|
|
3236
3242
|
_(this, "_visible$", new Me(this._visible));
|
|
3237
3243
|
_(this, "visible$", this._visible$.asObservable());
|
|
@@ -3463,7 +3469,7 @@ const it = vn("univer.sheet-editor-bridge.service"), at = {
|
|
|
3463
3469
|
handler: (r, e) => {
|
|
3464
3470
|
if (!e)
|
|
3465
3471
|
return !1;
|
|
3466
|
-
const t = r.get(N), n =
|
|
3472
|
+
const t = r.get(N), n = Be(t);
|
|
3467
3473
|
if (!n) return !1;
|
|
3468
3474
|
const { worksheet: i, subUnitId: o, unitId: s } = n, { delta: l, reset: a } = e;
|
|
3469
3475
|
let c = a ? 100 : Math.round((i.getConfig().zoomRatio + l) * 100);
|
|
@@ -4639,7 +4645,7 @@ const Bt = {
|
|
|
4639
4645
|
handler: (r, e) => {
|
|
4640
4646
|
if (!e)
|
|
4641
4647
|
return !1;
|
|
4642
|
-
const t =
|
|
4648
|
+
const t = Be(r.get(N));
|
|
4643
4649
|
if (!t) return !1;
|
|
4644
4650
|
const { workbook: n, worksheet: i } = t, o = Wo(r, e.fromCurrentSelection).getCurrentLastSelection();
|
|
4645
4651
|
if (!o)
|
|
@@ -4685,7 +4691,7 @@ const Bt = {
|
|
|
4685
4691
|
var H;
|
|
4686
4692
|
if (!e)
|
|
4687
4693
|
return !1;
|
|
4688
|
-
const t =
|
|
4694
|
+
const t = Be(r.get(N));
|
|
4689
4695
|
if (!t) return !1;
|
|
4690
4696
|
const { workbook: n, worksheet: i } = t, o = Wo(r), { direction: s, keycode: l } = e, a = s === W.LEFT || s === W.UP, c = o.getCurrentSelections().concat(), d = c.findIndex((F) => F.primary), u = c[d];
|
|
4691
4697
|
if (!u)
|
|
@@ -4791,7 +4797,7 @@ const Bt = {
|
|
|
4791
4797
|
type: Q.COMMAND,
|
|
4792
4798
|
handler: (r, e) => {
|
|
4793
4799
|
if (!e) return !1;
|
|
4794
|
-
const t =
|
|
4800
|
+
const t = Be(r.get(N));
|
|
4795
4801
|
if (!t) return !1;
|
|
4796
4802
|
const { worksheet: n, unitId: i, subUnitId: o } = t, s = Wo(r).getCurrentLastSelection();
|
|
4797
4803
|
if (!s) return !1;
|
|
@@ -4820,7 +4826,7 @@ const Bt = {
|
|
|
4820
4826
|
id: "sheet.command.select-all",
|
|
4821
4827
|
type: Q.COMMAND,
|
|
4822
4828
|
handler: async (r, e = { expandToGapFirst: !0, loop: !1 }) => {
|
|
4823
|
-
const t =
|
|
4829
|
+
const t = Be(r.get(N));
|
|
4824
4830
|
if (!t) return !1;
|
|
4825
4831
|
const n = Wo(r).getCurrentLastSelection();
|
|
4826
4832
|
if (!n) return !1;
|
|
@@ -5009,7 +5015,7 @@ const hn = {
|
|
|
5009
5015
|
// offsetXY derived from mouse wheel event
|
|
5010
5016
|
// this._commandService.executeCommand(SetScrollRelativeCommand.id, { offsetY });
|
|
5011
5017
|
handler: async (r, e) => {
|
|
5012
|
-
const t = r.get(D), n = r.get(N), i = r.get(be), o =
|
|
5018
|
+
const t = r.get(D), n = r.get(N), i = r.get(be), o = Be(n);
|
|
5013
5019
|
if (!o) return !1;
|
|
5014
5020
|
const { unitId: s, subUnitId: l } = o, c = i.getRenderById(s).with(Tt).getCurrentScrollState(), { offsetX: d = 0, offsetY: u = 0 } = e || {}, {
|
|
5015
5021
|
sheetViewStartRow: h = 0,
|
|
@@ -5036,7 +5042,7 @@ const hn = {
|
|
|
5036
5042
|
handler: (r, e) => {
|
|
5037
5043
|
if (!e)
|
|
5038
5044
|
return !1;
|
|
5039
|
-
const t = r.get(N), n = r.get(be), i =
|
|
5045
|
+
const t = r.get(N), n = r.get(be), i = Be(t);
|
|
5040
5046
|
if (!i) return !1;
|
|
5041
5047
|
const { workbook: o, worksheet: s, unitId: l } = i, c = n.getRenderById(l).with(Tt).getCurrentScrollState();
|
|
5042
5048
|
if (!s)
|
|
@@ -5070,7 +5076,7 @@ const hn = {
|
|
|
5070
5076
|
id: "sheet.command.scroll-view-reset",
|
|
5071
5077
|
type: Q.COMMAND,
|
|
5072
5078
|
handler: async (r) => {
|
|
5073
|
-
const e = r.get(N), t =
|
|
5079
|
+
const e = r.get(N), t = Be(e);
|
|
5074
5080
|
if (!t) return !1;
|
|
5075
5081
|
const { subUnitId: n, unitId: i } = t;
|
|
5076
5082
|
return r.get(D).executeCommand(hn.id, {
|
|
@@ -5972,7 +5978,7 @@ const Kl = vn(
|
|
|
5972
5978
|
handler: async (r, e) => {
|
|
5973
5979
|
const t = r.get(Mi);
|
|
5974
5980
|
r.get(kr);
|
|
5975
|
-
const n = r.get(Ae), i = r.get(N), o =
|
|
5981
|
+
const n = r.get(Ae), i = r.get(N), o = Be(i);
|
|
5976
5982
|
if (!o) return !1;
|
|
5977
5983
|
const { unitId: s } = o;
|
|
5978
5984
|
switch (e.value) {
|
|
@@ -7432,45 +7438,45 @@ class Em {
|
|
|
7432
7438
|
constructor() {
|
|
7433
7439
|
_(this, "_functions", [
|
|
7434
7440
|
{
|
|
7435
|
-
func:
|
|
7441
|
+
func: Ue.MAX,
|
|
7436
7442
|
filter: (e) => {
|
|
7437
7443
|
var t, n, i, o;
|
|
7438
|
-
return ((n = (t = e.values.find((s) => s.func ===
|
|
7444
|
+
return ((n = (t = e.values.find((s) => s.func === Ue.COUNTA)) == null ? void 0 : t.value) != null ? n : 0) > 1 && ((o = (i = e.values.find((s) => s.func === Ue.COUNT)) == null ? void 0 : i.value) != null ? o : 0) > 0;
|
|
7439
7445
|
}
|
|
7440
7446
|
},
|
|
7441
7447
|
{
|
|
7442
|
-
func:
|
|
7448
|
+
func: Ue.MIN,
|
|
7443
7449
|
filter: (e) => {
|
|
7444
7450
|
var t, n, i, o;
|
|
7445
|
-
return ((n = (t = e.values.find((s) => s.func ===
|
|
7451
|
+
return ((n = (t = e.values.find((s) => s.func === Ue.COUNTA)) == null ? void 0 : t.value) != null ? n : 0) > 1 && ((o = (i = e.values.find((s) => s.func === Ue.COUNT)) == null ? void 0 : i.value) != null ? o : 0) > 0;
|
|
7446
7452
|
}
|
|
7447
7453
|
},
|
|
7448
7454
|
{
|
|
7449
7455
|
func: Xl.SUM,
|
|
7450
7456
|
filter: (e) => {
|
|
7451
7457
|
var t, n, i, o;
|
|
7452
|
-
return ((n = (t = e.values.find((s) => s.func ===
|
|
7458
|
+
return ((n = (t = e.values.find((s) => s.func === Ue.COUNTA)) == null ? void 0 : t.value) != null ? n : 0) > 1 && ((o = (i = e.values.find((s) => s.func === Ue.COUNT)) == null ? void 0 : i.value) != null ? o : 0) > 0;
|
|
7453
7459
|
}
|
|
7454
7460
|
},
|
|
7455
7461
|
{
|
|
7456
|
-
func:
|
|
7462
|
+
func: Ue.COUNTA,
|
|
7457
7463
|
filter: (e) => {
|
|
7458
7464
|
var t, n;
|
|
7459
|
-
return ((n = (t = e.values.find((i) => i.func ===
|
|
7465
|
+
return ((n = (t = e.values.find((i) => i.func === Ue.COUNTA)) == null ? void 0 : t.value) != null ? n : 0) > 1;
|
|
7460
7466
|
}
|
|
7461
7467
|
},
|
|
7462
7468
|
{
|
|
7463
|
-
func:
|
|
7469
|
+
func: Ue.COUNT,
|
|
7464
7470
|
filter: (e) => {
|
|
7465
7471
|
var t, n, i, o;
|
|
7466
|
-
return ((n = (t = e.values.find((s) => s.func ===
|
|
7472
|
+
return ((n = (t = e.values.find((s) => s.func === Ue.COUNTA)) == null ? void 0 : t.value) != null ? n : 0) > 1 && ((o = (i = e.values.find((s) => s.func === Ue.COUNT)) == null ? void 0 : i.value) != null ? o : 0) > 0;
|
|
7467
7473
|
}
|
|
7468
7474
|
},
|
|
7469
7475
|
{
|
|
7470
|
-
func:
|
|
7476
|
+
func: Ue.AVERAGE,
|
|
7471
7477
|
filter: (e) => {
|
|
7472
7478
|
var t, n, i, o;
|
|
7473
|
-
return ((n = (t = e.values.find((s) => s.func ===
|
|
7479
|
+
return ((n = (t = e.values.find((s) => s.func === Ue.COUNTA)) == null ? void 0 : t.value) != null ? n : 0) > 1 && ((o = (i = e.values.find((s) => s.func === Ue.COUNT)) == null ? void 0 : i.value) != null ? o : 0) > 0;
|
|
7474
7480
|
}
|
|
7475
7481
|
}
|
|
7476
7482
|
]);
|
|
@@ -7509,16 +7515,16 @@ const Jl = vn("univer.sheet-status-bar.service"), Fb = "univer-status-bar", Ub =
|
|
|
7509
7515
|
statisticItem: jb
|
|
7510
7516
|
}, Yb = [
|
|
7511
7517
|
Xl.SUM,
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7518
|
+
Ue.AVERAGE,
|
|
7519
|
+
Ue.MIN,
|
|
7520
|
+
Ue.MAX
|
|
7515
7521
|
], Ia = {
|
|
7516
7522
|
[Xl.SUM]: "statusbar.sum",
|
|
7517
|
-
[
|
|
7518
|
-
[
|
|
7519
|
-
[
|
|
7520
|
-
[
|
|
7521
|
-
[
|
|
7523
|
+
[Ue.AVERAGE]: "statusbar.average",
|
|
7524
|
+
[Ue.MIN]: "statusbar.min",
|
|
7525
|
+
[Ue.MAX]: "statusbar.max",
|
|
7526
|
+
[Ue.COUNT]: "statusbar.count",
|
|
7527
|
+
[Ue.COUNTA]: "statusbar.countA",
|
|
7522
7528
|
[Xv.CONCATENATE]: "concatenate"
|
|
7523
7529
|
}, Zb = (r) => {
|
|
7524
7530
|
const e = L(Ae), t = L(eg), n = L(Ol), i = Gb(r), o = async () => {
|
|
@@ -10419,7 +10425,7 @@ const Kd = 998, mn = {
|
|
|
10419
10425
|
var a;
|
|
10420
10426
|
const t = (a = r.get($).getCurrentSelections()) == null ? void 0 : a.map((c) => c.range);
|
|
10421
10427
|
if (!(t != null && t.length)) return !1;
|
|
10422
|
-
const n = r.get(D), i = r.get(N), o =
|
|
10428
|
+
const n = r.get(D), i = r.get(N), o = Be(i);
|
|
10423
10429
|
if (!o) return !1;
|
|
10424
10430
|
const { worksheet: s } = o, l = s.getVisibleRows();
|
|
10425
10431
|
if (um(l, t)) {
|
|
@@ -10444,7 +10450,7 @@ const Kd = 998, mn = {
|
|
|
10444
10450
|
const t = (a = r.get($).getCurrentSelections()) == null ? void 0 : a.map((c) => c.range);
|
|
10445
10451
|
if (!(t != null && t.length))
|
|
10446
10452
|
return !1;
|
|
10447
|
-
const n = r.get(D), i = r.get(N), o =
|
|
10453
|
+
const n = r.get(D), i = r.get(N), o = Be(i);
|
|
10448
10454
|
if (!o) return !1;
|
|
10449
10455
|
const { worksheet: s } = o, l = s.getVisibleCols();
|
|
10450
10456
|
if (hm(l, t)) {
|
|
@@ -10655,7 +10661,7 @@ const ra = {
|
|
|
10655
10661
|
type: Q.COMMAND,
|
|
10656
10662
|
id: "sheet.command.set-selection-frozen",
|
|
10657
10663
|
handler: async (r, e) => {
|
|
10658
|
-
const { type: t } = e || {}, n = r.get(N), i = r.get(qt), o =
|
|
10664
|
+
const { type: t } = e || {}, n = r.get(N), i = r.get(qt), o = Be(n);
|
|
10659
10665
|
if (!o) return !1;
|
|
10660
10666
|
const { unitId: s, subUnitId: l } = o, a = r.get(D), d = r.get($).getCurrentSelections();
|
|
10661
10667
|
if (!d)
|
|
@@ -10726,7 +10732,7 @@ let Co = class extends de {
|
|
|
10726
10732
|
super(), this._renderManagerService = r, this._univerInstanceService = e;
|
|
10727
10733
|
}
|
|
10728
10734
|
getUndoRedoParamsOfColWidth(r) {
|
|
10729
|
-
const e = { redos: [], undos: [] }, { _univerInstanceService: t } = this, n =
|
|
10735
|
+
const e = { redos: [], undos: [] }, { _univerInstanceService: t } = this, n = Be(t);
|
|
10730
10736
|
if (!n) return e;
|
|
10731
10737
|
const { unitId: i, subUnitId: o, worksheet: s } = n, l = this._renderManagerService.getRenderById(i).with(ge);
|
|
10732
10738
|
if (!l.getCurrentParam()) return e;
|
|
@@ -10763,7 +10769,7 @@ const la = {
|
|
|
10763
10769
|
type: Q.COMMAND,
|
|
10764
10770
|
id: "sheet.command.set-col-auto-width",
|
|
10765
10771
|
handler: (r, e) => {
|
|
10766
|
-
const t = r.get(D), n = r.get(qt), i = r.get($), o = r.get(N), s =
|
|
10772
|
+
const t = r.get(D), n = r.get(qt), i = r.get($), o = r.get(N), s = Be(o, e);
|
|
10767
10773
|
if (!s) return !1;
|
|
10768
10774
|
const { unitId: l, subUnitId: a } = s;
|
|
10769
10775
|
let c = [];
|
|
@@ -11579,7 +11585,7 @@ function Ta(r) {
|
|
|
11579
11585
|
icon: "PasteSpecial",
|
|
11580
11586
|
disabled$: qo(r).pipe(
|
|
11581
11587
|
dr(pe(r, { rangeTypes: [ie], worksheetTypes: [te, Ge, Jt], workbookTypes: [J] })),
|
|
11582
|
-
|
|
11588
|
+
Fe(([e, t]) => e || t)
|
|
11583
11589
|
),
|
|
11584
11590
|
hidden$: ue(r, x.UNIVER_SHEET)
|
|
11585
11591
|
};
|
|
@@ -11601,7 +11607,7 @@ function xa(r) {
|
|
|
11601
11607
|
title: "rightClick.pasteValue",
|
|
11602
11608
|
disabled$: qo(r).pipe(
|
|
11603
11609
|
dr(pe(r, { rangeTypes: [ie], worksheetTypes: [Jt, te], workbookTypes: [J] })),
|
|
11604
|
-
|
|
11610
|
+
Fe(([e, t]) => e || t)
|
|
11605
11611
|
),
|
|
11606
11612
|
hidden$: ue(r, x.UNIVER_SHEET)
|
|
11607
11613
|
};
|
|
@@ -11613,7 +11619,7 @@ function Aa(r) {
|
|
|
11613
11619
|
title: "rightClick.pasteFormat",
|
|
11614
11620
|
disabled$: qo(r).pipe(
|
|
11615
11621
|
dr(pe(r, { rangeTypes: [ie], worksheetTypes: [Ge, te], workbookTypes: [J] })),
|
|
11616
|
-
|
|
11622
|
+
Fe(([e, t]) => e || t)
|
|
11617
11623
|
),
|
|
11618
11624
|
hidden$: ue(r, x.UNIVER_SHEET)
|
|
11619
11625
|
};
|
|
@@ -11625,7 +11631,7 @@ function ka(r) {
|
|
|
11625
11631
|
title: "rightClick.pasteColWidth",
|
|
11626
11632
|
disabled$: qo(r).pipe(
|
|
11627
11633
|
dr(pe(r, { rangeTypes: [ie], worksheetTypes: [Dr, te], workbookTypes: [J] })),
|
|
11628
|
-
|
|
11634
|
+
Fe(([e, t]) => e || t)
|
|
11629
11635
|
)
|
|
11630
11636
|
};
|
|
11631
11637
|
}
|
|
@@ -11636,7 +11642,7 @@ function Ha(r) {
|
|
|
11636
11642
|
title: "rightClick.pasteBesidesBorder",
|
|
11637
11643
|
disabled$: qo(r).pipe(
|
|
11638
11644
|
dr(pe(r, { rangeTypes: [ie], worksheetTypes: [te, Ge, Jt, Nr, Dr], workbookTypes: [J] })),
|
|
11639
|
-
|
|
11645
|
+
Fe(([e, t]) => e || t)
|
|
11640
11646
|
),
|
|
11641
11647
|
hidden$: ue(r, x.UNIVER_SHEET)
|
|
11642
11648
|
};
|
|
@@ -12724,7 +12730,7 @@ function Xw(r) {
|
|
|
12724
12730
|
const e = r.get($), t = r.get(et), n = r.get(N), i = r.get(ov), o = n.getCurrentTypeOfUnit$(x.UNIVER_SHEET);
|
|
12725
12731
|
return dt([
|
|
12726
12732
|
e.selectionMoveEnd$,
|
|
12727
|
-
o.pipe(
|
|
12733
|
+
o.pipe(Fe((s) => {
|
|
12728
12734
|
var l;
|
|
12729
12735
|
return (l = s == null ? void 0 : s.getUnitId()) != null ? l : "";
|
|
12730
12736
|
})),
|
|
@@ -12733,7 +12739,7 @@ function Xw(r) {
|
|
|
12733
12739
|
return (l = s == null ? void 0 : s.activeSheet$) != null ? l : Re(null);
|
|
12734
12740
|
}))
|
|
12735
12741
|
]).pipe(
|
|
12736
|
-
|
|
12742
|
+
Fe(([s, l, a]) => {
|
|
12737
12743
|
if (!a || !s || s.length === 0) return !1;
|
|
12738
12744
|
const c = a.getSheetId(), d = s.map((g) => g.range);
|
|
12739
12745
|
if (i.interceptor.fetchThroughInterceptors(sv)(!1, d))
|
|
@@ -13827,7 +13833,7 @@ const hr = {
|
|
|
13827
13833
|
const e = r.get(rn), t = r.get(D), n = r.get(Ae), i = r.get($), o = r.get(N), s = i.getCurrentSelections();
|
|
13828
13834
|
if (!s)
|
|
13829
13835
|
return !1;
|
|
13830
|
-
const l =
|
|
13836
|
+
const l = Be(o);
|
|
13831
13837
|
if (!l) return !1;
|
|
13832
13838
|
const { worksheet: a } = l;
|
|
13833
13839
|
let c = s[0].range;
|
|
@@ -13852,7 +13858,7 @@ const hr = {
|
|
|
13852
13858
|
handler: async (r) => {
|
|
13853
13859
|
const e = r.get(rn), t = r.get(D), n = r.get(Ae), i = r.get($), o = r.get(N), s = i.getCurrentSelections();
|
|
13854
13860
|
if (!s) return !1;
|
|
13855
|
-
const l =
|
|
13861
|
+
const l = Be(o);
|
|
13856
13862
|
if (!l) return !1;
|
|
13857
13863
|
const { worksheet: a } = l;
|
|
13858
13864
|
let c = s[0].range;
|
|
@@ -13885,7 +13891,7 @@ const hr = {
|
|
|
13885
13891
|
const e = r.get(rn), t = r.get(D), n = r.get(Ae), i = r.get($), o = r.get(N), s = i.getCurrentSelections();
|
|
13886
13892
|
if (!s)
|
|
13887
13893
|
return !1;
|
|
13888
|
-
const l =
|
|
13894
|
+
const l = Be(o);
|
|
13889
13895
|
if (!l) return !1;
|
|
13890
13896
|
const { worksheet: a } = l;
|
|
13891
13897
|
let c = s[0].range;
|
|
@@ -13919,7 +13925,7 @@ const hr = {
|
|
|
13919
13925
|
const e = r.get(rn), t = r.get(D), n = r.get(Ae), i = r.get($), o = r.get(N), s = i.getCurrentSelections();
|
|
13920
13926
|
if (!s)
|
|
13921
13927
|
return !1;
|
|
13922
|
-
const l =
|
|
13928
|
+
const l = Be(o);
|
|
13923
13929
|
if (!l) return !1;
|
|
13924
13930
|
const { worksheet: a } = l;
|
|
13925
13931
|
let c = s[0].range;
|
|
@@ -14150,7 +14156,7 @@ const Bn = {
|
|
|
14150
14156
|
let n = e == null ? void 0 : e.range;
|
|
14151
14157
|
if (n || (n = (c = t.getCurrentLastSelection()) == null ? void 0 : c.range), !n)
|
|
14152
14158
|
return !1;
|
|
14153
|
-
const i = r.get(D), o = r.get(N), s =
|
|
14159
|
+
const i = r.get(D), o = r.get(N), s = Be(o);
|
|
14154
14160
|
if (!s) return !1;
|
|
14155
14161
|
const { worksheet: l } = s, a = l.getVisibleRows();
|
|
14156
14162
|
if (um(a, [n])) {
|
|
@@ -14176,7 +14182,7 @@ const Bn = {
|
|
|
14176
14182
|
let n = e == null ? void 0 : e.range;
|
|
14177
14183
|
if (n || (n = (c = t.getCurrentLastSelection()) == null ? void 0 : c.range), !n)
|
|
14178
14184
|
return !1;
|
|
14179
|
-
const i = r.get(D), o = r.get(N), s =
|
|
14185
|
+
const i = r.get(D), o = r.get(N), s = Be(o);
|
|
14180
14186
|
if (!s) return !1;
|
|
14181
14187
|
const { worksheet: l } = s, a = l.getVisibleCols();
|
|
14182
14188
|
if (hm(a, [n])) {
|
|
@@ -15366,7 +15372,7 @@ function z0(r) {
|
|
|
15366
15372
|
hidden$: ue(r, x.UNIVER_SHEET),
|
|
15367
15373
|
disabled$: e.pipe(
|
|
15368
15374
|
dr(t),
|
|
15369
|
-
|
|
15375
|
+
Fe(([n, i]) => n || i)
|
|
15370
15376
|
)
|
|
15371
15377
|
};
|
|
15372
15378
|
}
|
|
@@ -15419,7 +15425,7 @@ function G0(r) {
|
|
|
15419
15425
|
l.ruleChange$,
|
|
15420
15426
|
a.ruleChange$
|
|
15421
15427
|
).pipe(
|
|
15422
|
-
|
|
15428
|
+
Fe(() => {
|
|
15423
15429
|
const d = i.getUnitId(), u = s.getSheetId(), h = l.getSubunitRuleList(d, u), g = c.getCurrentSelections(), m = g == null ? void 0 : g.map((S) => S.range), f = h.map((S) => S.ranges).flat();
|
|
15424
15430
|
if (!m)
|
|
15425
15431
|
return !1;
|
|
@@ -15444,7 +15450,7 @@ function q0(r) {
|
|
|
15444
15450
|
a.ruleChange$,
|
|
15445
15451
|
c.ruleChange$
|
|
15446
15452
|
).pipe(
|
|
15447
|
-
|
|
15453
|
+
Fe(() => {
|
|
15448
15454
|
var M, E;
|
|
15449
15455
|
const h = o.getUnitId(), g = l.getSheetId(), m = t.getSubunitRuleList(h, g), f = (M = u.getCurrentSelections()) == null ? void 0 : M.map((P) => P.range);
|
|
15450
15456
|
if (m.map((P) => P.ranges).flat(), !(f != null && f.length) || f.length > 1)
|
|
@@ -15479,14 +15485,14 @@ function Q0(r) {
|
|
|
15479
15485
|
var m;
|
|
15480
15486
|
if (!l)
|
|
15481
15487
|
return Re(!0);
|
|
15482
|
-
const a = o.getUnitId(), c = r.get($), d = r.get(et), u = r.get(pt), h = (m = t.composePermission$([new J(a).id]).pipe(
|
|
15488
|
+
const a = o.getUnitId(), c = r.get($), d = r.get(et), u = r.get(pt), h = (m = t.composePermission$([new J(a).id]).pipe(Fe((f) => f.every((p) => p.value)))) != null ? m : Re(!1), g = _t(
|
|
15483
15489
|
d.ruleChange$,
|
|
15484
15490
|
u.ruleChange$
|
|
15485
15491
|
).pipe(
|
|
15486
15492
|
Gt(null)
|
|
15487
15493
|
);
|
|
15488
15494
|
return dt([h, g, c.selectionMoveEnd$]).pipe(
|
|
15489
|
-
|
|
15495
|
+
Fe(([f, p, S]) => {
|
|
15490
15496
|
if (!f)
|
|
15491
15497
|
return !0;
|
|
15492
15498
|
const v = c.getCurrentSelections(), C = v == null ? void 0 : v.map((w) => w.range);
|
|
@@ -15506,14 +15512,14 @@ function Sf(r) {
|
|
|
15506
15512
|
var M;
|
|
15507
15513
|
if (!m)
|
|
15508
15514
|
return Re(!0);
|
|
15509
|
-
const p = r.get(He).subscribeContextValue$(El).pipe(Gt(!1)), S = d.getUnitId(), v = m.getSheetId(), C = r.get(et), w = r.get(pt), R = r.get($), I = (M = t.composePermission$([new zl(S).id]).pipe(
|
|
15515
|
+
const p = r.get(He).subscribeContextValue$(El).pipe(Gt(!1)), S = d.getUnitId(), v = m.getSheetId(), C = r.get(et), w = r.get(pt), R = r.get($), I = (M = t.composePermission$([new zl(S).id]).pipe(Fe((E) => E.every((P) => P.value)))) != null ? M : Re(!1), y = _t(
|
|
15510
15516
|
C.ruleChange$,
|
|
15511
15517
|
w.ruleChange$
|
|
15512
15518
|
).pipe(
|
|
15513
15519
|
Gt(null)
|
|
15514
15520
|
);
|
|
15515
15521
|
return dt([I, y, R.selectionMoveEnd$, p]).pipe(
|
|
15516
|
-
|
|
15522
|
+
Fe(([E, P, T, A]) => {
|
|
15517
15523
|
if (!E || A)
|
|
15518
15524
|
return !0;
|
|
15519
15525
|
const k = R.getCurrentSelections(), O = k == null ? void 0 : k.map((B) => B.range);
|
|
@@ -15538,14 +15544,14 @@ function K0(r) {
|
|
|
15538
15544
|
var m;
|
|
15539
15545
|
if (!l)
|
|
15540
15546
|
return Re(!0);
|
|
15541
|
-
const a = o.getUnitId(), c = l.getSheetId(), d = r.get(et), u = r.get(pt), h = (m = t.composePermission$([new zl(a).id]).pipe(
|
|
15547
|
+
const a = o.getUnitId(), c = l.getSheetId(), d = r.get(et), u = r.get(pt), h = (m = t.composePermission$([new zl(a).id]).pipe(Fe((f) => f.every((p) => p.value)))) != null ? m : Re(!1), g = _t(
|
|
15542
15548
|
d.ruleChange$,
|
|
15543
15549
|
u.ruleChange$
|
|
15544
15550
|
).pipe(
|
|
15545
15551
|
Gt(null)
|
|
15546
15552
|
);
|
|
15547
15553
|
return dt([h, g]).pipe(
|
|
15548
|
-
|
|
15554
|
+
Fe(([f, p]) => {
|
|
15549
15555
|
var C;
|
|
15550
15556
|
if (!f) return !0;
|
|
15551
15557
|
const S = u.getRule(a, c);
|
|
@@ -15565,7 +15571,7 @@ function J0(r) {
|
|
|
15565
15571
|
return Re(!0);
|
|
15566
15572
|
const a = o.getUnitId(), c = l.getSheetId(), d = r.get(pt);
|
|
15567
15573
|
return d.ruleChange$.pipe(Gt(null)).pipe(
|
|
15568
|
-
|
|
15574
|
+
Fe(() => {
|
|
15569
15575
|
var h;
|
|
15570
15576
|
return d.getRule(a, c) ? ((h = t.getPermissionPoint(new Ng(a, c).id)) == null ? void 0 : h.value) === !1 : !0;
|
|
15571
15577
|
})
|
|
@@ -15582,9 +15588,9 @@ function $0(r) {
|
|
|
15582
15588
|
var m;
|
|
15583
15589
|
if (!l)
|
|
15584
15590
|
return Re(!0);
|
|
15585
|
-
const a = o.getUnitId(), c = r.get(et), d = r.get(pt), u = (m = t.composePermission$([new zl(a).id, new lg(a).id]).pipe(
|
|
15591
|
+
const a = o.getUnitId(), c = r.get(et), d = r.get(pt), u = (m = t.composePermission$([new zl(a).id, new lg(a).id]).pipe(Fe((f) => f.every((p) => p.value)))) != null ? m : Re(!1), h = d.ruleChange$.pipe(Gt(null)), g = c.ruleChange$.pipe(Gt(null));
|
|
15586
15592
|
return dt([u, h, g]).pipe(
|
|
15587
|
-
|
|
15593
|
+
Fe(([f, p, S]) => {
|
|
15588
15594
|
if (!f)
|
|
15589
15595
|
return !0;
|
|
15590
15596
|
const v = l.getSheetId(), C = d.getRule(a, v), w = c.getSubunitRuleList(a, v);
|
|
@@ -15608,7 +15614,7 @@ function eR(r) {
|
|
|
15608
15614
|
d.selectionMoveEnd$
|
|
15609
15615
|
).pipe(Gt(null));
|
|
15610
15616
|
return dt([g]).pipe(
|
|
15611
|
-
|
|
15617
|
+
Fe(([m]) => {
|
|
15612
15618
|
var E;
|
|
15613
15619
|
const f = r.get($).getCurrentSelections(), p = f == null ? void 0 : f.map((P) => P.range);
|
|
15614
15620
|
if (!(p != null && p.length) || p.length > 1)
|
|
@@ -15645,8 +15651,8 @@ function vf(r) {
|
|
|
15645
15651
|
if (!m)
|
|
15646
15652
|
return Re(!0);
|
|
15647
15653
|
const f = d.getUnitId();
|
|
15648
|
-
return ((v = (S = t.getPermissionPoint$(new J(f).id)) == null ? void 0 : S.pipe(
|
|
15649
|
-
|
|
15654
|
+
return ((v = (S = t.getPermissionPoint$(new J(f).id)) == null ? void 0 : S.pipe(Fe((C) => !!C.value))) != null ? v : Re(!1)).pipe(
|
|
15655
|
+
Fe((C) => !C)
|
|
15650
15656
|
);
|
|
15651
15657
|
})
|
|
15652
15658
|
))
|
|
@@ -15757,7 +15763,7 @@ function sR(r) {
|
|
|
15757
15763
|
type: K.BUTTON,
|
|
15758
15764
|
title: "sheetConfig.delete",
|
|
15759
15765
|
disabled$: dt([n, i]).pipe(
|
|
15760
|
-
|
|
15766
|
+
Fe(([o, s]) => o || s)
|
|
15761
15767
|
),
|
|
15762
15768
|
hidden$: ue(r, x.UNIVER_SHEET)
|
|
15763
15769
|
};
|
|
@@ -15810,7 +15816,7 @@ function dR(r) {
|
|
|
15810
15816
|
return nl(e, n), i.dispose;
|
|
15811
15817
|
}).pipe(
|
|
15812
15818
|
dr(Di(r, [J, Bg])),
|
|
15813
|
-
|
|
15819
|
+
Fe(([n, i]) => n || i)
|
|
15814
15820
|
),
|
|
15815
15821
|
hidden$: ue(r, x.UNIVER_SHEET)
|
|
15816
15822
|
};
|
|
@@ -15833,7 +15839,7 @@ function uR(r) {
|
|
|
15833
15839
|
return i(), o.dispose;
|
|
15834
15840
|
}).pipe(
|
|
15835
15841
|
dr(Di(r, [J, Bg])),
|
|
15836
|
-
|
|
15842
|
+
Fe(([n, i]) => n || i)
|
|
15837
15843
|
),
|
|
15838
15844
|
hidden$: ue(r, x.UNIVER_SHEET)
|
|
15839
15845
|
};
|
|
@@ -17365,7 +17371,7 @@ let Mo = class extends de {
|
|
|
17365
17371
|
const g = (p, S) => {
|
|
17366
17372
|
o = p, s = S, u();
|
|
17367
17373
|
}, m = a.pipe(
|
|
17368
|
-
|
|
17374
|
+
Fe((p) => {
|
|
17369
17375
|
const S = this._calcCellPositionByCell(e.endRow, e.endColumn, t, n, i);
|
|
17370
17376
|
return {
|
|
17371
17377
|
top: p.top,
|
|
@@ -18878,7 +18884,7 @@ let Ar = class extends de {
|
|
|
18878
18884
|
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) && ((u = e == null ? void 0 : e.customRange) == null ? void 0 : u.rangeId) === ((h = t == null ? void 0 : t.customRange) == null ? void 0 : h.rangeId) && ((g = e == null ? void 0 : e.bullet) == null ? void 0 : g.startIndex) === ((m = t == null ? void 0 : t.bullet) == null ? void 0 : m.startIndex) && ((f = e == null ? void 0 : e.customRange) == null ? void 0 : f.startIndex) === ((p = t == null ? void 0 : t.customRange) == null ? void 0 : p.startIndex) && ((S = e == null ? void 0 : e.customRange) == null ? void 0 : S.endIndex) === ((v = t == null ? void 0 : t.customRange) == null ? void 0 : v.endIndex) && (e == null ? void 0 : e.drawing) === (t == null ? void 0 : t.drawing);
|
|
18879
18885
|
}
|
|
18880
18886
|
),
|
|
18881
|
-
|
|
18887
|
+
Fe((e) => e && {
|
|
18882
18888
|
unitId: e.location.unitId,
|
|
18883
18889
|
subUnitId: e.location.subUnitId,
|
|
18884
18890
|
row: e.location.row,
|
|
@@ -18899,7 +18905,7 @@ let Ar = class extends de {
|
|
|
18899
18905
|
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);
|
|
18900
18906
|
}
|
|
18901
18907
|
),
|
|
18902
|
-
|
|
18908
|
+
Fe((e) => e && {
|
|
18903
18909
|
unitId: e.location.unitId,
|
|
18904
18910
|
subUnitId: e.location.subUnitId,
|
|
18905
18911
|
row: e.location.row,
|
|
@@ -19738,7 +19744,7 @@ let To = class extends de {
|
|
|
19738
19744
|
_permissionCheckByAutoFillCommand(e) {
|
|
19739
19745
|
if (!e)
|
|
19740
19746
|
return !1;
|
|
19741
|
-
const { targetRange: t } = e, n =
|
|
19747
|
+
const { targetRange: t } = e, n = Be(this._univerInstanceService);
|
|
19742
19748
|
if (!n)
|
|
19743
19749
|
return !1;
|
|
19744
19750
|
const { worksheet: i, unitId: o, subUnitId: s } = n;
|
|
@@ -19781,7 +19787,7 @@ let ul = class extends Un {
|
|
|
19781
19787
|
this.disposeWithMe(
|
|
19782
19788
|
this._headerMoveRenderController.interceptor.intercept(e, {
|
|
19783
19789
|
handler: (t, n) => {
|
|
19784
|
-
const i =
|
|
19790
|
+
const i = Be(this._univerInstanceService);
|
|
19785
19791
|
if (!i)
|
|
19786
19792
|
return !1;
|
|
19787
19793
|
const { unitId: o, subUnitId: s } = i;
|
|
@@ -19809,7 +19815,7 @@ let ul = class extends Un {
|
|
|
19809
19815
|
this._headerResizeRenderController.interceptor.intercept(this._headerResizeRenderController.interceptor.getInterceptPoints().HEADER_RESIZE_PERMISSION_CHECK, {
|
|
19810
19816
|
handler: (e, t) => {
|
|
19811
19817
|
var s, l, a, c;
|
|
19812
|
-
const n =
|
|
19818
|
+
const n = Be(this._univerInstanceService);
|
|
19813
19819
|
if (!n)
|
|
19814
19820
|
return !1;
|
|
19815
19821
|
const { unitId: i, subUnitId: o } = n;
|
|
@@ -19828,7 +19834,7 @@ let ul = class extends Un {
|
|
|
19828
19834
|
this._selectionRenderService.interceptor.intercept(this._selectionRenderService.interceptor.getInterceptPoints().RANGE_FILL_PERMISSION_CHECK, {
|
|
19829
19835
|
handler: (e, t) => {
|
|
19830
19836
|
var m, f, p;
|
|
19831
|
-
const n =
|
|
19837
|
+
const n = Be(this._univerInstanceService);
|
|
19832
19838
|
if (!n)
|
|
19833
19839
|
return !1;
|
|
19834
19840
|
const { worksheet: i, unitId: o, subUnitId: s } = n;
|
|
@@ -19862,7 +19868,7 @@ let ul = class extends Un {
|
|
|
19862
19868
|
this._selectionRenderService.interceptor.intercept(this._selectionRenderService.interceptor.getInterceptPoints().RANGE_MOVE_PERMISSION_CHECK, {
|
|
19863
19869
|
handler: (e, t) => {
|
|
19864
19870
|
var h;
|
|
19865
|
-
const n =
|
|
19871
|
+
const n = Be(this._univerInstanceService);
|
|
19866
19872
|
if (!n)
|
|
19867
19873
|
return !1;
|
|
19868
19874
|
const { worksheet: i, unitId: o, subUnitId: s } = n;
|
|
@@ -20014,11 +20020,11 @@ function VI(r) {
|
|
|
20014
20020
|
const { sum: e, count: t, countA: n, min: i, max: o } = r.getResults();
|
|
20015
20021
|
return [
|
|
20016
20022
|
{
|
|
20017
|
-
func:
|
|
20023
|
+
func: Ue.MAX,
|
|
20018
20024
|
value: o
|
|
20019
20025
|
},
|
|
20020
20026
|
{
|
|
20021
|
-
func:
|
|
20027
|
+
func: Ue.MIN,
|
|
20022
20028
|
value: i
|
|
20023
20029
|
},
|
|
20024
20030
|
{
|
|
@@ -20026,15 +20032,15 @@ function VI(r) {
|
|
|
20026
20032
|
value: e
|
|
20027
20033
|
},
|
|
20028
20034
|
{
|
|
20029
|
-
func:
|
|
20035
|
+
func: Ue.COUNTA,
|
|
20030
20036
|
value: n
|
|
20031
20037
|
},
|
|
20032
20038
|
{
|
|
20033
|
-
func:
|
|
20039
|
+
func: Ue.COUNT,
|
|
20034
20040
|
value: t
|
|
20035
20041
|
},
|
|
20036
20042
|
{
|
|
20037
|
-
func:
|
|
20043
|
+
func: Ue.AVERAGE,
|
|
20038
20044
|
value: e / t
|
|
20039
20045
|
}
|
|
20040
20046
|
];
|
|
@@ -20189,7 +20195,7 @@ let hl = class extends Un {
|
|
|
20189
20195
|
priority: 100,
|
|
20190
20196
|
handler: (e, t) => {
|
|
20191
20197
|
var a;
|
|
20192
|
-
const n =
|
|
20198
|
+
const n = Be(this._univerInstanceService);
|
|
20193
20199
|
if (!n)
|
|
20194
20200
|
return e != null ? e : [];
|
|
20195
20201
|
const { worksheet: i, unitId: o, subUnitId: s } = n;
|
|
@@ -20741,7 +20747,7 @@ const op = (r, e, t, n, i) => {
|
|
|
20741
20747
|
var u;
|
|
20742
20748
|
const i = L(N), o = L($);
|
|
20743
20749
|
if (!L(wi).getVisible()) return null;
|
|
20744
|
-
const l =
|
|
20750
|
+
const l = Be(i);
|
|
20745
20751
|
if (!l) return null;
|
|
20746
20752
|
const { worksheet: a } = l, d = ((u = o.getCurrentSelections()) == null ? void 0 : u.map((h) => h.range)).reduce((h, g) => h + qg(a.getName(), g), "");
|
|
20747
20753
|
return r ? /* @__PURE__ */ b(
|